Diff
Modified: trunk/Source/WebCore/ChangeLog (289859 => 289860)
--- trunk/Source/WebCore/ChangeLog 2022-02-15 23:59:40 UTC (rev 289859)
+++ trunk/Source/WebCore/ChangeLog 2022-02-16 00:04:25 UTC (rev 289860)
@@ -1,3 +1,27 @@
+2022-02-15 Philip Chimento <[email protected]>
+
+ Fixes for build-webkit --minimal
+ https://bugs.webkit.org/show_bug.cgi?id=229780
+
+ Reviewed by Don Olmstead.
+
+ Covered by existing tests.
+
+ Missing headers that didn't get included by other headers if certain
+ options were disabled; missing ifdef guards around usage of features.
+
+ * html/ColorInputType.cpp: Missing include
+ * page/DOMWindow.cpp: Missing include; fix pre-existing include order
+ issue flagged by check-style
+ * platform/UserAgentQuirks.cpp: Missing ENABLE(PUBLIC_SUFFIX_LIST) and
+ slight rewrite of code for the #else case
+ (WebCore::UserAgentQuirks::quirksForURL):
+ * platform/network/soup/NetworkStorageSessionSoup.cpp: Missing
+ ENABLE(INTELLIGENT_TRACKING_PREVENTION)
+ (WebCore::NetworkStorageSession::setCookieAcceptPolicy):
+ * rendering/RenderLayerCompositor.cpp: Missing ENABLE(ASYNC_SCROLLING)
+ (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
+
2022-02-15 Brandon Stewart <[email protected]>
Skip positioned objects and line break boxes as they have no affect on width
Modified: trunk/Source/WebCore/html/ColorInputType.cpp (289859 => 289860)
--- trunk/Source/WebCore/html/ColorInputType.cpp 2022-02-15 23:59:40 UTC (rev 289859)
+++ trunk/Source/WebCore/html/ColorInputType.cpp 2022-02-16 00:04:25 UTC (rev 289860)
@@ -39,6 +39,7 @@
#include "Chrome.h"
#include "Color.h"
#include "ColorSerialization.h"
+#include "ElementChildIterator.h"
#include "Event.h"
#include "HTMLDataListElement.h"
#include "HTMLDivElement.h"
Modified: trunk/Source/WebCore/page/DOMWindow.cpp (289859 => 289860)
--- trunk/Source/WebCore/page/DOMWindow.cpp 2022-02-15 23:59:40 UTC (rev 289859)
+++ trunk/Source/WebCore/page/DOMWindow.cpp 2022-02-16 00:04:25 UTC (rev 289860)
@@ -111,7 +111,7 @@
#include "StyleResolver.h"
#include "StyleScope.h"
#include "SuddenTermination.h"
-#include <wtf/URL.h>
+#include "UserContentProvider.h"
#include "UserGestureIndicator.h"
#include "VisualViewport.h"
#include "WebKitPoint.h"
@@ -130,6 +130,7 @@
#include <wtf/NeverDestroyed.h>
#include <wtf/Ref.h>
#include <wtf/SetForScope.h>
+#include <wtf/URL.h>
#include <wtf/text/WTFString.h>
#if ENABLE(USER_MESSAGE_HANDLERS)
Modified: trunk/Source/WebCore/platform/UserAgentQuirks.cpp (289859 => 289860)
--- trunk/Source/WebCore/platform/UserAgentQuirks.cpp 2022-02-15 23:59:40 UTC (rev 289859)
+++ trunk/Source/WebCore/platform/UserAgentQuirks.cpp 2022-02-16 00:04:25 UTC (rev 289860)
@@ -147,8 +147,9 @@
ASSERT(!url.isNull());
String domain = url.host().toString();
+ UserAgentQuirks quirks;
+#if ENABLE(PUBLIC_SUFFIX_LIST)
String baseDomain = topPrivatelyControlledDomain(domain);
- UserAgentQuirks quirks;
if (urlRequiresChromeBrowser(domain, baseDomain))
quirks.add(UserAgentQuirks::NeedsChromeBrowser);
@@ -157,6 +158,10 @@
if (urlRequiresMacintoshPlatform(domain, baseDomain))
quirks.add(UserAgentQuirks::NeedsMacintoshPlatform);
+#else
+ if (urlRequiresFirefoxBrowser(domain))
+ quirks.add(UserAgentQuirks::NeedsFirefoxBrowser);
+#endif
if (urlRequiresUnbrandedUserAgent(domain))
quirks.add(UserAgentQuirks::NeedsUnbrandedUserAgent);
Modified: trunk/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp (289859 => 289860)
--- trunk/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp 2022-02-15 23:59:40 UTC (rev 289859)
+++ trunk/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp 2022-02-16 00:04:25 UTC (rev 289860)
@@ -246,11 +246,13 @@
void NetworkStorageSession::setCookieAcceptPolicy(HTTPCookieAcceptPolicy policy)
{
+#if ENABLE(INTELLIGENT_TRACKING_PREVENTION)
if (m_isResourceLoadStatisticsEnabled && m_thirdPartyCookieBlockingMode == ThirdPartyCookieBlockingMode::All) {
m_cookieAcceptPolicy = policy;
if (m_cookieAcceptPolicy == HTTPCookieAcceptPolicy::ExclusivelyFromMainDocumentDomain)
policy = HTTPCookieAcceptPolicy::AlwaysAccept;
}
+#endif
SoupCookieJarAcceptPolicy soupPolicy = SOUP_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY;
switch (policy) {
Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (289859 => 289860)
--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2022-02-15 23:59:40 UTC (rev 289859)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2022-02-16 00:04:25 UTC (rev 289860)
@@ -608,7 +608,7 @@
SetForScope<bool> flushingLayersScope(m_flushingLayers, true);
if (auto* rootLayer = rootGraphicsLayer()) {
-#if ENABLE(SCROLLING_THREAD)
+#if ENABLE(ASYNC_SCROLLING) && ENABLE(SCROLLING_THREAD)
LayerTreeHitTestLocker layerLocker(scrollingCoordinator());
#endif
FloatRect visibleRect = visibleRectForLayerFlushing();
Modified: trunk/Source/WebKit/ChangeLog (289859 => 289860)
--- trunk/Source/WebKit/ChangeLog 2022-02-15 23:59:40 UTC (rev 289859)
+++ trunk/Source/WebKit/ChangeLog 2022-02-16 00:04:25 UTC (rev 289860)
@@ -1,3 +1,47 @@
+2022-02-15 Philip Chimento <[email protected]>
+
+ Fixes for build-webkit --minimal
+ https://bugs.webkit.org/show_bug.cgi?id=229780
+
+ Reviewed by Don Olmstead.
+
+ Missing headers that didn't get included by other headers if certain
+ options were disabled; missing ifdef guards around usage of features.
+
+ * NetworkProcess/soup/NetworkDataTaskSoup.cpp: Missing
+ ENABLE(PUBLIC_SUFFIX_LIST), duplicate line in order to avoid semicolon
+ by itself on a line which check-style doesn't like
+ (WebKit::NetworkDataTaskSoup::shouldAllowHSTSPolicySetting const):
+ * Shared/API/glib/WebKitContextMenuActions.cpp: Missing include
+ * UIProcess/API/gtk/WebKitWebViewBase.cpp: Missing
+ ENABLE(FULLSCREEN_API)
+ (webkitWebViewBaseDispose):
+ * UIProcess/gtk/PointerLockManagerWayland.cpp: Missing include
+ * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp: Missing
+ ENABLE(USER_MESSAGE_HANDLERS)
+ (webkit_dom_dom_window_webkit_message_handlers_post_message):
+ * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp:
+ Several instances of missing ENABLE(FULLSCREEN_API). The public API
+ methods just do nothing if not compiled with fullscreen support.
+ (webkit_dom_document_webkit_cancel_fullscreen):
+ (webkit_dom_document_webkit_exit_fullscreen):
+ (webkit_dom_document_get_webkit_is_fullscreen):
+ (webkit_dom_document_get_webkit_fullscreen_keyboard_input_allowed):
+ (webkit_dom_document_get_webkit_current_fullscreen_element):
+ (webkit_dom_document_get_webkit_fullscreen_enabled):
+ (webkit_dom_document_get_webkit_fullscreen_element):
+ * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElementGtk.cpp: Missing
+ ENABLE(FULLSCREEN_API)
+ (webkit_dom_element_webkit_request_fullscreen):
+ * WebProcess/WebPage/EventDispatcher.cpp: Two instances of missing
+ ENABLE(ASYNC_SCROLLING)
+ (WebKit::EventDispatcher::wheelEvent):
+ (WebKit::EventDispatcher::notifyScrollingTreesDisplayWasRefreshed):
+ * WebProcess/WebPage/EventDispatcher.h: Missing ENABLE(ASYNC_SCROLLING)
+ * WebProcess/WebPage/glib/WebPageGLib.cpp: Missing
+ ENABLE(AUTOCAPITALIZE)
+ (WebKit::inputMethodSateForElement):
+
2022-02-15 Per Arne Vollan <[email protected]>
[macOS] Add access to mach service in the Networking process for all users
Modified: trunk/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp (289859 => 289860)
--- trunk/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp 2022-02-15 23:59:40 UTC (rev 289859)
+++ trunk/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp 2022-02-16 00:04:25 UTC (rev 289860)
@@ -1568,9 +1568,14 @@
{
// Follow Apple's HSTS abuse mitigation 1:
// "Limit HSTS State to the Hostname, or the Top Level Domain + 1"
+#if ENABLE(PUBLIC_SUFFIX_LIST)
return isTopLevelNavigation()
|| m_currentRequest.url().host() == m_currentRequest.firstPartyForCookies().host()
|| isPublicSuffix(m_currentRequest.url().host().toStringWithoutCopying());
+#else
+ return isTopLevelNavigation()
+ || m_currentRequest.url().host() == m_currentRequest.firstPartyForCookies().host();
+#endif
}
bool NetworkDataTaskSoup::shouldAllowHSTSProtocolUpgrade() const
Modified: trunk/Source/WebKit/Shared/API/glib/WebKitContextMenuActions.cpp (289859 => 289860)
--- trunk/Source/WebKit/Shared/API/glib/WebKitContextMenuActions.cpp 2022-02-15 23:59:40 UTC (rev 289859)
+++ trunk/Source/WebKit/Shared/API/glib/WebKitContextMenuActions.cpp 2022-02-16 00:04:25 UTC (rev 289860)
@@ -22,6 +22,7 @@
#include "WebKitContextMenuActionsPrivate.h"
#include <WebCore/LocalizedStrings.h>
+#include <wtf/text/WTFString.h>
using namespace WebCore;
Modified: trunk/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp (289859 => 289860)
--- trunk/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp 2022-02-15 23:59:40 UTC (rev 289859)
+++ trunk/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp 2022-02-16 00:04:25 UTC (rev 289860)
@@ -705,7 +705,9 @@
webView->priv->inputMethodFilter.setContext(nullptr);
webView->priv->pageProxy->close();
webView->priv->acceleratedBackingStore = nullptr;
+#if ENABLE(FULLSCREEN_API)
webView->priv->sleepDisabler = nullptr;
+#endif
webView->priv->keyBindingTranslator.invalidate();
G_OBJECT_CLASS(webkit_web_view_base_parent_class)->dispose(gobject);
}
Modified: trunk/Source/WebKit/UIProcess/gtk/PointerLockManagerWayland.cpp (289859 => 289860)
--- trunk/Source/WebKit/UIProcess/gtk/PointerLockManagerWayland.cpp 2022-02-15 23:59:40 UTC (rev 289859)
+++ trunk/Source/WebKit/UIProcess/gtk/PointerLockManagerWayland.cpp 2022-02-16 00:04:25 UTC (rev 289860)
@@ -31,6 +31,7 @@
#include "WebPageProxy.h"
#include "pointer-constraints-unstable-v1-client-protocol.h"
#include <WebCore/WlUniquePtr.h>
+#include <gtk/gtk.h>
#if USE(GTK4)
#include <gdk/wayland/gdkwayland.h>
Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp (289859 => 289860)
--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp 2022-02-15 23:59:40 UTC (rev 289859)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp 2022-02-16 00:04:25 UTC (rev 289860)
@@ -1060,6 +1060,7 @@
g_return_val_if_fail(handlerName, FALSE);
g_return_val_if_fail(message, FALSE);
+#if ENABLE(USER_MESSAGE_HANDLERS)
WebCore::DOMWindow* domWindow = WebKit::core(window);
if (!domWindow->shouldHaveWebKitNamespaceForWorld(WebCore::mainThreadNormalWorld()))
return FALSE;
@@ -1086,5 +1087,8 @@
return FALSE;
return TRUE;
+#else
+ return FALSE;
+#endif // ENABLE(USER_MESSAGE_HANDLERS)
}
G_GNUC_END_IGNORE_DEPRECATIONS;
Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp (289859 => 289860)
--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp 2022-02-15 23:59:40 UTC (rev 289859)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp 2022-02-16 00:04:25 UTC (rev 289860)
@@ -1312,8 +1312,10 @@
{
WebCore::JSMainThreadNullState state;
g_return_if_fail(WEBKIT_DOM_IS_DOCUMENT(self));
+#if ENABLE(FULLSCREEN_API)
WebCore::Document* item = WebKit::core(self);
item->fullscreenManager().cancelFullscreen();
+#endif
}
void webkit_dom_document_webkit_exit_fullscreen(WebKitDOMDocument* self)
@@ -1320,8 +1322,10 @@
{
WebCore::JSMainThreadNullState state;
g_return_if_fail(WEBKIT_DOM_IS_DOCUMENT(self));
+#if ENABLE(FULLSCREEN_API)
WebCore::Document* item = WebKit::core(self);
item->fullscreenManager().exitFullscreen();
+#endif
}
void webkit_dom_document_exit_pointer_lock(WebKitDOMDocument* self)
@@ -1822,9 +1826,13 @@
{
WebCore::JSMainThreadNullState state;
g_return_val_if_fail(WEBKIT_DOM_IS_DOCUMENT(self), FALSE);
+#if ENABLE(FULLSCREEN_API)
WebCore::Document* item = WebKit::core(self);
gboolean result = item->fullscreenManager().isFullscreen();
return result;
+#else
+ return FALSE;
+#endif
}
gboolean webkit_dom_document_get_webkit_fullscreen_keyboard_input_allowed(WebKitDOMDocument* self)
@@ -1831,9 +1839,13 @@
{
WebCore::JSMainThreadNullState state;
g_return_val_if_fail(WEBKIT_DOM_IS_DOCUMENT(self), FALSE);
+#if ENABLE(FULLSCREEN_API)
WebCore::Document* item = WebKit::core(self);
gboolean result = item->fullscreenManager().isFullscreenKeyboardInputAllowed();
return result;
+#else
+ return FALSE;
+#endif
}
WebKitDOMElement* webkit_dom_document_get_webkit_current_fullscreen_element(WebKitDOMDocument* self)
@@ -1840,9 +1852,13 @@
{
WebCore::JSMainThreadNullState state;
g_return_val_if_fail(WEBKIT_DOM_IS_DOCUMENT(self), 0);
+#if ENABLE(FULLSCREEN_API)
WebCore::Document* item = WebKit::core(self);
RefPtr<WebCore::Element> gobjectResult = WTF::getPtr(item->fullscreenManager().currentFullscreenElement());
return WebKit::kit(gobjectResult.get());
+#else
+ return NULL;
+#endif
}
gboolean webkit_dom_document_get_webkit_fullscreen_enabled(WebKitDOMDocument* self)
@@ -1849,9 +1865,13 @@
{
WebCore::JSMainThreadNullState state;
g_return_val_if_fail(WEBKIT_DOM_IS_DOCUMENT(self), FALSE);
+#if ENABLE(FULLSCREEN_API)
WebCore::Document* item = WebKit::core(self);
gboolean result = item->fullscreenManager().isFullscreenEnabled();
return result;
+#else
+ return FALSE;
+#endif
}
WebKitDOMElement* webkit_dom_document_get_webkit_fullscreen_element(WebKitDOMDocument* self)
@@ -1858,9 +1878,13 @@
{
WebCore::JSMainThreadNullState state;
g_return_val_if_fail(WEBKIT_DOM_IS_DOCUMENT(self), 0);
+#if ENABLE(FULLSCREEN_API)
WebCore::Document* item = WebKit::core(self);
RefPtr<WebCore::Element> gobjectResult = WTF::getPtr(item->fullscreenManager().fullscreenElement());
return WebKit::kit(gobjectResult.get());
+#else
+ return NULL;
+#endif
}
WebKitDOMElement* webkit_dom_document_get_pointer_lock_element(WebKitDOMDocument* self)
Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElementGtk.cpp (289859 => 289860)
--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElementGtk.cpp 2022-02-15 23:59:40 UTC (rev 289859)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElementGtk.cpp 2022-02-16 00:04:25 UTC (rev 289860)
@@ -893,8 +893,10 @@
{
WebCore::JSMainThreadNullState state;
g_return_if_fail(WEBKIT_DOM_IS_ELEMENT(self));
+#if ENABLE(FULLSCREEN_API)
WebCore::Element* item = WebKit::core(self);
item->webkitRequestFullscreen();
+#endif
}
WebKitDOMElement* webkit_dom_element_insert_adjacent_element(WebKitDOMElement* self, const gchar* where, WebKitDOMElement* element, GError** error)
Modified: trunk/Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp (289859 => 289860)
--- trunk/Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp 2022-02-15 23:59:40 UTC (rev 289859)
+++ trunk/Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp 2022-02-16 00:04:25 UTC (rev 289860)
@@ -75,7 +75,7 @@
ASSERT_NOT_REACHED();
}
-#if ENABLE(SCROLLING_THREAD)
+#if ENABLE(ASYNC_SCROLLING) && ENABLE(SCROLLING_THREAD)
void EventDispatcher::addScrollingTreeForPage(WebPage* webPage)
{
Locker locker { m_scrollingTreesLock };
@@ -104,7 +104,7 @@
void EventDispatcher::internalWheelEvent(PageIdentifier pageID, const WebWheelEvent& wheelEvent, RectEdges<bool> rubberBandableEdges, WheelEventOrigin wheelEventOrigin)
{
auto processingSteps = OptionSet<WebCore::WheelEventProcessingSteps> { WheelEventProcessingSteps::MainThreadForScrolling, WheelEventProcessingSteps::MainThreadForBlockingDOMEventDispatch };
-#if ENABLE(SCROLLING_THREAD)
+#if ENABLE(ASYNC_SCROLLING) && ENABLE(SCROLLING_THREAD)
do {
auto platformWheelEvent = platform(wheelEvent);
#if PLATFORM(COCOA)
@@ -294,7 +294,7 @@
void EventDispatcher::notifyScrollingTreesDisplayWasRefreshed(PlatformDisplayID displayID)
{
-#if ENABLE(SCROLLING_THREAD)
+#if ENABLE(ASYNC_SCROLLING) && ENABLE(SCROLLING_THREAD)
Locker locker { m_scrollingTreesLock };
for (auto keyValuePair : m_scrollingTrees)
keyValuePair.value->displayDidRefresh(displayID);
Modified: trunk/Source/WebKit/WebProcess/WebPage/EventDispatcher.h (289859 => 289860)
--- trunk/Source/WebKit/WebProcess/WebPage/EventDispatcher.h 2022-02-15 23:59:40 UTC (rev 289859)
+++ trunk/Source/WebKit/WebProcess/WebPage/EventDispatcher.h 2022-02-16 00:04:25 UTC (rev 289860)
@@ -129,7 +129,7 @@
Ref<WorkQueue> m_queue;
-#if ENABLE(SCROLLING_THREAD)
+#if ENABLE(ASYNC_SCROLLING) && ENABLE(SCROLLING_THREAD)
Lock m_scrollingTreesLock;
HashMap<WebCore::PageIdentifier, RefPtr<WebCore::ThreadedScrollingTree>> m_scrollingTrees WTF_GUARDED_BY_LOCK(m_scrollingTreesLock);
#endif
Modified: trunk/Source/WebKit/WebProcess/WebPage/glib/WebPageGLib.cpp (289859 => 289860)
--- trunk/Source/WebKit/WebProcess/WebPage/glib/WebPageGLib.cpp 2022-02-15 23:59:40 UTC (rev 289859)
+++ trunk/Source/WebKit/WebProcess/WebPage/glib/WebPageGLib.cpp 2022-02-16 00:04:25 UTC (rev 289860)
@@ -189,11 +189,15 @@
if (is<HTMLInputElement>(*element)) {
auto& inputElement = downcast<HTMLInputElement>(*element);
state.setPurposeForInputElement(inputElement);
+#if ENABLE(AUTOCAPITALIZE)
state.addHintsForAutocapitalizeType(inputElement.autocapitalizeType());
+#endif
} else if (is<HTMLTextAreaElement>(*element) || (element->hasEditableStyle() && is<HTMLElement>(*element))) {
auto& htmlElement = downcast<HTMLElement>(*element);
state.setPurposeOrHintForInputMode(htmlElement.canonicalInputMode());
+#if ENABLE(AUTOCAPITALIZE)
state.addHintsForAutocapitalizeType(htmlElement.autocapitalizeType());
+#endif
}
if (element->isSpellCheckingEnabled())