Diff
Modified: trunk/Source/WebCore/ChangeLog (102998 => 102999)
--- trunk/Source/WebCore/ChangeLog 2011-12-16 00:41:00 UTC (rev 102998)
+++ trunk/Source/WebCore/ChangeLog 2011-12-16 00:44:56 UTC (rev 102999)
@@ -1,3 +1,31 @@
+2011-12-15 Kenneth Russell <[email protected]>
+
+ Unreviewed, rolling out r102989.
+ http://trac.webkit.org/changeset/102989
+ https://bugs.webkit.org/show_bug.cgi?id=74580
+
+ Caused SHOULD NOT BE REACHED assertions in debug builds.
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+ (WebCore::CSSPrimitiveValue::operator EBoxAlignment):
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applyProperty):
+ * rendering/RenderDeprecatedFlexibleBox.cpp:
+ (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
+ (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
+ * rendering/RenderFullScreen.cpp:
+ (createFullScreenStyle):
+ * rendering/style/RenderStyle.h:
+ (WebCore::InheritedFlags::boxPack):
+ (WebCore::InheritedFlags::setBoxAlign):
+ (WebCore::InheritedFlags::setBoxPack):
+ (WebCore::InheritedFlags::initialBoxPack):
+ * rendering/style/RenderStyleConstants.h:
+ * rendering/style/StyleDeprecatedFlexibleBoxData.h:
+
2011-12-15 Ryosuke Niwa <[email protected]>
Touch make_name.pl in an attempt to make Qt bots happy.
Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (102998 => 102999)
--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2011-12-16 00:41:00 UTC (rev 102998)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2011-12-16 00:44:56 UTC (rev 102999)
@@ -1401,8 +1401,14 @@
return cssValuePool->createValue(style->boxOrdinalGroup(), CSSPrimitiveValue::CSS_NUMBER);
case CSSPropertyWebkitBoxOrient:
return cssValuePool->createValue(style->boxOrient());
- case CSSPropertyWebkitBoxPack:
- return cssValuePool->createValue(style->boxPack());
+ case CSSPropertyWebkitBoxPack: {
+ EBoxAlignment boxPack = style->boxPack();
+ ASSERT(boxPack != BSTRETCH);
+ ASSERT(boxPack != BBASELINE);
+ if (boxPack == BJUSTIFY || boxPack== BBASELINE)
+ return 0;
+ return cssValuePool->createValue(boxPack);
+ }
case CSSPropertyWebkitBoxReflect:
return valueForReflection(style->boxReflect(), style.get(), cssValuePool);
case CSSPropertyBoxShadow:
Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (102998 => 102999)
--- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h 2011-12-16 00:41:00 UTC (rev 102998)
+++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h 2011-12-16 00:44:56 UTC (rev 102999)
@@ -649,43 +649,6 @@
}
}
-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBoxPack e)
- : CSSValue(PrimitiveClass)
-{
- m_primitiveUnitType = CSS_IDENT;
- switch (e) {
- case Start:
- m_value.ident = CSSValueStart;
- break;
- case Center:
- m_value.ident = CSSValueCenter;
- break;
- case End:
- m_value.ident = CSSValueEnd;
- break;
- case Justify:
- m_value.ident = CSSValueJustify;
- break;
- }
-}
-
-template<> inline CSSPrimitiveValue::operator EBoxPack() const
-{
- switch (m_value.ident) {
- case CSSValueStart:
- return Start;
- case CSSValueEnd:
- return End;
- case CSSValueCenter:
- return Center;
- case CSSValueJustify:
- return Justify;
- default:
- ASSERT_NOT_REACHED();
- return Justify;
- }
-}
-
template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBoxAlignment e)
: CSSValue(PrimitiveClass)
{
@@ -706,6 +669,9 @@
case BBASELINE:
m_value.ident = CSSValueBaseline;
break;
+ case BJUSTIFY:
+ m_value.ident = CSSValueJustify;
+ break;
}
}
@@ -722,6 +688,8 @@
return BCENTER;
case CSSValueBaseline:
return BBASELINE;
+ case CSSValueJustify:
+ return BJUSTIFY;
default:
ASSERT_NOT_REACHED();
return BSTRETCH;
Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (102998 => 102999)
--- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2011-12-16 00:41:00 UTC (rev 102998)
+++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2011-12-16 00:44:56 UTC (rev 102999)
@@ -3241,7 +3241,15 @@
HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(boxOrient, BoxOrient)
return;
case CSSPropertyWebkitBoxPack:
- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(boxPack, BoxPack)
+ {
+ HANDLE_INHERIT_AND_INITIAL(boxPack, BoxPack)
+ if (!primitiveValue)
+ return;
+ EBoxAlignment boxPack = *primitiveValue;
+ if (boxPack != BSTRETCH && boxPack != BBASELINE)
+ m_style->setBoxPack(boxPack);
+ return;
+ }
case CSSPropertyWebkitBoxFlex:
HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(boxFlex, BoxFlex)
return;
Modified: trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp (102998 => 102999)
--- trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp 2011-12-16 00:41:00 UTC (rev 102998)
+++ trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp 2011-12-16 00:44:56 UTC (rev 102999)
@@ -567,11 +567,11 @@
RenderBlock::finishDelayUpdateScrollInfo();
- if (remainingSpace > 0 && ((style()->isLeftToRightDirection() && style()->boxPack() != Start)
- || (!style()->isLeftToRightDirection() && style()->boxPack() != End))) {
+ if (remainingSpace > 0 && ((style()->isLeftToRightDirection() && style()->boxPack() != BSTART)
+ || (!style()->isLeftToRightDirection() && style()->boxPack() != BEND))) {
// Children must be repositioned.
LayoutUnit offset = 0;
- if (style()->boxPack() == Justify) {
+ if (style()->boxPack() == BJUSTIFY) {
// Determine the total number of children.
int totalChildren = 0;
for (RenderBox* child = iterator.first(); child; child = iterator.next()) {
@@ -602,7 +602,7 @@
}
}
} else {
- if (style()->boxPack() == Center)
+ if (style()->boxPack() == BCENTER)
offset += remainingSpace / 2;
else // END for LTR, START for RTL
offset += remainingSpace;
@@ -816,10 +816,10 @@
RenderBlock::finishDelayUpdateScrollInfo();
- if (style()->boxPack() != Start && remainingSpace > 0) {
+ if (style()->boxPack() != BSTART && remainingSpace > 0) {
// Children must be repositioned.
LayoutUnit offset = 0;
- if (style()->boxPack() == Justify) {
+ if (style()->boxPack() == BJUSTIFY) {
// Determine the total number of children.
int totalChildren = 0;
for (RenderBox* child = iterator.first(); child; child = iterator.next()) {
@@ -850,7 +850,7 @@
}
}
} else {
- if (style()->boxPack() == Center)
+ if (style()->boxPack() == BCENTER)
offset += remainingSpace / 2;
else // END
offset += remainingSpace;
Modified: trunk/Source/WebCore/rendering/RenderFullScreen.cpp (102998 => 102999)
--- trunk/Source/WebCore/rendering/RenderFullScreen.cpp 2011-12-16 00:41:00 UTC (rev 102998)
+++ trunk/Source/WebCore/rendering/RenderFullScreen.cpp 2011-12-16 00:44:56 UTC (rev 102999)
@@ -90,7 +90,7 @@
fullscreenStyle->font().update(0);
fullscreenStyle->setDisplay(BOX);
- fullscreenStyle->setBoxPack(Center);
+ fullscreenStyle->setBoxPack(BCENTER);
fullscreenStyle->setBoxAlign(BCENTER);
fullscreenStyle->setBoxOrient(VERTICAL);
Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (102998 => 102999)
--- trunk/Source/WebCore/rendering/style/RenderStyle.h 2011-12-16 00:41:00 UTC (rev 102998)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h 2011-12-16 00:44:56 UTC (rev 102999)
@@ -716,7 +716,7 @@
EBoxLines boxLines() { return static_cast<EBoxLines>(rareNonInheritedData->m_deprecatedFlexibleBox->lines); }
unsigned int boxOrdinalGroup() const { return rareNonInheritedData->m_deprecatedFlexibleBox->ordinal_group; }
EBoxOrient boxOrient() const { return static_cast<EBoxOrient>(rareNonInheritedData->m_deprecatedFlexibleBox->orient); }
- EBoxPack boxPack() const { return static_cast<EBoxPack>(rareNonInheritedData->m_deprecatedFlexibleBox->pack); }
+ EBoxAlignment boxPack() const { return static_cast<EBoxAlignment>(rareNonInheritedData->m_deprecatedFlexibleBox->pack); }
float flexboxWidthPositiveFlex() const { return rareNonInheritedData->m_flexibleBox->m_widthPositiveFlex; }
float flexboxWidthNegativeFlex() const { return rareNonInheritedData->m_flexibleBox->m_widthNegativeFlex; }
@@ -1129,14 +1129,14 @@
void setOpacity(float f) { SET_VAR(rareNonInheritedData, opacity, f); }
void setAppearance(ControlPart a) { SET_VAR(rareNonInheritedData, m_appearance, a); }
// For valid values of box-align see http://www.w3.org/TR/2009/WD-css3-flexbox-20090723/#alignment
- void setBoxAlign(EBoxAlignment a) { SET_VAR(rareNonInheritedData.access()->m_deprecatedFlexibleBox, align, a); }
+ void setBoxAlign(EBoxAlignment a) { ASSERT(a == BSTRETCH || a == BSTART || a == BCENTER || a == BEND || a == BBASELINE); SET_VAR(rareNonInheritedData.access()->m_deprecatedFlexibleBox, align, a); }
void setBoxDirection(EBoxDirection d) { inherited_flags._box_direction = d; }
void setBoxFlex(float f) { SET_VAR(rareNonInheritedData.access()->m_deprecatedFlexibleBox, flex, f); }
void setBoxFlexGroup(unsigned int fg) { SET_VAR(rareNonInheritedData.access()->m_deprecatedFlexibleBox, flex_group, fg); }
void setBoxLines(EBoxLines l) { SET_VAR(rareNonInheritedData.access()->m_deprecatedFlexibleBox, lines, l); }
void setBoxOrdinalGroup(unsigned int og) { SET_VAR(rareNonInheritedData.access()->m_deprecatedFlexibleBox, ordinal_group, og); }
void setBoxOrient(EBoxOrient o) { SET_VAR(rareNonInheritedData.access()->m_deprecatedFlexibleBox, orient, o); }
- void setBoxPack(EBoxPack p) { SET_VAR(rareNonInheritedData.access()->m_deprecatedFlexibleBox, pack, p); }
+ void setBoxPack(EBoxAlignment p) { SET_VAR(rareNonInheritedData.access()->m_deprecatedFlexibleBox, pack, p); }
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); }
@@ -1458,7 +1458,7 @@
static EBoxDirection initialBoxDirection() { return BNORMAL; }
static EBoxLines initialBoxLines() { return SINGLE; }
static EBoxOrient initialBoxOrient() { return HORIZONTAL; }
- static EBoxPack initialBoxPack() { return Start; }
+ static EBoxAlignment initialBoxPack() { return BSTART; }
static float initialBoxFlex() { return 0.0f; }
static int initialBoxFlexGroup() { return 1; }
static int initialBoxOrdinalGroup() { return 1; }
Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.h (102998 => 102999)
--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.h 2011-12-16 00:41:00 UTC (rev 102998)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.h 2011-12-16 00:44:56 UTC (rev 102999)
@@ -168,8 +168,7 @@
// Deprecated Flexible Box Properties
-enum EBoxPack { Start, Center, End, Justify };
-enum EBoxAlignment { BSTRETCH, BSTART, BCENTER, BEND, BBASELINE };
+enum EBoxAlignment { BSTRETCH, BSTART, BCENTER, BEND, BJUSTIFY, BBASELINE };
enum EBoxOrient { HORIZONTAL, VERTICAL };
enum EBoxLines { SINGLE, MULTIPLE };
enum EBoxDirection { BNORMAL, BREVERSE };
Modified: trunk/Source/WebCore/rendering/style/StyleDeprecatedFlexibleBoxData.h (102998 => 102999)
--- trunk/Source/WebCore/rendering/style/StyleDeprecatedFlexibleBoxData.h 2011-12-16 00:41:00 UTC (rev 102998)
+++ trunk/Source/WebCore/rendering/style/StyleDeprecatedFlexibleBoxData.h 2011-12-16 00:44:56 UTC (rev 102999)
@@ -46,7 +46,7 @@
unsigned int ordinal_group;
unsigned align : 3; // EBoxAlignment
- unsigned pack: 2; // EBoxPack
+ unsigned pack: 3; // EBoxAlignment
unsigned orient: 1; // EBoxOrient
unsigned lines : 1; // EBoxLines