Changeset 254384 in webkit


Ignore:
Timestamp:
Jan 10, 2020 5:27:13 PM (4 years ago)
Author:
Simon Fraser
Message:

Introduce ENABLE_META_VIEWPORT and use it in some WK2 code
https://bugs.webkit.org/show_bug.cgi?id=206091

Reviewed by Tim Horton.
Source/WebCore:

didDispatchViewportPropertiesChanged() is used for a Coordinated Graphics assertion, so
should be #if ASSERT_ENABLED rather than #ifndef NDEBUG.

  • dom/Document.cpp:

(WebCore::Document::updateViewportArguments):
(WebCore::Document::suspend):

  • dom/Document.h:

Source/WebKit:

Use ENABLE(META_VIEWPORT) rather than PLATFORM(IOS_FAMILY) to enable various
bits of viewport-related code.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<ViewportArguments>::decode):
(IPC::ArgumentCoder<ViewportAttributes>::encode):
(IPC::ArgumentCoder<ViewportAttributes>::decode):

  • Shared/WebCoreArgumentCoders.h:
  • Shared/WebPageCreationParameters.cpp:

(WebKit::WebPageCreationParameters::encode const):
(WebKit::WebPageCreationParameters::decode):

  • Shared/WebPageCreationParameters.h:
  • UIProcess/API/C/WKPage.cpp:

(WKPageSetIgnoresViewportScaleLimits):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):

  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebPageProxy.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didCommitLoad):

  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::viewportConfiguration const):

Source/WTF:

Define ENABLE_META_VIEWPORT for iOS.

  • wtf/FeatureDefines.h:
