Title: [94561] trunk/Source/WebCore
Revision
94561
Author
[email protected]
Date
2011-09-06 04:15:29 -0700 (Tue, 06 Sep 2011)

Log Message

https://bugs.webkit.org/show_bug.cgi?id=67480
[Chromium] [REGRESSION] Layout Test svg/batik/text/textStyles.svg is failing

Reviewed by Dimitri Glazkov.

The text node needs willRecalcStyle mechanism too.

* dom/Text.cpp:
(WebCore::Text::recalcTextStyle):
* dom/Text.h:
(WebCore::Text::willRecalcTextStyle):
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::SVGTRefElement):
(WebCore::SVGShadowText::SVGShadowText):
(WebCore::SVGShadowText::willRecalcTextStyle):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (94560 => 94561)


--- trunk/Source/WebCore/ChangeLog	2011-09-06 09:34:02 UTC (rev 94560)
+++ trunk/Source/WebCore/ChangeLog	2011-09-06 11:15:29 UTC (rev 94561)
@@ -1,3 +1,21 @@
+2011-09-06  Antti Koivisto  <[email protected]>
+
+        https://bugs.webkit.org/show_bug.cgi?id=67480
+        [Chromium] [REGRESSION] Layout Test svg/batik/text/textStyles.svg is failing
+
+        Reviewed by Dimitri Glazkov.
+
+        The text node needs willRecalcStyle mechanism too.
+
+        * dom/Text.cpp:
+        (WebCore::Text::recalcTextStyle):
+        * dom/Text.h:
+        (WebCore::Text::willRecalcTextStyle):
+        * svg/SVGTRefElement.cpp:
+        (WebCore::SVGTRefElement::SVGTRefElement):
+        (WebCore::SVGShadowText::SVGShadowText):
+        (WebCore::SVGShadowText::willRecalcTextStyle):
+
 2011-09-05  Pavel Podivilov  <[email protected]>
 
         Web Inspector: re-implement RawSourceCode.

Modified: trunk/Source/WebCore/dom/Text.cpp (94560 => 94561)


--- trunk/Source/WebCore/dom/Text.cpp	2011-09-06 09:34:02 UTC (rev 94560)
+++ trunk/Source/WebCore/dom/Text.cpp	2011-09-06 11:15:29 UTC (rev 94561)
@@ -256,6 +256,9 @@
 
 void Text::recalcTextStyle(StyleChange change)
 {
+    if (hasCustomWillOrDidRecalcStyle())
+        willRecalcTextStyle(change);
+
     if (change != NoChange && parentNode() && parentNode()->renderer()) {
         if (renderer())
             renderer()->setStyle(parentNode()->renderer()->style());

Modified: trunk/Source/WebCore/dom/Text.h (94560 => 94561)


--- trunk/Source/WebCore/dom/Text.h	2011-09-06 09:34:02 UTC (rev 94560)
+++ trunk/Source/WebCore/dom/Text.h	2011-09-06 11:15:29 UTC (rev 94561)
@@ -53,6 +53,8 @@
     {
     }
 
+    virtual void willRecalcTextStyle(StyleChange) { ASSERT_NOT_REACHED(); }
+
 private:
     virtual String nodeName() const;
     virtual NodeType nodeType() const;

Modified: trunk/Source/WebCore/svg/SVGTRefElement.cpp (94560 => 94561)


--- trunk/Source/WebCore/svg/SVGTRefElement.cpp	2011-09-06 09:34:02 UTC (rev 94560)
+++ trunk/Source/WebCore/svg/SVGTRefElement.cpp	2011-09-06 11:15:29 UTC (rev 94561)
@@ -52,8 +52,6 @@
 {
     ASSERT(hasTagName(SVGNames::trefTag));
     registerAnimatedPropertiesForSVGTRefElement();
-    
-    setHasCustomWillOrDidRecalcStyle();
 }
 
 PassRefPtr<SVGTRefElement> SVGTRefElement::create(const QualifiedName& tagName, Document* document)
@@ -119,9 +117,10 @@
     SVGShadowText(Document* document, const String& data)
         : Text(document, data)
     {
+         setHasCustomWillOrDidRecalcStyle();
     }
     virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
-    virtual bool willRecalcStyle(StyleChange);
+    virtual void willRecalcTextStyle(StyleChange);
 };
 
 RenderObject* SVGShadowText::createRenderer(RenderArena* arena, RenderStyle*)
@@ -129,13 +128,12 @@
     return new (arena) RenderSVGInlineText(this, dataImpl());
 }
 
-bool SVGShadowText::willRecalcStyle(StyleChange change)
+void SVGShadowText::willRecalcTextStyle(StyleChange change)
 {
     if (change != NoChange && parentNode()->shadowHost()) {
         if (renderer())
             renderer()->setStyle(parentNode()->shadowHost()->renderer()->style());
     }
-    return true;
 }
 
 void SVGTRefElement::updateReferencedText()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to