Title: [206217] trunk
Revision
206217
Author
dba...@webkit.org
Date
2016-09-21 10:44:43 -0700 (Wed, 21 Sep 2016)

Log Message

REGRESSION (r201090): Setting style.webkitTextSizeAdjust does not change text change on iPad
https://bugs.webkit.org/show_bug.cgi?id=162227
<rdar://problem/27201529>

Reviewed by Simon Fraser.

Source/WebCore:

The CSS property -webkit-text-size-adjust should be respected on all iOS devices. Following
r201090 we respect it only on iPhone and in iPhone-apps run on iPad.

Tests: fast/text-autosizing/ios/ipad/programmatic-text-size-adjust.html
       fast/text-autosizing/ios/ipad/text-size-adjust-inline-style.html
       fast/text-autosizing/ios/programmatic-text-size-adjust.html
       fast/text-autosizing/ios/text-size-adjust-inline-style.html
       fast/text-autosizing/text-size-adjust-inline-style.html

* css/parser/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue): Remove unused code to validate -webkit-text-size-adjust.
This code is never used because -webkit-text-size-adjust is a value property (since it accepts a
<percentage> as a value and CSSParserFastPaths::isKeywordPropertyID(CSSPropertyWebkitTextSizeAdjust)
returns false). That is, it is not a keyword property.
(WebCore::CSSParser::parseValue): Always enable the -webkit-text-size-adjust CSS property when
building for iOS regardless of whether Settings:textAutosizingEnabled() is enabled.

LayoutTests:

Add tests to ensure setting the CSS property -webkit-text-size-adjust in a stylesheet or
programmatically is respected on iPhone and iPad. Also added a test to ensure that this
CSS property is ignored on macOS by default.

Note that we have existing tests that ensure that -webkit-text-size-adjust is respected
on macOS when the internal setting Settings::textAutosizingEnabled() is enabled.

* fast/text-autosizing/ios/ipad/programmatic-text-size-adjust-expected.txt: Added.
* fast/text-autosizing/ios/ipad/programmatic-text-size-adjust.html: Added.
* fast/text-autosizing/ios/ipad/text-size-adjust-inline-style-expected.html: Added.
* fast/text-autosizing/ios/ipad/text-size-adjust-inline-style.html: Added.
* fast/text-autosizing/ios/programmatic-text-size-adjust-expected.txt: Added.
* fast/text-autosizing/ios/programmatic-text-size-adjust.html: Added.
* fast/text-autosizing/ios/text-size-adjust-inline-style-expected.html: Added.
* fast/text-autosizing/ios/text-size-adjust-inline-style.html: Added.
* fast/text-autosizing/text-size-adjust-inline-style-expected.html: Added.
* fast/text-autosizing/text-size-adjust-inline-style.html: Added.
* platform/mac/TestExpectations: Skip the iOS and iPad tests on Mac. Otherwise, they will fail
because these tests intentionally do not call window.internal.settings.setTextAutosizingEnabled(true)
so as to test the default port behavior. And on Mac automatic text size adjustment is disabled
by default.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (206216 => 206217)


--- trunk/LayoutTests/ChangeLog	2016-09-21 17:35:54 UTC (rev 206216)
+++ trunk/LayoutTests/ChangeLog	2016-09-21 17:44:43 UTC (rev 206217)
@@ -1,3 +1,33 @@
+2016-09-21  Daniel Bates  <daba...@apple.com>
+
+        REGRESSION (r201090): Setting style.webkitTextSizeAdjust does not change text change on iPad
+        https://bugs.webkit.org/show_bug.cgi?id=162227
+        <rdar://problem/27201529>
+
+        Reviewed by Simon Fraser.
+
+        Add tests to ensure setting the CSS property -webkit-text-size-adjust in a stylesheet or
+        programmatically is respected on iPhone and iPad. Also added a test to ensure that this
+        CSS property is ignored on macOS by default.
+
+        Note that we have existing tests that ensure that -webkit-text-size-adjust is respected
+        on macOS when the internal setting Settings::textAutosizingEnabled() is enabled.
+
+        * fast/text-autosizing/ios/ipad/programmatic-text-size-adjust-expected.txt: Added.
+        * fast/text-autosizing/ios/ipad/programmatic-text-size-adjust.html: Added.
+        * fast/text-autosizing/ios/ipad/text-size-adjust-inline-style-expected.html: Added.
+        * fast/text-autosizing/ios/ipad/text-size-adjust-inline-style.html: Added.
+        * fast/text-autosizing/ios/programmatic-text-size-adjust-expected.txt: Added.
+        * fast/text-autosizing/ios/programmatic-text-size-adjust.html: Added.
+        * fast/text-autosizing/ios/text-size-adjust-inline-style-expected.html: Added.
+        * fast/text-autosizing/ios/text-size-adjust-inline-style.html: Added.
+        * fast/text-autosizing/text-size-adjust-inline-style-expected.html: Added.
+        * fast/text-autosizing/text-size-adjust-inline-style.html: Added.
+        * platform/mac/TestExpectations: Skip the iOS and iPad tests on Mac. Otherwise, they will fail
+        because these tests intentionally do not call window.internal.settings.setTextAutosizingEnabled(true)
+        so as to test the default port behavior. And on Mac automatic text size adjustment is disabled
+        by default.
+
 2016-09-21  Jer Noble  <jer.no...@apple.com>
 
         Unreviewed gardening; after r206208, update url-null.html test to reflect current (specced) behavior.

