Title: [131968] trunk/Source/WebCore
Revision
131968
Author
[email protected]
Date
2012-10-19 18:02:34 -0700 (Fri, 19 Oct 2012)

Log Message

Remove HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro in StyleResolver.
https://bugs.webkit.org/show_bug.cgi?id=99782

Reviewed by Sam Weinig.

Removes last usage of HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro, so that in future there will be no temptation
to use it instead of adding a line to StyleBuilder.
Also removes redundant checks for inital and inherit (HANDLE_INHERIT_AND_INTIAL already returns in those cases).
I don't want to move this code into StyleBuilder until the FIXME that is already there is fixed.

Covered by many existing writing mode tests (eg. fast/html/details-writing-mode.html)

* css/StyleResolver.cpp:
(WebCore):
(WebCore::StyleResolver::applyProperty):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (131967 => 131968)


--- trunk/Source/WebCore/ChangeLog	2012-10-20 00:55:33 UTC (rev 131967)
+++ trunk/Source/WebCore/ChangeLog	2012-10-20 01:02:34 UTC (rev 131968)
@@ -1,3 +1,21 @@
+2012-10-19  Luke Macpherson   <[email protected]>
+
+        Remove HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro in StyleResolver.
+        https://bugs.webkit.org/show_bug.cgi?id=99782
+
+        Reviewed by Sam Weinig.
+
+        Removes last usage of HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro, so that in future there will be no temptation
+        to use it instead of adding a line to StyleBuilder.
+        Also removes redundant checks for inital and inherit (HANDLE_INHERIT_AND_INTIAL already returns in those cases).
+        I don't want to move this code into StyleBuilder until the FIXME that is already there is fixed.
+
+        Covered by many existing writing mode tests (eg. fast/html/details-writing-mode.html)
+
+        * css/StyleResolver.cpp:
+        (WebCore):
+        (WebCore::StyleResolver::applyProperty):
+
 2012-10-19  Joshua Bell  <[email protected]>
 
         IndexedDB: Hidden indexing events are visible to script via bubbling/capture

Modified: trunk/Source/WebCore/css/StyleResolver.cpp (131967 => 131968)


--- trunk/Source/WebCore/css/StyleResolver.cpp	2012-10-20 00:55:33 UTC (rev 131967)
+++ trunk/Source/WebCore/css/StyleResolver.cpp	2012-10-20 01:02:34 UTC (rev 131968)
@@ -199,12 +199,6 @@
     return;\
 }
 
-#define HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(prop, Prop) \
-HANDLE_INHERIT_AND_INITIAL(prop, Prop) \
-if (primitiveValue) \
-    m_style->set##Prop(*primitiveValue);
-
-
 static RuleSet* defaultStyle;
 static RuleSet* defaultQuirksStyle;
 static RuleSet* defaultPrintStyle;
@@ -3538,9 +3532,13 @@
 
     // CSS Text Layout Module Level 3: Vertical writing support
     case CSSPropertyWebkitWritingMode: {
-        HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(writingMode, WritingMode)
+        HANDLE_INHERIT_AND_INITIAL(writingMode, WritingMode);
+        
+        if (primitiveValue)
+            m_style->setWritingMode(*primitiveValue);
+        
         // FIXME: It is not ok to modify document state while applying style.
-        if (!isInherit && !isInitial && m_element && m_element == m_element->document()->documentElement())
+        if (m_element && m_element == m_element->document()->documentElement())
             m_element->document()->setWritingModeSetOnDocumentElement(true);
         FontDescription fontDescription = m_style->fontDescription();
         fontDescription.setOrientation(m_style->isHorizontalWritingMode() ? Horizontal : Vertical);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to