⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Timeline



Jun 11, 2018:

11:58 PM Changeset in webkit [232744] by Carlos Garcia Campos
  • 4 edits in trunk

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.21.4 release.

.:

  • Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit:

  • gtk/NEWS: Add release notes for 2.21.4.
10:40 PM Changeset in webkit [232743] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC] Replace HorizontalGeometry::width and margin with WidthAndMargin (Vertical too)
https://bugs.webkit.org/show_bug.cgi?id=186556

Reviewed by Sam Weinig.

HorizontalGeometry::width and margin -> WidthAndMargin
VerticalGeometry::height and margin -> HeightAndMargin

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry const):
(WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry const):

  • layout/FormattingContext.h:
  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedHorizontalMarginValue):
(WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedVerticalMarginValue):

10:05 PM Changeset in webkit [232742] by sbarati@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Reduce graph size by replacing terminal nodes in blocks that have a ForceOSRExit with Unreachable
https://bugs.webkit.org/show_bug.cgi?id=181409
<rdar://problem/36383749>

Reviewed by Keith Miller.

This patch is me redoing r226655. This is a patch I wrote when
profiling Speedometer. Fil rolled this change out in r230928. He
showed this slowed down a sunspider tests by ~2x. This sunspider
regression revealed a real performance bug in the original change:
we would kill blocks that reached OSR entry targets, sometimes leading
us to not do OSR entry into the DFG, since we could end up deleting
entire loops from the CFG. The reason for this is that code that has run
~once and that reaches loops often has ForceOSRExits inside of it. The
solution to this is to not perform this optimization on blocks that can
reach OSR entry targets.

The reason I'm redoing this patch is that it turns out Fil rolling
out the change was a Speedometer 2 regression.

This is a modified version of the original ChangeLog I wrote in r226655:

When I was looking at profiler data for Speedometer, I noticed that one of
the hottest functions in Speedometer is around 1100 bytecode operations long.
Only about 100 of those bytecode ops ever execute. However, we ended up
spending a lot of time compiling basic blocks that never executed. We often
plant ForceOSRExit nodes when we parse bytecodes that have a null value profile.
This is the case when such a node never executes.

This patch makes it so that anytime a block has a ForceOSRExit, and that block
can not reach an OSR entry target, we replace its terminal node with an Unreachable
node, and remove all nodes after the ForceOSRExit. This cuts down the graph
size since it removes control flow edges from the CFG. This allows us to get
rid of huge chunks of the CFG in certain programs. When doing this transformation,
we also insert Flushes/PhantomLocals to ensure we can recover values that are bytecode
live-in to the ForceOSRExit.

Using ForceOSRExit as the signal for this is a bit of a hack. It definitely
does not get rid of all the CFG that it could. If we decide it's worth
it, we could use additional inputs into this mechanism. For example, we could
profile if a basic block ever executes inside the LLInt/Baseline, and
remove parts of the CFG based on that.

When running Speedometer with the concurrent JIT turned off, this patch
improves DFG/FTL compile times by around 5%.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::addToGraph):
(JSC::DFG::ByteCodeParser::inlineCall):
(JSC::DFG::ByteCodeParser::parse):

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::blocksInPostOrder):

10:05 PM Changeset in webkit [232741] by sbarati@apple.com
  • 8 edits in trunk/Source

The NaturalLoops algorithm only works when the list of blocks in a loop is de-duplicated
https://bugs.webkit.org/show_bug.cgi?id=184829

Reviewed by Michael Saboff.

Source/JavaScriptCore:

This patch codifies that a BasicBlock's list of predecessors is de-duplicated.
In B3/Air, this just meant writing a validation rule. In DFG, this meant
ensuring this property when building up the predecessors list, and also adding
a validation rule. The NaturalLoops algorithm relies on this property.

  • b3/B3Validate.cpp:
  • b3/air/AirValidate.cpp:
  • b3/testb3.cpp:

(JSC::B3::testLoopWithMultipleHeaderEdges):
(JSC::B3::run):

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::handleSuccessor):

  • dfg/DFGValidate.cpp:

Source/WTF:

This patch switches NaturalLoops to walking over a block's predecessors
instead of successors when building the initial list of loops and their
headers. The algorithm broke down when we had a footer block with multiple
control flow edges pointing to the same header. This made the loop data
structure contain multiple entries for the same basic block. The algorithm
breaks down when we end up in this state, since it means our way of detecting
what loop is more inner is broken, since that check uses a loop's size.

  • wtf/NaturalLoops.h:

(WTF::NaturalLoop::addBlock):
(WTF::NaturalLoops::NaturalLoops):

8:27 PM Changeset in webkit [232740] by Dewei Zhu
  • 3 edits in trunk/Websites/perf.webkit.org

Extend test group rule to support 'userInitiated' field.
https://bugs.webkit.org/show_bug.cgi?id=186544

Reviewed by Ryosuke Niwa.

Added support for rule specifying whether or not test group is user initiated.

  • tools/js/analysis-results-notifier.js: Rule now support 'userInitiated' field.

(AnalysisResultsNotifier.prototype.async.sendNotificationsForTestGroups):
(AnalysisResultsNotifier.prototype._applyRules):
(AnalysisResultsNotifier._matchesRule):

  • unit-tests/analysis-results-notifier-tests.js: Added unit tests for this change.
7:37 PM Changeset in webkit [232739] by youenn@apple.com
  • 23 edits in trunk

Improve error messages in case FetchEvent.respondWith has a rejected promise
https://bugs.webkit.org/show_bug.cgi?id=186368

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/service-workers/service-worker/fetch-event-network-error.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/fetch-event-redirect.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/fetch-event-respond-with-argument.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/fetch-event-respond-with-response-body-with-invalid-chunk.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/fetch-frame-resource.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/fetch-mixed-content-to-inscope.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/fetch-mixed-content-to-outscope.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/fetch-request-css-images.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/fetch-request-resources.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/invalid-header.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/update-recovery.https-expected.txt:

Source/WebCore:

Covered by rebased tests.

Introduce a new error domain for service worker ResourceError.
Used this domain to log in the console any such error.

Update FetchEvent implementation to get meaningful error messages for respondWith error cases.
In particular, convert the rejected promise JS value as a string to populate the error message.

  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::didFail):

  • platform/network/ResourceErrorBase.cpp:
  • platform/network/ResourceErrorBase.h:
  • testing/ServiceWorkerInternals.cpp:

(WebCore::ServiceWorkerInternals::waitForFetchEventToFinish):

  • workers/service/FetchEvent.cpp:

(WebCore::FetchEvent::~FetchEvent):
(WebCore::FetchEvent::createResponseError):
(WebCore::FetchEvent::onResponse):
(WebCore::FetchEvent::respondWithError):
(WebCore::FetchEvent::processResponse):
(WebCore::FetchEvent::promiseIsSettled):

  • workers/service/FetchEvent.h:
  • workers/service/context/ServiceWorkerFetch.cpp:

(WebCore::ServiceWorkerFetch::processResponse):
(WebCore::ServiceWorkerFetch::dispatchFetchEvent):

Source/WebKit:

Log in JS console in case of failures.
Rely on ThreadableLoader to log which client actually failed.

  • WebProcess/Storage/ServiceWorkerClientFetch.cpp:

(WebKit::ServiceWorkerClientFetch::didFail):

LayoutTests:

6:46 PM Changeset in webkit [232738] by keith_miller@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

Loading cnn.com in MiniBrowser hits Structure::dump() under DFG::AdaptiveInferredPropertyValueWatchpoint::handleFire which churns 65KB of memory
https://bugs.webkit.org/show_bug.cgi?id=186467

Reviewed by Simon Fraser.

This patch adds a LazyFireDetail that wraps ScopedLambda so that
we don't actually malloc any strings for firing unless those
Strings are actually going to be printed.

  • bytecode/Watchpoint.h:

(JSC::LazyFireDetail::LazyFireDetail):

  • dfg/DFGAdaptiveInferredPropertyValueWatchpoint.cpp:

(JSC::DFG::AdaptiveInferredPropertyValueWatchpoint::handleFire):

  • dfg/DFGAdaptiveStructureWatchpoint.cpp:

(JSC::DFG::AdaptiveStructureWatchpoint::fireInternal):

  • runtime/ArrayPrototype.cpp:

(JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire):

6:27 PM Changeset in webkit [232737] by Chris Dumez
  • 11 edits
    2 adds in trunk

http/tests/security/xss-DENIED-script-inject-into-inactive-window2.html times out with PSON enabled
https://bugs.webkit.org/show_bug.cgi?id=186546

Reviewed by Brady Eidson.

Source/WebCore:

Add a hasOpenedFrames flag to NavigationAction, which we'll use in the UIProcess when deciding
to process swap on navigation or not.

Test: http/tests/security/xss-DENIED-script-inject-into-inactive-window2-pson.html

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadURL):

  • loader/NavigationAction.h:

(WebCore::NavigationAction::hasOpenedFrames const):
(WebCore::NavigationAction::setHasOpenedFrames):

Source/WebKit:

Disable process swap on navigation in frames that have opened other frames via
window.open(). These new windows may have a WindowProxy to their opener, and it
would therefore be unsafe to process swap at this point.

  • Shared/NavigationActionData.cpp:

