Title: [247588] branches/safari-608-branch/Source
Revision
247588
Author
kocsen_ch...@apple.com
Date
2019-07-18 13:23:36 -0700 (Thu, 18 Jul 2019)

Log Message

Cherry-pick r247470. rdar://problem/53229634

    outlook.live.com has odd viewport with edge gap
    https://bugs.webkit.org/show_bug.cgi?id=199822
    <rdar://problem/53029072>

    Reviewed by Wenson Hsieh.

    Source/WebCore:

    r244944 introduced a viewport width quirk because at certain screen size outlook.live.com's flex setup produced a slighly broken layout.
    We don't seem to need this quirk anymore (composed column's min-width is removed.)

    * page/Quirks.cpp:
    (WebCore::Quirks::shouldIgnoreShrinkToFitContent const): Deleted.
    (WebCore::Quirks::overriddenViewLayoutWidth const): Deleted.
    * page/Quirks.h:

    Source/WebKit:

    * WebProcess/WebPage/WebPage.h:
    * WebProcess/WebPage/ios/WebPageIOS.mm:
    (WebKit::WebPage::setViewportConfigurationViewLayoutSize):
    (WebKit::WebPage::dynamicViewportSizeUpdate):
    (WebKit::WebPage::resetViewportDefaultConfiguration):
    (WebKit::WebPage::immediatelyShrinkToFitContent):
    (WebKit::WebPage::viewLayoutSizeAdjustedForQuirks): Deleted.

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247470 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-608-branch/Source/WebCore/ChangeLog (247587 => 247588)


--- branches/safari-608-branch/Source/WebCore/ChangeLog	2019-07-18 20:23:33 UTC (rev 247587)
+++ branches/safari-608-branch/Source/WebCore/ChangeLog	2019-07-18 20:23:36 UTC (rev 247588)
@@ -1,5 +1,54 @@
 2019-07-17  Kocsen Chung  <kocsen_ch...@apple.com>
 
+        Cherry-pick r247470. rdar://problem/53229634
+
+    outlook.live.com has odd viewport with edge gap
+    https://bugs.webkit.org/show_bug.cgi?id=199822
+    <rdar://problem/53029072>
+    
+    Reviewed by Wenson Hsieh.
+    
+    Source/WebCore:
+    
+    r244944 introduced a viewport width quirk because at certain screen size outlook.live.com's flex setup produced a slighly broken layout.
+    We don't seem to need this quirk anymore (composed column's min-width is removed.)
+    
+    * page/Quirks.cpp:
+    (WebCore::Quirks::shouldIgnoreShrinkToFitContent const): Deleted.
+    (WebCore::Quirks::overriddenViewLayoutWidth const): Deleted.
+    * page/Quirks.h:
+    
+    Source/WebKit:
+    
+    * WebProcess/WebPage/WebPage.h:
+    * WebProcess/WebPage/ios/WebPageIOS.mm:
+    (WebKit::WebPage::setViewportConfigurationViewLayoutSize):
+    (WebKit::WebPage::dynamicViewportSizeUpdate):
+    (WebKit::WebPage::resetViewportDefaultConfiguration):
+    (WebKit::WebPage::immediatelyShrinkToFitContent):
+    (WebKit::WebPage::viewLayoutSizeAdjustedForQuirks): Deleted.
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247470 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-07-15  Zalan Bujtas  <za...@apple.com>
+
+            outlook.live.com has odd viewport with edge gap
+            https://bugs.webkit.org/show_bug.cgi?id=199822
+            <rdar://problem/53029072>
+
+            Reviewed by Wenson Hsieh.
+
+            r244944 introduced a viewport width quirk because at certain screen size outlook.live.com's flex setup produced a slighly broken layout.
+            We don't seem to need this quirk anymore (composed column's min-width is removed.)
+
+            * page/Quirks.cpp:
+            (WebCore::Quirks::shouldIgnoreShrinkToFitContent const): Deleted.
+            (WebCore::Quirks::overriddenViewLayoutWidth const): Deleted.
+            * page/Quirks.h:
+
+2019-07-17  Kocsen Chung  <kocsen_ch...@apple.com>
+
         Cherry-pick r247467. rdar://problem/53229768
 
     [Text autosizing] [iPadOS] Product label text is clipped in portrait mode on the front page of sephora.com

Modified: branches/safari-608-branch/Source/WebCore/page/Quirks.cpp (247587 => 247588)


--- branches/safari-608-branch/Source/WebCore/page/Quirks.cpp	2019-07-18 20:23:33 UTC (rev 247587)
+++ branches/safari-608-branch/Source/WebCore/page/Quirks.cpp	2019-07-18 20:23:36 UTC (rev 247588)
@@ -57,37 +57,6 @@
     return m_document && m_document->settings().needsSiteSpecificQuirks();
 }
 
