| Differences between
and this patch
- a/Source/WebCore/CMakeLists.txt -1 lines
Lines 847-853 SET(WebCore_SOURCES a/Source/WebCore/CMakeLists.txt_sec1
847
    html/parser/TextViewSourceParser.cpp
847
    html/parser/TextViewSourceParser.cpp
848
    html/parser/XSSAuditor.cpp
848
    html/parser/XSSAuditor.cpp
849
849
850
    html/shadow/ElementWithPseudoId.cpp
851
    html/shadow/DetailsMarkerControl.cpp
850
    html/shadow/DetailsMarkerControl.cpp
852
    html/shadow/MediaControls.cpp
851
    html/shadow/MediaControls.cpp
853
    html/shadow/MediaControlRootElement.cpp
852
    html/shadow/MediaControlRootElement.cpp
- a/Source/WebCore/ChangeLog +25 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2011-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
1
2011-06-29  Chris Rogers  <crogers@google.com>
26
2011-06-29  Chris Rogers  <crogers@google.com>
2
27
3
        Reviewed by Kenneth Russell.
28
        Reviewed by Kenneth Russell.
- a/Source/WebCore/GNUmakefile.list.am -2 lines
Lines 1861-1868 webcore_sources += \ a/Source/WebCore/GNUmakefile.list.am_sec1
1861
	Source/WebCore/html/parser/TextViewSourceParser.h \
1861
	Source/WebCore/html/parser/TextViewSourceParser.h \
1862
	Source/WebCore/html/parser/XSSAuditor.cpp \
1862
	Source/WebCore/html/parser/XSSAuditor.cpp \
1863
	Source/WebCore/html/parser/XSSAuditor.h \
1863
	Source/WebCore/html/parser/XSSAuditor.h \
1864
	Source/WebCore/html/shadow/ElementWithPseudoId.cpp \
1865
	Source/WebCore/html/shadow/ElementWithPseudoId.h \
1866
	Source/WebCore/html/shadow/DetailsMarkerControl.cpp \
1864
	Source/WebCore/html/shadow/DetailsMarkerControl.cpp \
1867
	Source/WebCore/html/shadow/DetailsMarkerControl.h \
1865
	Source/WebCore/html/shadow/DetailsMarkerControl.h \
1868
	Source/WebCore/html/shadow/MediaControls.cpp \
1866
	Source/WebCore/html/shadow/MediaControls.cpp \
- a/Source/WebCore/WebCore.gypi -2 lines
Lines 3221-3228 a/Source/WebCore/WebCore.gypi_sec1
3221
            'html/parser/TextViewSourceParser.h',
3221
            'html/parser/TextViewSourceParser.h',
3222
            'html/parser/XSSAuditor.cpp',
3222
            'html/parser/XSSAuditor.cpp',
3223
            'html/parser/XSSAuditor.h',
3223
            'html/parser/XSSAuditor.h',
3224
            'html/shadow/ElementWithPseudoId.cpp',
3225
            'html/shadow/ElementWithPseudoId.h',
3226
            'html/shadow/DetailsMarkerControl.cpp',
3224
            'html/shadow/DetailsMarkerControl.cpp',
3227
            'html/shadow/DetailsMarkerControl.h',
3225
            'html/shadow/DetailsMarkerControl.h',
3228
            'html/shadow/MediaControls.cpp',
3226
            'html/shadow/MediaControls.cpp',
- a/Source/WebCore/WebCore.order -1 lines
Lines 25531-25537 __ZN7WebCore17ValidationMessage10setMessageERKN3WTF6StringE a/Source/WebCore/WebCore.order_sec1
25531
__ZN7WebCore5TimerINS_17ValidationMessageEE5firedEv
25531
__ZN7WebCore5TimerINS_17ValidationMessageEE5firedEv
25532
__ZN7WebCore17ValidationMessage15buildBubbleTreeEPNS_5TimerIS0_EE
25532
__ZN7WebCore17ValidationMessage15buildBubbleTreeEPNS_5TimerIS0_EE
25533
__ZN7WebCore26CSSMutableStyleDeclaration11setPropertyEidNS_17CSSPrimitiveValue9UnitTypesEbb
25533
__ZN7WebCore26CSSMutableStyleDeclaration11setPropertyEidNS_17CSSPrimitiveValue9UnitTypesEbb
25534
__ZNK7WebCore19ElementWithPseudoId14shadowPseudoIdEv
25535
__ZN7WebCore17ValidationMessage26setMessageDOMAndStartTimerEPNS_5TimerIS0_EE
25534
__ZN7WebCore17ValidationMessage26setMessageDOMAndStartTimerEPNS_5TimerIS0_EE
25536
__ZN7WebCore5TimerINS_17ValidationMessageEED0Ev
25535
__ZN7WebCore5TimerINS_17ValidationMessageEED0Ev
25537
__ZN7WebCore17ValidationMessage20requestToHideMessageEv
25536
__ZN7WebCore17ValidationMessage20requestToHideMessageEv
- a/Source/WebCore/WebCore.pro -1 lines
Lines 800-806 SOURCES += \ a/Source/WebCore/WebCore.pro_sec1
800
    html/parser/TextDocumentParser.cpp \
800
    html/parser/TextDocumentParser.cpp \
801
    html/parser/TextViewSourceParser.cpp \
801
    html/parser/TextViewSourceParser.cpp \
802
    html/parser/XSSAuditor.cpp \
802
    html/parser/XSSAuditor.cpp \
803
    html/shadow/ElementWithPseudoId.cpp \
804
    html/shadow/DetailsMarkerControl.cpp \
803
    html/shadow/DetailsMarkerControl.cpp \
805
    html/shadow/MediaControls.cpp \
804
    html/shadow/MediaControls.cpp \
806
    html/shadow/MediaControlRootElement.cpp \
805
    html/shadow/MediaControlRootElement.cpp \
- a/Source/WebCore/WebCore.vcproj/WebCore.vcproj -8 lines
Lines 57581-57594 a/Source/WebCore/WebCore.vcproj/WebCore.vcproj_sec1
57581
					>
57581
					>
57582
				</File>
57582
				</File>
57583
				<File
57583
				<File
57584
					RelativePath="..\html\shadow\ElementWithPseudoId.cpp"
57585
					>
57586
				</File>
57587
				<File
57588
					RelativePath="..\html\shadow\ElementWithPseudoId.h"
57589
					>
57590
				</File>
57591
				<File
57592
					RelativePath="..\html\shadow\MediaControlElements.cpp"
57584
					RelativePath="..\html\shadow\MediaControlElements.cpp"
57593
					>
57585
					>
57594
				</File>
57586
				</File>
- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj -8 lines
Lines 5274-5281 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec1
5274
		C0F2A44113869AAB0066C534 /* preprocessor.pm in Headers */ = {isa = PBXBuildFile; fileRef = C0F2A43F13869A280066C534 /* preprocessor.pm */; settings = {ATTRIBUTES = (Private, ); }; };
5274
		C0F2A44113869AAB0066C534 /* preprocessor.pm in Headers */ = {isa = PBXBuildFile; fileRef = C0F2A43F13869A280066C534 /* preprocessor.pm */; settings = {ATTRIBUTES = (Private, ); }; };
5275
		C105DA620F3AA68F001DD44F /* TextEncodingDetectorICU.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C105DA610F3AA68F001DD44F /* TextEncodingDetectorICU.cpp */; };
