Changeset 91982 in webkit


Ignore:
Timestamp:
Jul 29, 2011 3:26:13 AM (13 years ago)
Author:
tkent@chromium.org
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.

Location:
trunk/Source/WebCore
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r91976 r91982  
     12011-07-29  Kent Tamura  <tkent@chromium.org>
     2
     3        Make the ExceptionCode argument of Element::setShadowPseudoId() ASSERT_NO_EXCEPTION by default
     4        https://bugs.webkit.org/show_bug.cgi?id=65363
     5
     6        Reviewed by Hajime Morita.
     7
     8        No new tests. Cleanup-only.
     9
     10        * dom/Element.h: Make the ExceptionCode argument ASSERT_NO_EXCEPTION by default.
     11        * html/ColorInputType.cpp:
     12        (WebCore::ColorInputType::createShadowSubtree): Remove the ExceptionCode argument and ASSERT(!ec).
     13        * html/HTMLTextAreaElement.cpp:
     14        (WebCore::HTMLTextAreaElement::updatePlaceholderText): ditto.
     15        * html/RangeInputType.cpp:
     16        (WebCore::RangeInputType::createShadowSubtree): ditto.
     17        * html/TextFieldInputType.cpp:
     18        (WebCore::TextFieldInputType::createShadowSubtree): ditto.
     19        (WebCore::TextFieldInputType::updatePlaceholderText): ditto.
     20        * html/ValidationMessage.cpp:
     21        (WebCore::ValidationMessage::buildBubbleTree): ditto.
     22
    1232011-07-28  Luke Macpherson   <macpherson@chromium.org>
    224
  • trunk/Source/WebCore/dom/Element.h

    r91404 r91982  
    2727
    2828#include "Document.h"
     29#include "ExceptionCodePlaceholder.h"
    2930#include "FragmentScriptingPermission.h"
    3031#include "NamedNodeMap.h"
     
    237238
    238239    virtual const AtomicString& shadowPseudoId() const;
    239     void setShadowPseudoId(const AtomicString&, ExceptionCode&);
     240    void setShadowPseudoId(const AtomicString&, ExceptionCode& = ASSERT_NO_EXCEPTION);
    240241
    241242    RenderStyle* computedStyle(PseudoId = NOPSEUDO);
  • trunk/Source/WebCore/html/ColorInputType.cpp

    r90071 r91982  
    9797    Document* document = element()->document();
    9898    RefPtr<HTMLDivElement> wrapperElement = HTMLDivElement::create(document);
     99    wrapperElement->setShadowPseudoId("-webkit-color-swatch-wrapper");
     100    RefPtr<HTMLDivElement> colorSwatch = HTMLDivElement::create(document);
     101    colorSwatch->setShadowPseudoId("-webkit-color-swatch");
    99102    ExceptionCode ec = 0;
    100     wrapperElement->setShadowPseudoId("-webkit-color-swatch-wrapper", ec);
    101     ASSERT(!ec);
    102     RefPtr<HTMLDivElement> colorSwatch = HTMLDivElement::create(document);
    103     colorSwatch->setShadowPseudoId("-webkit-color-swatch", ec);
    104     ASSERT(!ec);
    105103    wrapperElement->appendChild(colorSwatch.release(), ec);
    106104    ASSERT(!ec);
  • trunk/Source/WebCore/html/HTMLTextAreaElement.cpp

    r91404 r91982  
    477477    if (!m_placeholder) {
    478478        m_placeholder = HTMLDivElement::create(document());
    479         m_placeholder->setShadowPseudoId("-webkit-input-placeholder", ec);
    480         ASSERT(!ec);
     479        m_placeholder->setShadowPseudoId("-webkit-input-placeholder");
    481480        shadowRoot()->insertBefore(m_placeholder, shadowRoot()->firstChild()->nextSibling(), ec);
    482481        ASSERT(!ec);
  • trunk/Source/WebCore/html/RangeInputType.cpp

    r91827 r91982  
    233233void RangeInputType::createShadowSubtree()
    234234{
    235     ExceptionCode ec = 0;
    236235    Document* document = element()->document();
    237236    RefPtr<HTMLDivElement> track = HTMLDivElement::create(document);
    238     track->setShadowPseudoId("-webkit-slider-runnable-track", ec);
    239     ASSERT(!ec);
     237    track->setShadowPseudoId("-webkit-slider-runnable-track");
     238    ExceptionCode ec = 0;
    240239    track->appendChild(SliderThumbElement::create(document), ec);
    241240    RefPtr<HTMLElement> container = SliderContainerElement::create(document);
  • trunk/Source/WebCore/html/TextFieldInputType.cpp

    r91353 r91982  
    172172    ShadowRoot* shadowRoot = element()->ensureShadowRoot();
    173173    m_container = HTMLDivElement::create(document);
    174     m_container->setShadowPseudoId("-webkit-textfield-decoration-container", ec);
     174    m_container->setShadowPseudoId("-webkit-textfield-decoration-container");
    175175    shadowRoot->appendChild(m_container, ec);
    176176
     
    351351    if (!m_placeholder) {
    352352        m_placeholder = HTMLDivElement::create(element()->document());
    353         m_placeholder->setShadowPseudoId("-webkit-input-placeholder", ec);
    354         ASSERT(!ec);
     353        m_placeholder->setShadowPseudoId("-webkit-input-placeholder");
    355354        element()->shadowRoot()->insertBefore(m_placeholder, m_container ? m_container->nextSibling() : innerTextElement()->nextSibling(), ec);
    356355        ASSERT(!ec);
  • trunk/Source/WebCore/html/ValidationMessage.cpp

    r91654 r91982  
    133133    Document* doc = host->document();
    134134    m_bubble = HTMLDivElement::create(doc);
    135     ExceptionCode ec = 0;
    136     m_bubble->setShadowPseudoId("-webkit-validation-bubble", ec);
    137     ASSERT(!ec);
     135    m_bubble->setShadowPseudoId("-webkit-validation-bubble");
    138136    // Need to force position:absolute because RenderMenuList doesn't assume it
    139137    // contains non-absolute or non-fixed renderers as children.
    140138    m_bubble->getInlineStyleDecl()->setProperty(CSSPropertyPosition, CSSValueAbsolute);
     139    ExceptionCode ec = 0;
    141140    host->ensureShadowRoot()->appendChild(m_bubble.get(), ec);
    142141    ASSERT(!ec);
     
    144143
    145144    RefPtr<HTMLDivElement> clipper = HTMLDivElement::create(doc);
    146     clipper->setShadowPseudoId("-webkit-validation-bubble-arrow-clipper", ec);
    147     ASSERT(!ec);
     145    clipper->setShadowPseudoId("-webkit-validation-bubble-arrow-clipper");
    148146    RefPtr<HTMLDivElement> bubbleArrow = HTMLDivElement::create(doc);
    149     bubbleArrow->setShadowPseudoId("-webkit-validation-bubble-arrow", ec);
    150     ASSERT(!ec);
     147    bubbleArrow->setShadowPseudoId("-webkit-validation-bubble-arrow");
    151148    clipper->appendChild(bubbleArrow.release(), ec);
    152149    ASSERT(!ec);
     
    154151    ASSERT(!ec);
    155152    m_bubbleMessage = HTMLDivElement::create(doc);
    156     m_bubbleMessage->setShadowPseudoId("-webkit-validation-bubble-message", ec);
    157     ASSERT(!ec);
     153    m_bubbleMessage->setShadowPseudoId("-webkit-validation-bubble-message");
    158154    m_bubble->appendChild(m_bubbleMessage, ec);
    159155    ASSERT(!ec);
Note: See TracChangeset for help on using the changeset viewer.