- Revision
- 280146
- Author
- [email protected]
- Date
- 2021-07-21 10:03:10 -0700 (Wed, 21 Jul 2021)
Log Message
Cherry-pick r280122. rdar://problem/80902802
[iOS] Add SPI for internal clients to consult whether or not viewport quirks should be enabled
https://bugs.webkit.org/show_bug.cgi?id=228123
rdar://80397679
Reviewed by Dan Bernstein.
Rename the SPI added in r280119 from `-_needsSiteSpecificQuirks` to `-_needsSiteSpecificViewportQuirks`, to
clarify its intent (and importantly, to differentiate it from the existing WKPreferences SPI of the same name).
This distinction is important because this readonly property acts as a hint for WebKit clients to augment
certain viewport behaviors, whereas the readwrite WKPreferences property is a way for clients to indicate that
WebKit should opt in or out of site-specific quirks (unless overridden by Web Inspector).
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _needsSiteSpecificViewportQuirks]):
(-[WKWebView _needsSiteSpecificQuirks]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resetStateAfterProcessTermination):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didCommitLoad):
* WebProcess/WebPage/WebPage.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-612.1.24.0-branch/Source/WebKit/ChangeLog (280145 => 280146)
--- branches/safari-612.1.24.0-branch/Source/WebKit/ChangeLog 2021-07-21 17:03:04 UTC (rev 280145)
+++ branches/safari-612.1.24.0-branch/Source/WebKit/ChangeLog 2021-07-21 17:03:10 UTC (rev 280146)
@@ -1,5 +1,64 @@
2021-07-21 Alan Coon <[email protected]>
+ Cherry-pick r280122. rdar://problem/80902802
+
+ [iOS] Add SPI for internal clients to consult whether or not viewport quirks should be enabled
+ https://bugs.webkit.org/show_bug.cgi?id=228123
+ rdar://80397679
+
+ Reviewed by Dan Bernstein.
+
+ Rename the SPI added in r280119 from `-_needsSiteSpecificQuirks` to `-_needsSiteSpecificViewportQuirks`, to
+ clarify its intent (and importantly, to differentiate it from the existing WKPreferences SPI of the same name).
+
+ This distinction is important because this readonly property acts as a hint for WebKit clients to augment
+ certain viewport behaviors, whereas the readwrite WKPreferences property is a way for clients to indicate that
+ WebKit should opt in or out of site-specific quirks (unless overridden by Web Inspector).
+
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView _needsSiteSpecificViewportQuirks]):
+ (-[WKWebView _needsSiteSpecificQuirks]): Deleted.
+ * UIProcess/API/Cocoa/WKWebViewPrivate.h:
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::resetStateAfterProcessTermination):
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/WebPageProxy.messages.in:
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::didCommitLoad):
+ * WebProcess/WebPage/WebPage.h:
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2021-07-20 Wenson Hsieh <[email protected]>
+
+ [iOS] Add SPI for internal clients to consult whether or not viewport quirks should be enabled
+ https://bugs.webkit.org/show_bug.cgi?id=228123
+ rdar://80397679
+
+ Reviewed by Dan Bernstein.
+
+ Rename the SPI added in r280119 from `-_needsSiteSpecificQuirks` to `-_needsSiteSpecificViewportQuirks`, to
+ clarify its intent (and importantly, to differentiate it from the existing WKPreferences SPI of the same name).
+
+ This distinction is important because this readonly property acts as a hint for WebKit clients to augment
+ certain viewport behaviors, whereas the readwrite WKPreferences property is a way for clients to indicate that
+ WebKit should opt in or out of site-specific quirks (unless overridden by Web Inspector).
+
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView _needsSiteSpecificViewportQuirks]):
+ (-[WKWebView _needsSiteSpecificQuirks]): Deleted.
+ * UIProcess/API/Cocoa/WKWebViewPrivate.h:
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::resetStateAfterProcessTermination):
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/WebPageProxy.messages.in:
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::didCommitLoad):
+ * WebProcess/WebPage/WebPage.h:
+
+2021-07-21 Alan Coon <[email protected]>
+
Cherry-pick r280119. rdar://problem/80902802
[iOS] Add SPI for internal clients to consult whether or not viewport quirks should be enabled
Modified: branches/safari-612.1.24.0-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (280145 => 280146)
--- branches/safari-612.1.24.0-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2021-07-21 17:03:04 UTC (rev 280145)
+++ branches/safari-612.1.24.0-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2021-07-21 17:03:10 UTC (rev 280146)
@@ -2518,9 +2518,9 @@
return true;
}
-- (BOOL)_needsSiteSpecificQuirks
+- (BOOL)_needsSiteSpecificViewportQuirks
{
- return _page && _page->needsSiteSpecificQuirks();
+ return _page && _page->needsSiteSpecificViewportQuirks();
}
- (pid_t)_webProcessIdentifier
Modified: branches/safari-612.1.24.0-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h (280145 => 280146)
--- branches/safari-612.1.24.0-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h 2021-07-21 17:03:04 UTC (rev 280145)
+++ branches/safari-612.1.24.0-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h 2021-07-21 17:03:10 UTC (rev 280146)
@@ -412,7 +412,7 @@
- (void)_suspendPage:(void (^)(BOOL))completionHandler WK_API_AVAILABLE(macos(12.0), ios(15.0));
- (void)_resumePage:(void (^)(BOOL))completionHandler WK_API_AVAILABLE(macos(12.0), ios(15.0));
-@property (nonatomic, readonly) BOOL _needsSiteSpecificQuirks WK_API_AVAILABLE(macos(12.0), ios(15.0));
+@property (nonatomic, readonly) BOOL _needsSiteSpecificViewportQuirks WK_API_AVAILABLE(macos(12.0), ios(15.0));
@end
Modified: branches/safari-612.1.24.0-branch/Source/WebKit/UIProcess/WebPageProxy.cpp (280145 => 280146)
--- branches/safari-612.1.24.0-branch/Source/WebKit/UIProcess/WebPageProxy.cpp 2021-07-21 17:03:04 UTC (rev 280145)
+++ branches/safari-612.1.24.0-branch/Source/WebKit/UIProcess/WebPageProxy.cpp 2021-07-21 17:03:10 UTC (rev 280146)
@@ -7628,7 +7628,7 @@
automationSession->terminate();
}
- m_needsSiteSpecificQuirks = true;
+ m_needsSiteSpecificViewportQuirks = true;
}
void WebPageProxy::provisionalProcessDidTerminate()
Modified: branches/safari-612.1.24.0-branch/Source/WebKit/UIProcess/WebPageProxy.h (280145 => 280146)
--- branches/safari-612.1.24.0-branch/Source/WebKit/UIProcess/WebPageProxy.h 2021-07-21 17:03:04 UTC (rev 280145)
+++ branches/safari-612.1.24.0-branch/Source/WebKit/UIProcess/WebPageProxy.h 2021-07-21 17:03:10 UTC (rev 280146)
@@ -1958,8 +1958,8 @@
WKQuickLookPreviewController *quickLookPreviewController() const { return m_quickLookPreviewController.get(); }
#endif
- bool needsSiteSpecificQuirks() const { return m_needsSiteSpecificQuirks; }
- void setNeedsSiteSpecificQuirks(bool value) { m_needsSiteSpecificQuirks = value; }
+ bool needsSiteSpecificViewportQuirks() const { return m_needsSiteSpecificViewportQuirks; }
+ void setNeedsSiteSpecificViewportQuirks(bool value) { m_needsSiteSpecificViewportQuirks = value; }
private:
WebPageProxy(PageClient&, WebProcessProxy&, Ref<API::PageConfiguration>&&);
@@ -3075,7 +3075,7 @@
RetainPtr<WKQuickLookPreviewController> m_quickLookPreviewController;
#endif
- bool m_needsSiteSpecificQuirks { true };
+ bool m_needsSiteSpecificViewportQuirks { true };
};
#ifdef __OBJC__
Modified: branches/safari-612.1.24.0-branch/Source/WebKit/UIProcess/WebPageProxy.messages.in (280145 => 280146)
--- branches/safari-612.1.24.0-branch/Source/WebKit/UIProcess/WebPageProxy.messages.in 2021-07-21 17:03:04 UTC (rev 280145)
+++ branches/safari-612.1.24.0-branch/Source/WebKit/UIProcess/WebPageProxy.messages.in 2021-07-21 17:03:10 UTC (rev 280146)
@@ -415,7 +415,7 @@
ShowDataDetectorsUIForPositionInformation(struct WebKit::InteractionInformationAtPosition information)
#endif
- SetNeedsSiteSpecificQuirks(bool needsSiteSpecificQuirks)
+ SetNeedsSiteSpecificViewportQuirks(bool value)
DidChangeInspectorFrontendCount(uint64_t count)
Modified: branches/safari-612.1.24.0-branch/Source/WebKit/WebProcess/WebPage/WebPage.cpp (280145 => 280146)
--- branches/safari-612.1.24.0-branch/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2021-07-21 17:03:04 UTC (rev 280145)
+++ branches/safari-612.1.24.0-branch/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2021-07-21 17:03:10 UTC (rev 280146)
@@ -6266,10 +6266,10 @@
if (!frame->isMainFrame())
return;
- bool needsSiteSpecificQuirks = frame->coreFrame()->settings().needsSiteSpecificQuirks();
- if (m_needsSiteSpecificQuirks != needsSiteSpecificQuirks) {
- m_needsSiteSpecificQuirks = needsSiteSpecificQuirks;
- send(Messages::WebPageProxy::SetNeedsSiteSpecificQuirks(needsSiteSpecificQuirks));
+ bool needsSiteSpecificViewportQuirks = frame->coreFrame()->settings().needsSiteSpecificQuirks();
+ if (m_needsSiteSpecificViewportQuirks != needsSiteSpecificViewportQuirks) {
+ m_needsSiteSpecificViewportQuirks = needsSiteSpecificViewportQuirks;
+ send(Messages::WebPageProxy::SetNeedsSiteSpecificViewportQuirks(needsSiteSpecificViewportQuirks));
}
if (m_drawingArea)
Modified: branches/safari-612.1.24.0-branch/Source/WebKit/WebProcess/WebPage/WebPage.h (280145 => 280146)
--- branches/safari-612.1.24.0-branch/Source/WebKit/WebProcess/WebPage/WebPage.h 2021-07-21 17:03:04 UTC (rev 280145)
+++ branches/safari-612.1.24.0-branch/Source/WebKit/WebProcess/WebPage/WebPage.h 2021-07-21 17:03:10 UTC (rev 280146)
@@ -2383,7 +2383,7 @@
WebCore::HighlightVisibility m_appHighlightsVisible { false };
#endif
- bool m_needsSiteSpecificQuirks { true };
+ bool m_needsSiteSpecificViewportQuirks { true };
};
#if !PLATFORM(IOS_FAMILY)