5275
		C105DA620F3AA68F001DD44F /* TextEncodingDetectorICU.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C105DA610F3AA68F001DD44F /* TextEncodingDetectorICU.cpp */; };
5276
		C105DA640F3AA6B8001DD44F /* TextEncodingDetector.h in Headers */ = {isa = PBXBuildFile; fileRef = C105DA630F3AA6B8001DD44F /* TextEncodingDetector.h */; };
5276
		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 */; };
5279
		C50B561612119D23008B46E0 /* GroupSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C50B561412119D23008B46E0 /* GroupSettings.cpp */; };
5277
		C50B561612119D23008B46E0 /* GroupSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C50B561412119D23008B46E0 /* GroupSettings.cpp */; };
5280
		C50B561712119D23008B46E0 /* GroupSettings.h in Headers */ = {isa = PBXBuildFile; fileRef = C50B561512119D23008B46E0 /* GroupSettings.h */; settings = {ATTRIBUTES = (Private, ); }; };
5278
		C50B561712119D23008B46E0 /* GroupSettings.h in Headers */ = {isa = PBXBuildFile; fileRef = C50B561512119D23008B46E0 /* GroupSettings.h */; settings = {ATTRIBUTES = (Private, ); }; };
5281
		C50D0E820FF4272900AC2644 /* StorageNamespace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C50D0E800FF4272900AC2644 /* StorageNamespace.cpp */; };
5279
		C50D0E820FF4272900AC2644 /* StorageNamespace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C50D0E800FF4272900AC2644 /* StorageNamespace.cpp */; };
Lines 11908-11915 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec2
11908
		C0F2A43F13869A280066C534 /* preprocessor.pm */ = {isa = PBXFileReference; lastKnownFileType = text.script.perl; name = preprocessor.pm; path = scripts/preprocessor.pm; sourceTree = "<group>"; };