Added: trunk/LayoutTests/fast/text-autosizing/ios/ipad/programmatic-text-size-adjust-expected.txt (0 => 206217)


--- trunk/LayoutTests/fast/text-autosizing/ios/ipad/programmatic-text-size-adjust-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/text-autosizing/ios/ipad/programmatic-text-size-adjust-expected.txt	2016-09-21 17:44:43 UTC (rev 206217)
@@ -0,0 +1,23 @@
+Tests programmatically setting and getting -webkit-text-size-adjust.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Initial value of webkitTextSizeAdjust:
+PASS document.getElementById("test").style.webkitTextSizeAdjust is ""
+
+webkitTextSizeAdjust = "auto":
+PASS document.getElementById("test").style.webkitTextSizeAdjust is "auto"
+
+webkitTextSizeAdjust = "none":
+PASS document.getElementById("test").style.webkitTextSizeAdjust is "none"
+
+webkitTextSizeAdjust = "200%":
+PASS document.getElementById("test").style.webkitTextSizeAdjust is "200%"
+
+webkitTextSizeAdjust = "dummy" (invalid value):
+PASS document.getElementById("test").style.webkitTextSizeAdjust is "200%"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/text-autosizing/ios/ipad/programmatic-text-size-adjust.html (0 => 206217)


--- trunk/LayoutTests/fast/text-autosizing/ios/ipad/programmatic-text-size-adjust.html	                        (rev 0)
+++ trunk/LayoutTests/fast/text-autosizing/ios/ipad/programmatic-text-size-adjust.html	2016-09-21 17:44:43 UTC (rev 206217)
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+<!-- We intentionally do not call window.internal.settings.setTextAutosizingEnabled(true) to test the default port behavior. -->
+</head>
+<body>
+<p id="test">The quick brown fox jumped over the lazy dog.</p>
+<script>
+description("Tests programmatically setting and getting -webkit-text-size-adjust.");
+
+debug("Initial value of webkitTextSizeAdjust:");
+shouldBeEmptyString('document.getElementById("test").style.webkitTextSizeAdjust');
+
+debug("<br>webkitTextSizeAdjust = &quot;auto&quot;:");
+document.getElementById("test").style.webkitTextSizeAdjust = "auto";
+shouldBeEqualToString('document.getElementById("test").style.webkitTextSizeAdjust', "auto");
+
+debug("<br>webkitTextSizeAdjust = &quot;none&quot;:");
+document.getElementById("test").style.webkitTextSizeAdjust = "none";
+shouldBeEqualToString('document.getElementById("test").style.webkitTextSizeAdjust', "none");
+
+debug("<br>webkitTextSizeAdjust = &quot;200%&quot;:");
+document.getElementById("test").style.webkitTextSizeAdjust = "200%";
+shouldBeEqualToString('document.getElementById("test").style.webkitTextSizeAdjust', "200%");
+
+debug("<br>webkitTextSizeAdjust = &quot;dummy&quot; (invalid value):");
+document.getElementById("test").style.webkitTextSizeAdjust = "dummy";
+shouldBeEqualToString('document.getElementById("test").style.webkitTextSizeAdjust', "200%");
+
+document.body.removeChild(document.getElementById("test"));
+</script>
+<script src=""
+</body>
+</html>

Added: trunk/LayoutTests/fast/text-autosizing/ios/ipad/text-size-adjust-inline-style-expected.html (0 => 206217)


