Title: [113555] trunk
Revision
113555
Author
[email protected]
Date
2012-04-08 21:59:28 -0700 (Sun, 08 Apr 2012)

Log Message

<content> in <meter> is not rendered correctly.
https://bugs.webkit.org/show_bug.cgi?id=81311

This code changes a code location where MeterValueElement's value
attribute is initialized. In the old code, HTMLMeterElement's attach
did. It is better to initialize the attribute just after creating
meter's shadow subtree.

Patch by Takashi Sakamoto <[email protected]> on 2012-04-08
Reviewed by Hajime Morita.

No new tests, because an existing test,
content-element-in-meter-element.html covers.
However test_expectations.txt is changed. Now the test passes.

* html/HTMLMeterElement.cpp:
* html/HTMLMeterElement.h:
(HTMLMeterElement):
(HTMLMeterElement::attach):
Removed attach method, because attach method is just calling
LabelableElement::attach after removing didElementStateChange.
(HTMLMeterElement::createShadowSubTree):
Added setWidthPercentage to initialize MeterValueElement's value
attribute.
* LayoutTests/platform/chromium/test_expectations.txt:
Removed BUGWK81311 fast/dom/shadow/content-element-in-meter.html,
because now contentElementInMeterElement passes.

Modified Paths

Diff

Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (113554 => 113555)


--- trunk/LayoutTests/platform/chromium/test_expectations.txt	2012-04-09 04:04:22 UTC (rev 113554)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt	2012-04-09 04:59:28 UTC (rev 113555)
@@ -2826,7 +2826,6 @@
 BUGCR85293 LINUX : svg/text/foreignObject-text-clipping-bug.xml = PASS IMAGE
 
 BUGWK81310 : fast/dom/shadow/content-element-in-media-element.html = TEXT
-BUGWK81311 WIN LINUX : fast/dom/shadow/content-element-in-meter-element.html = TEXT
 
 // CSS Grid Layout is not enabled yet.
 BUGWK60731 SKIP : fast/css-grid-layout = PASS

Modified: trunk/Source/WebCore/ChangeLog (113554 => 113555)


--- trunk/Source/WebCore/ChangeLog	2012-04-09 04:04:22 UTC (rev 113554)
+++ trunk/Source/WebCore/ChangeLog	2012-04-09 04:59:28 UTC (rev 113555)
@@ -1,3 +1,32 @@
+2012-04-08  Takashi Sakamoto  <[email protected]>
+
+        <content> in <meter> is not rendered correctly.
+        https://bugs.webkit.org/show_bug.cgi?id=81311
+
+        This code changes a code location where MeterValueElement's value
+        attribute is initialized. In the old code, HTMLMeterElement's attach
+        did. It is better to initialize the attribute just after creating
+        meter's shadow subtree.
+
+        Reviewed by Hajime Morita.
+
+        No new tests, because an existing test,
+        content-element-in-meter-element.html covers.
+        However test_expectations.txt is changed. Now the test passes.
+
+        * html/HTMLMeterElement.cpp:
+        * html/HTMLMeterElement.h:
+        (HTMLMeterElement):
+        (HTMLMeterElement::attach):
+        Removed attach method, because attach method is just calling
+        LabelableElement::attach after removing didElementStateChange.
+        (HTMLMeterElement::createShadowSubTree):
+        Added setWidthPercentage to initialize MeterValueElement's value
+        attribute.
+        * LayoutTests/platform/chromium/test_expectations.txt:
+        Removed BUGWK81311 fast/dom/shadow/content-element-in-meter.html,
+        because now contentElementInMeterElement passes.
+
 2012-04-08  Patrick Gansterer  <[email protected]>
 
         Build fix for !ENABLE(CSS_FILTERS) && ASSERT_DISABLED after r109953.

Modified: trunk/Source/WebCore/html/HTMLMeterElement.cpp (113554 => 113555)


--- trunk/Source/WebCore/html/HTMLMeterElement.cpp	2012-04-09 04:04:22 UTC (rev 113554)
+++ trunk/Source/WebCore/html/HTMLMeterElement.cpp	2012-04-09 04:59:28 UTC (rev 113555)
@@ -79,12 +79,6 @@
         LabelableElement::parseAttribute(attribute);
 }
 
-void HTMLMeterElement::attach()
-{
-    LabelableElement::attach();
-    didElementStateChange();
-}
-
 double HTMLMeterElement::min() const
 {
     double min = 0;
@@ -238,6 +232,7 @@
 
     RefPtr<MeterBarElement> bar = MeterBarElement::create(document());
     m_value = MeterValueElement::create(document());
+    m_value->setWidthPercentage(0);
     ExceptionCode ec = 0;
     bar->appendChild(m_value, ec);
 

Modified: trunk/Source/WebCore/html/HTMLMeterElement.h (113554 => 113555)


--- trunk/Source/WebCore/html/HTMLMeterElement.h	2012-04-09 04:04:22 UTC (rev 113554)
+++ trunk/Source/WebCore/html/HTMLMeterElement.h	2012-04-09 04:59:28 UTC (rev 113555)
@@ -73,7 +73,6 @@
     virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
     virtual bool childShouldCreateRenderer(const NodeRenderingContext&) const OVERRIDE;
     virtual void parseAttribute(Attribute*) OVERRIDE;
-    virtual void attach();
 
     void didElementStateChange();
     void createShadowSubtree();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to