11906
		C0F2A43F13869A280066C534 /* preprocessor.pm */ = {isa = PBXFileReference; lastKnownFileType = text.script.perl; name = preprocessor.pm; path = scripts/preprocessor.pm; sourceTree = "<group>"; };
11909
		C105DA610F3AA68F001DD44F /* TextEncodingDetectorICU.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextEncodingDetectorICU.cpp; sourceTree = "<group>"; };
11907
		C105DA610F3AA68F001DD44F /* TextEncodingDetectorICU.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextEncodingDetectorICU.cpp; sourceTree = "<group>"; };
11910
		C105DA630F3AA6B8001DD44F /* TextEncodingDetector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextEncodingDetector.h; sourceTree = "<group>"; };
11908
		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>"; };
11913
		C50B561412119D23008B46E0 /* GroupSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GroupSettings.cpp; sourceTree = "<group>"; };
11909
		C50B561412119D23008B46E0 /* GroupSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GroupSettings.cpp; sourceTree = "<group>"; };
11914
		C50B561512119D23008B46E0 /* GroupSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GroupSettings.h; sourceTree = "<group>"; };
11910
		C50B561512119D23008B46E0 /* GroupSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GroupSettings.h; sourceTree = "<group>"; };
11915
		C50D0E800FF4272900AC2644 /* StorageNamespace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StorageNamespace.cpp; sourceTree = "<group>"; };
11911
		C50D0E800FF4272900AC2644 /* StorageNamespace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StorageNamespace.cpp; sourceTree = "<group>"; };
Lines 13638-13645 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec3
13638
			children = (
13634
			children = (
13639
				A7C9ABF61357A3BF00F5503F /* DetailsMarkerControl.cpp */,
13635
				A7C9ABF61357A3BF00F5503F /* DetailsMarkerControl.cpp */,
13640
				A7C9ABF71357A3BF00F5503F /* DetailsMarkerControl.h */,
13636
				A7C9ABF71357A3BF00F5503F /* DetailsMarkerControl.h */,
13641
				C39509B5138D05D400912E52 /* ElementWithPseudoId.cpp */,
13642
				C39509B4138D05D400912E52 /* ElementWithPseudoId.h */,
13643
				417253A81354BBBC00360F2A /* MediaControlElements.cpp */,
13637
				417253A81354BBBC00360F2A /* MediaControlElements.cpp */,
13644
				417253A91354BBBC00360F2A /* MediaControlElements.h */,
13638
				417253A91354BBBC00360F2A /* MediaControlElements.h */,
13645
				4157AF7F12F1FB0400A8C6F5 /* MediaControlRootElement.cpp */,
13639
				4157AF7F12F1FB0400A8C6F5 /* MediaControlRootElement.cpp */,
Lines 21092-21098 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec4
21092
				A8C4A80709D563270003AC8D /* Element.h in Headers */,
21086
				A8C4A80709D563270003AC8D /* Element.h in Headers */,
21093
				63F5D4F70E8C4B7100C0BD04 /* ElementRareData.h in Headers */,
21087
				63F5D4F70E8C4B7100C0BD04 /* ElementRareData.h in Headers */,
21094
				E415F1840D9A1A830033CE97 /* ElementTimeControl.h in Headers */,
21088
				E415F1840D9A1A830033CE97 /* ElementTimeControl.h in Headers */,
21095
				C39509B6138D05D400912E52 /* ElementWithPseudoId.h in Headers */,
21096
				A8CFF6BE0A156118000A4234 /* EllipsisBox.h in Headers */,
21089
				A8CFF6BE0A156118000A4234 /* EllipsisBox.h in Headers */,
21097
				F55B3DBC1251F12D003EF269 /* EmailInputType.h in Headers */,
21090
				F55B3DBC1251F12D003EF269 /* EmailInputType.h in Headers */,
21098
				B25599A50D00D8BA00BB825C /* EmptyClients.h in Headers */,
21091
				B25599A50D00D8BA00BB825C /* EmptyClients.h in Headers */,
Lines 24026-24032 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec5
24026
				93A38B4B0D0E5808006872C2 /* EditorCommand.cpp in Sources */,
24019
				93A38B4B0D0E5808006872C2 /* EditorCommand.cpp in Sources */,
24027
				ED501DC60B249F2900AE18D9 /* EditorMac.mm in Sources */,
24020
				ED501DC60B249F2900AE18D9 /* EditorMac.mm in Sources */,
24028
				A8C4A80809D563270003AC8D /* Element.cpp in Sources */,
24021
				A8C4A80809D563270003AC8D /* Element.cpp in Sources */,
