Title: [201147] branches/safari-602.1.32-branch
Revision
201147
Author
[email protected]
Date
2016-05-19 01:40:55 -0700 (Thu, 19 May 2016)

Log Message

Merge r201090. rdar://problem/26334636

Modified Paths

Added Paths

Diff

Modified: branches/safari-602.1.32-branch/LayoutTests/ChangeLog (201146 => 201147)


--- branches/safari-602.1.32-branch/LayoutTests/ChangeLog	2016-05-19 08:40:47 UTC (rev 201146)
+++ branches/safari-602.1.32-branch/LayoutTests/ChangeLog	2016-05-19 08:40:55 UTC (rev 201147)
@@ -1,5 +1,28 @@
 2016-05-19  Babak Shafiei  <[email protected]>
 
+        Merge r201090. rdar://problem/26334636
+
+    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-19  Babak Shafiei  <[email protected]>
+
         Merge r201065. rdar://problem/26333137
 
     2016-05-17  Dean Jackson  <[email protected]>

Modified: branches/safari-602.1.32-branch/LayoutTests/fast/text-autosizing/ios/line-height-text-autosizing.html (201146 => 201147)


--- branches/safari-602.1.32-branch/LayoutTests/fast/text-autosizing/ios/line-height-text-autosizing.html	2016-05-19 08:40:47 UTC (rev 201146)
+++ branches/safari-602.1.32-branch/LayoutTests/fast/text-autosizing/ios/line-height-text-autosizing.html	2016-05-19 08:40:55 UTC (rev 201147)
@@ -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: branches/safari-602.1.32-branch/LayoutTests/fast/text-autosizing/ios/percent-adjust-length-line-height.html (201146 => 201147)


--- branches/safari-602.1.32-branch/LayoutTests/fast/text-autosizing/ios/percent-adjust-length-line-height.html	2016-05-19 08:40:47 UTC (rev 201146)
+++ branches/safari-602.1.32-branch/LayoutTests/fast/text-autosizing/ios/percent-adjust-length-line-height.html	2016-05-19 08:40:55 UTC (rev 201147)
@@ -2,6 +2,12 @@
 <head>
     <meta name="viewport" content="user-scalable=no, width=320">
     <title>&lt;rdar://problem/6646628&gt; 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: branches/safari-602.1.32-branch/LayoutTests/fast/text-autosizing/ios/percent-adjust-number-line-height.html (201146 => 201147)


--- branches/safari-602.1.32-branch/LayoutTests/fast/text-autosizing/ios/percent-adjust-number-line-height.html	2016-05-19 08:40:47 UTC (rev 201146)
+++ branches/safari-602.1.32-branch/LayoutTests/fast/text-autosizing/ios/percent-adjust-number-line-height.html	2016-05-19 08:40:55 UTC (rev 201147)
@@ -2,6 +2,12 @@
 <head>
     <meta name="viewport" content="user-scalable=no, width=320">
     <title>&lt;rdar://problem/6646628&gt; 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: branches/safari-602.1.32-branch/LayoutTests/fast/text-autosizing/ios/percent-adjust-percent-line-height.html (201146 => 201147)


--- branches/safari-602.1.32-branch/LayoutTests/fast/text-autosizing/ios/percent-adjust-percent-line-height.html	2016-05-19 08:40:47 UTC (rev 201146)
+++ branches/safari-602.1.32-branch/LayoutTests/fast/text-autosizing/ios/percent-adjust-percent-line-height.html	2016-05-19 08:40:55 UTC (rev 201147)
@@ -2,6 +2,12 @@
 <head>
     <meta name="viewport" content="user-scalable=no, width=320">
     <title>&lt;rdar://problem/12607898&gt; 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: branches/safari-602.1.32-branch/LayoutTests/fast/text-autosizing/mac/text-size-adjust-text-zoom-expected.html (0 => 201147)


--- branches/safari-602.1.32-branch/LayoutTests/fast/text-autosizing/mac/text-size-adjust-text-zoom-expected.html	                        (rev 0)
+++ branches/safari-602.1.32-branch/LayoutTests/fast/text-autosizing/mac/text-size-adjust-text-zoom-expected.html	2016-05-19 08:40:55 UTC (rev 201147)
@@ -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: branches/safari-602.1.32-branch/LayoutTests/fast/text-autosizing/mac/text-size-adjust-text-zoom.html (0 => 201147)


--- branches/safari-602.1.32-branch/LayoutTests/fast/text-autosizing/mac/text-size-adjust-text-zoom.html	                        (rev 0)
+++ branches/safari-602.1.32-branch/LayoutTests/fast/text-autosizing/mac/text-size-adjust-text-zoom.html	2016-05-19 08:40:55 UTC (rev 201147)
@@ -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: branches/safari-602.1.32-branch/LayoutTests/platform/mac/TestExpectations (201146 => 201147)


