Title: [176455] trunk
- Revision
- 176455
- Author
- [email protected]
- Date
- 2014-11-21 11:01:46 -0800 (Fri, 21 Nov 2014)
Log Message
Regression(r175381): -webkit-mask-box-image is broken
https://bugs.webkit.org/show_bug.cgi?id=138969
<rdar://problem/19054471>
Reviewed by Simon Fraser.
Source/WebCore:
After r175381, the StyleBuilder would call NinePieceImage::setMaskDefaults()
*after* calling CSSToStyleMap::mapNinePieceImage(), instead of *before*, for
-webkit-mask-box-image CSS property. This was causing the mask defaults to
overwrite what was set by mapNinePieceImage().
Test: fast/css/webkit-mask-box-image.html
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertBorderMask):
LayoutTests:
Add a layout test to add basic coverage for -webkit-mask-box-image
CSS property.
* fast/css/resources/mask.png: Added.
* fast/css/webkit-mask-box-image.html: Added.
* fast/css/webkit-mask-box-image-expected.html: Added
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (176454 => 176455)
--- trunk/LayoutTests/ChangeLog 2014-11-21 19:00:56 UTC (rev 176454)
+++ trunk/LayoutTests/ChangeLog 2014-11-21 19:01:46 UTC (rev 176455)
@@ -1,5 +1,20 @@
2014-11-21 Chris Dumez <[email protected]>
+ Regression(r175381): -webkit-mask-box-image is broken
+ https://bugs.webkit.org/show_bug.cgi?id=138969
+ <rdar://problem/19054471>
+
+ Reviewed by Simon Fraser.
+
+ Add a layout test to add basic coverage for -webkit-mask-box-image
+ CSS property.
+
+ * fast/css/resources/mask.png: Added.
+ * fast/css/webkit-mask-box-image.html: Added.
+ * fast/css/webkit-mask-box-image-expected.html: Added
+
+2014-11-21 Chris Dumez <[email protected]>
+
Crash when setting 'font' CSS property to 'calc(2 * 3)'
https://bugs.webkit.org/show_bug.cgi?id=138933
Added: trunk/LayoutTests/fast/css/resources/mask.png
(Binary files differ)
Property changes on: trunk/LayoutTests/fast/css/resources/mask.png
___________________________________________________________________
Added: svn:mime-type
Added: trunk/LayoutTests/fast/css/webkit-mask-box-image-expected.html (0 => 176455)
--- trunk/LayoutTests/fast/css/webkit-mask-box-image-expected.html (rev 0)
+++ trunk/LayoutTests/fast/css/webkit-mask-box-image-expected.html 2014-11-21 19:01:46 UTC (rev 176455)
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+.rect {
+ background-color: grey;
+ width: 190px;
+ height: 40px;
+ position: absolute;
+ top: 55px;
+ left: 55px;
+}
+</style>
+</head>
+<body>
+<p>This should be a grey rectangle.</p>
+
+<div class="rect"></div>
+</body>
+</html>
Added: trunk/LayoutTests/fast/css/webkit-mask-box-image.html (0 => 176455)
--- trunk/LayoutTests/fast/css/webkit-mask-box-image.html (rev 0)
+++ trunk/LayoutTests/fast/css/webkit-mask-box-image.html 2014-11-21 19:01:46 UTC (rev 176455)
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+.mask {
+ -webkit-mask-box-image: url('resources/mask.png') 5 5 5 5;
+ background-color: grey;
+ width: 200px;
+ height: 50px;
+ position: absolute;
+ top: 50px;
+ left: 50px;
+ /*
+ * Clip 5px on each side to keep only the area not
+ * affected by the mask.
+ */
+ clip: rect(5px, 195px, 45px, 5px);
+}
+</style>
+</head>
+<body>
+<p>This should be a grey rectangle.</p>
+
+<div class="mask"></div>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (176454 => 176455)
--- trunk/Source/WebCore/ChangeLog 2014-11-21 19:00:56 UTC (rev 176454)
+++ trunk/Source/WebCore/ChangeLog 2014-11-21 19:01:46 UTC (rev 176455)
@@ -1,5 +1,23 @@
2014-11-21 Chris Dumez <[email protected]>
+ Regression(r175381): -webkit-mask-box-image is broken
+ https://bugs.webkit.org/show_bug.cgi?id=138969
+ <rdar://problem/19054471>
+
+ Reviewed by Simon Fraser.
+
+ After r175381, the StyleBuilder would call NinePieceImage::setMaskDefaults()
+ *after* calling CSSToStyleMap::mapNinePieceImage(), instead of *before*, for
+ -webkit-mask-box-image CSS property. This was causing the mask defaults to
+ overwrite what was set by mapNinePieceImage().
+
+ Test: fast/css/webkit-mask-box-image.html
+
+ * css/StyleBuilderConverter.h:
+ (WebCore::StyleBuilderConverter::convertBorderMask):
+
+2014-11-21 Chris Dumez <[email protected]>
+
Crash when setting 'font' CSS property to 'calc(2 * 3)'
https://bugs.webkit.org/show_bug.cgi?id=138933
Modified: trunk/Source/WebCore/css/StyleBuilderConverter.h (176454 => 176455)
--- trunk/Source/WebCore/css/StyleBuilderConverter.h 2014-11-21 19:00:56 UTC (rev 176454)
+++ trunk/Source/WebCore/css/StyleBuilderConverter.h 2014-11-21 19:01:46 UTC (rev 176455)
@@ -249,8 +249,9 @@
template <CSSPropertyID property>
inline NinePieceImage StyleBuilderConverter::convertBorderMask(StyleResolver& styleResolver, CSSValue& value)
{
- NinePieceImage image = convertBorderImage<property>(styleResolver, value);
+ NinePieceImage image;
image.setMaskDefaults();
+ styleResolver.styleMap()->mapNinePieceImage(property, &value, image);
return image;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes