Title: [212558] trunk
Revision
212558
Author
simon.fra...@apple.com
Date
2017-02-17 11:11:44 -0800 (Fri, 17 Feb 2017)

Log Message

REGRESSION (209396): Apple Pay buttons do not render
https://bugs.webkit.org/show_bug.cgi?id=168523
rdar://problem/30451563

Reviewed by Geoffrey Garen.
Source/WebCore:

The new CSS parser mistakenly converted -apple-pay-button values to
-webkit-pay-button, breaking -webkit-appearance: -apple-pay-button.

Fix by excluding "-apple-pay" prefixed values from the conversion.

Test: fast/css/appearance-apple-pay-button.html

* css/parser/CSSPropertyParser.cpp:
(WebCore::isAppleLegacyCssValueKeyword):

LayoutTests:

Ref test that masks out the middle and corners of the buttons.

* fast/css/appearance-apple-pay-button-expected.html: Added.
* fast/css/appearance-apple-pay-button.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (212557 => 212558)


--- trunk/LayoutTests/ChangeLog	2017-02-17 19:10:39 UTC (rev 212557)
+++ trunk/LayoutTests/ChangeLog	2017-02-17 19:11:44 UTC (rev 212558)
@@ -1,3 +1,16 @@
+2017-02-17  Simon Fraser  <simon.fra...@apple.com>
+
+        REGRESSION (209396): Apple Pay buttons do not render
+        https://bugs.webkit.org/show_bug.cgi?id=168523
+        rdar://problem/30451563
+
+        Reviewed by Geoffrey Garen.
+        
+        Ref test that masks out the middle and corners of the buttons.
+
+        * fast/css/appearance-apple-pay-button-expected.html: Added.
+        * fast/css/appearance-apple-pay-button.html: Added.
+
 2017-02-17  Ryan Haddad  <ryanhad...@apple.com>
 
         Rebaseline test for ios-simulator-wk2 after r212522.

Modified: trunk/LayoutTests/TestExpectations (212557 => 212558)


--- trunk/LayoutTests/TestExpectations	2017-02-17 19:10:39 UTC (rev 212557)
+++ trunk/LayoutTests/TestExpectations	2017-02-17 19:11:44 UTC (rev 212558)
@@ -764,6 +764,7 @@
 # integral hittest vs. subpixel table
 fast/table/hittest-tablecell-with-borders-right-edge.html [ Pass Failure ]
 fast/table/hittest-tablecell-right-edge.html [ Pass Failure ]
+fast/css/appearance-apple-pay-button.html [ Failure ]
 
 webkit.org/b/150598 fast/repaint/table-hover-on-link.html [ Pass Failure ]
 

Added: trunk/LayoutTests/fast/css/appearance-apple-pay-button-expected.html (0 => 212558)


--- trunk/LayoutTests/fast/css/appearance-apple-pay-button-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/css/appearance-apple-pay-button-expected.html	2017-02-17 19:11:44 UTC (rev 212558)
@@ -0,0 +1,47 @@
+
+<style>
+    .container {
+        position: relative;
+        background-color: silver;
+        padding: 25px;
+        width: 500px;
+    }
+    .apple-pay-button-div {
+        display :block;
+        margin: 25px;
+        height: 100px;
+        width: 400px;
+    }
+    
+    .masker {
+        position: absolute;
+        width: 200px;
+        height: 80px;
+        background-color: blue;
+    }
+    
+    .corner-mask {
+        position: absolute;
+        width: 20px;
+        height: 20px;
+        background-color: blue;
+    }
+</style>
+
+<div class="container">
+    <div style="background-color: black;" class="apple-pay-button-div"></div>
+    <div style="background-color: white;" class="apple-pay-button-div"></div>
+    
+    <div class="masker" style="top: 60px; left: 150px"></div>
+    <div class="masker" style="top: 185px; left: 150px"></div>
+    
+    <div class="corner-mask" style="top: 45px; left: 45px"></div>
+    <div class="corner-mask" style="top: 135px; left: 45px"></div>
+    <div class="corner-mask" style="top: 45px; left: 435px"></div>
+    <div class="corner-mask" style="top: 135px; left: 435px"></div>
+
+    <div class="corner-mask" style="top: 170px; left: 45px"></div>
+    <div class="corner-mask" style="top: 260px; left: 45px"></div>
+    <div class="corner-mask" style="top: 170px; left: 435px"></div>
+    <div class="corner-mask" style="top: 260px; left: 435px"></div>
+</div>

Added: trunk/LayoutTests/fast/css/appearance-apple-pay-button.html (0 => 212558)


--- trunk/LayoutTests/fast/css/appearance-apple-pay-button.html	                        (rev 0)
+++ trunk/LayoutTests/fast/css/appearance-apple-pay-button.html	2017-02-17 19:11:44 UTC (rev 212558)
@@ -0,0 +1,48 @@
+
+<style>
+    .container {
+        position: relative;
+        background-color: silver;
+        padding: 25px;
+        width: 500px;
+    }
+    .apple-pay-button-div {
+        display :block;
+        margin: 25px;
+        -webkit-appearance: -apple-pay-button;
+        height: 100px;
+        width: 400px;
+    }
+    
+    .masker {
+        position: absolute;
+        width: 200px;
+        height: 80px;
+        background-color: blue;
+    }
+
+    .corner-mask {
+        position: absolute;
+        width: 20px;
+        height: 20px;
+        background-color: blue;
+    }
+</style>
+
+<div class="container">
+    <button style="-apple-pay-button-style: black;" class="apple-pay-button-div"></button>
+    <button style="-apple-pay-button-style: white;" class="apple-pay-button-div"></button>
+    
+    <div class="masker" style="top: 60px; left: 150px"></div>
+    <div class="masker" style="top: 185px; left: 150px"></div>
+
+    <div class="corner-mask" style="top: 45px; left: 45px"></div>
+    <div class="corner-mask" style="top: 135px; left: 45px"></div>
+    <div class="corner-mask" style="top: 45px; left: 435px"></div>
+    <div class="corner-mask" style="top: 135px; left: 435px"></div>
+
+    <div class="corner-mask" style="top: 170px; left: 45px"></div>
+    <div class="corner-mask" style="top: 260px; left: 45px"></div>
+    <div class="corner-mask" style="top: 170px; left: 435px"></div>
+    <div class="corner-mask" style="top: 260px; left: 435px"></div>
+</div>

Modified: trunk/LayoutTests/platform/mac/TestExpectations (212557 => 212558)


--- trunk/LayoutTests/platform/mac/TestExpectations	2017-02-17 19:10:39 UTC (rev 212557)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2017-02-17 19:11:44 UTC (rev 212558)
@@ -1339,6 +1339,8 @@
 
 webkit.org/b/158889 media/video-controls-show-on-kb-or-ax-event.html [ Pass Failure ]
 
+[ Sierra+ ] fast/css/appearance-apple-pay-button.html [ Pass ]
+
 # <rdar://problem/23500327> storage/websql/alter-to-info-table.html
 [ Sierra+ ] storage/websql/alter-to-info-table.html [ Pass Failure ]
 

Modified: trunk/Source/WebCore/ChangeLog (212557 => 212558)


--- trunk/Source/WebCore/ChangeLog	2017-02-17 19:10:39 UTC (rev 212557)
+++ trunk/Source/WebCore/ChangeLog	2017-02-17 19:11:44 UTC (rev 212558)
@@ -1,3 +1,21 @@
+2017-02-17  Simon Fraser  <simon.fra...@apple.com>
+
+        REGRESSION (209396): Apple Pay buttons do not render
+        https://bugs.webkit.org/show_bug.cgi?id=168523
+        rdar://problem/30451563
+
+        Reviewed by Geoffrey Garen.
+
+        The new CSS parser mistakenly converted -apple-pay-button values to
+        -webkit-pay-button, breaking -webkit-appearance: -apple-pay-button.
+
+        Fix by excluding "-apple-pay" prefixed values from the conversion.
+
+        Test: fast/css/appearance-apple-pay-button.html
+
+        * css/parser/CSSPropertyParser.cpp:
+        (WebCore::isAppleLegacyCssValueKeyword):
+
 2017-02-17  Commit Queue  <commit-qu...@webkit.org>
 
         Unreviewed, rolling out r212463.

Modified: trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp (212557 => 212558)


--- trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp	2017-02-17 19:10:39 UTC (rev 212557)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp	2017-02-17 19:11:44 UTC (rev 212558)
@@ -155,10 +155,12 @@
 {
     static const char applePrefix[] = "-apple-";
     static const char appleSystemPrefix[] = "-apple-system";
+    static const char applePayPrefix[] = "-apple-pay";
     static const char* appleWirelessPlaybackTargetActive = getValueName(CSSValueAppleWirelessPlaybackTargetActive);
     
     return hasPrefix(valueKeyword, length, applePrefix)
     && !hasPrefix(valueKeyword, length, appleSystemPrefix)
+    && !hasPrefix(valueKeyword, length, applePayPrefix)
     && !WTF::equal(reinterpret_cast<const LChar*>(valueKeyword), reinterpret_cast<const LChar*>(appleWirelessPlaybackTargetActive), length);
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to