Title: [91982] trunk/Source/WebCore
Revision
91982
Author
[email protected]
Date
2011-07-29 03:26:13 -0700 (Fri, 29 Jul 2011)

Log Message

Make the ExceptionCode argument of Element::setShadowPseudoId() ASSERT_NO_EXCEPTION by default
https://bugs.webkit.org/show_bug.cgi?id=65363

Reviewed by Hajime Morita.

No new tests. Cleanup-only.

* dom/Element.h: Make the ExceptionCode argument ASSERT_NO_EXCEPTION by default.
* html/ColorInputType.cpp:
(WebCore::ColorInputType::createShadowSubtree): Remove the ExceptionCode argument and ASSERT(!ec).
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::updatePlaceholderText): ditto.
* html/RangeInputType.cpp:
(WebCore::RangeInputType::createShadowSubtree): ditto.
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::createShadowSubtree): ditto.
(WebCore::TextFieldInputType::updatePlaceholderText): ditto.
* html/ValidationMessage.cpp:
(WebCore::ValidationMessage::buildBubbleTree): ditto.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (91981 => 91982)


--- trunk/Source/WebCore/ChangeLog	2011-07-29 09:59:09 UTC (rev 91981)
+++ trunk/Source/WebCore/ChangeLog	2011-07-29 10:26:13 UTC (rev 91982)
@@ -1,3 +1,25 @@
+2011-07-29  Kent Tamura  <[email protected]>
+
+        Make the ExceptionCode argument of Element::setShadowPseudoId() ASSERT_NO_EXCEPTION by default
+        https://bugs.webkit.org/show_bug.cgi?id=65363
+
+        Reviewed by Hajime Morita.
+
+        No new tests. Cleanup-only.
+
+        * dom/Element.h: Make the ExceptionCode argument ASSERT_NO_EXCEPTION by default.
+        * html/ColorInputType.cpp:
+        (WebCore::ColorInputType::createShadowSubtree): Remove the ExceptionCode argument and ASSERT(!ec).
+        * html/HTMLTextAreaElement.cpp:
+        (WebCore::HTMLTextAreaElement::updatePlaceholderText): ditto.
+        * html/RangeInputType.cpp:
+        (WebCore::RangeInputType::createShadowSubtree): ditto.
+        * html/TextFieldInputType.cpp:
+        (WebCore::TextFieldInputType::createShadowSubtree): ditto.
+        (WebCore::TextFieldInputType::updatePlaceholderText): ditto.
+        * html/ValidationMessage.cpp:
+        (WebCore::ValidationMessage::buildBubbleTree): ditto.
+
 2011-07-28  Luke Macpherson   <[email protected]>
 
         Remove remaining uses of CSSPrimitiveValue::computeLengthIntForLength()

Modified: trunk/Source/WebCore/dom/Element.h (91981 => 91982)


--- trunk/Source/WebCore/dom/Element.h	2011-07-29 09:59:09 UTC (rev 91981)
+++ trunk/Source/WebCore/dom/Element.h	2011-07-29 10:26:13 UTC (rev 91982)
@@ -26,6 +26,7 @@
 #define Element_h
 
 #include "Document.h"
+#include "ExceptionCodePlaceholder.h"
 #include "FragmentScriptingPermission.h"
 #include "NamedNodeMap.h"
 #include "ScrollTypes.h"
@@ -236,7 +237,7 @@
     void removeShadowRoot();
 
     virtual const AtomicString& shadowPseudoId() const;
-    void setShadowPseudoId(const AtomicString&, ExceptionCode&);
+    void setShadowPseudoId(const AtomicString&, ExceptionCode& = ASSERT_NO_EXCEPTION);
 
     RenderStyle* computedStyle(PseudoId = NOPSEUDO);
 

Modified: trunk/Source/WebCore/html/ColorInputType.cpp (91981 => 91982)


--- trunk/Source/WebCore/html/ColorInputType.cpp	2011-07-29 09:59:09 UTC (rev 91981)
+++ trunk/Source/WebCore/html/ColorInputType.cpp	2011-07-29 10:26:13 UTC (rev 91982)
@@ -96,12 +96,10 @@
 {
     Document* document = element()->document();
     RefPtr<HTMLDivElement> wrapperElement = HTMLDivElement::create(document);
-    ExceptionCode ec = 0;
-    wrapperElement->setShadowPseudoId("-webkit-color-swatch-wrapper", ec);
-    ASSERT(!ec);
+    wrapperElement->setShadowPseudoId("-webkit-color-swatch-wrapper");
     RefPtr<HTMLDivElement> colorSwatch = HTMLDivElement::create(document);
-    colorSwatch->setShadowPseudoId("-webkit-color-swatch", ec);
-    ASSERT(!ec);
+    colorSwatch->setShadowPseudoId("-webkit-color-swatch");
+    ExceptionCode ec = 0;
     wrapperElement->appendChild(colorSwatch.release(), ec);
     ASSERT(!ec);
     element()->ensureShadowRoot()->appendChild(wrapperElement.release(), ec);

Modified: trunk/Source/WebCore/html/HTMLTextAreaElement.cpp (91981 => 91982)


--- trunk/Source/WebCore/html/HTMLTextAreaElement.cpp	2011-07-29 09:59:09 UTC (rev 91981)
+++ trunk/Source/WebCore/html/HTMLTextAreaElement.cpp	2011-07-29 10:26:13 UTC (rev 91982)
@@ -476,8 +476,7 @@
     }
     if (!m_placeholder) {
         m_placeholder = HTMLDivElement::create(document());
-        m_placeholder->setShadowPseudoId("-webkit-input-placeholder", ec);
-        ASSERT(!ec);
+        m_placeholder->setShadowPseudoId("-webkit-input-placeholder");
         shadowRoot()->insertBefore(m_placeholder, shadowRoot()->firstChild()->nextSibling(), ec);
         ASSERT(!ec);
     }