24029
				C39509B7138D05D400912E52 /* ElementWithPseudoId.cpp in Sources */,
24030
				A8CFF6CB0A1561CD000A4234 /* EllipsisBox.cpp in Sources */,
24022
				A8CFF6CB0A1561CD000A4234 /* EllipsisBox.cpp in Sources */,
24031
				F55B3DBB1251F12D003EF269 /* EmailInputType.cpp in Sources */,
24023
				F55B3DBB1251F12D003EF269 /* EmailInputType.cpp in Sources */,
24032
				A8EA7EC10A1945D000A8EF5F /* EntityReference.cpp in Sources */,
24024
				A8EA7EC10A1945D000A8EF5F /* EntityReference.cpp in Sources */,
- a/Source/WebCore/html/ColorInputType.cpp -3 / +10 lines
Lines 32-38 a/Source/WebCore/html/ColorInputType.cpp_sec1
32
#include "ColorInputType.h"
32
#include "ColorInputType.h"
33
33
34
#include "Color.h"
34
#include "Color.h"
35
#include "ElementWithPseudoId.h"
35
#include "HTMLDivElement.h"
36
#include "HTMLInputElement.h"
36
#include "HTMLInputElement.h"
37
#include "ShadowRoot.h"
37
#include "ShadowRoot.h"
38
#include <wtf/PassOwnPtr.h>
38
#include <wtf/PassOwnPtr.h>
Lines 95-104 String ColorInputType::sanitizeValue(const String& proposedValue) a/Source/WebCore/html/ColorInputType.cpp_sec2
95
void ColorInputType::createShadowSubtree()
95
void ColorInputType::createShadowSubtree()
96
{
96
{
97
    Document* document = element()->document();
97
    Document* document = element()->document();
98
    RefPtr<HTMLElement> wrapperElement = ElementWithPseudoId::create(document, "-webkit-color-swatch-wrapper");
98
    RefPtr<HTMLDivElement> wrapperElement = HTMLDivElement::create(document);
99
    ExceptionCode ec = 0;
99
    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);
101
    element()->ensureShadowRoot()->appendChild(wrapperElement.release(), ec);
107
    element()->ensureShadowRoot()->appendChild(wrapperElement.release(), ec);
108
    ASSERT(!ec);
102
    
109
    
103
    updateColorSwatch();
110
    updateColorSwatch();
104
}
111
}
- a/Source/WebCore/html/RangeInputType.cpp -2 / +4 lines
Lines 32-38 a/Source/WebCore/html/RangeInputType.cpp_sec1
32
#include "config.h"
32
#include "config.h"
33
#include "RangeInputType.h"
33
#include "RangeInputType.h"
34
34
35
#include "ElementWithPseudoId.h"
35
#include "HTMLDivElement.h"
36
#include "HTMLInputElement.h"
36
#include "HTMLInputElement.h"
37
#include "HTMLNames.h"
37
#include "HTMLNames.h"
38
#include "HTMLParserIdioms.h"
38
#include "HTMLParserIdioms.h"
Lines 207-213 void RangeInputType::createShadowSubtree() a/Source/WebCore/html/RangeInputType.cpp_sec2
207
{
207
{
208
    ExceptionCode ec = 0;
208
    ExceptionCode ec = 0;
209
    Document* document = element()->document();
209
    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);
211
    track->appendChild(SliderThumbElement::create(document), ec);
213
    track->appendChild(SliderThumbElement::create(document), ec);
212
    RefPtr<HTMLElement> container = SliderContainerElement::create(document);
214
    RefPtr<HTMLElement> container = SliderContainerElement::create(document);
213
    container->appendChild(track.release(), ec);
215
    container->appendChild(track.release(), ec);
- a/Source/WebCore/html/ValidationMessage.cpp -7 / +20 lines
Lines 34-42 a/Source/WebCore/html/ValidationMessage.cpp_sec1
34
#include "CSSPropertyNames.h"
34
#include "CSSPropertyNames.h"
35
#include "CSSStyleSelector.h"
35
#include "CSSStyleSelector.h"
36
#include "CSSValueKeywords.h"
36
#include "CSSValueKeywords.h"
37
#include "ElementWithPseudoId.h"
38
#include "FormAssociatedElement.h"
37
#include "FormAssociatedElement.h"
39
#include "HTMLBRElement.h"
38
#include "HTMLBRElement.h"
39
#include "HTMLDivElement.h"
40
#include "HTMLNames.h"
40
#include "HTMLNames.h"
41
#include "Page.h"
41
#include "Page.h"
42
#include "RenderObject.h"
42
#include "RenderObject.h"
Lines 123-141 void ValidationMessage::buildBubbleTree(Timer<ValidationMessage>*) a/Source/WebCore/html/ValidationMessage.cpp_sec2
123
{
123
{
124
    HTMLElement* host = toHTMLElement(m_element);
124
    HTMLElement* host = toHTMLElement(m_element);
125
    Document* doc = host->document();
125
    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);
127
    // Need to force position:absolute because RenderMenuList doesn't assume it
130
    // Need to force position:absolute because RenderMenuList doesn't assume it
128
    // contains non-absolute or non-fixed renderers as children.
131
    // contains non-absolute or non-fixed renderers as children.
129
    m_bubble->getInlineStyleDecl()->setProperty(CSSPropertyPosition, CSSValueAbsolute);
132
    m_bubble->getInlineStyleDecl()->setProperty(CSSPropertyPosition, CSSValueAbsolute);
130
    adjustBubblePosition(host->getRect(), m_bubble.get());
133
    adjustBubblePosition(host->getRect(), m_bubble.get());
131
    ExceptionCode ec = 0;
132
    host->ensureShadowRoot()->appendChild(m_bubble.get(), ec);
134
    host->ensureShadowRoot()->appendChild(m_bubble.get(), ec);
133
135
    ASSERT(!ec);
134
    RefPtr<HTMLElement> clipper = ElementWithPseudoId::create(doc, "-webkit-validation-bubble-arrow-clipper");
136
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);
136
    m_bubble->appendChild(clipper.release(), ec);
145
    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);
