[Webkit-unassigned] [Bug 46335] New: Add EditingStyle
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Sep 22 20:48:02 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=46335
Summary: Add EditingStyle
Product: WebKit
Version: 528+ (Nightly build)
Platform: All
OS/Version: All
Status: NEW
Severity: Enhancement
Priority: P2
Component: HTML Editing
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: rniwa at webkit.org
CC: eric at webkit.org, mjs at apple.com, darin at apple.com,
justin.garcia at apple.com, tony at chromium.org,
ojan at chromium.org, enrica at apple.com
Created an attachment (id=68496)
--> (https://bugs.webkit.org/attachment.cgi?id=68496)
work in progress
Currently, ApplyStyleCommand.cpp contains a few functions to extract CSSMutableStyleDeclaration and prepares it to apply for style preservation purposes: removeNonEditingProperties, editingStyleAtPosition, prepareEditingStyleToApplyAt, and removeStylesAddedByNode. But the fact they are global functions and reside in "Apply"StyleCommand.cpp is rather misleading, and so I propose to isolate all of these functions into a new EditingStyle class.
A big motivation behind this is the bug 27818. Resolving the bug 27818 requires adding new argument to one of the constructors of ApplyStyleCommand and to many functions between executeUnderline and ApplyStyleCommand. This is not an ideal solution since it introduces new dependency between many parts of editing. Adding EditingStyle solves this problem because EditingStyle can encapsulate this new argument, decoupling the implementation details of adding and removing text decorations from the rest of editing code.
In the long run, I also want to merge StyleChange and much of logic in removeImplicitlyStyledElement to this new class so that ApplyStyleCommand can ask EditingStyle which element needs to be removed or added instead of ApplyStyleCommand figuring out what element needs to be added or removed. This nicely separates the logic to manipulate the DOM and the logic to query against styles.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list