(WebKit::NavigationActionData::encode const):
(WebKit::NavigationActionData::decode):

  • Shared/NavigationActionData.h:
  • UIProcess/API/APINavigation.h:

(API::Navigation::setHasOpenedFrames):
(API::Navigation::hasOpenedFrames const):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::decidePolicyForNavigationAction):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::processForNavigationInternal):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

LayoutTests:

Add layout test coverage.

  • http/tests/security/xss-DENIED-script-inject-into-inactive-window2-pson-expected.txt: Added.
  • http/tests/security/xss-DENIED-script-inject-into-inactive-window2-pson.html: Added.
5:11 PM Changeset in webkit [232736] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

Layout Test svg/dom/animated-tearoff-list-remove-target.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=185698
<rdar://problem/40341200>

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2018-06-11
Reviewed by Daniel Bates.

The test is flaky because we get the animVal.getItem(0) of the 'x' attribute
from the target element without initializing this attribute with a base value.

The test assumes the animator would set the animVal of the 'x' attribute
from the 'from' attribute of the <animate> element before animVal.getItem(0)
is executed. But this may not always happen. Therefore the test will get
the 'IndexSizeError' exception and it will time out.

The fix is:
-- Initialize the attribute of the target element by a base value.
-- Use requestAnimationFrame() instead of using setTimeout() to make the

test deterministic.

-- Allow the animation to advance one more step after kicking off the GC

to ensure the variable 'animItem' is detached from animVal.getItem(0).

  • svg/dom/animated-tearoff-list-remove-target.html:
4:14 PM Changeset in webkit [232735] by jer.noble@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed gardening; add a late endTest(), in case none of the other events fire in time.

  • media/track/track-delete-during-setup.html:
3:52 PM Changeset in webkit [232734] by Keith Rollin
  • 5 edits in trunk/Source

Add logging around internalError(const URL&)
https://bugs.webkit.org/show_bug.cgi?id=186369
<rdar://problem/40872046>

Reviewed by Brent Fulgham.

There are times when we receive bug reports where the user says that
they are simply shown a page saying an internal error occurred. To
help understand the circumstances of that error, add some logging to
internalError() in WebErrors.cpp. This logging logs at the Error level
that internalError() was called and then logs a backtrace.

Source/WebKit:

  • Shared/WebErrors.cpp:

(WebKit::internalError):

Source/WTF:

  • wtf/Assertions.cpp:
  • wtf/Assertions.h:
3:15 PM Changeset in webkit [232733] by mark.lam@apple.com
  • 13 edits in trunk

Add support for webkit-test-runner jscOptions in DumpRenderTree and WebKitTestRunner.
https://bugs.webkit.org/show_bug.cgi?id=186451
<rdar://problem/40875792>

Reviewed by Tim Horton.

Source/JavaScriptCore:

Enhance setOptions() to be able to take a comma separated options string in
addition to white space separated options strings.

  • runtime/Options.cpp:

(JSC::isSeparator):
(JSC::Options::setOptions):

Tools:

This jscOptions option can be used by a layout test to specify some JSC runtime
options needed by the test e.g. by adding something like this to the top of the
html file after the DOCTYPE tag:

<!-- webkit-test-runner [ jscOptions=--useIntlPluralRules=true ] -->

If more than one option is needed, the options can be specified as a comma
separated string e.g.

<!-- webkit-test-runner [ jscOptions=--useIntlPluralRules=true,--useZombieMode=true ] -->

This only works with JSC options that can be changed at runtime. Not all JSC
options can be changed this way as some options are only checked and set once at
VM / process initialization time: changing this type of options may have no
effect. It's the test writer's responsibility to determine which options are
appropriate for with this webkit-test-runner jscOptions option.

This implementation is a workaround until we can change the run-webkit-tests
scripts to parse the option and apply it to a new launch of DRT or WKTR:
https://bugs.webkit.org/show_bug.cgi?id=186452

  • DumpRenderTree/TestOptions.cpp:

(TestOptions::TestOptions):
(TestOptions::webViewIsCompatibleWithOptions const):

  • DumpRenderTree/TestOptions.h:
  • DumpRenderTree/mac/DumpRenderTree.mm:

(setJSCOptions):
(resetWebViewToConsistentStateBeforeTesting):

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::didReceiveMessageToPage):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetStateToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):

  • WebKitTestRunner/TestOptions.h:

(WTR::TestOptions::hasSameInitializationOptions const):

LayoutTests:

  • js/intl-numberformat-format-to-parts.html:
  • js/intl-pluralrules.html:
  • js/script-tests/intl-numberformat-format-to-parts.js:
2:29 PM Changeset in webkit [232732] by beidson@apple.com
  • 4 edits in trunk/Tools

Add a command line default to force WebKitTestRunner to turn on process swap on navigation.
https://bugs.webkit.org/show_bug.cgi?id=186534

Reviewed by Chris Dumez.

Right now Process Swap On Navigation is enabled on a per-test basis.
The future is to enable it by default.

Adding a 'defaults write' helps us get to that future.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::testOptionsForTest const):
(WTR::TestController::platformAddTestOptions const):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::TestController::platformAddTestOptions const):

2:06 PM Changeset in webkit [232731] by timothy_horton@apple.com
  • 6 edits in trunk/Source

Link drag image is inconsistently unreadable in dark mode
https://bugs.webkit.org/show_bug.cgi?id=186472

Reviewed by Timothy Hatcher.

Source/WebCore:

  • platform/mac/DragImageMac.mm:

(WebCore::createDragImageForLink):
Use LocalDefaultSystemAppearance so that NSColors used inside
createDragImageForLink are interpreted correctly. This function
always follows the system appearance regardless of what the preference
is set to, because it's generating UI that isn't part of the page.

Use controlBackgroundColor to get a consistently contrasting background
for the link drag image.

Source/WebKit:

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::useDefaultAppearance):
Make defaultAppearance accurate even if useSystemAppearance is false.
Some parts of WebKit (like the link drag image, but also context menus)
want to be able to follow the system appearance regardless of whether
the view or content has opted in.

Source/WebKitLegacy/mac:

  • WebView/WebView.mm:

(-[WebView _defaultAppearance]):
Make defaultAppearance accurate even if useSystemAppearance is false.
Some parts of WebKit (like the link drag image, but also context menus)
want to be able to follow the system appearance regardless of whether
the view or content has opted in.

1:52 PM Changeset in webkit [232730] by Chris Dumez
  • 23 edits
    1 move
    2 adds in trunk

http/tests/security/cors-post-redirect-307.html fails with PSON enabled
https://bugs.webkit.org/show_bug.cgi?id=186441

Reviewed by Brady Eidson.

Source/WebCore:

When we are continuing a load in a new process, we currently bypass the navigation policy
check. We now also bypass the adding of headers such as the Origin one since the request
was already processed in the previous process. This is important because in the case of
a cross-origin redirect, the previous process has removed the Origin header from the
request and we do not want the new process to add it again.

Test: http/tests/security/cors-post-redirect-307-pson.html

  • WebCore.xcodeproj/project.pbxproj:
  • history/BackForwardController.cpp:

(WebCore::BackForwardController::goBackOrForward):
(WebCore::BackForwardController::goBack):
(WebCore::BackForwardController::goForward):

  • loader/FrameLoadRequest.h:

(WebCore::FrameLoadRequest::setShouldTreatAsContinuingLoad):
(WebCore::FrameLoadRequest::shouldTreatAsContinuingLoad const):
(WebCore::FrameLoadRequest::setShouldCheckNavigationPolicy): Deleted.
(WebCore::FrameLoadRequest::shouldCheckNavigationPolicy const): Deleted.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadURLIntoChildFrame):
(WebCore::FrameLoader::load):
(WebCore::FrameLoader::loadWithNavigationAction):
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::FrameLoader::reloadWithOverrideEncoding):
(WebCore::FrameLoader::reload):
(WebCore::FrameLoader::addExtraFieldsToRequest):
(WebCore::FrameLoader::addHTTPOriginIfNeeded):
(WebCore::FrameLoader::loadDifferentDocumentItem):
(WebCore::FrameLoader::loadItem):
(WebCore::FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad):

  • loader/FrameLoader.h:
  • loader/HistoryController.cpp:

(WebCore::HistoryController::goToItem):
(WebCore::HistoryController::setDefersLoading):
(WebCore::HistoryController::recursiveGoToItem):

  • loader/HistoryController.h:
  • loader/ShouldTreatAsContinuingLoad.h: Renamed from Source/WebCore/loader/NavigationPolicyCheck.h.
  • page/Page.cpp:

(WebCore::Page::goToItem):

  • page/Page.h:

Source/WebKit:

Rename existing flag to something a bit more generic, now that it is used for
more things than bypassing the navigation policy check.

  • Shared/LoadParameters.cpp:

(WebKit::LoadParameters::encode const):
(WebKit::LoadParameters::decode):

  • Shared/LoadParameters.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::reattachToWebProcessForReload):
(WebKit::WebPageProxy::reattachToWebProcessWithItem):
(WebKit::WebPageProxy::loadRequest):
(WebKit::WebPageProxy::loadRequestWithNavigation):
(WebKit::WebPageProxy::goToBackForwardItem):
(WebKit::WebPageProxy::continueNavigationInNewProcess):

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

(WebKit::WebPage::loadRequest):
(WebKit::WebPage::goToBackForwardItem):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

Source/WebKitLegacy/mac:

