Diff
Modified: trunk/LayoutTests/ChangeLog (201089 => 201090)
--- trunk/LayoutTests/ChangeLog 2016-05-18 19:03:38 UTC (rev 201089)
+++ trunk/LayoutTests/ChangeLog 2016-05-18 19:06:27 UTC (rev 201090)
@@ -1,3 +1,22 @@
+2016-05-18 Simon Fraser <[email protected]>
+
+ REGRESSION (r200534) Command-+ no longer zooms pages
+ https://bugs.webkit.org/show_bug.cgi?id=157826
+ rdar://problem/26334636
+
+ Reviewed by Dean Jackson.
+
+ Need to call internals.settings.setTextAutosizingEnabled(true) earlier in some tests.
+
+ * fast/text-autosizing/ios/line-height-text-autosizing.html:
+ * fast/text-autosizing/ios/percent-adjust-length-line-height.html:
+ * fast/text-autosizing/ios/percent-adjust-number-line-height.html:
+ * fast/text-autosizing/ios/percent-adjust-percent-line-height.html:
+ * fast/text-autosizing/mac/text-size-adjust-text-zoom-expected.html: Added.
+ * fast/text-autosizing/mac/text-size-adjust-text-zoom.html: Added.
+ * platform/mac-wk2/TestExpectations:
+ * platform/mac/TestExpectations:
+
2016-05-18 Joanmarie Diggs <[email protected]>
[GTK] accessibility/meter-element.html is failing
Modified: trunk/LayoutTests/fast/text-autosizing/ios/line-height-text-autosizing.html (201089 => 201090)
--- trunk/LayoutTests/fast/text-autosizing/ios/line-height-text-autosizing.html 2016-05-18 19:03:38 UTC (rev 201089)
+++ trunk/LayoutTests/fast/text-autosizing/ios/line-height-text-autosizing.html 2016-05-18 19:06:27 UTC (rev 201090)
@@ -1,6 +1,12 @@
<!DOCTYPE html>
<html>
<head>
+ <script>
+ if (window.internals) {
+ internals.settings.setTextAutosizingEnabled(true);
+ internals.settings.setTextAutosizingWindowSizeOverride(320, 480);
+ }
+ </script>
<script src=""
<style>
#testDivAdjust {
@@ -11,12 +17,6 @@
font-size: 20px;
}
</style>
-<script>
-if (window.internals) {
- window.internals.settings.setTextAutosizingEnabled(true);
- window.internals.settings.setTextAutosizingWindowSizeOverride(320, 480);
-}
-</script>
</head>
<boby>
<div id="testDivNoAdjust">Test</div>
Modified: trunk/LayoutTests/fast/text-autosizing/ios/percent-adjust-length-line-height.html (201089 => 201090)
--- trunk/LayoutTests/fast/text-autosizing/ios/percent-adjust-length-line-height.html 2016-05-18 19:03:38 UTC (rev 201089)
+++ trunk/LayoutTests/fast/text-autosizing/ios/percent-adjust-length-line-height.html 2016-05-18 19:06:27 UTC (rev 201090)
@@ -2,6 +2,12 @@
<head>
<meta name="viewport" content="user-scalable=no, width=320">
<title><rdar://problem/6646628> Text Autosizing: Overlapping text in message</title>
+ <script>
+ if (window.internals) {
+ internals.settings.setTextAutosizingEnabled(true);
+ internals.settings.setTextAutosizingWindowSizeOverride(320, 480);
+ }
+ </script>
<style>
body {
font-size: 14px;
@@ -12,12 +18,6 @@
}
</style>
<script src=""
- <script>
- if (window.internals) {
- window.internals.settings.setTextAutosizingEnabled(true);
- window.internals.settings.setTextAutosizingWindowSizeOverride(320, 480);
- }
- </script>
</head>
<body>
<p id="lorem">This text should have a decent spacing between the lines. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras ante orci, posuere at aliquam eget, ornare ut sapien. Praesent commodo volutpat auctor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vivamus interdum tincidunt pulvinar. Donec nec libero eros. Morbi facilisis lacus quis mi mattis quis pretium velit fringilla. Integer ipsum metus, pretium et tincidunt eget, commodo vel nibh. Cras feugiat lorem et velit interdum eu luctus dui gravida. Nullam nec gravida orci. Vestibulum quis imperdiet nibh. Vivamus tincidunt erat ac risus egestas mattis.</p>
Modified: trunk/LayoutTests/fast/text-autosizing/ios/percent-adjust-number-line-height.html (201089 => 201090)
--- trunk/LayoutTests/fast/text-autosizing/ios/percent-adjust-number-line-height.html 2016-05-18 19:03:38 UTC (rev 201089)
+++ trunk/LayoutTests/fast/text-autosizing/ios/percent-adjust-number-line-height.html 2016-05-18 19:06:27 UTC (rev 201090)
@@ -2,6 +2,12 @@
<head>
<meta name="viewport" content="user-scalable=no, width=320">
<title><rdar://problem/6646628> Text Autosizing: Overlapping text in message</title>
+ <script>
+ if (window.internals) {
+ internals.settings.setTextAutosizingEnabled(true);
+ internals.settings.setTextAutosizingWindowSizeOverride(320, 480);
+ }
+ </script>
<style>
#expected {
font-size: 10px;
@@ -15,12 +21,6 @@
}
</style>
<script src=""
- <script>
- if (window.internals) {
- window.internals.settings.setTextAutosizingEnabled(true);
- window.internals.settings.setTextAutosizingWindowSizeOverride(320, 480);
- }
- </script>
</head>
<body>
<p id="expected">This text should have a decent spacing between the lines. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras ante orci, posuere at aliquam eget, ornare ut sapien. Praesent commodo volutpat auctor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vivamus interdum tincidunt pulvinar. Donec nec libero eros. Morbi facilisis lacus quis mi mattis quis pretium velit fringilla. Integer ipsum metus, pretium et tincidunt eget, commodo vel nibh. Cras feugiat lorem et velit interdum eu luctus dui gravida. Nullam nec gravida orci. Vestibulum quis imperdiet nibh. Vivamus tincidunt erat ac risus egestas mattis.</p>
Modified: trunk/LayoutTests/fast/text-autosizing/ios/percent-adjust-percent-line-height.html (201089 => 201090)
--- trunk/LayoutTests/fast/text-autosizing/ios/percent-adjust-percent-line-height.html 2016-05-18 19:03:38 UTC (rev 201089)
+++ trunk/LayoutTests/fast/text-autosizing/ios/percent-adjust-percent-line-height.html 2016-05-18 19:06:27 UTC (rev 201090)
@@ -2,6 +2,12 @@
<head>
<meta name="viewport" content="user-scalable=no, width=320">
<title><rdar://problem/12607898> incorrect behavior of -webkit-text-size-adjust in UIWebView on iOS6</title>
+ <script>
+ if (window.internals) {
+ internals.settings.setTextAutosizingEnabled(true);
+ internals.settings.setTextAutosizingWindowSizeOverride(320, 480);
+ }
+ </script>
<style>
#expected {
font-size: 10px;
@@ -15,12 +21,6 @@
}
</style>
<script src=""
- <script>
- if (window.internals) {
- window.internals.settings.setTextAutosizingEnabled(true);
- window.internals.settings.setTextAutosizingWindowSizeOverride(320, 480);
- }
- </script>
</head>
<body>
<p id="expected">This text should have a decent spacing between the lines. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras ante orci, posuere at aliquam eget, ornare ut sapien. Praesent commodo volutpat auctor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vivamus interdum tincidunt pulvinar. Donec nec libero eros. Morbi facilisis lacus quis mi mattis quis pretium velit fringilla. Integer ipsum metus, pretium et tincidunt eget, commodo vel nibh. Cras feugiat lorem et velit interdum eu luctus dui gravida. Nullam nec gravida orci. Vestibulum quis imperdiet nibh. Vivamus tincidunt erat ac risus egestas mattis.</p>
Added: trunk/LayoutTests/fast/text-autosizing/mac/text-size-adjust-text-zoom-expected.html (0 => 201090)
--- trunk/LayoutTests/fast/text-autosizing/mac/text-size-adjust-text-zoom-expected.html (rev 0)
+++ trunk/LayoutTests/fast/text-autosizing/mac/text-size-adjust-text-zoom-expected.html 2016-05-18 19:06:27 UTC (rev 201090)
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <script>
+ if (window.internals)
+ internals.setPageZoomFactor(2);
+ </script>
+</head>
+<body>
+ <p>When text autosizing is disabled, the size of this text should increase when using page zoom</p>
+</body>
+</html>
Added: trunk/LayoutTests/fast/text-autosizing/mac/text-size-adjust-text-zoom.html (0 => 201090)
--- trunk/LayoutTests/fast/text-autosizing/mac/text-size-adjust-text-zoom.html (rev 0)
+++ trunk/LayoutTests/fast/text-autosizing/mac/text-size-adjust-text-zoom.html 2016-05-18 19:06:27 UTC (rev 201090)
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ body {
+ -webkit-text-size-adjust: none;
+ }
+ </style>
+ <script>
+ if (window.internals) {
+ internals.settings.setTextAutosizingEnabled(false);
+ internals.setPageZoomFactor(2);
+ }
+ </script>
+</head>
+<body>
+ <p>When text autosizing is disabled, the size of this text should increase when using page zoom</p>
+</body>
+</html>
Modified: trunk/LayoutTests/platform/mac/TestExpectations (201089 => 201090)
--- trunk/LayoutTests/platform/mac/TestExpectations 2016-05-18 19:03:38 UTC (rev 201089)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2016-05-18 19:06:27 UTC (rev 201090)
@@ -17,6 +17,7 @@
fast/url/user-visible [ Pass ]
fast/text-autosizing/ios [ Pass ]
+fast/text-autosizing/mac [ Pass ]
#//////////////////////////////////////////////////////////////////////////////////////////
# End platform-specific directories.
Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (201089 => 201090)
--- trunk/LayoutTests/platform/mac-wk2/TestExpectations 2016-05-18 19:03:38 UTC (rev 201089)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations 2016-05-18 19:06:27 UTC (rev 201090)
@@ -9,6 +9,7 @@
swipe [ Pass ]
fast/text-autosizing/ios [ Pass ]
+fast/text-autosizing/mac [ Pass ]
fast/events/cancelled-force-click-link-navigation.html [ Pass ]
fast/events/force-click-link-selection-behavior.html [ Pass ]
Modified: trunk/Source/WebCore/ChangeLog (201089 => 201090)
--- trunk/Source/WebCore/ChangeLog 2016-05-18 19:03:38 UTC (rev 201089)
+++ trunk/Source/WebCore/ChangeLog 2016-05-18 19:06:27 UTC (rev 201090)
@@ -1,3 +1,30 @@
+2016-05-18 Simon Fraser <[email protected]>
+
+ REGRESSION (r200534) Command-+ no longer zooms pages
+ https://bugs.webkit.org/show_bug.cgi?id=157826
+ rdar://problem/26334636
+
+ Reviewed by Dean Jackson.
+
+ When text autosizing was enabled on Mac, we started to parse and respect
+ -webkit-text-size-adjust. Fix by cutting this off in CSSParser if the feature
+ is disabled.
+
+ Also fix InternalSettings to reset page and text zoom, since WebKit1 aliases
+ the zoom levels causing DRT to fail to reset them between tests.
+
+ Test: fast/text-autosizing/mac/text-size-adjust-text-zoom.html
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParserContext::CSSParserContext):
+ (WebCore::isValidKeywordPropertyAndValue):
+ (WebCore::CSSParser::parseValue):
+ (WebCore::CSSParser::isTextAutosizingEnabled):
+ * css/CSSParser.h:
+ * css/CSSParserMode.h:
+ * testing/InternalSettings.cpp:
+ (WebCore::InternalSettings::resetToConsistentState):
+
2016-05-18 Dave Hyatt <[email protected]>
markAllDescendantsWithFloatsForLayout should not drill into blocks with
Modified: trunk/Source/WebCore/css/CSSParser.cpp (201089 => 201090)
--- trunk/Source/WebCore/css/CSSParser.cpp 2016-05-18 19:03:38 UTC (rev 201089)
+++ trunk/Source/WebCore/css/CSSParser.cpp 2016-05-18 19:06:27 UTC (rev 201090)
@@ -245,13 +245,9 @@
CSSParserContext::CSSParserContext(CSSParserMode mode, const URL& baseURL)
: baseURL(baseURL)
, mode(mode)
- , isHTMLDocument(false)
#if ENABLE(CSS_GRID_LAYOUT)
, cssGridLayoutEnabled(RuntimeEnabledFeatures::sharedFeatures().isCSSGridLayoutEnabled())
#endif
- , needsSiteSpecificQuirks(false)
- , enforcesCSSMIMETypeInNoQuirksMode(true)
- , useLegacyBackgroundSizeShorthandBehavior(false)
{
#if PLATFORM(IOS)
// FIXME: Force the site specific quirk below to work on iOS. Investigating other site specific quirks
@@ -269,10 +265,17 @@
#if ENABLE(CSS_GRID_LAYOUT)
, cssGridLayoutEnabled(document.isCSSGridLayoutEnabled())
#endif
- , needsSiteSpecificQuirks(document.settings() ? document.settings()->needsSiteSpecificQuirks() : false)
- , enforcesCSSMIMETypeInNoQuirksMode(!document.settings() || document.settings()->enforceCSSMIMETypeInNoQuirksMode())
- , useLegacyBackgroundSizeShorthandBehavior(document.settings() ? document.settings()->useLegacyBackgroundSizeShorthandBehavior() : false)
{
+ if (Settings* settings = document.settings()) {
+ needsSiteSpecificQuirks = settings->needsSiteSpecificQuirks();
+ enforcesCSSMIMETypeInNoQuirksMode = settings->enforceCSSMIMETypeInNoQuirksMode();
+ useLegacyBackgroundSizeShorthandBehavior = settings->useLegacyBackgroundSizeShorthandBehavior();
+#if ENABLE(IOS_TEXT_AUTOSIZING)
+ textAutosizingEnabled = settings->textAutosizingEnabled();
+ WTFLogAlways("CSSParserContext %p CSSParserContext textAutosizingEnabled=%d", this, textAutosizingEnabled);
+#endif
+ }
+
#if PLATFORM(IOS)
// FIXME: Force the site specific quirk below to work on iOS. Investigating other site specific quirks
// to see if we can enable the preference all together is to be handled by:
@@ -970,6 +973,9 @@
break;
#if ENABLE(IOS_TEXT_AUTOSIZING)
case CSSPropertyWebkitTextSizeAdjust:
+ if (!parserContext.textAutosizingEnabled)
+ return false;
+
if (valueID == CSSValueAuto || valueID == CSSValueNone)
return true;
break;
@@ -2913,6 +2919,9 @@
break;
#if ENABLE(IOS_TEXT_AUTOSIZING)
case CSSPropertyWebkitTextSizeAdjust:
+ if (!isTextAutosizingEnabled())
+ return false;
+
if (id == CSSValueAuto || id == CSSValueNone)
validPrimitive = true;
else {
@@ -10245,6 +10254,13 @@
}
#endif
+#if ENABLE(IOS_TEXT_AUTOSIZING)
+bool CSSParser::isTextAutosizingEnabled() const
+{
+ return m_context.textAutosizingEnabled;
+}
+#endif
+
#if ENABLE(CSS_GRID_LAYOUT)
bool CSSParser::isCSSGridLayoutEnabled() const
{
Modified: trunk/Source/WebCore/css/CSSParser.h (201089 => 201090)
--- trunk/Source/WebCore/css/CSSParser.h 2016-05-18 19:03:38 UTC (rev 201089)
+++ trunk/Source/WebCore/css/CSSParser.h 2016-05-18 19:06:27 UTC (rev 201090)
@@ -204,6 +204,10 @@
RefPtr<CSSValue> parseColumnCount();
bool parseColumnsShorthand(bool important);
+#if ENABLE(IOS_TEXT_AUTOSIZING)
+ bool isTextAutosizingEnabled() const;
+#endif
+
#if ENABLE(CSS_GRID_LAYOUT)
bool isCSSGridLayoutEnabled() const;
RefPtr<CSSValue> parseGridPosition();
Modified: trunk/Source/WebCore/css/CSSParserMode.h (201089 => 201090)
--- trunk/Source/WebCore/css/CSSParserMode.h 2016-05-18 19:03:38 UTC (rev 201089)
+++ trunk/Source/WebCore/css/CSSParserMode.h 2016-05-18 19:06:27 UTC (rev 201090)
@@ -62,14 +62,17 @@
URL baseURL;
String charset;
- CSSParserMode mode;
- bool isHTMLDocument;
+ CSSParserMode mode { CSSStrictMode };
+ bool isHTMLDocument { false };
#if ENABLE(CSS_GRID_LAYOUT)
- bool cssGridLayoutEnabled;
+ bool cssGridLayoutEnabled { false };
#endif
- bool needsSiteSpecificQuirks;
- bool enforcesCSSMIMETypeInNoQuirksMode;
- bool useLegacyBackgroundSizeShorthandBehavior;
+#if ENABLE(IOS_TEXT_AUTOSIZING)
+ bool textAutosizingEnabled { false };
+#endif
+ bool needsSiteSpecificQuirks { false };
+ bool enforcesCSSMIMETypeInNoQuirksMode { true };
+ bool useLegacyBackgroundSizeShorthandBehavior { false };
};
bool operator==(const CSSParserContext&, const CSSParserContext&);
Modified: trunk/Source/WebCore/testing/InternalSettings.cpp (201089 => 201090)
--- trunk/Source/WebCore/testing/InternalSettings.cpp 2016-05-18 19:03:38 UTC (rev 201089)
+++ trunk/Source/WebCore/testing/InternalSettings.cpp 2016-05-18 19:06:27 UTC (rev 201090)
@@ -226,11 +226,12 @@
void InternalSettings::resetToConsistentState()
{
- page()->setPageScaleFactor(1, IntPoint(0, 0));
+ page()->setPageScaleFactor(1, { 0, 0 });
+ page()->mainFrame().setPageAndTextZoomFactors(1, 1);
page()->setCanStartMedia(true);
page()->settings().setForcePendingWebGLPolicy(false);
#if ENABLE(WIRELESS_PLAYBACK_TARGET)
- m_page->settings().setAllowsAirPlayForMediaPlayback(false);
+ page()->settings().setAllowsAirPlayForMediaPlayback(false);
#endif
m_backup.restoreTo(*settings());
Modified: trunk/Tools/ChangeLog (201089 => 201090)
--- trunk/Tools/ChangeLog 2016-05-18 19:03:38 UTC (rev 201089)
+++ trunk/Tools/ChangeLog 2016-05-18 19:06:27 UTC (rev 201090)
@@ -1,3 +1,14 @@
+2016-05-18 Simon Fraser <[email protected]>
+
+ REGRESSION (r200534) Command-+ no longer zooms pages
+ https://bugs.webkit.org/show_bug.cgi?id=157826
+ rdar://problem/26334636
+
+ Reviewed by Dean Jackson.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (resetWebPreferencesToConsistentValues): Remove ENABLE() #ifdefs that do nothing (see http://webkit.org/b/157828).
+
2016-05-18 Joanmarie Diggs <[email protected]>
[GTK] accessibility/meter-element.html is failing
Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (201089 => 201090)
--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm 2016-05-18 19:03:38 UTC (rev 201089)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm 2016-05-18 19:06:27 UTC (rev 201090)
@@ -953,9 +953,7 @@
[preferences setStorageTrackerEnabled:YES];
#endif
-#if ENABLE(IOS_TEXT_AUTOSIZING)
[preferences _setTextAutosizingEnabled:NO];
-#endif
// The back/forward cache is causing problems due to layouts during transition from one page to another.
// So, turn it off for now, but we might want to turn it back on some day.
@@ -971,13 +969,8 @@
ASSERT([preferences mockScrollbarsEnabled]);
#endif
-#if ENABLE(WEB_AUDIO)
[preferences setWebAudioEnabled:YES];
-#endif
-
-#if ENABLE(MEDIA_SOURCE)
[preferences setMediaSourceEnabled:YES];
-#endif
[preferences setShadowDOMEnabled:YES];
[preferences setCustomElementsEnabled:YES];