Title: [210882] trunk
Revision
210882
Author
mmaxfi...@apple.com
Date
2017-01-18 13:35:30 -0800 (Wed, 18 Jan 2017)

Log Message

background-repeat-x doesn't work
https://bugs.webkit.org/show_bug.cgi?id=166997

Reviewed by Simon Fraser.

Source/WebCore:

During the creation of the new CSS parser, we accidentally forgot
to hook up background-repeat-x and background-repeat-y.

Tests: fast/backgrounds/background-repeat-x-y-parse.html
       fast/backgrounds/background-repeat-x-y.html

* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isKeywordPropertyID):

LayoutTests:

* fast/backgrounds/background-repeat-x-y-expected.html: Added.
* fast/backgrounds/background-repeat-x-y-parse-expected.txt: Added.
* fast/backgrounds/background-repeat-x-y-parse.html: Added.
* fast/backgrounds/background-repeat-x-y.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (210881 => 210882)


--- trunk/LayoutTests/ChangeLog	2017-01-18 21:26:07 UTC (rev 210881)
+++ trunk/LayoutTests/ChangeLog	2017-01-18 21:35:30 UTC (rev 210882)
@@ -1,3 +1,15 @@
+2017-01-18  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+        background-repeat-x doesn't work
+        https://bugs.webkit.org/show_bug.cgi?id=166997
+
+        Reviewed by Simon Fraser.
+
+        * fast/backgrounds/background-repeat-x-y-expected.html: Added.
+        * fast/backgrounds/background-repeat-x-y-parse-expected.txt: Added.
+        * fast/backgrounds/background-repeat-x-y-parse.html: Added.
+        * fast/backgrounds/background-repeat-x-y.html: Added.
+
 2017-01-18  Yoav Weiss  <y...@yoav.ws>
 
         REGRESSION(r203110): LayoutTest http/tests/preload/single_download_preload_runner.html timing out

Added: trunk/LayoutTests/fast/backgrounds/background-repeat-x-y-expected.html (0 => 210882)


--- trunk/LayoutTests/fast/backgrounds/background-repeat-x-y-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/backgrounds/background-repeat-x-y-expected.html	2017-01-18 21:35:30 UTC (rev 210882)
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+div {
+	display: inline-block;
+	width: 150px;
+	height: 150px;
+	background-image: url('resources/map.jpg');
+	background-position: top left; 
+}
+</style>
+</head>
+<body>
+<p>This makes sure that background-repeat-x and background-repeat-y are rendered as expected.</p>
+<div style="background-repeat: repeat; border: 1px solid black;"></div>
+<div style="background-repeat: repeat-y; border: 1px solid black;"></div>
+<div style="background-repeat: repeat; border: 1px solid black;"></div>
+<div style="background-repeat: repeat-x; border: 1px solid black;"></div>
+<div style="background-repeat: no-repeat; border: 1px solid black;"></div>
+<div style="background-repeat: no-repeat; border: 1px solid black;"></div>
+<div style="background-repeat: no-repeat;border: 1px solid black;"></div>
+<div style="background-repeat: repeat-x; border: 1px solid black;"></div>
+<div style="background-repeat: repeat-y; border: 1px solid black;"></div>
+<div style="background-repeat: repeat; border: 1px solid black;"></div>
+</body>
+</html>
\ No newline at end of file

Added: trunk/LayoutTests/fast/backgrounds/background-repeat-x-y-parse-expected.txt (0 => 210882)


--- trunk/LayoutTests/fast/backgrounds/background-repeat-x-y-parse-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/backgrounds/background-repeat-x-y-parse-expected.txt	2017-01-18 21:35:30 UTC (rev 210882)
@@ -0,0 +1,14 @@
+PASS window.getComputedStyle(document.getElementById('test1')).getPropertyValue('background-repeat') is "repeat"
+PASS window.getComputedStyle(document.getElementById('test2')).getPropertyValue('background-repeat') is "repeat-y"
+PASS window.getComputedStyle(document.getElementById('test3')).getPropertyValue('background-repeat') is "repeat"
+PASS window.getComputedStyle(document.getElementById('test4')).getPropertyValue('background-repeat') is "repeat-x"
+PASS window.getComputedStyle(document.getElementById('test5')).getPropertyValue('background-repeat') is "no-repeat"
+PASS window.getComputedStyle(document.getElementById('test6')).getPropertyValue('background-repeat') is "no-repeat"
+PASS window.getComputedStyle(document.getElementById('test7')).getPropertyValue('background-repeat') is "no-repeat"
+PASS window.getComputedStyle(document.getElementById('test8')).getPropertyValue('background-repeat') is "repeat-x"
+PASS window.getComputedStyle(document.getElementById('test9')).getPropertyValue('background-repeat') is "repeat-y"
+PASS window.getComputedStyle(document.getElementById('test10')).getPropertyValue('background-repeat') is "repeat"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+         
Property changes on: trunk/LayoutTests/fast/backgrounds/background-repeat-x-y-parse-expected.txt
___________________________________________________________________

Added: svn:eol-style

+native \ No newline at end of property

Added: svn:keywords

+Author Date Id Rev URL \ No newline at end of property

Added: trunk/LayoutTests/fast/backgrounds/background-repeat-x-y-parse.html (0 => 210882)


