Changeset 247470 in webkit
- Timestamp:
- Jul 15, 2019 9:24:16 PM (5 years ago)
- Location:
- trunk/Source
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r247468 r247470 1 2019-07-15 Zalan Bujtas <zalan@apple.com> 2 3 outlook.live.com has odd viewport with edge gap 4 https://bugs.webkit.org/show_bug.cgi?id=199822 5 <rdar://problem/53029072> 6 7 Reviewed by Wenson Hsieh. 8 9 r244944 introduced a viewport width quirk because at certain screen size outlook.live.com's flex setup produced a slighly broken layout. 10 We don't seem to need this quirk anymore (composed column's min-width is removed.) 11 12 * page/Quirks.cpp: 13 (WebCore::Quirks::shouldIgnoreShrinkToFitContent const): Deleted. 14 (WebCore::Quirks::overriddenViewLayoutWidth const): Deleted. 15 * page/Quirks.h: 16 1 17 2019-07-15 Saam Barati <sbarati@apple.com> 2 18 -
trunk/Source/WebCore/page/Quirks.cpp
r247444 r247470 58 58 } 59 59 60 bool Quirks::shouldIgnoreShrinkToFitContent() const61 {62 #if PLATFORM(IOS_FAMILY)63 if (!needsQuirks())64 return false;65 66 auto host = m_document->topDocument().url().host();67 if (equalLettersIgnoringASCIICase(host, "outlook.live.com"))68 return true;69 #endif70 return false;71 }72 73 Optional<LayoutUnit> Quirks::overriddenViewLayoutWidth(LayoutUnit currentViewLayoutWidth) const74 {75 #if PLATFORM(IOS_FAMILY)76 if (!needsQuirks())77 return { };78 79 auto host = m_document->topDocument().url().host();80 if (equalLettersIgnoringASCIICase(host, "outlook.live.com")) {81 if (currentViewLayoutWidth <= 989 || currentViewLayoutWidth >= 1132)82 return { };83 return { 989 };84 }85 #else86 UNUSED_PARAM(currentViewLayoutWidth);87 #endif88 return { };89 }90 91 60 bool Quirks::shouldIgnoreInvalidSignal() const 92 61 { -
trunk/Source/WebCore/page/Quirks.h
r247444 r247470 43 43 44 44 bool shouldIgnoreInvalidSignal() const; 45 WEBCORE_EXPORT bool shouldIgnoreShrinkToFitContent() const;46 WEBCORE_EXPORT Optional<LayoutUnit> overriddenViewLayoutWidth(LayoutUnit currentViewLayoutWidth) const;47 45 bool needsFormControlToBeMouseFocusable() const; 48 46 bool needsAutoplayPlayPauseEvents() const; -
trunk/Source/WebKit/ChangeLog
r247462 r247470 1 2019-07-15 Zalan Bujtas <zalan@apple.com> 2 3 outlook.live.com has odd viewport with edge gap 4 https://bugs.webkit.org/show_bug.cgi?id=199822 5 <rdar://problem/53029072> 6 7 Reviewed by Wenson Hsieh. 8 9 * WebProcess/WebPage/WebPage.h: 10 * WebProcess/WebPage/ios/WebPageIOS.mm: 11 (WebKit::WebPage::setViewportConfigurationViewLayoutSize): 12 (WebKit::WebPage::dynamicViewportSizeUpdate): 13 (WebKit::WebPage::resetViewportDefaultConfiguration): 14 (WebKit::WebPage::immediatelyShrinkToFitContent): 15 (WebKit::WebPage::viewLayoutSizeAdjustedForQuirks): Deleted. 16 1 17 2019-07-11 Myles C. Maxfield <mmaxfield@apple.com> 2 18 -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.h
r247460 r247470 1239 1239 1240 1240 #if PLATFORM(IOS_FAMILY) 1241 WebCore::FloatSize viewLayoutSizeAdjustedForQuirks(const WebCore::FloatSize&);1242 1241 void resetViewportDefaultConfiguration(WebFrame* mainFrame, bool hasMobileDocType = false); 1243 1242 enum class ZoomToInitialScale { No, Yes }; -
trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
r247444 r247470 3069 3069 } 3070 3070 3071 FloatSize WebPage::viewLayoutSizeAdjustedForQuirks(const FloatSize& size)3072 {3073 if (auto* document = m_page->mainFrame().document()) {3074 LayoutUnit width { size.width() };3075 return { document->quirks().overriddenViewLayoutWidth(width).valueOr(width), size.height() };3076 }3077 3078 return size;3079 }3080 3081 3071 void WebPage::setViewportConfigurationViewLayoutSize(const FloatSize& size, double scaleFactor, double minimumEffectiveDeviceWidth) 3082 3072 { … … 3085 3075 auto previousLayoutSizeScaleFactor = m_viewportConfiguration.layoutSizeScaleFactor(); 3086 3076 auto clampedMinimumEffectiveDevice = m_viewportConfiguration.isKnownToLayOutWiderThanViewport() ? WTF::nullopt : Optional<double>(minimumEffectiveDeviceWidth); 3087 if (!m_viewportConfiguration.setViewLayoutSize( viewLayoutSizeAdjustedForQuirks(size), scaleFactor, WTFMove(clampedMinimumEffectiveDevice)))3077 if (!m_viewportConfiguration.setViewLayoutSize(size, scaleFactor, WTFMove(clampedMinimumEffectiveDevice))) 3088 3078 return; 3089 3079 … … 3167 3157 LOG_WITH_STREAM(VisibleRects, stream << "WebPage::dynamicViewportSizeUpdate setting view layout size to " << viewLayoutSize); 3168 3158 bool viewportChanged = m_viewportConfiguration.setIsKnownToLayOutWiderThanViewport(false); 3169 viewportChanged |= m_viewportConfiguration.setViewLayoutSize(viewLayoutSize AdjustedForQuirks(viewLayoutSize));3159 viewportChanged |= m_viewportConfiguration.setViewLayoutSize(viewLayoutSize); 3170 3160 if (viewportChanged) 3171 3161 viewportConfigurationChanged(); … … 3344 3334 else 3345 3335 m_viewportConfiguration.setDefaultConfiguration(parametersForStandardFrame()); 3346 3347 if (auto overriddenViewLayoutWidth = document->quirks().overriddenViewLayoutWidth(m_viewportConfiguration.layoutWidth()))3348 m_viewportConfiguration.setViewLayoutSize(FloatSize(*overriddenViewLayoutWidth, m_viewportConfiguration.layoutHeight()));3349 3336 } 3350 3337 … … 3392 3379 auto mainDocument = makeRefPtr(mainFrame->document()); 3393 3380 if (!view || !mainDocument) 3394 return false;3395 3396 if (mainDocument->quirks().shouldIgnoreShrinkToFitContent())3397 3381 return false; 3398 3382
Note: See TracChangeset
for help on using the changeset viewer.