Timeline
Apr 23, 2018:
- 11:33 PM Changeset in webkit [230943] by
-
- 4 edits in trunk/Tools
[GLIB] Make it possible to use a different timeout for slow test cases in GLib tests
https://bugs.webkit.org/show_bug.cgi?id=184816
Reviewed by Michael Catanzaro.
Pass a function from api test runner to glib test runner to check if a test is slow and use the given slow
timeout.
- TestWebKitAPI/glib/TestExpectations.json:
- glib/api_test_runner.py:
(TestRunner._run_test_glib.is_slow_test):
(TestRunner._run_test_glib):
- glib/glib_test_runner.py:
(GLibTestRunner.init):
(GLibTestRunner._stop_timeout):
(GLibTestRunner._subtest_start):
(GLibTestRunner._subtest_end):
- 8:22 PM Changeset in webkit [230942] by
-
- 18 edits in trunk/Source
Make WebLoaderStrategy send to NetworkResourceLoader necessary parameters to handle full loads in NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=184763
Reviewed by Chris Dumez.
Source/WebCore:
No change of behavior yet since we do not use these parameters in NetworkProcess yet.
Add PreflightPolicy and CSP response headers as ResourceLoaderOptions.
This allows passing them from DocumentThreadableLoader to WebLoaderStrategy.
Allow getting the original headers from a SubresourceLoader.
This allows passing them from DocumentThreadableLoader down to WebLoaderStrategy.
- Modules/fetch/FetchLoader.cpp:
(WebCore::FetchLoader::startLoadingBlobURL):
(WebCore::FetchLoader::start):
- loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
(WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):
(WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest):
- loader/ResourceLoaderOptions.h:
- loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::originalHeaders const):
- loader/SubresourceLoader.h:
- loader/ThreadableLoader.cpp:
(WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions):
(WebCore::ThreadableLoaderOptions::isolatedCopy const):
- loader/ThreadableLoader.h:
- page/EventSource.cpp:
(WebCore::EventSource::connect):
- xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::createRequest):
Source/WebKit:
Set all required NetworkResourceLoadParameters for asynchronous loads.
This includes preflight policy, CSP response headers, SecurityOrigin and content blockers identifier.
Update NetworkLoadChecker to handle preflight policy.
This is not needed right now since sync XHR and ping loads are using the default ConsiderPreflight policy.
But this will be needed for XHR/fetch/EventSource loads.
- NetworkProcess/NetworkLoadChecker.cpp:
(WebKit::NetworkLoadChecker::NetworkLoadChecker):
(WebKit::NetworkLoadChecker::checkRedirection):
(WebKit::NetworkLoadChecker::validateResponse):
(WebKit::NetworkLoadChecker::checkCORSRequest):
- NetworkProcess/NetworkLoadChecker.h:
(WebKit::NetworkLoadChecker::create):
- NetworkProcess/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::encode const):
(WebKit::NetworkResourceLoadParameters::decode):
- NetworkProcess/NetworkResourceLoadParameters.h:
- NetworkProcess/NetworkResourceLoader.cpp:
- NetworkProcess/PingLoad.cpp:
(WebKit::PingLoad::PingLoad):
- WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
- 7:45 PM Changeset in webkit [230941] by
-
- 14 edits2 adds in trunk
[Extra zoom mode] REGRESSION(230860) Unable to change time input values using UI
https://bugs.webkit.org/show_bug.cgi?id=184901
<rdar://problem/39664797>
Reviewed by Tim Horton.
Source/WebKit:
Fixes the bug by falling back to setting the value of the focused input element in the case where the selection
is not editable. Also adds plumbing to make time pickers testable in extra zoom mode.
- UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView setTimePickerValueToHour:minute:]):
- UIProcess/API/Cocoa/WKWebViewPrivate.h:
- UIProcess/ios/WKContentViewInteraction.h:
- UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setTimePickerValueToHour:minute:]):
Add plumbing to make it possible for WebKitTestRunner to simulate picking a time from the given hours and
minutes. This is currently only implemented for extra zoom mode, but may be implemented for UIKit's time picker
as well in the future by adjusting -[WKContentView setTimePickerValueToHour:minute:].
- WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setTextAsync):
Tools:
Introduce a new UIScriptController method to set the value of a currently focused input of type time, by
interacting with the UI. See WebKit ChangeLogs for more detail.
- DumpRenderTree/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::setTimePickerValue):
- TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
- TestRunnerShared/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::setTimePickerValue):
- TestRunnerShared/UIScriptContext/UIScriptController.h:
- WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::setTimePickerValue):
LayoutTests:
Adds a basic test to verify that tapping on an input of type
timeand choosing a time actually changes the
value of the input. Also adds a new UIHelper function to set the value of the currently focused input of type
time to the given hours and minutes.
- fast/forms/extrazoom/time-picker-value-change-expected.txt: Added.
- fast/forms/extrazoom/time-picker-value-change.html: Added.
- resources/ui-helper.js:
(window.UIHelper.setTimePickerValue):
(window.UIHelper):
- 7:34 PM Changeset in webkit [230940] by
-
- 3 edits in trunk/Websites/perf.webkit.org
Revision information returned by querying measurement set api with analysis task id should contain commit order.
https://bugs.webkit.org/show_bug.cgi?id=184902
Reviewed by Ryosuke Niwa
This is a bug fix for r230719 which does not cover the case while querying
measurement-set.php?analysisTask=$task_id
- public/api/measurement-set.php: AnalysisResultsFetcher.fetch_commits results should contains commit order.
- server-tests/api-measurement-set-tests.js: Added unit test for this change.
- 7:30 PM Changeset in webkit [230939] by
-
- 4 edits in trunk/LayoutTests
Unreviewed, fix a few tests that became flaky after r230919.
- fast/events/beforeunload-alert-handled-keydown.html:
- fast/events/beforeunload-alert-no-user-interaction.html:
- fast/events/beforeunload-alert-user-interaction.html:
- 7:03 PM Changeset in webkit [230938] by
-
- 8 edits in trunk/Source/WebKit
Keep around a pre-warmed process when doing process swap on navigation
https://bugs.webkit.org/show_bug.cgi?id=184765
Reviewed by Ryosuke Niwa.
This patch makes it so that WebProcessPool prewarms a process when process
swap on navigation is turned on. When we do a process swap on navigation,
we first try to grab a prewarmed process before creating a new one.
We try to be smart about when to create these processes. The initial heuristic
that this patch chooses is when we reach the DidFirstVisuallyNonEmptyLayout
layout milestone. We're going to try to improve on this heuristic in:
https://bugs.webkit.org/show_bug.cgi?id=184899
This is a 40% progression on PLT with process swap on navigation turned on.
- UIProcess/ServiceWorkerProcessProxy.cpp:
(WebKit::ServiceWorkerProcessProxy::ServiceWorkerProcessProxy):
- UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::notifyProcessPoolToPrewarm):
(WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
- UIProcess/WebPageProxy.h:
- UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcess):
(WebKit::WebProcessPool::tryTakePrewarmedProcess):
(WebKit::WebProcessPool::warmInitialProcess):
(WebKit::WebProcessPool::disconnectProcess):
(WebKit::WebProcessPool::createWebPage):
(WebKit::WebProcessPool::didReachGoodTimeToPrewarm):
(WebKit::WebProcessPool::processForNavigation):
- UIProcess/WebProcessPool.h:
- UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::create):
(WebKit::WebProcessProxy::WebProcessProxy):
(WebKit::m_isInPrewarmedPool):
(WebKit::m_userMediaCaptureManagerProxy): Deleted.
- UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::isInPrewarmedPool const):
(WebKit::WebProcessProxy::setIsInPrewarmedPool):
- 6:07 PM Changeset in webkit [230937] by
-
- 2 edits in trunk
[GTK] check target looks broken
https://bugs.webkit.org/show_bug.cgi?id=184407
Reviewed by Carlos Garcia Campos.
It's pretty clear that nobody has been using check for a long time.
We got rid of check-for-webkitdom-api-breaks a long time ago, when we stopped autogenerating
the DOM API, but it's still used in the check target. Fix this.
Also, the check target for some reason runs itself from the Source subdirectory of the
builddir, but the test script expects to be run from the toplevel build directory. Fix this
too.
Add VERBATIM for good measure.
- Source/PlatformGTK.cmake:
- 6:07 PM Changeset in webkit [230936] by
-
- 5 edits in trunk/Source
[WPE][GTK] Remove WlUniquePtr<wl_display> footgun
https://bugs.webkit.org/show_bug.cgi?id=184405
Reviewed by Carlos Garcia Campos.
Source/WebCore:
WlUniquePtr<wl_display> is a pretty big footgun because there are two different destruction
functions -- wl_display_disconnect() and wl_display_destroy() -- and which one you need to
use depends on how the wl_display() was created, and WebKit uses both in different places.
So WlUniquePtr<wl_display> is pretty unsafe. See bug #176490 for an example of fun caused
by using it incorrectly.
Let's use std::unique_ptr with custom deleter functors instead.
- platform/graphics/wayland/WlUniquePtr.h:
Source/WebKit:
Switch to std::unique_ptr.
- UIProcess/gtk/WaylandCompositor.cpp:
(WebKit::WaylandCompositor::WaylandCompositor):
- UIProcess/gtk/WaylandCompositor.h:
(WebKit::WaylandCompositor::DisplayDeleter::operator()):
- 5:37 PM Changeset in webkit [230935] by
-
- 56 edits8 deletes in trunk
Unreviewed, rolling out r230921, r230923, r230924, r230932,
and r230934.
https://bugs.webkit.org/show_bug.cgi?id=184903
Builds still broken (Requested by ryanhaddad on #webkit).
Reverted changesets:
"Implement Same-Site cookies"
https://bugs.webkit.org/show_bug.cgi?id=159464
https://trac.webkit.org/changeset/230921
"Attempt to fix the build after r230921"
https://bugs.webkit.org/show_bug.cgi?id=159464
https://trac.webkit.org/changeset/230923
"Attempt to fix the Mac and iOS build after r230921"
https://bugs.webkit.org/show_bug.cgi?id=159464
https://trac.webkit.org/changeset/230924
"Another attempt to fix the Windows build following r230921"
https://bugs.webkit.org/show_bug.cgi?id=159464
https://trac.webkit.org/changeset/230932
"Attempt to fix the Apple Internal build following r230921"
https://bugs.webkit.org/show_bug.cgi?id=159464
https://trac.webkit.org/changeset/230934
Patch by Commit Queue <commit-queue@webkit.org> on 2018-04-23
- 5:26 PM Changeset in webkit [230934] by
-
- 2 edits in trunk/Source/WebKit
Attempt to fix the Apple Internal build following r230921
(https://bugs.webkit.org/show_bug.cgi?id=159464)
Forward declare some SPI. Add availability guard.
- NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
- 5:13 PM Changeset in webkit [230933] by
-
- 6 edits3 deletes in trunk
REGRESSION (r220112): reCAPTCHA images render off screen on Twitch.tv app Log In or Sign Up
https://bugs.webkit.org/show_bug.cgi?id=182859
<rdar://problem/37595065>
Source/WebCore:
Reviewed by Zalan Bujtas.
Roll out this change from the trunk as the issue it fixed no longer occurs.
- css/MediaQueryEvaluator.cpp:
(WebCore::orientationEvaluate):
(WebCore::aspectRatioEvaluate):
(WebCore::heightEvaluate):
(WebCore::widthEvaluate):
- page/FrameView.cpp:
(WebCore::FrameView::layoutSizeForMediaQuery const): Deleted.
- page/FrameView.h:
- page/LayoutContext.cpp:
(WebCore::LayoutContext::handleLayoutWithFrameFlatteningIfNeeded):
LayoutTests:
Reviewed by Zalan Bujtas
- fast/frames/flattening/media-query-growing-content-expected.txt: Removed.
- fast/frames/flattening/media-query-growing-content.html: Removed.
- fast/frames/flattening/resources/media-query-min-height-with-flattening.html: Removed.
- 4:56 PM Changeset in webkit [230932] by
-
- 2 edits in trunk/Source/WebCore
Another attempt to fix the Windows build following r230921
(https://bugs.webkit.org/show_bug.cgi?id=159464)
Pass dictionary key name using a string instead of a constant and pass CFURL* to
siteForCookies().
- platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdateResourceRequest):
- 4:08 PM Changeset in webkit [230931] by
-
- 16 edits37 adds in trunk
[LayoutFormattingContext] Initial commit.
https://bugs.webkit.org/show_bug.cgi?id=184896
Reviewed by Antti Koivisto.
Source/JavaScriptCore:
- Configurations/FeatureDefines.xcconfig:
Source/WebCore:
This is the initial commit of the new layout component -class definitions only (and mostly public functions).
See the header files (and Tools/LayoutReloaded project) for more information.
Top level layout.
rootContainer = TreeBuilder::createLayoutTree(document);
rootDisplayBox = new Display::Box();
rootDisplayBox->setSize(viewportSize);
layoutContext = new LayoutContext(rootContainer, rootDisplayBox);
layoutContext->layout(rootContainer);
Driven by build time flag (currently off). Not testable yet.
- Configurations/FeatureDefines.xcconfig:
- Sources.txt:
- WebCore.xcodeproj/project.pbxproj:
- layout/BlockFormatting/BlockFormattingContext.cpp: Added.
- layout/BlockFormatting/BlockFormattingContext.h: Added.
- layout/BlockFormatting/BlockFormattingState.cpp: Added.
- layout/BlockFormatting/BlockFormattingState.h: Added.
- layout/BlockFormatting/BlockMarginCollapse.cpp: Added.
- layout/BlockFormatting/BlockMarginCollapse.h: Added.
- layout/DisplayTree/DisplayBox.cpp: Added.
- layout/DisplayTree/DisplayBox.h: Added.
- layout/FloatingContext.cpp: Added.
- layout/FloatingContext.h: Added.
- layout/FloatingState.cpp: Added.
- layout/FloatingState.h: Added.
- layout/FormattingContext.cpp: Added.
- layout/FormattingContext.h: Added.
- layout/FormattingState.cpp: Added.
- layout/FormattingState.h: Added.
- layout/InlineFormatting/InlineFormattingContext.cpp: Added.
- layout/InlineFormatting/InlineFormattingContext.h: Added.
- layout/InlineFormatting/InlineFormattingState.cpp: Added.
- layout/InlineFormatting/InlineFormattingState.h: Added.
- layout/LayoutCtx.cpp: Added.
- layout/LayoutCtx.h: Added.
- layout/LayoutTree/LayoutBlockContainer.cpp: Added.
- layout/LayoutTree/LayoutBlockContainer.h: Added.
- layout/LayoutTree/LayoutBox.cpp: Added.
- layout/LayoutTree/LayoutBox.h: Added.
- layout/LayoutTree/LayoutContainer.cpp: Added.
- layout/LayoutTree/LayoutContainer.h: Added.
- layout/LayoutTree/LayoutCtx.h: Added.
- layout/LayoutTree/LayoutInlineBox.cpp: Added.
- layout/LayoutTree/LayoutInlineBox.h: Added.
- layout/LayoutTree/LayoutInlineContainer.cpp: Added.
- layout/LayoutTree/LayoutInlineContainer.h: Added.
Source/WebCore/PAL:
- Configurations/FeatureDefines.xcconfig:
Source/WebKit:
- Configurations/FeatureDefines.xcconfig:
Source/WebKitLegacy/mac:
- Configurations/FeatureDefines.xcconfig:
Source/WTF:
- wtf/FeatureDefines.h:
Tools:
- TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
- 3:41 PM Changeset in webkit [230930] by
-
- 2 edits in trunk/Source/WTF
Deactivate the WindowServer connection for the WebContent process.
https://bugs.webkit.org/show_bug.cgi?id=184451
<rdar://problem/38313938>
Reviewed by Brent Fulgham.
Defining ENABLE_WEBPROCESS_WINDOWSERVER_BLOCKING as 1 will deactivate the WindowServer connection
for the WebContent process by enabling the call to 'CGSSetDenyWindowServerConnections(true)' on
process startup. After calling this function, every attempt to establish a connection to the
WindowServer from the WebContent process will fail, except for CA render server connections.
- wtf/FeatureDefines.h:
- 3:26 PM Changeset in webkit [230929] by
-
- 2 edits in trunk/Source/JavaScriptCore
Unreviewed, revert accidental change to verbose flag.
- dfg/DFGByteCodeParser.cpp:
- 3:25 PM Changeset in webkit [230928] by
-
- 2 edits in trunk/Source/JavaScriptCore
Roll out r226655 because it broke OSR entry when the pre-header is inadequately profiled.
Rubber stamped by Saam Barati.
This is a >2x speed-up in SunSpider/bitops-bitwise-and. We don't really care about SunSpider
anymore, but r226655 didn't result in any benchmark wins and just regressed this test by a lot.
Seems sensible to just roll it out.
- dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::addToGraph):
(JSC::DFG::ByteCodeParser::parse):
- 2:59 PM Changeset in webkit [230927] by
-
- 7 edits in trunk/Source
Versioning.
- 2:43 PM Changeset in webkit [230926] by
-
- 2 edits in trunk/Tools
[WKTR] Move navigation policy decision from the injected bundle to the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=184801
Reviewed by Geoffrey Garen.
Move navigation policy decision from the injected bundle to the UIProcess in WebKitTestRunner.
This is a more common configuration and therefore should be the default testing configuration.
- WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::decidePolicyForNavigationAction):
Always respond with 'PassThrough' in the InjectedBundle so the UIProcess
is now asked for the policy decision.
- 2:41 PM Changeset in webkit [230925] by
-
- 3 edits in trunk/Tools
[GTK][WPE] Add Debug bots (build and tests) for WPE
https://bugs.webkit.org/show_bug.cgi?id=184887
Patch by Pablo Saavedra <Pablo Saavedra> on 2018-04-23
Reviewed by Carlos Alberto Lopez Perez.
Deployed 2 new bots for WPE Debug: wpe-linux-bot-3 and
wpe-linux-bot-4
Both bots have already the credentials ready to authenticated against
build.webkit.org. They provides the bots for the "debug" configuration over
the "WPE" platform and building for the "x86_64" architecture:
WPE Linux 64-bit Debug (Build) and WPE Linux 64-bit Debug (Tests)
- BuildSlaveSupport/build.webkit.org-config/config.json:
- BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
- 2:17 PM Changeset in webkit [230924] by
-
- 2 edits in trunk/Source/WebCore
Attempt to fix the Mac and iOS build after r230921
(https://bugs.webkit.org/show_bug.cgi?id=159464)
Pass strings for the dictionary key names instead of using an extern constant as the
latter may not be available on all systems.
- platform/network/mac/CookieJarMac.mm:
(WebCore::setHTTPCookiesForURL):
- 2:10 PM Changeset in webkit [230923] by
-
- 5 edits in trunk/Source/WebCore
Attempt to fix the build after r230921
(https://bugs.webkit.org/show_bug.cgi?id=159464)
Pass Same-Site info through.
- platform/network/cf/CookieJarCFNet.cpp:
(WebCore::cookieRequestHeaderFieldValue):
- platform/network/curl/CookieJarCurl.cpp:
(WebCore::cookieRequestHeaderFieldValue):
- platform/network/curl/CookieJarCurlDatabase.cpp:
(WebCore::CookieJarCurlDatabase::cookieRequestHeaderFieldValue const):
- platform/network/soup/CookieJarSoup.cpp:
(WebCore::cookieRequestHeaderFieldValue):
- 2:07 PM Changeset in webkit [230922] by
-
- 2 edits in trunk/Source/WebCore
Unreviewed, speculative macOS build fix attempt.
- Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::provideMediaData):
- 1:58 PM Changeset in webkit [230921] by
-
- 56 edits2 copies56 adds in trunk
Implement Same-Site cookies
https://bugs.webkit.org/show_bug.cgi?id=159464
<rdar://problem/27196358>
Reviewed by Brent Fulgham.
Source/WebCore:
Implements support for Same-Site cookies as per <https://tools.ietf.org/html/draft-ietf-httpbis-cookie-same-site-00>.
The implementation is materially consistent with the spec. though implements the computation
for a document's "site for cookies" indirectly as part of loading its frame. This is done to
avoid traversing the frame tree on each subresource request initiated by the document or one
of its workers. We take advantage of the fact that Web Workers and Service Workers use their
host document's loader to load resources on their behalf to use the correct "site for cookies"
for requests (e.g. fetch()) initiating by them without the need to duplicate and store the
host document's "site for cookies" in the worker's script execution context.
The implementation differs from the spec. in the handling of about: URLs and the empty URL
and makes the implementation in WebKit match the behavior of Chrome and Firefox as well as
consistent with origin inheritance as described in <https://html.spec.whatwg.org/multipage/browsers.html#origin>
(16 April 2018). Specifically, requests to about:blank, about:srcdoc and the empty URL ("")
are treated as same-site because these URLs inherit their origin from their owner.
Tests: http/tests/cookies/same-site/fetch-after-navigating-iframe-in-cross-origin-page.html
http/tests/cookies/same-site/fetch-after-top-level-navigation-from-cross-origin-page.html
http/tests/cookies/same-site/fetch-after-top-level-navigation-initiated-from-iframe-in-cross-origin-page.html
http/tests/cookies/same-site/fetch-cookies-set-in-about-blank-iframe.html
http/tests/cookies/same-site/fetch-in-about-blank-page.html
http/tests/cookies/same-site/fetch-in-cross-origin-iframe.html
http/tests/cookies/same-site/fetch-in-cross-origin-page.html
http/tests/cookies/same-site/fetch-in-cross-origin-service-worker.html
http/tests/cookies/same-site/fetch-in-cross-origin-worker.html
http/tests/cookies/same-site/fetch-in-same-origin-page.html
http/tests/cookies/same-site/fetch-in-same-origin-service-worker.html
http/tests/cookies/same-site/fetch-in-same-origin-srcdoc-iframe.html
http/tests/cookies/same-site/fetch-in-same-origin-worker.html
http/tests/cookies/same-site/popup-cross-site-post.html
http/tests/cookies/same-site/popup-cross-site.html
http/tests/cookies/same-site/popup-same-site-post.html
http/tests/cookies/same-site/popup-same-site-via-cross-site-redirect.html
http/tests/cookies/same-site/popup-same-site-via-same-site-redirect.html
http/tests/cookies/same-site/popup-same-site.html
- Sources.txt: Add source file SameSiteInfo.cpp.
- WebCore.xcodeproj/project.pbxproj: Add source files SameSiteInfo.{cpp, h}.
- dom/Document.cpp:
(WebCore::Document::initSecurityContext): Modified to call SecurityPolicy::shouldInheritSecurityOriginFromOwner().
(WebCore::Document::shouldInheritContentSecurityPolicyFromOwner const): Ditto.
(WebCore::shouldInheritSecurityOriginFromOwner): Deleted; moved to SecurityPolicy.
- dom/Document.h:
(WebCore::Document::firstPartyForSameSiteCookies const): Added.
(WebCore::Document::setFirstPartyForSameSiteCookies): Added.
- loader/CookieJar.cpp:
(WebCore::sameSiteInfo): Returns the same-site info for the request used to load the specified document.
(WebCore::cookies): Pass the same-site info down to the platform.
(WebCore::cookieRequestHeaderFieldProxy): Ditto.
(WebCore::setCookies): Ditto.
(WebCore::cookieRequestHeaderFieldValue): Ditto.
(WebCore::getRawCookies): Ditto.
- loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::willSendRequest): Add same-site info to the request.
(WebCore::DocumentLoader::startLoadingMainResource): Update a FIXME comment to explain that
we can simplify ResourceRequestBase if we can remove the call to addExtraFieldsToMainResourceRequest()
here. Specifically, we would not need to differentiate between a request with an unspecified
same-site state (default state of a new request) from a request whose same-site state has
been explicitly set if we can assume that the same-site state of a request is set exactly
once. In absence of this guarantee we need an "unspecified" state to avoid overriding existing
same-site information computed with a null initiating document (the case of a new address bar
initiated load) from a load initiated by the document associated with this loader.
- loader/FrameLoader.cpp:
(WebCore::FrameLoader::setFirstPartyForCookies): Modified to also update the first party for
same-site cookies ("site for cookies").
(WebCore::FrameLoader::load): Add same-site info to the request.
(WebCore::FrameLoader::reload): Ditto.
(WebCore::FrameLoader::setOriginalURLForDownloadRequest): Ditto.
(WebCore::FrameLoader::addExtraFieldsToRequest): If the request does not already have
same-site info then compute it and add it to the request. Mark main frame main resource
requests as a "top-site".
(WebCore::FrameLoader::addSameSiteInfoToRequestIfNeeded): Implements the "'Same-site' and 'cross-site'
Requests" algorithm from <https://tools.ietf.org/html/draft-ietf-httpbis-cookie-same-site-00#section-2.1>.
(WebCore::createWindow): Add same-site info to the request.
- loader/FrameLoader.h:
- loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::init): Ditto.
- page/DOMWindow.cpp:
(WebCore::DOMWindow::createWindow): Ditto.
- page/SecurityPolicy.cpp:
(WebCore::SecurityPolicy::shouldInheritSecurityOriginFromOwner): Moved from Document.cpp.
- page/SecurityPolicy.h:
- platform/CookiesStrategy.h:
- platform/network/CacheValidation.cpp:
(WebCore::headerValueForVary): Pass the same-site info down to the platform.
- platform/network/CookieRequestHeaderFieldProxy.h:
(WebCore::CookieRequestHeaderFieldProxy::encode const): Encode same-site bits.
(WebCore::CookieRequestHeaderFieldProxy::decode): Decode same-site bits.
- platform/network/PlatformCookieJar.h:
- platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::setAsIsolatedCopy): Added.
(WebCore::ResourceRequestBase::isSameSite const): Added.
(WebCore::ResourceRequestBase::setIsSameSite): Added.
(WebCore::ResourceRequestBase::isTopSite const): Added.
(WebCore::ResourceRequestBase::setIsTopSite): Added.
(WebCore::equalIgnoringHeaderFields):
- platform/network/ResourceRequestBase.h:
(WebCore::ResourceRequestBase::isSameSiteUnspecified const): Added. See comment for DocumentLoader::startLoadingMainResource()
for more details.
(WebCore::registrableDomainsAreEqual): Added.
(WebCore::ResourceRequestBase::encodeBase const): Encode same-site bits.
(WebCore::ResourceRequestBase::decodeBase): Decode same-site bits.
- platform/network/SameSiteInfo.cpp: Added.
(WebCore::SameSiteInfo::create):
- platform/network/SameSiteInfo.h: Added.
(WebCore::SameSiteInfo::encode const):
(WebCore::SameSiteInfo::decode):
- platform/network/cf/CookieJarCFNet.cpp:
(WebCore::setCookiesFromDOM): Pass Same-Site info down.
(WebCore::cookiesForDOM): Ditto.
(WebCore::cookieRequestHeaderFieldValue): Ditto.
(WebCore::getRawCookies): Ditto.
- platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::siteForCookies): Added.
(WebCore::ResourceRequest::doUpdatePlatformRequest): Update platform request with same-site info.
(WebCore::ResourceRequest::doUpdateResourceRequest): Ditto.
- platform/network/cocoa/ResourceRequestCocoa.mm:
(WebCore::ResourceRequest::doUpdateResourceRequest): Ditto.
(WebCore::siteForCookies): Added.
(WebCore::ResourceRequest::doUpdatePlatformRequest): Update platform request with same-site info.
- platform/network/curl/CookieJarCurl.cpp:
(WebCore::cookiesForDOM): Pass Same-Site info down.
(WebCore::setCookiesFromDOM): Ditto.
(WebCore::cookieRequestHeaderFieldValue): Ditto.
(WebCore::getRawCookies): Ditto.
- platform/network/curl/CookieJarCurl.h:
- platform/network/curl/CookieJarCurlDatabase.cpp:
(WebCore::CookieJarCurlDatabase::setCookiesFromDOM const): Ditto.
(WebCore::CookieJarCurlDatabase::cookiesForDOM const): Ditto.
(WebCore::CookieJarCurlDatabase::cookieRequestHeaderFieldValue const): Ditto.
(WebCore::CookieJarCurlDatabase::getRawCookies const): Ditto.
- platform/network/curl/CookieJarCurlDatabase.h:
- platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::createCurlRequest): Ditto.
- platform/network/mac/CookieJarMac.mm:
(WebCore::cookiesForURL): Added; shared function to return the cookies based on the specified criterion.
(WebCore::setHTTPCookiesForURL): Moved from the bottom of the file to top to be closer to the other
CFNetwork helper functions. Modified to support fetching same-site cookies.
(WebCore::httpCookiesForURL): Moved to be under setHTTPCookiesForURL(). Modified to call cookiesForURL().
Note the SPI used in cookiesForURL() apply the same criterion for whether to fetch secure cookies as we
were computing here. That is, the CFNetwork SPI only returns secure cookies if the specified URL's scheme
case-insensitively matches "https".
(WebCore::cookiesInPartitionForURL): Wrote in terms of cookiesForURL().
(WebCore::cookiesForSession): Pass the Same-Site info.
(WebCore::cookiesForDOM): Ditto.
(WebCore::cookieRequestHeaderFieldValue): Ditto.
(WebCore::setCookiesFromDOM): Ditto.
(WebCore::getRawCookies): Ditto.
(WebCore::deleteCookie): Pass std::nullopt for the Same-Site info so that we do not consider the SameSite
attribute when fetching cookies to delete.
- platform/network/soup/CookieJarSoup.cpp:
(WebCore::setCookiesFromDOM): Pass the Same-Site info.
(WebCore::cookiesForDOM): Ditto.
(WebCore::cookieRequestHeaderFieldValue): Ditto.
(WebCore::getRawCookies): Ditto.
- workers/service/context/ServiceWorkerThreadProxy.cpp:
(WebCore::createPageForServiceWorker): Set the first party for same site cookies ("site for cookies") to
the script URL.
- xml/XSLTProcessor.cpp:
(WebCore::XSLTProcessor::createDocumentFromSource): Copy the first party for same-site cookies to the
new document.
Source/WebCore/PAL:
Forward declare some SPI.
- pal/spi/cf/CFNetworkSPI.h:
Source/WebKit:
Pass the Same-Site info through the WebKit abstractions.
- NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
(WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
(WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
(WebKit::NetworkConnectionToWebProcess::getRawCookies):
- NetworkProcess/NetworkConnectionToWebProcess.h:
- NetworkProcess/NetworkConnectionToWebProcess.messages.in:
- NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::logCookieInformation const):
(WebKit::logBlockedCookieInformation):
(logCookieInformationInternal):
(NetworkResourceLoader::logCookieInformation):
- NetworkProcess/NetworkResourceLoader.h:
- NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
(WebKit::NetworkCache::constructRevalidationRequest):
- NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:
(WebKit::NetworkCache::SubresourceInfo::encode const):
(WebKit::NetworkCache::SubresourceInfo::decode):
(WebKit::NetworkCache::SubresourceInfo::SubresourceInfo):
- NetworkProcess/cache/NetworkCacheSubresourcesEntry.h:
(WebKit::NetworkCache::SubresourceInfo::isSameSite const):
(WebKit::NetworkCache::SubresourceInfo::isTopSite const): Returns false; subresources do not represent
a top-level navigation.
- NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTaskCocoa::isThirdPartyRequest):
(WebKit::updateTaskWithFirstPartyForSameSiteCookies):
(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
- UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::download):
- WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::cookiesForDOM):
(WebKit::WebPlatformStrategies::setCookiesFromDOM):
(WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
(WebKit::WebPlatformStrategies::getRawCookies):
- WebProcess/WebCoreSupport/WebPlatformStrategies.h:
Source/WebKitLegacy/mac:
Pass the Same-Site info through the strategy.
- WebCoreSupport/WebPlatformStrategies.h:
- WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::cookiesForDOM):
(WebPlatformStrategies::setCookiesFromDOM):
(WebPlatformStrategies::cookieRequestHeaderFieldValue):
(WebPlatformStrategies::getRawCookies):
Source/WebKitLegacy/win:
Pass the Same-Site info through the strategy.
- WebCoreSupport/WebPlatformStrategies.cpp:
(WebPlatformStrategies::cookiesForDOM):
(WebPlatformStrategies::setCookiesFromDOM):
(WebPlatformStrategies::cookieRequestHeaderFieldValue):
(WebPlatformStrategies::getRawCookies):
- WebCoreSupport/WebPlatformStrategies.h:
LayoutTests:
Add tests. These tests are skipped on all ports for now, including Mac and iOS. We will
look to subsequently enable the tests for Mac and iOS once we have CFNetwork support for
Same-Site cookies.
The following tests and utilities were taken in whole or in part from Blink:
http/tests/cookies/resources/echo-json.php
http/tests/cookies/resources/post-cookies-onmessage.php
http/tests/cookies/resources/post-cookies-to-opener.php
http/tests/cookies/resources/testharness-helpers.js
http/tests/cookies/same-site/popup-cross-site-post.html
http/tests/cookies/same-site/popup-cross-site.html
http/tests/cookies/same-site/popup-same-site-post.html
http/tests/cookies/same-site/popup-same-site.html
The following files were derived from tests taken from Blink:
http/tests/cookies/same-site/popup-same-site-via-cross-site-redirect.html
http/tests/cookies/same-site/popup-same-site-via-same-site-redirect.html
- TestExpectations: Skip on all ports for now.
- http/tests/cookies/resources/cookie-utilities.js: Added.
(createCookie):
(setBaseDocumentWhenFetchingDOMCookies):
(setDOMCookie):
- http/tests/cookies/resources/cookie-utility.php:
- http/tests/cookies/resources/echo-json.php: Added.
- http/tests/cookies/resources/post-cookies-onmessage.php: Added.
- http/tests/cookies/resources/post-cookies-to-opener.php: Added.
- http/tests/cookies/resources/testharness-helpers.js: Added.
(clearKnownCookies):
- http/tests/cookies/same-site/fetch-after-navigating-iframe-in-cross-origin-page-expected.txt: Added.
- http/tests/cookies/same-site/fetch-after-navigating-iframe-in-cross-origin-page.html: Added.
- http/tests/cookies/same-site/fetch-after-top-level-navigation-from-cross-origin-page-expected.txt: Added.
- http/tests/cookies/same-site/fetch-after-top-level-navigation-from-cross-origin-page.html: Added.
- http/tests/cookies/same-site/fetch-after-top-level-navigation-initiated-from-iframe-in-cross-origin-page-expected.txt: Added.
- http/tests/cookies/same-site/fetch-after-top-level-navigation-initiated-from-iframe-in-cross-origin-page.html: Added.
- http/tests/cookies/same-site/fetch-cookies-set-in-about-blank-iframe-expected.txt: Added.
- http/tests/cookies/same-site/fetch-cookies-set-in-about-blank-iframe.html: Added.
- http/tests/cookies/same-site/fetch-in-about-blank-page-expected.txt: Added.
- http/tests/cookies/same-site/fetch-in-about-blank-page.html: Added.
- http/tests/cookies/same-site/fetch-in-cross-origin-iframe-expected.txt: Added.
- http/tests/cookies/same-site/fetch-in-cross-origin-iframe.html: Added.
- http/tests/cookies/same-site/fetch-in-cross-origin-page-expected.txt: Added.
- http/tests/cookies/same-site/fetch-in-cross-origin-page.html: Added.
- http/tests/cookies/same-site/fetch-in-cross-origin-service-worker-expected.txt: Added.
- http/tests/cookies/same-site/fetch-in-cross-origin-service-worker.html: Added.
- http/tests/cookies/same-site/fetch-in-cross-origin-worker-expected.txt: Added.
- http/tests/cookies/same-site/fetch-in-cross-origin-worker.html: Added.
- http/tests/cookies/same-site/fetch-in-same-origin-page-expected.txt: Added.
- http/tests/cookies/same-site/fetch-in-same-origin-page.html: Added.
- http/tests/cookies/same-site/fetch-in-same-origin-service-worker-expected.txt: Added.
- http/tests/cookies/same-site/fetch-in-same-origin-service-worker.html: Added.
- http/tests/cookies/same-site/fetch-in-same-origin-srcdoc-iframe-expected.txt: Added.
- http/tests/cookies/same-site/fetch-in-same-origin-srcdoc-iframe.html: Added.
- http/tests/cookies/same-site/fetch-in-same-origin-worker-expected.txt: Added.
- http/tests/cookies/same-site/fetch-in-same-origin-worker.html: Added.
- http/tests/cookies/same-site/popup-cross-site-expected.txt: Added.
- http/tests/cookies/same-site/popup-cross-site-post-expected.txt: Added.
- http/tests/cookies/same-site/popup-cross-site-post.html: Added.
- http/tests/cookies/same-site/popup-cross-site.html: Added.
- http/tests/cookies/same-site/popup-same-site-expected.txt: Added.
- http/tests/cookies/same-site/popup-same-site-post-expected.txt: Added.
- http/tests/cookies/same-site/popup-same-site-post.html: Added.
- http/tests/cookies/same-site/popup-same-site-via-cross-site-redirect-expected.txt: Added.
- http/tests/cookies/same-site/popup-same-site-via-cross-site-redirect.html: Added.
- http/tests/cookies/same-site/popup-same-site-via-same-site-redirect-expected.txt: Added.
- http/tests/cookies/same-site/popup-same-site-via-same-site-redirect.html: Added.
- http/tests/cookies/same-site/popup-same-site.html: Added.
- http/tests/cookies/same-site/resources/click-hyperlink.php: Added.
- http/tests/cookies/same-site/resources/echo-iframe-src.php: Added.
- http/tests/cookies/same-site/resources/fetch-after-navigating-iframe-in-cross-origin-page.php: Added.
- http/tests/cookies/same-site/resources/fetch-after-top-level-navigation-from-cross-origin-page.php: Added.
- http/tests/cookies/same-site/resources/fetch-after-top-level-navigation-initiated-from-iframe-in-cross-origin-page.php: Added.
- http/tests/cookies/same-site/resources/fetch-in-cross-origin-iframe.html: Added.
- http/tests/cookies/same-site/resources/fetch-in-cross-origin-service-worker.html: Added.
- http/tests/cookies/same-site/resources/fetch-in-cross-origin-worker.js: Added.
(async.checkResult):
- http/tests/cookies/same-site/resources/fetch-in-same-origin-service-worker.php: Added.
- http/tests/cookies/same-site/resources/fetch-in-same-origin-worker.js: Added.
(async.checkResult):
- http/tests/cookies/same-site/resources/passthrough-service-worker.js: Added.
- platform/mac-wk1/TestExpectations: Skip the Service Worker tests as they are not supported in LegacyWebKit.
- 1:56 PM Changeset in webkit [230920] by
-
- 7 edits in tags/Safari-606.1.15/Source
Versioning.
- 1:49 PM Changeset in webkit [230919] by
-
- 8 edits1 add in trunk
HTML String load cannot be prevented by responding 'Cancel' asynchronously in decidePolicyForNavigationAction
https://bugs.webkit.org/show_bug.cgi?id=184848
<rdar://problem/39145306>
Reviewed by Brady Eidson.
Source/WebCore:
When calling loadHTMLString on a WebView, we end up doing a load for 'about:blank'
with substitute data. In such case, we want to do a regular asynchronous policy
delegate check, there is no reason we need it to be synchronous. Update our check
to make sure we only do a synchronous policy check for initial 'about:blank' loads
that do not have substitute data.
- loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNavigationPolicy):
Tools:
Add API test coverage.
- TestWebKitAPI/Tests/WebKitCocoa/DecidePolicyForNavigationAction.mm:
(-[DecidePolicyForNavigationActionController webView:decidePolicyForNavigationAction:decisionHandler:]):
(TEST):
LayoutTests:
Update layout tests that wrongly expected 'about:blank' to load synchronously even
when it is not the initial empty document of an iframe. I have checked that our
behavior is now consistent with Chrome.
- fast/events/beforeunload-alert-user-interaction2.html:
- http/tests/security/cross-origin-reified-window-location-setting-expected.txt:
- http/tests/security/cross-origin-reified-window-location-setting.html:
- webarchive/loading/javascript-url-iframe-crash-expected.txt:
- 1:29 PM Changeset in webkit [230918] by
-
- 2 edits in trunk/Source/WebKit
WebProcessProxy frequently re-takes a process assertion for the network process even though is already has one
https://bugs.webkit.org/show_bug.cgi?id=184889
<rdar://problem/38151530>
Reviewed by Brady Eidson.
In ProcessThrottler::updateAssertionNow(), if the new process assertion state is the same
as the existing one, then return early. Otherwise, we would end up calling WebProcessProxy::didSetAssertionState()
for the same assertion state, which would cause duplicate logging but also some unnecessary work.
- UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::updateAssertionNow):
- 1:27 PM Changeset in webkit [230917] by
-
- 1 copy in tags/Safari-606.1.15
Tag Safari-606.1.15.
- 12:40 PM Changeset in webkit [230916] by
-
- 5 edits3 adds in trunk
[Extra zoom mode] 100vw is roughly half of the viewport width in extra zoom mode
https://bugs.webkit.org/show_bug.cgi?id=184871
<rdar://problem/39477595>
Reviewed by Andy Estes.
Source/WebCore:
Currently, when computing CSS viewport units, we use ViewportConfiguration::initialScaleIgnoringContentSize().
This method computes an initial scale from the layout width and height without relying on any information
derived from the current content size. This is done to ensure that the content size and viewport dimensions for
CSS viewport units should not be simultaneously dependent on each other.
Since shrink-to-fit heuristics depend on content size, we currently assume that shrink-to-fit is disabled when
computing initialScaleIgnoringContentSize, by always passing infalseforshouldIgnoreScalingConstraints.
However, in extra zoom mode, the opposite is true: since we force bothm_canIgnoreScalingConstraintsand
m_forceHorizontalShrinkToFitto betruein this mode, we will always try to shrink-to-fit regardless of
content size.
Because of this shrink-to-fit disparity between
initialScaleandinitialScaleIgnoringContentSize, viewport
units in extra zoom mode are currently computed assuming an initial scale set by the page, whereas the real
viewport is scaled to fit, which causes any lengths computed in terms of vw and vh to be incorrect. To fix this,
we introduce a version of shouldIgnoreScalingConstraints() that returnstrueiff scaling constraints are
always ignored, regardless of content size. We then use this in initialScaleIgnoringContentSize, instead of
always passing infalseforshouldIgnoreScalingConstraints.
Test: fast/css/extrazoom/viewport-units-shrink-to-fit.html
- page/ViewportConfiguration.cpp:
(WebCore::ViewportConfiguration::shouldIgnoreScalingConstraintsRegardlessOfContentSize const):
(WebCore::ViewportConfiguration::initialScaleIgnoringContentSize const):
- page/ViewportConfiguration.h:
LayoutTests:
Add a new layout test to verify that shrink-to-fit works as intended in extra zoom mode:
- The large element should cause the entire viewport to shrink down to fit.
- Removing the large element should adjust the viewport, such that the smaller element now fits the entire
viewport.
- The smaller element (at 100vw and 100vh) should be the same size as the window.
- TestExpectations:
- fast/css/extrazoom/viewport-units-shrink-to-fit-expected.txt: Added.
- fast/css/extrazoom/viewport-units-shrink-to-fit.html: Added.
- 8:23 AM Changeset in webkit [230915] by
-
- 3 edits in trunk/Source/bmalloc
Include stdio.h before using stderr
https://bugs.webkit.org/show_bug.cgi?id=184872
Patch by Ting-Wei Lan <Ting-Wei Lan> on 2018-04-23
Reviewed by Yusuke Suzuki.
- bmalloc/PerProcess.cpp:
- bmalloc/Scavenger.cpp:
- 7:47 AM Changeset in webkit [230914] by
-
- 9 edits in trunk/Source/WebCore
[Simple line layout] Generate inline boxtree using simple line layout runs.
https://bugs.webkit.org/show_bug.cgi?id=184833
Reviewed by Antti Koivisto.
RenderBlockFlow::ensureLineBoxes triggers line layout on the block content to replace
the simple line layout runs with an inline boxtree. The runs generated by the fast path
should always match the inline tree boxes.
In this patch instead of triggering layout, we just convert the simple line runs to
inline boxes.
Currently, it works with only one, non-paginated text renderer, but we should be
able to extend it to all the simple line layout content.
Covered by existing tests.
- rendering/InlineBox.h:
(WebCore::InlineBox::setHasHyphen):
(WebCore::InlineBox::setCanHaveLeadingExpansion):
(WebCore::InlineBox::setCanHaveTrailingExpansion):
(WebCore::InlineBox::setForceTrailingExpansion):
(WebCore::InlineBox::setForceLeadingExpansion):
(WebCore::InlineBox::hasHyphen const):
(WebCore::InlineBox::canHaveLeadingExpansion const):
(WebCore::InlineBox::canHaveTrailingExpansion const):
(WebCore::InlineBox::forceTrailingExpansion const):
- rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::ensureLineBoxes):
- rendering/RenderBlockFlow.h:
- rendering/SimpleLineLayoutFlowContents.h:
(WebCore::SimpleLineLayout::FlowContents::segmentForRun const):
- rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::canUseForLineBoxTree):
(WebCore::SimpleLineLayout::initializeInlineBox):
(WebCore::SimpleLineLayout::generateLineBoxTree):
- rendering/SimpleLineLayoutFunctions.h:
- rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::RunResolver::rangeForLine const):
- rendering/SimpleLineLayoutResolver.h:
- 7:16 AM Changeset in webkit [230913] by
-
- 9 edits in trunk/Source
[CoordGraphics] Remove unused trajectory cruft in CoordinatedLayerTreeHost, CoordinatedGraphicsLayer
https://bugs.webkit.org/show_bug.cgi?id=184881
Reviewed by Michael Catanzaro.
Source/WebCore:
Remove the redundant findFirstDescendantWithContentsRecursively() and
setVisibleContentRectTrajectoryVector() methods on the
CoordinatedGraphicsLayer class.
- platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::findFirstDescendantWithContentsRecursively): Deleted.
(WebCore::CoordinatedGraphicsLayer::setVisibleContentRectTrajectoryVector): Deleted.
- platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
Source/WebKit:
The CompositingCoordinator::setVisibleContentsRect() method is always
called with a (0,0) FloatPoint value as the trajectory vector parameter,
which is already the default value in TiledBackingStore where this ends
up. Removing this call chain also enables removing some unnecessary and
odd code in the CoordinatedGraphicsLayer class.
This doesn't yet touch the trajectory logic in the TiledBackingStore
class since it's not yet a given this won't be used in the future. But
if that will be necessary, hope is to not use it this way.
- WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
(WebKit::CompositingCoordinator::setVisibleContentsRect):
(WebKit::CompositingCoordinator::mainContentsLayer): Deleted.
- WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
- WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect):
- WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
- WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
(WebKit::ThreadedCoordinatedLayerTreeHost::didChangeViewport):
- 7:12 AM Changeset in webkit [230912] by
-
- 4 edits in trunk/Source/WebCore
[CoordGraphics] TiledBackingStore unnecessarily tracks alpha support value
https://bugs.webkit.org/show_bug.cgi?id=184880
Reviewed by Michael Catanzaro.
Drop the m_supportsAlpha member from the TiledBackingStore class. The
member value was unused. TiledBackingStore::setSupportsAlpha() method
is removed.
TiledBackingStore::setSupportsAlpha() invalidated the backing store,
so CoordinatedGraphicsLayer::setContentsOpaque() now enforces the same
behavior by manually updating the m_needsDisplay struct. This means
that during the following layer flush the backing store is repainted
in its entirety.
- platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::setContentsOpaque):
(WebCore::CoordinatedGraphicsLayer::createBackingStore):
- platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
(WebCore::TiledBackingStore::TiledBackingStore):
(WebCore::TiledBackingStore::setSupportsAlpha): Deleted.
- platform/graphics/texmap/coordinated/TiledBackingStore.h:
- 6:45 AM Changeset in webkit [230911] by
-
- 2 edits2 adds in trunk/Tools
[GTK][WPE] TestSSL fails due to additional TLS errors returned
https://bugs.webkit.org/show_bug.cgi?id=184860
Reviewed by Carlos Garcia Campos.
Add script and config file for regenerating the test certificate.
Regenerate it. TestSSL no longer fails on my machine.
I do see a ton of network process crashes and JavaScript errors, none of
which prevent the test from passing, but this commit only claims to fix
the certificate validation portion of the test.
- TestWebKitAPI/Tests/WebKitGLib/resources/generate-test-cert.sh: Added.
- TestWebKitAPI/Tests/WebKitGLib/resources/test-cert.conf: Added.
- TestWebKitAPI/Tests/WebKitGLib/resources/test-cert.pem:
- 6:39 AM Changeset in webkit [230910] by
-
- 5 edits in trunk/Source/WebCore
[GStreamer] Start implementing Audio/VideoTrackPrivateGSTreamer::kind method
https://bugs.webkit.org/show_bug.cgi?id=184650
Patch by Thibault Saunier <tsaunier@igalia.com> on 2018-04-23
Reviewed by Philippe Normand.
In the playbin3 case we can assume that if the GstStream is selected by default,
it is the Main track of that kind.
No new tests are added as:
- It relies on playbin3 case which support might be compiled out
- we already have a few test that are currently disabled in the mediastream testsuite. This patch is part of the work to enable them.
- platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp:
(WebCore::AudioTrackPrivateGStreamer::kind const):
- platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h:
- platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp:
(WebCore::VideoTrackPrivateGStreamer::kind const):
- platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h:
- 4:19 AM Changeset in webkit [230909] by
-
- 11 edits in trunk/Source/WebCore
[MSE] Add allSamplesInTrackEnqueued event
https://bugs.webkit.org/show_bug.cgi?id=184737
MediaSource has a .endOfStream() method to signal when there are no more frames
after the ones currently buffered.
This bit of data is important for some multimedia frameworks. For instance, in
GStreamer a stream of frames being decoded should be terminated by a
'end-of-stream' (EOS) event that has a similar meaning. Some GStreamer elements
will expect this event in order to work properly under some circumstances.
Unfortunately currently WebKit provides no mechanism for this: an event of
sorts should be emitted after no more frames are going to be enqueued to signal
the end of the stream. The closest mechanism WebKit has for this is
markEndOfStream(), but it's not exactly the same: markEndOfStream() informs
that -- as far as network buffering is concerned -- we are done; but at that
point there may still be (and often are) many frames waiting in the
decodeQueue, so it would be wrong to signal the decoder that there are no more
frames.
This patch introduces a new optional method in SourceBufferPrivate,
allSamplesInTrackEnqueued(const AtomicString& trackID)that is called
whenever the MediaSource is in "ended" state (the user has called
MediaSource.endOfStream()) and the decodeQueue is empty. Media framework
implementations can use this method to send a EOS event to a decoder that needs
it.
Reviewed by Xabier Rodriguez-Calvar.
- Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::streamEndedWithError):
- Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::provideMediaData):
(WebCore::SourceBuffer::trySignalAllSamplesInTrackEnqueued):
(WebCore::SourceBuffer::trySignalAllSamplesEnqueued):
- Modules/mediasource/SourceBuffer.h:
- platform/graphics/SourceBufferPrivate.h:
(WebCore::SourceBufferPrivate::allSamplesInTrackEnqueued):
- platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp:
(WebCore::MediaSourceClientGStreamerMSE::allSamplesInTrackEnqueued):
- platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.h:
- platform/graphics/gstreamer/mse/PlaybackPipeline.cpp:
(WebCore::PlaybackPipeline::allSamplesInTrackEnqueued):
- platform/graphics/gstreamer/mse/PlaybackPipeline.h:
- platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
(WebCore::SourceBufferPrivateGStreamer::allSamplesInTrackEnqueued):
- platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h:
- 3:13 AM Changeset in webkit [230908] by
-
- 3 edits in trunk/Source/WebKit
[Win][WK2] REGRESSION(r230834) 'getpid': identifier not found
https://bugs.webkit.org/show_bug.cgi?id=184877
Reviewed by Yusuke Suzuki.
- WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::WebBackForwardListProxy::addItem): Use WTF::getCurrentProcessID() instead of getpid().
- WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::goToBackForwardItem): Ditto.
- 12:44 AM Changeset in webkit [230907] by
-
- 3 edits2 adds in trunk
Avoid uninitialized memory read.
https://bugs.webkit.org/show_bug.cgi?id=184505
<rdar://problem/39348325>
Patch by Ms2ger <Ms2ger@igalia.com> on 2018-04-23
Reviewed by Dean Jackson.
LayoutTests/imported/w3c:
- web-platform-tests/2dcontext/imagebitmap/createImageBitmap-bounds-expected.txt: Added.
- web-platform-tests/2dcontext/imagebitmap/createImageBitmap-bounds.html: Added.
Source/WebCore:
Test: imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-bounds.html
- html/ImageBitmap.cpp:
(WebCore::croppedSourceRectangleWithFormatting):
- 12:32 AM Changeset in webkit [230906] by
-
- 10 edits in trunk/Source
[TexMap] Drop RefCounted inheritance off of TextureMapperBackingStore
https://bugs.webkit.org/show_bug.cgi?id=184810
Reviewed by Carlos Garcia Campos.
Source/WebCore:
Turn TextureMapperBackingStore into a simple interface that doesn't
inherit from RefCounted<>. Instead, push that inheritance off to the
classes that implement the TextureMapperBackingStore interface. This
narrows down the purpose of TextureMapperBackingStore towards a simple
interface that TextureMapper algorithms can work with.
TextureMapperLayer has its m_backingStore member variable turn into
a simple pointer instead of a RefPtr<>. Setter method and call sites of
that method are updated to reflect that.
TextureMapperTiledBackingStore now inherits from RefCounted<> directly,
instead of through TextureMapperBackingStore.
- platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
(WebCore::GraphicsLayerTextureMapper::updateBackingStoreIfNeeded):
- platform/graphics/texmap/GraphicsLayerTextureMapper.h:
- platform/graphics/texmap/TextureMapperBackingStore.h:
- platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::setBackingStore):
- platform/graphics/texmap/TextureMapperLayer.h:
- platform/graphics/texmap/TextureMapperTiledBackingStore.h:
Source/WebKit:
CoordinatedBackingStore should inherit directly from RefCounted<> now
that TextureMapperBackingStore doesn't anymore.
- Shared/CoordinatedGraphics/CoordinatedBackingStore.h:
- Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::createBackingStoreIfNeeded):
Apr 22, 2018:
- 11:48 PM Changeset in webkit [230905] by
-
- 5 edits2 adds in trunk/Source/WebCore
[AsyncScrolling] Add generic ScrollingThread implementation
https://bugs.webkit.org/show_bug.cgi?id=184809
Reviewed by Yusuke Suzuki.
Add a generic ScrollingThread implementation that internally uses
RunLoop facilities to run the scrolling thread and dispatch
callbacks on that thread.
ScrollingThread::initializeRunLoop() retrieves address of the
thread-specific RunLoop and signals the Condition object.
ScrollingThread::wakeUpRunLoop() uses RunLoop::dispatch() to schedule
callback dispatches on the scrolling thread.
ScrollingThread::createThreadIfNeeded() mimics Cocoa implementation and
waits for the RunLoop address to be retrieved before continuing.
- SourcesGTK.txt: Add to build.
- SourcesWPE.txt: Ditto.
- page/scrolling/ScrollingThread.cpp:
(WebCore::ScrollingThread::createThreadIfNeeded):
- page/scrolling/ScrollingThread.h:
- page/scrolling/generic/ScrollingThreadGeneric.cpp: Added.
(WebCore::ScrollingThread::initializeRunLoop):
(WebCore::ScrollingThread::wakeUpRunLoop):
- 11:47 PM Changeset in webkit [230904] by
-
- 5 edits in trunk/Source
[CoordinatedGraphics] Unused contentsSize, coveredRect attributes in CoordinatedGraphicsState
https://bugs.webkit.org/show_bug.cgi?id=184811
Reviewed by Carlos Garcia Campos.
Source/WebCore:
Remove the unused contentsSize and coveredRect attributes on the
CoordinatedGraphicsState struct. CoordinatedGraphicsLayer::coverRect()
method is now unused and can also be removed.
- platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
- platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
Source/WebKit:
- WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
(WebKit::CompositingCoordinator::flushPendingLayerChanges): Stop setting
the removed contentsSize and coveredRect attributes. These were only
ever set to the appropriate values, but were then never used anywhere.
- 4:03 PM Changeset in webkit [230903] by
-
- 2 edits in trunk/Source/WebKit
Web Inspector: WebInspectorProxy releases WKWebInspectorProxyObjCAdapter without removing corresponding observer
https://bugs.webkit.org/show_bug.cgi?id=184865
<rdar://problem/37764960>
Reviewed by Brian Burg.
Replace the early return removed in https://bugs.webkit.org/show_bug.cgi?id=177661,
so that WKWebInspectorProxyObjCAdapter and the view controller can be reused
when reopening the Inspector while the WebView is still alive.
- UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCreateFrontendPage):
- 2:39 PM Changeset in webkit [230902] by
-
- 3 edits in trunk/Source/WebKit
Add -[WKInputDelegate _webView:decidePolicyForFocusedElement:] so clients can request default focusing behavior
https://bugs.webkit.org/show_bug.cgi?id=184844
Patch by Paul Knight <pknight@apple.com> on 2018-04-22
Reviewed by Dan Bernstein.
If a client doesn't implement -[_WKInputDelegate _webView:focusShouldStartInputSession:] the default
focus behavior only brings up the keyboard if it's already onscreen, the interaction is user driven,
and other factors that even depend on what feature flags are enabled.
If a client implements _webView:focusShouldStartInputSession:, they don't have a good way to specifiy
they'd like to fall back to the default behavior. This makes it difficult for a client to use the
default in most cases, but sometimes allow programmatic focus from the page, for example.
Add a new delegate method -_webView:decidePolicyForFocusedElement: that returns a new enum type
_WKFocusStartsInputSessionPolicy. Clients can return _WKFocusStartsInputSessionPolicyAuto to request
the default behavior, or _WKFocusStartsInputSessionPolicyAllow / Disallow to directly control whether
the keyboard appears to assist the focused node.
- UIProcess/API/Cocoa/_WKInputDelegate.h:
- UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
- 2:23 PM Changeset in webkit [230901] by
-
- 2 edits3 adds in trunk/LayoutTests
Add a layout test for r230785
https://bugs.webkit.org/show_bug.cgi?id=184757
Reviewed by Beth Dakin.
Adds a new layout test to verify that true screen dimensions in extra zoom mode
are observable from the page, via window.screen.
- TestExpectations:
- fast/dom/Window/extrazoom/window-get-real-screen-dimensions.html: Added.
- 6:44 AM Changeset in webkit [230900] by
-
- 9 edits1 move2 deletes in trunk/Source/JavaScriptCore
[JSC] Remove ModuleLoaderPrototype
https://bugs.webkit.org/show_bug.cgi?id=184784
Reviewed by Mark Lam.
When we introduce ModuleLoaderPrototype, ModuleLoader may be created by users and exposed to users.
However, the loader spec is abandoned. So we do not need to have ModuleLoaderPrototype and JSModuleLoader.
This patch merges ModuleLoaderPrototype's functionality into JSModuleLoader.
- CMakeLists.txt:
- DerivedSources.make:
- JavaScriptCore.xcodeproj/project.pbxproj:
- Sources.txt:
- builtins/ModuleLoader.js: Renamed from Source/JavaScriptCore/builtins/ModuleLoaderPrototype.js.
- runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
- runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::proxyRevokeStructure const):
(JSC::JSGlobalObject::moduleLoaderStructure const): Deleted.
- runtime/JSModuleLoader.cpp:
(JSC::moduleLoaderParseModule):
(JSC::moduleLoaderRequestedModules):
(JSC::moduleLoaderModuleDeclarationInstantiation):
(JSC::moduleLoaderResolve):
(JSC::moduleLoaderResolveSync):
(JSC::moduleLoaderFetch):
(JSC::moduleLoaderGetModuleNamespaceObject):
(JSC::moduleLoaderEvaluate):
- runtime/JSModuleLoader.h:
- runtime/ModuleLoaderPrototype.cpp: Removed.
- runtime/ModuleLoaderPrototype.h: Removed.