Changeset 230506 in webkit


Ignore:
Timestamp:
Apr 10, 2018 6:02:53 PM (6 years ago)
Author:
Wenson Hsieh
Message:

[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.

Source/WebCore:

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):

Source/WebKit:

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.

Location:
trunk/Source
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r230504 r230506  
     12018-04-10  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        [Extra zoom mode] Add a mechanism to zoom to fixed scales when double tapping in extra zoom mode
     4        https://bugs.webkit.org/show_bug.cgi?id=184435
     5        <rdar://problem/38726260>
     6
     7        Reviewed by Dean Jackson.
     8
     9        Expose the size of the platform view. By default, in extra zoom mode, this *not* the same as the minimum layout
     10        size, since we lay out at a large width and then shrink down to real device dimensions when computing the
     11        initial scale (see r229063).
     12
     13        ViewGestureGeometryCollector uses this in the process of computing a target zoom scale when double tapping.
     14
     15        * page/ViewportConfiguration.h:
     16        (WebCore::ViewportConfiguration::viewSize const):
     17
    1182018-04-10  Fujii Hironori  <Hironori.Fujii@sony.com>
    219
  • trunk/Source/WebCore/page/ViewportConfiguration.h

    r229063 r230506  
    7575    WEBCORE_EXPORT bool setContentsSize(const IntSize&);
    7676
     77    WEBCORE_EXPORT FloatSize viewSize() const { return m_viewSize; }
     78
    7779    const FloatSize& minimumLayoutSize() const { return m_minimumLayoutSize; }
    7880    WEBCORE_EXPORT bool setMinimumLayoutSize(const FloatSize&, const FloatSize& viewSize);
  • trunk/Source/WebKit/ChangeLog

    r230505 r230506  
     12018-04-10  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        [Extra zoom mode] Add a mechanism to zoom to fixed scales when double tapping in extra zoom mode
     4        https://bugs.webkit.org/show_bug.cgi?id=184435
     5        <rdar://problem/38726260>
     6
     7        Reviewed by Dean Jackson.
     8
     9        Adds support for an alternate codepath when computing a zoom rect when double tapping that doesn't take the hit-
     10        tested node into account, and instead cycles the zoom scale between 2 fixed values (in addition to the initial
     11        scale). In the next patch, these fixed scales will be determined by computing zoom scales needed to make most of
     12        the text on the page legible (i.e. the first text legibility zoom scale), and another to make all of the text on
     13        the page legible, with the exception of outliers (this is the second text legibility zoom scale).
     14
     15        See comments below for more detail.
     16
     17        * UIProcess/Cocoa/ViewGestureController.h:
     18        * UIProcess/Cocoa/ViewGestureController.messages.in:
     19        * UIProcess/ios/SmartMagnificationController.h:
     20        * UIProcess/ios/SmartMagnificationController.messages.in:
     21        * UIProcess/ios/SmartMagnificationController.mm:
     22        (WebKit::SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture):
     23        * UIProcess/mac/ViewGestureControllerMac.mm:
     24        (WebKit::ViewGestureController::didCollectGeometryForSmartMagnificationGesture):
     25        * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
     26        (WebKit::ViewGestureGeometryCollector::dispatchDidCollectGeometryForSmartMagnificationGesture):
     27
     28        Rename the boolean `isReplacedElement` argument to `fitEntireRect` instead. The UI process only uses this on iOS
     29        to determine whether or not to fit the entire element rect to the viewport and add padding. This patch renames
     30        this variable because we are not zooming to a replaced element in the case where text legibility on the page
     31        (rather than element geometry) is being used to figure out the zoom scale, but we still want to fit the entire
     32        target rect to the viewport.
     33
     34        (WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
     35
     36        If text legiblity zoom scaling is preferred, then compute first and second-level text legibility zoom scales to
     37        zoom to upon double tap (where the second zoom scale is greater than the first). To choose a target zoom
     38        scale, choose the lowest target zoom scale that is at least a small amount less than the current scale. If
     39        neither of the two scales fulfill this description, then zoom back out to the initial scale. This has the effect
     40        of consistently cycling between all three zoom scales as the user double taps.
     41
     42        (WebKit::ViewGestureGeometryCollector::computeTextLegibilityScales):
     43
     44        Introduce a new helper method that computes and caches target scales to zoom to when double tapping to zoom. If
     45        a cached pair of target scales is already present, it skips this computation and immediately returns it.
     46
     47        (WebKit::ViewGestureGeometryCollector::computeZoomInformationForNode):
     48        (WebKit::ViewGestureGeometryCollector::computeMinimumAndMaximumViewportScales const):
     49
     50        Factor out logic to compute min and max zoom scales into a separate helper, and call it from both
     51        computeZoomInformationForNode and computeTextLegibilityScales.
     52
     53        (WebKit::ViewGestureGeometryCollector::mainFrameDidLayout):
     54
     55        Invalidate cached text legibility scales when layout is triggered.
     56
     57        * WebProcess/WebPage/ViewGestureGeometryCollector.h:
     58        * WebProcess/WebPage/WebPage.cpp:
     59        (WebKit::WebPage::mainFrameDidLayout):
     60        * WebProcess/WebPage/WebPage.h:
     61        (WebKit::WebPage::viewportConfiguration const):
     62
     63        Expose WebPage's ViewportConfiguration as a const reference.
     64
     65        * WebProcess/WebPage/ios/WebPageIOS.mm:
     66        (WebKit::WebPage::platformPrefersTextLegibilityBasedZoomScaling const):
     67
     68        Adds a platform hook for opting into text-legibility-based zoom scaling instead of regular hit-testing-based
     69        zoom scaling heuristics.
     70
    1712018-04-10  Wenson Hsieh  <wenson_hsieh@apple.com>
    272
  • trunk/Source/WebKit/UIProcess/Cocoa/ViewGestureController.h

    r226750 r230506  
    192192    // Message handlers.
    193193    void didCollectGeometryForMagnificationGesture(WebCore::FloatRect visibleContentBounds, bool frameHandlesMagnificationGesture);
    194     void didCollectGeometryForSmartMagnificationGesture(WebCore::FloatPoint origin, WebCore::FloatRect renderRect, WebCore::FloatRect visibleContentBounds, bool isReplacedElement, double viewportMinimumScale, double viewportMaximumScale);
     194    void didCollectGeometryForSmartMagnificationGesture(WebCore::FloatPoint origin, WebCore::FloatRect renderRect, WebCore::FloatRect visibleContentBounds, bool fitEntireRect, double viewportMinimumScale, double viewportMaximumScale);
    195195
    196196    void endMagnificationGesture();
  • trunk/Source/WebKit/UIProcess/Cocoa/ViewGestureController.messages.in

    r206936 r230506  
    2424#if PLATFORM(MAC)
    2525    DidCollectGeometryForMagnificationGesture(WebCore::FloatRect visibleContentBounds, bool frameHandlesMagnificationGesture)
    26     DidCollectGeometryForSmartMagnificationGesture(WebCore::FloatPoint origin, WebCore::FloatRect renderRect, WebCore::FloatRect visibleContentBounds, bool isReplacedElement, double viewportMinimumScale, double viewportMaximumScale)
     26    DidCollectGeometryForSmartMagnificationGesture(WebCore::FloatPoint origin, WebCore::FloatRect renderRect, WebCore::FloatRect visibleContentBounds, bool fitEntireRect, double viewportMinimumScale, double viewportMaximumScale)
    2727    DidHitRenderTreeSizeThreshold()
    2828#endif
  • trunk/Source/WebKit/UIProcess/ios/SmartMagnificationController.h

    r204668 r230506  
    5353    void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override;
    5454
    55     void didCollectGeometryForSmartMagnificationGesture(WebCore::FloatPoint origin, WebCore::FloatRect renderRect, WebCore::FloatRect visibleContentBounds, bool isReplacedElement, double viewportMinimumScale, double viewportMaximumScale);
     55    void didCollectGeometryForSmartMagnificationGesture(WebCore::FloatPoint origin, WebCore::FloatRect renderRect, WebCore::FloatRect visibleContentBounds, bool fitEntireRect, double viewportMinimumScale, double viewportMaximumScale);
    5656    void magnify(WebCore::FloatPoint origin, WebCore::FloatRect targetRect, WebCore::FloatRect visibleContentRect, double viewportMinimumScale, double viewportMaximumScale);
    5757    void adjustSmartMagnificationTargetRectAndZoomScales(bool addMagnificationPadding, WebCore::FloatRect& targetRect, double& minimumScale, double& maximumScale);
  • trunk/Source/WebKit/UIProcess/ios/SmartMagnificationController.messages.in

    r184149 r230506  
    2424
    2525messages -> SmartMagnificationController {
    26     DidCollectGeometryForSmartMagnificationGesture(WebCore::FloatPoint origin, WebCore::FloatRect renderRect, WebCore::FloatRect visibleContentBounds, bool isReplacedElement, double viewportMinimumScale, double viewportMaximumScale)
     26    DidCollectGeometryForSmartMagnificationGesture(WebCore::FloatPoint origin, WebCore::FloatRect renderRect, WebCore::FloatRect visibleContentBounds, bool fitEntireRect, double viewportMinimumScale, double viewportMaximumScale)
    2727    Magnify(WebCore::FloatPoint origin, WebCore::FloatRect targetRect, WebCore::FloatRect visibleContentRect, double viewportMinimumScale, double viewportMaximumScale)
    2828}
  • trunk/Source/WebKit/UIProcess/ios/SmartMagnificationController.mm

    r226335 r230506  
    9090}
    9191
    92 void SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture(FloatPoint origin, FloatRect targetRect, FloatRect visibleContentRect, bool isReplacedElement, double viewportMinimumScale, double viewportMaximumScale)
     92void SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture(FloatPoint origin, FloatRect targetRect, FloatRect visibleContentRect, bool fitEntireRect, double viewportMinimumScale, double viewportMaximumScale)
    9393{
    9494    if (targetRect.isEmpty()) {
     
    9999    double minimumScale = viewportMinimumScale;
    100100    double maximumScale = viewportMaximumScale;
    101     adjustSmartMagnificationTargetRectAndZoomScales(!isReplacedElement, targetRect, minimumScale, maximumScale);
     101    adjustSmartMagnificationTargetRectAndZoomScales(!fitEntireRect, targetRect, minimumScale, maximumScale);
    102102
    103103    // FIXME: Check if text selection wants to consume the double tap before we attempt magnification.
     
    116116    // in the view, so scale it down enough to make both dimensions fit if possible.
    117117    // For other elements, try to fit them horizontally.
    118     if ([m_contentView _zoomToRect:targetRect withOrigin:origin fitEntireRect:isReplacedElement minimumScale:minimumScale maximumScale:maximumScale minimumScrollDistance:minimumScrollDistance])
     118    if ([m_contentView _zoomToRect:targetRect withOrigin:origin fitEntireRect:fitEntireRect minimumScale:minimumScale maximumScale:maximumScale minimumScrollDistance:minimumScrollDistance])
    119119        return;
    120120
  • trunk/Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm

    r229926 r230506  
    208208}
    209209
    210 void ViewGestureController::didCollectGeometryForSmartMagnificationGesture(FloatPoint origin, FloatRect renderRect, FloatRect visibleContentRect, bool isReplacedElement, double viewportMinimumScale, double viewportMaximumScale)
     210void ViewGestureController::didCollectGeometryForSmartMagnificationGesture(FloatPoint origin, FloatRect renderRect, FloatRect visibleContentRect, bool fitEntireRect, double viewportMinimumScale, double viewportMaximumScale)
    211211{
    212212    double currentScaleFactor = m_webPageProxy.pageScaleFactor();
     
    236236    // For replaced elements like images, we want to fit the whole element
    237237    // in the view, so scale it down enough to make both dimensions fit if possible.
    238     if (isReplacedElement)
     238    if (fitEntireRect)
    239239        targetMagnification = std::min(targetMagnification, static_cast<double>(visibleContentRect.height() / viewportConstrainedUnscaledTargetRect.height()));
    240240
  • trunk/Source/WebKit/WebProcess/WebPage/ViewGestureGeometryCollector.cpp

    r192332 r230506  
    6565}
    6666
    67 void ViewGestureGeometryCollector::dispatchDidCollectGeometryForSmartMagnificationGesture(FloatPoint origin, FloatRect targetRect, FloatRect visibleContentRect, bool isReplacedElement, double viewportMinimumScale, double viewportMaximumScale)
    68 {
    69 #if PLATFORM(MAC)
    70     m_webPage.send(Messages::ViewGestureController::DidCollectGeometryForSmartMagnificationGesture(origin, targetRect, visibleContentRect, isReplacedElement, viewportMinimumScale, viewportMaximumScale));
    71 #endif
    72 #if PLATFORM(IOS)
    73     m_webPage.send(Messages::SmartMagnificationController::DidCollectGeometryForSmartMagnificationGesture(origin, targetRect, visibleContentRect, isReplacedElement, viewportMinimumScale, viewportMaximumScale));
     67void ViewGestureGeometryCollector::dispatchDidCollectGeometryForSmartMagnificationGesture(FloatPoint origin, FloatRect targetRect, FloatRect visibleContentRect, bool fitEntireRect, double viewportMinimumScale, double viewportMaximumScale)
     68{
     69#if PLATFORM(MAC)
     70    m_webPage.send(Messages::ViewGestureController::DidCollectGeometryForSmartMagnificationGesture(origin, targetRect, visibleContentRect, fitEntireRect, viewportMinimumScale, viewportMaximumScale));
     71#endif
     72#if PLATFORM(IOS)
     73    m_webPage.send(Messages::SmartMagnificationController::DidCollectGeometryForSmartMagnificationGesture(origin, targetRect, visibleContentRect, fitEntireRect, viewportMinimumScale, viewportMaximumScale));
    7474#endif
    7575}
     
    8181    if (m_webPage.mainWebFrame()->handlesPageScaleGesture())
    8282        return;
     83
     84    double viewportMinimumScale;
     85    double viewportMaximumScale;
     86
     87#if PLATFORM(IOS)
     88    if (m_webPage.platformPrefersTextLegibilityBasedZoomScaling()) {
     89        static const double minimumScaleDifferenceForZooming = 0.05;
     90
     91        auto textLegibilityScales = computeTextLegibilityScales(viewportMinimumScale, viewportMaximumScale);
     92        if (!textLegibilityScales) {
     93            dispatchDidCollectGeometryForSmartMagnificationGesture({ }, { }, { }, false, 0, 0);
     94            return;
     95        }
     96
     97        float targetScale = m_webPage.viewportConfiguration().initialScale();
     98        float currentScale = m_webPage.pageScaleFactor();
     99        if (currentScale < textLegibilityScales->first - minimumScaleDifferenceForZooming)
     100            targetScale = textLegibilityScales->first;
     101        else if (currentScale < textLegibilityScales->second - minimumScaleDifferenceForZooming)
     102            targetScale = textLegibilityScales->second;
     103
     104        FloatRect targetRectInContentCoordinates { origin, FloatSize() };
     105        targetRectInContentCoordinates.inflate(m_webPage.viewportConfiguration().viewSize() / (2 * targetScale));
     106
     107        dispatchDidCollectGeometryForSmartMagnificationGesture(origin, targetRectInContentCoordinates, visibleContentRect, true, viewportMinimumScale, viewportMaximumScale);
     108        return;
     109    }
     110#endif // PLATFORM(IOS)
    83111
    84112    IntPoint originInContentsSpace = m_webPage.mainFrameView()->windowToContents(roundedIntPoint(origin));
     
    94122    bool isReplaced;
    95123    FloatRect renderRect;
    96     double viewportMinimumScale;
    97     double viewportMaximumScale;
    98124
    99125    computeZoomInformationForNode(*node, origin, renderRect, isReplaced, viewportMinimumScale, viewportMaximumScale);
    100126    dispatchDidCollectGeometryForSmartMagnificationGesture(origin, renderRect, visibleContentRect, isReplaced, viewportMinimumScale, viewportMaximumScale);
    101127}
     128
     129#if PLATFORM(IOS)
     130
     131std::optional<std::pair<double, double>> ViewGestureGeometryCollector::computeTextLegibilityScales(double& viewportMinimumScale, double& viewportMaximumScale)
     132{
     133    static const double defaultMaximumTextLegibilityScale = 1;
     134
     135    computeMinimumAndMaximumViewportScales(viewportMinimumScale, viewportMaximumScale);
     136    if (m_cachedTextLegibilityScales)
     137        return m_cachedTextLegibilityScales;
     138
     139    auto document = makeRefPtr(m_webPage.mainFrame()->document());
     140    if (!document)
     141        return std::nullopt;
     142
     143    document->updateLayoutIgnorePendingStylesheets();
     144
     145    // 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,
     146    // and set the first text legibility scale to be the halfway point between the initial scale and 1.
     147    double firstTextLegibilityScale = clampTo<double>((m_webPage.viewportConfiguration().initialScale() + defaultMaximumTextLegibilityScale) / 2, viewportMinimumScale, viewportMaximumScale);
     148    double secondTextLegibilityScale = clampTo<double>(defaultMaximumTextLegibilityScale, viewportMinimumScale, viewportMaximumScale);
     149
     150    m_cachedTextLegibilityScales = std::optional<std::pair<double, double>> {{ firstTextLegibilityScale, secondTextLegibilityScale }};
     151    return m_cachedTextLegibilityScales;
     152}
     153
     154#endif // PLATFORM(IOS)
    102155
    103156void ViewGestureGeometryCollector::computeZoomInformationForNode(Node& node, FloatPoint& origin, FloatRect& renderRect, bool& isReplaced, double& viewportMinimumScale, double& viewportMaximumScale)
     
    118171        }
    119172    }
     173    computeMinimumAndMaximumViewportScales(viewportMinimumScale, viewportMaximumScale);
     174}
     175
     176void ViewGestureGeometryCollector::computeMinimumAndMaximumViewportScales(double& viewportMinimumScale, double& viewportMaximumScale) const
     177{
    120178#if PLATFORM(MAC)
    121179    viewportMinimumScale = 0;
     
    134192    m_webPage.send(Messages::ViewGestureController::DidCollectGeometryForMagnificationGesture(visibleContentRect, frameHandlesMagnificationGesture));
    135193}
     194#endif
    136195
    137196void ViewGestureGeometryCollector::mainFrameDidLayout()
    138197{
     198#if PLATFORM(IOS)
     199    m_cachedTextLegibilityScales.reset();
     200#endif
     201#if PLATFORM(MAC)
    139202    if (m_renderTreeSizeNotificationThreshold && m_webPage.renderTreeSize() >= m_renderTreeSizeNotificationThreshold) {
    140203        m_webPage.send(Messages::ViewGestureController::DidHitRenderTreeSizeThreshold());
    141204        m_renderTreeSizeNotificationThreshold = 0;
    142205    }
    143 }
    144 #endif
     206#endif
     207}
    145208
    146209} // namespace WebKit
  • trunk/Source/WebKit/WebProcess/WebPage/ViewGestureGeometryCollector.h

    r204668 r230506  
    6161#endif
    6262
    63     void dispatchDidCollectGeometryForSmartMagnificationGesture(WebCore::FloatPoint origin, WebCore::FloatRect targetRect, WebCore::FloatRect visibleContentRect, bool isReplacedElement, double viewportMinimumScale, double viewportMaximumScale);
     63    void dispatchDidCollectGeometryForSmartMagnificationGesture(WebCore::FloatPoint origin, WebCore::FloatRect targetRect, WebCore::FloatRect visibleContentRect, bool fitEntireRect, double viewportMinimumScale, double viewportMaximumScale);
    6464    void computeZoomInformationForNode(WebCore::Node&, WebCore::FloatPoint& origin, WebCore::FloatRect& renderRect, bool& isReplaced, double& viewportMinimumScale, double& viewportMaximumScale);
     65    void computeMinimumAndMaximumViewportScales(double& viewportMinimumScale, double& viewportMaximumScale) const;
     66
     67#if PLATFORM(IOS)
     68    std::optional<std::pair<double, double>> computeTextLegibilityScales(double& viewportMinimumScale, double& viewportMaximumScale);
     69#endif
    6570
    6671    WebPage& m_webPage;
     
    6974    uint64_t m_renderTreeSizeNotificationThreshold;
    7075#endif
     76#if PLATFORM(IOS)
     77    std::optional<std::pair<double, double>> m_cachedTextLegibilityScales;
     78#endif
    7179};
    7280
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp

    r230280 r230506  
    38213821    }
    38223822
    3823 #if PLATFORM(MAC)
     3823#if PLATFORM(COCOA)
    38243824    m_viewGestureGeometryCollector->mainFrameDidLayout();
    38253825#endif
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.h

    r230293 r230506  
    892892    void applicationDidBecomeActive();
    893893    void completePendingSyntheticClickForContentChangeObserver();
     894
     895    bool platformPrefersTextLegibilityBasedZoomScaling() const;
     896    const WebCore::ViewportConfiguration& viewportConfiguration() const { return m_viewportConfiguration; }
    894897#endif
    895898
  • trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

    r230293 r230506  
    34723472#endif
    34733473
     3474bool WebPage::platformPrefersTextLegibilityBasedZoomScaling() const
     3475{
     3476#if ENABLE(EXTRA_ZOOM_MODE)
     3477    return true;
     3478#else
     3479    return false;
     3480#endif
     3481}
     3482
    34743483#if ENABLE(MEDIA_STREAM)
    34753484void WebPage::prepareToSendUserMediaPermissionRequest()
Note: See TracChangeset for help on using the changeset viewer.