Title: [107060] trunk/Source/WebCore
Revision
107060
Author
[email protected]
Date
2012-02-08 02:55:20 -0800 (Wed, 08 Feb 2012)

Log Message

Unreviewed, rolling out r107050.
http://trac.webkit.org/changeset/107050
https://bugs.webkit.org/show_bug.cgi?id=78094

May crash editing tests (Requested by morrita on #webkit).

Patch by Sheriff Bot <[email protected]> on 2012-02-08

* html/HTMLDetailsElement.cpp:
(WebCore::HTMLDetailsElement::createShadowSubtree):
* html/HTMLKeygenElement.cpp:
(WebCore::HTMLKeygenElement::HTMLKeygenElement):
* html/HTMLMeterElement.cpp:
(WebCore::HTMLMeterElement::createShadowSubtree):
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::createShadowSubtree):
* html/HTMLSummaryElement.cpp:
(WebCore::HTMLSummaryElement::createShadowSubtree):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::createShadowSubtree):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (107059 => 107060)


--- trunk/Source/WebCore/ChangeLog	2012-02-08 10:42:55 UTC (rev 107059)
+++ trunk/Source/WebCore/ChangeLog	2012-02-08 10:55:20 UTC (rev 107060)
@@ -1,3 +1,24 @@
+2012-02-08  Sheriff Bot  <[email protected]>
+
+        Unreviewed, rolling out r107050.
+        http://trac.webkit.org/changeset/107050
+        https://bugs.webkit.org/show_bug.cgi?id=78094
+
+        May crash editing tests (Requested by morrita on #webkit).
+
+        * html/HTMLDetailsElement.cpp:
+        (WebCore::HTMLDetailsElement::createShadowSubtree):
+        * html/HTMLKeygenElement.cpp:
+        (WebCore::HTMLKeygenElement::HTMLKeygenElement):
+        * html/HTMLMeterElement.cpp:
+        (WebCore::HTMLMeterElement::createShadowSubtree):
+        * html/HTMLProgressElement.cpp:
+        (WebCore::HTMLProgressElement::createShadowSubtree):
+        * html/HTMLSummaryElement.cpp:
+        (WebCore::HTMLSummaryElement::createShadowSubtree):
+        * html/HTMLTextAreaElement.cpp:
+        (WebCore::HTMLTextAreaElement::createShadowSubtree):
+
 2012-02-08  Nikolas Zimmermann  <[email protected]>
 
         [Qt] REGRESSION(r106918): It made svg/zoom/page/zoom-foreignObject.svg crash with Qt5-WK1

Modified: trunk/Source/WebCore/html/HTMLDetailsElement.cpp (107059 => 107060)


--- trunk/Source/WebCore/html/HTMLDetailsElement.cpp	2012-02-08 10:42:55 UTC (rev 107059)
+++ trunk/Source/WebCore/html/HTMLDetailsElement.cpp	2012-02-08 10:55:20 UTC (rev 107060)
@@ -109,10 +109,8 @@
 void HTMLDetailsElement::createShadowSubtree()
 {
     ASSERT(!shadowRoot());
-
-    RefPtr<ShadowRoot> root = ShadowRoot::create(this, ASSERT_NO_EXCEPTION);
-    root->appendChild(DetailsSummaryElement::create(document()), ASSERT_NO_EXCEPTION, true);
-    root->appendChild(DetailsContentElement::create(document()), ASSERT_NO_EXCEPTION, true);
+    ensureShadowRoot()->appendChild(DetailsSummaryElement::create(document()), ASSERT_NO_EXCEPTION, true);
+    ensureShadowRoot()->appendChild(DetailsContentElement::create(document()), ASSERT_NO_EXCEPTION, true);
 }
 
 Element* HTMLDetailsElement::findMainSummary() const

Modified: trunk/Source/WebCore/html/HTMLKeygenElement.cpp (107059 => 107060)


--- trunk/Source/WebCore/html/HTMLKeygenElement.cpp	2012-02-08 10:42:55 UTC (rev 107059)
+++ trunk/Source/WebCore/html/HTMLKeygenElement.cpp	2012-02-08 10:55:20 UTC (rev 107060)
@@ -85,9 +85,7 @@
         option->appendChild(Text::create(document, keys[i]), ec);
     }
 
-    ASSERT(!shadowRoot());
-    RefPtr<ShadowRoot> root = ShadowRoot::create(this, ASSERT_NO_EXCEPTION);
-    root->appendChild(select, ec);
+    ensureShadowRoot()->appendChild(select, ec);
 }
 
 PassRefPtr<HTMLKeygenElement> HTMLKeygenElement::create(const QualifiedName& tagName, Document* document, HTMLFormElement* form)