138
    m_bubble->appendChild(m_bubbleMessage, ec);
150
    m_bubble->appendChild(m_bubbleMessage, ec);
151
    ASSERT(!ec);
139
152
140
    setMessageDOMAndStartTimer();
153
    setMessageDOMAndStartTimer();
141
154
- a/Source/WebCore/html/shadow/ElementWithPseudoId.cpp -41 lines
Lines 1-41 a/Source/WebCore/html/shadow/ElementWithPseudoId.cpp_sec1
1
/*
2
 * Copyright (C) 2011 Google Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions are
6
 * met:
7
 *
8
 *     * Redistributions of source code must retain the above copyright
9
 * notice, this list of conditions and the following disclaimer.
10
 *     * Redistributions in binary form must reproduce the above
11
 * copyright notice, this list of conditions and the following disclaimer
12
 * in the documentation and/or other materials provided with the
13
 * distribution.
14
 *     * Neither the name of Google Inc. nor the names of its
15
 * contributors may be used to endorse or promote products derived from
16
 * this software without specific prior written permission.
17
 *
18
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
 */
30
31
#include "config.h"
32
#include "ElementWithPseudoId.h"
33
34
namespace WebCore {
35
36
const AtomicString& ElementWithPseudoId::shadowPseudoId() const
37
{
38
    return m_pseudoName;
39
}
40
41
}
- a/Source/WebCore/html/shadow/ElementWithPseudoId.h -61 lines
Lines 1-61 a/Source/WebCore/html/shadow/ElementWithPseudoId.h_sec1
1
/*
2
 * Copyright (C) 2011 Google Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions are
6
 * met:
7
 *
8
 *     * Redistributions of source code must retain the above copyright
9
 * notice, this list of conditions and the following disclaimer.
10
 *     * Redistributions in binary form must reproduce the above
11
 * copyright notice, this list of conditions and the following disclaimer
12
 * in the documentation and/or other materials provided with the
13
 * distribution.
14
 *     * Neither the name of Google Inc. nor the names of its
15
 * contributors may be used to endorse or promote products derived from
16
 * this software without specific prior written permission.
17
 *
18
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
 */
30
31
#ifndef ElementWithPseudoId_h
32
#define ElementWithPseudoId_h
33
34
#include "HTMLDivElement.h"
35
#include "HTMLNames.h"
36
37
namespace WebCore {
38
39
class ElementWithPseudoId : public HTMLElement {
40
public:
41
    static PassRefPtr<ElementWithPseudoId> create(Document* document, const AtomicString& pseudoName)
42
    {
43
        return adoptRef(new ElementWithPseudoId(document, pseudoName));
44
    }
45
46
protected:
47
    ElementWithPseudoId(Document* document, const AtomicString& pseudoName)
48
        : HTMLElement(HTMLNames::divTag, document)
49
        , m_pseudoName(pseudoName)
50
    {
51
    }
52
53
    virtual const AtomicString& shadowPseudoId() const;
54
55
private:
56
    AtomicString m_pseudoName;
57
};
58
59
}
60
61
#endif // ElementWithPseudoId_h

Return to Bug 63657