Diff
Modified: trunk/Source/WebCore/ChangeLog (230505 => 230506)
--- trunk/Source/WebCore/ChangeLog 2018-04-11 00:41:09 UTC (rev 230505)
+++ trunk/Source/WebCore/ChangeLog 2018-04-11 01:02:53 UTC (rev 230506)
@@ -1,3 +1,20 @@
+2018-04-10 Wenson Hsieh <[email protected]>
+
+ [Extra zoom mode] Add a mechanism to zoom to fixed scales when double tapping in extra zoom mode
+ https://bugs.webkit.org/show_bug.cgi?id=184435
+ <rdar://problem/38726260>
+
+ Reviewed by Dean Jackson.
+
+ Expose the size of the platform view. By default, in extra zoom mode, this *not* the same as the minimum layout
+ size, since we lay out at a large width and then shrink down to real device dimensions when computing the
+ initial scale (see r229063).
+
+ ViewGestureGeometryCollector uses this in the process of computing a target zoom scale when double tapping.
+
+ * page/ViewportConfiguration.h:
+ (WebCore::ViewportConfiguration::viewSize const):
+
2018-04-10 Fujii Hironori <[email protected]>
[Win][WebKit] LibWebRTCProvider::webRTCAvailable is an undefined symbol
Modified: trunk/Source/WebCore/page/ViewportConfiguration.h (230505 => 230506)
--- trunk/Source/WebCore/page/ViewportConfiguration.h 2018-04-11 00:41:09 UTC (rev 230505)
+++ trunk/Source/WebCore/page/ViewportConfiguration.h 2018-04-11 01:02:53 UTC (rev 230506)
@@ -74,6 +74,8 @@
const IntSize& contentsSize() const { return m_contentSize; }
WEBCORE_EXPORT bool setContentsSize(const IntSize&);
+ WEBCORE_EXPORT FloatSize viewSize() const { return m_viewSize; }
+
const FloatSize& minimumLayoutSize() const { return m_minimumLayoutSize; }
WEBCORE_EXPORT bool setMinimumLayoutSize(const FloatSize&, const FloatSize& viewSize);
Modified: trunk/Source/WebKit/ChangeLog (230505 => 230506)
--- trunk/Source/WebKit/ChangeLog 2018-04-11 00:41:09 UTC (rev 230505)
+++ trunk/Source/WebKit/ChangeLog 2018-04-11 01:02:53 UTC (rev 230506)
@@ -1,5 +1,75 @@
2018-04-10 Wenson Hsieh <[email protected]>
+ [Extra zoom mode] Add a mechanism to zoom to fixed scales when double tapping in extra zoom mode
+ https://bugs.webkit.org/show_bug.cgi?id=184435
+ <rdar://problem/38726260>
+
+ Reviewed by Dean Jackson.
+
+ Adds support for an alternate codepath when computing a zoom rect when double tapping that doesn't take the hit-
+ tested node into account, and instead cycles the zoom scale between 2 fixed values (in addition to the initial
+ scale). In the next patch, these fixed scales will be determined by computing zoom scales needed to make most of
+ the text on the page legible (i.e. the first text legibility zoom scale), and another to make all of the text on
+ the page legible, with the exception of outliers (this is the second text legibility zoom scale).
+
+ See comments below for more detail.
+
+ * UIProcess/Cocoa/ViewGestureController.h:
+ * UIProcess/Cocoa/ViewGestureController.messages.in:
+ * UIProcess/ios/SmartMagnificationController.h:
+ * UIProcess/ios/SmartMagnificationController.messages.in:
+ * UIProcess/ios/SmartMagnificationController.mm:
+ (WebKit::SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture):
+ * UIProcess/mac/ViewGestureControllerMac.mm:
+ (WebKit::ViewGestureController::didCollectGeometryForSmartMagnificationGesture):
+ * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
+ (WebKit::ViewGestureGeometryCollector::dispatchDidCollectGeometryForSmartMagnificationGesture):
+
+ Rename the boolean `isReplacedElement` argument to `fitEntireRect` instead. The UI process only uses this on iOS
+ to determine whether or not to fit the entire element rect to the viewport and add padding. This patch renames
+ this variable because we are not zooming to a replaced element in the case where text legibility on the page
+ (rather than element geometry) is being used to figure out the zoom scale, but we still want to fit the entire
+ target rect to the viewport.
+
+ (WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
+
+ If text legiblity zoom scaling is preferred, then compute first and second-level text legibility zoom scales to
+ zoom to upon double tap (where the second zoom scale is greater than the first). To choose a target zoom
+ scale, choose the lowest target zoom scale that is at least a small amount less than the current scale. If
+ neither of the two scales fulfill this description, then zoom back out to the initial scale. This has the effect
+ of consistently cycling between all three zoom scales as the user double taps.
+
+ (WebKit::ViewGestureGeometryCollector::computeTextLegibilityScales):
+
+ Introduce a new helper method that computes and caches target scales to zoom to when double tapping to zoom. If
+ a cached pair of target scales is already present, it skips this computation and immediately returns it.
+
+ (WebKit::ViewGestureGeometryCollector::computeZoomInformationForNode):
+ (WebKit::ViewGestureGeometryCollector::computeMinimumAndMaximumViewportScales const):
+
+ Factor out logic to compute min and max zoom scales into a separate helper, and call it from both
+ computeZoomInformationForNode and computeTextLegibilityScales.
+
+ (WebKit::ViewGestureGeometryCollector::mainFrameDidLayout):
+
+ Invalidate cached text legibility scales when layout is triggered.
+
+ * WebProcess/WebPage/ViewGestureGeometryCollector.h:
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::mainFrameDidLayout):
+ * WebProcess/WebPage/WebPage.h:
+ (WebKit::WebPage::viewportConfiguration const):
+
+ Expose WebPage's ViewportConfiguration as a const reference.
+
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::platformPrefersTextLegibilityBasedZoomScaling const):
+
+ Adds a platform hook for opting into text-legibility-based zoom scaling instead of regular hit-testing-based
+ zoom scaling heuristics.
+
+2018-04-10 Wenson Hsieh <[email protected]>
+
Fix availability annotations for _WKAttachment SPI
https://bugs.webkit.org/show_bug.cgi?id=184473
<rdar://problem/39319732>
Modified: trunk/Source/WebKit/UIProcess/Cocoa/ViewGestureController.h (230505 => 230506)
--- trunk/Source/WebKit/UIProcess/Cocoa/ViewGestureController.h 2018-04-11 00:41:09 UTC (rev 230505)
+++ trunk/Source/WebKit/UIProcess/Cocoa/ViewGestureController.h 2018-04-11 01:02:53 UTC (rev 230506)
@@ -191,7 +191,7 @@
#if PLATFORM(MAC)
// Message handlers.
void didCollectGeometryForMagnificationGesture(WebCore::FloatRect visibleContentBounds, bool frameHandlesMagnificationGesture);
- void didCollectGeometryForSmartMagnificationGesture(WebCore::FloatPoint origin, WebCore::FloatRect renderRect, WebCore::FloatRect visibleContentBounds, bool isReplacedElement, double viewportMinimumScale, double viewportMaximumScale);
+ void didCollectGeometryForSmartMagnificationGesture(WebCore::FloatPoint origin, WebCore::FloatRect renderRect, WebCore::FloatRect visibleContentBounds, bool fitEntireRect, double viewportMinimumScale, double viewportMaximumScale);
void endMagnificationGesture();
Modified: trunk/Source/WebKit/UIProcess/Cocoa/ViewGestureController.messages.in (230505 => 230506)
--- trunk/Source/WebKit/UIProcess/Cocoa/ViewGestureController.messages.in 2018-04-11 00:41:09 UTC (rev 230505)
+++ trunk/Source/WebKit/UIProcess/Cocoa/ViewGestureController.messages.in 2018-04-11 01:02:53 UTC (rev 230506)
@@ -23,7 +23,7 @@
messages -> ViewGestureController {
#if PLATFORM(MAC)
DidCollectGeometryForMagnificationGesture(WebCore::FloatRect visibleContentBounds, bool frameHandlesMagnificationGesture)
- DidCollectGeometryForSmartMagnificationGesture(WebCore::FloatPoint origin, WebCore::FloatRect renderRect, WebCore::FloatRect visibleContentBounds, bool isReplacedElement, double viewportMinimumScale, double viewportMaximumScale)
+ DidCollectGeometryForSmartMagnificationGesture(WebCore::FloatPoint origin, WebCore::FloatRect renderRect, WebCore::FloatRect visibleContentBounds, bool fitEntireRect, double viewportMinimumScale, double viewportMaximumScale)
DidHitRenderTreeSizeThreshold()
#endif
}
Modified: trunk/Source/WebKit/UIProcess/ios/SmartMagnificationController.h (230505 => 230506)
--- trunk/Source/WebKit/UIProcess/ios/SmartMagnificationController.h 2018-04-11 00:41:09 UTC (rev 230505)
+++ trunk/Source/WebKit/UIProcess/ios/SmartMagnificationController.h 2018-04-11 01:02:53 UTC (rev 230506)
@@ -52,7 +52,7 @@
// IPC::MessageReceiver.
void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override;
- void didCollectGeometryForSmartMagnificationGesture(WebCore::FloatPoint origin, WebCore::FloatRect renderRect, WebCore::FloatRect visibleContentBounds, bool isReplacedElement, double viewportMinimumScale, double viewportMaximumScale);
+ void didCollectGeometryForSmartMagnificationGesture(WebCore::FloatPoint origin, WebCore::FloatRect renderRect, WebCore::FloatRect visibleContentBounds, bool fitEntireRect, double viewportMinimumScale, double viewportMaximumScale);
void magnify(WebCore::FloatPoint origin, WebCore::FloatRect targetRect, WebCore::FloatRect visibleContentRect, double viewportMinimumScale, double viewportMaximumScale);
void adjustSmartMagnificationTargetRectAndZoomScales(bool addMagnificationPadding, WebCore::FloatRect& targetRect, double& minimumScale, double& maximumScale);
Modified: trunk/Source/WebKit/UIProcess/ios/SmartMagnificationController.messages.in (230505 => 230506)
--- trunk/Source/WebKit/UIProcess/ios/SmartMagnificationController.messages.in 2018-04-11 00:41:09 UTC (rev 230505)
+++ trunk/Source/WebKit/UIProcess/ios/SmartMagnificationController.messages.in 2018-04-11 01:02:53 UTC (rev 230506)
@@ -23,7 +23,7 @@
#if PLATFORM(IOS)
messages -> SmartMagnificationController {
- DidCollectGeometryForSmartMagnificationGesture(WebCore::FloatPoint origin, WebCore::FloatRect renderRect, WebCore::FloatRect visibleContentBounds, bool isReplacedElement, double viewportMinimumScale, double viewportMaximumScale)
+ DidCollectGeometryForSmartMagnificationGesture(WebCore::FloatPoint origin, WebCore::FloatRect renderRect, WebCore::FloatRect visibleContentBounds, bool fitEntireRect, double viewportMinimumScale, double viewportMaximumScale)
Magnify(WebCore::FloatPoint origin, WebCore::FloatRect targetRect, WebCore::FloatRect visibleContentRect, double viewportMinimumScale, double viewportMaximumScale)
}
Modified: trunk/Source/WebKit/UIProcess/ios/SmartMagnificationController.mm (230505 => 230506)
--- trunk/Source/WebKit/UIProcess/ios/SmartMagnificationController.mm 2018-04-11 00:41:09 UTC (rev 230505)
+++ trunk/Source/WebKit/UIProcess/ios/SmartMagnificationController.mm 2018-04-11 01:02:53 UTC (rev 230506)
@@ -89,7 +89,7 @@
maximumScale = std::min(maximumScale, smartMagnificationMaximumScale);
}
-void SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture(FloatPoint origin, FloatRect targetRect, FloatRect visibleContentRect, bool isReplacedElement, double viewportMinimumScale, double viewportMaximumScale)
+void SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture(FloatPoint origin, FloatRect targetRect, FloatRect visibleContentRect, bool fitEntireRect, double viewportMinimumScale, double viewportMaximumScale)
{
if (targetRect.isEmpty()) {
// FIXME: If we don't zoom, send the tap along to text selection (see <rdar://problem/6810344>).
@@ -98,7 +98,7 @@
}
double minimumScale = viewportMinimumScale;
double maximumScale = viewportMaximumScale;
- adjustSmartMagnificationTargetRectAndZoomScales(!isReplacedElement, targetRect, minimumScale, maximumScale);
+ adjustSmartMagnificationTargetRectAndZoomScales(!fitEntireRect, targetRect, minimumScale, maximumScale);
// FIXME: Check if text selection wants to consume the double tap before we attempt magnification.
@@ -115,7 +115,7 @@
// For replaced elements like images, we want to fit the whole element
// in the view, so scale it down enough to make both dimensions fit if possible.
// For other elements, try to fit them horizontally.
- if ([m_contentView _zoomToRect:targetRect withOrigin:origin fitEntireRect:isReplacedElement minimumScale:minimumScale maximumScale:maximumScale minimumScrollDistance:minimumScrollDistance])
+ if ([m_contentView _zoomToRect:targetRect withOrigin:origin fitEntireRect:fitEntireRect minimumScale:minimumScale maximumScale:maximumScale minimumScrollDistance:minimumScrollDistance])
return;
// FIXME: If we still don't zoom, send the tap along to text selection (see <rdar://problem/6810344>).
Modified: trunk/Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm (230505 => 230506)
--- trunk/Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm 2018-04-11 00:41:09 UTC (rev 230505)
+++ trunk/Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm 2018-04-11 01:02:53 UTC (rev 230506)
@@ -207,7 +207,7 @@
return std::max(std::abs(a.x() - b.x()), std::max(std::abs(a.y() - b.y()), std::max(std::abs(a.width() - b.width()), std::abs(a.height() - b.height()))));
}
-void ViewGestureController::didCollectGeometryForSmartMagnificationGesture(FloatPoint origin, FloatRect renderRect, FloatRect visibleContentRect, bool isReplacedElement, double viewportMinimumScale, double viewportMaximumScale)
+void ViewGestureController::didCollectGeometryForSmartMagnificationGesture(FloatPoint origin, FloatRect renderRect, FloatRect visibleContentRect, bool fitEntireRect, double viewportMinimumScale, double viewportMaximumScale)
{
double currentScaleFactor = m_webPageProxy.pageScaleFactor();
@@ -235,7 +235,7 @@
// For replaced elements like images, we want to fit the whole element
// in the view, so scale it down enough to make both dimensions fit if possible.
- if (isReplacedElement)
+ if (fitEntireRect)
targetMagnification = std::min(targetMagnification, static_cast<double>(visibleContentRect.height() / viewportConstrainedUnscaledTargetRect.height()));
targetMagnification = std::min(std::max(targetMagnification, minMagnification), maxMagnification);
Modified: trunk/Source/WebKit/WebProcess/WebPage/ViewGestureGeometryCollector.cpp (230505 => 230506)
--- trunk/Source/WebKit/WebProcess/WebPage/ViewGestureGeometryCollector.cpp 2018-04-11 00:41:09 UTC (rev 230505)
+++ trunk/Source/WebKit/WebProcess/WebPage/ViewGestureGeometryCollector.cpp 2018-04-11 01:02:53 UTC (rev 230506)
@@ -64,13 +64,13 @@
WebProcess::singleton().removeMessageReceiver(Messages::ViewGestureGeometryCollector::messageReceiverName(), m_webPage.pageID());
}
-void ViewGestureGeometryCollector::dispatchDidCollectGeometryForSmartMagnificationGesture(FloatPoint origin, FloatRect targetRect, FloatRect visibleContentRect, bool isReplacedElement, double viewportMinimumScale, double viewportMaximumScale)
+void ViewGestureGeometryCollector::dispatchDidCollectGeometryForSmartMagnificationGesture(FloatPoint origin, FloatRect targetRect, FloatRect visibleContentRect, bool fitEntireRect, double viewportMinimumScale, double viewportMaximumScale)
{
#if PLATFORM(MAC)
- m_webPage.send(Messages::ViewGestureController::DidCollectGeometryForSmartMagnificationGesture(origin, targetRect, visibleContentRect, isReplacedElement, viewportMinimumScale, viewportMaximumScale));
+ m_webPage.send(Messages::ViewGestureController::DidCollectGeometryForSmartMagnificationGesture(origin, targetRect, visibleContentRect, fitEntireRect, viewportMinimumScale, viewportMaximumScale));
#endif
#if PLATFORM(IOS)
- m_webPage.send(Messages::SmartMagnificationController::DidCollectGeometryForSmartMagnificationGesture(origin, targetRect, visibleContentRect, isReplacedElement, viewportMinimumScale, viewportMaximumScale));
+ m_webPage.send(Messages::SmartMagnificationController::DidCollectGeometryForSmartMagnificationGesture(origin, targetRect, visibleContentRect, fitEntireRect, viewportMinimumScale, viewportMaximumScale));
#endif
}
@@ -81,6 +81,34 @@
if (m_webPage.mainWebFrame()->handlesPageScaleGesture())
return;
+ double viewportMinimumScale;
+ double viewportMaximumScale;
+
+#if PLATFORM(IOS)
+ if (m_webPage.platformPrefersTextLegibilityBasedZoomScaling()) {
+ static const double minimumScaleDifferenceForZooming = 0.05;
+
+ auto textLegibilityScales = computeTextLegibilityScales(viewportMinimumScale, viewportMaximumScale);
+ if (!textLegibilityScales) {
+ dispatchDidCollectGeometryForSmartMagnificationGesture({ }, { }, { }, false, 0, 0);
+ return;
+ }
+
+ float targetScale = m_webPage.viewportConfiguration().initialScale();
+ float currentScale = m_webPage.pageScaleFactor();
+ if (currentScale < textLegibilityScales->first - minimumScaleDifferenceForZooming)
+ targetScale = textLegibilityScales->first;
+ else if (currentScale < textLegibilityScales->second - minimumScaleDifferenceForZooming)
+ targetScale = textLegibilityScales->second;
+
+ FloatRect targetRectInContentCoordinates { origin, FloatSize() };
+ targetRectInContentCoordinates.inflate(m_webPage.viewportConfiguration().viewSize() / (2 * targetScale));
+
+ dispatchDidCollectGeometryForSmartMagnificationGesture(origin, targetRectInContentCoordinates, visibleContentRect, true, viewportMinimumScale, viewportMaximumScale);
+ return;
+ }
+#endif // PLATFORM(IOS)
+
IntPoint originInContentsSpace = m_webPage.mainFrameView()->windowToContents(roundedIntPoint(origin));
HitTestResult hitTestResult = HitTestResult(originInContentsSpace);
@@ -93,13 +121,38 @@
bool isReplaced;
FloatRect renderRect;
- double viewportMinimumScale;
- double viewportMaximumScale;
computeZoomInformationForNode(*node, origin, renderRect, isReplaced, viewportMinimumScale, viewportMaximumScale);
dispatchDidCollectGeometryForSmartMagnificationGesture(origin, renderRect, visibleContentRect, isReplaced, viewportMinimumScale, viewportMaximumScale);
}
+#if PLATFORM(IOS)
+
+std::optional<std::pair<double, double>> ViewGestureGeometryCollector::computeTextLegibilityScales(double& viewportMinimumScale, double& viewportMaximumScale)
+{
+ static const double defaultMaximumTextLegibilityScale = 1;
+
+ computeMinimumAndMaximumViewportScales(viewportMinimumScale, viewportMaximumScale);
+ if (m_cachedTextLegibilityScales)
+ return m_cachedTextLegibilityScales;
+
+ auto document = makeRefPtr(m_webPage.mainFrame()->document());
+ if (!document)
+ return std::nullopt;
+
+ document->updateLayoutIgnorePendingStylesheets();
+
+ // FIXME: Determine appropriate text legibility scales by examining text runs in the document. For now, hard code the second text legibility scale to be 1,
+ // and set the first text legibility scale to be the halfway point between the initial scale and 1.
+ double firstTextLegibilityScale = clampTo<double>((m_webPage.viewportConfiguration().initialScale() + defaultMaximumTextLegibilityScale) / 2, viewportMinimumScale, viewportMaximumScale);
+ double secondTextLegibilityScale = clampTo<double>(defaultMaximumTextLegibilityScale, viewportMinimumScale, viewportMaximumScale);
+
+ m_cachedTextLegibilityScales = std::optional<std::pair<double, double>> {{ firstTextLegibilityScale, secondTextLegibilityScale }};
+ return m_cachedTextLegibilityScales;
+}
+
+#endif // PLATFORM(IOS)
+
void ViewGestureGeometryCollector::computeZoomInformationForNode(Node& node, FloatPoint& origin, FloatRect& renderRect, bool& isReplaced, double& viewportMinimumScale, double& viewportMaximumScale)
{
renderRect = node.renderRect(&isReplaced);
@@ -117,6 +170,11 @@
isReplaced = true;
}
}
+ computeMinimumAndMaximumViewportScales(viewportMinimumScale, viewportMaximumScale);
+}
+
+void ViewGestureGeometryCollector::computeMinimumAndMaximumViewportScales(double& viewportMinimumScale, double& viewportMaximumScale) const
+{
#if PLATFORM(MAC)
viewportMinimumScale = 0;
viewportMaximumScale = std::numeric_limits<double>::max();
@@ -133,15 +191,20 @@
bool frameHandlesMagnificationGesture = m_webPage.mainWebFrame()->handlesPageScaleGesture();
m_webPage.send(Messages::ViewGestureController::DidCollectGeometryForMagnificationGesture(visibleContentRect, frameHandlesMagnificationGesture));
}
+#endif
void ViewGestureGeometryCollector::mainFrameDidLayout()
{
+#if PLATFORM(IOS)
+ m_cachedTextLegibilityScales.reset();
+#endif
+#if PLATFORM(MAC)
if (m_renderTreeSizeNotificationThreshold && m_webPage.renderTreeSize() >= m_renderTreeSizeNotificationThreshold) {
m_webPage.send(Messages::ViewGestureController::DidHitRenderTreeSizeThreshold());
m_renderTreeSizeNotificationThreshold = 0;
}
+#endif
}
-#endif
} // namespace WebKit
Modified: trunk/Source/WebKit/WebProcess/WebPage/ViewGestureGeometryCollector.h (230505 => 230506)
--- trunk/Source/WebKit/WebProcess/WebPage/ViewGestureGeometryCollector.h 2018-04-11 00:41:09 UTC (rev 230505)
+++ trunk/Source/WebKit/WebProcess/WebPage/ViewGestureGeometryCollector.h 2018-04-11 01:02:53 UTC (rev 230506)
@@ -60,14 +60,22 @@
void renderTreeSizeNotificationTimerFired();
#endif
- void dispatchDidCollectGeometryForSmartMagnificationGesture(WebCore::FloatPoint origin, WebCore::FloatRect targetRect, WebCore::FloatRect visibleContentRect, bool isReplacedElement, double viewportMinimumScale, double viewportMaximumScale);
+ void dispatchDidCollectGeometryForSmartMagnificationGesture(WebCore::FloatPoint origin, WebCore::FloatRect targetRect, WebCore::FloatRect visibleContentRect, bool fitEntireRect, double viewportMinimumScale, double viewportMaximumScale);
void computeZoomInformationForNode(WebCore::Node&, WebCore::FloatPoint& origin, WebCore::FloatRect& renderRect, bool& isReplaced, double& viewportMinimumScale, double& viewportMaximumScale);
+ void computeMinimumAndMaximumViewportScales(double& viewportMinimumScale, double& viewportMaximumScale) const;
+#if PLATFORM(IOS)
+ std::optional<std::pair<double, double>> computeTextLegibilityScales(double& viewportMinimumScale, double& viewportMaximumScale);
+#endif
+
WebPage& m_webPage;
#if PLATFORM(MAC)
uint64_t m_renderTreeSizeNotificationThreshold;
#endif
+#if PLATFORM(IOS)
+ std::optional<std::pair<double, double>> m_cachedTextLegibilityScales;
+#endif
};
} // namespace WebKit
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (230505 => 230506)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2018-04-11 00:41:09 UTC (rev 230505)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2018-04-11 01:02:53 UTC (rev 230506)
@@ -3820,7 +3820,7 @@
m_cachedPageCount = pageCount;
}
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
m_viewGestureGeometryCollector->mainFrameDidLayout();
#endif
#if PLATFORM(IOS)
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (230505 => 230506)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2018-04-11 00:41:09 UTC (rev 230505)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2018-04-11 01:02:53 UTC (rev 230506)
@@ -891,6 +891,9 @@
void applicationWillEnterForeground(bool isSuspendedUnderLock);
void applicationDidBecomeActive();
void completePendingSyntheticClickForContentChangeObserver();
+
+ bool platformPrefersTextLegibilityBasedZoomScaling() const;
+ const WebCore::ViewportConfiguration& viewportConfiguration() const { return m_viewportConfiguration; }
#endif
#if ENABLE(IOS_TOUCH_EVENTS)
Modified: trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (230505 => 230506)
--- trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2018-04-11 00:41:09 UTC (rev 230505)
+++ trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2018-04-11 01:02:53 UTC (rev 230506)
@@ -3471,6 +3471,15 @@
}
#endif
+bool WebPage::platformPrefersTextLegibilityBasedZoomScaling() const
+{
+#if ENABLE(EXTRA_ZOOM_MODE)
+ return true;
+#else
+ return false;
+#endif
+}
+
#if ENABLE(MEDIA_STREAM)
void WebPage::prepareToSendUserMediaPermissionRequest()
{