Changeset 90071 in webkit


Ignore:
Timestamp:
Jun 29, 2011 5:03:36 PM (13 years ago)
Author:
Dimitri Glazkov
Message:

2011-06-29 Dimitri Glazkov <Dimitri Glazkov>

Reviewed by Kent Tamura.

Remove ElementWithPseudoId, since now an Element can store it all by itself.
https://bugs.webkit.org/show_bug.cgi?id=63657

Refactoring, covered by existing tests.

  • CMakeLists.txt: Removed ElementWithPseudoId from build.
  • GNUmakefile.list.am: Ditto.
  • WebCore.gypi: Ditto.
  • WebCore.order: Ditto.
  • WebCore.pro: Ditto.
  • WebCore.vcproj/WebCore.vcproj: Ditto.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • html/ColorInputType.cpp: (WebCore::ColorInputType::createShadowSubtree): Changed to use plain-old HTMLDivElement.
  • html/RangeInputType.cpp: (WebCore::RangeInputType::createShadowSubtree): Ditto.
  • html/ValidationMessage.cpp: (WebCore::ValidationMessage::buildBubbleTree): Ditto.
  • html/shadow/ElementWithPseudoId.cpp: Removed.
  • html/shadow/ElementWithPseudoId.h: Removed.
Location:
trunk/Source/WebCore
Files:
2 deleted
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/CMakeLists.txt

    r89993 r90071  
    848848    html/parser/XSSAuditor.cpp
    849849
    850     html/shadow/ElementWithPseudoId.cpp
    851850    html/shadow/DetailsMarkerControl.cpp
    852851    html/shadow/MediaControls.cpp
  • trunk/Source/WebCore/ChangeLog

    r90069 r90071  
     12011-06-29  Dimitri Glazkov  <dglazkov@chromium.org>
     2
     3        Reviewed by Kent Tamura.
     4
     5        Remove ElementWithPseudoId, since now an Element can store it all by itself.
     6        https://bugs.webkit.org/show_bug.cgi?id=63657
     7
     8        Refactoring, covered by existing tests.
     9
     10        * CMakeLists.txt: Removed ElementWithPseudoId from build.
     11        * GNUmakefile.list.am: Ditto.
     12        * WebCore.gypi: Ditto.
     13        * WebCore.order: Ditto.
     14        * WebCore.pro: Ditto.
     15        * WebCore.vcproj/WebCore.vcproj: Ditto.
     16        * WebCore.xcodeproj/project.pbxproj: Ditto.
     17        * html/ColorInputType.cpp:
     18        (WebCore::ColorInputType::createShadowSubtree): Changed to use plain-old HTMLDivElement.
     19        * html/RangeInputType.cpp:
     20        (WebCore::RangeInputType::createShadowSubtree): Ditto.
     21        * html/ValidationMessage.cpp:
     22        (WebCore::ValidationMessage::buildBubbleTree): Ditto.
     23        * html/shadow/ElementWithPseudoId.cpp: Removed.
     24        * html/shadow/ElementWithPseudoId.h: Removed.
     25
    1262011-06-29  Levi Weintraub  <leviw@chromium.org>
    227
  • trunk/Source/WebCore/GNUmakefile.list.am

    r89993 r90071  
    18621862        Source/WebCore/html/parser/XSSAuditor.cpp \
    18631863        Source/WebCore/html/parser/XSSAuditor.h \
    1864         Source/WebCore/html/shadow/ElementWithPseudoId.cpp \
    1865         Source/WebCore/html/shadow/ElementWithPseudoId.h \
    18661864        Source/WebCore/html/shadow/DetailsMarkerControl.cpp \
    18671865        Source/WebCore/html/shadow/DetailsMarkerControl.h \
  • trunk/Source/WebCore/WebCore.gypi

    r89993 r90071  
    32223222            'html/parser/XSSAuditor.cpp',
    32233223            'html/parser/XSSAuditor.h',
    3224             'html/shadow/ElementWithPseudoId.cpp',
    3225             'html/shadow/ElementWithPseudoId.h',
    32263224            'html/shadow/DetailsMarkerControl.cpp',
    32273225            'html/shadow/DetailsMarkerControl.h',
  • trunk/Source/WebCore/WebCore.order

    r89039 r90071  
    2553225532__ZN7WebCore17ValidationMessage15buildBubbleTreeEPNS_5TimerIS0_EE
    2553325533__ZN7WebCore26CSSMutableStyleDeclaration11setPropertyEidNS_17CSSPrimitiveValue9UnitTypesEbb
    25534 __ZNK7WebCore19ElementWithPseudoId14shadowPseudoIdEv
    2553525534__ZN7WebCore17ValidationMessage26setMessageDOMAndStartTimerEPNS_5TimerIS0_EE
    2553625535__ZN7WebCore5TimerINS_17ValidationMessageEED0Ev
  • trunk/Source/WebCore/WebCore.pro

    r89993 r90071  
    801801    html/parser/TextViewSourceParser.cpp \
    802802    html/parser/XSSAuditor.cpp \
    803     html/shadow/ElementWithPseudoId.cpp \
    804803    html/shadow/DetailsMarkerControl.cpp \
    805804    html/shadow/MediaControls.cpp \
  • trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj

    r89945 r90071  
    5758257582                                </File>
    5758357583                                <File
    57584                                         RelativePath="..\html\shadow\ElementWithPseudoId.cpp"
    57585                                         >
    57586                                 </File>
    57587                                 <File
    57588                                         RelativePath="..\html\shadow\ElementWithPseudoId.h"
    57589                                         >
    57590                                 </File>
    57591                                 <File
    5759257584                                        RelativePath="..\html\shadow\MediaControlElements.cpp"
    5759357585                                        >
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r89993 r90071  
    52755275                C105DA620F3AA68F001DD44F /* TextEncodingDetectorICU.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C105DA610F3AA68F001DD44F /* TextEncodingDetectorICU.cpp */; };
    52765276                C105DA640F3AA6B8001DD44F /* TextEncodingDetector.h in Headers */ = {isa = PBXBuildFile; fileRef = C105DA630F3AA6B8001DD44F /* TextEncodingDetector.h */; };
    5277                 C39509B6138D05D400912E52 /* ElementWithPseudoId.h in Headers */ = {isa = PBXBuildFile; fileRef = C39509B4138D05D400912E52 /* ElementWithPseudoId.h */; };
    5278                 C39509B7138D05D400912E52 /* ElementWithPseudoId.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C39509B5138D05D400912E52 /* ElementWithPseudoId.cpp */; };
    52795277                C50B561612119D23008B46E0 /* GroupSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C50B561412119D23008B46E0 /* GroupSettings.cpp */; };
    52805278                C50B561712119D23008B46E0 /* GroupSettings.h in Headers */ = {isa = PBXBuildFile; fileRef = C50B561512119D23008B46E0 /* GroupSettings.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    1190911907                C105DA610F3AA68F001DD44F /* TextEncodingDetectorICU.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextEncodingDetectorICU.cpp; sourceTree = "<group>"; };
    1191011908                C105DA630F3AA6B8001DD44F /* TextEncodingDetector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextEncodingDetector.h; sourceTree = "<group>"; };
    11911                 C39509B4138D05D400912E52 /* ElementWithPseudoId.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ElementWithPseudoId.h; sourceTree = "<group>"; };
    11912                 C39509B5138D05D400912E52 /* ElementWithPseudoId.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ElementWithPseudoId.cpp; sourceTree = "<group>"; };
    1191311909                C50B561412119D23008B46E0 /* GroupSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GroupSettings.cpp; sourceTree = "<group>"; };
    1191411910                C50B561512119D23008B46E0 /* GroupSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GroupSettings.h; sourceTree = "<group>"; };
     
    1363913635                                A7C9ABF61357A3BF00F5503F /* DetailsMarkerControl.cpp */,
    1364013636                                A7C9ABF71357A3BF00F5503F /* DetailsMarkerControl.h */,
    13641                                 C39509B5138D05D400912E52 /* ElementWithPseudoId.cpp */,
    13642                                 C39509B4138D05D400912E52 /* ElementWithPseudoId.h */,
    1364313637                                417253A81354BBBC00360F2A /* MediaControlElements.cpp */,
    1364413638                                417253A91354BBBC00360F2A /* MediaControlElements.h */,
     
    2109321087                                63F5D4F70E8C4B7100C0BD04 /* ElementRareData.h in Headers */,
    2109421088                                E415F1840D9A1A830033CE97 /* ElementTimeControl.h in Headers */,
    21095                                 C39509B6138D05D400912E52 /* ElementWithPseudoId.h in Headers */,
    2109621089                                A8CFF6BE0A156118000A4234 /* EllipsisBox.h in Headers */,
    2109721090                                F55B3DBC1251F12D003EF269 /* EmailInputType.h in Headers */,
     
    2402724020                                ED501DC60B249F2900AE18D9 /* EditorMac.mm in Sources */,
    2402824021                                A8C4A80809D563270003AC8D /* Element.cpp in Sources */,
    24029                                 C39509B7138D05D400912E52 /* ElementWithPseudoId.cpp in Sources */,
    2403024022                                A8CFF6CB0A1561CD000A4234 /* EllipsisBox.cpp in Sources */,
    2403124023                                F55B3DBB1251F12D003EF269 /* EmailInputType.cpp in Sources */,
  • trunk/Source/WebCore/html/ColorInputType.cpp

    r89521 r90071  
    3333
    3434#include "Color.h"
    35 #include "ElementWithPseudoId.h"
     35#include "HTMLDivElement.h"
    3636#include "HTMLInputElement.h"
    3737#include "ShadowRoot.h"
     
    9696{
    9797    Document* document = element()->document();
    98     RefPtr<HTMLElement> wrapperElement = ElementWithPseudoId::create(document, "-webkit-color-swatch-wrapper");
     98    RefPtr<HTMLDivElement> wrapperElement = HTMLDivElement::create(document);
    9999    ExceptionCode ec = 0;
    100     wrapperElement->appendChild(ElementWithPseudoId::create(document, "-webkit-color-swatch"), ec);
     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);
     105    wrapperElement->appendChild(colorSwatch.release(), ec);
     106    ASSERT(!ec);
    101107    element()->ensureShadowRoot()->appendChild(wrapperElement.release(), ec);
     108    ASSERT(!ec);
    102109   
    103110    updateColorSwatch();
  • trunk/Source/WebCore/html/RangeInputType.cpp

    r89006 r90071  
    3333#include "RangeInputType.h"
    3434
    35 #include "ElementWithPseudoId.h"
     35#include "HTMLDivElement.h"
    3636#include "HTMLInputElement.h"
    3737#include "HTMLNames.h"
     
    208208    ExceptionCode ec = 0;
    209209    Document* document = element()->document();
    210     RefPtr<HTMLElement> track = ElementWithPseudoId::create(document, "-webkit-slider-runnable-track");
     210    RefPtr<HTMLDivElement> track = HTMLDivElement::create(document);
     211    track->setShadowPseudoId("-webkit-slider-runnable-track", ec);
     212    ASSERT(!ec);
    211213    track->appendChild(SliderThumbElement::create(document), ec);
    212214    RefPtr<HTMLElement> container = SliderContainerElement::create(document);
  • trunk/Source/WebCore/html/ValidationMessage.cpp

    r87292 r90071  
    3535#include "CSSStyleSelector.h"
    3636#include "CSSValueKeywords.h"
    37 #include "ElementWithPseudoId.h"
    3837#include "FormAssociatedElement.h"
    3938#include "HTMLBRElement.h"
     39#include "HTMLDivElement.h"
    4040#include "HTMLNames.h"
    4141#include "Page.h"
     
    124124    HTMLElement* host = toHTMLElement(m_element);
    125125    Document* doc = host->document();
    126     m_bubble = ElementWithPseudoId::create(doc, "-webkit-validation-bubble");
     126    m_bubble = HTMLDivElement::create(doc);
     127    ExceptionCode ec = 0;
     128    m_bubble->setShadowPseudoId("-webkit-validation-bubble", ec);
     129    ASSERT(!ec);
    127130    // Need to force position:absolute because RenderMenuList doesn't assume it
    128131    // contains non-absolute or non-fixed renderers as children.
    129132    m_bubble->getInlineStyleDecl()->setProperty(CSSPropertyPosition, CSSValueAbsolute);
    130133    adjustBubblePosition(host->getRect(), m_bubble.get());
    131     ExceptionCode ec = 0;
    132134    host->ensureShadowRoot()->appendChild(m_bubble.get(), ec);
     135    ASSERT(!ec);
    133136
    134     RefPtr<HTMLElement> clipper = ElementWithPseudoId::create(doc, "-webkit-validation-bubble-arrow-clipper");
    135     clipper->appendChild(ElementWithPseudoId::create(doc, "-webkit-validation-bubble-arrow"), ec);
     137    RefPtr<HTMLDivElement> clipper = HTMLDivElement::create(doc);
     138    clipper->setShadowPseudoId("-webkit-validation-bubble-arrow-clipper", ec);
     139    ASSERT(!ec);
     140    RefPtr<HTMLDivElement> bubbleArrow = HTMLDivElement::create(doc);
     141    bubbleArrow->setShadowPseudoId("-webkit-validation-bubble-arrow", ec);
     142    ASSERT(!ec);
     143    clipper->appendChild(bubbleArrow.release(), ec);
     144    ASSERT(!ec);
    136145    m_bubble->appendChild(clipper.release(), ec);
    137     m_bubbleMessage = ElementWithPseudoId::create(doc, "-webkit-validation-bubble-message");
     146    ASSERT(!ec);
     147    m_bubbleMessage = HTMLDivElement::create(doc);
     148    m_bubbleMessage->setShadowPseudoId("-webkit-validation-bubble-message", ec);
     149    ASSERT(!ec);
    138150    m_bubble->appendChild(m_bubbleMessage, ec);
     151    ASSERT(!ec);
    139152
    140153    setMessageDOMAndStartTimer();
Note: See TracChangeset for help on using the changeset viewer.