-bool Quirks::shouldIgnoreShrinkToFitContent() const
-{
-#if PLATFORM(IOS_FAMILY)
-    if (!needsQuirks())
-        return false;
-
-    auto host = m_document->topDocument().url().host();
-    if (equalLettersIgnoringASCIICase(host, "outlook.live.com"))
-        return true;
-#endif
-    return false;
-}
-
-Optional<LayoutUnit> Quirks::overriddenViewLayoutWidth(LayoutUnit currentViewLayoutWidth) const
-{
-#if PLATFORM(IOS_FAMILY)
-    if (!needsQuirks())
-        return { };
-
-    auto host = m_document->topDocument().url().host();
-    if (equalLettersIgnoringASCIICase(host, "outlook.live.com")) {
-        if (currentViewLayoutWidth <= 989 || currentViewLayoutWidth >= 1132)
-            return { };
-        return { 989 };
-    }
-#else
-    UNUSED_PARAM(currentViewLayoutWidth);
-#endif
-    return { };
-}
-
 bool Quirks::shouldIgnoreInvalidSignal() const
 {
     return needsQuirks();

Modified: branches/safari-608-branch/Source/WebCore/page/Quirks.h (247587 => 247588)


--- branches/safari-608-branch/Source/WebCore/page/Quirks.h	2019-07-18 20:23:33 UTC (rev 247587)
+++ branches/safari-608-branch/Source/WebCore/page/Quirks.h	2019-07-18 20:23:36 UTC (rev 247588)
@@ -42,8 +42,6 @@
     ~Quirks();
 
     bool shouldIgnoreInvalidSignal() const;
-    WEBCORE_EXPORT bool shouldIgnoreShrinkToFitContent() const;
-    WEBCORE_EXPORT Optional<LayoutUnit> overriddenViewLayoutWidth(LayoutUnit currentViewLayoutWidth) const;
     bool needsFormControlToBeMouseFocusable() const;
     bool needsAutoplayPlayPauseEvents() const;
     bool needsSeekingSupportDisabled() const;

Modified: branches/safari-608-branch/Source/WebKit/ChangeLog (247587 => 247588)


--- branches/safari-608-branch/Source/WebKit/ChangeLog	2019-07-18 20:23:33 UTC (rev 247587)
+++ branches/safari-608-branch/Source/WebKit/ChangeLog	2019-07-18 20:23:36 UTC (rev 247588)
@@ -1,5 +1,54 @@
 2019-07-17  Kocsen Chung  <kocsen_ch...@apple.com>
 
+        Cherry-pick r247470. rdar://problem/53229634
+
+    outlook.live.com has odd viewport with edge gap
+    https://bugs.webkit.org/show_bug.cgi?id=199822
+    <rdar://problem/53029072>
+    
+    Reviewed by Wenson Hsieh.
+    
+    Source/WebCore:
+    
+    r244944 introduced a viewport width quirk because at certain screen size outlook.live.com's flex setup produced a slighly broken layout.
+    We don't seem to need this quirk anymore (composed column's min-width is removed.)
+    
+    * page/Quirks.cpp:
+    (WebCore::Quirks::shouldIgnoreShrinkToFitContent const): Deleted.
+    (WebCore::Quirks::overriddenViewLayoutWidth const): Deleted.
+    * page/Quirks.h:
+    
+    Source/WebKit:
+    
+    * WebProcess/WebPage/WebPage.h:
+    * WebProcess/WebPage/ios/WebPageIOS.mm:
+    (WebKit::WebPage::setViewportConfigurationViewLayoutSize):
+    (WebKit::WebPage::dynamicViewportSizeUpdate):
+    (WebKit::WebPage::resetViewportDefaultConfiguration):
+    (WebKit::WebPage::immediatelyShrinkToFitContent):
+    (WebKit::WebPage::viewLayoutSizeAdjustedForQuirks): Deleted.
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247470 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-07-15  Zalan Bujtas  <za...@apple.com>
+
+            outlook.live.com has odd viewport with edge gap
+            https://bugs.webkit.org/show_bug.cgi?id=199822
+            <rdar://problem/53029072>
+
+            Reviewed by Wenson Hsieh.
+
+            * WebProcess/WebPage/WebPage.h:
+            * WebProcess/WebPage/ios/WebPageIOS.mm:
+            (WebKit::WebPage::setViewportConfigurationViewLayoutSize):
+            (WebKit::WebPage::dynamicViewportSizeUpdate):
+            (WebKit::WebPage::resetViewportDefaultConfiguration):
+            (WebKit::WebPage::immediatelyShrinkToFitContent):
+            (WebKit::WebPage::viewLayoutSizeAdjustedForQuirks): Deleted.
+
+2019-07-17  Kocsen Chung  <kocsen_ch...@apple.com>
+
         Cherry-pick r247461. rdar://problem/53229637
 
     Make WKURLSchemeTask thread safe.