--- branches/safari-602.1.32-branch/LayoutTests/platform/mac/TestExpectations	2016-05-19 08:40:47 UTC (rev 201146)
+++ branches/safari-602.1.32-branch/LayoutTests/platform/mac/TestExpectations	2016-05-19 08:40:55 UTC (rev 201147)
@@ -17,6 +17,7 @@
 fast/url/user-visible [ Pass ]
 
 fast/text-autosizing/ios [ Pass ]
+fast/text-autosizing/mac [ Pass ]
 
 #//////////////////////////////////////////////////////////////////////////////////////////
 # End platform-specific directories.

Modified: branches/safari-602.1.32-branch/LayoutTests/platform/mac-wk2/TestExpectations (201146 => 201147)


--- branches/safari-602.1.32-branch/LayoutTests/platform/mac-wk2/TestExpectations	2016-05-19 08:40:47 UTC (rev 201146)
+++ branches/safari-602.1.32-branch/LayoutTests/platform/mac-wk2/TestExpectations	2016-05-19 08:40:55 UTC (rev 201147)
@@ -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: branches/safari-602.1.32-branch/Source/WebCore/ChangeLog (201146 => 201147)


--- branches/safari-602.1.32-branch/Source/WebCore/ChangeLog	2016-05-19 08:40:47 UTC (rev 201146)
+++ branches/safari-602.1.32-branch/Source/WebCore/ChangeLog	2016-05-19 08:40:55 UTC (rev 201147)
@@ -1,5 +1,36 @@
 2016-05-19  Babak Shafiei  <[email protected]>
 
+        Merge r201090. rdar://problem/26334636
+
+    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-19  Babak Shafiei  <[email protected]>
+
         Merge r201065. rdar://problem/26333137
 
     2016-05-17  Dean Jackson  <[email protected]>

Modified: branches/safari-602.1.32-branch/Source/WebCore/css/CSSParser.cpp (201146 => 201147)


--- branches/safari-602.1.32-branch/Source/WebCore/css/CSSParser.cpp	2016-05-19 08:40:47 UTC (rev 201146)
+++ branches/safari-602.1.32-branch/Source/WebCore/css/CSSParser.cpp	2016-05-19 08:40:55 UTC (rev 201147)
@@ -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;
@@ -2931,6 +2937,9 @@
         break;
 #if ENABLE(IOS_TEXT_AUTOSIZING)
     case CSSPropertyWebkitTextSizeAdjust:
+        if (!isTextAutosizingEnabled())
+            return false;
+
         if (id == CSSValueAuto || id == CSSValueNone)
             validPrimitive = true;
         else {
@@ -10250,6 +10259,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: branches/safari-602.1.32-branch/Source/WebCore/css/CSSParser.h (201146 => 201147)


--- branches/safari-602.1.32-branch/Source/WebCore/css/CSSParser.h	2016-05-19 08:40:47 UTC (rev 201146)
+++ branches/safari-602.1.32-branch/Source/WebCore/css/CSSParser.h	2016-05-19 08:40:55 UTC (rev 201147)
@@ -207,6 +207,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: branches/safari-602.1.32-branch/Source/WebCore/css/CSSParserMode.h (201146 => 201147)


--- branches/safari-602.1.32-branch/Source/WebCore/css/CSSParserMode.h	2016-05-19 08:40:47 UTC (rev 201146)
+++ branches/safari-602.1.32-branch/Source/WebCore/css/CSSParserMode.h	2016-05-19 08:40:55 UTC (rev 201147)
@@ -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: branches/safari-602.1.32-branch/Source/WebCore/testing/InternalSettings.cpp (201146 => 201147)


--- branches/safari-602.1.32-branch/Source/WebCore/testing/InternalSettings.cpp	2016-05-19 08:40:47 UTC (rev 201146)
+++ branches/safari-602.1.32-branch/Source/WebCore/testing/InternalSettings.cpp	2016-05-19 08:40:55 UTC (rev 201147)
@@ -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: branches/safari-602.1.32-branch/Tools/ChangeLog (201146 => 201147)


--- branches/safari-602.1.32-branch/Tools/ChangeLog	2016-05-19 08:40:47 UTC (rev 201146)
+++ branches/safari-602.1.32-branch/Tools/ChangeLog	2016-05-19 08:40:55 UTC (rev 201147)
@@ -1,3 +1,18 @@
+2016-05-19  Babak Shafiei  <[email protected]>
+
+        Merge r201090. rdar://problem/26334636
+
+    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-17  Babak Shafiei  <[email protected]>
 
         Merge r200670.

Modified: branches/safari-602.1.32-branch/Tools/DumpRenderTree/mac/DumpRenderTree.mm (201146 => 201147)


--- branches/safari-602.1.32-branch/Tools/DumpRenderTree/mac/DumpRenderTree.mm	2016-05-19 08:40:47 UTC (rev 201146)
+++ branches/safari-602.1.32-branch/Tools/DumpRenderTree/mac/DumpRenderTree.mm	2016-05-19 08:40:55 UTC (rev 201147)
@@ -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];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to