Rename existing flag to something a bit more generic, now that it is used for
more things than bypassing the navigation policy check.

  • WebView/WebView.mm:

(-[WebView _loadBackForwardListFromOtherView:]):
(-[WebView goToBackForwardItem:]):

Source/WebKitLegacy/win:

Rename existing flag to something a bit more generic, now that it is used for
more things than bypassing the navigation policy check.

  • WebView.cpp:

(WebView::goToBackForwardItem):
(WebView::loadBackForwardListFromOtherView):

LayoutTests:

Add layout test coverage.

  • http/tests/security/cors-post-redirect-307-pson-expected.txt: Added.
  • http/tests/security/cors-post-redirect-307-pson.html: Added.
1:28 PM Changeset in webkit [232729] by Chris Dumez
  • 5 edits in trunk

Allow enabling PSON in layout tests without window.open support
https://bugs.webkit.org/show_bug.cgi?id=186537

Reviewed by Geoffrey Garen.

Tools:

Allow enabling PSON in layout tests without window.open support since window.open support
is far from being ready and we plan to enable PSON in layout tests soon.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::createWebViewWithOptions):
(WTR::updateTestOptionsFromTestHeader):

  • WebKitTestRunner/TestOptions.h:

(WTR::TestOptions::hasSameInitializationOptions const):

LayoutTests:

Update layout test which requires window.open support in addition to PSON.

  • http/tests/navigation/process-swap-window-open.html:
1:18 PM Changeset in webkit [232728] by youenn@apple.com
  • 6 edits in trunk

Accept request header values should be more tightly checked after r232572 in case of CORS load
https://bugs.webkit.org/show_bug.cgi?id=186533
<rdar://problem/40933880>

Reviewed by Darin Adler.

Source/WebCore:

Covered by updated test.

  • platform/network/HTTPParsers.cpp:

(WebCore::isValidAcceptHeaderValue): Checking that Accept header value conforms with RFC7370.
If not, this will trigger preflighting for CORS cross origin loads.
Current checks for Accept-Language and Content-Language are sufficient to ensure values conform with RFC7370.

LayoutTests:

Added test to check Accept header value preflight.
Updated test to check that a preflight really happens if expected.

  • http/tests/xmlhttprequest/cors-non-standard-safelisted-headers-should-trigger-preflight-expected.txt:
  • http/tests/xmlhttprequest/cors-non-standard-safelisted-headers-should-trigger-preflight.html:
  • http/tests/xmlhttprequest/resources/cors-preflight-safelisted-headers-responder.php:
12:55 PM Changeset in webkit [232727] by beidson@apple.com
  • 2 edits in trunk/Tools

Followup to [Cocoa] Remove all uses of NSAutoreleasePool as part of preparation for ARC
https://bugs.webkit.org/show_bug.cgi?id=186436

Patch by Darin Adler
Reviewed by Brady Eidson.

  • TestWebKitAPI/Tests/mac/StopLoadingFromDidFinishLoading.mm:

(TestWebKitAPI::TEST):

12:35 PM Changeset in webkit [232726] by Antti Koivisto
  • 2 edits in trunk/LayoutTests

Fix spelling.

  • http/tests/cache/disk-cache/disk-cache-media-small.html:
12:23 PM Changeset in webkit [232725] by mark.lam@apple.com
  • 2 edits in trunk/Tools

Gardening: skip BigInt tests on iOS until the feature is stable.
<rdar://problem/40331121>

Not reviewed.

  • Scripts/run-jsc-stress-tests:
12:07 PM Changeset in webkit [232724] by beidson@apple.com
  • 4 edits in trunk/LayoutTests

http/tests/navigation/https-in-page-cache.html fails with process swapping on.
https://bugs.webkit.org/show_bug.cgi?id=186532

Reviewed by Geoffrey Garen.

  • http/tests/navigation/resources/https-in-page-cache-1.php:
  • http/tests/navigation/resources/https-in-page-cache-2.php:
  • http/tests/navigation/resources/https-in-page-cache-3.html:
11:59 AM Changeset in webkit [232723] by Fujii Hironori
  • 8 edits
    1 copy
    1 add in trunk/Tools

[Win][MiniBrowser] Add WebKitBrowserWindow class for modern WebKit API
https://bugs.webkit.org/show_bug.cgi?id=186478

Reviewed by Alex Christensen.

Added "New WebKit Window" and "New WebKitLegacy Window" menu
items. Disabled the menu item "New WebKit Window" if
!ENABLE(WEBKIT).

  • MiniBrowser/win/CMakeLists.txt: Added WebKitBrowserWindow.cpp

source file and ENABLE_WEBKIT macro if ENABLE_WEBKIT.

  • MiniBrowser/win/MainWindow.cpp:

(MainWindow::MainWindow):
(MainWindow::create):
(MainWindow::init):
(MainWindow::WndProc):

  • MiniBrowser/win/MainWindow.h:
  • MiniBrowser/win/MiniBrowserLib.rc:
  • MiniBrowser/win/MiniBrowserLibResource.h:
  • MiniBrowser/win/PrintWebUIDelegate.cpp:

(PrintWebUIDelegate::createWebViewWithRequest):

  • MiniBrowser/win/WebKitBrowserWindow.cpp: Added.

(createString):
(toUtf8):
(createWKString):
(createWKURL):
(WebKitBrowserWindow::create):
(WebKitBrowserWindow::WebKitBrowserWindow):
(WebKitBrowserWindow::init):
(WebKitBrowserWindow::hwnd):
(WebKitBrowserWindow::loadURL):
(WebKitBrowserWindow::loadHTMLString):
(WebKitBrowserWindow::navigateForwardOrBackward):
(WebKitBrowserWindow::navigateToHistory):
(WebKitBrowserWindow::setPreference):
(WebKitBrowserWindow::print):
(WebKitBrowserWindow::launchInspector):
(WebKitBrowserWindow::setUserAgent):
(WebKitBrowserWindow::userAgent):
(WebKitBrowserWindow::showLayerTree):
(WebKitBrowserWindow::updateStatistics):
(WebKitBrowserWindow::resetZoom):
(WebKitBrowserWindow::zoomIn):
(WebKitBrowserWindow::zoomOut):
(toWebKitBrowserWindow):
(WebKitBrowserWindow::didReceiveTitleForFrame):
(WebKitBrowserWindow::didCommitLoadForFrame):

  • MiniBrowser/win/WebKitBrowserWindow.h:
  • MiniBrowser/win/WinMain.cpp:

(wWinMain):

11:11 AM Changeset in webkit [232722] by n_wang@apple.com
  • 2 edits in trunk/Source/WebKit

AX: [iOS] accessibility sometimes doesn't know process suspension is canceled
https://bugs.webkit.org/show_bug.cgi?id=186450

Reviewed by Chris Fleizach.

There's some early return condition in WebProcess::cancelPrepareToSuspend() which
could lead to accessibility failing to post process status notificaiton. Fixed it
by moving the accessibility notification before the early return condition.

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::cancelPrepareToSuspend):

10:24 AM Changeset in webkit [232721] by keith_miller@apple.com
  • 2 edits in trunk/Tools

Add missing whitespace to run-jsc command
https://bugs.webkit.org/show_bug.cgi?id=186528

Reviewed by Mark Lam.

  • Scripts/run-jsc:
9:58 AM Changeset in webkit [232720] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Crash under com.apple.WebKit.Networking at WebCore: WebCore::NetworkStorageSession::hasStorageAccess const
https://bugs.webkit.org/show_bug.cgi?id=186433
<rdar://problem/40750907>

Reviewed by Geoffrey Garen.

Do some hardening in NetworkStorageSession::hasStorageAccess() to make sure
we do not try and do a HashMap lookup with a null firstPartyDomain, as this
would crash.

  • platform/network/cf/NetworkStorageSessionCFNet.cpp:

(WebCore::NetworkStorageSession::hasStorageAccess const):

9:39 AM Changeset in webkit [232719] by msaboff@apple.com
  • 9 edits in trunk

JavaScriptCore: Disable 32-bit JIT on Windows
https://bugs.webkit.org/show_bug.cgi?id=185989

Reviewed by Mark Lam.

.:

  • Source/cmake/OptionsWin.cmake:

Source/JavaScriptCore:

Fixed the CLOOP so it can work when COMPUTED_GOTOs are not supported.

  • llint/LLIntData.h:

(JSC::LLInt::getCodePtr): Used a reinterpret_cast since Opcode could be an int.

  • llint/LowLevelInterpreter.cpp: Changed the definition of OFFLINE_ASM_GLOBAL_LABEL to not

have a case label because these aren't opcodes.

  • runtime/Options.cpp: Made assembler related Windows conditional code also conditional

on the JIT being enabled.
(JSC::recomputeDependentOptions):

Source/WTF:

Fixed the CLOOP so it can work when COMPUTED_GOTOs are not supported.

  • wtf/Platform.h:
9:32 AM Changeset in webkit [232718] by msaboff@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Test js/regexp-zero-length-alternatives.html fails when RegExpJIT is disabled
https://bugs.webkit.org/show_bug.cgi?id=186477

Reviewed by Filip Pizlo.

Fixed bug where we were using the wrong frame size for TypeParenthesesSubpatternTerminalBegin
YARR interpreter nodes. This caused us to overwrite other frame information.