Modified: branches/safari-608-branch/Source/WebKit/WebProcess/WebPage/WebPage.h (247587 => 247588)


--- branches/safari-608-branch/Source/WebKit/WebProcess/WebPage/WebPage.h	2019-07-18 20:23:33 UTC (rev 247587)
+++ branches/safari-608-branch/Source/WebKit/WebProcess/WebPage/WebPage.h	2019-07-18 20:23:36 UTC (rev 247588)
@@ -1237,7 +1237,6 @@
     void didReceiveSyncWebPageMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&);
 
 #if PLATFORM(IOS_FAMILY)
-    WebCore::FloatSize viewLayoutSizeAdjustedForQuirks(const WebCore::FloatSize&);
     void resetViewportDefaultConfiguration(WebFrame* mainFrame, bool hasMobileDocType = false);
     enum class ZoomToInitialScale { No, Yes };
     void viewportConfigurationChanged(ZoomToInitialScale = ZoomToInitialScale::No);

Modified: branches/safari-608-branch/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (247587 => 247588)


--- branches/safari-608-branch/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm	2019-07-18 20:23:33 UTC (rev 247587)
+++ branches/safari-608-branch/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm	2019-07-18 20:23:36 UTC (rev 247588)
@@ -3058,16 +3058,6 @@
     return WTF::areEssentiallyEqual(a, b);
 }
 
-FloatSize WebPage::viewLayoutSizeAdjustedForQuirks(const FloatSize& size)
-{
-    if (auto* document = m_page->mainFrame().document()) {
-        LayoutUnit width { size.width() };
-        return { document->quirks().overriddenViewLayoutWidth(width).valueOr(width), size.height() };
-    }
-
-    return size;
-}
-
 void WebPage::setViewportConfigurationViewLayoutSize(const FloatSize& size, double scaleFactor, double minimumEffectiveDeviceWidth)
 {
     LOG_WITH_STREAM(VisibleRects, stream << "WebPage " << m_pageID << " setViewportConfigurationViewLayoutSize " << size << " scaleFactor " << scaleFactor << " minimumEffectiveDeviceWidth " << minimumEffectiveDeviceWidth);
@@ -3074,7 +3064,7 @@
 
     auto previousLayoutSizeScaleFactor = m_viewportConfiguration.layoutSizeScaleFactor();
     auto clampedMinimumEffectiveDevice = m_viewportConfiguration.isKnownToLayOutWiderThanViewport() ? WTF::nullopt : Optional<double>(minimumEffectiveDeviceWidth);
-    if (!m_viewportConfiguration.setViewLayoutSize(viewLayoutSizeAdjustedForQuirks(size), scaleFactor, WTFMove(clampedMinimumEffectiveDevice)))
+    if (!m_viewportConfiguration.setViewLayoutSize(size, scaleFactor, WTFMove(clampedMinimumEffectiveDevice)))
         return;
 
     auto zoomToInitialScale = ZoomToInitialScale::No;
@@ -3156,7 +3146,7 @@
 
     LOG_WITH_STREAM(VisibleRects, stream << "WebPage::dynamicViewportSizeUpdate setting view layout size to " << viewLayoutSize);
     bool viewportChanged = m_viewportConfiguration.setIsKnownToLayOutWiderThanViewport(false);
-    viewportChanged |= m_viewportConfiguration.setViewLayoutSize(viewLayoutSizeAdjustedForQuirks(viewLayoutSize));
+    viewportChanged |= m_viewportConfiguration.setViewLayoutSize(viewLayoutSize);
     if (viewportChanged)
         viewportConfigurationChanged();
 
@@ -3333,9 +3323,6 @@
         m_viewportConfiguration.setDefaultConfiguration(ViewportConfiguration::textDocumentParameters());
     else
         m_viewportConfiguration.setDefaultConfiguration(parametersForStandardFrame());
-
-    if (auto overriddenViewLayoutWidth = document->quirks().overriddenViewLayoutWidth(m_viewportConfiguration.layoutWidth()))
-        m_viewportConfiguration.setViewLayoutSize(FloatSize(*overriddenViewLayoutWidth, m_viewportConfiguration.layoutHeight()));
 }
 
 #if ENABLE(VIEWPORT_RESIZING)
@@ -3383,9 +3370,6 @@
     if (!view || !mainDocument)
         return false;
 
-    if (mainDocument->quirks().shouldIgnoreShrinkToFitContent())
-        return false;
-
     mainDocument->updateLayout();
 
     static const int toleratedHorizontalScrollingDistance = 20;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to