WebKit Bugzilla
Attachment 369000 Details for
Bug 197573
: [iOS] outlook.live.com: Compose email frame not fully visible and not scrollable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197573-20190503151553.patch (text/plain), 9.07 KB, created by
zalan
on 2019-05-03 15:15:54 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2019-05-03 15:15:54 PDT
Size:
9.07 KB
patch
obsolete
>Subversion Revision: 244855 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 08fd31b57ea31fbba7a91d615ac63e2a59b03a9c..08e3a8d671908d56db207e3fa509c04b822b6168 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2019-05-03 Zalan Bujtas <zalan@apple.com> >+ >+ [iOS] outlook.live.com: Compose email frame not fully visible and not scrollable >+ https://bugs.webkit.org/show_bug.cgi?id=197573 >+ <rdar://problem/48008441> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The outlook mail view's flex column setup produces a somewhat unfortunate layout at certain viewport widths. >+ This patch addresses the issue by ensuring that we never fall into that range. >+ >+ * page/Quirks.cpp: >+ (WebCore::Quirks::shouldIgnoreShrinkToFitContent const): >+ (WebCore::Quirks::overriddenViewportLayoutWidth const): >+ * page/Quirks.h: >+ > 2019-05-01 Jiewen Tan <jiewen_tan@apple.com> > > Move Document::domainIsRegisterable to SecurityOrigin::isMatchingRegistrableDomainSuffix >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 1df7f99a6fcd250bf7e71e12142725391433b181..f7896c7b6a4740cd3ee335f8f3b9cd2c80494da0 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,18 @@ >+2019-05-03 Zalan Bujtas <zalan@apple.com> >+ >+ [iOS] outlook.live.com: Compose email frame not fully visible and not scrollable >+ https://bugs.webkit.org/show_bug.cgi?id=197573 >+ <rdar://problem/48008441> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebProcess/WebPage/WebPage.h: >+ * WebProcess/WebPage/ios/WebPageIOS.mm: >+ (WebKit::WebPage::adjustLayoutSizeIfNeeded): >+ (WebKit::WebPage::setViewportConfigurationViewLayoutSize): >+ (WebKit::WebPage::dynamicViewportSizeUpdate): >+ (WebKit::WebPage::immediatelyShrinkToFitContent): >+ > 2019-05-01 Alex Christensen <achristensen@webkit.org> > > Protect against null crash in fetchDiskCacheEntries >diff --git a/Source/WebCore/page/Quirks.cpp b/Source/WebCore/page/Quirks.cpp >index 57c0546dfdd4b2eddeb81eb92440467c8fa3ab71..3be92b3da99bd59bfd10d8d3ff8c861b0a6e326f 100644 >--- a/Source/WebCore/page/Quirks.cpp >+++ b/Source/WebCore/page/Quirks.cpp >@@ -55,6 +55,35 @@ inline bool Quirks::needsQuirks() const > 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 }; >+ } >+#endif >+ return { }; >+} >+ > bool Quirks::shouldIgnoreInvalidSignal() const > { > if (!needsQuirks()) >diff --git a/Source/WebCore/page/Quirks.h b/Source/WebCore/page/Quirks.h >index 6fb60a03caede84e68d115a68a372539a98f5b8e..a53d587853ca210c9dac4dfc8dfab4c66e59ab0c 100644 >--- a/Source/WebCore/page/Quirks.h >+++ b/Source/WebCore/page/Quirks.h >@@ -38,6 +38,8 @@ public: > ~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/WebCore/page/ViewportConfiguration.h b/Source/WebCore/page/ViewportConfiguration.h >index 8d71a65e886829286c35d1e04430d354a40e5187..cd7c05d65f7e1eb178f5ff6e5319e1dbaaa751f0 100644 >--- a/Source/WebCore/page/ViewportConfiguration.h >+++ b/Source/WebCore/page/ViewportConfiguration.h >@@ -118,6 +118,7 @@ public: > > WEBCORE_EXPORT IntSize layoutSize() const; > WEBCORE_EXPORT int layoutWidth() const; >+ WEBCORE_EXPORT int layoutHeight() const; > WEBCORE_EXPORT double initialScale() const; > WEBCORE_EXPORT double initialScaleIgnoringContentSize() const; > WEBCORE_EXPORT double minimumScale() const; >@@ -146,7 +147,6 @@ private: > void updateConfiguration(); > double viewportArgumentsLength(double length) const; > double initialScaleFromSize(double width, double height, bool shouldIgnoreScalingConstraints) const; >- int layoutHeight() const; > > bool shouldOverrideDeviceWidthAndShrinkToFit() const; > bool shouldIgnoreScalingConstraintsRegardlessOfContentSize() const; >diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.h b/Source/WebKit/WebProcess/WebPage/WebPage.h >index 8fbee418f6c038ca116d7f70450d8f040d4e6d16..5050cb97abc4e657409185cada45b20ab6e1b730 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.h >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.h >@@ -1211,6 +1211,7 @@ private: > void didReceiveSyncWebPageMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&); > > #if PLATFORM(IOS_FAMILY) >+ WebCore::FloatSize adjustedViewLayoutSize(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 83f3126ee5dfcd82ea50b25113b2545be981510d..54cd36331650ca7b447b637bc6d91bb0b26bb955 100644 >--- a/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >+++ b/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >@@ -2786,13 +2786,20 @@ static inline bool areEssentiallyEqualAsFloat(float a, float b) > return WTF::areEssentiallyEqual(a, b); > } > >+FloatSize WebPage::adjustedViewLayoutSize(const FloatSize& size) >+{ >+ if (auto* document = m_page->mainFrame().document()) >+ return { document->quirks().overriddenViewLayoutWidth(size.width()).valueOr(size.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(size, scaleFactor, WTFMove(clampedMinimumEffectiveDevice))) >+ if (!m_viewportConfiguration.setViewLayoutSize(adjustedViewLayoutSize(size), scaleFactor, WTFMove(clampedMinimumEffectiveDevice))) > return; > > auto zoomToInitialScale = ZoomToInitialScale::No; >@@ -2875,7 +2882,7 @@ void WebPage::dynamicViewportSizeUpdate(const FloatSize& viewLayoutSize, const W > > LOG_WITH_STREAM(VisibleRects, stream << "WebPage::dynamicViewportSizeUpdate setting view layout size to " << viewLayoutSize); > bool viewportChanged = m_viewportConfiguration.setIsKnownToLayOutWiderThanViewport(false); >- viewportChanged |= m_viewportConfiguration.setViewLayoutSize(viewLayoutSize); >+ viewportChanged |= m_viewportConfiguration.setViewLayoutSize(adjustedViewLayoutSize(viewLayoutSize)); > if (viewportChanged) > viewportConfigurationChanged(); > >@@ -3044,7 +3051,7 @@ void WebPage::resetViewportDefaultConfiguration(WebFrame* frame, bool hasMobileD > return; > } > >- Document* document = frame->coreFrame()->document(); >+ auto* document = frame->coreFrame()->document(); > if (document->isImageDocument()) > m_viewportConfiguration.setDefaultConfiguration(ViewportConfiguration::imageDocumentParameters()); > else if (document->isTextDocument()) >@@ -3052,6 +3059,9 @@ void WebPage::resetViewportDefaultConfiguration(WebFrame* frame, bool hasMobileD > else > m_viewportConfiguration.setDefaultConfiguration(parametersForStandardFrame()); > m_viewportConfiguration.setIsKnownToLayOutWiderThanViewport(false); >+ >+ if (auto overriddenViewLayoutWidth = document->quirks().overriddenViewLayoutWidth(m_viewportConfiguration.layoutWidth())) >+ m_viewportConfiguration.setViewLayoutSize(FloatSize(*overriddenViewLayoutWidth, m_viewportConfiguration.layoutHeight())); > } > > #if ENABLE(VIEWPORT_RESIZING) >@@ -3087,6 +3097,9 @@ bool WebPage::immediatelyShrinkToFitContent() > if (!view || !mainDocument) > return false; > >+ if (mainDocument->quirks().shouldIgnoreShrinkToFitContent()) >+ return false; >+ > mainDocument->updateLayout(); > > static const int toleratedHorizontalScrollingDistance = 20;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197573
:
369000
|
369017
|
369034