Modified: trunk/Source/WebCore/html/HTMLMeterElement.cpp (107059 => 107060)


--- trunk/Source/WebCore/html/HTMLMeterElement.cpp	2012-02-08 10:42:55 UTC (rev 107059)
+++ trunk/Source/WebCore/html/HTMLMeterElement.cpp	2012-02-08 10:55:20 UTC (rev 107060)
@@ -234,15 +234,11 @@
 
 void HTMLMeterElement::createShadowSubtree()
 {
-    ASSERT(!shadowRoot());
-
     RefPtr<MeterBarElement> bar = MeterBarElement::create(document());
     m_value = MeterValueElement::create(document());
     ExceptionCode ec = 0;
     bar->appendChild(m_value, ec);
-
-    RefPtr<ShadowRoot> root = ShadowRoot::create(this, ASSERT_NO_EXCEPTION);
-    root->appendChild(bar, ec);
+    ensureShadowRoot()->appendChild(bar, ec);
 }
 
 } // namespace

Modified: trunk/Source/WebCore/html/HTMLProgressElement.cpp (107059 => 107060)


--- trunk/Source/WebCore/html/HTMLProgressElement.cpp	2012-02-08 10:42:55 UTC (rev 107059)
+++ trunk/Source/WebCore/html/HTMLProgressElement.cpp	2012-02-08 10:55:20 UTC (rev 107060)
@@ -153,14 +153,11 @@
 
 void HTMLProgressElement::createShadowSubtree()
 {
-    ASSERT(!shadowRoot());
-
     RefPtr<ProgressBarElement> bar = ProgressBarElement::create(document());
     m_value = ProgressValueElement::create(document());
-    bar->appendChild(m_value, ASSERT_NO_EXCEPTION);
-
-    RefPtr<ShadowRoot> root = ShadowRoot::create(this, ASSERT_NO_EXCEPTION);
-    root->appendChild(bar, ASSERT_NO_EXCEPTION);
+    ExceptionCode ec = 0;
+    bar->appendChild(m_value, ec);
+    ensureShadowRoot()->appendChild(bar, ec);
 }
 
 } // namespace

Modified: trunk/Source/WebCore/html/HTMLSummaryElement.cpp (107059 => 107060)


--- trunk/Source/WebCore/html/HTMLSummaryElement.cpp	2012-02-08 10:42:55 UTC (rev 107059)
+++ trunk/Source/WebCore/html/HTMLSummaryElement.cpp	2012-02-08 10:55:20 UTC (rev 107060)
@@ -73,10 +73,9 @@
 
 void HTMLSummaryElement::createShadowSubtree()
 {
-    ASSERT(!shadowRoot());
-    RefPtr<ShadowRoot> root = ShadowRoot::create(this, ASSERT_NO_EXCEPTION);
-    root->appendChild(DetailsMarkerControl::create(document()), ASSERT_NO_EXCEPTION, true);
-    root->appendChild(SummaryContentElement::create(document()), ASSERT_NO_EXCEPTION, true);
+    ExceptionCode ec = 0;
+    ensureShadowRoot()->appendChild(DetailsMarkerControl::create(document()), ec, true);
+    ensureShadowRoot()->appendChild(SummaryContentElement::create(document()), ec, true);
 }
 
 HTMLDetailsElement* HTMLSummaryElement::detailsElement() const

Modified: trunk/Source/WebCore/html/HTMLTextAreaElement.cpp (107059 => 107060)


--- trunk/Source/WebCore/html/HTMLTextAreaElement.cpp	2012-02-08 10:42:55 UTC (rev 107059)
+++ trunk/Source/WebCore/html/HTMLTextAreaElement.cpp	2012-02-08 10:55:20 UTC (rev 107060)
@@ -84,9 +84,8 @@
 
 void HTMLTextAreaElement::createShadowSubtree()
 {
-    ASSERT(!shadowRoot());
-    RefPtr<ShadowRoot> root = ShadowRoot::create(this, ASSERT_NO_EXCEPTION);
-    root->appendChild(TextControlInnerTextElement::create(document()), ASSERT_NO_EXCEPTION);
+    ExceptionCode ec = 0;
+    ensureShadowRoot()->appendChild(TextControlInnerTextElement::create(document()), ec);
 }
 
 const AtomicString& HTMLTextAreaElement::formControlType() const
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to