Diff
Modified: trunk/Source/WebCore/CMakeLists.txt (91391 => 91392)
--- trunk/Source/WebCore/CMakeLists.txt 2011-07-20 20:04:35 UTC (rev 91391)
+++ trunk/Source/WebCore/CMakeLists.txt 2011-07-20 20:06:00 UTC (rev 91392)
@@ -1276,6 +1276,7 @@
rendering/style/StyleBoxData.cpp
rendering/style/StyleCachedImage.cpp
rendering/style/StyleDeprecatedFlexibleBoxData.cpp
+ rendering/style/StyleFlexibleBoxData.cpp
rendering/style/StyleGeneratedImage.cpp
rendering/style/StyleInheritedData.cpp
rendering/style/StyleMarqueeData.cpp
Modified: trunk/Source/WebCore/ChangeLog (91391 => 91392)
--- trunk/Source/WebCore/ChangeLog 2011-07-20 20:04:35 UTC (rev 91391)
+++ trunk/Source/WebCore/ChangeLog 2011-07-20 20:06:00 UTC (rev 91392)
@@ -1,3 +1,51 @@
+2011-07-20 Tony Chang <[email protected]>
+
+ add new flexbox data to StyleRareNonInheritedData
+ https://bugs.webkit.org/show_bug.cgi?id=64765
+
+ Reviewed by David Hyatt.
+
+ Add placeholders for the positive and negative flex values for the
+ width and the height. When we get to the other properties (flex-pack,
+ flex-align, etc), we'll add more to the StyleFlexibleBoxData class
+
+ No new tests, these values aren't hooked up to anything yet.
+
+ * CMakeLists.txt:
+ * GNUmakefile.list.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * rendering/style/RenderStyle.cpp:
+ (WebCore::RenderStyle::RenderStyle):
+ (WebCore::RenderStyle::diff):
+ * rendering/style/RenderStyle.h:
+ (WebCore::InheritedFlags::flexboxWidthPositiveFlex):
+ (WebCore::InheritedFlags::flexboxWidthNegativeFlex):
+ (WebCore::InheritedFlags::flexboxHeightPositiveFlex):
+ (WebCore::InheritedFlags::flexboxHeightNegativeFlex):
+ (WebCore::InheritedFlags::setFlexboxWidthPositiveFlex):
+ (WebCore::InheritedFlags::setFlexboxWidthNegativeFlex):
+ (WebCore::InheritedFlags::setFlexboxHeightPositiveFlex):
+ (WebCore::InheritedFlags::setFlexboxHeightNegativeFlex):
+ (WebCore::InheritedFlags::initialFlexboxWidthPositiveFlex):
+ (WebCore::InheritedFlags::initialFlexboxWidthNegativeFlex):
+ (WebCore::InheritedFlags::initialFlexboxHeightPositiveFlex):
+ (WebCore::InheritedFlags::initialFlexboxHeightNegativeFlex):
+ * rendering/style/StyleAllInOne.cpp:
+ * rendering/style/StyleFlexibleBoxData.cpp: Added.
+ (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
+ (WebCore::StyleFlexibleBoxData::operator==):
+ * rendering/style/StyleFlexibleBoxData.h: Added.
+ (WebCore::StyleFlexibleBoxData::create):
+ (WebCore::StyleFlexibleBoxData::copy):
+ (WebCore::StyleFlexibleBoxData::operator!=):
+ * rendering/style/StyleRareNonInheritedData.cpp:
+ (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
+ (WebCore::StyleRareNonInheritedData::operator==):
+ * rendering/style/StyleRareNonInheritedData.h:
+
2011-07-20 Cary Clark <[email protected]>
update FontSkia to match platform context convention
Modified: trunk/Source/WebCore/GNUmakefile.list.am (91391 => 91392)
--- trunk/Source/WebCore/GNUmakefile.list.am 2011-07-20 20:04:35 UTC (rev 91391)
+++ trunk/Source/WebCore/GNUmakefile.list.am 2011-07-20 20:06:00 UTC (rev 91392)
@@ -3118,6 +3118,8 @@
Source/WebCore/rendering/style/StyleDashboardRegion.h \
Source/WebCore/rendering/style/StyleDeprecatedFlexibleBoxData.cpp \
Source/WebCore/rendering/style/StyleDeprecatedFlexibleBoxData.h \
+ Source/WebCore/rendering/style/StyleFlexibleBoxData.cpp \
+ Source/WebCore/rendering/style/StyleFlexibleBoxData.h \
Source/WebCore/rendering/style/StyleGeneratedImage.cpp \
Source/WebCore/rendering/style/StyleGeneratedImage.h \
Source/WebCore/rendering/style/StyleImage.h \
Modified: trunk/Source/WebCore/WebCore.gypi (91391 => 91392)
--- trunk/Source/WebCore/WebCore.gypi 2011-07-20 20:04:35 UTC (rev 91391)
+++ trunk/Source/WebCore/WebCore.gypi 2011-07-20 20:06:00 UTC (rev 91392)
@@ -1018,6 +1018,7 @@
'rendering/style/StyleCachedImage.h',
'rendering/style/StyleDashboardRegion.h',
'rendering/style/StyleDeprecatedFlexibleBoxData.h',
+ 'rendering/style/StyleFlexibleBoxData.h',
'rendering/style/StyleGeneratedImage.h',
'rendering/style/StyleImage.h',
'rendering/style/StyleInheritedData.h',
@@ -5424,6 +5425,7 @@
'rendering/style/StyleBoxData.cpp',
'rendering/style/StyleCachedImage.cpp',
'rendering/style/StyleDeprecatedFlexibleBoxData.cpp',
+ 'rendering/style/StyleFlexibleBoxData.cpp',
'rendering/style/StyleGeneratedImage.cpp',
'rendering/style/StyleInheritedData.cpp',
'rendering/style/StyleMarqueeData.cpp',
Modified: trunk/Source/WebCore/WebCore.pro (91391 => 91392)
--- trunk/Source/WebCore/WebCore.pro 2011-07-20 20:04:35 UTC (rev 91391)
+++ trunk/Source/WebCore/WebCore.pro 2011-07-20 20:06:00 UTC (rev 91392)
@@ -1181,6 +1181,7 @@
rendering/style/StyleBoxData.cpp \
rendering/style/StyleCachedImage.cpp \
rendering/style/StyleDeprecatedFlexibleBoxData.cpp \
+ rendering/style/StyleFlexibleBoxData.cpp \
rendering/style/StyleGeneratedImage.cpp \
rendering/style/StyleInheritedData.cpp \
rendering/style/StyleMarqueeData.cpp \
@@ -2230,6 +2231,7 @@
rendering/style/StyleBoxData.h \
rendering/style/StyleCachedImage.h \
rendering/style/StyleDeprecatedFlexibleBoxData.h \
+ rendering/style/StyleFlexibleBoxData.h \
rendering/style/StyleGeneratedImage.h \
rendering/style/StyleInheritedData.h \
rendering/style/StyleMarqueeData.h \
Modified: trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj (91391 => 91392)
--- trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj 2011-07-20 20:04:35 UTC (rev 91391)
+++ trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj 2011-07-20 20:06:00 UTC (rev 91392)
@@ -40511,6 +40511,62 @@
>
</File>
<File
+ RelativePath="..\rendering\style\StyleFlexibleBoxData.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Cairo_CFLite|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release_Cairo_CFLite|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_All|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Production|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\rendering\style\StyleFlexibleBoxData.h"
+ >
+ </File>
+ <File
RelativePath="..\rendering\style\StyleGeneratedImage.cpp"
>
<FileConfiguration
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (91391 => 91392)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2011-07-20 20:04:35 UTC (rev 91391)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2011-07-20 20:06:00 UTC (rev 91392)
@@ -1465,6 +1465,8 @@
51FB5505113E3E9100821176 /* JSCloseEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51FB5503113E3E9100821176 /* JSCloseEvent.cpp */; };
521D46F611AEC98100514613 /* KillRingMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 521D46F511AEC98100514613 /* KillRingMac.mm */; };
521D46F811AEC9B100514613 /* KillRing.h in Headers */ = {isa = PBXBuildFile; fileRef = 521D46F711AEC9B100514613 /* KillRing.h */; };
+ 5317612213C516690026E454 /* StyleFlexibleBoxData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5317612013C516690026E454 /* StyleFlexibleBoxData.cpp */; };
+ 5317612313C516690026E454 /* StyleFlexibleBoxData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5317612113C516690026E454 /* StyleFlexibleBoxData.h */; };
5325E4D713A6C88B00404A36 /* CSSFlexValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5325E4D513A6C88B00404A36 /* CSSFlexValue.cpp */; };
5325E4D813A6C88B00404A36 /* CSSFlexValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 5325E4D613A6C88B00404A36 /* CSSFlexValue.h */; };
550A0BC9085F6039007353D6 /* QualifiedName.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 550A0BC7085F6039007353D6 /* QualifiedName.cpp */; };
@@ -8046,6 +8048,8 @@
51FB5503113E3E9100821176 /* JSCloseEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCloseEvent.cpp; sourceTree = "<group>"; };
521D46F511AEC98100514613 /* KillRingMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = KillRingMac.mm; sourceTree = "<group>"; };
521D46F711AEC9B100514613 /* KillRing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KillRing.h; sourceTree = "<group>"; };
+ 5317612013C516690026E454 /* StyleFlexibleBoxData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StyleFlexibleBoxData.cpp; path = style/StyleFlexibleBoxData.cpp; sourceTree = "<group>"; };
+ 5317612113C516690026E454 /* StyleFlexibleBoxData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StyleFlexibleBoxData.h; path = style/StyleFlexibleBoxData.h; sourceTree = "<group>"; };
5325E4D513A6C88B00404A36 /* CSSFlexValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSFlexValue.cpp; sourceTree = "<group>"; };
5325E4D613A6C88B00404A36 /* CSSFlexValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSFlexValue.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; };
@@ -18681,6 +18685,8 @@
BC5EB67E0E81D4A700B25965 /* StyleDashboardRegion.h */,
BC5EB8B60E8201BD00B25965 /* StyleDeprecatedFlexibleBoxData.cpp */,
BC5EB8B70E8201BD00B25965 /* StyleDeprecatedFlexibleBoxData.h */,
+ 5317612013C516690026E454 /* StyleFlexibleBoxData.cpp */,
+ 5317612113C516690026E454 /* StyleFlexibleBoxData.h */,
BCEF447C0E674806001C1287 /* StyleGeneratedImage.cpp */,
BCEF44490E6745E0001C1287 /* StyleGeneratedImage.h */,
BCEF43CE0E673DA1001C1287 /* StyleImage.h */,
@@ -22731,6 +22737,7 @@
A8C4A7FD09D563270003AC8D /* StyledElement.h in Headers */,
BC5EB8B90E8201BD00B25965 /* StyleDeprecatedFlexibleBoxData.h in Headers */,
AA4C3A770B2B1679002334A2 /* StyleElement.h in Headers */,
+ 5317612313C516690026E454 /* StyleFlexibleBoxData.h in Headers */,
BCEF444A0E6745E0001C1287 /* StyleGeneratedImage.h in Headers */,
BCEF43CF0E673DA1001C1287 /* StyleImage.h in Headers */,
BC2273040E82F1E600E7F975 /* StyleInheritedData.h in Headers */,
@@ -25621,6 +25628,7 @@
A8C4A7FE09D563270003AC8D /* StyledElement.cpp in Sources */,
BC5EB8B80E8201BD00B25965 /* StyleDeprecatedFlexibleBoxData.cpp in Sources */,
AA4C3A760B2B1679002334A2 /* StyleElement.cpp in Sources */,
+ 5317612213C516690026E454 /* StyleFlexibleBoxData.cpp in Sources */,
BCEF447D0E674806001C1287 /* StyleGeneratedImage.cpp in Sources */,
BC2273030E82F1E600E7F975 /* StyleInheritedData.cpp in Sources */,
A80E734D0A199C77007FB8C5 /* StyleList.cpp in Sources */,
Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (91391 => 91392)
--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp 2011-07-20 20:04:35 UTC (rev 91391)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp 2011-07-20 20:06:00 UTC (rev 91392)
@@ -119,6 +119,9 @@
surround.init();
rareNonInheritedData.init();
rareNonInheritedData.access()->m_deprecatedFlexibleBox.init();
+#if ENABLE(CSS3_FLEXBOX)
+ rareNonInheritedData.access()->m_flexibleBox.init();
+#endif
rareNonInheritedData.access()->m_marquee.init();
rareNonInheritedData.access()->m_multiCol.init();
rareNonInheritedData.access()->m_transform.init();
@@ -356,6 +359,12 @@
&& *rareNonInheritedData->m_deprecatedFlexibleBox.get() != *other->rareNonInheritedData->m_deprecatedFlexibleBox.get())
return StyleDifferenceLayout;
+#if ENABLE(CSS3_FLEXBOX)
+ if (rareNonInheritedData->m_flexibleBox.get() != other->rareNonInheritedData->m_flexibleBox.get()
+ && *rareNonInheritedData->m_flexibleBox.get() != *other->rareNonInheritedData->m_flexibleBox.get())
+ return StyleDifferenceLayout;
+#endif
+
// FIXME: We should add an optimized form of layout that just recomputes visual overflow.
if (!rareNonInheritedData->shadowDataEquivalent(*other->rareNonInheritedData.get()))
return StyleDifferenceLayout;
Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (91391 => 91392)
--- trunk/Source/WebCore/rendering/style/RenderStyle.h 2011-07-20 20:04:35 UTC (rev 91391)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h 2011-07-20 20:06:00 UTC (rev 91392)
@@ -49,6 +49,7 @@
#include "StyleBackgroundData.h"
#include "StyleBoxData.h"
#include "StyleDeprecatedFlexibleBoxData.h"
+#include "StyleFlexibleBoxData.h"
#include "StyleInheritedData.h"
#include "StyleMarqueeData.h"
#include "StyleMultiColData.h"
@@ -670,6 +671,13 @@
EBoxOrient boxOrient() const { return static_cast<EBoxOrient>(rareNonInheritedData->m_deprecatedFlexibleBox->orient); }
EBoxAlignment boxPack() const { return static_cast<EBoxAlignment>(rareNonInheritedData->m_deprecatedFlexibleBox->pack); }
+#if ENABLE(CSS3_FLEXBOX)
+ float flexboxWidthPositiveFlex() const { return rareNonInheritedData->m_flexibleBox->m_widthPositiveFlex; }
+ float flexboxWidthNegativeFlex() const { return rareNonInheritedData->m_flexibleBox->m_widthNegativeFlex; }
+ float flexboxHeightPositiveFlex() const { return rareNonInheritedData->m_flexibleBox->m_heightPositiveFlex; }
+ float flexboxHeightNegativeFlex() const { return rareNonInheritedData->m_flexibleBox->m_heightNegativeFlex; }
+#endif
+
const ShadowData* boxShadow() const { return rareNonInheritedData->m_boxShadow.get(); }
void getBoxShadowExtent(LayoutUnit& top, LayoutUnit& right, LayoutUnit& bottom, LayoutUnit& left) const { getShadowExtent(boxShadow(), top, right, bottom, left); }
void getBoxShadowHorizontalExtent(LayoutUnit& left, LayoutUnit& right) const { getShadowHorizontalExtent(boxShadow(), left, right); }
@@ -1045,6 +1053,12 @@
void setBoxShadow(PassOwnPtr<ShadowData>, bool add = false);
void setBoxReflect(PassRefPtr<StyleReflection> reflect) { if (rareNonInheritedData->m_boxReflect != reflect) rareNonInheritedData.access()->m_boxReflect = reflect; }
void setBoxSizing(EBoxSizing s) { SET_VAR(m_box, m_boxSizing, s); }
+#if ENABLE(CSS3_FLEXBOX)
+ void setFlexboxWidthPositiveFlex(float f) { SET_VAR(rareNonInheritedData.access()->m_flexibleBox, m_widthPositiveFlex, f); }
+ void setFlexboxWidthNegativeFlex(float f) { SET_VAR(rareNonInheritedData.access()->m_flexibleBox, m_widthNegativeFlex, f); }
+ void setFlexboxHeightPositiveFlex(float f) { SET_VAR(rareNonInheritedData.access()->m_flexibleBox, m_heightPositiveFlex, f); }
+ void setFlexboxHeightNegativeFlex(float f) { SET_VAR(rareNonInheritedData.access()->m_flexibleBox, m_heightNegativeFlex, f); }
+#endif
void setMarqueeIncrement(const Length& f) { SET_VAR(rareNonInheritedData.access()->m_marquee, increment, f); }
void setMarqueeSpeed(int f) { SET_VAR(rareNonInheritedData.access()->m_marquee, speed, f); }
void setMarqueeDirection(EMarqueeDirection d) { SET_VAR(rareNonInheritedData.access()->m_marquee, direction, d); }
@@ -1295,6 +1309,10 @@
static int initialBoxOrdinalGroup() { return 1; }
static EBoxSizing initialBoxSizing() { return CONTENT_BOX; }
static StyleReflection* initialBoxReflect() { return 0; }
+ static float initialFlexboxWidthPositiveFlex() { return 0; }
+ static float initialFlexboxWidthNegativeFlex() { return 0; }
+ static float initialFlexboxHeightPositiveFlex() { return 0; }
+ static float initialFlexboxHeightNegativeFlex() { return 0; }
static int initialMarqueeLoopCount() { return -1; }
static int initialMarqueeSpeed() { return 85; }
static Length initialMarqueeIncrement() { return Length(6, Fixed); }
Modified: trunk/Source/WebCore/rendering/style/StyleAllInOne.cpp (91391 => 91392)
--- trunk/Source/WebCore/rendering/style/StyleAllInOne.cpp 2011-07-20 20:04:35 UTC (rev 91391)
+++ trunk/Source/WebCore/rendering/style/StyleAllInOne.cpp 2011-07-20 20:06:00 UTC (rev 91392)
@@ -39,6 +39,7 @@
#include "StyleBoxData.cpp"
#include "StyleCachedImage.cpp"
#include "StyleDeprecatedFlexibleBoxData.cpp"
+#include "StyleFlexibleBoxData.cpp"
#include "StyleGeneratedImage.cpp"
#include "StyleInheritedData.cpp"
#include "StyleMarqueeData.cpp"
Added: trunk/Source/WebCore/rendering/style/StyleFlexibleBoxData.cpp (0 => 91392)
--- trunk/Source/WebCore/rendering/style/StyleFlexibleBoxData.cpp (rev 0)
+++ trunk/Source/WebCore/rendering/style/StyleFlexibleBoxData.cpp 2011-07-20 20:06:00 UTC (rev 91392)
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2011 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:
+ * 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 "StyleFlexibleBoxData.h"
+
+#include "RenderStyle.h"
+
+#if ENABLE(CSS3_FLEXBOX)
+
+namespace WebCore {
+
+StyleFlexibleBoxData::StyleFlexibleBoxData()
+ : m_widthPositiveFlex(RenderStyle::initialFlexboxWidthPositiveFlex())
+ , m_widthNegativeFlex(RenderStyle::initialFlexboxWidthNegativeFlex())
+ , m_heightPositiveFlex(RenderStyle::initialFlexboxHeightPositiveFlex())
+ , m_heightNegativeFlex(RenderStyle::initialFlexboxHeightNegativeFlex())
+{
+}
+
+StyleFlexibleBoxData::StyleFlexibleBoxData(const StyleFlexibleBoxData& o)
+ : RefCounted<StyleFlexibleBoxData>()
+ , m_widthPositiveFlex(o.m_widthPositiveFlex)
+ , m_widthNegativeFlex(o.m_widthNegativeFlex)
+ , m_heightPositiveFlex(o.m_heightPositiveFlex)
+ , m_heightNegativeFlex(o.m_heightNegativeFlex)
+{
+}
+
+bool StyleFlexibleBoxData::operator==(const StyleFlexibleBoxData& o) const
+{
+ return m_widthPositiveFlex == o.m_widthPositiveFlex && m_widthNegativeFlex == o.m_widthNegativeFlex
+ && m_heightPositiveFlex == o.m_heightPositiveFlex && m_heightNegativeFlex == o.m_heightNegativeFlex;
+}
+
+}
+
+#endif // ENABLE(CSS3_FLEXBOX)
Added: trunk/Source/WebCore/rendering/style/StyleFlexibleBoxData.h (0 => 91392)
--- trunk/Source/WebCore/rendering/style/StyleFlexibleBoxData.h (rev 0)
+++ trunk/Source/WebCore/rendering/style/StyleFlexibleBoxData.h 2011-07-20 20:06:00 UTC (rev 91392)
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2011 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:
+ * 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 StyleFlexibleBoxData_h
+#define StyleFlexibleBoxData_h
+
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+
+#if ENABLE(CSS3_FLEXBOX)
+
+namespace WebCore {
+
+class StyleFlexibleBoxData : public RefCounted<StyleFlexibleBoxData> {
+public:
+ static PassRefPtr<StyleFlexibleBoxData> create() { return adoptRef(new StyleFlexibleBoxData); }
+ PassRefPtr<StyleFlexibleBoxData> copy() const { return adoptRef(new StyleFlexibleBoxData(*this)); }
+
+ bool operator==(const StyleFlexibleBoxData&) const;
+ bool operator!=(const StyleFlexibleBoxData& o) const
+ {
+ return !(*this == o);
+ }
+
+ float m_widthPositiveFlex;
+ float m_widthNegativeFlex;
+ float m_heightPositiveFlex;
+ float m_heightNegativeFlex;
+
+private:
+ StyleFlexibleBoxData();
+ StyleFlexibleBoxData(const StyleFlexibleBoxData&);
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(CSS3_FLEXBOX)
+
+#endif // StyleFlexibleBoxData_h
Modified: trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp (91391 => 91392)
--- trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp 2011-07-20 20:04:35 UTC (rev 91391)
+++ trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp 2011-07-20 20:06:00 UTC (rev 91392)
@@ -72,6 +72,9 @@
, lineClamp(o.lineClamp)
, opacity(o.opacity)
, m_deprecatedFlexibleBox(o.m_deprecatedFlexibleBox)
+#if ENABLE(CSS3_FLEXBOX)
+ , m_flexibleBox(o.m_flexibleBox)
+#endif
, m_marquee(o.m_marquee)
, m_multiCol(o.m_multiCol)
, m_transform(o.m_transform)
@@ -127,6 +130,9 @@
#endif
&& opacity == o.opacity
&& m_deprecatedFlexibleBox == o.m_deprecatedFlexibleBox
+#if ENABLE(CSS3_FLEXBOX)
+ && m_flexibleBox == o.m_flexibleBox
+#endif
&& m_marquee == o.m_marquee
&& m_multiCol == o.m_multiCol
&& m_transform == o.m_transform
Modified: trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h (91391 => 91392)
--- trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h 2011-07-20 20:04:35 UTC (rev 91391)
+++ trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h 2011-07-20 20:06:00 UTC (rev 91392)
@@ -43,6 +43,7 @@
class CSSStyleSelector;
class ShadowData;
class StyleDeprecatedFlexibleBoxData;
+class StyleFlexibleBoxData;
class StyleMarqueeData;
class StyleMultiColData;
class StyleReflection;
@@ -91,6 +92,9 @@
float opacity; // Whether or not we're transparent.
DataRef<StyleDeprecatedFlexibleBoxData> m_deprecatedFlexibleBox; // Flexible box properties
+#if ENABLE(CSS3_FLEXBOX)
+ DataRef<StyleFlexibleBoxData> m_flexibleBox;
+#endif
DataRef<StyleMarqueeData> m_marquee; // Marquee properties
DataRef<StyleMultiColData> m_multiCol; // CSS3 multicol properties
DataRef<StyleTransformData> m_transform; // Transform properties (rotate, scale, skew, etc.)