Added frame offset debugging code to YARR interpreter.

  • yarr/YarrInterpreter.cpp:

(JSC::Yarr::ByteCompiler::emitDisjunction):
(JSC::Yarr::ByteCompiler::dumpDisjunction):

8:44 AM Changeset in webkit [232717] by Antti Koivisto
  • 3 edits in trunk/LayoutTests

REGRESSION (Mojave): LayoutTest http/tests/cache/disk-cache/disk-cache-media-small.html is failing
https://bugs.webkit.org/show_bug.cgi?id=186482
<rdar://problem/40924056>

Reviewed by Zalan Bujtas.

The test was sensitive to which exact ranges the system media framework would request.

  • http/tests/cache/disk-cache/disk-cache-media-small-expected.txt:
  • http/tests/cache/disk-cache/disk-cache-media-small.html:

Don't print out the ranges, just check they are all coming from the right source.

8:33 AM Changeset in webkit [232716] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC] Remove redundant position functions for out-of-flow elements
https://bugs.webkit.org/show_bug.cgi?id=186525

Reviewed by Antti Koivisto.

Position is computed as part of the Horizontal/Vertical geometry computation.
(see outOfFlow(Non)ReplacedHorizontalGeometry/outOfFlow(Non)ReplacedVerticalGeometry functions)

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const):
(WebCore::Layout::FormattingContext::computeOutOfFlowPosition const): Deleted.

  • layout/FormattingContext.h:
  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::outOfFlowNonReplacedPosition): Deleted.
(WebCore::Layout::outOfFlowReplacedPosition): Deleted.
(WebCore::Layout::FormattingContext::Geometry::outOfFlowPosition): Deleted.

8:22 AM Changeset in webkit [232715] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC] Merge top, bottom, height and vertical margin computation for out-of-flow replaced elements
https://bugs.webkit.org/show_bug.cgi?id=186524

Reviewed by Antti Koivisto.

Implement https://www.w3.org/TR/CSS22/visudet.html#abs-replaced-height
(10.6.5 Absolutely positioned, replaced elements)

  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):

7:48 AM Changeset in webkit [232714] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC] Merge left, right, width and horizontal margin computation for out-of-flow replaced elements
https://bugs.webkit.org/show_bug.cgi?id=186475

Reviewed by Antti Koivisto.

Implement https://www.w3.org/TR/CSS22/visudet.html#abs-replaced-width
(10.3.8 Absolutely positioned, replaced elements)

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry const):
(WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const):
(WebCore::Layout::FormattingContext::computeOutOfFlowWidthAndMargin const): Deleted.

  • layout/FormattingContext.h:
  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
(WebCore::Layout::computedValueIfNotAuto):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedWidthAndMargin): Deleted.
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedWidthAndMargin): Deleted.
(WebCore::Layout::FormattingContext::Geometry::outOfFlowWidthAndMargin): Deleted.

7:41 AM Changeset in webkit [232713] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

Some CSS animations tests are failing on Windows.
https://bugs.webkit.org/show_bug.cgi?id=186522

Unreviewed test gardening.

  • platform/win/TestExpectations:
7:37 AM Changeset in webkit [232712] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC] Merge left, right, width and horizontal margin computation for out-of-flow non-replaced elements
https://bugs.webkit.org/show_bug.cgi?id=186474

Reviewed by Antti Koivisto.

Implement https://www.w3.org/TR/CSS22/visudet.html#abs-non-replaced-width
(10.3.7 Absolutely positioned, non-replaced elements)

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry const):
(WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const):
(WebCore::Layout::FormattingContext::computeOutOfFlowWidthAndMargin const): Deleted.

  • layout/FormattingContext.h:
  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedWidthAndMargin): Deleted.
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedWidthAndMargin): Deleted.
(WebCore::Layout::FormattingContext::Geometry::outOfFlowWidthAndMargin): Deleted.

7:27 AM Changeset in webkit [232711] by Philippe Normand
  • 3 edits
    1 add in trunk

[webkitpy] PHP7.2 support on Debian platforms
https://bugs.webkit.org/show_bug.cgi?id=186521

Reviewed by Michael Catanzaro.

Tools:

  • Scripts/webkitpy/port/base.py:

(Port._debian_php_version): Refactor and add PHP 7.2 version support.

LayoutTests:

  • http/conf/debian-httpd-2.4-php7.2.conf: Added.
7:27 AM Changeset in webkit [232710] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC] Merge top, bottom, height and vertical margin computation for out-of-flow non-replaced elements
https://bugs.webkit.org/show_bug.cgi?id=186476

Reviewed by Antti Koivisto.

Implement https://www.w3.org/TR/CSS22/visudet.html#abs-non-replaced-height
(10.6.4 Absolutely positioned, non-replaced elements)

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry const):
(WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const):
(WebCore::Layout::FormattingContext::computeOutOfFlowHeight const): Deleted.

  • layout/FormattingContext.h:
  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::computedValueIfNotAuto):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowVerticalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHeightAndMargin): Deleted.
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHeightAndMargin): Deleted.
(WebCore::Layout::FormattingContext::Geometry::outOfFlowHeightAndMargin): Deleted.

5:14 AM Changeset in webkit [232709] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.20.3

WebKitGTK+ 2.20.3

5:13 AM Changeset in webkit [232708] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.20

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.20.3 release.

.:

  • Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit:

  • gtk/NEWS: Add release notes for 2.20.3.
4:31 AM Changeset in webkit [232707] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.20/Source/JavaScriptCore

Merge r230379 - Unreviewed, follow-up patch for DFG 32bit
https://bugs.webkit.org/show_bug.cgi?id=183970

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::cachedGetById):

4:31 AM Changeset in webkit [232706] by Carlos Garcia Campos
  • 60 edits
    4 adds in releases/WebKitGTK/webkit-2.20

Merge r230376 - [JSC] Introduce op_get_by_id_direct
https://bugs.webkit.org/show_bug.cgi?id=183970

Reviewed by Filip Pizlo.

JSTests:

  • stress/generator-prototype-copy.js: Added.

(gen):
(catch):
Adopted JF's tests.

  • stress/generator-type-check.js: Added.

(shouldThrow):
(foo2):
(i.shouldThrow):

  • stress/get-by-id-direct-getter.js: Added.

(shouldBe):
(shouldThrow):
(obj.get hello):
(builtin.createBuiltin):
(obj2.get length):

  • stress/get-by-id-direct.js: Added.

(shouldBe):
(shouldThrow):
(builtin.createBuiltin):

  • test262.yaml:

We fixed long-standing spec compatibility issue.
As a result, this patch makes several test262 tests passed!

Source/JavaScriptCore:

This patch introduces op_get_by_id_direct bytecode. This is super similar to op_get_by_id.
But it just performs GetOwnProperty operation instead of Get. We support this
in all the tiers, so using this opcode does not lead to inefficiency.

Main purpose of this op_get_by_id_direct is using it for private properties. We are using
properties indexed with private symbols to implement ECMAScript internal fields. Before this
patch, we just use get and put operations. However, it is not the correct semantics: accessing
to the internal fields should not traverse prototype chain, which is specified in the spec.
We use op_get_by_id_direct to access to properties which are used internal fields, so that
prototype chains are not traversed.

To emit op_get_by_id_direct, we introduce a new bytecode intrinsic @getByIdDirectPrivate().
When you write @getByIdDirectPrivate(object, "name"), the bytecode generator emits the
bytecode op_get_by_id_direct, object, @name.

  • builtins/ArrayIteratorPrototype.js:

(next):
(globalPrivate.arrayIteratorValueNext):
(globalPrivate.arrayIteratorKeyNext):
(globalPrivate.arrayIteratorKeyValueNext):

  • builtins/AsyncFromSyncIteratorPrototype.js:
  • builtins/AsyncFunctionPrototype.js:

(globalPrivate.asyncFunctionResume):

  • builtins/AsyncGeneratorPrototype.js:

(globalPrivate.asyncGeneratorQueueIsEmpty):
(globalPrivate.asyncGeneratorQueueEnqueue):
(globalPrivate.asyncGeneratorQueueDequeue):
(globalPrivate.asyncGeneratorDequeue):
(globalPrivate.isExecutionState):
(globalPrivate.isSuspendYieldState):
(globalPrivate.asyncGeneratorReject):
(globalPrivate.asyncGeneratorResolve):
(globalPrivate.doAsyncGeneratorBodyCall):
(globalPrivate.asyncGeneratorEnqueue):

  • builtins/GeneratorPrototype.js:

(globalPrivate.generatorResume):
(next):
(return):
(throw):

  • builtins/MapIteratorPrototype.js:

(next):

  • builtins/PromiseOperations.js:

(globalPrivate.isPromise):
(globalPrivate.rejectPromise):
(globalPrivate.fulfillPromise):

  • builtins/PromisePrototype.js:

(then):

  • builtins/SetIteratorPrototype.js:

(next):

  • builtins/StringIteratorPrototype.js:

(next):

  • builtins/TypedArrayConstructor.js:

(of):
(from):

  • bytecode/BytecodeDumper.cpp:

(JSC::BytecodeDumper<Block>::dumpBytecode):

  • bytecode/BytecodeIntrinsicRegistry.h:
  • bytecode/BytecodeList.json:
  • bytecode/BytecodeUseDef.h:

(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::finalizeLLIntInlineCaches):

  • bytecode/GetByIdStatus.cpp:

(JSC::GetByIdStatus::computeFromLLInt):
(JSC::GetByIdStatus::computeFor):

  • bytecode/StructureStubInfo.cpp:

(JSC::StructureStubInfo::reset):

  • bytecode/StructureStubInfo.h:

(JSC::appropriateOptimizingGetByIdFunction):
(JSC::appropriateGenericGetByIdFunction):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitDirectGetById):

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp:

(JSC::BytecodeIntrinsicNode::emit_intrinsic_getByIdDirect):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_getByIdDirectPrivate):

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleGetById):
(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGNode.h:

(JSC::DFG::Node::convertToGetByOffset):
(JSC::DFG::Node::convertToMultiGetByOffset):
(JSC::DFG::Node::hasIdentifier):
(JSC::DFG::Node::hasHeapPrediction):

  • dfg/DFGNodeType.h:
  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileGetById):
(JSC::DFG::SpeculativeJIT::compileGetByIdFlush):
(JSC::DFG::SpeculativeJIT::compileTryGetById): Deleted.

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::cachedGetById):
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::cachedGetById):
(JSC::DFG::SpeculativeJIT::compile):

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileGetById):
(JSC::FTL::DFG::LowerDFGToB3::compileGetByIdWithThis):
(JSC::FTL::DFG::LowerDFGToB3::getById):

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):

  • jit/JIT.h:
  • jit/JITOperations.cpp:
  • jit/JITOperations.h:
  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_get_by_id_direct):
(JSC::JIT::emitSlow_op_get_by_id_direct):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emit_op_get_by_id_direct):
(JSC::JIT::emitSlow_op_get_by_id_direct):

  • jit/Repatch.cpp:

(JSC::appropriateOptimizingGetByIdFunction):
(JSC::appropriateGetByIdFunction):
(JSC::tryCacheGetByID):
(JSC::repatchGetByID):
(JSC::appropriateGenericGetByIdFunction): Deleted.

  • jit/Repatch.h:
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • llint/LLIntSlowPaths.h:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/JSCJSValue.h:
  • runtime/JSCJSValueInlines.h:

(JSC::JSValue::getOwnPropertySlot const):

  • runtime/JSObject.h:
  • runtime/JSObjectInlines.h:

(JSC::JSObject::getOwnPropertySlotInline):

3:29 AM Changeset in webkit [232705] by Carlos Garcia Campos
  • 4 edits
    3 adds in releases/WebKitGTK/webkit-2.20

Merge r229987 - DFG should know that CreateThis can be effectful
https://bugs.webkit.org/show_bug.cgi?id=184013

Reviewed by Saam Barati.

JSTests:

  • stress/create-this-property-change.js: Added.

(Foo):
(RealBar):
(get if):

  • stress/create-this-structure-change-without-cse.js: Added.

(Foo):
(RealBar):
(get if):

  • stress/create-this-structure-change.js: Added.

(Foo):
(RealBar):
(get if):

Source/JavaScriptCore:

As shown in the tests added in JSTests, CreateThis can be effectful if the constructor this
is a proxy.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

3:29 AM Changeset in webkit [232704] by Carlos Garcia Campos
  • 5 edits
    1 add in releases/WebKitGTK/webkit-2.20

Merge r230119 - WebAssembly compilation from DataView

3:28 AM Changeset in webkit [232703] by Carlos Garcia Campos
  • 4 edits
    3 adds in releases/WebKitGTK/webkit-2.20

Merge r230052 - WebSocket cookie incorrectly stored
https://bugs.webkit.org/show_bug.cgi?id=184100
<rdar://problem/37928715>

Reviewed by Brent Fulgham.

Source/WebCore:

A cookie received in a WebSocket response should be stored with respect to the
origin of the WebSocket server in order for it to be sent in a subsequent request.

Also removed a FIXME about implementing support for the long since
deprecated Set-Cookie2 header.

Test: http/tests/websocket/tests/hybi/websocket-cookie-overwrite-behavior.html

  • Modules/websockets/WebSocketChannel.cpp:

(WebCore::WebSocketChannel::processBuffer):

  • Modules/websockets/WebSocketHandshake.h:

LayoutTests:

  • http/tests/websocket/tests/hybi/cookie_wsh.py: Added. Downloaded from