--- trunk/LayoutTests/fast/text-autosizing/ios/ipad/text-size-adjust-inline-style-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/text-autosizing/ios/ipad/text-size-adjust-inline-style-expected.html	2016-09-21 17:44:43 UTC (rev 206217)
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+@font-face {
+    font-family: Ahem;
+    src: url("../../../../resources/Ahem.ttf");
+}
+p {
+    font-family: Ahem;
+    font-size: 20px;
+}
+</style>
+</head>
+<body>
+<p style="font-size: 20px">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+<p style="font-size: 20px">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+<p style="font-size: 10px">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+<p style="font-size: 20px">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+<p style="font-size: 30px">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+<p style="font-size: 40px">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+</body>
+</html>

Added: trunk/LayoutTests/fast/text-autosizing/ios/ipad/text-size-adjust-inline-style.html (0 => 206217)


--- trunk/LayoutTests/fast/text-autosizing/ios/ipad/text-size-adjust-inline-style.html	                        (rev 0)
+++ trunk/LayoutTests/fast/text-autosizing/ios/ipad/text-size-adjust-inline-style.html	2016-09-21 17:44:43 UTC (rev 206217)
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<!-- We intentionally do not call window.internal.settings.setTextAutosizingEnabled(true) to test the default port behavior. -->
+<style>
+@font-face {
+    font-family: Ahem;
+    src: url("../../../../resources/Ahem.ttf");
+}
+p {
+    font-family: Ahem;
+    font-size: 20px;
+}
+</style>
+</head>
+<body>
+<p style="-webkit-text-size-adjust: auto">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+<p style="-webkit-text-size-adjust: none">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+<p style="-webkit-text-size-adjust: 50%">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+<p style="-webkit-text-size-adjust: 100%">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+<p style="-webkit-text-size-adjust: 150%">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+<p style="-webkit-text-size-adjust: 200%">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+</body>
+</html>

Added: trunk/LayoutTests/fast/text-autosizing/ios/programmatic-text-size-adjust-expected.txt (0 => 206217)


--- trunk/LayoutTests/fast/text-autosizing/ios/programmatic-text-size-adjust-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/text-autosizing/ios/programmatic-text-size-adjust-expected.txt	2016-09-21 17:44:43 UTC (rev 206217)
@@ -0,0 +1,23 @@
+Tests programmatically setting and getting -webkit-text-size-adjust.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Initial value of webkitTextSizeAdjust:
+PASS document.getElementById("test").style.webkitTextSizeAdjust is ""
+
+webkitTextSizeAdjust = "auto":
+PASS document.getElementById("test").style.webkitTextSizeAdjust is "auto"
+
+webkitTextSizeAdjust = "none":
+PASS document.getElementById("test").style.webkitTextSizeAdjust is "none"
+
+webkitTextSizeAdjust = "200%":
+PASS document.getElementById("test").style.webkitTextSizeAdjust is "200%"
+
+webkitTextSizeAdjust = "dummy" (invalid value):
+PASS document.getElementById("test").style.webkitTextSizeAdjust is "200%"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/text-autosizing/ios/programmatic-text-size-adjust.html (0 => 206217)


--- trunk/LayoutTests/fast/text-autosizing/ios/programmatic-text-size-adjust.html	                        (rev 0)
+++ trunk/LayoutTests/fast/text-autosizing/ios/programmatic-text-size-adjust.html	2016-09-21 17:44:43 UTC (rev 206217)
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+<!-- We intentionally do not call window.internal.settings.setTextAutosizingEnabled(true) to test the default port behavior. -->
+</head>
+<body>
+<p id="test">The quick brown fox jumped over the lazy dog.</p>
+<script>
+description("Tests programmatically setting and getting -webkit-text-size-adjust.");
+
+debug("Initial value of webkitTextSizeAdjust:");
+shouldBeEmptyString('document.getElementById("test").style.webkitTextSizeAdjust');
+
+debug("<br>webkitTextSizeAdjust = &quot;auto&quot;:");
+document.getElementById("test").style.webkitTextSizeAdjust = "auto";
+shouldBeEqualToString('document.getElementById("test").style.webkitTextSizeAdjust', "auto");
+
+debug("<br>webkitTextSizeAdjust = &quot;none&quot;:");
+document.getElementById("test").style.webkitTextSizeAdjust = "none";
+shouldBeEqualToString('document.getElementById("test").style.webkitTextSizeAdjust', "none");
+
+debug("<br>webkitTextSizeAdjust = &quot;200%&quot;:");
+document.getElementById("test").style.webkitTextSizeAdjust = "200%";
+shouldBeEqualToString('document.getElementById("test").style.webkitTextSizeAdjust', "200%");
+
+debug("<br>webkitTextSizeAdjust = &quot;dummy&quot; (invalid value):");
+document.getElementById("test").style.webkitTextSizeAdjust = "dummy";
+shouldBeEqualToString('document.getElementById("test").style.webkitTextSizeAdjust', "200%");
+
+document.body.removeChild(document.getElementById("test"));
+</script>
+<script src=""
+</body>
+</html>