Modified: trunk/Source/WebCore/html/RangeInputType.cpp (91981 => 91982)


--- trunk/Source/WebCore/html/RangeInputType.cpp	2011-07-29 09:59:09 UTC (rev 91981)
+++ trunk/Source/WebCore/html/RangeInputType.cpp	2011-07-29 10:26:13 UTC (rev 91982)
@@ -232,11 +232,10 @@
 
 void RangeInputType::createShadowSubtree()
 {
-    ExceptionCode ec = 0;
     Document* document = element()->document();
     RefPtr<HTMLDivElement> track = HTMLDivElement::create(document);
-    track->setShadowPseudoId("-webkit-slider-runnable-track", ec);
-    ASSERT(!ec);
+    track->setShadowPseudoId("-webkit-slider-runnable-track");
+    ExceptionCode ec = 0;
     track->appendChild(SliderThumbElement::create(document), ec);
     RefPtr<HTMLElement> container = SliderContainerElement::create(document);
     container->appendChild(track.release(), ec);

Modified: trunk/Source/WebCore/html/TextFieldInputType.cpp (91981 => 91982)


--- trunk/Source/WebCore/html/TextFieldInputType.cpp	2011-07-29 09:59:09 UTC (rev 91981)
+++ trunk/Source/WebCore/html/TextFieldInputType.cpp	2011-07-29 10:26:13 UTC (rev 91982)
@@ -171,7 +171,7 @@
 
     ShadowRoot* shadowRoot = element()->ensureShadowRoot();
     m_container = HTMLDivElement::create(document);
-    m_container->setShadowPseudoId("-webkit-textfield-decoration-container", ec);
+    m_container->setShadowPseudoId("-webkit-textfield-decoration-container");
     shadowRoot->appendChild(m_container, ec);
 
     m_innerBlock = TextControlInnerElement::create(document);
@@ -350,8 +350,7 @@
     }
     if (!m_placeholder) {
         m_placeholder = HTMLDivElement::create(element()->document());
-        m_placeholder->setShadowPseudoId("-webkit-input-placeholder", ec);
-        ASSERT(!ec);
+        m_placeholder->setShadowPseudoId("-webkit-input-placeholder");
         element()->shadowRoot()->insertBefore(m_placeholder, m_container ? m_container->nextSibling() : innerTextElement()->nextSibling(), ec);
         ASSERT(!ec);
     }

Modified: trunk/Source/WebCore/html/ValidationMessage.cpp (91981 => 91982)


--- trunk/Source/WebCore/html/ValidationMessage.cpp	2011-07-29 09:59:09 UTC (rev 91981)
+++ trunk/Source/WebCore/html/ValidationMessage.cpp	2011-07-29 10:26:13 UTC (rev 91982)
@@ -132,29 +132,25 @@
     HTMLElement* host = toHTMLElement(m_element);
     Document* doc = host->document();
     m_bubble = HTMLDivElement::create(doc);
-    ExceptionCode ec = 0;
-    m_bubble->setShadowPseudoId("-webkit-validation-bubble", ec);
-    ASSERT(!ec);
+    m_bubble->setShadowPseudoId("-webkit-validation-bubble");
     // Need to force position:absolute because RenderMenuList doesn't assume it
     // contains non-absolute or non-fixed renderers as children.
     m_bubble->getInlineStyleDecl()->setProperty(CSSPropertyPosition, CSSValueAbsolute);
+    ExceptionCode ec = 0;
     host->ensureShadowRoot()->appendChild(m_bubble.get(), ec);
     ASSERT(!ec);
     adjustBubblePosition(host->getRect(), m_bubble.get());
 
     RefPtr<HTMLDivElement> clipper = HTMLDivElement::create(doc);
-    clipper->setShadowPseudoId("-webkit-validation-bubble-arrow-clipper", ec);
-    ASSERT(!ec);
+    clipper->setShadowPseudoId("-webkit-validation-bubble-arrow-clipper");
     RefPtr<HTMLDivElement> bubbleArrow = HTMLDivElement::create(doc);
-    bubbleArrow->setShadowPseudoId("-webkit-validation-bubble-arrow", ec);
-    ASSERT(!ec);
+    bubbleArrow->setShadowPseudoId("-webkit-validation-bubble-arrow");
     clipper->appendChild(bubbleArrow.release(), ec);
     ASSERT(!ec);
     m_bubble->appendChild(clipper.release(), ec);
     ASSERT(!ec);
     m_bubbleMessage = HTMLDivElement::create(doc);
-    m_bubbleMessage->setShadowPseudoId("-webkit-validation-bubble-message", ec);
-    ASSERT(!ec);
+    m_bubbleMessage->setShadowPseudoId("-webkit-validation-bubble-message");
     m_bubble->appendChild(m_bubbleMessage, ec);
     ASSERT(!ec);
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to