<https://github.com/w3c/pywebsocket/blob/b2e1d11086fdf00b33a0d30c504f227e7d4fa86b/src/example/cookie_wsh.py>.
(_add_set_cookie):
(web_socket_do_extra_handshake):
(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/websocket-cookie-overwrite-behavior-expected.txt: Added.
  • http/tests/websocket/tests/hybi/websocket-cookie-overwrite-behavior.html: Added.
3:28 AM Changeset in webkit [232702] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.20/Source/WebCore

Merge r230016 - Attempt to fix media control layout tests after <https://trac.webkit.org/changeset/230006/>
(https://bugs.webkit.org/show_bug.cgi?id=179983)

Exempt elements in user agent shadow DOM from having to perform a potentially CORS-
enabled fetch for a mask image to try to fix the following tests from timing out:

media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline.html
media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-pip-to-inline.html

  • style/StylePendingResources.cpp:

(WebCore::Style::loadPendingImage):

3:28 AM Changeset in webkit [232701] by Carlos Garcia Campos
  • 5 edits
    4 adds in releases/WebKitGTK/webkit-2.20

Merge r230006 - CSS mask images should be retrieved using potentially CORS-enabled fetch
https://bugs.webkit.org/show_bug.cgi?id=179983
<rdar://problem/35678149>

Reviewed by Brent Fulgham.

Source/WebCore:

As per <https://drafts.fxtf.org/css-masking-1/#priv-sec> (Editor’s Draft, 23 December 2017)
we should fetch CSS mask images using a potentially CORS-enabled fetch.

Both cross-origin CSS shape-outside images and CSS mask images may be sensitive to timing
attacks that can be used to reveal their pixel data when retrieved without regard to CORS.
For the same reason that we fetch CSS shape-outside images using a potentially CORS-enabled
fetch we should fetch CSS mask the same way. This also makes the behavior of WebKit more
closely align with the behavior in the spec.

Test: http/tests/security/css-mask-image.html

  • page/Settings.yaml: Add a setting for toggle "Anonymous" mode fetching of mask images (defaults: true).

We need this setting to avoid breaking the developer convenience feature that some modern media controls
layout tests employ to load assets from the filesystem as opposed to using the hardcoded data URLs baked
into the WebKit binary.

  • style/StylePendingResources.cpp: Substitute LoadPolicy::NoCORS and LoadPolicy::Anonymous for

LoadPolicy::Normal and LoadPolicy::ShapeOutside, respectively, to match the terminology used
in the HTML, CSS Shapes Module Level 1, and CSS Masking Module Level 1 specs.
(WebCore::Style::loadPendingImage): Ditto.
(WebCore::Style::loadPendingResources): Use load policy LoadPolicy::Anonymous when fetching
a mask image or shape-outside image.

LayoutTests:

Add a test to ensure we do not fetch a cross-origin CSS mask image that does
not allow CORS access.

  • http/tests/security/css-mask-image-expected.html: Added.
  • http/tests/security/css-mask-image.html: Added.
  • http/tests/security/resources/black-square.png: Added.
  • http/tests/security/resources/fail-mask.png: Added.
  • media/modern-media-controls/resources/media-controls-loader.js: Disable "Anonymous" mode

fetching of mask images to allow modern media controls to load mask assets from the filesystem.

3:28 AM Changeset in webkit [232700] by Carlos Garcia Campos
  • 7 edits
    2 adds in releases/WebKitGTK/webkit-2.20

Merge r229830 - Disconnect the SVGPathSegList items from their SVGPathElement before rebuilding a new list
https://bugs.webkit.org/show_bug.cgi?id=183723
<rdar://problem/38517871>

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2018-03-21
Reviewed by Daniel Bates.

Source/WebCore:

When setting the "d" attribute directly on a path, we rebuild the list
of path segments held for creating the property tear off. The old path
segments need to get disconnected from the path element. We already do
that when a path segment is replaced or removed.

Test: svg/dom/reuse-pathseg-after-changing-d.html

  • svg/SVGPathElement.cpp:

(WebCore::SVGPathElement::svgAttributeChanged):

  • svg/SVGPathSegList.cpp:

(WebCore::SVGPathSegList::clear): SVGPathSegListValues::clearContextAndRoles()
will now be called from SVGPathSegListValues::clear() via SVGListProperty::clearValues().
(WebCore::SVGPathSegList::replaceItem):
(WebCore::SVGPathSegList::removeItem):
(WebCore::SVGPathSegList::clearContextAndRoles): Deleted.

  • svg/SVGPathSegList.h: SVGPathSegListValues::clearContextAndRoles() will

now be called from SVGPathSegListValues::clear() via SVGListProperty::initializeValues().

  • svg/SVGPathSegListValues.cpp:

(WebCore::SVGPathSegListValues::clearItemContextAndRole):
(WebCore::SVGPathSegListValues::clearContextAndRoles):

  • svg/SVGPathSegListValues.h:

(WebCore::SVGPathSegListValues::operator=):
(WebCore::SVGPathSegListValues::clear):

LayoutTests:

  • svg/dom/reuse-pathseg-after-changing-d-expected.txt: Added.
  • svg/dom/reuse-pathseg-after-changing-d.html: Added.
3:13 AM Changeset in webkit [232699] by graouts@webkit.org
  • 4 edits in trunk/LayoutTests

[Web Animations] Make imported/mozilla/css-transitions/test_setting-effect.html pass reliably
https://bugs.webkit.org/show_bug.cgi?id=183850

Unreviewed.

This test is now passing.

LayoutTests/imported/mozilla:

  • css-transitions/test_setting-effect-expected.txt:

LayoutTests:

3:10 AM Changeset in webkit [232698] by graouts@webkit.org
  • 2 edits in trunk/LayoutTests

[Web Animations] Make imported/mozilla/css-animations/test_setting-effect.html pass reliably
https://bugs.webkit.org/show_bug.cgi?id=183849

Unreviewed.

This test is now passing.

3:04 AM Changeset in webkit [232697] by graouts@webkit.org
  • 2 edits in trunk/LayoutTests

[Web Animations] Make imported/mozilla/css-animations/test_cssanimation-animationname.html pass reliably
https://bugs.webkit.org/show_bug.cgi?id=183838

Unreviewed.

This test is now passing.

2:58 AM Changeset in webkit [232696] by graouts@webkit.org
  • 2 edits in trunk/LayoutTests

[Web Animations] Make imported/mozilla/css-transitions/test_csstransition-transitionproperty.html pass reliably
https://bugs.webkit.org/show_bug.cgi?id=183835

Unreviewed.

This test is now passing.

2:56 AM Changeset in webkit [232695] by graouts@webkit.org
  • 4 edits in trunk/LayoutTests

[Web Animations] Make imported/mozilla/css-transitions/test_animation-starttime.html pass reliably
https://bugs.webkit.org/show_bug.cgi?id=183833

Unreviewed.

This test is now passing.

LayoutTests/imported/mozilla:

  • css-transitions/test_animation-starttime-expected.txt:

LayoutTests:

2:53 AM Changeset in webkit [232694] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.20/Source/WebKit

Merge r232151 - Unreviewed. Fix GTK+ input method unit tests after r232049.

Unit tests don't use a WebPageProxy.

  • UIProcess/gtk/InputMethodFilter.cpp:

(WebKit::InputMethodFilter::isViewFocused const):
(WebKit::InputMethodFilter::setEnabled):

  • UIProcess/gtk/InputMethodFilter.h:
2:53 AM Changeset in webkit [232693] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.20/Source/WebKit

Merge r232049 - [GTK][Wayland] UI process crash when closing the window
https://bugs.webkit.org/show_bug.cgi?id=185818

Reviewed by Michael Catanzaro.

This happens when a page containing a text field is loaded but the focus remains in the url bar when the window
is closed. This is because we are sending a notify-in to the IM context, but the focus is still in the URL
bar. That confuses the wayland input method manager that tries to free the text of the web view IM context that has
already been deleted.

  • UIProcess/gtk/InputMethodFilter.cpp:

(WebKit::InputMethodFilter::setEnabled): Only send notify-in if the view is actually focused.

2:53 AM Changeset in webkit [232692] by Carlos Garcia Campos
  • 6 edits in releases/WebKitGTK/webkit-2.20/Source

Merge r232111 - [GTK] WebDriver: implement AutomationSessionClient::didDisconnectFromRemote
https://bugs.webkit.org/show_bug.cgi?id=185866

Reviewed by Brian Burg.

Source/WebDriver:

Close the dbus connection when receiving an empty target list.

  • glib/SessionHostGlib.cpp:

(WebDriver::SessionHost::setTargetList):

Source/WebKit:

To handle the case of the session being closed by the browser, for example in case of a network process
crash. This is currently causing WebDriver tests to timeout in the bot.

  • UIProcess/API/glib/WebKitAutomationSession.cpp: Add an implementation of didDisconnectFromRemote() to notify

the WebContext that the session will be closed.

  • UIProcess/API/glib/WebKitWebContext.cpp: Remove the automation session when closed.
  • UIProcess/API/glib/WebKitWebContextPrivate.h:
2:53 AM Changeset in webkit [232691] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.20/Source/WebCore

Merge r232066 - [GTK] WebDriver: Network process crash when running imported/w3c/webdriver/tests/delete_cookie/delete.py::test_unknown_cookie
https://bugs.webkit.org/show_bug.cgi?id=185867

Reviewed by Michael Catanzaro.

We need to null check the value returned by URL::createSoupURI() before passing it to soup.

  • platform/network/soup/CookieJarSoup.cpp:

(WebCore::setCookiesFromDOM):
(WebCore::cookiesForSession):
(WebCore::getRawCookies):
(WebCore::deleteCookie):

  • platform/network/soup/NetworkStorageSessionSoup.cpp:

(WebCore::NetworkStorageSession::getCookies):

2:53 AM Changeset in webkit [232690] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.20/Tools

Merge r232009 - [GTK] MiniBrowser crashes when loading twice quickly
https://bugs.webkit.org/show_bug.cgi?id=185763

Reviewed by Michael Catanzaro.

This is very difficult to reproduce manually, but it happens when running WebDriver tests where loads are very
fast and multiple loads are done quickly. The problem is that we use an idle to reset the progress bar, but we
don't reset it when a new load starts. We always reset the last idle on destroy, but if there's another one
leaked, it will crash when scheduled if the window has already been destroyed.

  • MiniBrowser/gtk/BrowserWindow.c:

(webViewLoadProgressChanged): Stop any pending reset task when progress != 1.

2:53 AM Changeset in webkit [232689] by Carlos Garcia Campos
  • 4 edits
    4 adds in releases/WebKitGTK/webkit-2.20

Merge r232584 - Handle Storage Access API calls in the absence of an attached frame
https://bugs.webkit.org/show_bug.cgi?id=186373
<rdar://problem/40028265>

Reviewed by Daniel Bates.

Source/WebCore:

Tests: http/tests/storageAccess/has-storage-access-crash.html

http/tests/storageAccess/request-storage-access-crash.html

The new frame-specific storage access checks were done without confirming a
frame was present, although the frame state was validated in other parts of
the same method.

This patch checks for a non-null frame before making frame-specific calls.

  • dom/Document.cpp:

(WebCore::Document::hasStorageAccess):
(WebCore::Document::requestStorageAccess):

LayoutTests:

  • http/tests/storageAccess/has-storage-access-crash-expected.txt: Added.
  • http/tests/storageAccess/has-storage-access-crash.html: Added.
  • http/tests/storageAccess/request-storage-access-crash-expected.txt: Added.
  • http/tests/storageAccess/request-storage-access-crash.html: Added.
  • platform/mac-wk2/TestExpectations: Add the two new tests for HighSierra+
2:41 AM Changeset in webkit [232688] by graouts@webkit.org
  • 2 edits in trunk/LayoutTests

[Web Animations] Make imported/mozilla/css-animations/test_animation-reverse.html pass reliably
https://bugs.webkit.org/show_bug.cgi?id=183832

Unreviewed.

This test is now passing.

2:37 AM Changeset in webkit [232687] by graouts@webkit.org
  • 2 edits in trunk/LayoutTests

[Web Animations] Make imported/mozilla/css-transitions/test_animation-pausing.html pass reliably
https://bugs.webkit.org/show_bug.cgi?id=183829

Unreviewed.

This test is now passing.

2:34 AM Changeset in webkit [232686] by graouts@webkit.org
  • 2 edits in trunk/LayoutTests

[Web Animations] Make imported/mozilla/css-transitions/test_animation-finished.html pass reliably
https://bugs.webkit.org/show_bug.cgi?id=183827

Unreviewed.

This test is now passing.

2:32 AM Changeset in webkit [232685] by graouts@webkit.org
  • 4 edits in trunk/LayoutTests

[Web Animations] Make imported/mozilla/css-transitions/test_animation-currenttime.html pass reliably
https://bugs.webkit.org/show_bug.cgi?id=183825

Unreviewed.

This test is now passing.

LayoutTests/imported/mozilla:

  • css-transitions/test_animation-currenttime-expected.txt:

LayoutTests:

2:29 AM Changeset in webkit [232684] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.20/Source/WebKit

Unreviewed. Remove PRIVATE keyword added in r232676.

  • CMakeLists.txt:
2:29 AM Changeset in webkit [232683] by Carlos Garcia Campos
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.20

Merge r232663 - REGRESSION (r230480): Cannot adjust photo position on LinkedIn's profile page
https://bugs.webkit.org/show_bug.cgi?id=186464
<rdar://problem/40369448>

Reviewed by Simon Fraser.

Source/WebCore:

The optimization logic for skipping image layout when we only need overflow computation should check if the image actually needs
simplified layout only. The needsSimplifiedNormalFlowLayout() flag means that the overflow information needs to be updated but
it does not mean that overflow is the only property that we need to recompute.

Test: fast/images/positioned-image-when-transform-is-present.html

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::layout):

  • rendering/RenderObject.h:

(WebCore::RenderObject::needsSimplifiedNormalFlowLayoutOnly const):

LayoutTests:

  • fast/images/positioned-image-when-transform-is-present-expected.html: Added.
  • fast/images/positioned-image-when-transform-is-present.html: Added.
2:28 AM Changeset in webkit [232682] by graouts@webkit.org
  • 2 edits in trunk/LayoutTests

[Web Animations] Make imported/mozilla/css-animations/test_animation-id.html pass reliably
https://bugs.webkit.org/show_bug.cgi?id=183824

Unreviewed.

This test has been passing reliably on the bots.

2:26 AM Changeset in webkit [232681] by graouts@webkit.org
  • 4 edits in trunk/LayoutTests

[Web Animations] Make imported/mozilla/css-transitions/test_animation-computed-timing.html pass reliably
https://bugs.webkit.org/show_bug.cgi?id=183823

Unreviewed.

This test is now passing.

LayoutTests/imported/mozilla:

  • css-transitions/test_animation-computed-timing-expected.txt:

LayoutTests:

2:22 AM Changeset in webkit [232680] by graouts@webkit.org
  • 2 edits in trunk/LayoutTests

[Web Animations] Make imported/mozilla/css-animations/test_animation-finished.html pass reliably
https://bugs.webkit.org/show_bug.cgi?id=183822

Unreviewed.

This test has been passing reliably on the bots.

2:20 AM WebKitGTK/2.20.x edited by Carlos Garcia Campos
(diff)
2:19 AM Changeset in webkit [232679] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.20

Merge r232667 - [WPE][GTK] paypal.com requires user agent quirk
https://bugs.webkit.org/show_bug.cgi?id=186466

Reviewed by Carlos Garcia Campos.

Source/WebCore:

  • platform/UserAgentQuirks.cpp:

(WebCore::urlRequiresMacintoshPlatform):

Tools:

  • TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:

(TestWebKitAPI::TEST):

2:19 AM Changeset in webkit [232678] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.20/Source/WebCore

Merge r232618 - [GTK][WPE] Wrong result when calling ImageBufferCairo's getImageData()
https://bugs.webkit.org/show_bug.cgi?id=186384

Reviewed by Michael Catanzaro.

Fix calculations so the result is the expected one.

  • platform/graphics/cairo/ImageBufferCairo.cpp:

(WebCore::getImageData):

2:19 AM Changeset in webkit [232677] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.20/Source/WebKit

Merge r232397 - [GTK] Crash in WebKitFaviconDatabase when pageURL is unset
https://bugs.webkit.org/show_bug.cgi?id=186164

Reviewed by Carlos Garcia Campos.

PageURL can legitimately be null here if JavaScript does something silly with window.open.

  • UIProcess/API/glib/WebKitFaviconDatabase.cpp:

(webkitFaviconDatabaseSetIconURLForPageURL):
(webkitFaviconDatabaseSetIconForPageURL):

2:03 AM Changeset in webkit [232676] by Carlos Garcia Campos
  • 6 edits in releases/WebKitGTK/webkit-2.20

Merge r232067 - [CMake] Properly detect compiler flags, needed libs, and fallbacks for usage of 64-bit atomic operations
https://bugs.webkit.org/show_bug.cgi?id=182622
<rdar://problem/40292317>

Reviewed by Michael Catanzaro.

.:

  • Source/cmake/WebKitCompilerFlags.cmake:

Move the test to detect whether we need to link against libatomic
to a common CMake file so it can be used from both JavaScriptCore
and WebKit.

Source/JavaScriptCore:

We were linking JavaScriptCore against libatomic in MIPS because
in that architecture atomic_fetch_add_8() is not a compiler
intrinsic and is provided by that library instead. However other
architectures (e.g armel) are in the same situation, so we need a
generic test.

That test already exists in WebKit/CMakeLists.txt, so we just have
to move it to a common file (WebKitCompilerFlags.cmake) and use
its result (ATOMIC_INT64_REQUIRES_LIBATOMIC) here.

  • CMakeLists.txt:

Source/WebKit:

Move the test to determine whether we need to link against
libatomic to the common file WebKitCompilerFlags.cmake so it can
also be used for JavaScriptCore.

  • CMakeLists.txt:
2:03 AM Changeset in webkit [232675] by Carlos Garcia Campos
  • 9 edits in releases/WebKitGTK/webkit-2.20

Merge r232062 - Unreviewed, rolling out r231843.

Broke cross build

Reverted changeset:

"[CMake] Properly detect compiler flags, needed libs, and
fallbacks for usage of 64-bit atomic operations"
https://bugs.webkit.org/show_bug.cgi?id=182622
https://trac.webkit.org/changeset/231843

2:03 AM Changeset in webkit [232674] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.20/Source/bmalloc

Merge r232059 - Define GIGACAGE_ALLOCATION_CAN_FAIL on Linux
https://bugs.webkit.org/show_bug.cgi?id=183329

Reviewed by Michael Catanzaro.

We specify GIGACAGE_ALLOCATION_CAN_FAIL 1 in Linux since
Linux can fail to mmap if vm.overcommit_memory = 2.
Users can enable Gigacage if users enable overcommit_memory.

  • bmalloc/Gigacage.h:
2:03 AM Changeset in webkit [232673] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.20

Merge r231631 - [GTK] gtk-doc installation subdir duplicated
https://bugs.webkit.org/show_bug.cgi?id=185468

Patch by Jan Alexander Steffens <jan.steffens@gmail.com> on 2018-05-09
Reviewed by Carlos Garcia Campos.

The GTK docs are installed into a duplicated subdir,
e.g. /usr/share/doc/gtk-doc/html/webkit2gtk-4.0/webkit2gtk-4.0.

  • Source/PlatformGTK.cmake:
1:13 AM Changeset in webkit [232672] by Carlos Garcia Campos
  • 5 edits in trunk/Tools

Unreviewed. Fix WPE API and layout tests after r232670.

Now that dyz is not installed, there's not -default.so symlink for the WPE backend, so we need to use
WPE_BACKEND_LIBRARY environment variable to ensure tests are run with fdo backend.

  • Scripts/run-wpe-tests:

(WPETestRunner.init):
(WPETestRunner):
(WPETestRunner.setup_testing_environment):

  • Scripts/webkitpy/port/wpe.py:

(WPEPort.setup_environ_for_server):

  • glib/api_test_runner.py:

(TestRunner.setup_testing_environment):
(TestRunner.run_tests):
(TestRunner._setup_testing_environment): Deleted.

12:26 AM Changeset in webkit [232671] by Carlos Garcia Campos
  • 23 edits in trunk

[GTK][WPE] Add API run run javascript from a WebKitWebView in an isolated world
https://bugs.webkit.org/show_bug.cgi?id=186192

Reviewed by Michael Catanzaro.

Source/WebCore:

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::executeScriptInWorld): Add ExceptionDetails parameter.

  • bindings/js/ScriptController.h:

Source/WebKit:

Add webkit_web_view_run_javascript_in_world() that receives a world name. Also add
webkit_script_world_new_with_name() to create an isolated world with a name and webkit_script_world_get_name()
to get the name of a WebKitScriptWorld.

  • UIProcess/API/glib/WebKitWebView.cpp:

(webkit_web_view_run_javascript):
(webkit_web_view_run_javascript_finish):
(webkit_web_view_run_javascript_in_world):
(webkit_web_view_run_javascript_in_world_finish):

  • UIProcess/API/gtk/WebKitWebView.h:
  • UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add new symbols.
  • UIProcess/API/wpe/WebKitWebView.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::runJavaScriptInMainFrameScriptWorld): Send RunJavaScriptInMainFrameScriptWorld message to
the WebProcess.

  • UIProcess/WebPageProxy.h:
  • WebProcess/InjectedBundle/API/glib/WebKitScriptWorld.cpp:

(webkitScriptWorldCreate):
(webkit_script_world_new_with_name):
(webkit_script_world_get_name):

  • WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.h:
  • WebProcess/InjectedBundle/API/wpe/WebKitScriptWorld.h:
  • WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:

(WebKit::InjectedBundleScriptWorld::find): Find an InjectedBundleScriptWorld by its name.

  • WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::runJavaScriptInMainFrameScriptWorld): Find the InjectedBundleScriptWorld for the given name
and run the script in its js context.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in: Add RunJavaScriptInMainFrameScriptWorld message.

Tools:

Add tests cases for the new API.

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:

(testWebViewRunJavaScript):

  • TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp:

(methodCallCallback):
(webkit_web_extension_initialize_with_user_data):

  • TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp:

(runJavaScriptInWorldReadyCallback):
(WebViewTest::runJavaScriptFromGResourceAndWaitUntilFinished):
(WebViewTest::runJavaScriptInWorldAndWaitUntilFinished):

  • TestWebKitAPI/glib/WebKitGLib/WebViewTest.h:

Jun 10, 2018:

11:43 PM Changeset in webkit [232670] by Carlos Garcia Campos
  • 20 edits
    2 copies
    10 adds
    1 delete in trunk

[WPE] Add a MiniBrowser and use it to run WebDriver tests
https://bugs.webkit.org/show_bug.cgi?id=186345

Reviewed by Žan Doberšek.

.:

Add an option to enable building the MiniBrowser.

  • Source/cmake/FindWaylandProtocols.cmake: Added.
  • Source/cmake/OptionsWPE.cmake:

Source/WebDriver:

Use MiniBrowser instead of dyz as the default WebDriver browser for WPE.

  • wpe/WebDriverServiceWPE.cpp:

(WebDriver::WebDriverService::platformParseCapabilities const):

Tools:

Most of the code is based on dyz and gtk MiniBrowser. This patch adds a new internal library WPEToolingBackends,
including the headless view backend and a new window backend to be used by the MiniBrowser. MiniBrowser can also
run in headless mode, by using the headless backend instead of the window one, which will allow us to run the
WebDriver tests in the bots.

  • CMakeLists.txt:
  • MiniBrowser/wpe/CMakeLists.txt: Added.
  • MiniBrowser/wpe/main.cpp: Added.

(automationStartedCallback):
(createViewBackend):
(main):

  • Scripts/run-minibrowser: Remove WPE specific code.
  • Scripts/run-webdriver-tests: Add headless display-server option.
  • Scripts/webkitdirs.pm:

(launcherName): Remove WPE specific code.

  • Scripts/webkitpy/webdriver_tests/webdriver_driver_wpe.py:

(WebDriverWPE.browser_name): Return MiniBrowser.
(WebDriverWPE.browser_path): Return the path to the MiniBrowser in build dir.
(WebDriverWPE.browser_args): Add --headless when running in headless mode.
(WebDriverWPE.capabilities): Use the full browser path.

  • Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py:

(WebDriverTestRunnerSelenium.collect_tests): Fix early return value.

  • TestWebKitAPI/PlatformWPE.cmake: Use WPEToolingBackends instead of HeadlessViewBackend.
  • TestWebKitAPI/PlatformWebView.h: Ditto.
  • TestWebKitAPI/glib/PlatformWPE.cmake: Ditto
  • TestWebKitAPI/glib/WebKitGLib/TestMain.h:

(Test::createWebViewBackend): Ditto.

  • TestWebKitAPI/wpe/PlatformWebViewWPE.cpp:

(TestWebKitAPI::PlatformWebView::initialize): Ditto.

  • WebKitTestRunner/PlatformWPE.cmake: Ditto.
  • WebKitTestRunner/PlatformWebView.h: Ditto.
  • WebKitTestRunner/wpe/PlatformWebViewWPE.cpp:

(WTR::PlatformWebView::PlatformWebView): Ditto.

  • wpe/HeadlessViewBackend/CMakeLists.txt: Removed.
  • wpe/backends/CMakeLists.txt: Added.
  • wpe/backends/HeadlessViewBackend.cpp: Renamed from Tools/wpe/HeadlessViewBackend/HeadlessViewBackend.cpp.

(WPEToolingBackends::getEGLDisplay):
(WPEToolingBackends::HeadlessViewBackend::HeadlessViewBackend):
(WPEToolingBackends::HeadlessViewBackend::~HeadlessViewBackend):
(WPEToolingBackends::HeadlessViewBackend::createSnapshot):
(WPEToolingBackends::HeadlessViewBackend::performUpdate):
(WPEToolingBackends::HeadlessViewBackend::displayBuffer):

  • wpe/backends/HeadlessViewBackend.h: Renamed from Tools/wpe/HeadlessViewBackend/HeadlessViewBackend.h.
  • wpe/backends/ViewBackend.cpp: Added.

(WPEToolingBackends::ViewBackend::ViewBackend):
(WPEToolingBackends::ViewBackend::~ViewBackend):
(WPEToolingBackends::ViewBackend::initialize):
(WPEToolingBackends::ViewBackend::setInputClient):
(WPEToolingBackends::ViewBackend::backend const):
(WPEToolingBackends::ViewBackend::dispatchInputPointerEvent):
(WPEToolingBackends::ViewBackend::dispatchInputAxisEvent):
(WPEToolingBackends::ViewBackend::dispatchInputKeyboardEvent):

  • wpe/backends/ViewBackend.h: Added.
  • wpe/backends/WindowViewBackend.cpp: Added.

(WPEToolingBackends::WindowViewBackend::WindowViewBackend):
(WPEToolingBackends::WindowViewBackend::~WindowViewBackend):
(WPEToolingBackends::WindowViewBackend::displayBuffer):
(WPEToolingBackends::WindowViewBackend::handleKeyEvent):

  • wpe/backends/WindowViewBackend.h: Added.
  • wpe/jhbuild.modules: Remove dyz and add wayland-protocols.
7:44 PM Changeset in webkit [232669] by Fujii Hironori
  • 17 edits
    2 moves in trunk/Tools

[Win][MiniBrowser] MiniBrowser class should be renamed to WebKitLegacyBrowserWindow
https://bugs.webkit.org/show_bug.cgi?id=186427

Reviewed by Ryosuke Niwa.

  • MiniBrowser/win/AccessibilityDelegate.cpp:
  • MiniBrowser/win/AccessibilityDelegate.h:

(AccessibilityDelegate::AccessibilityDelegate):

  • MiniBrowser/win/CMakeLists.txt: Removed MiniBrowser.cpp. Added WebKitLegacyBrowserWindow.cpp.
  • MiniBrowser/win/Common.h:
  • MiniBrowser/win/MainWindow.cpp:

(MainWindow::init):

  • MiniBrowser/win/MainWindow.h:
  • MiniBrowser/win/MiniBrowserWebHost.cpp:
  • MiniBrowser/win/MiniBrowserWebHost.h:

(MiniBrowserWebHost::MiniBrowserWebHost):

  • MiniBrowser/win/PageLoadTestClient.cpp:

(PageLoadTestClient::PageLoadTestClient):

  • MiniBrowser/win/PageLoadTestClient.h:
  • MiniBrowser/win/PrintWebUIDelegate.cpp:

(PrintWebUIDelegate::createWebViewWithRequest):

  • MiniBrowser/win/PrintWebUIDelegate.h:

(PrintWebUIDelegate::PrintWebUIDelegate):

  • MiniBrowser/win/ResourceLoadDelegate.cpp:
  • MiniBrowser/win/ResourceLoadDelegate.h:

(ResourceLoadDelegate::ResourceLoadDelegate):

  • MiniBrowser/win/WebKitLegacyBrowserWindow.cpp: Renamed from Tools/MiniBrowser/win/MiniBrowser.cpp.
  • MiniBrowser/win/WebKitLegacyBrowserWindow.h: Renamed from Tools/MiniBrowser/win/MiniBrowser.h.
  • MiniBrowser/win/WebDownloadDelegate.cpp:

(WebDownloadDelegate::WebDownloadDelegate):

  • MiniBrowser/win/WebDownloadDelegate.h:
3:39 PM Changeset in webkit [232668] by Chris Dumez
  • 12 edits in trunk

Reload the Web view in case of crash if the client does not implement webViewWebContentProcessDidTerminate delegate
https://bugs.webkit.org/show_bug.cgi?id=186468

Reviewed by Geoffrey Garen.

Source/WebKit:

We now attempt to reload the Web view if the web content process crashes and the client
does not implement the webViewWebContentProcessDidTerminate delegate (or any of the similar
delegates in our SPI).

  • UIProcess/API/APILoaderClient.h:

(API::LoaderClient::processDidCrash):

  • UIProcess/API/APINavigationClient.h:

(API::NavigationClient::processDidTerminate):

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPageLoaderClient):
(WKPageSetPageNavigationClient):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/glib/WebKitNavigationClient.cpp:
  • UIProcess/Cocoa/NavigationState.h:
  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::NavigationClient::processDidTerminate):

  • UIProcess/WebPageProxy.cpp:

(WebKit::m_resetRecentCrashCountTimer):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::shouldReloadAfterProcessTermination):
(WebKit::WebPageProxy::dispatchProcessDidTerminate):
(WebKit::WebPageProxy::tryReloadAfterProcessTermination):
(WebKit::WebPageProxy::resetRecentCrashCountSoon):
(WebKit::WebPageProxy::resetRecentCrashCount):
(WebKit::m_configurationPreferenceValues): Deleted.

  • UIProcess/WebPageProxy.h:

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm:

(-[BasicNavigationDelegateWithoutCrashHandler webView:didStartProvisionalNavigation:]):
(-[BasicNavigationDelegateWithoutCrashHandler webView:didFinishNavigation:]):
(TEST):

9:12 AM WebKitGTK/2.20.x edited by Michael Catanzaro
(diff)
2:23 AM Changeset in webkit [232667] by Michael Catanzaro
  • 4 edits in trunk

[WPE][GTK] paypal.com requires user agent quirk
https://bugs.webkit.org/show_bug.cgi?id=186466

Reviewed by Carlos Garcia Campos.

Source/WebCore:

  • platform/UserAgentQuirks.cpp:

(WebCore::urlRequiresMacintoshPlatform):

Tools:

  • TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:

(TestWebKitAPI::TEST):

12:36 AM Changeset in webkit [232666] by Yusuke Suzuki
  • 6 edits
    1 delete in trunk

[JSC] Array.prototype.sort should rejects null comparator
https://bugs.webkit.org/show_bug.cgi?id=186458

Reviewed by Keith Miller.

JSTests:

  • ChakraCore/test/Array/array_sort.baseline-jsc:
  • stress/array-sort-bad-comparator.js:

(test):

  • stress/sort-null-comparator.js: Removed.
  • test262/expectations.yaml:

Source/JavaScriptCore:

This relaxed behavior is once introduced in r216169 to fix some pages by aligning
the behavior to Chrome and Firefox.

However, now Chrome, Firefox and Edge reject a null comparator. So only JavaScriptCore
accepts it. This patch reverts r216169 to align JSC to the other engines and fix
the spec issue.

  • builtins/ArrayPrototype.js:

(sort):

Note: See TracTimeline for information about the timeline view.