Added: trunk/LayoutTests/fast/text-autosizing/ios/text-size-adjust-inline-style-expected.html (0 => 206217)


--- trunk/LayoutTests/fast/text-autosizing/ios/text-size-adjust-inline-style-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/text-autosizing/ios/text-size-adjust-inline-style-expected.html	2016-09-21 17:44:43 UTC (rev 206217)
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+@font-face {
+    font-family: Ahem;
+    src: url("../../../resources/Ahem.ttf");
+}
+p {
+    font-family: Ahem;
+    font-size: 20px;
+}
+</style>
+</head>
+<body>
+<p style="font-size: 20px">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+<p style="font-size: 20px">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+<p style="font-size: 10px">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+<p style="font-size: 20px">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+<p style="font-size: 30px">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+<p style="font-size: 40px">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+</body>
+</html>

Added: trunk/LayoutTests/fast/text-autosizing/ios/text-size-adjust-inline-style.html (0 => 206217)


--- trunk/LayoutTests/fast/text-autosizing/ios/text-size-adjust-inline-style.html	                        (rev 0)
+++ trunk/LayoutTests/fast/text-autosizing/ios/text-size-adjust-inline-style.html	2016-09-21 17:44:43 UTC (rev 206217)
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<!-- We intentionally do not call window.internal.settings.setTextAutosizingEnabled(true) to test the default port behavior. -->
+<style>
+@font-face {
+    font-family: Ahem;
+    src: url("../../../resources/Ahem.ttf");
+}
+p {
+    font-family: Ahem;
+    font-size: 20px;
+}
+</style>
+</head>
+<body>
+<p style="-webkit-text-size-adjust: auto">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+<p style="-webkit-text-size-adjust: none">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+<p style="-webkit-text-size-adjust: 50%">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+<p style="-webkit-text-size-adjust: 100%">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+<p style="-webkit-text-size-adjust: 150%">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+<p style="-webkit-text-size-adjust: 200%">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+</body>
+</html>

Added: trunk/LayoutTests/fast/text-autosizing/text-size-adjust-inline-style-expected.html (0 => 206217)


--- trunk/LayoutTests/fast/text-autosizing/text-size-adjust-inline-style-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/text-autosizing/text-size-adjust-inline-style-expected.html	2016-09-21 17:44:43 UTC (rev 206217)
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+@font-face {
+    font-family: Ahem;
+    src: url("../../resources/Ahem.ttf");
+}
+p {
+    font-family: Ahem;
+    font-size: 20px;
+}
+</style>
+</head>
+<body>
+<p style="font-size: 20px">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+<p style="font-size: 20px">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+<p style="font-size: 20px">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+<p style="font-size: 20px">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+<p style="font-size: 20px">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+<p style="font-size: 20px">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+</body>
+</html>

Added: trunk/LayoutTests/fast/text-autosizing/text-size-adjust-inline-style.html (0 => 206217)


--- trunk/LayoutTests/fast/text-autosizing/text-size-adjust-inline-style.html	                        (rev 0)
+++ trunk/LayoutTests/fast/text-autosizing/text-size-adjust-inline-style.html	2016-09-21 17:44:43 UTC (rev 206217)
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<!-- We intentionally do not call window.internal.settings.setTextAutosizingEnabled(true) to test the default port behavior. -->
+<style>
+@font-face {
+    font-family: Ahem;
+    src: url("../../resources/Ahem.ttf");
+}
+p {
+    font-family: Ahem;
+    font-size: 20px;
+}
+</style>
+</head>
+<body>
+<p style="-webkit-text-size-adjust: auto">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+<p style="-webkit-text-size-adjust: none">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+<p style="-webkit-text-size-adjust: 50%">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+<p style="-webkit-text-size-adjust: 100%">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+<p style="-webkit-text-size-adjust: 150%">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+<p style="-webkit-text-size-adjust: 200%">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+</body>
+</html>

Modified: trunk/LayoutTests/platform/mac/TestExpectations (206216 => 206217)


