2011-02-22 Ryosuke Niwa <rniwa@webkit.org>
[WebKit-https.git] / Source / WebCore / ChangeLog
index f6a6f8d..6e366b4 100644 (file)
@@ -1,3 +1,34 @@
+2011-02-22  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Reviewed by Darin Adler.
+
+        Deploy EditingStyle in removeInlineStyleFromElement and removeCSSStyle
+        https://bugs.webkit.org/show_bug.cgi?id=54944
+
+        Deployed EditingStyle in removeInlineStyleFromElement and removeCSSStyle.
+
+        Also extracted EditingStyle::conflictsWithInlineStyleOfElement from ApplyStyleCommand::removeCSSStyle,
+        which returns true iff the specified element has inline style that conflicts or matches the editing style.
+        It also appends conflicting property IDs to the vector of property IDs if one is specified.
+
+        * editing/ApplyStyleCommand.cpp:
+        (WebCore::ApplyStyleCommand::applyBlockStyle): Calls removeCSSStyle.
+        (WebCore::ApplyStyleCommand::applyInlineStyle): Calls shouldSplitTextElement.
+        (WebCore::ApplyStyleCommand::removeStyleFromRunBeforeApplyingStyle): Calls removeInlineStyleFromElement.
+        (WebCore::ApplyStyleCommand::removeInlineStyleFromElement): Takes EditingStyle* instead of CSSMutableStyleDeclaration*.
+        (WebCore::ApplyStyleCommand::removeCSSStyle): Ditto; extracted the logic to decide properties to remove as
+        conflictsWithInlineStyleOfElement.
+        (WebCore::ApplyStyleCommand::highestAncestorWithConflictingInlineStyle): Calls shouldRemoveInlineStyleFromElement.
+        (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode): Calls removeInlineStyleFromElement.
+        (WebCore::ApplyStyleCommand::removeInlineStyle): Ditto.
+        (WebCore::ApplyStyleCommand::shouldSplitTextElement): Takes EditingStyle* instead of CSSMutableStyleDeclaration*.
+        * editing/ApplyStyleCommand.h:
+        (WebCore::ApplyStyleCommand::shouldRemoveInlineStyleFromElement): Ditto.
+        * editing/EditingStyle.cpp:
+        (WebCore::EditingStyle::conflictsWithInlineStyleOfElement): Extracted from ApplyStyleCommand::removeCSSStyle.
+        * editing/EditingStyle.h:
+        (WebCore::EditingStyle::conflictsWithInlineStyleOfElement): Added.
+
 2011-02-22  Chang Shu  <cshu@webkit.org>
 
         Reviewed by Csaba Osztrogon√°c.