Diff
Modified: trunk/Source/WebCore/CMakeLists.txt (108206 => 108207)
--- trunk/Source/WebCore/CMakeLists.txt 2012-02-20 05:24:14 UTC (rev 108206)
+++ trunk/Source/WebCore/CMakeLists.txt 2012-02-20 06:00:35 UTC (rev 108207)
@@ -869,6 +869,7 @@
html/shadow/HTMLContentElement.cpp
html/shadow/HTMLContentSelector.cpp
html/shadow/HTMLShadowElement.cpp
+ html/shadow/InsertionPoint.cpp
html/shadow/MediaControls.cpp
html/shadow/MediaControlRootElement.cpp
html/shadow/MeterShadowElement.cpp
Modified: trunk/Source/WebCore/ChangeLog (108206 => 108207)
--- trunk/Source/WebCore/ChangeLog 2012-02-20 05:24:14 UTC (rev 108206)
+++ trunk/Source/WebCore/ChangeLog 2012-02-20 06:00:35 UTC (rev 108207)
@@ -1,3 +1,38 @@
+2012-02-19 Shinya Kawanaka <[email protected]>
+
+ Introduce InsertionPoint, which will be a common base class of HTMLShadowElement and HTMLContentElement.
+ https://bugs.webkit.org/show_bug.cgi?id=78771
+
+ Reviewed by Hajime Morita.
+
+ This patch introduces InsertionPoint, which will be a common base class of HTMLShadowElement and HTMLContentElement.
+
+ This is a step for rendering <shadow> correctly, because <shadow> has almost the same function of <content>.
+ After this patch, we will change NodeRenderingContext and related classes to accept InsertionPoint instead of
+ HTMLContentElement only.
+
+ No new tests, no change in behavior.
+
+ * CMakeLists.txt:
+ * GNUmakefile.list.am:
+ * Target.pri:
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * html/shadow/HTMLContentElement.cpp:
+ (WebCore::HTMLContentElement::HTMLContentElement):
+ (WebCore::HTMLContentElement::attach):
+ (WebCore::HTMLContentElement::detach):
+ (WebCore::HTMLContentElement::parseAttribute):
+ * html/shadow/HTMLContentElement.h:
+ * html/shadow/InsertionPoint.cpp: Added.
+ (WebCore):
+ (WebCore::InsertionPoint::InsertionPoint):
+ (WebCore::InsertionPoint::~InsertionPoint):
+ * html/shadow/InsertionPoint.h: Added.
+ (WebCore):
+ (InsertionPoint):
+
2012-02-19 Paweł Forysiuk <[email protected]>
[GTK] Can't find webinspector and error page redirection on Windows
Modified: trunk/Source/WebCore/GNUmakefile.list.am (108206 => 108207)
--- trunk/Source/WebCore/GNUmakefile.list.am 2012-02-20 05:24:14 UTC (rev 108206)
+++ trunk/Source/WebCore/GNUmakefile.list.am 2012-02-20 06:00:35 UTC (rev 108207)
@@ -2248,6 +2248,8 @@
Source/WebCore/html/shadow/HTMLContentElement.h \
Source/WebCore/html/shadow/HTMLContentSelector.cpp \
Source/WebCore/html/shadow/HTMLContentSelector.h \
+ Source/WebCore/html/shadow/InsertionPoint.cpp \
+ Source/WebCore/html/shadow/InsertionPoint.h \
Source/WebCore/html/shadow/MediaControls.cpp \
Source/WebCore/html/shadow/MediaControls.h \
Source/WebCore/html/shadow/MediaControlElements.cpp \
Modified: trunk/Source/WebCore/Target.pri (108206 => 108207)
--- trunk/Source/WebCore/Target.pri 2012-02-20 05:24:14 UTC (rev 108206)
+++ trunk/Source/WebCore/Target.pri 2012-02-20 06:00:35 UTC (rev 108207)
@@ -847,6 +847,7 @@
html/shadow/HTMLContentElement.cpp \
html/shadow/HTMLContentSelector.cpp \
html/shadow/HTMLShadowElement.cpp \
+ html/shadow/InsertionPoint.cpp \
html/shadow/MediaControls.cpp \
html/shadow/MediaControlRootElement.cpp \
html/shadow/MeterShadowElement.cpp \
Modified: trunk/Source/WebCore/WebCore.gypi (108206 => 108207)
--- trunk/Source/WebCore/WebCore.gypi 2012-02-20 05:24:14 UTC (rev 108206)
+++ trunk/Source/WebCore/WebCore.gypi 2012-02-20 06:00:35 UTC (rev 108207)
@@ -5558,6 +5558,8 @@
'html/shadow/HTMLContentSelector.h',
'html/shadow/HTMLShadowElement.cpp',
'html/shadow/HTMLShadowElement.h',
+ 'html/shadow/InsertionPoint.cpp',
+ 'html/shadow/InsertionPoint.h',
'html/shadow/MediaControls.cpp',
'html/shadow/MediaControls.h',
'html/shadow/MediaControlElements.cpp',
Modified: trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj (108206 => 108207)
--- trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj 2012-02-20 05:24:14 UTC (rev 108206)
+++ trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj 2012-02-20 06:00:35 UTC (rev 108207)
@@ -61089,6 +61089,14 @@
>
</File>
<File
+ RelativePath="..\html\shadow\InsertionPoint.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\html\shadow\InsertionPoint.h"
+ >
+ </File>
+ <File
RelativePath="..\html\shadow\MediaControlElements.cpp"
>
</File>
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (108206 => 108207)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2012-02-20 05:24:14 UTC (rev 108206)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2012-02-20 06:00:35 UTC (rev 108207)
@@ -1615,6 +1615,8 @@
57B791A614C6A62900F202D1 /* ContentSelectorQuery.h in Headers */ = {isa = PBXBuildFile; fileRef = 57B791A214C6A62900F202D1 /* ContentSelectorQuery.h */; };
57B791A914C6A63300F202D1 /* HTMLContentElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57B791A714C6A63300F202D1 /* HTMLContentElement.cpp */; };
57B791AA14C6A63300F202D1 /* HTMLContentElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 57B791A814C6A63300F202D1 /* HTMLContentElement.h */; };
+ 57CF497414EE36D700ECFF14 /* InsertionPoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57CF497214EE36D700ECFF14 /* InsertionPoint.cpp */; };
+ 57CF497514EE36D700ECFF14 /* InsertionPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 57CF497314EE36D700ECFF14 /* InsertionPoint.h */; };
5905ADBF1302F3CE00F116DF /* XMLTreeViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5905ADBD1302F3CE00F116DF /* XMLTreeViewer.cpp */; };
5905ADC01302F3CE00F116DF /* XMLTreeViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = 5905ADBE1302F3CE00F116DF /* XMLTreeViewer.h */; };
590E1B4911E4EF4B0069F784 /* DeviceOrientation.h in Headers */ = {isa = PBXBuildFile; fileRef = 590E1B4811E4EF4B0069F784 /* DeviceOrientation.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -8484,8 +8486,8 @@
53C8298C13D8D92700DE2DEB /* RenderFlexibleBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderFlexibleBox.h; sourceTree = "<group>"; };
550A0BC7085F6039007353D6 /* QualifiedName.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = QualifiedName.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
550A0BC8085F6039007353D6 /* QualifiedName.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = QualifiedName.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
- 572E92F914E540580087FFBA /* ShadowRootList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ShadowRootList.cpp; path = dom/ShadowRootList.cpp; sourceTree = "<group>"; };
- 572E92FA14E540580087FFBA /* ShadowRootList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ShadowRootList.h; path = dom/ShadowRootList.h; sourceTree = "<group>"; };
+ 572E92F914E540580087FFBA /* ShadowRootList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ShadowRootList.cpp; path = ../../dom/ShadowRootList.cpp; sourceTree = "<group>"; };
+ 572E92FA14E540580087FFBA /* ShadowRootList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ShadowRootList.h; path = ../../dom/ShadowRootList.h; sourceTree = "<group>"; };
573D134514CE39FF0057ABCA /* InspectorTypeBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorTypeBuilder.cpp; sourceTree = "<group>"; };
573D134614CE39FF0057ABCA /* InspectorTypeBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorTypeBuilder.h; sourceTree = "<group>"; };
57B7919F14C6A62900F202D1 /* HTMLContentSelector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLContentSelector.cpp; sourceTree = "<group>"; };
@@ -8494,6 +8496,8 @@
57B791A214C6A62900F202D1 /* ContentSelectorQuery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContentSelectorQuery.h; sourceTree = "<group>"; };
57B791A714C6A63300F202D1 /* HTMLContentElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLContentElement.cpp; sourceTree = "<group>"; };
57B791A814C6A63300F202D1 /* HTMLContentElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLContentElement.h; sourceTree = "<group>"; };
+ 57CF497214EE36D700ECFF14 /* InsertionPoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InsertionPoint.cpp; sourceTree = "<group>"; };
+ 57CF497314EE36D700ECFF14 /* InsertionPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InsertionPoint.h; sourceTree = "<group>"; };
5905ADBD1302F3CE00F116DF /* XMLTreeViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XMLTreeViewer.cpp; sourceTree = "<group>"; };
5905ADBE1302F3CE00F116DF /* XMLTreeViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XMLTreeViewer.h; sourceTree = "<group>"; };
590E1B4811E4EF4B0069F784 /* DeviceOrientation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceOrientation.h; sourceTree = "<group>"; };
@@ -13449,8 +13453,6 @@
0867D691FE84028FC02AAC07 /* WebKit */ = {
isa = PBXGroup;
children = (
- 572E92F914E540580087FFBA /* ShadowRootList.cpp */,
- 572E92FA14E540580087FFBA /* ShadowRootList.h */,
65C97AF208EA908800ACD273 /* config.h */,
EDEC98020AED7E170059137F /* WebCorePrefix.h */,
9307061309E0CA8200B17FE4 /* DerivedSources.make */,
@@ -14415,6 +14417,8 @@
4ABDFF0714DBE312004D117D /* HTMLShadowElement.cpp */,
4ABDFF0814DBE312004D117D /* HTMLShadowElement.h */,
4ABDFF0914DBE312004D117D /* HTMLShadowElement.idl */,
+ 57CF497214EE36D700ECFF14 /* InsertionPoint.cpp */,
+ 57CF497314EE36D700ECFF14 /* InsertionPoint.h */,
417253A81354BBBC00360F2A /* MediaControlElements.cpp */,
417253A91354BBBC00360F2A /* MediaControlElements.h */,
4157AF7F12F1FB0400A8C6F5 /* MediaControlRootElement.cpp */,
@@ -14425,6 +14429,8 @@
A78E526E1346BD1700AD9C31 /* MeterShadowElement.h */,
A715E650134BBBEC00D8E713 /* ProgressShadowElement.cpp */,
A715E651134BBBEC00D8E713 /* ProgressShadowElement.h */,
+ 572E92F914E540580087FFBA /* ShadowRootList.cpp */,
+ 572E92FA14E540580087FFBA /* ShadowRootList.h */,
4150F9F012B6E0E70008C860 /* SliderThumbElement.cpp */,
4150F9EF12B6E0E70008C860 /* SliderThumbElement.h */,
142B97C713138943008BEF4B /* TextControlInnerElements.cpp */,
@@ -22567,6 +22573,7 @@
BCEA485A097D93020094C9E4 /* InlineTextBox.h in Headers */,
37E3524D12450C6600BAF5D9 /* InputType.h in Headers */,
93309DEA099E64920056E581 /* InsertIntoTextNodeCommand.h in Headers */,
+ 57CF497514EE36D700ECFF14 /* InsertionPoint.h in Headers */,
93309DEC099E64920056E581 /* InsertLineBreakCommand.h in Headers */,
D07DEABA0A36554A00CA30F8 /* InsertListCommand.h in Headers */,
93309DEE099E64920056E581 /* InsertNodeBeforeCommand.h in Headers */,
@@ -25610,6 +25617,7 @@
BCEA4859097D93020094C9E4 /* InlineTextBox.cpp in Sources */,
37E3524B12450C5200BAF5D9 /* InputType.cpp in Sources */,
93309DE9099E64920056E581 /* InsertIntoTextNodeCommand.cpp in Sources */,
+ 57CF497414EE36D700ECFF14 /* InsertionPoint.cpp in Sources */,
93309DEB099E64920056E581 /* InsertLineBreakCommand.cpp in Sources */,
D07DEAB90A36554A00CA30F8 /* InsertListCommand.cpp in Sources */,
93309DED099E64920056E581 /* InsertNodeBeforeCommand.cpp in Sources */,
Modified: trunk/Source/WebCore/html/shadow/HTMLContentElement.cpp (108206 => 108207)
--- trunk/Source/WebCore/html/shadow/HTMLContentElement.cpp 2012-02-20 05:24:14 UTC (rev 108206)
+++ trunk/Source/WebCore/html/shadow/HTMLContentElement.cpp 2012-02-20 06:00:35 UTC (rev 108207)
@@ -59,7 +59,7 @@
}
HTMLContentElement::HTMLContentElement(const QualifiedName& name, Document* document)
- : HTMLElement(name, document)
+ : InsertionPoint(name, document)
, m_selections(adoptPtr(new HTMLContentSelectionList()))
{
}
@@ -79,7 +79,7 @@
selector->select(this, m_selections.get());
}
- HTMLElement::attach();
+ InsertionPoint::attach();
if (root) {
for (HTMLContentSelection* selection = m_selections->first(); selection; selection = selection->next())
@@ -99,7 +99,7 @@
}
ASSERT(m_selections->isEmpty());
- HTMLElement::detach();
+ InsertionPoint::detach();
}
const AtomicString& HTMLContentElement::select() const
@@ -124,7 +124,7 @@
if (ShadowRoot* root = toShadowRoot(shadowTreeRootNode()))
root->setNeedsReattachHostChildrenAndShadow();
} else
- HTMLElement::parseAttribute(attr);
+ InsertionPoint::parseAttribute(attr);
}
}
Modified: trunk/Source/WebCore/html/shadow/HTMLContentElement.h (108206 => 108207)
--- trunk/Source/WebCore/html/shadow/HTMLContentElement.h 2012-02-20 05:24:14 UTC (rev 108206)
+++ trunk/Source/WebCore/html/shadow/HTMLContentElement.h 2012-02-20 06:00:35 UTC (rev 108207)
@@ -32,7 +32,7 @@
#define HTMLContentElement_h
#include "HTMLContentSelector.h"
-#include "HTMLElement.h"
+#include "InsertionPoint.h"
#include <wtf/Forward.h>
namespace WebCore {
@@ -42,7 +42,7 @@
// NOTE: Current implementation doesn't support dynamic insertion/deletion of HTMLContentElement.
// You should create HTMLContentElement during the host construction.
-class HTMLContentElement : public HTMLElement {
+class HTMLContentElement : public InsertionPoint {
public:
static PassRefPtr<HTMLContentElement> create(const QualifiedName&, Document*);
static PassRefPtr<HTMLContentElement> create(Document*);
Added: trunk/Source/WebCore/html/shadow/InsertionPoint.cpp (0 => 108207)
--- trunk/Source/WebCore/html/shadow/InsertionPoint.cpp (rev 0)
+++ trunk/Source/WebCore/html/shadow/InsertionPoint.cpp 2012-02-20 06:00:35 UTC (rev 108207)
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "InsertionPoint.h"
+
+#include "HTMLNames.h"
+
+namespace WebCore {
+
+class Document;
+
+InsertionPoint::InsertionPoint(const QualifiedName& tagName, Document* document)
+ : HTMLElement(tagName, document)
+{
+}
+
+InsertionPoint::~InsertionPoint()
+{
+}
+
+} // namespace WebCore
Added: trunk/Source/WebCore/html/shadow/InsertionPoint.h (0 => 108207)
--- trunk/Source/WebCore/html/shadow/InsertionPoint.h (rev 0)
+++ trunk/Source/WebCore/html/shadow/InsertionPoint.h 2012-02-20 06:00:35 UTC (rev 108207)
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef InsertionPoint_h
+#define InsertionPoint_h
+
+#include "HTMLElement.h"
+
+namespace WebCore {
+
+class InsertionPoint : public HTMLElement {
+public:
+ virtual ~InsertionPoint();
+
+protected:
+ InsertionPoint(const QualifiedName&, Document*);
+};
+
+} // namespace WebCore
+
+#endif // InsertionPoint_h