Diff
Modified: branches/safari-534.53-branch/LayoutTests/ChangeLog (102172 => 102173)
--- branches/safari-534.53-branch/LayoutTests/ChangeLog 2011-12-06 21:12:15 UTC (rev 102172)
+++ branches/safari-534.53-branch/LayoutTests/ChangeLog 2011-12-06 21:19:55 UTC (rev 102173)
@@ -1,5 +1,33 @@
2011-12-06 Lucas Forschler <lforsch...@apple.com>
+ Merge 95096
+
+ 2011-09-13 David Hyatt <hy...@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=68050
+
+ Regressions in some layout tests from making border/mask/reflection nine-piece-image
+ parsing match the spec, which allows any of the pieces to be omitted and to also be
+ specifiable in any order.
+
+ When the higher level code suddenly allowed the image slices to be omitted, the fixup
+ for legacy compatibility for reflections and masks in the parseBorderImageSlice function
+ no longer happened because that function no longer got called.
+
+ The fix is to properly set the defaults to include the "fill" keyword, so the fixup is
+ applied to the NinePieceImages you create before you ever map anything in from the rules.
+
+ This also has the side effect of fixing -webkit-max-box-image-slice to actually dump as
+ "0 fill" instead of just "0", which is the correct initial value for this property.
+
+ Reviewed by Adam Roben.
+
+ * fast/css/getComputedStyle/computed-style-expected.txt:
+ * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
+ * svg/css/getComputedStyle-basic-expected.txt:
+
+2011-12-06 Lucas Forschler <lforsch...@apple.com>
+
Merge 95058
2011-09-13 David Hyatt <hy...@apple.com>
Modified: branches/safari-534.53-branch/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt (102172 => 102173)
--- branches/safari-534.53-branch/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt 2011-12-06 21:12:15 UTC (rev 102172)
+++ branches/safari-534.53-branch/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt 2011-12-06 21:19:55 UTC (rev 102173)
@@ -160,7 +160,7 @@
-webkit-mask-box-image: none;
-webkit-mask-box-image-outset: 0px;
-webkit-mask-box-image-repeat: stretch;
--webkit-mask-box-image-slice: 0;
+-webkit-mask-box-image-slice: 0 fill;
-webkit-mask-box-image-source: none;
-webkit-mask-box-image-width: auto;
-webkit-mask-clip: border-box;
Modified: branches/safari-534.53-branch/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt (102172 => 102173)
--- branches/safari-534.53-branch/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt 2011-12-06 21:12:15 UTC (rev 102172)
+++ branches/safari-534.53-branch/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt 2011-12-06 21:19:55 UTC (rev 102173)
@@ -153,7 +153,7 @@
-webkit-mask-box-image: none
-webkit-mask-box-image-outset: 0px
-webkit-mask-box-image-repeat: stretch
- -webkit-mask-box-image-slice: 0
+ -webkit-mask-box-image-slice: 0 fill
-webkit-mask-box-image-source: none
-webkit-mask-box-image-width: auto
-webkit-mask-clip: border-box
Modified: branches/safari-534.53-branch/LayoutTests/svg/css/getComputedStyle-basic-expected.txt (102172 => 102173)
--- branches/safari-534.53-branch/LayoutTests/svg/css/getComputedStyle-basic-expected.txt 2011-12-06 21:12:15 UTC (rev 102172)
+++ branches/safari-534.53-branch/LayoutTests/svg/css/getComputedStyle-basic-expected.txt 2011-12-06 21:19:55 UTC (rev 102173)
@@ -318,7 +318,7 @@
rect: style.getPropertyCSSValue(-webkit-mask-box-image-outset) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-mask-box-image-repeat) : stretch
rect: style.getPropertyCSSValue(-webkit-mask-box-image-repeat) : [object CSSPrimitiveValue]
-rect: style.getPropertyValue(-webkit-mask-box-image-slice) : 0
+rect: style.getPropertyValue(-webkit-mask-box-image-slice) : 0 fill
rect: style.getPropertyCSSValue(-webkit-mask-box-image-slice) : [object CSSValue]
rect: style.getPropertyValue(-webkit-mask-box-image-source) : none
rect: style.getPropertyCSSValue(-webkit-mask-box-image-source) : [object CSSPrimitiveValue]
@@ -784,7 +784,7 @@
g: style.getPropertyCSSValue(-webkit-mask-box-image-outset) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-mask-box-image-repeat) : stretch
g: style.getPropertyCSSValue(-webkit-mask-box-image-repeat) : [object CSSPrimitiveValue]
-g: style.getPropertyValue(-webkit-mask-box-image-slice) : 0
+g: style.getPropertyValue(-webkit-mask-box-image-slice) : 0 fill
g: style.getPropertyCSSValue(-webkit-mask-box-image-slice) : [object CSSValue]
g: style.getPropertyValue(-webkit-mask-box-image-source) : none
g: style.getPropertyCSSValue(-webkit-mask-box-image-source) : [object CSSPrimitiveValue]
Modified: branches/safari-534.53-branch/Source/WebCore/ChangeLog (102172 => 102173)
--- branches/safari-534.53-branch/Source/WebCore/ChangeLog 2011-12-06 21:12:15 UTC (rev 102172)
+++ branches/safari-534.53-branch/Source/WebCore/ChangeLog 2011-12-06 21:19:55 UTC (rev 102173)
@@ -1,5 +1,38 @@
2011-12-06 Lucas Forschler <lforsch...@apple.com>
+ Merge 95096
+
+ 2011-09-13 David Hyatt <hy...@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=68050
+
+ Regressions in some layout tests from making border/mask/reflection nine-piece-image
+ parsing match the spec, which allows any of the pieces to be omitted and to also be
+ specifiable in any order.
+
+ When the higher level code suddenly allowed the image slices to be omitted, the fixup
+ for legacy compatibility for reflections and masks in the parseBorderImageSlice function
+ no longer happened because that function no longer got called.
+
+ The fix is to properly set the defaults to include the "fill" keyword, so the fixup is
+ applied to the NinePieceImages you create before you ever map anything in from the rules.
+
+ This also has the side effect of fixing -webkit-max-box-image-slice to actually dump as
+ "0 fill" instead of just "0", which is the correct initial value for this property.
+
+ Reviewed by Adam Roben.
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseBorderImageSlice):
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applyProperty):
+ * rendering/style/StyleRareNonInheritedData.cpp:
+ (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
+ * rendering/style/StyleReflection.h:
+ (WebCore::StyleReflection::StyleReflection):
+
+2011-12-06 Lucas Forschler <lforsch...@apple.com>
+
Merge 95058
2011-09-13 David Hyatt <hy...@apple.com>
Modified: branches/safari-534.53-branch/Source/WebCore/css/CSSParser.cpp (102172 => 102173)
--- branches/safari-534.53-branch/Source/WebCore/css/CSSParser.cpp 2011-12-06 21:12:15 UTC (rev 102172)
+++ branches/safari-534.53-branch/Source/WebCore/css/CSSParser.cpp 2011-12-06 21:19:55 UTC (rev 102173)
@@ -5101,12 +5101,6 @@
m_valueList->next();
}
- if (context.allowNumber() && !context.top() && (propId == CSSPropertyWebkitMaskBoxImage || propId == CSSPropertyWebkitBoxReflect)) {
- // Allow the slices to be omitted for images that don't fit to a border. We just set the slices to be 0.
- context.setTop(primitiveValueCache()->createValue(0, CSSPrimitiveValue::CSS_NUMBER));
- context.setAllowFinalCommit();
- }
-
if (context.allowFinalCommit()) {
// FIXME: For backwards compatibility, -webkit-border-image, -webkit-mask-box-image and -webkit-box-reflect have to do a fill by default.
// FIXME: What do we do with -webkit-box-reflect and -webkit-mask-box-image? Probably just have to leave them filling...
Modified: branches/safari-534.53-branch/Source/WebCore/css/CSSStyleSelector.cpp (102172 => 102173)
--- branches/safari-534.53-branch/Source/WebCore/css/CSSStyleSelector.cpp 2011-12-06 21:12:15 UTC (rev 102172)
+++ branches/safari-534.53-branch/Source/WebCore/css/CSSStyleSelector.cpp 2011-12-06 21:19:55 UTC (rev 102173)
@@ -4558,10 +4558,8 @@
}
NinePieceImage image;
- if (property == CSSPropertyWebkitMaskBoxImage) {
- image.setImageSlices(LengthBox(0)); // For backwards compatibility, just make the mask box image slices 0 instead of 100%.
- image.setBorderSlices(LengthBox()); // The slices default to auto.
- }
+ if (property == CSSPropertyWebkitMaskBoxImage)
+ image.setMaskDefaults();
mapNinePieceImage(property, value, image);
if (id == CSSPropertyWebkitBorderImage)
@@ -4802,8 +4800,7 @@
reflection->setOffset(Length(reflectValue->offset()->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed));
}
NinePieceImage mask;
- mask.setImageSlices(LengthBox(0)); // For backwards compatibility, just make the mask box image slices 0 instead of 100%.
- mask.setBorderSlices(LengthBox()); // The slices default to auto.
+ mask.setMaskDefaults();
mapNinePieceImage(property, reflectValue->mask(), mask);
reflection->setMask(mask);
Modified: branches/safari-534.53-branch/Source/WebCore/rendering/style/NinePieceImage.h (102172 => 102173)
--- branches/safari-534.53-branch/Source/WebCore/rendering/style/NinePieceImage.h 2011-12-06 21:12:15 UTC (rev 102172)
+++ branches/safari-534.53-branch/Source/WebCore/rendering/style/NinePieceImage.h 2011-12-06 21:19:55 UTC (rev 102173)
@@ -111,6 +111,13 @@
m_verticalRule = other.m_verticalRule;
}
+ void setMaskDefaults()
+ {
+ m_imageSlices = LengthBox(0);
+ m_fill = true;
+ m_borderSlices = LengthBox();
+ }
+
private:
RefPtr<StyleImage> m_image;
LengthBox m_imageSlices;
Modified: branches/safari-534.53-branch/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp (102172 => 102173)
--- branches/safari-534.53-branch/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp 2011-12-06 21:12:15 UTC (rev 102172)
+++ branches/safari-534.53-branch/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp 2011-12-06 21:19:55 UTC (rev 102173)
@@ -56,8 +56,7 @@
, m_pageSize()
, m_pageSizeType(PAGE_SIZE_AUTO)
{
- m_maskBoxImage.setImageSlices(LengthBox(0)); // Preserve the value of 0 for mask box image slices for backwards compatibility.
- m_maskBoxImage.setBorderSlices(LengthBox()); // The border slices for a mask box image default to auto instead of 1.
+ m_maskBoxImage.setMaskDefaults();
}
StyleRareNonInheritedData::StyleRareNonInheritedData(const StyleRareNonInheritedData& o)
Modified: branches/safari-534.53-branch/Source/WebCore/rendering/style/StyleReflection.h (102172 => 102173)
--- branches/safari-534.53-branch/Source/WebCore/rendering/style/StyleReflection.h 2011-12-06 21:12:15 UTC (rev 102172)
+++ branches/safari-534.53-branch/Source/WebCore/rendering/style/StyleReflection.h 2011-12-06 21:19:55 UTC (rev 102173)
@@ -58,8 +58,7 @@
: m_direction(ReflectionBelow)
, m_offset(0, Fixed)
{
- m_mask.setImageSlices(LengthBox(0)); // Preserve the value of 0 for mask image slices for backwards compatibility.
- m_mask.setBorderSlices(LengthBox()); // The border slices for a mask image default to auto instead of 1.
+ m_mask.setMaskDefaults();
}
CSSReflectionDirection m_direction;