--- trunk/LayoutTests/fast/backgrounds/background-repeat-x-y-parse.html	                        (rev 0)
+++ trunk/LayoutTests/fast/backgrounds/background-repeat-x-y-parse.html	2017-01-18 21:35:30 UTC (rev 210882)
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+.test {
+	display: inline-block;
+	width: 150px;
+	height: 150px;
+	background-image: url('resources/map.jpg');
+	background-position: top left; 
+}
+</style>
+<script src=""
+</head>
+<body>
+<div id="test1" class="test" style="background-repeat-x: repeat; border: 1px solid black;"></div>
+<div id="test2" class="test" style="background-repeat-x: no-repeat; border: 1px solid black;"></div>
+<div id="test3" class="test" style="background-repeat-y: repeat; border: 1px solid black;"></div>
+<div id="test4" class="test" style="background-repeat-y: no-repeat; border: 1px solid black;"></div>
+<div id="test5" class="test" style="background-repeat-x: no-repeat; background-repeat-y: no-repeat; border: 1px solid black;"></div>
+<div id="test6" class="test" style="background-repeat: repeat-y; background-repeat-y: no-repeat; border: 1px solid black;"></div>
+<div id="test7" class="test" style="background-repeat: repeat-x; background-repeat-x: no-repeat; border: 1px solid black;"></div>
+<div id="test8" class="test" style="background-repeat-x: no-repeat; background-repeat: repeat-x; border: 1px solid black;"></div>
+<div id="test9" class="test" style="background-repeat-y: no-repeat; background-repeat: repeat-y; border: 1px solid black;"></div>
+<div id="test10" class="test" style="background-repeat-x: garbage; border: 1px solid black;"></div>
+<script>
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test1')).getPropertyValue('background-repeat')", "repeat");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test2')).getPropertyValue('background-repeat')", "repeat-y");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test3')).getPropertyValue('background-repeat')", "repeat");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test4')).getPropertyValue('background-repeat')", "repeat-x");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test5')).getPropertyValue('background-repeat')", "no-repeat");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test6')).getPropertyValue('background-repeat')", "no-repeat");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test7')).getPropertyValue('background-repeat')", "no-repeat");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test8')).getPropertyValue('background-repeat')", "repeat-x");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test9')).getPropertyValue('background-repeat')", "repeat-y");
+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test10')).getPropertyValue('background-repeat')", "repeat");
+</script>
+<script src=""
+</body>
+</html>
\ No newline at end of file

Added: trunk/LayoutTests/fast/backgrounds/background-repeat-x-y.html (0 => 210882)


--- trunk/LayoutTests/fast/backgrounds/background-repeat-x-y.html	                        (rev 0)
+++ trunk/LayoutTests/fast/backgrounds/background-repeat-x-y.html	2017-01-18 21:35:30 UTC (rev 210882)
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+div {
+	display: inline-block;
+	width: 150px;
+	height: 150px;
+	background-image: url('resources/map.jpg');
+	background-position: top left; 
+}
+</style>
+</head>
+<body>
+<p>This makes sure that background-repeat-x and background-repeat-y are rendered as expected.</p>
+<div style="background-repeat-x: repeat; border: 1px solid black;"></div>
+<div style="background-repeat-x: no-repeat; border: 1px solid black;"></div>
+<div style="background-repeat-y: repeat; border: 1px solid black;"></div>
+<div style="background-repeat-y: no-repeat; border: 1px solid black;"></div>
+<div style="background-repeat-x: no-repeat; background-repeat-y: no-repeat; border: 1px solid black;"></div>
+<div style="background-repeat: repeat-x; background-repeat-x: no-repeat; border: 1px solid black;"></div>
+<div style="background-repeat: repeat-y; background-repeat-y: no-repeat; border: 1px solid black;"></div>
+<div style="background-repeat-x: no-repeat; background-repeat: repeat-x; border: 1px solid black;"></div>
+<div style="background-repeat-y: no-repeat; background-repeat: repeat-y; border: 1px solid black;"></div>
+<div style="background-repeat-x: garbage; border: 1px solid black;"></div>
+</body>
+</html>
\ No newline at end of file

Modified: trunk/Source/WebCore/ChangeLog (210881 => 210882)


--- trunk/Source/WebCore/ChangeLog	2017-01-18 21:26:07 UTC (rev 210881)
+++ trunk/Source/WebCore/ChangeLog	2017-01-18 21:35:30 UTC (rev 210882)
@@ -1,3 +1,19 @@
+2017-01-18  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+        background-repeat-x doesn't work
+        https://bugs.webkit.org/show_bug.cgi?id=166997
+
+        Reviewed by Simon Fraser.
+
+        During the creation of the new CSS parser, we accidentally forgot
+        to hook up background-repeat-x and background-repeat-y.
+
+        Tests: fast/backgrounds/background-repeat-x-y-parse.html
+               fast/backgrounds/background-repeat-x-y.html
+
+        * css/parser/CSSParserFastPaths.cpp:
+        (WebCore::CSSParserFastPaths::isKeywordPropertyID):
+
 2017-01-18  Andy Estes  <aes...@apple.com>
 
         [QuickLook] Support password-protected documents

Modified: trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp (210881 => 210882)


--- trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp	2017-01-18 21:26:07 UTC (rev 210881)
+++ trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp	2017-01-18 21:35:30 UTC (rev 210882)
@@ -930,9 +930,8 @@
     // FIXME-NEWPARSER: Treat all as a keyword property.
     // case CSSPropertyAll:
 
-    // FIXME-NEWPARSER: Treat the following properties as keyword properties:
-    // case CSSPropertyBackgroundRepeatX:
-    // case CSSPropertyBackgroundRepeatY:
+    case CSSPropertyBackgroundRepeatX:
+    case CSSPropertyBackgroundRepeatY:
 
     // FIXME-NEWPARSER: Add the following unprefixed properties:
     // case CSSPropertyBackfaceVisibility:
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to