Location:
trunk/Source
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r254317 r254384  
     12020-01-10  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Introduce ENABLE_META_VIEWPORT and use it in some WK2 code
     4        https://bugs.webkit.org/show_bug.cgi?id=206091
     5
     6        Reviewed by Tim Horton.
     7
     8        Define ENABLE_META_VIEWPORT for iOS.
     9
     10        * wtf/FeatureDefines.h:
     11
    1122020-01-09  Tim Horton  <timothy_horton@apple.com>
    213
  • trunk/Source/WTF/wtf/FeatureDefines.h

    r254311 r254384  
    228228#endif
    229229
     230#if !defined(ENABLE_META_VIEWPORT)
     231#define ENABLE_META_VIEWPORT 1
     232#endif
     233
    230234#endif /* PLATFORM(IOS_FAMILY) */
    231235
  • trunk/Source/WebCore/ChangeLog

    r254380 r254384  
     12020-01-10  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Introduce ENABLE_META_VIEWPORT and use it in some WK2 code
     4        https://bugs.webkit.org/show_bug.cgi?id=206091
     5
     6        Reviewed by Tim Horton.
     7
     8        didDispatchViewportPropertiesChanged() is used for a Coordinated Graphics assertion, so
     9        should be #if ASSERT_ENABLED rather than #ifndef NDEBUG.
     10
     11        * dom/Document.cpp:
     12        (WebCore::Document::updateViewportArguments):
     13        (WebCore::Document::suspend):
     14        * dom/Document.h:
     15
    1162020-01-10  Zalan Bujtas  <zalan@apple.com>
    217
  • trunk/Source/WebCore/dom/Document.cpp

    r254322 r254384  
    36923692{
    36933693    if (page() && frame()->isMainFrame()) {
    3694 #ifndef NDEBUG
     3694#if ASSERT_ENABLED
    36953695        m_didDispatchViewportPropertiesChanged = true;
    36963696#endif
     
    52965296        element->prepareForDocumentSuspension();
    52975297
    5298 #ifndef NDEBUG
     5298#if ASSERT_ENABLED
    52995299    // Clear the update flag to be able to check if the viewport arguments update
    53005300    // is dispatched, after the document is restored from the back/forward cache.
  • trunk/Source/WebCore/dom/Document.h

    r254322 r254384  
    416416
    417417    OptionSet<DisabledAdaptations> disabledAdaptations() const { return m_disabledAdaptations; }
    418 #ifndef NDEBUG
     418#if ASSERT_ENABLED
    419419    bool didDispatchViewportPropertiesChanged() const { return m_didDispatchViewportPropertiesChanged; }
    420420#endif
     
    20232023#endif
    20242024
    2025 #ifndef NDEBUG
     2025#if ASSERT_ENABLED
    20262026    bool m_didDispatchViewportPropertiesChanged { false };
    20272027#endif
  • trunk/Source/WebKit/ChangeLog

    r254383 r254384  
     12020-01-10  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Introduce ENABLE_META_VIEWPORT and use it in some WK2 code
     4        https://bugs.webkit.org/show_bug.cgi?id=206091
     5
     6        Reviewed by Tim Horton.
     7       
     8        Use ENABLE(META_VIEWPORT) rather than PLATFORM(IOS_FAMILY) to enable various
     9        bits of viewport-related code.
     10
     11        * Shared/WebCoreArgumentCoders.cpp:
     12        (IPC::ArgumentCoder<ViewportArguments>::decode):
     13        (IPC::ArgumentCoder<ViewportAttributes>::encode):
     14        (IPC::ArgumentCoder<ViewportAttributes>::decode):
     15        * Shared/WebCoreArgumentCoders.h:
     16        * Shared/WebPageCreationParameters.cpp:
     17        (WebKit::WebPageCreationParameters::encode const):
     18        (WebKit::WebPageCreationParameters::decode):
     19        * Shared/WebPageCreationParameters.h:
     20        * UIProcess/API/C/WKPage.cpp:
     21        (WKPageSetIgnoresViewportScaleLimits):
     22        * UIProcess/API/Cocoa/WKWebView.mm:
     23        (-[WKWebView _initializeWithConfiguration:]):
     24        * UIProcess/WebPageProxy.cpp:
     25        * UIProcess/WebPageProxy.h:
     26        * WebProcess/WebPage/WebPage.cpp:
     27        (WebKit::WebPage::didCommitLoad):
     28        * WebProcess/WebPage/WebPage.h:
     29        (WebKit::WebPage::viewportConfiguration const):
     30
    1312020-01-10  Jonathan Bedard  <jbedard@apple.com>
    232
  • trunk/Source/WebKit/Shared/WebCoreArgumentCoders.cpp

    r254202 r254384  
    638638    return floatQuad;
    639639}
    640 
     640#endif // PLATFORM(IOS_FAMILY)
     641
     642#if ENABLE(META_VIEWPORT)
    641643void ArgumentCoder<ViewportArguments>::encode(Encoder& encoder, const ViewportArguments& viewportArguments)
    642644{
     
    656658    return viewportArguments;
    657659}
    658 #endif // PLATFORM(IOS_FAMILY)
    659 
     660
     661#endif // ENABLE(META_VIEWPORT)
     662
     663void ArgumentCoder<ViewportAttributes>::encode(Encoder& encoder, const ViewportAttributes& viewportAttributes)
     664{
     665    SimpleArgumentCoder<ViewportAttributes>::encode(encoder, viewportAttributes);
     666}
     667
     668bool ArgumentCoder<ViewportAttributes>::decode(Decoder& decoder, ViewportAttributes& viewportAttributes)
     669{
     670    return SimpleArgumentCoder<ViewportAttributes>::decode(decoder, viewportAttributes);
     671}
    660672
    661673void ArgumentCoder<IntPoint>::encode(Encoder& encoder, const IntPoint& intPoint)
     
    762774{
    763775    return SimpleArgumentCoder<Length>::decode(decoder, length);
    764 }
    765 
    766 void ArgumentCoder<ViewportAttributes>::encode(Encoder& encoder, const ViewportAttributes& viewportAttributes)
    767 {
    768     SimpleArgumentCoder<ViewportAttributes>::encode(encoder, viewportAttributes);
    769 }
    770 
    771 bool ArgumentCoder<ViewportAttributes>::decode(Decoder& decoder, ViewportAttributes& viewportAttributes)
    772 {
    773     return SimpleArgumentCoder<ViewportAttributes>::decode(decoder, viewportAttributes);
    774776}
    775777
  • trunk/Source/WebKit/Shared/WebCoreArgumentCoders.h

    r254202 r254384  
    149149struct PasteboardImage;
    150150struct PasteboardWebContent;
     151#endif
     152
     153#if ENABLE(META_VIEWPORT)
    151154struct ViewportArguments;
    152155#endif
     
    296299    static Optional<WebCore::FloatQuad> decode(Decoder&);
    297300};
    298 
     301#endif // PLATFORM(IOS_FAMILY)
     302
     303#if ENABLE(META_VIEWPORT)
    299304template<> struct ArgumentCoder<WebCore::ViewportArguments> {
    300305    static void encode(Encoder&, const WebCore::ViewportArguments&);
     
    302307    static Optional<WebCore::ViewportArguments> decode(Decoder&);
    303308};
    304 #endif // PLATFORM(IOS_FAMILY)
     309
     310#endif
     311
     312template<> struct ArgumentCoder<WebCore::ViewportAttributes> {
     313    static void encode(Encoder&, const WebCore::ViewportAttributes&);
     314    static bool decode(Decoder&, WebCore::ViewportAttributes&);
     315};
    305316
    306317template<> struct ArgumentCoder<WebCore::IntPoint> {
     
    335346    static void encode(Encoder&, const WebCore::Length&);
    336347    static bool decode(Decoder&, WebCore::Length&);
    337 };
    338 
    339 template<> struct ArgumentCoder<WebCore::ViewportAttributes> {
    340     static void encode(Encoder&, const WebCore::ViewportAttributes&);
    341     static bool decode(Decoder&, WebCore::ViewportAttributes&);
    342348};
    343349
  • trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp

    r254183 r254384  
    8585    encoder << useSystemAppearance;
    8686#endif
     87
     88#if ENABLE(META_VIEWPORT)
     89    encoder << ignoresViewportScaleLimits;
     90    encoder << viewportConfigurationViewLayoutSize;
     91    encoder << viewportConfigurationLayoutSizeScaleFactor;
     92    encoder << viewportConfigurationMinimumEffectiveDeviceWidth;
     93    encoder << viewportConfigurationViewSize;
     94    encoder << overrideViewportArguments;
     95#endif
     96
    8797#if PLATFORM(IOS_FAMILY)
    8898    encoder << screenSize;
     
    90100    encoder << overrideScreenSize;
    91101    encoder << textAutosizingWidth;
    92     encoder << ignoresViewportScaleLimits;
    93     encoder << viewportConfigurationViewLayoutSize;
    94     encoder << viewportConfigurationLayoutSizeScaleFactor;
    95     encoder << viewportConfigurationMinimumEffectiveDeviceWidth;
    96     encoder << viewportConfigurationViewSize;
    97102    encoder << maximumUnobscuredSize;
    98103    encoder << deviceOrientation;
    99104    encoder << keyboardIsAttached;
    100105    encoder << canShowWhileLocked;
    101     encoder << overrideViewportArguments;
    102106#endif
    103107#if PLATFORM(COCOA)
     
    276280#endif
    277281
    278 #if PLATFORM(IOS_FAMILY)
    279     if (!decoder.decode(parameters.screenSize))
    280         return WTF::nullopt;
    281     if (!decoder.decode(parameters.availableScreenSize))
    282         return WTF::nullopt;
    283     if (!decoder.decode(parameters.overrideScreenSize))
    284         return WTF::nullopt;
    285     if (!decoder.decode(parameters.textAutosizingWidth))
    286         return WTF::nullopt;
     282#if ENABLE(META_VIEWPORT)
    287283    if (!decoder.decode(parameters.ignoresViewportScaleLimits))
    288284        return WTF::nullopt;
     
    295291    if (!decoder.decode(parameters.viewportConfigurationViewSize))
    296292        return WTF::nullopt;
    297     if (!decoder.decode(parameters.maximumUnobscuredSize))
    298         return WTF::nullopt;
    299     if (!decoder.decode(parameters.deviceOrientation))
    300         return WTF::nullopt;
    301     if (!decoder.decode(parameters.keyboardIsAttached))
    302         return WTF::nullopt;
    303     if (!decoder.decode(parameters.canShowWhileLocked))
    304         return WTF::nullopt;
    305 
    306293    Optional<Optional<WebCore::ViewportArguments>> overrideViewportArguments;
    307294    decoder >> overrideViewportArguments;
     
    309296        return WTF::nullopt;
    310297    parameters.overrideViewportArguments = WTFMove(*overrideViewportArguments);
     298#endif
     299
     300#if PLATFORM(IOS_FAMILY)
     301    if (!decoder.decode(parameters.screenSize))
     302        return WTF::nullopt;
     303    if (!decoder.decode(parameters.availableScreenSize))
     304        return WTF::nullopt;
     305    if (!decoder.decode(parameters.overrideScreenSize))
     306        return WTF::nullopt;
     307    if (!decoder.decode(parameters.textAutosizingWidth))
     308        return WTF::nullopt;
     309    if (!decoder.decode(parameters.maximumUnobscuredSize))
     310        return WTF::nullopt;
     311    if (!decoder.decode(parameters.deviceOrientation))
     312        return WTF::nullopt;
     313    if (!decoder.decode(parameters.keyboardIsAttached))
     314        return WTF::nullopt;
     315    if (!decoder.decode(parameters.canShowWhileLocked))
     316        return WTF::nullopt;
    311317#endif
    312318
  • trunk/Source/WebKit/Shared/WebPageCreationParameters.h

    r254183 r254384  
    146146    bool useSystemAppearance;
    147147#endif
     148#if ENABLE(META_VIEWPORT)
     149    bool ignoresViewportScaleLimits;
     150    WebCore::FloatSize viewportConfigurationViewLayoutSize;
     151    double viewportConfigurationLayoutSizeScaleFactor;
     152    double viewportConfigurationMinimumEffectiveDeviceWidth;
     153    WebCore::FloatSize viewportConfigurationViewSize;
     154    Optional<WebCore::ViewportArguments> overrideViewportArguments;
     155#endif
    148156#if PLATFORM(IOS_FAMILY)
    149157    WebCore::FloatSize screenSize;
     
    151159    WebCore::FloatSize overrideScreenSize;
    152160    float textAutosizingWidth;
    153     bool ignoresViewportScaleLimits;
    154     WebCore::FloatSize viewportConfigurationViewLayoutSize;
    155     double viewportConfigurationLayoutSizeScaleFactor;
    156     double viewportConfigurationMinimumEffectiveDeviceWidth;
    157     WebCore::FloatSize viewportConfigurationViewSize;
    158161    WebCore::FloatSize maximumUnobscuredSize;
    159162    int32_t deviceOrientation { 0 };
    160163    bool keyboardIsAttached { false };
    161164    bool canShowWhileLocked { false };
    162     Optional<WebCore::ViewportArguments> overrideViewportArguments;
    163165#endif
    164166#if PLATFORM(COCOA)
  • trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp

    r253950 r254384  
    28742874void WKPageSetIgnoresViewportScaleLimits(WKPageRef page, bool ignoresViewportScaleLimits)
    28752875{
    2876 #if PLATFORM(IOS_FAMILY)
     2876#if ENABLE(META_VIEWPORT)
    28772877    toImpl(page)->setForceAlwaysUserScalable(ignoresViewportScaleLimits);
    28782878#endif
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm

    r254360 r254384  
    350350
    351351    _page->contentSizeCategoryDidChange([self _contentSizeCategory]);
    352     _page->setForceAlwaysUserScalable([_configuration ignoresViewportScaleLimits]);
    353352
    354353    CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), (__bridge const void *)(self), hardwareKeyboardAvailabilityChangedCallback, (CFStringRef)[NSString stringWithUTF8String:kGSEventHardwareKeyboardAvailabilityChangedNotification], nullptr, CFNotificationSuspensionBehaviorCoalesce);
    355354#endif // PLATFORM(IOS_FAMILY)
     355
     356#if ENABLE(META_VIEWPORT)
     357    _page->setForceAlwaysUserScalable([_configuration ignoresViewportScaleLimits]);
     358#endif
    356359
    357360#if PLATFORM(MAC)
  • trunk/Source/WebKit/UIProcess/WebPageProxy.cpp

    r254345 r254384  
    75347534    parameters.useSystemAppearance = m_useSystemAppearance;
    75357535#endif
     7536
     7537#if ENABLE(META_VIEWPORT)
     7538    parameters.ignoresViewportScaleLimits = m_forceAlwaysUserScalable;
     7539    parameters.viewportConfigurationViewLayoutSize = m_viewportConfigurationViewLayoutSize;
     7540    parameters.viewportConfigurationLayoutSizeScaleFactor = m_viewportConfigurationLayoutSizeScaleFactor;
     7541    parameters.viewportConfigurationMinimumEffectiveDeviceWidth = m_viewportConfigurationMinimumEffectiveDeviceWidth;
     7542    parameters.overrideViewportArguments = m_overrideViewportArguments;
     7543#endif
     7544
    75367545#if PLATFORM(IOS_FAMILY)
    75377546    parameters.screenSize = screenSize();
     
    75407549    parameters.textAutosizingWidth = textAutosizingWidth();
    75417550    parameters.mimeTypesWithCustomContentProviders = pageClient().mimeTypesWithCustomContentProviders();
    7542     parameters.ignoresViewportScaleLimits = m_forceAlwaysUserScalable;
    7543     parameters.viewportConfigurationViewLayoutSize = m_viewportConfigurationViewLayoutSize;
    7544     parameters.viewportConfigurationLayoutSizeScaleFactor = m_viewportConfigurationLayoutSizeScaleFactor;
    7545     parameters.viewportConfigurationMinimumEffectiveDeviceWidth = m_viewportConfigurationMinimumEffectiveDeviceWidth;
    75467551    parameters.maximumUnobscuredSize = m_maximumUnobscuredSize;
    75477552    parameters.deviceOrientation = m_deviceOrientation;
    75487553    parameters.keyboardIsAttached = isInHardwareKeyboardMode();
    7549     parameters.overrideViewportArguments = m_overrideViewportArguments;
    75507554    parameters.canShowWhileLocked = m_configuration->canShowWhileLocked();
    75517555#endif
  • trunk/Source/WebKit/UIProcess/WebPageProxy.h

    r254345 r254384  
    22862286#if PLATFORM(IOS_FAMILY)
    22872287    Optional<WebCore::InputMode> m_pendingInputModeChange;
    2288     Optional<WebCore::ViewportArguments> m_overrideViewportArguments;
    22892288    TransactionID m_firstLayerTreeTransactionIdAfterDidCommitLoad;
    22902289    int32_t m_deviceOrientation { 0 };
     
    25952594#endif
    25962595
     2596#if ENABLE(META_VIEWPORT)
     2597    bool m_forceAlwaysUserScalable { false };
     2598    WebCore::FloatSize m_viewportConfigurationViewLayoutSize;
     2599    double m_viewportConfigurationLayoutSizeScaleFactor { 1 };
     2600    double m_viewportConfigurationMinimumEffectiveDeviceWidth { 0 };
     2601    Optional<WebCore::ViewportArguments> m_overrideViewportArguments;
     2602#endif
     2603
    25972604#if PLATFORM(IOS_FAMILY)
    25982605    Function<bool()> m_deviceOrientationUserPermissionHandlerForTesting;
    25992606    std::unique_ptr<ElementDidFocusArguments> m_deferredElementDidFocusArguments;
    26002607    bool m_waitingForPostLayoutEditorStateUpdateAfterFocusingElement { false };
    2601     bool m_forceAlwaysUserScalable { false };
    2602     WebCore::FloatSize m_viewportConfigurationViewLayoutSize;
    2603     double m_viewportConfigurationLayoutSizeScaleFactor { 1 };
    2604     double m_viewportConfigurationMinimumEffectiveDeviceWidth { 0 };
    26052608    WebCore::FloatSize m_maximumUnobscuredSize;
    26062609    bool m_lastObservedStateWasBackground { false };
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp

    r254312 r254384  
    423423    , m_canRunBeforeUnloadConfirmPanel(parameters.canRunBeforeUnloadConfirmPanel)
    424424    , m_canRunModal(parameters.canRunModal)
     425#if ENABLE(META_VIEWPORT)
     426    , m_forceAlwaysUserScalable(parameters.ignoresViewportScaleLimits)
     427#endif
    425428#if PLATFORM(IOS_FAMILY)
    426     , m_forceAlwaysUserScalable(parameters.ignoresViewportScaleLimits)
    427429    , m_screenSize(parameters.screenSize)
    428430    , m_availableScreenSize(parameters.availableScreenSize)
     
    58165818            scalePage(1, IntPoint());
    58175819    }
     5820
    58185821#if PLATFORM(IOS_FAMILY)
    58195822    m_hasReceivedVisibleContentRectsAfterDidCommitLoad = false;
     
    58275830    WebProcess::singleton().eventDispatcher().clearQueuedTouchEventsForPage(*this);
    58285831#endif
    5829 
     5832#endif // PLATFORM(IOS_FAMILY)
     5833
     5834#if ENABLE(META_VIEWPORT)
    58305835    resetViewportDefaultConfiguration(frame);
    58315836    const Frame* coreFrame = frame->coreFrame();
     
    58455850    if (viewportChanged)
    58465851        viewportConfigurationChanged();
    5847 #endif
     5852#endif // ENABLE(META_VIEWPORT)
    58485853
    58495854#if ENABLE(VIEWPORT_RESIZING)
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.h

    r254312 r254384  
    108108#include "GestureTypes.h"
    109109#include <WebCore/IntPointHash.h>
     110#include <WebCore/WKContentObservation.h>
     111#endif
     112
     113#if ENABLE(META_VIEWPORT)
    110114#include <WebCore/ViewportConfiguration.h>
    111 #include <WebCore/WKContentObservation.h>
    112115#endif
    113116
     
    637640    void didReceiveMobileDocType(bool);
    638641
    639     void setUseTestingViewportConfiguration(bool useTestingViewport) { m_useTestingViewportConfiguration = useTestingViewport; }
    640     bool isUsingTestingViewportConfiguration() const { return m_useTestingViewportConfiguration; }
    641 
    642642    double minimumPageScaleFactor() const;
    643643    double maximumPageScaleFactor() const;
     
    968968
    969969#if PLATFORM(IOS_FAMILY)
    970     void setViewportConfigurationViewLayoutSize(const WebCore::FloatSize&, double scaleFactor, double minimumEffectiveDeviceWidth);
    971970    void setMaximumUnobscuredSize(const WebCore::FloatSize&);
    972971    void setDeviceOrientation(int32_t);
    973     void setOverrideViewportArguments(const Optional<WebCore::ViewportArguments>&);
    974972    void dynamicViewportSizeUpdate(const WebCore::FloatSize& viewLayoutSize, const WebCore::FloatSize& maximumUnobscuredSize, const WebCore::FloatRect& targetExposedContentRect, const WebCore::FloatRect& targetUnobscuredRect, const WebCore::FloatRect& targetUnobscuredRectInScrollViewCoordinates, const WebCore::FloatBoxExtent& targetUnobscuredSafeAreaInsets, double scale, int32_t deviceOrientation, DynamicViewportSizeUpdateID);
    975973    bool scaleWasSetByUIProcess() const { return m_scaleWasSetByUIProcess; }
     
    983981
    984982    bool platformPrefersTextLegibilityBasedZoomScaling() const;
    985     const WebCore::ViewportConfiguration& viewportConfiguration() const { return m_viewportConfiguration; }
    986983
    987984    void hardwareKeyboardAvailabilityChanged(bool keyboardIsAttached);
     
    990987   
    991988    bool canShowWhileLocked() const { return m_canShowWhileLocked; }
     989#endif
     990
     991#if ENABLE(META_VIEWPORT)
     992    void setViewportConfigurationViewLayoutSize(const WebCore::FloatSize&, double scaleFactor, double minimumEffectiveDeviceWidth);
     993    void setOverrideViewportArguments(const Optional<WebCore::ViewportArguments>&);
     994    const WebCore::ViewportConfiguration& viewportConfiguration() const { return m_viewportConfiguration; }
     995
     996    void setUseTestingViewportConfiguration(bool useTestingViewport) { m_useTestingViewportConfiguration = useTestingViewport; }
     997    bool isUsingTestingViewportConfiguration() const { return m_useTestingViewportConfiguration; }
    992998#endif
    993999
     
    12881294
    12891295#if PLATFORM(IOS_FAMILY)
    1290     void resetViewportDefaultConfiguration(WebFrame* mainFrame, bool hasMobileDocType = false);
    1291     enum class ZoomToInitialScale { No, Yes };
    1292     void viewportConfigurationChanged(ZoomToInitialScale = ZoomToInitialScale::No);
    12931296    void updateViewportSizeForCSSViewportUnits();
    12941297
     
    13111314    WebAutocorrectionContext autocorrectionContext();
    13121315    bool applyAutocorrectionInternal(const String& correction, const String& originalText);
     1316#endif
     1317
     1318#if ENABLE(META_VIEWPORT)
     1319    void resetViewportDefaultConfiguration(WebFrame* mainFrame, bool hasMobileDocType = false);
     1320    enum class ZoomToInitialScale { No, Yes };
     1321    void viewportConfigurationChanged(ZoomToInitialScale = ZoomToInitialScale::No);
    13131322    bool shouldIgnoreMetaViewport() const;
    13141323#endif
     1324
    13151325#if ENABLE(TEXT_AUTOSIZING)
    13161326    void textAutoSizingAdjustmentTimerFired();
     
    17071717    bool m_alwaysShowsVerticalScroller { false };
    17081718
    1709 #if PLATFORM(IOS_FAMILY)
    1710     bool m_ignoreViewportScalingConstraints { false };
    1711 #endif
    1712 
    17131719#if ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
    17141720    bool m_readyToFindPrimarySnapshottedPlugin { false };
     
    18931899    CompletionHandler<void(bool)> m_pendingSynchronousTouchEventReply;
    18941900#endif
    1895    
     1901
     1902#if ENABLE(META_VIEWPORT)
     1903    WebCore::ViewportConfiguration m_viewportConfiguration;
     1904    bool m_useTestingViewportConfiguration { false };
     1905    bool m_forceAlwaysUserScalable { false };
     1906    bool m_ignoreViewportScalingConstraints { false };
     1907#endif
     1908
    18961909#if PLATFORM(IOS_FAMILY)
    18971910    RefPtr<WebCore::Range> m_currentWordRange;
     
    19071920    WebCore::FloatPoint m_potentialTapLocation;
    19081921    RefPtr<WebCore::SecurityOrigin> m_potentialTapSecurityOrigin;
    1909 
    1910     WebCore::ViewportConfiguration m_viewportConfiguration;
    19111922
    19121923    bool m_hasReceivedVisibleContentRectsAfterDidCommitLoad { false };
     
    19151926    bool m_userHasChangedPageScaleFactor { false };
    19161927    bool m_hasStablePageScaleFactor { true };
    1917     bool m_useTestingViewportConfiguration { false };
    19181928    bool m_isInStableState { true };
    1919     bool m_forceAlwaysUserScalable { false };
    19201929    MonotonicTime m_oldestNonStableUpdateVisibleContentRectsTimestamp;
    19211930    Seconds m_estimatedLatency { 0 };
Note: See TracChangeset for help on using the changeset viewer.