REGRESSION(r165542): printing/page-rule-selection.html failing
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Mar 2014 19:44:22 +0000 (19:44 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Mar 2014 19:44:22 +0000 (19:44 +0000)
https://bugs.webkit.org/show_bug.cgi?id=130205

Reviewed by Andreas Kling.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::keyframeStylesForAnimation):
(WebCore::StyleResolver::styleForPage):

    Use Document style as parent when resolving page style.

(WebCore::StyleResolver::applyPropertyToStyle):
* css/StyleResolver.h:

    Get rid of the default null parameter.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@165557 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/css/StyleResolver.h

index 854fa5d..34c7f0c 100644 (file)
@@ -1,3 +1,21 @@
+2014-03-13  Antti Koivisto  <antti@apple.com>
+
+        REGRESSION(r165542): printing/page-rule-selection.html failing
+        https://bugs.webkit.org/show_bug.cgi?id=130205
+
+        Reviewed by Andreas Kling.
+
+        * css/StyleResolver.cpp:
+        (WebCore::StyleResolver::keyframeStylesForAnimation):
+        (WebCore::StyleResolver::styleForPage):
+        
+            Use Document style as parent when resolving page style.
+
+        (WebCore::StyleResolver::applyPropertyToStyle):
+        * css/StyleResolver.h:
+        
+            Get rid of the default null parameter.
+
 2014-03-13  Benjamin Poulain  <bpoulain@apple.com>
 
         Remove INPUT_LIST_BUTTON from the PseudoIds
index a6854a6..baaf44c 100644 (file)
@@ -892,7 +892,7 @@ void StyleResolver::keyframeStylesForAnimation(Element* e, const RenderStyle* el
     for (unsigned i = 0; i < keyframes.size(); ++i) {
         // Apply the declaration to the style. This is a simplified version of the logic in styleForElement
         initElement(e);
-        m_state.initForStyleResolve(document(), e);
+        m_state.initForStyleResolve(document(), e, nullptr);
 
         const StyleKeyframe* keyframe = keyframes[i].get();
 
@@ -989,7 +989,7 @@ PassRefPtr<RenderStyle> StyleResolver::pseudoStyleForElement(Element* element, c
 
 PassRef<RenderStyle> StyleResolver::styleForPage(int pageIndex)
 {
-    m_state.initForStyleResolve(document(), document().documentElement()); // m_rootElementStyle will be set to the document style.
+    m_state.initForStyleResolve(m_document, m_document.documentElement(), m_document.renderStyle());
 
     m_state.setStyle(RenderStyle::create());
     m_state.style()->inheritFrom(m_state.rootElementStyle());
@@ -1855,7 +1855,7 @@ void StyleResolver::applyMatchedProperties(const MatchResult& matchResult, const
 void StyleResolver::applyPropertyToStyle(CSSPropertyID id, CSSValue* value, RenderStyle* style)
 {
     initElement(0);
-    m_state.initForStyleResolve(document(), 0, style);
+    m_state.initForStyleResolve(document(), nullptr, style);
     m_state.setStyle(*style);
     applyPropertyToCurrentStyle(id, value);
 }
index 1477f99..3c4dca8 100644 (file)
@@ -349,7 +349,7 @@ public:
 
     public:
         void initElement(Element*);
-        void initForStyleResolve(Document&, Element*, RenderStyle* parentStyle = 0, RenderRegion* regionForStyling = 0);
+        void initForStyleResolve(Document&, Element*, RenderStyle* parentStyle, RenderRegion* regionForStyling = nullptr);
         void clear();
 
         Document& document() const { return m_element->document(); }