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: http://svn.webkit.org/repository/webkit/trunk@247470 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 72ec529..209d447 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2019-07-15 Zalan Bujtas <zalan@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-15 Saam Barati <sbarati@apple.com>
[WHLSL] Matrix memory layout should match HLSL by laying out columns linearly
diff --git a/Source/WebCore/page/Quirks.cpp b/Source/WebCore/page/Quirks.cpp
index 8b58b09..1c7ef8b 100644
--- a/Source/WebCore/page/Quirks.cpp
+++ b/Source/WebCore/page/Quirks.cpp
@@ -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();
diff --git a/Source/WebCore/page/Quirks.h b/Source/WebCore/page/Quirks.h
index 44092d2..28d2e54 100644
--- a/Source/WebCore/page/Quirks.h
+++ b/Source/WebCore/page/Quirks.h
@@ -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;
diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog
index 0f0140c..30055b0 100644
--- a/Source/WebKit/ChangeLog
+++ b/Source/WebKit/ChangeLog
@@ -1,3 +1,19 @@
+2019-07-15 Zalan Bujtas <zalan@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-11 Myles C. Maxfield <mmaxfield@apple.com>
New York font erroneously gets synthetic bold
diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.h b/Source/WebKit/WebProcess/WebPage/WebPage.h
index ba2e5e7..8d9a05b 100644
--- a/Source/WebKit/WebProcess/WebPage/WebPage.h
+++ b/Source/WebKit/WebProcess/WebPage/WebPage.h
@@ -1238,7 +1238,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);
diff --git a/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm b/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
index cf4f764..87910c6c 100644
--- a/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
+++ b/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
@@ -3068,23 +3068,13 @@
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);
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;
@@ -3166,7 +3156,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();
@@ -3343,9 +3333,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)
@@ -3393,9 +3380,6 @@
if (!view || !mainDocument)
return false;
- if (mainDocument->quirks().shouldIgnoreShrinkToFitContent())
- return false;
-
mainDocument->updateLayout();
static const int toleratedHorizontalScrollingDistance = 20;