Changeset 95096 in webkit
- Timestamp:
- Sep 14, 2011, 9:45:23 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r95095 r95096 1 2011-09-13 David Hyatt <hyatt@apple.com> 2 3 https://bugs.webkit.org/show_bug.cgi?id=68050 4 5 Regressions in some layout tests from making border/mask/reflection nine-piece-image 6 parsing match the spec, which allows any of the pieces to be omitted and to also be 7 specifiable in any order. 8 9 When the higher level code suddenly allowed the image slices to be omitted, the fixup 10 for legacy compatibility for reflections and masks in the parseBorderImageSlice function 11 no longer happened because that function no longer got called. 12 13 The fix is to properly set the defaults to include the "fill" keyword, so the fixup is 14 applied to the NinePieceImages you create before you ever map anything in from the rules. 15 16 This also has the side effect of fixing -webkit-max-box-image-slice to actually dump as 17 "0 fill" instead of just "0", which is the correct initial value for this property. 18 19 Reviewed by Adam Roben. 20 21 * fast/css/getComputedStyle/computed-style-expected.txt: 22 * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: 23 * svg/css/getComputedStyle-basic-expected.txt: 24 1 25 2011-09-14 Ilya Tikhonovsky <loislo@chromium.org> 2 26 -
trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt
r94912 r95096 163 163 -webkit-mask-box-image-outset: 0px; 164 164 -webkit-mask-box-image-repeat: stretch; 165 -webkit-mask-box-image-slice: 0 ;165 -webkit-mask-box-image-slice: 0 fill; 166 166 -webkit-mask-box-image-source: none; 167 167 -webkit-mask-box-image-width: auto; -
trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
r94912 r95096 162 162 -webkit-mask-box-image-outset: 0px 163 163 -webkit-mask-box-image-repeat: stretch 164 -webkit-mask-box-image-slice: 0 164 -webkit-mask-box-image-slice: 0 fill 165 165 -webkit-mask-box-image-source: none 166 166 -webkit-mask-box-image-width: auto -
trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt
r94912 r95096 323 323 rect: style.getPropertyValue(-webkit-mask-box-image-repeat) : stretch 324 324 rect: style.getPropertyCSSValue(-webkit-mask-box-image-repeat) : [object CSSPrimitiveValue] 325 rect: style.getPropertyValue(-webkit-mask-box-image-slice) : 0 325 rect: style.getPropertyValue(-webkit-mask-box-image-slice) : 0 fill 326 326 rect: style.getPropertyCSSValue(-webkit-mask-box-image-slice) : [object CSSValue] 327 327 rect: style.getPropertyValue(-webkit-mask-box-image-source) : none … … 803 803 g: style.getPropertyValue(-webkit-mask-box-image-repeat) : stretch 804 804 g: style.getPropertyCSSValue(-webkit-mask-box-image-repeat) : [object CSSPrimitiveValue] 805 g: style.getPropertyValue(-webkit-mask-box-image-slice) : 0 805 g: style.getPropertyValue(-webkit-mask-box-image-slice) : 0 fill 806 806 g: style.getPropertyCSSValue(-webkit-mask-box-image-slice) : [object CSSValue] 807 807 g: style.getPropertyValue(-webkit-mask-box-image-source) : none -
trunk/Source/WebCore/ChangeLog
r95093 r95096 1 2011-09-13 David Hyatt <hyatt@apple.com> 2 3 https://bugs.webkit.org/show_bug.cgi?id=68050 4 5 Regressions in some layout tests from making border/mask/reflection nine-piece-image 6 parsing match the spec, which allows any of the pieces to be omitted and to also be 7 specifiable in any order. 8 9 When the higher level code suddenly allowed the image slices to be omitted, the fixup 10 for legacy compatibility for reflections and masks in the parseBorderImageSlice function 11 no longer happened because that function no longer got called. 12 13 The fix is to properly set the defaults to include the "fill" keyword, so the fixup is 14 applied to the NinePieceImages you create before you ever map anything in from the rules. 15 16 This also has the side effect of fixing -webkit-max-box-image-slice to actually dump as 17 "0 fill" instead of just "0", which is the correct initial value for this property. 18 19 Reviewed by Adam Roben. 20 21 * css/CSSParser.cpp: 22 (WebCore::CSSParser::parseBorderImageSlice): 23 * css/CSSStyleSelector.cpp: 24 (WebCore::CSSStyleSelector::applyProperty): 25 * rendering/style/StyleRareNonInheritedData.cpp: 26 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): 27 * rendering/style/StyleReflection.h: 28 (WebCore::StyleReflection::StyleReflection): 29 1 30 2011-09-13 Pavel Feldman <pfeldman@google.com> 2 31 -
trunk/Source/WebCore/css/CSSParser.cpp
r95077 r95096 5417 5417 } 5418 5418 5419 if (context.allowNumber() && !context.top() && (propId == CSSPropertyWebkitMaskBoxImage || propId == CSSPropertyWebkitBoxReflect)) {5420 // Allow the slices to be omitted for images that don't fit to a border. We just set the slices to be 0.5421 context.setTop(primitiveValueCache()->createValue(0, CSSPrimitiveValue::CSS_NUMBER));5422 context.setAllowFinalCommit();5423 }5424 5425 5419 if (context.allowFinalCommit()) { 5426 5420 // FIXME: For backwards compatibility, -webkit-border-image, -webkit-mask-box-image and -webkit-box-reflect have to do a fill by default. -
trunk/Source/WebCore/css/CSSStyleSelector.cpp
r95052 r95096 3035 3035 3036 3036 NinePieceImage image; 3037 if (property == CSSPropertyWebkitMaskBoxImage) { 3038 image.setImageSlices(LengthBox(0)); // For backwards compatibility, just make the mask box image slices 0 instead of 100%. 3039 image.setBorderSlices(LengthBox()); // The slices default to auto. 3040 } 3037 if (property == CSSPropertyWebkitMaskBoxImage) 3038 image.setMaskDefaults(); 3041 3039 mapNinePieceImage(property, value, image); 3042 3040 … … 3178 3176 } 3179 3177 NinePieceImage mask; 3180 mask.setImageSlices(LengthBox(0)); // For backwards compatibility, just make the mask box image slices 0 instead of 100%. 3181 mask.setBorderSlices(LengthBox()); // The slices default to auto. 3178 mask.setMaskDefaults(); 3182 3179 mapNinePieceImage(property, reflectValue->mask(), mask); 3183 3180 reflection->setMask(mask); -
trunk/Source/WebCore/rendering/style/NinePieceImage.h
r94912 r95096 113 113 } 114 114 115 void setMaskDefaults() 116 { 117 m_imageSlices = LengthBox(0); 118 m_fill = true; 119 m_borderSlices = LengthBox(); 120 } 121 115 122 private: 116 123 RefPtr<StyleImage> m_image; -
trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
r94593 r95096 65 65 , m_regionBreakInside(RenderStyle::initialPageBreak()) 66 66 { 67 m_maskBoxImage.setImageSlices(LengthBox(0)); // Preserve the value of 0 for mask box image slices for backwards compatibility. 68 m_maskBoxImage.setBorderSlices(LengthBox()); // The border slices for a mask box image default to auto instead of 1. 67 m_maskBoxImage.setMaskDefaults(); 69 68 } 70 69 -
trunk/Source/WebCore/rendering/style/StyleReflection.h
r94593 r95096 59 59 , m_offset(0, Fixed) 60 60 { 61 m_mask.setImageSlices(LengthBox(0)); // Preserve the value of 0 for mask image slices for backwards compatibility. 62 m_mask.setBorderSlices(LengthBox()); // The border slices for a mask image default to auto instead of 1. 61 m_mask.setMaskDefaults(); 63 62 } 64 63
Note:
See TracChangeset
for help on using the changeset viewer.