--- trunk/LayoutTests/platform/mac/TestExpectations	2016-09-21 17:35:54 UTC (rev 206216)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2016-09-21 17:44:43 UTC (rev 206217)
@@ -17,6 +17,10 @@
 
 fast/url/user-visible [ Pass ]
 
+fast/text-autosizing/ios/ipad/programmatic-text-size-adjust.html [ Skip ]
+fast/text-autosizing/ios/ipad/text-size-adjust-inline-style.html [ Skip ]
+fast/text-autosizing/ios/programmatic-text-size-adjust.html [ Skip ]
+fast/text-autosizing/ios/text-size-adjust-inline-style.html [ Skip ]
 fast/text-autosizing [ Pass ]
 
 fast/attachment/attachment-subtitle-resize.html [ Pass ]

Modified: trunk/Source/WebCore/ChangeLog (206216 => 206217)


--- trunk/Source/WebCore/ChangeLog	2016-09-21 17:35:54 UTC (rev 206216)
+++ trunk/Source/WebCore/ChangeLog	2016-09-21 17:44:43 UTC (rev 206217)
@@ -1,3 +1,28 @@
+2016-09-21  Daniel Bates  <daba...@apple.com>
+
+        REGRESSION (r201090): Setting style.webkitTextSizeAdjust does not change text change on iPad
+        https://bugs.webkit.org/show_bug.cgi?id=162227
+        <rdar://problem/27201529>
+
+        Reviewed by Simon Fraser.
+
+        The CSS property -webkit-text-size-adjust should be respected on all iOS devices. Following
+        r201090 we respect it only on iPhone and in iPhone-apps run on iPad.
+
+        Tests: fast/text-autosizing/ios/ipad/programmatic-text-size-adjust.html
+               fast/text-autosizing/ios/ipad/text-size-adjust-inline-style.html
+               fast/text-autosizing/ios/programmatic-text-size-adjust.html
+               fast/text-autosizing/ios/text-size-adjust-inline-style.html
+               fast/text-autosizing/text-size-adjust-inline-style.html
+
+        * css/parser/CSSParser.cpp:
+        (WebCore::isValidKeywordPropertyAndValue): Remove unused code to validate -webkit-text-size-adjust.
+        This code is never used because -webkit-text-size-adjust is a value property (since it accepts a
+        <percentage> as a value and CSSParserFastPaths::isKeywordPropertyID(CSSPropertyWebkitTextSizeAdjust)
+        returns false). That is, it is not a keyword property.
+        (WebCore::CSSParser::parseValue): Always enable the -webkit-text-size-adjust CSS property when
+        building for iOS regardless of whether Settings:textAutosizingEnabled() is enabled.
+
 2016-09-21  Miguel Gomez  <mago...@igalia.com>
 
         [GTK] Build fails with GSTREAMER_GL enabled

Modified: trunk/Source/WebCore/css/parser/CSSParser.cpp (206216 => 206217)


--- trunk/Source/WebCore/css/parser/CSSParser.cpp	2016-09-21 17:35:54 UTC (rev 206216)
+++ trunk/Source/WebCore/css/parser/CSSParser.cpp	2016-09-21 17:44:43 UTC (rev 206217)
@@ -1000,15 +1000,6 @@
         if (valueID == CSSValueNormal || valueID == CSSValueReset)
             return true;
         break;
-#if ENABLE(IOS_TEXT_AUTOSIZING)
-    case CSSPropertyWebkitTextSizeAdjust:
-        if (!parserContext.textAutosizingEnabled)
-            return false;
-
-        if (valueID == CSSValueAuto || valueID == CSSValueNone)
-            return true;
-        break;
-#endif
 #if PLATFORM(IOS)
     // Apple specific property. These will never be standardized and is purely to
     // support custom WebKit-based Apple applications.
@@ -2788,8 +2779,14 @@
         break;
 #if ENABLE(IOS_TEXT_AUTOSIZING)
     case CSSPropertyWebkitTextSizeAdjust:
+        // FIXME: Support toggling the validation of this property via a runtime setting that is independent of
+        // whether isTextAutosizingEnabled() is true. We want to enable this property on iOS, when simulating
+        // a iOS device in Safari's responsive design mode and when optionally enabled in DRT/WTR. Otherwise,
+        // this property should be disabled by default.
+#if !PLATFORM(IOS)
         if (!isTextAutosizingEnabled())
             return false;
+#endif
 
         if (id == CSSValueAuto || id == CSSValueNone)
             validPrimitive = true;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to