Diff
Modified: trunk/Source/WebCore/CMakeLists.txt (102542 => 102543)
--- trunk/Source/WebCore/CMakeLists.txt 2011-12-11 22:20:48 UTC (rev 102542)
+++ trunk/Source/WebCore/CMakeLists.txt 2011-12-11 23:07:54 UTC (rev 102543)
@@ -430,6 +430,7 @@
css/CSSComputedStyleDeclaration.cpp
css/CSSCrossfadeValue.cpp
css/CSSCursorImageValue.cpp
+ css/CSSElementStyleDeclaration.cpp
css/CSSFlexValue.cpp
css/CSSFontFace.cpp
css/CSSFontFaceRule.cpp
Modified: trunk/Source/WebCore/ChangeLog (102542 => 102543)
--- trunk/Source/WebCore/ChangeLog 2011-12-11 22:20:48 UTC (rev 102542)
+++ trunk/Source/WebCore/ChangeLog 2011-12-11 23:07:54 UTC (rev 102543)
@@ -1,3 +1,32 @@
+2011-12-11 Andreas Kling <kl...@webkit.org>
+
+ Move CSSElementStyleDeclaration to its own cpp/h files.
+ <http://webkit.org/b/74256>
+
+ Reviewed by Sam Weinig.
+
+ CSSElementStyleDeclaration is old enough to move out of CSSMutableStyleDeclaration's
+ attic and into her own apartment.
+
+ * CMakeLists.txt:
+ * GNUmakefile.list.am:
+ * Target.pri:
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSDOMBinding.h:
+ * css/CSSElementStyleDeclaration.cpp: Added.
+ (WebCore::CSSElementStyleDeclaration::styleSheet):
+ * css/CSSElementStyleDeclaration.h: Added.
+ (WebCore::CSSElementStyleDeclaration::element):
+ (WebCore::CSSElementStyleDeclaration::setElement):
+ (WebCore::CSSElementStyleDeclaration::CSSElementStyleDeclaration):
+ (WebCore::CSSElementStyleDeclaration::~CSSElementStyleDeclaration):
+ * css/CSSInlineStyleDeclaration.h:
+ * css/CSSMutableStyleDeclaration.cpp:
+ * css/CSSMutableStyleDeclaration.h:
+ * dom/CSSMappedAttributeDeclaration.h:
+
2011-12-11 Benjamin Poulain <bpoul...@apple.com>
Add KillRingNone.cpp to Mac build system
Modified: trunk/Source/WebCore/GNUmakefile.list.am (102542 => 102543)
--- trunk/Source/WebCore/GNUmakefile.list.am 2011-12-11 22:20:48 UTC (rev 102542)
+++ trunk/Source/WebCore/GNUmakefile.list.am 2011-12-11 23:07:54 UTC (rev 102543)
@@ -985,6 +985,8 @@
Source/WebCore/css/CSSCrossfadeValue.h \
Source/WebCore/css/CSSCursorImageValue.cpp \
Source/WebCore/css/CSSCursorImageValue.h \
+ Source/WebCore/css/CSSElementStyleDeclaration.cpp \
+ Source/WebCore/css/CSSElementStyleDeclaration.h \
Source/WebCore/css/CSSFlexValue.cpp \
Source/WebCore/css/CSSFlexValue.h \
Source/WebCore/css/CSSFontFace.cpp \
Modified: trunk/Source/WebCore/Target.pri (102542 => 102543)
--- trunk/Source/WebCore/Target.pri 2011-12-11 22:20:48 UTC (rev 102542)
+++ trunk/Source/WebCore/Target.pri 2011-12-11 23:07:54 UTC (rev 102543)
@@ -396,6 +396,7 @@
css/CSSComputedStyleDeclaration.cpp \
css/CSSCrossfadeValue.cpp \
css/CSSCursorImageValue.cpp \
+ css/CSSElementStyleDeclaration.cpp \
css/CSSFlexValue.cpp \
css/CSSFontFace.cpp \
css/CSSFontFaceRule.cpp \
@@ -1492,6 +1493,7 @@
css/CSSComputedStyleDeclaration.h \
css/CSSCrossfadeValue.h \
css/CSSCursorImageValue.h \
+ css/CSSElementStyleDeclaration.h \
css/CSSFlexValue.h \
css/CSSFontFace.h \
css/CSSFontFaceRule.h \
Modified: trunk/Source/WebCore/WebCore.gypi (102542 => 102543)
--- trunk/Source/WebCore/WebCore.gypi 2011-12-11 22:20:48 UTC (rev 102542)
+++ trunk/Source/WebCore/WebCore.gypi 2011-12-11 23:07:54 UTC (rev 102543)
@@ -487,6 +487,7 @@
'bridge/runtime_root.h',
'css/CSSComputedStyleDeclaration.h',
'css/CSSCursorImageValue.h',
+ 'css/CSSElementStyleDeclaration.h',
'css/CSSHelper.h',
'css/CSSImageGeneratorValue.h',
'css/CSSImageValue.h',
@@ -2369,6 +2370,7 @@
'css/CSSCrossfadeValue.cpp',
'css/CSSCrossfadeValue.h',
'css/CSSCursorImageValue.cpp',
+ 'css/CSSElementStyleDeclaration.cpp',
'css/CSSFlexValue.cpp',
'css/CSSFlexValue.h',
'css/CSSFontFace.cpp',
Modified: trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj (102542 => 102543)
--- trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj 2011-12-11 22:20:48 UTC (rev 102542)
+++ trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj 2011-12-11 23:07:54 UTC (rev 102543)
@@ -32498,6 +32498,14 @@
>
</File>
<File
+ RelativePath="..\css\CSSElementStyleDeclaration.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\css\CSSElementStyleDeclaration.h"
+ >
+ </File>
+ <File
RelativePath="..\css\CSSFlexValue.cpp"
>
</File>
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (102542 => 102543)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2011-12-11 22:20:48 UTC (rev 102542)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2011-12-11 23:07:54 UTC (rev 102543)
@@ -2949,6 +2949,8 @@
8C0E334D138A92C7008DA94F /* LevelDBTransaction.h in Headers */ = {isa = PBXBuildFile; fileRef = 8C0E3349138A92C7008DA94F /* LevelDBTransaction.h */; };
8C0E334E138A92C7008DA94F /* LevelDBWriteBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C0E334A138A92C7008DA94F /* LevelDBWriteBatch.cpp */; };
8C0E334F138A92C7008DA94F /* LevelDBWriteBatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 8C0E334B138A92C7008DA94F /* LevelDBWriteBatch.h */; };
+ 8C1091981494FB1200B5D3FE /* CSSElementStyleDeclaration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C1091961494FB1200B5D3FE /* CSSElementStyleDeclaration.cpp */; };
+ 8C1091991494FB1200B5D3FE /* CSSElementStyleDeclaration.h in Headers */ = {isa = PBXBuildFile; fileRef = 8C1091971494FB1200B5D3FE /* CSSElementStyleDeclaration.h */; settings = {ATTRIBUTES = (Private, ); }; };
8C6EA61911EF7E0400FD8EE3 /* RuntimeEnabledFeatures.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C6EA61711EF7E0400FD8EE3 /* RuntimeEnabledFeatures.cpp */; };
8C6EA61A11EF7E0400FD8EE3 /* RuntimeEnabledFeatures.h in Headers */ = {isa = PBXBuildFile; fileRef = 8C6EA61811EF7E0400FD8EE3 /* RuntimeEnabledFeatures.h */; };
8CADF2A9135C7B36009EF43F /* LevelDBComparator.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CADF2A3135C7B36009EF43F /* LevelDBComparator.h */; };
@@ -10165,6 +10167,8 @@
8C0E3349138A92C7008DA94F /* LevelDBTransaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LevelDBTransaction.h; sourceTree = "<group>"; };
8C0E334A138A92C7008DA94F /* LevelDBWriteBatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LevelDBWriteBatch.cpp; sourceTree = "<group>"; };
8C0E334B138A92C7008DA94F /* LevelDBWriteBatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LevelDBWriteBatch.h; sourceTree = "<group>"; };
+ 8C1091961494FB1200B5D3FE /* CSSElementStyleDeclaration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSElementStyleDeclaration.cpp; sourceTree = "<group>"; };
+ 8C1091971494FB1200B5D3FE /* CSSElementStyleDeclaration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSElementStyleDeclaration.h; sourceTree = "<group>"; };
8C6EA61711EF7E0400FD8EE3 /* RuntimeEnabledFeatures.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RuntimeEnabledFeatures.cpp; path = generic/RuntimeEnabledFeatures.cpp; sourceTree = "<group>"; };
8C6EA61811EF7E0400FD8EE3 /* RuntimeEnabledFeatures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RuntimeEnabledFeatures.h; path = generic/RuntimeEnabledFeatures.h; sourceTree = "<group>"; };
8CADF2A3135C7B36009EF43F /* LevelDBComparator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LevelDBComparator.h; sourceTree = "<group>"; };
@@ -20679,6 +20683,8 @@
BCEA477D097CAAC80094C9E4 /* CSSComputedStyleDeclaration.h */,
AA0978ED0ABAA6E100874480 /* CSSCursorImageValue.cpp */,
AA0978EE0ABAA6E100874480 /* CSSCursorImageValue.h */,
+ 8C1091961494FB1200B5D3FE /* CSSElementStyleDeclaration.cpp */,
+ 8C1091971494FB1200B5D3FE /* CSSElementStyleDeclaration.h */,
5325E4D513A6C88B00404A36 /* CSSFlexValue.cpp */,
5325E4D613A6C88B00404A36 /* CSSFlexValue.h */,
BC64B4CD0CB4298A005F2B62 /* CSSFontFace.cpp */,
@@ -21822,6 +21828,7 @@
FD31601312B0267600C1A359 /* AudioNode.h in Headers */,
FD31601612B0267600C1A359 /* AudioNodeInput.h in Headers */,
FD31601812B0267600C1A359 /* AudioNodeOutput.h in Headers */,
+ 8C1091991494FB1200B5D3FE /* CSSElementStyleDeclaration.h in Headers */,
FD31601A12B0267600C1A359 /* AudioPannerNode.h in Headers */,
FD31601D12B0267600C1A359 /* AudioParam.h in Headers */,
FD359190138DB22000E1EBEC /* AudioParamTimeline.h in Headers */,
@@ -27682,6 +27689,7 @@
D7613AC414753E5600DB8606 /* JSWebKitNamedFlow.cpp in Sources */,
8A195933147EA16E00D1EA61 /* DOMWebKitNamedFlow.mm in Sources */,
26C17A3F1491D2D400D12BA2 /* FileSystemIOS.mm in Sources */,
+ 8C1091981494FB1200B5D3FE /* CSSElementStyleDeclaration.cpp in Sources */,
4306E4E614955543007F17AC /* KillRingNone.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.h (102542 => 102543)
--- trunk/Source/WebCore/bindings/js/JSDOMBinding.h 2011-12-11 22:20:48 UTC (rev 102542)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.h 2011-12-11 23:07:54 UTC (rev 102543)
@@ -22,8 +22,8 @@
#ifndef JSDOMBinding_h
#define JSDOMBinding_h
+#include "CSSElementStyleDeclaration.h"
#include "CSSImportRule.h"
-#include "CSSMutableStyleDeclaration.h"
#include "CSSStyleSheet.h"
#include "JSDOMGlobalObject.h"
#include "JSDOMWrapper.h"
Added: trunk/Source/WebCore/css/CSSElementStyleDeclaration.cpp (0 => 102543)
--- trunk/Source/WebCore/css/CSSElementStyleDeclaration.cpp (rev 0)
+++ trunk/Source/WebCore/css/CSSElementStyleDeclaration.cpp 2011-12-11 23:07:54 UTC (rev 102543)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2011 Apple 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:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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 "CSSElementStyleDeclaration.h"
+
+#include "StyledElement.h"
+
+namespace WebCore {
+
+CSSStyleSheet* CSSElementStyleDeclaration::styleSheet() const
+{
+ if (m_element && m_element->document())
+ return m_element->document()->elementSheet();
+ return 0;
+}
+
+} // namespace WebCore
Added: trunk/Source/WebCore/css/CSSElementStyleDeclaration.h (0 => 102543)
--- trunk/Source/WebCore/css/CSSElementStyleDeclaration.h (rev 0)
+++ trunk/Source/WebCore/css/CSSElementStyleDeclaration.h 2011-12-11 23:07:54 UTC (rev 102543)
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2011 Apple 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:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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 CSSElementStyleDeclaration_h
+#define CSSElementStyleDeclaration_h
+
+#include "CSSMutableStyleDeclaration.h"
+
+namespace WebCore {
+
+class StyledElement;
+
+// Base class for CSSInlineStyleDeclaration and CSSMappedAttributeDeclaration.
+
+class CSSElementStyleDeclaration : public CSSMutableStyleDeclaration {
+public:
+ StyledElement* element() const { return m_element; }
+ void setElement(StyledElement* element) { m_element = element; }
+
+ virtual CSSStyleSheet* styleSheet() const;
+
+protected:
+ CSSElementStyleDeclaration(bool isInline)
+ : CSSMutableStyleDeclaration()
+ , m_element(0)
+ {
+ m_isElementStyleDeclaration = true;
+ m_isInlineStyleDeclaration = isInline;
+ }
+
+ virtual ~CSSElementStyleDeclaration() { }
+
+private:
+ StyledElement* m_element;
+};
+
+} // namespace WebCore
+
+#endif // CSSElementStyleDeclaration_h
Modified: trunk/Source/WebCore/css/CSSInlineStyleDeclaration.h (102542 => 102543)
--- trunk/Source/WebCore/css/CSSInlineStyleDeclaration.h 2011-12-11 22:20:48 UTC (rev 102542)
+++ trunk/Source/WebCore/css/CSSInlineStyleDeclaration.h 2011-12-11 23:07:54 UTC (rev 102543)
@@ -27,7 +27,7 @@
#ifndef CSSInlineStyleDeclaration_h
#define CSSInlineStyleDeclaration_h
-#include "CSSMutableStyleDeclaration.h"
+#include "CSSElementStyleDeclaration.h"
namespace WebCore {
Modified: trunk/Source/WebCore/css/CSSMutableStyleDeclaration.cpp (102542 => 102543)
--- trunk/Source/WebCore/css/CSSMutableStyleDeclaration.cpp 2011-12-11 22:20:48 UTC (rev 102542)
+++ trunk/Source/WebCore/css/CSSMutableStyleDeclaration.cpp 2011-12-11 23:07:54 UTC (rev 102543)
@@ -1064,11 +1064,4 @@
return 0;
}
-CSSStyleSheet* CSSElementStyleDeclaration::styleSheet() const
-{
- if (m_element && m_element->document())
- return m_element->document()->elementSheet();
- return 0;
-}
-
} // namespace WebCore
Modified: trunk/Source/WebCore/css/CSSMutableStyleDeclaration.h (102542 => 102543)
--- trunk/Source/WebCore/css/CSSMutableStyleDeclaration.h 2011-12-11 22:20:48 UTC (rev 102542)
+++ trunk/Source/WebCore/css/CSSMutableStyleDeclaration.h 2011-12-11 23:07:54 UTC (rev 102543)
@@ -31,8 +31,6 @@
namespace WebCore {
-class StyledElement;
-
class CSSMutableStyleDeclarationConstIterator {
public:
CSSMutableStyleDeclarationConstIterator(const CSSMutableStyleDeclaration* decl, CSSProperty* current);
@@ -175,28 +173,6 @@
friend class CSSMutableStyleDeclarationConstIterator;
};
-class CSSElementStyleDeclaration : public CSSMutableStyleDeclaration {
-public:
- StyledElement* element() const { return m_element; }
- void setElement(StyledElement* element) { m_element = element; }
-
- virtual CSSStyleSheet* styleSheet() const;
-
-protected:
- CSSElementStyleDeclaration(bool isInline)
- : CSSMutableStyleDeclaration()
- , m_element(0)
- {
- m_isElementStyleDeclaration = true;
- m_isInlineStyleDeclaration = isInline;
- }
-
- virtual ~CSSElementStyleDeclaration() { }
-
-private:
- StyledElement* m_element;
-};
-
inline CSSMutableStyleDeclarationConstIterator::CSSMutableStyleDeclarationConstIterator(const CSSMutableStyleDeclaration* decl, CSSProperty* current)
: m_decl(decl)
, m_current(current)
Modified: trunk/Source/WebCore/dom/CSSMappedAttributeDeclaration.h (102542 => 102543)
--- trunk/Source/WebCore/dom/CSSMappedAttributeDeclaration.h 2011-12-11 22:20:48 UTC (rev 102542)
+++ trunk/Source/WebCore/dom/CSSMappedAttributeDeclaration.h 2011-12-11 23:07:54 UTC (rev 102543)
@@ -25,7 +25,7 @@
#ifndef CSSMappedAttributeDeclaration_h
#define CSSMappedAttributeDeclaration_h
-#include "CSSMutableStyleDeclaration.h"
+#include "CSSElementStyleDeclaration.h"
#include "MappedAttributeEntry.h"
#include "QualifiedName.h"