Diff
Modified: trunk/Source/WTF/ChangeLog (254383 => 254384)
--- trunk/Source/WTF/ChangeLog 2020-01-11 01:06:40 UTC (rev 254383)
+++ trunk/Source/WTF/ChangeLog 2020-01-11 01:27:13 UTC (rev 254384)
@@ -1,3 +1,14 @@
+2020-01-10 Simon Fraser <[email protected]>
+
+ Introduce ENABLE_META_VIEWPORT and use it in some WK2 code
+ https://bugs.webkit.org/show_bug.cgi?id=206091
+
+ Reviewed by Tim Horton.
+
+ Define ENABLE_META_VIEWPORT for iOS.
+
+ * wtf/FeatureDefines.h:
+
2020-01-09 Tim Horton <[email protected]>
Adopt TARGET_OS_MACCATALYST in more places
Modified: trunk/Source/WTF/wtf/FeatureDefines.h (254383 => 254384)
--- trunk/Source/WTF/wtf/FeatureDefines.h 2020-01-11 01:06:40 UTC (rev 254383)
+++ trunk/Source/WTF/wtf/FeatureDefines.h 2020-01-11 01:27:13 UTC (rev 254384)
@@ -227,6 +227,10 @@
#endif
#endif
+#if !defined(ENABLE_META_VIEWPORT)
+#define ENABLE_META_VIEWPORT 1
+#endif
+
#endif /* PLATFORM(IOS_FAMILY) */
/* --------- Apple watchOS port --------- */
Modified: trunk/Source/WebCore/ChangeLog (254383 => 254384)
--- trunk/Source/WebCore/ChangeLog 2020-01-11 01:06:40 UTC (rev 254383)
+++ trunk/Source/WebCore/ChangeLog 2020-01-11 01:27:13 UTC (rev 254384)
@@ -1,3 +1,18 @@
+2020-01-10 Simon Fraser <[email protected]>
+
+ Introduce ENABLE_META_VIEWPORT and use it in some WK2 code
+ https://bugs.webkit.org/show_bug.cgi?id=206091
+
+ Reviewed by Tim Horton.
+
+ 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:
+
2020-01-10 Zalan Bujtas <[email protected]>
[LFC] Add missing escape reason to BlockFormattingContext::Quirks::stretchedInFlowHeight
Modified: trunk/Source/WebCore/dom/Document.cpp (254383 => 254384)
--- trunk/Source/WebCore/dom/Document.cpp 2020-01-11 01:06:40 UTC (rev 254383)
+++ trunk/Source/WebCore/dom/Document.cpp 2020-01-11 01:27:13 UTC (rev 254384)
@@ -3691,7 +3691,7 @@
void Document::updateViewportArguments()
{
if (page() && frame()->isMainFrame()) {
-#ifndef NDEBUG
+#if ASSERT_ENABLED
m_didDispatchViewportPropertiesChanged = true;
#endif
page()->chrome().dispatchViewportPropertiesDidChange(viewportArguments());
@@ -5295,7 +5295,7 @@
for (auto* element : m_documentSuspensionCallbackElements)
element->prepareForDocumentSuspension();
-#ifndef NDEBUG
+#if ASSERT_ENABLED
// Clear the update flag to be able to check if the viewport arguments update
// is dispatched, after the document is restored from the back/forward cache.
m_didDispatchViewportPropertiesChanged = false;
Modified: trunk/Source/WebCore/dom/Document.h (254383 => 254384)
--- trunk/Source/WebCore/dom/Document.h 2020-01-11 01:06:40 UTC (rev 254383)
+++ trunk/Source/WebCore/dom/Document.h 2020-01-11 01:27:13 UTC (rev 254384)
@@ -415,7 +415,7 @@
WEBCORE_EXPORT ViewportArguments viewportArguments() const;
OptionSet<DisabledAdaptations> disabledAdaptations() const { return m_disabledAdaptations; }
-#ifndef NDEBUG
+#if ASSERT_ENABLED
bool didDispatchViewportPropertiesChanged() const { return m_didDispatchViewportPropertiesChanged; }
#endif
@@ -2022,7 +2022,7 @@
bool m_hasHadCaptureMediaStreamTrack { false };
#endif
-#ifndef NDEBUG
+#if ASSERT_ENABLED
bool m_didDispatchViewportPropertiesChanged { false };
#endif
Modified: trunk/Source/WebKit/ChangeLog (254383 => 254384)
--- trunk/Source/WebKit/ChangeLog 2020-01-11 01:06:40 UTC (rev 254383)
+++ trunk/Source/WebKit/ChangeLog 2020-01-11 01:27:13 UTC (rev 254384)
@@ -1,3 +1,33 @@
+2020-01-10 Simon Fraser <[email protected]>
+
+ Introduce ENABLE_META_VIEWPORT and use it in some WK2 code
+ https://bugs.webkit.org/show_bug.cgi?id=206091
+
+ Reviewed by Tim Horton.
+
+ 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):
+
2020-01-10 Jonathan Bedard <[email protected]>
Python3: Support Source/WebKit/Scripts/webkit
Modified: trunk/Source/WebKit/Shared/WebCoreArgumentCoders.cpp (254383 => 254384)
--- trunk/Source/WebKit/Shared/WebCoreArgumentCoders.cpp 2020-01-11 01:06:40 UTC (rev 254383)
+++ trunk/Source/WebKit/Shared/WebCoreArgumentCoders.cpp 2020-01-11 01:27:13 UTC (rev 254384)
@@ -637,7 +637,9 @@
return WTF::nullopt;
return floatQuad;
}
+#endif // PLATFORM(IOS_FAMILY)
+#if ENABLE(META_VIEWPORT)
void ArgumentCoder<ViewportArguments>::encode(Encoder& encoder, const ViewportArguments& viewportArguments)
{
SimpleArgumentCoder<ViewportArguments>::encode(encoder, viewportArguments);
@@ -655,9 +657,19 @@
return WTF::nullopt;
return viewportArguments;
}
-#endif // PLATFORM(IOS_FAMILY)
+#endif // ENABLE(META_VIEWPORT)
+void ArgumentCoder<ViewportAttributes>::encode(Encoder& encoder, const ViewportAttributes& viewportAttributes)
+{
+ SimpleArgumentCoder<ViewportAttributes>::encode(encoder, viewportAttributes);
+}
+
+bool ArgumentCoder<ViewportAttributes>::decode(Decoder& decoder, ViewportAttributes& viewportAttributes)
+{
+ return SimpleArgumentCoder<ViewportAttributes>::decode(decoder, viewportAttributes);
+}
+
void ArgumentCoder<IntPoint>::encode(Encoder& encoder, const IntPoint& intPoint)
{
SimpleArgumentCoder<IntPoint>::encode(encoder, intPoint);
@@ -763,16 +775,6 @@
return SimpleArgumentCoder<Length>::decode(decoder, length);
}
-void ArgumentCoder<ViewportAttributes>::encode(Encoder& encoder, const ViewportAttributes& viewportAttributes)
-{
- SimpleArgumentCoder<ViewportAttributes>::encode(encoder, viewportAttributes);
-}
-
-bool ArgumentCoder<ViewportAttributes>::decode(Decoder& decoder, ViewportAttributes& viewportAttributes)
-{
- return SimpleArgumentCoder<ViewportAttributes>::decode(decoder, viewportAttributes);
-}
-
void ArgumentCoder<VelocityData>::encode(Encoder& encoder, const VelocityData& velocityData)
{
encoder << velocityData.horizontalVelocity << velocityData.verticalVelocity << velocityData.scaleChangeRate << velocityData.lastUpdateTime;
Modified: trunk/Source/WebKit/Shared/WebCoreArgumentCoders.h (254383 => 254384)
--- trunk/Source/WebKit/Shared/WebCoreArgumentCoders.h 2020-01-11 01:06:40 UTC (rev 254383)
+++ trunk/Source/WebKit/Shared/WebCoreArgumentCoders.h 2020-01-11 01:27:13 UTC (rev 254384)
@@ -148,6 +148,9 @@
struct Highlight;
struct PasteboardImage;
struct PasteboardWebContent;
+#endif
+
+#if ENABLE(META_VIEWPORT)
struct ViewportArguments;
#endif
@@ -295,14 +298,22 @@
static void encode(Encoder&, const WebCore::FloatQuad&);
static Optional<WebCore::FloatQuad> decode(Decoder&);
};
+#endif // PLATFORM(IOS_FAMILY)
+#if ENABLE(META_VIEWPORT)
template<> struct ArgumentCoder<WebCore::ViewportArguments> {
static void encode(Encoder&, const WebCore::ViewportArguments&);
static bool decode(Decoder&, WebCore::ViewportArguments&);
static Optional<WebCore::ViewportArguments> decode(Decoder&);
};
-#endif // PLATFORM(IOS_FAMILY)
+#endif
+
+template<> struct ArgumentCoder<WebCore::ViewportAttributes> {
+ static void encode(Encoder&, const WebCore::ViewportAttributes&);
+ static bool decode(Decoder&, WebCore::ViewportAttributes&);
+};
+
template<> struct ArgumentCoder<WebCore::IntPoint> {
static void encode(Encoder&, const WebCore::IntPoint&);
static bool decode(Decoder&, WebCore::IntPoint&);
@@ -336,11 +347,6 @@
static bool decode(Decoder&, WebCore::Length&);
};
-template<> struct ArgumentCoder<WebCore::ViewportAttributes> {
- static void encode(Encoder&, const WebCore::ViewportAttributes&);
- static bool decode(Decoder&, WebCore::ViewportAttributes&);
-};
-
template<> struct ArgumentCoder<WebCore::VelocityData> {
static void encode(Encoder&, const WebCore::VelocityData&);
static bool decode(Decoder&, WebCore::VelocityData&);
Modified: trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp (254383 => 254384)
--- trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp 2020-01-11 01:06:40 UTC (rev 254383)
+++ trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp 2020-01-11 01:27:13 UTC (rev 254384)
@@ -84,21 +84,25 @@
encoder << colorSpace;
encoder << useSystemAppearance;
#endif
+
+#if ENABLE(META_VIEWPORT)
+ encoder << ignoresViewportScaleLimits;
+ encoder << viewportConfigurationViewLayoutSize;
+ encoder << viewportConfigurationLayoutSizeScaleFactor;
+ encoder << viewportConfigurationMinimumEffectiveDeviceWidth;
+ encoder << viewportConfigurationViewSize;
+ encoder << overrideViewportArguments;
+#endif
+
#if PLATFORM(IOS_FAMILY)
encoder << screenSize;
encoder << availableScreenSize;
encoder << overrideScreenSize;
encoder << textAutosizingWidth;
- encoder << ignoresViewportScaleLimits;
- encoder << viewportConfigurationViewLayoutSize;
- encoder << viewportConfigurationLayoutSizeScaleFactor;
- encoder << viewportConfigurationMinimumEffectiveDeviceWidth;
- encoder << viewportConfigurationViewSize;
encoder << maximumUnobscuredSize;
encoder << deviceOrientation;
encoder << keyboardIsAttached;
encoder << canShowWhileLocked;
- encoder << overrideViewportArguments;
#endif
#if PLATFORM(COCOA)
encoder << smartInsertDeleteEnabled;
@@ -275,15 +279,7 @@
return WTF::nullopt;
#endif
-#if PLATFORM(IOS_FAMILY)
- if (!decoder.decode(parameters.screenSize))
- return WTF::nullopt;
- if (!decoder.decode(parameters.availableScreenSize))
- return WTF::nullopt;
- if (!decoder.decode(parameters.overrideScreenSize))
- return WTF::nullopt;
- if (!decoder.decode(parameters.textAutosizingWidth))
- return WTF::nullopt;
+#if ENABLE(META_VIEWPORT)
if (!decoder.decode(parameters.ignoresViewportScaleLimits))
return WTF::nullopt;
if (!decoder.decode(parameters.viewportConfigurationViewLayoutSize))
@@ -294,6 +290,22 @@
return WTF::nullopt;
if (!decoder.decode(parameters.viewportConfigurationViewSize))
return WTF::nullopt;
+ Optional<Optional<WebCore::ViewportArguments>> overrideViewportArguments;
+ decoder >> overrideViewportArguments;
+ if (!overrideViewportArguments)
+ return WTF::nullopt;
+ parameters.overrideViewportArguments = WTFMove(*overrideViewportArguments);
+#endif
+
+#if PLATFORM(IOS_FAMILY)
+ if (!decoder.decode(parameters.screenSize))
+ return WTF::nullopt;
+ if (!decoder.decode(parameters.availableScreenSize))
+ return WTF::nullopt;
+ if (!decoder.decode(parameters.overrideScreenSize))
+ return WTF::nullopt;
+ if (!decoder.decode(parameters.textAutosizingWidth))
+ return WTF::nullopt;
if (!decoder.decode(parameters.maximumUnobscuredSize))
return WTF::nullopt;
if (!decoder.decode(parameters.deviceOrientation))
@@ -302,12 +314,6 @@
return WTF::nullopt;
if (!decoder.decode(parameters.canShowWhileLocked))
return WTF::nullopt;
-
- Optional<Optional<WebCore::ViewportArguments>> overrideViewportArguments;
- decoder >> overrideViewportArguments;
- if (!overrideViewportArguments)
- return WTF::nullopt;
- parameters.overrideViewportArguments = WTFMove(*overrideViewportArguments);
#endif
#if PLATFORM(COCOA)
Modified: trunk/Source/WebKit/Shared/WebPageCreationParameters.h (254383 => 254384)
--- trunk/Source/WebKit/Shared/WebPageCreationParameters.h 2020-01-11 01:06:40 UTC (rev 254383)
+++ trunk/Source/WebKit/Shared/WebPageCreationParameters.h 2020-01-11 01:27:13 UTC (rev 254384)
@@ -145,21 +145,23 @@
ColorSpaceData colorSpace;
bool useSystemAppearance;
#endif
+#if ENABLE(META_VIEWPORT)
+ bool ignoresViewportScaleLimits;
+ WebCore::FloatSize viewportConfigurationViewLayoutSize;
+ double viewportConfigurationLayoutSizeScaleFactor;
+ double viewportConfigurationMinimumEffectiveDeviceWidth;
+ WebCore::FloatSize viewportConfigurationViewSize;
+ Optional<WebCore::ViewportArguments> overrideViewportArguments;
+#endif
#if PLATFORM(IOS_FAMILY)
WebCore::FloatSize screenSize;
WebCore::FloatSize availableScreenSize;
WebCore::FloatSize overrideScreenSize;
float textAutosizingWidth;
- bool ignoresViewportScaleLimits;
- WebCore::FloatSize viewportConfigurationViewLayoutSize;
- double viewportConfigurationLayoutSizeScaleFactor;
- double viewportConfigurationMinimumEffectiveDeviceWidth;
- WebCore::FloatSize viewportConfigurationViewSize;
WebCore::FloatSize maximumUnobscuredSize;
int32_t deviceOrientation { 0 };
bool keyboardIsAttached { false };
bool canShowWhileLocked { false };
- Optional<WebCore::ViewportArguments> overrideViewportArguments;
#endif
#if PLATFORM(COCOA)
bool smartInsertDeleteEnabled;
Modified: trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp (254383 => 254384)
--- trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp 2020-01-11 01:06:40 UTC (rev 254383)
+++ trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp 2020-01-11 01:27:13 UTC (rev 254384)
@@ -2873,7 +2873,7 @@
void WKPageSetIgnoresViewportScaleLimits(WKPageRef page, bool ignoresViewportScaleLimits)
{
-#if PLATFORM(IOS_FAMILY)
+#if ENABLE(META_VIEWPORT)
toImpl(page)->setForceAlwaysUserScalable(ignoresViewportScaleLimits);
#endif
}
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (254383 => 254384)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2020-01-11 01:06:40 UTC (rev 254383)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2020-01-11 01:27:13 UTC (rev 254384)
@@ -349,11 +349,14 @@
[self _registerForNotifications];
_page->contentSizeCategoryDidChange([self _contentSizeCategory]);
- _page->setForceAlwaysUserScalable([_configuration ignoresViewportScaleLimits]);
CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), (__bridge const void *)(self), hardwareKeyboardAvailabilityChangedCallback, (CFStringRef)[NSString stringWithUTF8String:kGSEventHardwareKeyboardAvailabilityChangedNotification], nullptr, CFNotificationSuspensionBehaviorCoalesce);
#endif // PLATFORM(IOS_FAMILY)
+#if ENABLE(META_VIEWPORT)
+ _page->setForceAlwaysUserScalable([_configuration ignoresViewportScaleLimits]);
+#endif
+
#if PLATFORM(MAC)
_impl = makeUnique<WebKit::WebViewImpl>(self, self, processPool, pageConfiguration.copyRef());
_page = &_impl->page();
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (254383 => 254384)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2020-01-11 01:06:40 UTC (rev 254383)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2020-01-11 01:27:13 UTC (rev 254384)
@@ -7533,6 +7533,15 @@
parameters.colorSpace = pageClient().colorSpace();
parameters.useSystemAppearance = m_useSystemAppearance;
#endif
+
+#if ENABLE(META_VIEWPORT)
+ parameters.ignoresViewportScaleLimits = m_forceAlwaysUserScalable;
+ parameters.viewportConfigurationViewLayoutSize = m_viewportConfigurationViewLayoutSize;
+ parameters.viewportConfigurationLayoutSizeScaleFactor = m_viewportConfigurationLayoutSizeScaleFactor;
+ parameters.viewportConfigurationMinimumEffectiveDeviceWidth = m_viewportConfigurationMinimumEffectiveDeviceWidth;
+ parameters.overrideViewportArguments = m_overrideViewportArguments;
+#endif
+
#if PLATFORM(IOS_FAMILY)
parameters.screenSize = screenSize();
parameters.availableScreenSize = availableScreenSize();
@@ -7539,14 +7548,9 @@
parameters.overrideScreenSize = overrideScreenSize();
parameters.textAutosizingWidth = textAutosizingWidth();
parameters.mimeTypesWithCustomContentProviders = pageClient().mimeTypesWithCustomContentProviders();
- parameters.ignoresViewportScaleLimits = m_forceAlwaysUserScalable;
- parameters.viewportConfigurationViewLayoutSize = m_viewportConfigurationViewLayoutSize;
- parameters.viewportConfigurationLayoutSizeScaleFactor = m_viewportConfigurationLayoutSizeScaleFactor;
- parameters.viewportConfigurationMinimumEffectiveDeviceWidth = m_viewportConfigurationMinimumEffectiveDeviceWidth;
parameters.maximumUnobscuredSize = m_maximumUnobscuredSize;
parameters.deviceOrientation = m_deviceOrientation;
parameters.keyboardIsAttached = isInHardwareKeyboardMode();
- parameters.overrideViewportArguments = m_overrideViewportArguments;
parameters.canShowWhileLocked = m_configuration->canShowWhileLocked();
#endif
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (254383 => 254384)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.h 2020-01-11 01:06:40 UTC (rev 254383)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h 2020-01-11 01:27:13 UTC (rev 254384)
@@ -2285,7 +2285,6 @@
#if PLATFORM(IOS_FAMILY)
Optional<WebCore::InputMode> m_pendingInputModeChange;
- Optional<WebCore::ViewportArguments> m_overrideViewportArguments;
TransactionID m_firstLayerTreeTransactionIdAfterDidCommitLoad;
int32_t m_deviceOrientation { 0 };
bool m_hasReceivedLayerTreeTransactionAfterDidCommitLoad { true };
@@ -2594,14 +2593,18 @@
bool m_requiresTargetMonitoring { false };
#endif
+#if ENABLE(META_VIEWPORT)
+ bool m_forceAlwaysUserScalable { false };
+ WebCore::FloatSize m_viewportConfigurationViewLayoutSize;
+ double m_viewportConfigurationLayoutSizeScaleFactor { 1 };
+ double m_viewportConfigurationMinimumEffectiveDeviceWidth { 0 };
+ Optional<WebCore::ViewportArguments> m_overrideViewportArguments;
+#endif
+
#if PLATFORM(IOS_FAMILY)
Function<bool()> m_deviceOrientationUserPermissionHandlerForTesting;
std::unique_ptr<ElementDidFocusArguments> m_deferredElementDidFocusArguments;
bool m_waitingForPostLayoutEditorStateUpdateAfterFocusingElement { false };
- bool m_forceAlwaysUserScalable { false };
- WebCore::FloatSize m_viewportConfigurationViewLayoutSize;
- double m_viewportConfigurationLayoutSizeScaleFactor { 1 };
- double m_viewportConfigurationMinimumEffectiveDeviceWidth { 0 };
WebCore::FloatSize m_maximumUnobscuredSize;
bool m_lastObservedStateWasBackground { false };
#endif
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (254383 => 254384)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2020-01-11 01:06:40 UTC (rev 254383)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2020-01-11 01:27:13 UTC (rev 254384)
@@ -422,8 +422,10 @@
, m_pageScrolledHysteresis([this](PAL::HysteresisState state) { if (state == PAL::HysteresisState::Stopped) pageStoppedScrolling(); }, pageScrollHysteresisDuration)
, m_canRunBeforeUnloadConfirmPanel(parameters.canRunBeforeUnloadConfirmPanel)
, m_canRunModal(parameters.canRunModal)
+#if ENABLE(META_VIEWPORT)
+ , m_forceAlwaysUserScalable(parameters.ignoresViewportScaleLimits)
+#endif
#if PLATFORM(IOS_FAMILY)
- , m_forceAlwaysUserScalable(parameters.ignoresViewportScaleLimits)
, m_screenSize(parameters.screenSize)
, m_availableScreenSize(parameters.availableScreenSize)
, m_overrideScreenSize(parameters.overrideScreenSize)
@@ -5815,6 +5817,7 @@
if (page && page->pageScaleFactor() != 1)
scalePage(1, IntPoint());
}
+
#if PLATFORM(IOS_FAMILY)
m_hasReceivedVisibleContentRectsAfterDidCommitLoad = false;
m_hasRestoredExposedContentRectAfterDidCommitLoad = false;
@@ -5826,7 +5829,9 @@
#if ENABLE(IOS_TOUCH_EVENTS)
WebProcess::singleton().eventDispatcher().clearQueuedTouchEventsForPage(*this);
#endif
+#endif // PLATFORM(IOS_FAMILY)
+#if ENABLE(META_VIEWPORT)
resetViewportDefaultConfiguration(frame);
const Frame* coreFrame = frame->coreFrame();
@@ -5844,7 +5849,7 @@
if (viewportChanged)
viewportConfigurationChanged();
-#endif
+#endif // ENABLE(META_VIEWPORT)
#if ENABLE(VIEWPORT_RESIZING)
m_shrinkToFitContentTimer.stop();
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (254383 => 254384)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2020-01-11 01:06:40 UTC (rev 254383)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2020-01-11 01:27:13 UTC (rev 254384)
@@ -107,10 +107,13 @@
#if PLATFORM(IOS_FAMILY)
#include "GestureTypes.h"
#include <WebCore/IntPointHash.h>
-#include <WebCore/ViewportConfiguration.h>
#include <WebCore/WKContentObservation.h>
#endif
+#if ENABLE(META_VIEWPORT)
+#include <WebCore/ViewportConfiguration.h>
+#endif
+
#if ENABLE(APPLICATION_MANIFEST)
#include <WebCore/ApplicationManifest.h>
#endif
@@ -636,9 +639,6 @@
int32_t deviceOrientation() const { return m_deviceOrientation; }
void didReceiveMobileDocType(bool);
- void setUseTestingViewportConfiguration(bool useTestingViewport) { m_useTestingViewportConfiguration = useTestingViewport; }
- bool isUsingTestingViewportConfiguration() const { return m_useTestingViewportConfiguration; }
-
double minimumPageScaleFactor() const;
double maximumPageScaleFactor() const;
double maximumPageScaleFactorIgnoringAlwaysScalable() const;
@@ -967,10 +967,8 @@
void updateVisibilityState(bool isInitialState = false);
#if PLATFORM(IOS_FAMILY)
- void setViewportConfigurationViewLayoutSize(const WebCore::FloatSize&, double scaleFactor, double minimumEffectiveDeviceWidth);
void setMaximumUnobscuredSize(const WebCore::FloatSize&);
void setDeviceOrientation(int32_t);
- void setOverrideViewportArguments(const Optional<WebCore::ViewportArguments>&);
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);
bool scaleWasSetByUIProcess() const { return m_scaleWasSetByUIProcess; }
void willStartUserTriggeredZooming();
@@ -982,7 +980,6 @@
void didFinishContentChangeObserving(WKContentChange);
bool platformPrefersTextLegibilityBasedZoomScaling() const;
- const WebCore::ViewportConfiguration& viewportConfiguration() const { return m_viewportConfiguration; }
void hardwareKeyboardAvailabilityChanged(bool keyboardIsAttached);
@@ -991,6 +988,15 @@
bool canShowWhileLocked() const { return m_canShowWhileLocked; }
#endif
+#if ENABLE(META_VIEWPORT)
+ void setViewportConfigurationViewLayoutSize(const WebCore::FloatSize&, double scaleFactor, double minimumEffectiveDeviceWidth);
+ void setOverrideViewportArguments(const Optional<WebCore::ViewportArguments>&);
+ const WebCore::ViewportConfiguration& viewportConfiguration() const { return m_viewportConfiguration; }
+
+ void setUseTestingViewportConfiguration(bool useTestingViewport) { m_useTestingViewportConfiguration = useTestingViewport; }
+ bool isUsingTestingViewportConfiguration() const { return m_useTestingViewportConfiguration; }
+#endif
+
#if ENABLE(UI_SIDE_COMPOSITING)
Optional<float> scaleFromUIProcess(const VisibleContentRectUpdateInfo&) const;
void updateVisibleContentRects(const VisibleContentRectUpdateInfo&, MonotonicTime oldestTimestamp);
@@ -1287,9 +1293,6 @@
void didReceiveSyncWebPageMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&);
#if PLATFORM(IOS_FAMILY)
- void resetViewportDefaultConfiguration(WebFrame* mainFrame, bool hasMobileDocType = false);
- enum class ZoomToInitialScale { No, Yes };
- void viewportConfigurationChanged(ZoomToInitialScale = ZoomToInitialScale::No);
void updateViewportSizeForCSSViewportUnits();
static void convertSelectionRectsToRootView(WebCore::FrameView*, Vector<WebCore::SelectionRect>&);
@@ -1310,8 +1313,15 @@
RefPtr<ShareableBitmap> shareableBitmapSnapshotForNode(WebCore::Element&);
WebAutocorrectionContext autocorrectionContext();
bool applyAutocorrectionInternal(const String& correction, const String& originalText);
+#endif
+
+#if ENABLE(META_VIEWPORT)
+ void resetViewportDefaultConfiguration(WebFrame* mainFrame, bool hasMobileDocType = false);
+ enum class ZoomToInitialScale { No, Yes };
+ void viewportConfigurationChanged(ZoomToInitialScale = ZoomToInitialScale::No);
bool shouldIgnoreMetaViewport() const;
#endif
+
#if ENABLE(TEXT_AUTOSIZING)
void textAutoSizingAdjustmentTimerFired();
void resetTextAutosizing();
@@ -1706,10 +1716,6 @@
bool m_alwaysShowsHorizontalScroller { false };
bool m_alwaysShowsVerticalScroller { false };
-#if PLATFORM(IOS_FAMILY)
- bool m_ignoreViewportScalingConstraints { false };
-#endif
-
#if ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
bool m_readyToFindPrimarySnapshottedPlugin { false };
bool m_didFindPrimarySnapshottedPlugin { false };
@@ -1892,7 +1898,14 @@
#if ENABLE(IOS_TOUCH_EVENTS)
CompletionHandler<void(bool)> m_pendingSynchronousTouchEventReply;
#endif
-
+
+#if ENABLE(META_VIEWPORT)
+ WebCore::ViewportConfiguration m_viewportConfiguration;
+ bool m_useTestingViewportConfiguration { false };
+ bool m_forceAlwaysUserScalable { false };
+ bool m_ignoreViewportScalingConstraints { false };
+#endif
+
#if PLATFORM(IOS_FAMILY)
RefPtr<WebCore::Range> m_currentWordRange;
RefPtr<WebCore::Node> m_interactionNode;
@@ -1907,16 +1920,12 @@
WebCore::FloatPoint m_potentialTapLocation;
RefPtr<WebCore::SecurityOrigin> m_potentialTapSecurityOrigin;
- WebCore::ViewportConfiguration m_viewportConfiguration;
-
bool m_hasReceivedVisibleContentRectsAfterDidCommitLoad { false };
bool m_hasRestoredExposedContentRectAfterDidCommitLoad { false };
bool m_scaleWasSetByUIProcess { false };
bool m_userHasChangedPageScaleFactor { false };
bool m_hasStablePageScaleFactor { true };
- bool m_useTestingViewportConfiguration { false };
bool m_isInStableState { true };
- bool m_forceAlwaysUserScalable { false };
MonotonicTime m_oldestNonStableUpdateVisibleContentRectsTimestamp;
Seconds m_estimatedLatency { 0 };
WebCore::FloatSize m_screenSize;