Timeline



Jul 11, 2018:

10:56 PM Changeset in webkit [233763] by Carlos Garcia Campos
  • 9 edits in trunk

[WPE] Pass the backend library name as command line parameter to the web process
https://bugs.webkit.org/show_bug.cgi?id=186841

Reviewed by Žan Doberšek.

Source/WebKit:

  • UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:

(WebKit::ProcessLauncher::launchProcess): Add --backend-library parameter when launching the web process.

  • WebProcess/wpe/WebProcessMainWPE.cpp: Call wpe_loader_init() with the library passed as --backend-library parameter.

Tools:

  • MiniBrowser/wpe/main.cpp:

(main): Stop using WPE_BACKEND_LIBRARY env var.

  • Scripts/run-wpe-tests:

(WPETestRunner.init): Ditto.

  • Scripts/webkitpy/port/wpe.py:

(WPEPort.setup_environ_for_server): Ditto.

  • wpe/backends/ViewBackend.cpp:

(WPEToolingBackends::ViewBackend::ViewBackend): Call wpe_loader_init() to ensure WPEBackend-fdo is used.

  • wpe/jhbuild.modules: Upgrade WPEBackend to version 0.2.0.
10:40 PM Changeset in webkit [233762] by commit-queue@webkit.org
  • 4 edits in trunk/Source/JavaScriptCore

Unreviewed, rolling out r233714.
https://bugs.webkit.org/show_bug.cgi?id=187579

it made tests time out (Requested by pizlo on #webkit).

Reverted changeset:

"Change the reoptimization backoff base to 1.3 from 2"
https://bugs.webkit.org/show_bug.cgi?id=187540
https://trac.webkit.org/changeset/233714

10:27 PM Changeset in webkit [233761] by youenn@apple.com
  • 3 edits
    2 adds in trunk

MediaDevices should derive from EventTarget in its IDL
https://bugs.webkit.org/show_bug.cgi?id=187575

Reviewed by Chris Dumez.

Source/WebCore:

Test: fast/mediastream/MediaDevices-addEventListener.html

  • Modules/mediastream/MediaDevices.idl:

LayoutTests:

  • fast/mediastream/MediaDevices-addEventListener-expected.txt: Added.
  • fast/mediastream/MediaDevices-addEventListener.html: Added.
10:18 PM Changeset in webkit [233760] by Carlos Garcia Campos
  • 10 edits in trunk

[GLIB] Add API to allow creating variadic functions
https://bugs.webkit.org/show_bug.cgi?id=187517

Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

Add a _variadic alternate method for jsc_class_add_constructor, jsc_class_add_method and
jsc_value_new_function. In that case the callback always receives a GPtrArray of JSCValue.

  • API/glib/JSCCallbackFunction.cpp:

(JSC::JSCCallbackFunction::create): Make the parameters optional.
(JSC::JSCCallbackFunction::JSCCallbackFunction): Ditto.
(JSC::JSCCallbackFunction::call): Handle the case of parameters being nullopt by creating a GPtrArray of
JSCValue for the arguments.
(JSC::JSCCallbackFunction::construct): Ditto.

  • API/glib/JSCCallbackFunction.h:
  • API/glib/JSCClass.cpp:

(jscClassCreateConstructor): Make the parameters optional.
(jsc_class_add_constructor_variadic): Pass nullopt as parameters to jscClassCreateConstructor.
(jscClassAddMethod): Make the parameters optional.
(jsc_class_add_method_variadic): Pass nullopt as parameters to jscClassAddMethod.

  • API/glib/JSCClass.h:
  • API/glib/JSCValue.cpp:

(jsc_value_object_define_property_accessor): Update now that parameters are optional.
(jscValueFunctionCreate): Make the parameters optional.
(jsc_value_new_function_variadic): Pass nullopt as parameters to jscValueFunctionCreate.

  • API/glib/JSCValue.h:
  • API/glib/docs/jsc-glib-4.0-sections.txt:

Tools:

Add test cases.

  • TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:

(testJSCFunction):
(fooCreateWithFooV):
(multiplyFooV):

10:13 PM Changeset in webkit [233759] by Carlos Garcia Campos
  • 6 edits in trunk

[GLIB] Add jsc_context_get_global_object() to GLib API
https://bugs.webkit.org/show_bug.cgi?id=187515

Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

This wasn't exposed because we have convenient methods in JSCContext to get and set properties on the global
object. However, getting the global object could be useful in some cases, for example to give it a well known
name like 'window' in browsers and GJS.

  • API/glib/JSCContext.cpp:

(jsc_context_get_global_object):

  • API/glib/JSCContext.h:
  • API/glib/docs/jsc-glib-4.0-sections.txt:

Tools:

Add test cases.

  • TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:

(testJSCGlobalObject):
(main):

10:11 PM Changeset in webkit [233758] by Carlos Garcia Campos
  • 7 edits in trunk

[GLIB] Handle G_TYPE_STRV in glib API
https://bugs.webkit.org/show_bug.cgi?id=187512

Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

Add jsc_value_new_array_from_strv() and handle G_TYPE_STRV types in function parameters.

  • API/glib/JSCContext.cpp:

(jscContextGValueToJSValue):
(jscContextJSValueToGValue):

  • API/glib/JSCValue.cpp:

(jsc_value_new_array_from_strv):

  • API/glib/JSCValue.h:
  • API/glib/docs/jsc-glib-4.0-sections.txt:

Tools:

Add test cases.

  • TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:

(testJSCTypes):
(joinFunction):
(testJSCFunction):

9:08 PM Changeset in webkit [233757] by aakash_jain@apple.com
  • 4 edits in trunk/Tools

[ews-build] EWS should unapply patch and re-run jsc tests when patch fails jsc tests
https://bugs.webkit.org/show_bug.cgi?id=187549

Reviewed by Alexey Proskuryakov.

  • BuildSlaveSupport/ews-build/factories.py:

(JSCTestsFactory.init):

  • BuildSlaveSupport/ews-build/steps.py:

(CompileJSCOnlyToT): Build ToT without patch.
(CompileJSCOnlyToT.doStepIf): Run this step only if patch failed to build.
(RunJavaScriptCoreTests.evaluateCommand): Set patchFailedJSCTests property appropriately.
(ReRunJavaScriptCoreTests): Re-runs JSC tests.
(ReRunJavaScriptCoreTests.doStepIf): Run this step only if patch failed JSC tests.
(ReRunJavaScriptCoreTests.evaluateCommand): Set patchFailedJSCTests property appropriately.
(RunJavaScriptCoreTestsToT): Run JSC tests on ToT without patch.
(RunJavaScriptCoreTestsToT.doStepIf): Run this step only if patch failed JSC tests.

  • BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
9:06 PM Changeset in webkit [233756] by jonlee@apple.com
  • 4 edits in trunk/Source

Update iOS fullscreen alert text
https://bugs.webkit.org/show_bug.cgi?id=187576
rdar://problem/42052284

Reviewed by Ryosuke Niwa.

Source/WebCore:

  • English.lproj/Localizable.strings:

Source/WebKit:

  • UIProcess/ios/fullscreen/WKFullScreenViewController.mm:

(-[WKFullScreenViewController _showPhishingAlert]): Update text and string keys.

8:37 PM Changeset in webkit [233755] by commit-queue@webkit.org
  • 6 edits in trunk

Unreviewed, rolling out r233742.
https://bugs.webkit.org/show_bug.cgi?id=187577

Binary incompatible change with respect to Service Worker
registration map (Requested by dydz on #webkit).

Reverted changeset:

"Reduce size of WebCore::URL"
https://bugs.webkit.org/show_bug.cgi?id=186820
https://trac.webkit.org/changeset/233742

8:36 PM Changeset in webkit [233754] by rniwa@webkit.org
  • 3 edits in trunk/LayoutTests

Layout Test editing/selection/navigation-clears-editor-state.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=187389

Reviewed by Wenson Hsieh.

Use 200 iterations like we did before r233701 and mark it as SLOW.

7:57 PM Changeset in webkit [233753] by rniwa@webkit.org
  • 22 edits
    2 adds in trunk

REGRESSION (231276): Attempting to copy an image fails
https://bugs.webkit.org/show_bug.cgi?id=187212
Source/WebCore:

<rdar://problem/41540074>

Patch by Aditya Keerthi <Aditya Keerthi> on 2018-07-11
Reviewed by Ryosuke Niwa.

Renamed methods to make it clear that one URL and one title are being passed in.

Test: editing/mac/pasteboard/can-copy-url-without-title.html

  • platform/PasteboardStrategy.h:
  • platform/PlatformPasteboard.h:
  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::setURL):

  • platform/mac/PasteboardMac.mm:

(WebCore::writeURLForTypes):
(WebCore::Pasteboard::writeTrustworthyWebURLsPboardType):

  • platform/mac/PlatformPasteboardMac.mm:

(WebCore::PlatformPasteboard::setURL):

Source/WebKit:

<rdar://problem/41540074>

Patch by Aditya Keerthi <Aditya Keerthi> on 2018-07-11
Reviewed by Ryosuke Niwa.

r210683 introduced logic to prevent file URLs from being copied to the clipboard
in unexpected cases. In order to achieve this functionality,
checkURLReceivedFromWebProcess was called on all items in the pathnames array
passed into WebPasteboardProxy::setPasteboardPathnamesForType. However, this
method is a misnomer, as the pathnames array always contains exactly one URL and
one title for the URL.

Renamed methods to make it clear that one URL and one title are being passed in
and updated logic to ensure that checkURLReceivedFromWebProcess is only called
on the URL and not the title.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<PasteboardURL>::encode):
(IPC::ArgumentCoder<PasteboardURL>::decode):

  • Shared/WebCoreArgumentCoders.h:
  • UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:

(WebKit::WebPasteboardProxy::setPasteboardURL):

  • UIProcess/WebPasteboardProxy.h:
  • UIProcess/WebPasteboardProxy.messages.in:
  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:

(WebKit::WebPlatformStrategies::setURL):

  • WebProcess/WebCoreSupport/WebPlatformStrategies.h:

Source/WebKitLegacy/mac:

<rdar://problem/41540074>

Patch by Aditya Keerthi <Aditya Keerthi> on 2018-07-11
Reviewed by Ryosuke Niwa.

Renamed methods to make it clear that one URL and one title are being passed in.

  • WebCoreSupport/WebPlatformStrategies.h:
  • WebCoreSupport/WebPlatformStrategies.mm:

(WebPlatformStrategies::setURL):

Tools:

Patch by Aditya Keerthi <Aditya Keerthi> on 2018-07-11
Reviewed by Ryosuke Niwa.
<rdar://problem/41540074>

Augmented test to include a URL where the lastPathComponent looks similar to a
file URL.

  • TestWebKitAPI/Tests/mac/ContextMenuCanCopyURL.html:
  • TestWebKitAPI/Tests/mac/ContextMenuCanCopyURL.mm:

(TestWebKitAPI::TEST):

LayoutTests:

<rdar://problem/41540074>

Patch by Aditya Keerthi <Aditya Keerthi> on 2018-07-11
Reviewed by Ryosuke Niwa.

Added test to ensure that we can copy a URL without a title, and the URL's
lastPathComponent appears like a file URL.

  • editing/mac/pasteboard/can-copy-url-without-title-expected.txt: Added.
  • editing/mac/pasteboard/can-copy-url-without-title.html: Added.
  • platform/mac-wk1/TestExpectations: The added test is WK2-only due to webkit.org/b/187230.
7:32 PM Changeset in webkit [233752] by commit-queue@webkit.org
  • 19 edits
    1 add in trunk

Add SPI for immediate injection of user scripts
https://bugs.webkit.org/show_bug.cgi?id=173342
<rdar://problem/29202285>

Patch by Alex Christensen <achristensen@webkit.org> on 2018-07-11
Reviewed by Brady Eidson, Youenn Fablet, and Geoff Garen.

Source/WebCore:

The new SPI is WKUserContentController._addUserScriptImmediately.
It is covered by new API tests.
Existing functionality remains unchanged unless the new SPI is adopted.

  • page/Frame.cpp:

(WebCore::Frame::injectUserScripts):
(WebCore::Frame::injectUserScriptImmediately):
Move injection functionality to allow us to call it directly from the new SPI.

  • page/Frame.h:
  • page/Page.cpp:

(WebCore::Page::forEachPage):

  • page/Page.h:

Source/WebKit:

  • UIProcess/API/C/WKPageGroup.cpp:

(WKPageGroupAddUserScript):

  • UIProcess/API/C/WKUserContentControllerRef.cpp:

(WKUserContentControllerAddUserScript):

  • UIProcess/API/Cocoa/WKUserContentController.mm:

(-[WKUserContentController addUserScript:]):
(-[WKUserContentController _addUserScriptImmediately:]):

  • UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
  • UIProcess/UserContent/WebUserContentControllerProxy.cpp:

(WebKit::WebUserContentControllerProxy::addUserScript):

  • UIProcess/UserContent/WebUserContentControllerProxy.h:
  • WebProcess/UserContent/WebUserContentController.cpp:

(WebKit::WebUserContentController::addUserScripts):
(WebKit::WebUserContentController::addUserScriptInternal):
If we are to inject the script internally, inject it into the appropriate pages.
If we're injecting into the top frame only, there's no need to traverse the frame tree.
(WebKit::WebUserContentController::addUserScript):

  • WebProcess/UserContent/WebUserContentController.h:
  • WebProcess/UserContent/WebUserContentController.messages.in:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_cpuLimit):

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/UserContentController.mm:

(waitForMessage):
(TEST):

7:09 PM Changeset in webkit [233751] by Simon Fraser
  • 6 edits in trunk/Source/WebKit

[iOS WK2] Address a possible cause of missing tiles
https://bugs.webkit.org/show_bug.cgi?id=187570
rdar://problem/40941118

Reviewed by Tim Horton.

If the web process crashes, it's possible for the user to trigger a scroll before
the process is re-launched. The pre-commit handler will bail early on the _isValid
check without clearing _hasScheduledVisibleRectUpdate, so that remains YES and we
get stuck doing no more visible content rect updates.

Fix by adding -[WKWebView _didRelaunchProcess] (WKContentView got this already), and
in that clear state that could have been set in the UI process while the web process
connection was invalid.

Also add more release logging around process termination, crash and relaunch.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _processDidExit]):
(-[WKWebView _didRelaunchProcess]):
(-[WKWebView _scheduleVisibleContentRectUpdateAfterScrollInView:]):
(-[WKWebView _updateVisibleContentRects]):

  • UIProcess/API/Cocoa/WKWebViewInternal.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::reattachToWebProcess):
(WebKit::WebPageProxy::processDidTerminate):

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::didClose):
(WebKit::WebProcessProxy::didFinishLaunching):

  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::didRelaunchProcess):

6:35 PM Changeset in webkit [233750] by mmaxfield@apple.com
  • 1 edit
    1 delete in trunk/Tools

Move WHLSL spec work to the W3C GPUWeb GitHub repository

See https://github.com/gpuweb/WHLSL

  • WebGPUShadingLanguageRI/SpecWork/Makefile: Removed.
  • WebGPUShadingLanguageRI/SpecWork/WSL.g4: Removed.
  • WebGPUShadingLanguageRI/SpecWork/WSL.ott: Removed.
  • WebGPUShadingLanguageRI/SpecWork/source/conf.py: Removed.
  • WebGPUShadingLanguageRI/SpecWork/source/index.rst: Removed.
5:52 PM Changeset in webkit [233749] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

Release logging dumps "Cleaning up dragging state…" every time gesture recognizers are reset in WKContentView
https://bugs.webkit.org/show_bug.cgi?id=187562

Reviewed by Tim Horton.

Tweaks up a release logging statement, such that it only logs when performing a drag or drop.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView cleanUpDragSourceSessionState]):

5:44 PM Changeset in webkit [233748] by dino@apple.com
  • 2 edits in trunk/Tools

Force WKTR to use the light appearance
https://bugs.webkit.org/show_bug.cgi?id=187572
<rdar://problem/42097805>

Reviewed by Simon Fraser.

Set the NSAppearance on the NSWindow to light mode.

  • WebKitTestRunner/mac/PlatformWebViewMac.mm:

(WTR::PlatformWebView::PlatformWebView): Use the Aqua appearance.

5:18 PM Changeset in webkit [233747] by Ross Kirsling
  • 2 edits in trunk/LayoutTests

[WinCairo] Unreviewed test gardening.

  • platform/wincairo/TestExpectations:
5:08 PM Changeset in webkit [233746] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebKit

Unreviewed, rolling out r233741.
https://bugs.webkit.org/show_bug.cgi?id=187568

"WKTR vs exp features, booooooo" (Requested by bradee-oh on
#webkit).

Reverted changeset:

"Make process-swap-on-navigation an experimental feature."
https://bugs.webkit.org/show_bug.cgi?id=187558
https://trac.webkit.org/changeset/233741

4:30 PM Changeset in webkit [233745] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Layout Test media/modern-media-controls/media-controller/media-controller-auto-hide-rewind-with-mouse-enter.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=187420

Unreviewed test gardening.

Patch by Truitt Savell <Truitt Savell> on 2018-07-11

  • platform/mac/TestExpectations:
2:20 PM Changeset in webkit [233744] by bshafiei@apple.com
  • 1 copy in tags/Safari-606.1.24.40.2

Tag Safari-606.1.24.40.2.

2:09 PM Changeset in webkit [233743] by Ryan Haddad
  • 2 edits in trunk/JSTests

Skip JSC test stress/keep-checks-when-converting-to-lazy-js-constant-in-strength-reduction.js
https://bugs.webkit.org/show_bug.cgi?id=187559

Unreviewed test gardening.

  • stress/keep-checks-when-converting-to-lazy-js-constant-in-strength-reduction.js:
1:48 PM Changeset in webkit [233742] by commit-queue@webkit.org
  • 6 edits in trunk

Reduce size of WebCore::URL
https://bugs.webkit.org/show_bug.cgi?id=186820

Patch by Alex Christensen <achristensen@webkit.org> on 2018-07-11
Reviewed by Yusuke Suzuki.

Source/WebCore:

We were using 32 bits for the length of the port, which is always between 0 and 5 inclusive
because port numbers are missing or between 0 and 65535. Let's just use 3 bits here.
We were using 32 bits for the length of the scheme, which is usually 3-5 characters and can be
longer for some custom schemes, but I've never seen one more than 20 characters. If we assume
schemes are always less than 64MB, we can save 8 bytes per URL!

No change in behavior, just less memory use!

  • platform/URL.cpp:

(WebCore::URL::invalidate):
(WebCore::URL::lastPathComponent const):
(WebCore::URL::port const):
(WebCore::URL::protocolHostAndPort const):
(WebCore::URL::path const):
(WebCore::URL::removePort):
(WebCore::URL::setPort):
(WebCore::URL::setHostAndPort):
(WebCore::URL::setPath):

  • platform/URL.h:

(WebCore::URL::encode const):
(WebCore::URL::decode):
(WebCore::URL::hasPath const):
(WebCore::URL::pathStart const):

  • platform/URLParser.cpp:

(WebCore::URLParser::copyBaseWindowsDriveLetter):
(WebCore::URLParser::urlLengthUntilPart):
(WebCore::URLParser::copyURLPartsUntil):
(WebCore::URLParser::shouldPopPath):
(WebCore::URLParser::popPath):
(WebCore::URLParser::parse):
(WebCore::URLParser::parsePort):
(WebCore::URLParser::parseHostAndPort):
(WebCore::URLParser::allValuesEqual):
(WebCore::URLParser::internalValuesConsistent):

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):

1:47 PM Changeset in webkit [233741] by beidson@apple.com
  • 4 edits in trunk/Source/WebKit

Make process-swap-on-navigation an experimental feature.
<rdar://problem/41995053> and https://bugs.webkit.org/show_bug.cgi?id=187558

Reviewed by Geoff Garen.

  • Shared/WebPreferences.yaml:
  • UIProcess/WebPreferences.cpp:

(WebKit::WebPreferences::updateBoolValueForExperimentalFeatureKey):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::createWebPage): If the new web page has PSON enabled via WebPreferences,

absorb that setting into this process pool's configuration.

1:29 PM Changeset in webkit [233740] by Yusuke Suzuki
  • 10 edits
    1 add in trunk

Iterator of Array.keys() returns object in wrong order
https://bugs.webkit.org/show_bug.cgi?id=185197

Reviewed by Keith Miller.

JSTests:

We align the shape of our iterator result to the spec: {value,done} instead of {done,value}.

  • stress/iterator-field-order.js: Added.

(shouldBe):
(shouldBe.JSON.stringify.array.values.next):
(shouldBe.JSON.stringify.array.keys.next):
(shouldBe.JSON.stringify.array.entries.next):
(async.asyncIterator):
(iterator.next.then):
(generator):
(shouldBe.JSON.stringify.generator.next):
(shouldBe.JSON.stringify.map.keys.next):
(shouldBe.JSON.stringify.map.values.next):
(shouldBe.JSON.stringify.map.entries.next):
(set new):

Source/JavaScriptCore:

  • builtins/ArrayIteratorPrototype.js:

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

  • builtins/AsyncFromSyncIteratorPrototype.js:
  • builtins/AsyncGeneratorPrototype.js:

(globalPrivate.asyncGeneratorResolve):

  • builtins/GeneratorPrototype.js:

(globalPrivate.generatorResume):

  • builtins/MapIteratorPrototype.js:

(globalPrivate.mapIteratorNext):

  • builtins/SetIteratorPrototype.js:

(globalPrivate.setIteratorNext):

  • builtins/StringIteratorPrototype.js:

(next):

  • runtime/IteratorOperations.cpp:

(JSC::createIteratorResultObjectStructure):
(JSC::createIteratorResultObject):

12:36 PM Changeset in webkit [233739] by youenn@apple.com
  • 14 edits
    2 adds
    15 deletes in trunk

Fix remaining Cross-Origin-Resource-Policy failures, if any
https://bugs.webkit.org/show_bug.cgi?id=186761
<rdar://problem/41209829>

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Fixed some tests for correctness.

  • web-platform-tests/fetch/cross-origin-resource-policy/fetch-in-service-worker-expected.txt:
  • web-platform-tests/fetch/cross-origin-resource-policy/fetch.any-expected.txt:
  • web-platform-tests/fetch/cross-origin-resource-policy/fetch.any.js:

(promise_test):

  • web-platform-tests/fetch/cross-origin-resource-policy/fetch.any.worker-expected.txt:
  • web-platform-tests/fetch/cross-origin-resource-policy/scheme-restriction.https.window-expected.txt: Added.
  • web-platform-tests/fetch/cross-origin-resource-policy/scheme-restriction.https.window.html: Added.
  • web-platform-tests/fetch/cross-origin-resource-policy/scheme-restriction.https.window.js:
  • web-platform-tests/fetch/cross-origin-resource-policy/syntax.any-expected.txt:
  • web-platform-tests/fetch/cross-origin-resource-policy/syntax.any.worker-expected.txt:

Source/WebCore:

Add case-sensitive check for CORP header value, as per fetch specification.
Add HTTP->HTTPS check for same-site case, as per fetch specification.
https://fetch.spec.whatwg.org/#cross-origin-resource-policy-check

Test: imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/scheme-restriction.https.window.html

  • loader/CrossOriginAccessControl.cpp:

(WebCore::shouldCrossOriginResourcePolicyCancelLoad):

  • platform/network/HTTPParsers.cpp:

(WebCore::parseCrossOriginResourcePolicyHeader):

Tools:

  • TestWebKitAPI/Tests/WebCore/HTTPParsers.cpp:

(TestWebKitAPI::TEST):

2018-07-11 Aakash Jain <aakash_jain@apple.com>

[ews-build] EWS should unapply the patch and build ToT when patch fails to build
https://bugs.webkit.org/show_bug.cgi?id=187358

Reviewed by Alexey Proskuryakov.

  • BuildSlaveSupport/ews-build/factories.py:

(BuildFactory.init):

  • BuildSlaveSupport/ews-build/steps.py:

(CompileWebKit): Set haltOnFailure to false so as to run next steps (e.g.: un-apply patch, compile ToT).
(CompileWebKit.evaluateCommand): Set patchFailedToBuild property.
(CompileWebKitToT): Build ToT without patch.
(CompileWebKitToT.doStepIf): Run this step only if patch failed to build.

  • BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests. Also lower-cased Release and Debug.

LayoutTests:

Remove redundant tests with WPT.

  • http/wpt/cross-origin-resource-policy/fetch-expected.txt: Removed.
  • http/wpt/cross-origin-resource-policy/fetch-in-iframe-expected.txt: Removed.
  • http/wpt/cross-origin-resource-policy/fetch-in-iframe.html: Removed.
  • http/wpt/cross-origin-resource-policy/fetch.html: Removed.
  • http/wpt/cross-origin-resource-policy/iframe-loads-expected.txt: Removed.
  • http/wpt/cross-origin-resource-policy/iframe-loads.html: Removed.
  • http/wpt/cross-origin-resource-policy/image-loads-expected.txt: Removed.
  • http/wpt/cross-origin-resource-policy/image-loads.html: Removed.
  • http/wpt/cross-origin-resource-policy/resources/hello.py: Removed.
  • http/wpt/cross-origin-resource-policy/resources/iframe.py: Removed.
  • http/wpt/cross-origin-resource-policy/resources/iframeFetch.html: Removed.
  • http/wpt/cross-origin-resource-policy/resources/redirect.py: Removed.
  • http/wpt/cross-origin-resource-policy/resources/script.py: Removed.
  • http/wpt/cross-origin-resource-policy/script-loads-expected.txt: Removed.
  • http/wpt/cross-origin-resource-policy/script-loads.html: Removed.
12:29 PM Changeset in webkit [233738] by jer.noble@apple.com
  • 5 edits in trunk

Disable all network caching for HLS streams.
https://bugs.webkit.org/show_bug.cgi?id=187544
<rdar://problem/41863600>

Reviewed by Chris Dumez.

Source/WebKit:

Revert the behavior added in r215263 where Media responses are cached if they are from
a resource whose expected content length is <4MB.

  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::makeStoreDecision):
(WebKit::NetworkCache::expectedTotalResourceSizeFromContentRange): Deleted.

LayoutTests:

  • http/tests/cache/disk-cache/disk-cache-media-small-expected.txt:
  • http/tests/cache/disk-cache/disk-cache-media-small.html:
12:22 PM Changeset in webkit [233737] by Ross Kirsling
  • 2 edits in trunk/Source/WebCore

[WinCairo] MIME type registry doesn't explicitly recognize *.xht
https://bugs.webkit.org/show_bug.cgi?id=187555

Reviewed by Konstantin Tokarev.

Follow-up to r233715 -- WinCairo bots are failing on *.xht layout tests as they lack a registry key for this filetype.
(Hopefully this is the last one to add.)

  • platform/win/MIMETypeRegistryWin.cpp:

(WebCore::MIMETypeRegistry::getMIMETypeForExtension):
Add *.xht to the list of recognized filetypes.

11:50 AM Changeset in webkit [233736] by Kocsen Chung
  • 1 copy in tags/Safari-606.1.25

Tag Safari-606.1.25.

11:34 AM Changeset in webkit [233735] by Kocsen Chung
  • 7 edits in trunk/Source

Versioning.

11:10 AM Changeset in webkit [233734] by aakash_jain@apple.com
  • 4 edits in trunk/Tools

2018-07-11 Aakash Jain <aakash_jain@apple.com>


[ews-build] EWS should unapply the patch and build ToT when patch fails to build
https://bugs.webkit.org/show_bug.cgi?id=187358

Reviewed by Alexey Proskuryakov.

  • BuildSlaveSupport/ews-build/factories.py:

(BuildFactory.init):

  • BuildSlaveSupport/ews-build/steps.py:

(CompileWebKit): Set haltOnFailure to false so as to run next steps (e.g.: un-apply patch, compile ToT).
(CompileWebKit.evaluateCommand): Set patchFailedToBuild property.
(CompileWebKitToT): Build ToT without patch.
(CompileWebKitToT.doStepIf): Run this step only if patch failed to build.

  • BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests. Also lower-cased Release and Debug.
10:29 AM Changeset in webkit [233733] by rmorisset@apple.com
  • 3 edits in trunk/Tools

[WSL] WIP, some work on the spec.

10:13 AM Changeset in webkit [233732] by bshafiei@apple.com
  • 7 edits in branches/safari-606.1.24.40-branch/Source

Versioning.

9:40 AM Changeset in webkit [233731] by graouts@webkit.org
  • 2 edits in trunk/Source/WebCore

[Web Animations] Make WPT test at interfaces/KeyframeEffect/processing-a-keyframes-argument-001.html pass reliably
https://bugs.webkit.org/show_bug.cgi?id=186501
<rdar://problem/41000224>

Unreviewed build fix after r233729 and r233730.

  • animation/KeyframeEffectReadOnly.cpp:

(WebCore::processIterableKeyframes):

9:34 AM Changeset in webkit [233730] by graouts@webkit.org
  • 2 edits in trunk/Source/WebCore

[Web Animations] Make WPT test at interfaces/KeyframeEffect/processing-a-keyframes-argument-001.html pass reliably
https://bugs.webkit.org/show_bug.cgi?id=186501
<rdar://problem/41000224>

Unreviewed build fix after r233729.

  • animation/KeyframeEffectReadOnly.cpp:

(WebCore::processIterableKeyframes):

8:54 AM Changeset in webkit [233729] by graouts@webkit.org
  • 6 edits in trunk

[Web Animations] Make WPT test at interfaces/KeyframeEffect/processing-a-keyframes-argument-001.html pass reliably
https://bugs.webkit.org/show_bug.cgi?id=186501
<rdar://problem/41000224>

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark 2 new WPT progressions.

  • web-platform-tests/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001-expected.txt:

Source/WebCore:

There were two remaining assertions that we were failing in this WPT test file, both related to processing iterable keyframes.
The first one was failing because didn't correctly propagate the TypeError exception in the forEachInIterable() callback. The
second one was failing because we didn't use the "process a keyframe-like object" procedure when processing iterable keyframes
and, as such, we didn't correctly sort property alphabetically before reading their values.

To fix this second issue, we make processIterableKeyframes() use processKeyframeLikeObject(). To do so, we update processKeyframeLikeObject()
to accept a new boolean flag to match the "allow lists" flag from the specification. We also ensure we sort the properties *before*
reading from them which we didn't use to do previously.

  • animation/KeyframeEffectReadOnly.cpp:

(WebCore::processKeyframeLikeObject):
(WebCore::processIterableKeyframes):
(WebCore::processPropertyIndexedKeyframes):

  • animation/KeyframeEffectReadOnly.h:
  • animation/KeyframeEffectReadOnly.idl:
6:30 AM Changeset in webkit [233728] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

SimpleLineLayout::FlowContents wastes 54KB of Vector capacity on nytimes.com
https://bugs.webkit.org/show_bug.cgi?id=186709
<rdar://problem/41173793>

Reviewed by Simon Fraser.

The size of the m_segments vector in SimpleLineLayoutFlowContents is alway pre-computed and don't change after the initial append.

Not testable.

  • rendering/SimpleLineLayoutFlowContents.h:
3:02 AM Changeset in webkit [233727] by Ms2ger@igalia.com
  • 4 edits in trunk

[GTK] Unreviewed test gardening
https://bugs.webkit.org/show_bug.cgi?id=187551

Unreviewed gardening.

WebDriverTests:

  • TestExpectations.json:
    • imported/selenium/py/test/selenium/webdriver/common: fixed in r233548
    • imported/w3c/webdriver/tests/actions/key.py: fixed in r233499
    • imported/w3c/webdriver/tests/actions/special_keys.py: properly escape test names

LayoutTests:

  • platform/gtk/TestExpectations: Mark new test as failing: it depends on mac-only code.
1:18 AM Changeset in webkit [233726] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebKit

[WPE] AC for fixed-position elements is not enabled
https://bugs.webkit.org/show_bug.cgi?id=187514

Reviewed by Carlos Garcia Campos.

Enable accelerated compositing for fixed-position elements when using
AcceleratedDrawingArea and AC is force-enabled. This effectively enables
this option for the WPE port which is using the AcceleratedDrawingArea
implementation and not DrawingAreaImpl like the GTK+ port.

  • WebProcess/WebPage/AcceleratedDrawingArea.cpp:

(WebKit::AcceleratedDrawingArea::updatePreferences):

12:59 AM Changeset in webkit [233725] by chris.reid@sony.com
  • 2 edits in trunk/Source/WebKit

[Win][WebKit] Disable accelerated compositing until it is supported
https://bugs.webkit.org/show_bug.cgi?id=187503

Reviewed by Žan Doberšek.

  • UIProcess/win/WebView.cpp:
12:59 AM Changeset in webkit [233724] by Yusuke Suzuki
  • 2 edits in trunk/JSTests

Unreviewed, clean up test262 expectations

  • test262/expectations.yaml:

Jul 10, 2018:

11:22 PM Changeset in webkit [233723] by timothy_horton@apple.com
  • 7 edits in trunk/Source/WebKit

REGRESSION (r233480): Mail contents flash black when activating
https://bugs.webkit.org/show_bug.cgi?id=187504
<rdar://problem/41752351>

Reviewed by Simon Fraser.

The sequence of events to reproduce the bug originally fixed in r203371
is either:

A) the simple background/foreground case

1] app begins to suspend
2] app suspension snapshots are taken
3] WKWebView's surfaces are marked volatile
4] app completes suspension

... time goes by ...

5] WKWebView's volatile surfaces are purged

... time goes by ...

6] app begins to resume, shows (good) suspension snapshot
7] app removes suspension snapshot
8] WKWebView has sublayers with purged (black) surfaces
9] WKWebView sublayers are repaired by a new commit with nonvolatile surfaces

B) the re-snapshot while in the background case

1] app begins to suspend
2] app suspension snapshots are taken
3] WKWebView's surfaces are marked volatile
4] app completes suspension
... time goes by ...
5] WKWebView's volatile surfaces are purged
... time goes by ...
6] app wakes up in the background to update its snapshots
7] in the updated snapshots, WKWebView has sublayers with purged (black) surfaces
... time goes by ...
8] app begins to resume, shows (bad) suspension snapshot
9] WKWebView presents layers with purged (black) surfaces until new commit fixes them
10] WKWebView sublayers are repaired by a new commit with nonvolatile surfaces

WebKit's current approach to fix this problem is simply to hide the
WKWebView's sublayers at some point after A2/B2 (suspension snapshots),
but before A8/B7 (the first time the empty layers would be presented
or snapshotted).

Previously, we did this by hiding the layers when the window's CAContext
was created, which happened early enough in both cases (at A6/B6).
However, that notification was removed underneath us at some point.

However, in looking at the timelines, there's a better place to do this:
immediately after marking the surfaces volatile (A3/B3), which is always
strictly after the app suspension snapshots are taken, and also always
before the freshly-made-volatile layers could be presented or snapshotted.

  • UIProcess/ApplicationStateTracker.h:
  • UIProcess/ApplicationStateTracker.mm:

(WebKit::ApplicationStateTracker::ApplicationStateTracker):
(WebKit::ApplicationStateTracker::~ApplicationStateTracker):
(WebKit::ApplicationStateTracker::applicationDidCreateWindowContext): Deleted.

  • UIProcess/ios/WKApplicationStateTrackingView.h:
  • UIProcess/ios/WKApplicationStateTrackingView.mm:

(-[WKApplicationStateTrackingView didMoveToWindow]):
(-[WKApplicationStateTrackingView _applicationDidCreateWindowContext]): Deleted.

  • UIProcess/ios/WKContentView.mm:

(-[WKContentView _applicationDidCreateWindowContext]): Deleted.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::applicationDidFinishSnapshottingAfterEnteringBackground):
Remove the didCreateWindowContext notification, and hide content after
snapshotting after entering the background.

11:21 PM Changeset in webkit [233722] by mark.lam@apple.com
  • 9 edits
    3 adds in trunk

constructArray() should always allocate the requested length.
https://bugs.webkit.org/show_bug.cgi?id=187543
<rdar://problem/41947884>

Reviewed by Saam Barati.

JSTests:

  • stress/regress-187543-2.js: Added.
  • stress/regress-187543-3.js: Added.
  • stress/regress-187543.js: Added.

Source/JavaScriptCore:

Currently, it does not when we're having a bad time. We fix this by switching
back to using tryCreateUninitializedRestricted() exclusively in constructArray().
If we detect that a structure transition is possible before we can initialize
the butterfly, we'll go ahead and eagerly initialize the rest of the butterfly.
We will introduce JSArray::eagerlyInitializeButterfly() to handle this.

Also enhanced the DisallowScope and ObjectInitializationScope to support this
eager initialization when needed.

  • dfg/DFGOperations.cpp:
  • the client of operationNewArrayWithSizeAndHint() (in FTL generated code) expects the array allocation to always succeed. Adding this RELEASE_ASSERT here makes it clearer that we encountered an OutOfMemory condition instead of failing in FTL generated code, which will appear as a generic null pointer dereference.
  • runtime/ArrayPrototype.cpp:

(JSC::concatAppendOne):

  • the code here clearly wants to check for an allocation failure. Switched to using JSArray::tryCreate() instead of JSArray::create().
  • runtime/DisallowScope.h:

(JSC::DisallowScope::disable):

  • runtime/JSArray.cpp:

(JSC::JSArray::tryCreateUninitializedRestricted):
(JSC::JSArray::eagerlyInitializeButterfly):
(JSC::constructArray):

  • runtime/JSArray.h:
  • runtime/ObjectInitializationScope.cpp:

(JSC::ObjectInitializationScope::notifyInitialized):

  • runtime/ObjectInitializationScope.h:

(JSC::ObjectInitializationScope::notifyInitialized):

10:00 PM Changeset in webkit [233721] by Yusuke Suzuki
  • 14 edits in trunk/Source/JavaScriptCore

[JSC] Remove getTypedArrayImpl
https://bugs.webkit.org/show_bug.cgi?id=187338

Reviewed by Mark Lam.

getTypedArrayImpl is overridden only by typed arrays and DataView. Since the number of these classes
are limited, we do not need to add this function to MethodTable: dispatching it in JSArrayBufferView is fine.
This patch removes getTypedArrayImpl from MethodTable, and moves it to JSArrayBufferView.

  • runtime/ClassInfo.h:
  • runtime/GenericTypedArrayView.h:

(JSC::GenericTypedArrayView::data const): Deleted.
(JSC::GenericTypedArrayView::set): Deleted.
(JSC::GenericTypedArrayView::setRange): Deleted.
(JSC::GenericTypedArrayView::zeroRange): Deleted.
(JSC::GenericTypedArrayView::zeroFill): Deleted.
(JSC::GenericTypedArrayView::length const): Deleted.
(JSC::GenericTypedArrayView::item const): Deleted.
(JSC::GenericTypedArrayView::set const): Deleted.
(JSC::GenericTypedArrayView::setNative const): Deleted.
(JSC::GenericTypedArrayView::getRange): Deleted.
(JSC::GenericTypedArrayView::checkInboundData const): Deleted.
(JSC::GenericTypedArrayView::internalByteLength const): Deleted.

  • runtime/JSArrayBufferView.cpp:

(JSC::JSArrayBufferView::possiblySharedImpl):

  • runtime/JSArrayBufferView.h:
  • runtime/JSArrayBufferViewInlines.h:

(JSC::JSArrayBufferView::possiblySharedImpl): Deleted.

  • runtime/JSCell.cpp:

(JSC::JSCell::getTypedArrayImpl): Deleted.

  • runtime/JSCell.h:
  • runtime/JSDataView.cpp:

(JSC::JSDataView::getTypedArrayImpl): Deleted.

  • runtime/JSDataView.h:
  • runtime/JSGenericTypedArrayView.h:
  • runtime/JSGenericTypedArrayViewInlines.h:

(JSC::JSGenericTypedArrayView<Adaptor>::getTypedArrayImpl): Deleted.

7:50 PM Changeset in webkit [233720] by youenn@apple.com
  • 16 edits
    6 adds in trunk

Make fetch() use "same-origin" credentials by default
https://bugs.webkit.org/show_bug.cgi?id=176023

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Tests updated according upstream WPT repo.

  • web-platform-tests/fetch/api/request/request-init-003.sub.html:
  • web-platform-tests/fetch/api/request/request-structure.html:

Source/WebCore:

Covered by updated tests.

  • Modules/fetch/FetchRequest.cpp:

(WebCore::FetchRequest::initializeWith):
Setting credentials mode to same-origin for FetchRequest by default.

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::redirectReceived):
Handle correctly referrer in case we restart a load.

  • page/PerformanceResourceTiming.cpp:

(WebCore::entryStartTime):
(WebCore::entryEndTime):
In case it is not allowed to disclose resource timing info, update as
https://www.w3.org/TR/resource-timing-1/#performanceresourcetiming

Source/WebKit:

Before the patch, when changing the credential mode in case of redirection,
we were not waiting for WebProcess response to restart the load.
This patch updates the implementation to ask the WebProcess whether to proceed as for other regular asynchronous loads.
This requires some refactoring in particular we now pass request, redirectRequest and redirectResponse to NetworkLoadChecker
that will send them back as part of the completion handler.

To do so, we change manual redirection handling and make it a successful case and not an error case as before.

  • NetworkProcess/NetworkLoadChecker.cpp:

(WebKit::redirectionError):
(WebKit::NetworkLoadChecker::checkRedirection):

  • NetworkProcess/NetworkLoadChecker.h:
  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::willSendRedirectedRequest):
(WebKit::NetworkResourceLoader::restartNetworkLoad):
(WebKit::NetworkResourceLoader::continueWillSendRequest):

  • NetworkProcess/NetworkResourceLoader.h:
  • NetworkProcess/PingLoad.cpp:

(WebKit::PingLoad::willPerformHTTPRedirection):

LayoutTests:

Resource timing does not work properly on WK1 when stopping fetch/XHR load to restart it without credentials.
Updated expected results accordingly.

  • http/tests/inspector/network/resource-mime-type.html:

Update resource-mime-type.html to ensure we go to the network for every load.

  • http/wpt/resource-timing/rt-cors.js:

(assertRedirectWithDisallowedTimingData):
Updated test according https://www.w3.org/TR/resource-timing-1/#performanceresourcetiming.

  • platform/mac-wk1/http/wpt/resource-timing/rt-cors-expected.txt: Added.
  • platform/mac-wk1/http/wpt/resource-timing/rt-cors.worker-expected.txt: Added.
  • platform/win/http/wpt/resource-timing/rt-cors-expected.txt: Added.
  • platform/win/http/wpt/resource-timing/rt-cors.worker-expected.txt: Added.
6:57 PM Changeset in webkit [233719] by Chris Dumez
  • 4 edits in trunk/Source/WebCore

"serviceworker.js" is fetched several times in a row
https://bugs.webkit.org/show_bug.cgi?id=187435
<rdar://problem/41940569>

Reviewed by Youenn Fablet.

Soft updates happen every time a fetch event is sent to a service worker for a main resource request.
This can happen many times during a page load and will cause us to spam the HTTP server with update
requests, especially considering that the default behavior is to bypass the HTTP cache. To address
the issue, we now do soft updates on a 1 second delay and we keep rescheduling this timer was long as
soft update requests keep coming. Based on my understanding of the Chromium code, this seems to be
what they are doing so this should align our behavior with them.

  • workers/service/ServiceWorkerRegistration.cpp:

(WebCore::ServiceWorkerRegistration::ServiceWorkerRegistration):
(WebCore::ServiceWorkerRegistration::scheduleSoftUpdate):

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

(WebCore::ServiceWorkerFetch::dispatchFetchEvent):

6:28 PM Changeset in webkit [233718] by keith_miller@apple.com
  • 3 edits
    1 add in trunk

hasOwnProperty returns true for out of bounds property index on TypedArray
https://bugs.webkit.org/show_bug.cgi?id=187520

Reviewed by Saam Barati.

JSTests:

getOwnPropertySlot returns true on out of bounds indicies for
TypedArrays, which is incorrect.

  • stress/typedarray-hasOwnProperty-out-of-bounds.js: Added.

(test):

Source/JavaScriptCore:

  • runtime/JSGenericTypedArrayViewInlines.h:

(JSC::JSGenericTypedArrayView<Adaptor>::getOwnPropertySlot):

6:03 PM Changeset in webkit [233717] by Fujii Hironori
  • 2 edits in trunk/Source/WebInspectorUI

REGRESSION(r229932) Use of uninitialized value in subroutine entry at copy-user-interface-resources.pl
https://bugs.webkit.org/show_bug.cgi?id=187511

Reviewed by Brian Burg.

copy-user-interface-resources.pl output warning messages unless
BUILT_PRODUCTS_DIR and BUILT_PRODUCTS_DIR env vars are defined.

  • Scripts/copy-user-interface-resources.pl:

(webInspectorUIAdditionsDir): Added. Return UNDEF if
BUILT_PRODUCTS_DIR and SDKROOT env vars aren't defined.
(combineOrStripResourcesForWebKitAdditions): Check
$webInspectorUIAdditionsDir is defined.

5:35 PM Changeset in webkit [233716] by msaboff@apple.com
  • 4 edits in trunk

DFG JIT: compileMathIC produces incorrect machine code
https://bugs.webkit.org/show_bug.cgi?id=187537

Reviewed by Saam Barati.

JSTests:

Added new test case.

  • stress/arith-mul-with-constants.js:

(testArithMulWithTypeConfusedConstant.testMult):
(testArithMulWithTypeConfusedConstant):

Source/JavaScriptCore:

Added checks for constant multipliers in JITMulGenerator::generateInline(). If we have a constant multiplier,
fall back to the fast path generator which handles such cases.

  • jit/JITMulGenerator.cpp:

(JSC::JITMulGenerator::generateInline):

5:27 PM Changeset in webkit [233715] by Ross Kirsling
  • 2 edits in trunk/Source/WebCore

[WinCairo] MIME type registry doesn't explicitly recognize *.css
https://bugs.webkit.org/show_bug.cgi?id=187538

Reviewed by Yusuke Suzuki.

MIMETypeRegistryWin doesn't explicitly recognize *.css; it instead falls back to the registry key "Content Type"
under HKEY_CLASSES_ROOT\.css. This key doesn't exist on Windows Server unless an application actually registers
it -- as a result, WinCairo bots are currently viewing it as an unrecognized filetype!

  • platform/win/MIMETypeRegistryWin.cpp:

(WebCore::MIMETypeRegistry::getMIMETypeForExtension):
Add *.css to the list of recognized filetypes.

5:16 PM Changeset in webkit [233714] by fpizlo@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Change the reoptimization backoff base to 1.3 from 2
https://bugs.webkit.org/show_bug.cgi?id=187540

Reviewed by Saam Barati.

I have data that hints at this being a speed-up on JetStream, ARES-6, and Speedometer2.

I also have data that hints that a backoff base of 1 might be even better, but I think that
we want to keep *some* backoff in case we find ourselves in an unmitigated recomp loop.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::reoptimizationRetryCounter const):
(JSC::CodeBlock::countReoptimization):
(JSC::CodeBlock::adjustedCounterValue):

  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):

  • runtime/Options.h:
5:09 PM Changeset in webkit [233713] by Chris Dumez
  • 8 edits in trunk/Source/WebKit

[IOS] We should prevent WebProcess suspension while the UIProcess is waiting for a reply from its injected bundle
https://bugs.webkit.org/show_bug.cgi?id=187536
<rdar://problem/41931912>

Reviewed by Brady Eidson.

Update RemoteObjectRegistry to take a background process assertion for each pending reply on the
UIProcess side. Otherwise, the destination web process may get suspended and the reply block would
not get called. We already do this in WebPageProxy for callbacks waiting for an IPC from the
WebProcess.

  • Shared/API/Cocoa/RemoteObjectRegistry.h:
  • Shared/API/Cocoa/RemoteObjectRegistry.mm:

(WebKit::RemoteObjectRegistry::RemoteObjectRegistry):
(WebKit::RemoteObjectRegistry::sendInvocation):
(WebKit::RemoteObjectRegistry::callReplyBlock):
(WebKit::RemoteObjectRegistry::releaseUnusedReplyBlock):

  • Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:

(-[_WKRemoteObjectRegistry _initWithWebPage:]):
(-[_WKRemoteObjectRegistry _initWithWebPageProxy:]):
(-[_WKRemoteObjectRegistry _initWithMessageSender:]): Deleted.

  • Shared/API/Cocoa/_WKRemoteObjectRegistryInternal.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _remoteObjectRegistry]):

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::remoteObjectRegistry):

  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:

(-[WKWebProcessPlugInBrowserContextController _remoteObjectRegistry]):

4:59 PM Changeset in webkit [233712] by Kocsen Chung
  • 1 copy in tags/Safari-606.1.24.40.1

Tag Safari-606.1.24.40.1.

4:57 PM Changeset in webkit [233711] by Kocsen Chung
  • 1 copy in tags/Safari-606.1.24.20.1

Tag Safari-606.1.24.20.1.

4:51 PM Changeset in webkit [233710] by Kocsen Chung
  • 2 edits in branches/safari-606.1.24.20-branch/Source/WebCore

Cherry-pick r233535. rdar://problem/41917649

Video sometimes flickers when playing to AppleTV
https://bugs.webkit.org/show_bug.cgi?id=187193
<rdar://problem/40153865>

Unreviewed, fix a broken API test.

  • platform/audio/ios/AudioSessionIOS.mm: (WebCore::AudioSession::setCategory): None should set the category to AVAudioSessionCategoryAmbient, because it signals that WebKit is not playing audio so we want allow other apps to play.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233535 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4:48 PM Changeset in webkit [233709] by Kocsen Chung
  • 7 edits in branches/safari-606.1.24.40-branch/Source

Versioning.

4:42 PM Changeset in webkit [233708] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-build] Add build step to UnApply patch
https://bugs.webkit.org/show_bug.cgi?id=187357

Reviewed by Alexey Proskuryakov.

  • BuildSlaveSupport/ews-build/steps.py:

(UnApplyPatchIfRequired.init): Pass alwaysUseLatest parameter in order to unapply the patch.
(UnApplyPatchIfRequired.doStepIf): Run this step only if patch failed to build or failed test. These
properties will be set by build-steps for build and test.
(UnApplyPatchIfRequired.hideStepIf): Hide this step if it is not run.

4:39 PM Changeset in webkit [233707] by Kocsen Chung
  • 1 copy in branches/safari-606.1.24.40-branch

New branch.

4:38 PM Changeset in webkit [233706] by Kocsen Chung
  • 7 edits in branches/safari-606.1.24.20-branch/Source

Versioning.

4:28 PM Changeset in webkit [233705] by Kocsen Chung
  • 1 copy in branches/safari-606.1.24.20-branch

New branch.

4:19 PM Changeset in webkit [233704] by timothy@apple.com
  • 2 edits in trunk/Source/WebCore

REGRESSION (r233552): Find highlight has white text on yellow background
https://bugs.webkit.org/show_bug.cgi?id=187535
rdar://problem/42043371

Reviewed by Tim Horton.

Fixes existing image tests:

  • fast/text/mark-matches-rendering.html
  • fast/text/mark-matches-broken-line-rendering.html
  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::resolveStyleForMarkedText): Remove incorect UseDarkAppearance.

3:41 PM Changeset in webkit [233703] by BJ Burg
  • 2 edits in trunk/Source/WebKit

WebDriver: hang when running Selenium test correct_event_firing_tests.py::testShouldEmitOnChangeEventsWhenSelectingElements[Safari]
https://bugs.webkit.org/show_bug.cgi?id=187486
<rdar://problem/41987110>

Reviewed by Tim Horton.

This test takes the unusual step of doing Element Click directly on a <select> element,
despite the specification supporting clicking on <option> elements directly. It hangs
because we fire a nested run loop when the Carbon popup menu appears, and the nested runloop
is not exited until the popup menu is clicked or dismissed.

If a click is being simulated on the <select> via WebDriver, we should just not show
the popup menu but still deliver all of the events that are fired when clicking the element.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::showPopupMenu):

3:01 PM Changeset in webkit [233702] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Try to fix the build

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _internalDoAfterNextPresentationUpdate:withoutWaitingForPainting:withoutWaitingForAnimatedResize:]):

3:00 PM Changeset in webkit [233701] by sbarati@apple.com
  • 2 edits in trunk/LayoutTests

Layout Test editing/selection/navigation-clears-editor-state.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=187389
<rdar://problem/41898822>

Rubber-stamped by Ryosuke Niwa.

Make this test less susceptible to timing out on debug builds by:

  • lowering the number of iframes we add by a factor of two
  • removing the tests own internal 18 second timeout
  • editing/selection/navigation-clears-editor-state.html:
2:59 PM Changeset in webkit [233700] by Dewei Zhu
  • 2 edits in trunk/Tools

Update ARES-6.patch file accordingly for r233631.
https://bugs.webkit.org/show_bug.cgi?id=187534

Reviewed by Saam Barati.

Update ARES-6.patch file acoordingly after ARES-6 plan file change to
avoid warning while applying the patch.

  • Scripts/webkitpy/benchmark_runner/data/patches/webserver/ARES-6.patch:
2:56 PM Changeset in webkit [233699] by Chris Fleizach
  • 2 edits in trunk/Source/WebCore

AX: Crash in accessing AXObjectCache in textMarkerDataForVisiblePosition
https://bugs.webkit.org/show_bug.cgi?id=187528
<rdar://problem/37231941>

Reviewed by Joanmarie Diggs.

Occasional crashes reported when running accessibility/mac/search-field-cancel-button.html.
Looks like the cache object retrieved was not valid and we weren't checking for it.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::visiblePositionForTextMarkerData):
(WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
(WebCore::AXObjectCache::textMarkerDataForFirstPositionInTextControl):

2:29 PM Changeset in webkit [233698] by timothy_horton@apple.com
  • 6 edits in trunk

doAfterNextPresentationUpdate should not be called while content is hidden due to animated resize
https://bugs.webkit.org/show_bug.cgi?id=187500
<rdar://problem/41294139>

Reviewed by Simon Fraser.

Source/WebKit:

Clients generally expect that after doAfterNextPresentationUpdate, there's
something vaguely sensible on the screen. They use this to remove snapshots,
unhide web views, etc.

During some kinds of resize/rotation, we will hide the WKContentView,
and asynchronously hide it when the resize/rotation is complete. This
can cause clients to prematurely expose a blank WKWebView.

To fix this, avoid calling doAfterNextPresentationUpdate until the
animated resize completes. Add a variant that does not wait for this
(to be used for testing purposes).

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _didCompleteAnimatedResize]):
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
Rename the vector of blocks that we call after animated resize completes
to be generic rather than just about snapshots.

(-[WKWebView _internalDoAfterNextPresentationUpdate:withoutWaitingForPainting:withoutWaitingForAnimatedResize:]):
Add this _internal variant of _doAfterNextPresentationUpdate that takes bits determining
which waits to perform or avoid, to reduce duplication.

(-[WKWebView _doAfterNextPresentationUpdate:]):
(-[WKWebView _doAfterNextPresentationUpdateWithoutWaitingForAnimatedResizeForTesting:]):
(-[WKWebView _doAfterNextPresentationUpdateWithoutWaitingForPainting:]):
Call _internalDoAfterNextPresentationUpdate with the appropriate bits set for each situation.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:

Add _doAfterNextPresentationUpdateWithoutWaitingForAnimatedResizeForTesting to WKWebView(WKTesting).

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm:

(-[AnimatedResizeWebView _endAnimatedResize]):
Set didEndAnimatedResize before calling super, because it makes the
new test easier and doesn't affect any of the existing ones.

(AnimatedResizeBlocksViewportFitChanges):
This doAfterNextPresentationUpdate is always called during animated resize,
and then synchronously waited for, so it /must/ use
_doAfterNextPresentationUpdateWithoutWaitingForAnimatedResizeWithTesting.

(AnimatedResizeBlocksDoAfterNextPresentationUpdate):
Add a test ensuring that doAfterNextPresentationUpdate is deferred
until endAnimatedResize is called.

  • TestWebKitAPI/cocoa/TestNavigationDelegate.mm:

(-[WKWebView _test_waitForDidFinishNavigation]):
_test_waitForDidFinishNavigation is sometimes called during animated resize,
and synchronously waits for a doAfterNextPresentationUpdate, so
it cannot wait for the animated resize to complete.

1:47 PM Changeset in webkit [233697] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[32-bit JSC tests] ASSERTION FAILED: !butterfly->propertyStorage()[-I - 1].get() under JSC::ObjectInitializationScope::verifyPropertiesAreInitialized.
https://bugs.webkit.org/show_bug.cgi?id=187362
<rdar://problem/42027210>

Reviewed by Saam Barati.

On 32-bit targets, a 0 valued JSValue is not the empty JSValue, but it is a valid
value to use for initializing unused properties. Updated an assertion to account
for this.

  • runtime/ObjectInitializationScope.cpp:

(JSC::ObjectInitializationScope::verifyPropertiesAreInitialized):

1:35 PM Changeset in webkit [233696] by Alan Bujtas
  • 5 edits
    2 adds in trunk

FragmentInterval, FragmentIntervalTree and FragmentSearchAdapter should hold not hold raw pointers to renderers.
https://bugs.webkit.org/show_bug.cgi?id=187249
<rdar://problem/41725869>

Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/multicol/crash-in-vertical-writing-mode.html

  • rendering/RenderFragmentedFlow.cpp:

(WebCore::RenderFragmentedFlow::updateFragmentsFragmentedFlowPortionRect):

  • rendering/RenderFragmentedFlow.h:

(WTF::ValueToString<WeakPtr<WebCore::RenderFragmentContainer>>::string):

LayoutTests:

  • fast/multicol/crash-in-vertical-writing-mode-expected.txt: Added.
  • fast/multicol/crash-in-vertical-writing-mode.html: Added.
1:09 PM Changeset in webkit [233695] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: Layers inspector should allow control-dragging to pan the 3D render
https://bugs.webkit.org/show_bug.cgi?id=185109

Patch by Ross Kirsling <rkirsling@gmail.com> on 2018-07-10
Reviewed by Matt Baker.

Addressed in the three.js repo itself (https://github.com/mrdoob/three.js/pull/13972),
so this patch simply updates three.js and its OrbitControls module.

  • UserInterface/External/three.js/LICENSE:
  • UserInterface/External/three.js/three.js:

Update to r94.

  • UserInterface/External/three.js/OrbitControls.js:

Update to latest.

  • UserInterface/Views/Layers3DContentView.js:

(WI.Layers3DContentView.prototype.initialLayout):
(WI.Layers3DContentView.prototype._restrictPan):
Adapt to recent changes in three.js.

12:21 PM Changeset in webkit [233694] by timothy_horton@apple.com
  • 5 edits in trunk/Source/WebKit

REGRESSION (r231510): Dismissing PDFPlugin context menu automatically clicks the first item
https://bugs.webkit.org/show_bug.cgi?id=187507
<rdar://problem/42007155>

Reviewed by Per Arne Vollan.

WebPageProxy::showPDFContextMenu, introduced in r213510, assumes that
the user always chooses some item from the menu; it does not handle
the case where the context menu is dismissed without selecting anything.

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/mac/WebPageProxyMac.mm:

(-[WKPDFMenuTarget selectedMenuItem]):
(-[WKPDFMenuTarget contextMenuAction:]):
(WebKit::WebPageProxy::showPDFContextMenu):

  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::handleContextMenuEvent):
Make showPDFContextMenu return an optional index, instead of always
returning an index. Don't perform any action if it is nullopt.

12:14 PM Changeset in webkit [233693] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Remove unused NavigationSidebarPanel.treeElementAddedOrChanged
https://bugs.webkit.org/show_bug.cgi?id=187508

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/NavigationSidebarPanel.js:

(WI.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
(WI.NavigationSidebarPanel.prototype.treeElementAddedOrChanged): Deleted.

11:24 AM Changeset in webkit [233692] by Fujii Hironori
  • 3 edits in trunk/Tools

[GTK][WPE] TestWTF and TestJSC fail to compile due to missing forwarding headers
https://bugs.webkit.org/show_bug.cgi?id=184441

Reviewed by Michael Catanzaro.

All executables of TestWebKitAPI need the forwarding headers of
WebCore and PAL because config.h includes
<WebCore/PlatformExportMacros.h> and <pal/ExportMacros.h>.

The forwarding headers of WebCore are generated by
generate-forwarding-headers.pl in GTK and WPE ports. The
forwarding headers of PAL are generated by
WEBKIT_MAKE_FORWARDING_HEADERS in all CMake ports.

  • TestWebKitAPI/PlatformGTK.cmake: Added PALForwardingHeaders to

ForwardingHeadersForTestWebKitAPI_NAME. Added dependencies of
${ForwardingHeadersForTestWebKitAPI_NAME} to TestJSC.

  • TestWebKitAPI/PlatformWPE.cmake: Ditto.
11:22 AM Changeset in webkit [233691] by commit-queue@webkit.org
  • 7 edits in trunk

[WinCairo] Support display of webinspector ui on non-legacy minibrowser
https://bugs.webkit.org/show_bug.cgi?id=187415

Patch by Stephan Szabo <stephan.szabo@sony.com> on 2018-07-10
Reviewed by Brian Burg.

Source/WebKit:

  • UIProcess/WebInspectorProxy.h:
  • UIProcess/win/WebInspectorProxyWin.cpp:

(WebKit::getInspectedWindowInfo):
(WebKit::WebInspectorProxy::windowReceivedMessage):
(WebKit::WebInspectorProxy::wndProc):
(WebKit::WebInspectorProxy::registerWindowClass):
(WebKit::decidePolicyForNavigationAction):
(WebKit::webProcessDidCrash):
(WebKit::WebInspectorProxy::platformCreateFrontendPage):
(WebKit::WebInspectorProxy::platformCloseFrontendPageAndWindow):
(WebKit::WebInspectorProxy::inspectorPageURL):
(WebKit::WebInspectorProxy::inspectorTestPageURL):
(WebKit::WebInspectorProxy::inspectorBaseURL):
(WebKit::WebInspectorProxy::platformInspectedWindowHeight):
(WebKit::WebInspectorProxy::platformInspectedWindowWidth):
(WebKit::WebInspectorProxy::platformAttach):
(WebKit::WebInspectorProxy::platformDetach):
(WebKit::WebInspectorProxy::platformSetAttachedWindowHeight):
(WebKit::WebInspectorProxy::platformSetAttachedWindowWidth):
(WebKit::WebInspectorProxy::platformIsFront):
(WebKit::WebInspectorProxy::platformHide):
(WebKit::WebInspectorProxy::platformBringToFront):
(WebKit::WebInspectorProxy::platformBringInspectedPageToFront):
(WebKit::WebInspectorProxy::platformInspectedURLChanged):
(WebKit::WebInspectorProxy::platformCreateFrontendWindow):
(WebKit::WebInspectorProxy::platformDidCloseForCrash):
(WebKit::WebInspectorProxy::platformInvalidate):
(WebKit::WebInspectorProxy::platformStartWindowDrag):

  • WebProcess/WebPage/WebInspector.cpp:

(WebKit::WebInspector::openFrontendConnection):

  • WebProcess/WebPage/win/WebInspectorUIWin.cpp:

(WebKit::WebInspectorUI::localizedStringsURL):
(WebKit::RemoteWebInspectorUI::localizedStringsURL):

Tools:

  • MiniBrowser/win/WebKitBrowserWindow.cpp:

(WebKitBrowserWindow::WebKitBrowserWindow):

10:34 AM Changeset in webkit [233690] by msaboff@apple.com
  • 3 edits
    1 add in trunk

YARR: . doesn't match non-BMP Unicode characters in some cases
https://bugs.webkit.org/show_bug.cgi?id=187248

Reviewed by Geoffrey Garen.

JSTests:

New regression test.

  • stress/regexp-with-nonBMP-any.js: Added.

Source/JavaScriptCore:

The safety check in optimizeAlternative() for moving character classes that only consist of BMP
characters did not take into account that the character class is inverted. In this case, we
represent '.' as "not a newline" using the newline character class with an inverted check.
Clearly that includes non-BMP characters.

The fix is to check that the character class doesn't have non-BMP characters AND it isn't an
inverted use of that character class.

  • yarr/YarrJIT.cpp:

(JSC::Yarr::YarrGenerator::optimizeAlternative):

10:22 AM Changeset in webkit [233689] by bshafiei@apple.com
  • 7 edits in branches/safari-606.1.24-branch/Source

Versioning.

10:09 AM Changeset in webkit [233688] by wilander@apple.com
  • 67 edits in trunk

Resource Load Statistics: Make testRunner.statisticsResetToConsistentState() take a completion handler
https://bugs.webkit.org/show_bug.cgi?id=187499
<rdar://problem/41999431>

Reviewed by Chris Dumez.

Source/WebKit:

  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreStatisticsResetToConsistentState):

Now uses a WTF::CallbackAggregator to call its
completion handler when both the call to
WebResourceLoadStatisticsStore::scheduleClearInMemory()
and to
WebResourceLoadStatisticsStore::resetParametersToDefaultValues()
are complete.

  • UIProcess/API/C/WKWebsiteDataStoreRef.h:
  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemory):

Now takes a WTF::CompletionHandler so that it can support the
completion handler in
WKWebsiteDataStoreStatisticsResetToConsistentState().

(WebKit::WebResourceLoadStatisticsStore::resetParametersToDefaultValues):

Now takes a WTF::CompletionHandler so that it can support the
completion handler in
WKWebsiteDataStoreStatisticsResetToConsistentState().

  • UIProcess/WebResourceLoadStatisticsStore.h:

Tools:

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::didReceiveMessageToPage):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::statisticsResetToConsistentState):
(WTR::TestRunner::statisticsCallDidResetToConsistentStateCallback):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::statisticsResetToConsistentState):

  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didResetStatisticsToConsistentState):

  • WebKitTestRunner/TestInvocation.h:

LayoutTests:

These changes are to adopt and make use of the new completion handler in
testRunner.statisticsResetToConsistentState().

  • http/tests/resourceLoadStatistics/add-blocking-to-redirect.html:
  • http/tests/resourceLoadStatistics/add-partitioning-to-redirect.html:
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-mixed-statistics.html:
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-sub-frame-under-top-frame-origins.html:
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-under-top-frame-origins.html:
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-unique-redirects-to.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-mixed-statistics.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-sub-frame-under-top-frame-origins.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-collusion.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-to-prevalent.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-under-top-frame-origins.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-unique-redirects-to.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-collusion.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-to-prevalent.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-unique-redirects-to.html:
  • http/tests/resourceLoadStatistics/classify-as-very-prevalent-based-on-mixed-statistics.html:
  • http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour.html:
  • http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store.html:
  • http/tests/resourceLoadStatistics/grandfathering.html:
  • http/tests/resourceLoadStatistics/non-prevalent-resource-with-user-interaction.html:
  • http/tests/resourceLoadStatistics/non-prevalent-resource-without-user-interaction.html:
  • http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context.html:
  • http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html:
  • http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
  • http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html:
  • http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
  • http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html:
  • http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
  • http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-deletion.html:
  • http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout-expected.txt:
  • http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout.html:
  • http/tests/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-handled-keydown.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-unhandled-keydown.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-timeout.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-without-user-interaction.html:
  • http/tests/resourceLoadStatistics/prune-statistics.html:
  • http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html:
  • http/tests/resourceLoadStatistics/remove-partitioning-in-redirect.html:
  • http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-ip-to-localhost-to-ip.html:
  • http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
  • http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html:
  • http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
  • http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html:
  • http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
  • http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-redirects.html:
  • http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-requests.html:
  • http/tests/resourceLoadStatistics/telemetry-generation.html:
  • http/tests/resourceLoadStatistics/third-party-cookie-with-and-without-user-interaction.html:
  • http/tests/resourceLoadStatistics/user-interaction-in-cross-origin-sub-frame.html:
  • http/tests/resourceLoadStatistics/user-interaction-only-reported-once-within-short-period-of-time.html:
  • http/tests/resourceLoadStatistics/user-interaction-reported-after-website-data-removal.html:
9:53 AM Changeset in webkit [233687] by rniwa@webkit.org
  • 12 edits in trunk

Disable cross-origin-window-policy by default
https://bugs.webkit.org/show_bug.cgi?id=187509

Reviewed by Chris Dumez.

Source/WebCore:

Disabled the feature by default.

  • page/Settings.yaml:

Source/WebKit:

  • Shared/WebPreferences.yaml:
  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetCrossOriginWindowPolicyEnabled):
(WKPreferencesGetCrossOriginWindowPolicyEnabled):

  • UIProcess/API/C/WKPreferencesRef.h:

Source/WebKitLegacy/mac:

  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):

Source/WebKitLegacy/win:

  • WebPreferences.cpp:

(WebPreferences::initializeDefaultSettings):

Tools:

Enable the feature for testing purposes. DumpRenderTree does this already in enableExperimentalFeatures.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetPreferencesToConsistentValues):

9:44 AM Changeset in webkit [233686] by Matt Baker
  • 6 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION (r217505): Debugger content view doesn't update when left sidebar is collapsed
https://bugs.webkit.org/show_bug.cgi?id=187482
<rdar://problem/41989190>

Reviewed by Brian Burg.

Subclasses of NavigationSidebarPanel must process tree selection changes
even when collapsed. Sidebar panels perform critical controller tasks
for their tabs, such as updating the view when pausing in the debugger,
and when the hierarchical path component selection changes.

  • UserInterface/Views/DebuggerSidebarPanel.js:

(WI.DebuggerSidebarPanel.prototype._treeSelectionDidChange):

  • UserInterface/Views/ResourceSidebarPanel.js:

(WI.ResourceSidebarPanel.prototype._treeSelectionDidChange):

  • UserInterface/Views/SearchSidebarPanel.js:

(WI.SearchSidebarPanel.prototype._treeSelectionDidChange):

  • UserInterface/Views/SourcesSidebarPanel.js:

(WI.SourcesSidebarPanel.prototype._treeSelectionDidChange):

  • UserInterface/Views/StorageSidebarPanel.js:

(WI.StorageSidebarPanel._treeSelectionDidChange):

9:35 AM Changeset in webkit [233685] by graouts@webkit.org
  • 3 edits in trunk/LayoutTests/imported/w3c

[Web Animations] Make WPT test at animation-model/keyframe-effects/effect-value-overlapping-keyframes.html pass reliably
https://bugs.webkit.org/show_bug.cgi?id=186492
<rdar://problem/41000150>

Reviewed by Dean Jackson.

While we've fixed handling of overlapping keyframes in the fix for webkit.org/b/187498 (r233676), we weren't passing
the dedicated WPT test because it assumed absolute accuracy when reading the computed style opacity. This isn't correct
per the CSS spec and the WPT test has been updated (see https://github.com/web-platform-tests/wpt/pull/11880). We're
reflecting this change in our copy of this test which now passes.

  • web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-overlapping-keyframes-expected.txt:
  • web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-overlapping-keyframes.html:
9:33 AM Changeset in webkit [233684] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[GTK][WPE] The LibWebRTCProvider object in RealtimeMediaSourceCenterLibWebRTC is not needed anymore
https://bugs.webkit.org/show_bug.cgi?id=187513

Patch by Alejandro G. Castro <alex@igalia.com> on 2018-07-10
Reviewed by Youenn Fablet.

We used the factory of the LibWebRTCProvider in
RealtimeMediaSourceCenterLibWebRTC as a singleton to make sure the
devices were correctly listed and used, we needed this when using
libwebrtc media devices management. We are now using GStreamer to handle
the media devices so this is not needed anymore.

No new tests, this change removed unused code.

  • platform/mediastream/gstreamer/RealtimeMediaSourceCenterLibWebRTC.cpp:

(WebCore::RealtimeMediaSourceCenterLibWebRTC::RealtimeMediaSourceCenterLibWebRTC):

  • platform/mediastream/gstreamer/RealtimeMediaSourceCenterLibWebRTC.h:
9:24 AM Changeset in webkit [233683] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

[ MacOS Debug ] Layout Test media/media-fragments/TC0015.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=187522

Unreviewed test gardening.

Patch by Truitt Savell <Truitt Savell> on 2018-07-10

  • platform/mac-wk1/TestExpectations:
6:44 AM Changeset in webkit [233682] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Rollout r233530: Candidate for Speedometer regression.
https://bugs.webkit.org/show_bug.cgi?id=187518

  • rendering/SimpleLineLayoutFlowContents.h:
3:15 AM Changeset in webkit [233681] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[Flatpak] Feature options to build-webkit and --makeargs are not passed inside the sandbox
https://bugs.webkit.org/show_bug.cgi?id=187470

Patch by Thibault Saunier <tsaunier@igalia.com> on 2018-07-10
Reviewed by Philippe Normand.

Never force building, the user is responsible to make that decision and the workflow is
now based on external scripts so it doesn't make sense anymore. Doing that leads
to ignoring the options the user passed in.

  • flatpak/flatpakutils.py:

(WebkitFlatpak.setup_dev_env):

1:23 AM Changeset in webkit [233680] by commit-queue@webkit.org
  • 5 edits in trunk/Tools

[Flatpak] Fix running wpt tests inside flatpak
https://bugs.webkit.org/show_bug.cgi?id=187490

Patch by Thibault Saunier <tsaunier@igalia.com> on 2018-07-10
Reviewed by Philippe Normand.

Still not *all* passing but a big majority do.

  • Scripts/webkitpy/w3c/wpt_runner.py:

(main): Generate the /etc/hosts and mount it in flatpak as required.
(WPTRunner.prepare_wpt_checkout): Renamed as we need to first checkout WPT code before generating /etc/hosts.
(WPTRunner._prepare_wpt_checkout): Deleted.

  • flatpak/flatpakutils.py: Added a stdout= argument to run_in_sandbox() and

added a way to pass extra env to flatpak itself (so we can mount /etc/hosts).
Stopped passing --device=all as it is not required since r233638 (Bug 187400).

  • flatpak/org.webkit.WebKit.yaml: Added virtualenv for python2 as required by wpt.
1:21 AM Changeset in webkit [233679] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[Flatpak] Use logging to print debug information
https://bugs.webkit.org/show_bug.cgi?id=187496

Patch by Thibault Saunier <tsaunier@igalia.com> on 2018-07-10
Reviewed by Philippe Normand.

  • flatpak/flatpakutils.py:

(WebkitFlatpak.load_from_args):
(WebkitFlatpak.clean_args):
(WebkitFlatpak.run_in_sandbox):

Jul 9, 2018:

11:23 PM Changeset in webkit [233678] by timothy_horton@apple.com
  • 5 edits in trunk/Source/WebKit

REGRESSION (r232416): Flickering when going back to Google search results on back swipe
https://bugs.webkit.org/show_bug.cgi?id=187506
<rdar://problem/41939594>

Reviewed by Chris Dumez.

Same document navigations won't have a preceding didStartProvisionalLoadForMainFrame,
so the code introduced in r232416 would immediately remove the snapshot
upon any same document navigation.

Instead, adjust r232416 slightly to start tracking snapshot removal events
after didStartProvisionalLoad OR didSameDocumentNavigation. Call the block
that starts tracking, then immediately fire the same-document navigation event.

  • UIProcess/Cocoa/ViewGestureController.cpp:

(WebKit::ViewGestureController::didStartProvisionalLoadForMainFrame):
(WebKit::ViewGestureController::didReachMainFrameLoadTerminalState):
(WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
(WebKit::ViewGestureController::SnapshotRemovalTracker::stopWaitingForEvent):

  • UIProcess/Cocoa/ViewGestureController.h:
  • UIProcess/ios/ViewGestureControllerIOS.mm:

(WebKit::ViewGestureController::endSwipeGesture):

  • UIProcess/mac/ViewGestureControllerMac.mm:

(WebKit::ViewGestureController::endSwipeGesture):

11:13 PM Changeset in webkit [233677] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WTF

Unreviewed follow-up to r233660.

  • wtf/linux/MemoryFootprintLinux.cpp:

(WTF::memoryFootprint): Revert accidental change of logical OR into a bitwise OR.

7:33 PM Changeset in webkit [233676] by graouts@webkit.org
  • 6 edits in trunk

[Web Animations] Correct handle repetition of composite and easing values
https://bugs.webkit.org/show_bug.cgi?id=187498
<rdar://problem/41999183>

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark 6 new WPT progressions.

  • web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt:
  • web-platform-tests/web-animations/interfaces/KeyframeEffect/constructor-expected.txt:
  • web-platform-tests/web-animations/interfaces/KeyframeEffect/setKeyframes-expected.txt:

Source/WebCore:

If there are fewer values for "easing" and "composite" than there are keyframes, we are supposed to
fill in missing values by repeating the pattern of specified values. We were starting our iteration
to fill those missing values on the second missing value rather than the first missing value.

  • animation/KeyframeEffectReadOnly.cpp:

(WebCore::processPropertyIndexedKeyframes):

7:06 PM Changeset in webkit [233675] by youenn@apple.com
  • 2 edits
    2 deletes in trunk/Source/WebKit

Remove cfca.com.npCryptoKit.CGB.MAC.sb and cfca.com.npP11CertEnroll.MAC.CGB.sb
https://bugs.webkit.org/show_bug.cgi?id=187487
<rdar://problem/41991584>

Reviewed by Alexey Proskuryakov.

  • Resources/PlugInSandboxProfiles/cfca.com.npCryptoKit.CGB.MAC.sb: Removed.
  • Resources/PlugInSandboxProfiles/cfca.com.npP11CertEnroll.MAC.CGB.sb: Removed.
  • WebKit.xcodeproj/project.pbxproj:
6:18 PM Changeset in webkit [233674] by msaboff@apple.com
  • 2 edits in trunk/JSTests

REGRESSION (ICU-62100.0.1): JSC test mozilla-tests.yaml/ecma/String/15.5.4.12-3.js is failing
https://bugs.webkit.org/show_bug.cgi?id=187495

Reviewed by Saam Barati.

Commented out the Georgian section of this toUpper() test since Unicode 11 added new upper case characters for
most of this range.

  • mozilla/ecma/String/15.5.4.12-3.js:

(getTestCases):
(DecimalToHexString):

5:39 PM Changeset in webkit [233673] by commit-queue@webkit.org
  • 5 edits
    1 delete in trunk/Source/bmalloc

Unreviewed, rolling out r233547 and r233550.
https://bugs.webkit.org/show_bug.cgi?id=187497

Introduced flakiness for media/fullscreen-* tests on mac-wk1
(Requested by ryanhaddad on #webkit).

Reverted changesets:

"Disable IsoHeaps when Gigacage is off"
https://bugs.webkit.org/show_bug.cgi?id=187160
https://trac.webkit.org/changeset/233547

"Build fix (r233547): Disable IsoHeaps when Gigacage is off"
https://bugs.webkit.org/show_bug.cgi?id=187160
https://trac.webkit.org/changeset/233550

5:26 PM Changeset in webkit [233672] by youenn@apple.com
  • 8 edits in trunk/Source

Add the possibility to run unsandboxed plug-ins
https://bugs.webkit.org/show_bug.cgi?id=187310
<rdar://problem/41798808>

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Add a runtime flag to enforce plugin sandboxing.
Covered by manual testing.

  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setSandboxPlugInEnabled):
(WebCore::RuntimeEnabledFeatures::sandboxPlugInEnabled const):

Source/WebKit:

Add a utility method to know which plug-ins are allowed to run unsandboxed.
For such plug-ins, we skip the sandboxing done when starting the plug-in process.

  • PluginProcess/mac/PluginProcessMac.mm:

(WebKit::PluginProcess::initializeSandbox):

  • Shared/WebPreferences.yaml:
  • UIProcess/Plugins/PluginInfoStore.cpp:

(WebKit::PluginInfoStore::shouldRunPluginUnsandboxed):

  • UIProcess/Plugins/PluginInfoStore.h:
  • UIProcess/Plugins/mac/PluginInfoStoreMac.mm:

(WebKit::PluginInfoStore::shouldRunPluginUnsandboxed):
(WebKit::PluginInfoStore::shouldUsePlugin):

5:25 PM Changeset in webkit [233671] by dino@apple.com
  • 18 edits
    4 deletes in trunk

Remove fullscreen-auto-hide-delay
https://bugs.webkit.org/show_bug.cgi?id=187493
<rdar://problem/41830852>

Reviewed by Antoine Quint.

Source/WebCore:

Remove the env() value for fullscreen-auto-hide-delay.

  • dom/ConstantPropertyMap.cpp:

(WebCore::ConstantPropertyMap::nameForProperty const):
(WebCore::ConstantPropertyMap::setFullscreenAutoHideDelay): Deleted.

  • dom/ConstantPropertyMap.h:
  • page/Page.cpp:

(WebCore::Page::setFullscreenAutoHideDelay): Deleted.

  • page/Page.h:
  • testing/Internals.cpp:

(WebCore::Internals::resetToConsistentState): No need to reset delay.
(WebCore::Internals::setFullscreenAutoHideDelay): Deleted.

  • testing/Internals.h: Remove the delay setter/getter.
  • testing/Internals.idl:

Source/WebKit:

Now there is no delay, rename setFullscreenAutoHideTiming to setFullscreenAutoHideDuration,
and only send that value over to the Web Process.

  • UIProcess/WebFullScreenManagerProxy.cpp:

(WebKit::WebFullScreenManagerProxy::setFullscreenAutoHideDuration):
(WebKit::WebFullScreenManagerProxy::setFullscreenAutoHideTiming): Deleted.

  • UIProcess/WebFullScreenManagerProxy.h:
  • UIProcess/ios/fullscreen/WKFullScreenViewController.mm:

(-[WKFullScreenViewController viewWillAppear:]):

  • WebProcess/FullScreen/WebFullScreenManager.cpp:

(WebKit::WebFullScreenManager::didExitFullScreen):
(WebKit::WebFullScreenManager::setFullscreenAutoHideDuration):
(WebKit::WebFullScreenManager::setFullscreenAutoHideTiming): Deleted.

  • WebProcess/FullScreen/WebFullScreenManager.h:
  • WebProcess/FullScreen/WebFullScreenManager.messages.in:

LayoutTests:

Update the existing test that partially used the delay, and remove the ones that
used only the delay.

  • fullscreen/fullscreen-auto-hide-delay-expected.txt: Removed.
  • fullscreen/fullscreen-auto-hide-delay.html: Removed.
  • fullscreen/fullscreen-env-expected.txt:
  • fullscreen/fullscreen-env.html:
  • legacy-animation-engine/fullscreen/fullscreen-auto-hide-delay-expected.txt: Removed.
  • legacy-animation-engine/fullscreen/fullscreen-auto-hide-delay.html: Removed.
5:22 PM Changeset in webkit [233670] by timothy@apple.com
  • 16 edits in trunk

Semantic colors don't update when accessibility Increase Contrast mode is enabled.
https://bugs.webkit.org/show_bug.cgi?id=187425
rdar://problem/39948240
Source/WebCore:

Reviewed by Tim Horton.

Added a listener for the accessibility change notification to invalidate our color caches.

Removed calls to RenderTheme::singleton().platformColorsDidChange() in Page, since that
ended up calling Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment multiple times.
Instead, changed the functions to use the new instance version instead.

  • page/Page.cpp:

(WebCore::Page::updateStyleAfterChangeInEnvironment): Added. Gives Page a direct way to do this work
per instance instead of on all pages (since appearance can be difference per view).
(WebCore::Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment): Call updateStyleAfterChangeInEnvironment.
(WebCore::Page::setUseSystemAppearance): Call updateStyleAfterChangeInEnvironment.
(WebCore::Page::setUseDarkAppearance): Added. Call updateStyleAfterChangeInEnvironment.

  • page/Page.h:

(WebCore::Page::setUseDarkAppearance): Moved to the implementation file.

  • platform/mac/LocalDefaultSystemAppearance.mm:

(WebCore::LocalDefaultSystemAppearance::LocalDefaultSystemAppearance): Removed recursive check since it was interfering
with the setting of m_usingDarkAppearance and causing the wrong color cache to be used.
(WebCore::LocalDefaultSystemAppearance::~LocalDefaultSystemAppearance): Ditto.

  • rendering/RenderThemeMac.mm:

(-[WebCoreRenderThemeNotificationObserver init]): Listen for NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification.
(-[WebCoreRenderThemeNotificationObserver systemColorsDidChange:]): Removed assert since multiple notifications are used now.
(WebCore::RenderThemeMac::systemColor): Change how system link colors are cached. Don't store useSystemAppearance link colors in the
ColorCache, since that special bool isn't considered in the cache after the first time.

Source/WebKit:

Reviewed by Tim Horton.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]): Moved call to setUseDarkAppearance to WebViewImpl.
(-[WKWebView _setUseSystemAppearance:]): No need to call setUseDarkAppearance here anymore.
(-[WKWebView viewDidChangeEffectiveAppearance]): Added. This is the proper NSView method to use.
(-[WKWebView _effectiveAppearanceIsDark]): Deleted.
(-[WKWebView effectiveAppearanceDidChange]): Deleted. This method is a deprecated name.

  • UIProcess/API/mac/WKView.mm:

(-[WKView viewDidChangeEffectiveAppearance]): Added. This is the proper NSView method to use.
(-[WKView _setUseSystemAppearance:]): No need to call setUseDarkAppearance here anymore.
(-[WKView _effectiveAppearanceIsDark]): Deleted.
(-[WKView effectiveAppearanceDidChange]): Deleted. This method is a deprecated name.

  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::WebViewImpl): Call setUseDarkAppearance before page config is sent in initializeWebPage.
(WebKit::WebViewImpl::effectiveAppearanceDidChange): Added.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::setUseDarkAppearance): WebCore::Page::setUseDarkAppearance now handles the style changes.
The RenderTheme color caches also don't need cleared with platformColorsDidChange(), since we cache light
and dark colors seperatly in RenderThemeMac.

Source/WebKitLegacy/mac:

Reviewed by Tim Horton.

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]): Removed call to
_updateDefaultAppearance, which called setUseDarkAppearance. There is already
a call in this method to setUseDarkAppearance.
(-[WebView _setUseSystemAppearance:]): Just call the page, not setUseDarkAppearance.
(-[WebView viewDidChangeEffectiveAppearance]): Added. This is the proper NSView method to use.
(-[WebView _updateDefaultAppearance]): Deleted.
(-[WebView effectiveAppearanceDidChange]): Deleted. This method is a deprecated name.

Tools:

rdar://problem/41796865

Reviewed by Tim Horton.

  • TestWebKitAPI/Tests/WebKitCocoa/SystemColors.mm:

(TestWebKitAPI.WebKit.LinkColorWithSystemAppearance): Use new color value.

5:09 PM Changeset in webkit [233669] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

Layout Test imported/w3c/web-platform-tests/service-workers/service-worker/update-after-navigation-fetch-event.https.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=187484

Unreviewed test gardening.

Patch by Truitt Savell <Truitt Savell> on 2018-07-09

  • platform/mac/TestExpectations:
4:54 PM Changeset in webkit [233668] by Simon Fraser
  • 106 edits in trunk/Source

Shrink various loading-related enums to shrink CachedResource
https://bugs.webkit.org/show_bug.cgi?id=187443

Reviewed by Chris Dumez.
Source/WebCore:

ResourceRequestBase, ResourceResponseBase, ResourceLoaderOptions, FetchOptions and
CachedResource have a lot of enum members variables most of which took 4 bytes each.
These can be packed much more efficiently if the enums are declared with an 8-bit size.
This requires turning enums into enum classes in some cases.

This reduces the size of CachedResource from 1464 to 1384 bytes, which saves about 49KB
over the ~600 CachedResources on nytimes.com.

  • Modules/fetch/FetchLoader.cpp:

(WebCore::FetchLoader::startLoadingBlobURL):
(WebCore::FetchLoader::start):

  • css/StyleRuleImport.cpp:

(WebCore::StyleRuleImport::requestStyleSheet):

  • fileapi/FileReaderLoader.cpp:

(WebCore::FileReaderLoader::start):

  • html/MediaDocument.cpp:

(WebCore::MediaDocumentParser::createDocumentStructure):

  • html/PluginDocument.cpp:

(WebCore::PluginDocumentParser::appendBytes):

  • html/parser/CSSPreloadScanner.cpp:

(WebCore::CSSPreloadScanner::emitRule):

  • html/parser/HTMLPreloadScanner.cpp:

(WebCore::TokenPreloadScanner::StartTagScanner::resourceType const):

  • inspector/NetworkResourcesData.cpp:

(WebCore::shouldBufferResourceData):

  • inspector/agents/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::didReceiveResponse):
(WebCore::InspectorNetworkAgent::loadResource):
(WebCore::InspectorNetworkAgent::cachedResourceContent):

  • inspector/agents/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::sourceMapURLForResource):
(WebCore::InspectorPageAgent::inspectorResourceType):

  • loader/ApplicationManifestLoader.cpp:

(WebCore::ApplicationManifestLoader::startLoading):

  • loader/ContentFilter.cpp:

(WebCore::ContentFilter::deliverResourceData):

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::notifyFinished):
(WebCore::DocumentLoader::willSendRequest):
(WebCore::DocumentLoader::tryLoadingRedirectRequestFromApplicationCache):
(WebCore::DocumentLoader::subresource const):
(WebCore::DocumentLoader::loadMainResource):

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
(WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):
(WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest):
(WebCore::DocumentThreadableLoader::preflightSuccess):
(WebCore::DocumentThreadableLoader::loadRequest):

  • loader/FetchOptions.h:

(WebCore::FetchOptions::FetchOptions):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadFrameRequest):
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::load):
(WebCore::FrameLoader::reloadWithOverrideEncoding):
(WebCore::FrameLoader::reload):
(WebCore::FrameLoader::defaultRequestCachingPolicy):
(WebCore::FrameLoader::addExtraFieldsToRequest):
(WebCore::FrameLoader::loadedResourceFromMemoryCache):
(WebCore::FrameLoader::loadDifferentDocumentItem):

  • loader/LinkLoader.cpp:

(WebCore::LinkLoader::resourceTypeFromAsAttribute):
(WebCore::createLinkPreloadResourceClient):
(WebCore::LinkLoader::isSupportedType):
(WebCore::LinkLoader::prefetchIfNeeded):

  • loader/MediaResourceLoader.cpp:

(WebCore::MediaResourceLoader::requestResource):

  • loader/NavigationScheduler.cpp:

(WebCore::NavigationScheduler::scheduleLocationChange):

  • loader/NetscapePlugInStreamLoader.cpp:

(WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):

  • loader/ResourceLoadInfo.cpp:

(WebCore::toResourceType):

  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::init):
(WebCore::ResourceLoader::start):
(WebCore::ResourceLoader::setDataBufferingPolicy):
(WebCore::ResourceLoader::addDataOrBuffer):
(WebCore::ResourceLoader::willSendRequestInternal):
(WebCore::ResourceLoader::didReceiveResponse):
(WebCore::ResourceLoader::didReceiveDataOrBuffer):
(WebCore::ResourceLoader::didFinishLoadingOnePart):
(WebCore::ResourceLoader::cleanupForError):

  • loader/ResourceLoader.h:

(WebCore::ResourceLoader::shouldSendResourceLoadCallbacks const):
(WebCore::ResourceLoader::shouldSniffContent const):
(WebCore::ResourceLoader::shouldIncludeCertificateInfo const):

  • loader/ResourceLoaderOptions.h:
  • loader/ResourceTimingInformation.cpp:

(WebCore::ResourceTimingInformation::addResourceTiming):
(WebCore::ResourceTimingInformation::storeResourceTimingInitiatorInformation):

  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::SubresourceLoader):
(WebCore::SubresourceLoader::willSendRequestInternal):
(WebCore::SubresourceLoader::shouldCreatePreviewLoaderForResponse const):
(WebCore::SubresourceLoader::didReceiveResponse):
(WebCore::logResourceLoaded):
(WebCore::SubresourceLoader::didFinishLoading):
(WebCore::SubresourceLoader::didFail):
(WebCore::SubresourceLoader::didCancel):

  • loader/cache/CachedApplicationManifest.cpp:

(WebCore::CachedApplicationManifest::CachedApplicationManifest):

  • loader/cache/CachedApplicationManifest.h:
  • loader/cache/CachedCSSStyleSheet.cpp:

(WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):

  • loader/cache/CachedCSSStyleSheet.h:
  • loader/cache/CachedFont.h:
  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::CachedImage):
(WebCore::CachedImage::updateBuffer):
(WebCore::CachedImage::updateData):

  • loader/cache/CachedImage.h:
  • loader/cache/CachedRawResource.cpp:

(WebCore::CachedRawResource::updateBuffer):
(WebCore::CachedRawResource::updateData):
(WebCore::CachedRawResource::finishLoading):
(WebCore::CachedRawResource::canReuse const):

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::defaultPriorityForResourceType):
(WebCore::deadDecodedDataDeletionIntervalForResourceType):
(WebCore::CachedResource::CachedResource):
(WebCore::CachedResource::load):
(WebCore::CachedResource::updateBuffer):
(WebCore::CachedResource::updateData):
(WebCore::CachedResource::isCORSSameOrigin const):
(WebCore::CachedResource::freshnessLifetime const):
(WebCore::CachedResource::setResponse):
(WebCore::CachedResource::addClientToSet):
(WebCore::CachedResource::areAllClientsXMLHttpRequests const):

  • loader/cache/CachedResource.h:

(WebCore::CachedResource::isImage const):
(WebCore::CachedResource::isMainOrMediaOrIconOrRawResource const):
(WebCore::CachedResource::ignoreForRequestCount const):
(WebCore::CachedResource::shouldSendResourceLoadCallbacks const):

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::createResource):
(WebCore::CachedResourceLoader::requestImage):
(WebCore::CachedResourceLoader::requestFont):
(WebCore::CachedResourceLoader::requestTextTrack):
(WebCore::CachedResourceLoader::requestCSSStyleSheet):
(WebCore::CachedResourceLoader::requestScript):
(WebCore::CachedResourceLoader::requestXSLStyleSheet):
(WebCore::CachedResourceLoader::requestSVGDocument):
(WebCore::CachedResourceLoader::requestLinkResource):
(WebCore::CachedResourceLoader::requestMedia):
(WebCore::CachedResourceLoader::requestIcon):
(WebCore::CachedResourceLoader::requestRawResource):
(WebCore::CachedResourceLoader::requestBeaconResource):
(WebCore::CachedResourceLoader::requestMainResource):
(WebCore::CachedResourceLoader::requestApplicationManifest):
(WebCore::contentTypeFromResourceType):
(WebCore::CachedResourceLoader::checkInsecureContent const):
(WebCore::CachedResourceLoader::allowedByContentSecurityPolicy const):
(WebCore::CachedResourceLoader::canRequest):
(WebCore::CachedResourceLoader::canRequestInContentDispositionAttachmentSandbox const):
(WebCore::CachedResourceLoader::shouldUpdateCachedResourceWithCurrentRequest):
(WebCore::isResourceSuitableForDirectReuse):
(WebCore::destinationForType):
(WebCore::CachedResourceLoader::loadResource):
(WebCore::CachedResourceLoader::determineRevalidationPolicy const):
(WebCore::CachedResourceLoader::cachePolicy const):
(WebCore::CachedResourceLoader::preload):
(WebCore::CachedResourceLoader::warnUnusedPreloads):
(WebCore::CachedResourceLoader::clearPreloads):
(WebCore::CachedResourceLoader::defaultCachedResourceOptions):

  • loader/cache/CachedResourceRequest.cpp:

(WebCore::CachedResourceRequest::updateAccordingCacheMode):

  • loader/cache/CachedResourceRequest.h:
  • loader/cache/CachedSVGDocument.cpp:

(WebCore::CachedSVGDocument::CachedSVGDocument):

  • loader/cache/CachedSVGDocument.h:
  • loader/cache/CachedSVGFont.cpp:

(WebCore::CachedSVGFont::CachedSVGFont):

  • loader/cache/CachedSVGFont.h:
  • loader/cache/CachedScript.cpp:

(WebCore::CachedScript::CachedScript):

  • loader/cache/CachedScript.h:
  • loader/cache/CachedTextTrack.cpp:

(WebCore::CachedTextTrack::CachedTextTrack):
(WebCore::CachedTextTrack::doUpdateBuffer):

  • loader/cache/CachedTextTrack.h:
  • loader/cache/CachedXSLStyleSheet.cpp:

(WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):

  • loader/cache/CachedXSLStyleSheet.h:
  • loader/cache/MemoryCache.cpp:

(WebCore::MemoryCache::getStatistics):

  • loader/icon/IconLoader.cpp:

(WebCore::IconLoader::startLoading):

  • loader/mac/ResourceLoaderMac.mm:

(WebCore::ResourceLoader::willCacheResponseAsync):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::createWindow):

  • page/EventSource.cpp:

(WebCore::EventSource::connect):

  • platform/ReferrerPolicy.h:
  • platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:

(WebCore::WebCoreAVFResourceLoader::startLoading):

  • platform/ios/QuickLook.mm:

(WebCore::registerQLPreviewConverterIfNeeded):

  • platform/network/CacheValidation.cpp:

(WebCore::updateRedirectChainStatus):
(WebCore::redirectChainAllowsReuse):

  • platform/network/CacheValidation.h:

(WebCore::RedirectChainCacheStatus::RedirectChainCacheStatus):

  • platform/network/ResourceErrorBase.h:
  • platform/network/ResourceLoadPriority.h:
  • platform/network/ResourceRequestBase.cpp:

(WebCore::ResourceRequestBase::httpBody const):
(WebCore::ResourceRequestBase::updatePlatformRequest const):
(WebCore::ResourceRequestBase::updateResourceRequest const):

  • platform/network/ResourceRequestBase.h:
  • platform/network/ResourceResponseBase.h:
  • platform/network/StoredCredentialsPolicy.h:
  • platform/network/cf/ResourceRequest.h:

(WebCore::ResourceRequest::ResourceRequest):

  • platform/network/cf/ResourceRequestCFNet.cpp:

(WebCore::toPlatformRequestCachePolicy):
(WebCore::fromPlatformRequestCachePolicy):
(WebCore::ResourceRequest::doUpdateResourceRequest):

  • platform/network/cocoa/ResourceRequestCocoa.mm:

(WebCore::fromPlatformRequestCachePolicy):
(WebCore::toPlatformRequestCachePolicy):
(WebCore::ResourceRequest::doUpdateResourceRequest):

  • platform/network/cocoa/WebCoreNSURLSession.mm:

(-[WebCoreNSURLSessionDataTask resource:receivedRedirect:request:completionHandler:]):

  • platform/network/ios/PreviewConverter.mm:

(WebCore::PreviewConverter::safeRequest const):

  • platform/network/mac/ResourceHandleMac.mm:

(WebCore::ResourceHandle::createNSURLConnection):
(WebCore::ResourceHandle::start):
(WebCore::ResourceHandle::platformLoadResourceSynchronously):

  • platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:

(-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):

  • testing/Internals.cpp:

(WebCore::toResourceRequestCachePolicy):

  • workers/WorkerScriptLoader.cpp:

(WebCore::WorkerScriptLoader::loadSynchronously):
(WebCore::WorkerScriptLoader::loadAsynchronously):

  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::createRequest):

Source/WebKit:

  • NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm:

(WebKit::LegacyCustomProtocolManager::wasRedirectedToRequest):

  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::continueWillSendRequest):

  • NetworkProcess/NetworkLoadParameters.h:
  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::canUseCache const):
(WebKit::NetworkResourceLoader::retrieveCacheEntry):

  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::cachePolicyAllowsExpired):
(WebKit::NetworkCache::makeRetrieveDecision):

  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:

(WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
(-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):

  • Shared/API/c/mac/WKURLRequestNS.mm:

(WKURLRequestCopyNSURLRequest):

  • Shared/Cocoa/WKNSURLRequest.mm:

(-[WKNSURLRequest _web_createTarget]):

  • Shared/mac/WebCoreArgumentCodersMac.mm:

(IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):

  • UIProcess/API/Cocoa/WKFrameInfo.mm:

(-[WKFrameInfo request]):

  • UIProcess/API/Cocoa/WKNavigation.mm:

(-[WKNavigation _request]):

  • UIProcess/API/Cocoa/WKNavigationAction.mm:

(-[WKNavigationAction request]):

  • UIProcess/API/Cocoa/WKNavigationData.mm:

(-[WKNavigationData originalRequest]):

  • UIProcess/API/Cocoa/WKNavigationResponse.mm:

(-[WKNavigationResponse _request]):

  • UIProcess/API/Cocoa/WKURLSchemeTask.mm:

(-[WKURLSchemeTaskImpl request]):

  • UIProcess/API/Cocoa/_WKDownload.mm:

(-[_WKDownload request]):

  • UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm:

(WebKit::LegacyCustomProtocolManagerClient::startLoading):

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::maximumBufferingTime):
(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
(WebKit::WebLoaderStrategy::loadResourceSynchronously):

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::platformCanHandleRequest):

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::convertMainResourceLoadToDownload):
(WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
(WebFrameLoaderClient::assignIdentifierToInitialRequest):
(WebFrameLoaderClient::dispatchWillSendRequest):
(WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
(WebFrameLoaderClient::updateGlobalHistory):
(WebFrameLoaderClient::canHandleRequest const):

  • WebView/WebDataSource.mm:

(-[WebDataSource initialRequest]):
(-[WebDataSource request]):

4:52 PM Changeset in webkit [233667] by graouts@webkit.org
  • 10 edits
    2 copies in trunk

[Web Animations] Make WPT test at interfaces/DocumentTimeline/constructor.html pass reliably
https://bugs.webkit.org/show_bug.cgi?id=186498
<rdar://problem/41000205>
LayoutTests/imported/w3c:

Reviewed by Dean Jackson.

Mark 4 new WPT progressions.

  • web-platform-tests/web-animations/interfaces/DocumentTimeline/constructor-expected.txt:

Source/WebCore:

Reviewed by Dean Jackson.

Add a Constructor to the DocumentTimeline IDL to match the spec and ensure we respect the provided
origin time. To ensure all DocumentTimeline instances report matching current times, we read the
current time from the "main" document timeline, the one created by the Document automatically.

  • CMakeLists.txt:
  • DerivedSources.make:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • animation/DocumentTimeline.cpp:

(WebCore::DocumentTimeline::create):
(WebCore::DocumentTimeline::DocumentTimeline):
(WebCore::DocumentTimeline::currentTime):

  • animation/DocumentTimeline.h:
  • animation/DocumentTimeline.idl:
  • animation/DocumentTimelineOptions.h:
  • animation/DocumentTimelineOptions.idl:
4:48 PM Changeset in webkit [233666] by graouts@webkit.org
  • 8 edits in trunk

[Web Animations] Support overlapping keyframes
https://bugs.webkit.org/show_bug.cgi?id=187481
<rdar://problem/41988674>

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark 20 new WPT progressions and 2 different failures.

  • web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-overlapping-keyframes-expected.txt:
  • web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt:
  • web-platform-tests/web-animations/interfaces/KeyframeEffect/constructor-expected.txt:
  • web-platform-tests/web-animations/interfaces/KeyframeEffect/setKeyframes-expected.txt:

Source/WebCore:

We now support parsing of multiple keyframes for the same offset.

  • animation/KeyframeEffectReadOnly.cpp:

(WebCore::computeMissingKeyframeOffsets): Keyframes with a null offset that don't yet have a non-zero
computed offset are keyframes with an offset that needs to be computed.
(WebCore::KeyframeEffectReadOnly::processKeyframes): Only file an exception if an offset is found that
is lower than a previously-parsed one, allowing offsets with the same value.

  • rendering/style/KeyframeList.cpp:

(WebCore::KeyframeList::insert): Remove the assertion that prevented an offset to be found more than once.

4:46 PM Changeset in webkit [233665] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

[macOS] Layout Test fast/hidpi/filters-and-image-buffer-resolution.html is flaky, but no longer Flaky on [iOS]
https://bugs.webkit.org/show_bug.cgi?id=187491

Unreviewed test gardening

Patch by Truitt Savell <Truitt Savell> on 2018-07-09

  • platform/ios-wk2/TestExpectations:
  • platform/mac/TestExpectations:
4:46 PM Changeset in webkit [233664] by bshafiei@apple.com
  • 1 copy in tags/Safari-606.1.24.5

Tag Safari-606.1.24.5.

4:28 PM Changeset in webkit [233663] by bshafiei@apple.com
  • 3 edits in branches/safari-606.1.24-branch/Source/WebKit

Cherry-pick r233601. rdar://problem/41909647

Add release assertions to try and catch a possible HashMap corruption in NetworkConnectionToWebProcess
https://bugs.webkit.org/show_bug.cgi?id=187417

Reviewed by Ryosuke Niwa.

Add assertions to make sure we:

  • Always use NetworkConnectionToWebProcess::m_networkResourceLoaders from the main thread
  • Never use a 0 identifier as key for NetworkConnectionToWebProcess::m_networkResourceLoaders

We see crashes (rdar://problem/39265927) that only seem to make sense if this HashMap was
somehow getting corrupted. Let's try and catch the most common reasons for HashMap corruption.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::didCleanupResourceLoader): (WebKit::NetworkConnectionToWebProcess::didReceiveMessage): (WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad): (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad): (WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier): (WebKit::NetworkConnectionToWebProcess::setDefersLoading): (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
  • WebProcess/Network/WebResourceLoader.cpp: (WebKit::WebResourceLoader::messageSenderDestinationID):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233601 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4:11 PM Changeset in webkit [233662] by beidson@apple.com
  • 2 edits in trunk/LayoutTests

Continued unreviewed hacking on this test because that's my full time job now.

  • storage/indexeddb/modern/opendatabase-after-storage-crash.html:
4:07 PM Changeset in webkit [233661] by Simon Fraser
  • 4 edits in trunk/Tools

Fix dump-class-layout to show bit padding, and fix issues with padding offsets
https://bugs.webkit.org/show_bug.cgi?id=187442

Reviewed by Daniel Bates.

Synthetic padding members were shown with the wrong offset because they used the
absolute offset rather than the class-relative offset. This didn't change the padding
math, but made the output confusing.

Also add support for showing empty bits in bitfields, and fix computation of padding
after bitfields. Empty bits are computed by inserting a bit padding member after
a bitfield that is not followed by another bitfield (making the assumption that bit
padding will fill to the next byte boundary).

The computation of padding after bitfields was also wrong, since lldb's member_type.GetByteSize()
just reports the size of the type without the bitfield modifier (e.g. for "unsigned : 2" it returned 4).
Fix by setting the byte size for bitfield fields to the number of bits rounded up to the next byte;
this allows byte padding following the bitfield to be computed correctly.

Add or modify test to cover these issues.

  • lldb/dump_class_layout_unittest.py:

(serial_test_ClassWithPaddedBitfields):
(serial_test_MemberHasBitfieldPadding):
(serial_test_InheritsFromClassWithPaddedBitfields):

  • lldb/lldbWebKitTester/DumpClassLayoutTesting.cpp:

(avoidClassDeadStripping):

  • lldb/lldb_dump_class_layout.py:

(ClassLayoutBase):
(ClassLayoutBase._to_string_recursive):
(ClassLayout._parse):
(ClassLayout._compute_padding_recursive):

3:30 PM Changeset in webkit [233660] by youenn@apple.com
  • 9 edits in trunk

StringView operator==(char*) should check the length of the string
https://bugs.webkit.org/show_bug.cgi?id=187422

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/eventsource/format-field-parsing-expected.txt:

Source/WebCore:

Covered by existing tests.

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::databaseNameFromEncodedFilename):

Source/WTF:

Update StringView operator== to ensure that any character raw pointer comparison actually check the length of the raw pointer string.
This patch mimicks the behavior of String.
For instance, comparing a StringView with "he\0llo" and "he" will give the same result.

  • wtf/linux/MemoryFootprintLinux.cpp:

(WTF::memoryFootprint):

  • wtf/text/StringView.h:

(WTF::operator==):
(WTF::operator!=):
(WTF::equal):
(WTF::StringView::stripLeadingAndTrailingMatchedCharacters):

Tools:

  • TestWebKitAPI/Tests/WTF/StringView.cpp:

(TestWebKitAPI::equal2):
(TestWebKitAPI::TEST):

2:56 PM Changeset in webkit [233659] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

WebProcessProxy::topPrivatelyControlledDomainsWithWebsiteData() fails to protect the page in its lambda
https://bugs.webkit.org/show_bug.cgi?id=187478
<rdar://problem/41975998>

Reviewed by Youenn Fablet.

Make sure we protect the WebPageProxy when we capture it in the lambda or it might go away by the
time the lambda gets called.

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::topPrivatelyControlledDomainsWithWebsiteData):

2:55 PM Changeset in webkit [233658] by mark.lam@apple.com
  • 10 edits in trunk/Source/JavaScriptCore

Add --traceLLIntExecution and --traceLLIntSlowPath options.
https://bugs.webkit.org/show_bug.cgi?id=187479

Reviewed by Yusuke Suzuki and Saam Barati.

These options are only available if LLINT_TRACING is enabled in LLIntCommon.h.

The details:

  1. LLINT_TRACING consolidates and replaces LLINT_EXECUTION_TRACING and LLINT_SLOW_PATH_TRACING.
  2. Tracing is now guarded behind runtime options --traceLLIntExecution and --traceLLIntSlowPath. This makes it such that enabling LLINT_TRACING doesn't means that we'll continually spammed with logging until we rebuild.
  3. Fixed slow path LLINT tracing to work with exception check validation.
  • llint/LLIntCommon.h:
  • llint/LLIntExceptions.cpp:

(JSC::LLInt::returnToThrow):
(JSC::LLInt::callToThrow):

  • llint/LLIntOfflineAsmConfig.h:
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::slowPathLog):
(JSC::LLInt::slowPathLn):
(JSC::LLInt::slowPathLogF):
(JSC::LLInt::slowPathLogLn):
(JSC::LLInt::llint_trace_operand):
(JSC::LLInt::llint_trace_value):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
(JSC::LLInt::traceFunctionPrologue):
(JSC::LLInt::handleHostCall):
(JSC::LLInt::setUpCall):

  • llint/LLIntSlowPaths.h:
  • llint/LowLevelInterpreter.asm:
  • runtime/CommonSlowPathsExceptions.cpp:

(JSC::CommonSlowPaths::interpreterThrowInCaller):

  • runtime/Options.cpp:

(JSC::Options::isAvailable):

  • runtime/Options.h:
2:29 PM Changeset in webkit [233657] by Yusuke Suzuki
  • 14 edits in trunk/Source/JavaScriptCore

[JSC] Embed RegExp into constant buffer in UnlinkedCodeBlock and CodeBlock
https://bugs.webkit.org/show_bug.cgi?id=187477

Reviewed by Mark Lam.

Before this patch, RegExp* is specially held in m_regexp buffer which resides in CodeBlock's RareData.
However, it is not necessary since JSCells can be reside in a constant buffer.
This patch embeds RegExp* to a constant buffer in UnlinkedCodeBlock and CodeBlock. And remove RegExp
vector from RareData.

We also move the code of dumping RegExp from BytecodeDumper to RegExp::dumpToStream.

  • bytecode/BytecodeDumper.cpp:

(JSC::BytecodeDumper<Block>::dumpBytecode):
(JSC::BytecodeDumper<Block>::dumpBlock):
(JSC::regexpToSourceString): Deleted.
(JSC::regexpName): Deleted.
(JSC::BytecodeDumper<Block>::dumpRegExps): Deleted.

  • bytecode/BytecodeDumper.h:
  • bytecode/CodeBlock.h:

(JSC::CodeBlock::regexp const): Deleted.
(JSC::CodeBlock::numberOfRegExps const): Deleted.

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::visitChildren):
(JSC::UnlinkedCodeBlock::shrinkToFit):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::addRegExp): Deleted.
(JSC::UnlinkedCodeBlock::numberOfRegExps const): Deleted.
(JSC::UnlinkedCodeBlock::regexp const): Deleted.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitNewRegExp):
(JSC::BytecodeGenerator::addRegExp): Deleted.

  • bytecompiler/BytecodeGenerator.h:
  • dfg/DFGByteCodeParser.cpp:

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

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_new_regexp):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • runtime/JSCJSValue.cpp:

(JSC::JSValue::dumpInContextAssumingStructure const):

  • runtime/RegExp.cpp:

(JSC::regexpToSourceString):
(JSC::RegExp::dumpToStream):

  • runtime/RegExp.h:
1:48 PM Changeset in webkit [233656] by beidson@apple.com
  • 2 edits in trunk/LayoutTests

This test is *still* flaky. This unreviewed patch is my attempt to make it less so.

  • storage/indexeddb/modern/opendatabase-after-storage-crash.html:
1:00 PM Changeset in webkit [233655] by BJ Burg
  • 10 edits
    2 adds in trunk

REGRESSION: Web Inspector no longer pauses in internal injected scripts like WDFindNodes.js
https://bugs.webkit.org/show_bug.cgi?id=187350
<rdar://problem/41728249>

Reviewed by Matt Baker.

Source/JavaScriptCore:

Add a new command that toggles whether or not to blackbox internal scripts.
If blackboxed, the scripts will not be shown to the frontend and the debugger will
not pause in source frames from blackboxed scripts. Sometimes we want to break into
those scripts when debugging Web Inspector, WebDriver, or other WebKit-internal code
that injects scripts.

  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::InspectorDebuggerAgent::setPauseForInternalScripts):
(Inspector::InspectorDebuggerAgent::didParseSource):

  • inspector/agents/InspectorDebuggerAgent.h:
  • inspector/protocol/Debugger.json:

Source/WebInspectorUI:

  • UserInterface/Base/Setting.js: Add a new setting to allow pausing in internal scripts.
  • UserInterface/Controllers/DebuggerManager.js: Listen to the setting change and toggle

the backend setting accordingly. The default is to not break into internal scripts.

  • UserInterface/Views/SettingsTabContentView.js:

(WI.SettingsTabContentView.prototype._createDebugSettingsView):
Expose the new setting in the Debug settings panel.

LayoutTests:

Add a new test to demonstrate a difference in behavior when Debugger.setPauseForInternalScripts(true)
is sent to the backend. There's no way to correctly stringify the current call frame when stepping into
console.log because the injected script was blackboxed at the time that the scripts were parsed.
Instead, the stepping output just shows that the debugger is paused somewhere inside console.log.

  • inspector/debugger/pause-for-internal-scripts-expected.txt: Added.
  • inspector/debugger/pause-for-internal-scripts.html: Added.
  • inspector/debugger/resources/log-pause-location.js:

(TestPage.registerInitializer.window.addSteppingTestCase):
(TestPage.registerInitializer):

12:33 PM Changeset in webkit [233654] by Basuke Suzuki
  • 3 edits
    1 delete in trunk/Source/WebKit

[Curl] Remove unused AuthenticationManager static methods.
https://bugs.webkit.org/show_bug.cgi?id=187419

Reviewed by Yusuke Suzuki.

The file for curl port was added without implementation and never called from anyware.
Also interfaces only used by the curl port were removed from the shared header file.

  • PlatformWin.cmake:
  • Shared/Authentication/AuthenticationManager.h:
  • Shared/Authentication/curl/AuthenticationManagerCurl.cpp: Removed.
12:30 PM Changeset in webkit [233653] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

Layout Test media/video-background-playback.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=187476

Unreviewed test gardening.

Patch by Truitt Savell <Truitt Savell> on 2018-07-09

  • platform/mac/TestExpectations:
12:23 PM Changeset in webkit [233652] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Shrink WebCore::Pair
https://bugs.webkit.org/show_bug.cgi?id=187450

Reviewed by Sam Weinig.

Move m_encoding to pack in with m_refCount and remove the virtual destructor,
shrinking the class from 40 to 24 bytes.
Also make the enum take only a byte, in case it gets used elsewhere

There are about 500 Pairs on nytimes.com, so this memory saving is non-trivial.

  • css/Pair.h:
12:20 PM Changeset in webkit [233651] by commit-queue@webkit.org
  • 12 edits in trunk/Tools

[WinCairo] httpd service install needs to precede server start
https://bugs.webkit.org/show_bug.cgi?id=187283

Patch by Ross Kirsling <rkirsling@gmail.com> on 2018-07-09
Reviewed by Daniel Bates.

  • Scripts/webkitpy/port/base.py:

(Port.check_build):
Remove unused parameter needs_http.

(Port.check_sys_deps):
(Port.start_http_server):
Move check_httpd call.

  • Scripts/webkitpy/port/win.py:

(WinPort.check_httpd): Added.
(WinCairoPort.check_httpd): Deleted.
Move httpd -k install logic to common Windows location.

  • Scripts/webkitpy/layout_tests/controllers/manager.py:

(Manager._set_up_run):

  • Scripts/webkitpy/performance_tests/perftestsrunner.py:
  • Scripts/webkitpy/port/gtk.py:

(GtkPort.check_sys_deps):

  • Scripts/webkitpy/port/ios_simulator.py:

(IOSSimulatorPort.check_sys_deps):

  • Scripts/webkitpy/port/mock_drt.py:

(MockDRTPort.check_build):
(MockDRTPort.check_sys_deps):

  • Scripts/webkitpy/port/port_testcase.py:

(PortTestCase.integration_test_check_sys_deps):
(test_check_build):

  • Scripts/webkitpy/port/test.py:
  • Scripts/webkitpy/port/wpe.py:

(WPEPort.check_sys_deps):

  • Scripts/webkitpy/tool/commands/perfalizer.py:

(PerfalizerTask.run):
Remove needs_http arguments.

12:08 PM Changeset in webkit [233650] by Yusuke Suzuki
  • 48 edits in trunk/Source/WebCore

[WebCore] Annotate classes with WTF_MAKE_FAST_ALLOCATED as much as possible
https://bugs.webkit.org/show_bug.cgi?id=187474

Reviewed by Mark Lam.

When opening cnn.com, debugger says that so many objects in WebCore are allocated
from system allocator. This patch attempts to annotate these found classes with
WTF_MAKE_FAST_ALLOCATED.

We also annotate WebAudio classes with final to make WebAudio class hierarchy solid.

No behavior change.

  • Modules/indexeddb/IDBIndex.h:
  • Modules/indexeddb/IDBObjectStore.h:
  • Modules/indexeddb/client/IDBConnectionProxy.h:
  • Modules/mediastream/UserMediaController.h:
  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
  • Modules/webaudio/AsyncAudioDecoder.h:
  • Modules/webaudio/AudioListener.h:

(WebCore::AudioListener::create): Deleted.
(WebCore::AudioListener::setPosition): Deleted.
(WebCore::AudioListener::position const): Deleted.
(WebCore::AudioListener::setOrientation): Deleted.
(WebCore::AudioListener::orientation const): Deleted.
(WebCore::AudioListener::setUpVector): Deleted.
(WebCore::AudioListener::upVector const): Deleted.
(WebCore::AudioListener::setVelocity): Deleted.
(WebCore::AudioListener::velocity const): Deleted.
(WebCore::AudioListener::setDopplerFactor): Deleted.
(WebCore::AudioListener::dopplerFactor const): Deleted.
(WebCore::AudioListener::setSpeedOfSound): Deleted.
(WebCore::AudioListener::speedOfSound const): Deleted.

  • Modules/webaudio/AudioNode.h:
  • Modules/webaudio/AudioNodeInput.h:

(WebCore::AudioNodeInput::node const): Deleted.

  • Modules/webaudio/AudioNodeOutput.h:
  • Modules/webaudio/AudioParam.h:

(WebCore::AudioParam::create): Deleted.
(WebCore::AudioParam::name const): Deleted.
(WebCore::AudioParam::minValue const): Deleted.
(WebCore::AudioParam::maxValue const): Deleted.
(WebCore::AudioParam::defaultValue const): Deleted.
(WebCore::AudioParam::units const): Deleted.
(WebCore::AudioParam::resetSmoothedValue): Deleted.
(WebCore::AudioParam::setSmoothingConstant): Deleted.
(WebCore::AudioParam::setValueAtTime): Deleted.
(WebCore::AudioParam::linearRampToValueAtTime): Deleted.
(WebCore::AudioParam::exponentialRampToValueAtTime): Deleted.
(WebCore::AudioParam::setTargetAtTime): Deleted.
(WebCore::AudioParam::setValueCurveAtTime): Deleted.
(WebCore::AudioParam::cancelScheduledValues): Deleted.
(WebCore::AudioParam::hasSampleAccurateValues): Deleted.
(WebCore::AudioParam::AudioParam): Deleted.

  • Modules/webaudio/AudioParamTimeline.h:
  • Modules/webaudio/AudioProcessingEvent.h:

(WebCore::AudioProcessingEvent::create): Deleted.
(WebCore::AudioProcessingEvent::createForBindings): Deleted.
(WebCore::AudioProcessingEvent::inputBuffer): Deleted.
(WebCore::AudioProcessingEvent::outputBuffer): Deleted.
(WebCore::AudioProcessingEvent::playbackTime const): Deleted.

  • Modules/webaudio/BiquadDSPKernel.h:

(WebCore::BiquadDSPKernel::BiquadDSPKernel): Deleted.
(WebCore::BiquadDSPKernel::biquadProcessor): Deleted.

  • Modules/webaudio/BiquadFilterNode.h:

(WebCore::BiquadFilterNode::create): Deleted.
(WebCore::BiquadFilterNode::frequency): Deleted.
(WebCore::BiquadFilterNode::q): Deleted.
(WebCore::BiquadFilterNode::gain): Deleted.
(WebCore::BiquadFilterNode::detune): Deleted.
(WebCore::BiquadFilterNode::biquadProcessor): Deleted.

  • Modules/webaudio/BiquadProcessor.h:

(WebCore::BiquadProcessor::filterCoefficientsDirty const): Deleted.
(WebCore::BiquadProcessor::hasSampleAccurateValues const): Deleted.
(WebCore::BiquadProcessor::parameter1): Deleted.
(WebCore::BiquadProcessor::parameter2): Deleted.
(WebCore::BiquadProcessor::parameter3): Deleted.
(WebCore::BiquadProcessor::parameter4): Deleted.
(WebCore::BiquadProcessor::type const): Deleted.

  • Modules/webaudio/ChannelMergerNode.h:
  • Modules/webaudio/ChannelSplitterNode.h:
  • Modules/webaudio/DelayDSPKernel.h:

(WebCore::DelayDSPKernel::maxDelayTime const): Deleted.
(WebCore::DelayDSPKernel::setDelayFrames): Deleted.
(WebCore::DelayDSPKernel::delayProcessor): Deleted.

  • Modules/webaudio/DelayNode.h:
  • Modules/webaudio/DelayProcessor.h:

(WebCore::DelayProcessor::delayTime const): Deleted.
(WebCore::DelayProcessor::maxDelayTime): Deleted.

  • Modules/webaudio/DynamicsCompressorNode.h:

(WebCore::DynamicsCompressorNode::create): Deleted.
(WebCore::DynamicsCompressorNode::threshold): Deleted.
(WebCore::DynamicsCompressorNode::knee): Deleted.
(WebCore::DynamicsCompressorNode::ratio): Deleted.
(WebCore::DynamicsCompressorNode::attack): Deleted.
(WebCore::DynamicsCompressorNode::release): Deleted.
(WebCore::DynamicsCompressorNode::reduction): Deleted.

  • Modules/webaudio/GainNode.h:

(WebCore::GainNode::create): Deleted.
(WebCore::GainNode::gain): Deleted.

  • Modules/webaudio/MediaElementAudioSourceNode.h:

(WebCore::MediaElementAudioSourceNode::mediaElement): Deleted.

  • Modules/webaudio/MediaStreamAudioDestinationNode.h:

(WebCore::MediaStreamAudioDestinationNode::stream): Deleted.

  • Modules/webaudio/MediaStreamAudioSourceNode.h:

(WebCore::MediaStreamAudioSourceNode::mediaStream): Deleted.

  • Modules/webaudio/OfflineAudioCompletionEvent.h:

(WebCore::OfflineAudioCompletionEvent::renderedBuffer): Deleted.

  • Modules/webaudio/OfflineAudioDestinationNode.h:

(WebCore::OfflineAudioDestinationNode::create): Deleted.

  • Modules/webaudio/PannerNode.h:

(WebCore::PannerNode::create): Deleted.
(WebCore::PannerNode::panningModel const): Deleted.
(WebCore::PannerNode::position const): Deleted.
(WebCore::PannerNode::setPosition): Deleted.
(WebCore::PannerNode::orientation const): Deleted.
(WebCore::PannerNode::setOrientation): Deleted.
(WebCore::PannerNode::velocity const): Deleted.
(WebCore::PannerNode::setVelocity): Deleted.
(WebCore::PannerNode::refDistance): Deleted.
(WebCore::PannerNode::setRefDistance): Deleted.
(WebCore::PannerNode::maxDistance): Deleted.
(WebCore::PannerNode::setMaxDistance): Deleted.
(WebCore::PannerNode::rolloffFactor): Deleted.
(WebCore::PannerNode::setRolloffFactor): Deleted.
(WebCore::PannerNode::coneInnerAngle const): Deleted.
(WebCore::PannerNode::setConeInnerAngle): Deleted.
(WebCore::PannerNode::coneOuterAngle const): Deleted.
(WebCore::PannerNode::setConeOuterAngle): Deleted.
(WebCore::PannerNode::coneOuterGain const): Deleted.
(WebCore::PannerNode::setConeOuterGain): Deleted.
(WebCore::PannerNode::distanceGain): Deleted.
(WebCore::PannerNode::coneGain): Deleted.

  • Modules/webaudio/PeriodicWave.h:

(WebCore::PeriodicWave::rateScale const): Deleted.
(WebCore::PeriodicWave::periodicWaveSize const): Deleted.
(WebCore::PeriodicWave::sampleRate const): Deleted.
(WebCore::PeriodicWave::numberOfRanges const): Deleted.

  • Modules/webaudio/RealtimeAnalyser.h:
  • Modules/webaudio/ScriptProcessorNode.h:

(WebCore::ScriptProcessorNode::bufferSize const): Deleted.
(WebCore::ScriptProcessorNode::doubleBufferIndex const): Deleted.
(WebCore::ScriptProcessorNode::swapBuffers): Deleted.

  • Modules/webaudio/WaveShaperDSPKernel.h:

(WebCore::WaveShaperDSPKernel::waveShaperProcessor): Deleted.

  • Modules/webaudio/WaveShaperProcessor.h:

(WebCore::WaveShaperProcessor::curve): Deleted.
(WebCore::WaveShaperProcessor::oversample const): Deleted.

  • dom/MessagePort.h:
  • html/FormAssociatedElement.h:
  • loader/LinkPreloadResourceClients.h:
  • page/WheelEventDeltaFilter.h:
  • page/mac/WheelEventDeltaFilterMac.h:
  • platform/RemoteCommandListener.h:
  • platform/audio/AudioDSPKernel.h:
  • platform/audio/AudioProcessor.h:
  • platform/audio/PlatformMediaSession.h:
  • platform/graphics/avfoundation/objc/VideoFullscreenLayerManagerObjC.h:
  • platform/mediastream/libwebrtc/LibWebRTCAudioModule.h:
  • platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.h:
  • workers/service/ServiceWorkerContainer.h:
11:42 AM Changeset in webkit [233649] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Shrink RenderSVGShape
https://bugs.webkit.org/show_bug.cgi?id=187459

Reviewed by Zalan Bujtas.

Shrink RenderSVGShape from 328 to 320 bytes by moving the bits before the AffineTransform,
which is 16-byte aligned. This saves 9.6KB on nytimes.com.

  • rendering/svg/RenderSVGShape.h:
11:41 AM Changeset in webkit [233648] by Simon Fraser
  • 5 edits in trunk/Source/WebCore

Shrink CSSFontFace
https://bugs.webkit.org/show_bug.cgi?id=187456

Reviewed by Anders Carlsson.

Shrink CSSFontFace by 56 bytes, from 288 to 256 bytes, mostly by defining enums as 8-bit,
but also re-ordering the member variables. There are over 400 of these objects on nytimes.com,
so this saves about 22KB.

  • css/CSSFontFace.cpp:

(WebCore::CSSFontFace::CSSFontFace):

  • css/CSSFontFace.h:
  • platform/text/TextFlags.h:
  • rendering/style/RenderStyleConstants.h:
11:21 AM Changeset in webkit [233647] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Check that LayerTreeHost was created before use
https://bugs.webkit.org/show_bug.cgi?id=187404

Patch by Stephan Szabo <stephan.szabo@sony.com> on 2018-07-09
Reviewed by Žan Doberšek.

  • WebProcess/WebPage/AcceleratedDrawingArea.cpp:

(WebKit::AcceleratedDrawingArea::enterAcceleratedCompositingMode):

10:54 AM Changeset in webkit [233646] by Yusuke Suzuki
  • 2 edits in trunk/Source/WTF

[WTF] Annotate RunLoop::Timer fast-allocated
https://bugs.webkit.org/show_bug.cgi?id=187473

Reviewed by Saam Barati.

It is allocated by std::unique_ptr for MemoryPressureHandler. And it uses system malloc now.

  • wtf/RunLoop.h:
10:09 AM Changeset in webkit [233645] by Yusuke Suzuki
  • 5 edits in trunk/Source/JavaScriptCore

[JSC] Make some data members of UnlinkedCodeBlock private
https://bugs.webkit.org/show_bug.cgi?id=187467

Reviewed by Mark Lam.

This patch makes m_numVars, m_numCalleeLocals, and m_numParameters of UnlinkedCodeBlock private.
We also remove m_numCapturedVars since it is no longer used.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::CodeBlock):

  • bytecode/CodeBlock.h:
  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):

  • bytecode/UnlinkedCodeBlock.h:
10:08 AM Changeset in webkit [233644] by Yusuke Suzuki
  • 4 edits in trunk/Source/JavaScriptCore

[JSC] Optimize layout of AccessCase / ProxyableAccessCase to reduce size of ProxyableAccessCase
https://bugs.webkit.org/show_bug.cgi?id=187465

Reviewed by Keith Miller.

ProxyableAccessCase is allocated so frequently and it is persisted so long. Reducing the size
of ProxyableAccessCase can reduce the footprint of many web sites including nytimes.com.

This patch uses a bit complicated layout to reduce ProxyableAccessCase. We add unused bool member
in AccessCase's padding, and use it in ProxyableAccessCase. By doing so, we can reduce the size
of ProxyableAccessCase from 56 to 48. And it also reduces the size of GetterSetterAccessCase
from 104 to 96 since it inherits ProxyableAccessCase.

  • bytecode/AccessCase.h:

(JSC::AccessCase::viaProxy const):
(JSC::AccessCase::AccessCase):

  • bytecode/ProxyableAccessCase.cpp:

(JSC::ProxyableAccessCase::ProxyableAccessCase):

  • bytecode/ProxyableAccessCase.h:
9:47 AM Changeset in webkit [233643] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark animations/needs-layout.html as flaky on iOS.
https://bugs.webkit.org/show_bug.cgi?id=187388

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
9:41 AM Changeset in webkit [233642] by commit-queue@webkit.org
  • 13 edits in trunk/Source

Unreviewed, rolling out r233612.
https://bugs.webkit.org/show_bug.cgi?id=187475

Revision caused the api test LinkColorWithSystemAppearance to
fail on all systems. (Requested by Truitt on #webkit).

Reverted changeset:

"Semantic colors don't update when accessibility Increase
Contrast mode is enabled."
https://bugs.webkit.org/show_bug.cgi?id=187425
https://trac.webkit.org/changeset/233612

9:30 AM Changeset in webkit [233641] by BJ Burg
  • 2 edits in trunk/Source/WebKit

WebDriver: hang in Selenium test alerts_tests.py::testShouldHandleAlertOnPageBeforeUnload
https://bugs.webkit.org/show_bug.cgi?id=187418
<rdar://problem/41909520>

Unreviewed build fix for Sierra.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::runBeforeUnloadConfirmPanel):
According to some compilers, the local 'automationSession' is unused. Change this
to just convert the return value to boolean rather than assign to an unused local.

8:18 AM Changeset in webkit [233640] by Philippe Normand
  • 2 edits in trunk/Tools

[Flatpak] Unreviewed, switch to https for the gst-libav tarball.

  • flatpak/org.webkit.WebKit.yaml:
5:45 AM Changeset in webkit [233639] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

[Flatpak] HTTP layout tests broken due to missing CGI.pm in the sandbox
https://bugs.webkit.org/show_bug.cgi?id=187384

Patch by Thibault Saunier <tsaunier@igalia.com> on 2018-07-09
Reviewed by Philippe Normand.

And make it usable inside the sandbox even when
perl is launched "tainted" (as the PERL5LIB won't
work otherwise).

  • flatpak/flatpakutils.py:

(WebkitFlatpak.run_in_sandbox):

  • flatpak/org.webkit.WebKit.yaml:
1:56 AM Changeset in webkit [233638] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[WPE][GTK] Mount /dev/shm on /run/shm in sandbox
https://bugs.webkit.org/show_bug.cgi?id=187400

Patch by Thibault Saunier <tsaunier@igalia.com> on 2018-07-09
Reviewed by Philippe Normand.

This is where it is expected to be when it is a symlink,
without mounting it the websocket python server can't work
inside the sandbox.

  • flatpak/flatpakutils.py:

(WebkitFlatpak.run_in_sandbox):

1:15 AM Changeset in webkit [233637] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

[GStreamer] Remove useless workaround
https://bugs.webkit.org/show_bug.cgi?id=186921

Reviewed by Xabier Rodriguez-Calvar.

In bug 67407 a workaround was added for GStreamer 0.10. With 1.x
the media/video-reverse-play-duration.html test passes without any
workaround needed. The other test mentioned in that bug was
removed, it seems.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::playbackPosition const):
Removed early return, position queries shouldn't be avoided on EOS
because the pipeline is in READY state, not NULL.
(WebCore::MediaPlayerPrivateGStreamer::currentMediaTime const):

Jul 8, 2018:

10:57 PM Changeset in webkit [233636] by Simon Fraser
  • 4 edits in trunk/Source/WebCore

Optimize packing of RenderSVGViewportContainer
https://bugs.webkit.org/show_bug.cgi?id=187458

Reviewed by Zalan Bujtas.

Shrink RenderSVGViewportContainer from 296 bytes to 280 bytes, saving about 6KB on nytimes.com.

  • rendering/svg/RenderSVGContainer.cpp:

(WebCore::RenderSVGContainer::RenderSVGContainer):

  • rendering/svg/RenderSVGContainer.h:
  • rendering/svg/RenderSVGViewportContainer.h:
10:35 PM Changeset in webkit [233635] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Shrink RenderTableSection
https://bugs.webkit.org/show_bug.cgi?id=187457

Reviewed by Zalan Bujtas.

Shrink RenderTableSection from 344 to 336 bytes, saving about 3.6KB on nytimes.com.

  • rendering/RenderTableSection.h:
10:09 PM Changeset in webkit [233634] by Simon Fraser
  • 9 edits in trunk/Source/WebCore

Optimize packing of RootInlineBox
https://bugs.webkit.org/show_bug.cgi?id=187430

Reviewed by Zalan Bujtas.

In InlineBox, move the m_logicalWidth float up next to the m_expansion float with m_topLeft next; this
avoids padding of 4 bytes after this float.

In InlineFlowBox, move the bitfields before the pointers so they can snug up into the
4 bytes after m_expansion in the base class.

The comment about m_lineBreakPos's padding in RootInlineBox is wrong; just move it to the end
to avoid padding before the m_lineBreakObj pointer.

Make m_logicalWidth private and have derived classes use the accessor.

Make EllipsisBox 4 bytes smaller too.

  • rendering/EllipsisBox.cpp:

(WebCore::EllipsisBox::EllipsisBox):
(WebCore::EllipsisBox::paintMarkupBox):
(WebCore::EllipsisBox::nodeAtPoint):

  • rendering/EllipsisBox.h:
  • rendering/InlineBox.h:

(WebCore::InlineBox::InlineBox):

  • rendering/InlineFlowBox.cpp:
  • rendering/InlineFlowBox.h:

(WebCore::InlineFlowBox::InlineFlowBox):
(WebCore::InlineFlowBox::frameRectIncludingLineHeight const):

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::localSelectionRect const):
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::paintPlatformDocumentMarker):
(WebCore::InlineTextBox::paintMarkedTextBackground):
(WebCore::InlineTextBox::paintCompositionUnderline const):

  • rendering/RootInlineBox.cpp:

(WebCore::RootInlineBox::RootInlineBox):

  • rendering/RootInlineBox.h:
9:37 PM Changeset in webkit [233633] by Yusuke Suzuki
  • 3 edits in trunk/Source/JavaScriptCore

Unreviewed, build fix for debug builds after r233630
https://bugs.webkit.org/show_bug.cgi?id=187441

  • jit/JIT.cpp:

(JSC::JIT::frameRegisterCountFor):

  • llint/LLIntEntrypoint.cpp:

(JSC::LLInt::frameRegisterCountFor):

9:10 PM Changeset in webkit [233632] by commit-queue@webkit.org
  • 7 edits in trunk

[Web Animations] A number of tests report an incorrect computed offset
https://bugs.webkit.org/show_bug.cgi?id=187410
<rdar://problem/41905790>

Patch by Antoine Quint <Antoine Quint> on 2018-07-08
Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark 16 new WPT progressions.

  • web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt:
  • web-platform-tests/web-animations/interfaces/KeyframeEffect/constructor-expected.txt:
  • web-platform-tests/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001-expected.txt:
  • web-platform-tests/web-animations/interfaces/KeyframeEffect/setKeyframes-expected.txt:

Source/WebCore:

While we would correctly avoid computing missing offsets when processing the first keyframe following the last
keyframes with a specified offset, we were forgetting to update the index of the last keyframe with a specified
offset which meant we would accidentally override a specified offset with an automically-computed one.

  • animation/KeyframeEffectReadOnly.cpp:

(WebCore::computeMissingKeyframeOffsets):

4:18 PM Changeset in webkit [233631] by fpizlo@apple.com
  • 2 edits in trunk/Tools

run-benchmark should run ARES-6 1.0.1
https://bugs.webkit.org/show_bug.cgi?id=187452

Reviewed by Sam Weinig.

We forgot to update this when we released 1.0.1!

  • Scripts/webkitpy/benchmark_runner/data/plans/ares6.plan:
10:59 AM Changeset in webkit [233630] by Yusuke Suzuki
  • 20 edits in trunk/Source/JavaScriptCore

[JSC] Optimize layout of CodeBlock to reduce padding
https://bugs.webkit.org/show_bug.cgi?id=187441

Reviewed by Mark Lam.

Arrange the order of members to reduce the size of CodeBlock from 552 to 544.
We also make SourceCodeRepresentation 1 byte since CodeBlock has a vector of this,
Vector<SourceCodeRepresentation> m_constantsSourceCodeRepresentation.

We also move m_numCalleeLocals and m_numVars from public to private in CodeBlock.

  • bytecode/BytecodeDumper.cpp:

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

  • bytecode/BytecodeUseDef.h:

(JSC::computeDefsForBytecodeOffset):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::CodeBlock):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::numVars const):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::numVars const):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::ByteCodeParser):
(JSC::DFG::ByteCodeParser::flushForTerminalImpl):
(JSC::DFG::ByteCodeParser::handleRecursiveTailCall):
(JSC::DFG::ByteCodeParser::inlineCall):
(JSC::DFG::ByteCodeParser::handleGetById):
(JSC::DFG::ByteCodeParser::handlePutById):
(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGGraph.h:

(JSC::DFG::Graph::forAllLocalsLiveInBytecode):

  • dfg/DFGOSREntrypointCreationPhase.cpp:

(JSC::DFG::OSREntrypointCreationPhase::run):

  • dfg/DFGVariableEventStream.cpp:

(JSC::DFG::VariableEventStream::reconstruct const):

  • ftl/FTLOSREntry.cpp:

(JSC::FTL::prepareOSREntry):

  • ftl/FTLState.cpp:

(JSC::FTL::State::State):

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::dumpRegisters):

  • jit/JIT.cpp:

(JSC::JIT::frameRegisterCountFor):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_enter):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_enter):

  • jit/JITOperations.cpp:
  • llint/LLIntEntrypoint.cpp:

(JSC::LLInt::frameRegisterCountFor):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::traceFunctionPrologue):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • runtime/JSCJSValue.h:
10:39 AM Changeset in webkit [233629] by Yusuke Suzuki
  • 7 edits in trunk/Source

[JSC] Optimize padding of UnlinkedCodeBlock to shrink
https://bugs.webkit.org/show_bug.cgi?id=187448

Reviewed by Saam Barati.

Source/JavaScriptCore:

We optimize the size of CodeType and TriState. And we arrange the layout of UnlinkedCodeBlock.
These optimizations reduce the size of UnlinkedCodeBlock from 304 to 288.

  • bytecode/CodeType.h:
  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::codeType const):
(JSC::UnlinkedCodeBlock::didOptimize const):
(JSC::UnlinkedCodeBlock::setDidOptimize):

  • bytecode/VirtualRegister.h:

Source/WTF:

  • wtf/TriState.h:
9:58 AM Changeset in webkit [233628] by ddkilzer@apple.com
  • 3 edits
    5 adds in trunk

DOMMatrix.invertSelf() returns garbage values for a non-invertible matrix
<https://webkit.org/b/187446>
<rdar://problem/41853187>

Reviewed by Daniel Bates.

Source/WebCore:

Test: http/wpt/css/geometry/DOMMatrix-invertSelf.html

  • css/DOMMatrix.cpp:

(WebCore::DOMMatrix::invertSelf): Add missing else, and
restructure to use positive logic.

LayoutTests:

  • http/wpt/css/geometry/DOMMatrix-invertSelf-expected.txt: Add.
  • http/wpt/css/geometry/DOMMatrix-invertSelf.html: Add.
  • http/wpt/css/geometry/support/dommatrix-test-util.js: Copy from LayoutTests/imported/w3c/web-platform-tests/css/geometry/support/dommatrix-test-util.js.
9:41 AM Changeset in webkit [233627] by Yusuke Suzuki
  • 4 edits in trunk/Source/JavaScriptCore

[JSC] Optimize padding of InferredTypeTable by using cellLock
https://bugs.webkit.org/show_bug.cgi?id=187447

Reviewed by Mark Lam.

Use cellLock() in InferredTypeTable to guard changes of internal structures.
This is the same usage to SparseArrayValueMap. By using cellLock(), we can
reduce the size of InferredTypeTable from 40 to 32.

  • runtime/InferredTypeTable.cpp:

(JSC::InferredTypeTable::visitChildren):
(JSC::InferredTypeTable::get):
(JSC::InferredTypeTable::willStoreValue):
(JSC::InferredTypeTable::makeTop):

  • runtime/InferredTypeTable.h:

Using enum class and using. And remove isEmpty() since it is not used.

  • runtime/Structure.h:
5:29 AM Changeset in webkit [233626] by Yusuke Suzuki
  • 3 edits in trunk/Source/JavaScriptCore

[JSC] Optimize layout of SourceProvider to reduce padding
https://bugs.webkit.org/show_bug.cgi?id=187440

Reviewed by Mark Lam.

Arrange members of SourceProvider to reduce the size from 80 to 72.

  • parser/SourceProvider.cpp:

(JSC::SourceProvider::SourceProvider):

  • parser/SourceProvider.h:
2:54 AM Changeset in webkit [233625] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

PropertyTable::skipDeletedEntries() should guard against iterating past the table end.
https://bugs.webkit.org/show_bug.cgi?id=187444
<rdar://problem/41282849>

Reviewed by Saam Barati.

PropertyTable supports C++ iteration by offering begin() and end() methods, and
an iterator class. The begin() methods and the iterator operator++() method uses
PropertyTable::skipDeletedEntries() to skip over deleted entries in the table.
However, PropertyTable::skipDeletedEntries() does not prevent the iteration
pointer from being incremented past the end of the table. As a result, we can
iterate past the end of the table. Note that the C++ iteration protocol tests
for the iterator not being equal to the end() value. It does not do a <= test.
If the iterator ever shoots past end, the loop will effectively not terminate.

This issue can manifest if and only if the last entry in the table is a deleted
one, and the key field of the PropertyMapEntry shaped space at the end of the
table (the one beyond the last) contains a 1 (i.e. PROPERTY_MAP_DELETED_ENTRY_KEY)
value.

No test because manifesting this issue requires uncontrollable happenstance where
memory just beyond the end of the table looks like a deleted entry.

  • runtime/PropertyMapHashTable.h:

(JSC::PropertyTable::begin):
(JSC::PropertyTable::end):
(JSC::PropertyTable::begin const):
(JSC::PropertyTable::end const):
(JSC::PropertyTable::skipDeletedEntries):

Jul 7, 2018:

3:29 PM Changeset in webkit [233624] by youenn@apple.com
  • 2 edits in trunk/Tools

WPT importer should create dummy HTML files for *.window.js script files
https://bugs.webkit.org/show_bug.cgi?id=187426

Reviewed by Ryosuke Niwa.

Some WPT tests use *.window.js tests, which should be accessed as *.window.html.
Do the same strategy as done for worker.js/any.js files.

  • Scripts/webkitpy/w3c/test_importer.py:

(TestImporter.write_html_files_for_templated_js_tests):

2:05 PM Changeset in webkit [233623] by Wenson Hsieh
  • 13 edits
    1 add in trunk

Introduce a layout milestone to track when the document contains a large number of rendered characters
https://bugs.webkit.org/show_bug.cgi?id=187412
<rdar://problem/41744338>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Implements a new layout milestone: DidRenderSignificantAmountOfText. This is similar to the existing
DidFirstVisuallyNonEmptyLayout milestone, but with a few important additional constraints:

  • The minimum threshold of rendered characters is much larger (3000 instead of 200).
  • The mean length of a text node must be large (at least 50).

This is a (computationally) lightweight heuristic intended to estimate the likelihood that a page is capable of
being presented in Reader mode. In many article-like pages, the average length of a text node is significantly
longer than other types of pages; thus, on pages where the average length of a text node is very large *and*
there is a large quantity of text, we can use this as a cue to opportunistically detect and enter Safari reader
mode on watchOS.

Test: RenderingProgressTests.DidRenderSignificantAmountOfText

  • page/FrameView.cpp:

(WebCore::FrameView::reset):

Clear out new state members that keep track of whether the significant rendered text milestone has been met.

(WebCore::elementOverflowRectIsLargerThanThreshold):

Factor out logic to grab the overflow height of an element into a separate helper function.

(WebCore::FrameView::qualifiesAsVisuallyNonEmpty const):
(WebCore::FrameView::updateSignificantRenderedTextMilestoneIfNeeded):

Determines whether to fire this new milestone after the next layout pass is finished. The logic here is similar
to the logic in qualifiesAsVisuallyNonEmpty, requiring that there are not still pending stylesheets in the head
and that the document height is at least a minimum threshold. However, unlike the first visually non-empty
layout, this milestone is never guaranteed to fire.

(WebCore::FrameView::fireLayoutRelatedMilestonesIfNeeded):

  • page/FrameView.h:

(WebCore::FrameView::incrementVisuallyNonEmptyCharacterCount):

  • page/LayoutMilestones.h:

Source/WebKit:

Add plumbing for the new significant rendered text layout milestone in the modern WebKit client layer. See
WebCore/ChangeLog for more details.

  • Shared/API/Cocoa/_WKRenderingProgressEvents.h:
  • Shared/API/Cocoa/_WKRenderingProgressEventsInternal.h:

(renderingProgressEvents):

  • Shared/API/c/WKPageLoadTypes.h:
  • Shared/API/c/WKSharedAPICast.h:

(WebKit::toWKLayoutMilestones):
(WebKit::toLayoutMilestones):

  • UIProcess/API/Cocoa/WKWebView.mm:

(layoutMilestones):

Tools:

Add a new API test to check that we observe the new rendering milestone in an article-like document.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/significant-text-milestone.html: Added.
  • TestWebKitAPI/Tests/ios/RenderingProgressTests.mm:

(TEST):

1:46 PM Changeset in webkit [233622] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Optimize layout of SymbolTable to reduce padding
https://bugs.webkit.org/show_bug.cgi?id=187437

Reviewed by Mark Lam.

Arrange the layout of SymbolTable to reduce the size from 88 to 72.

  • runtime/SymbolTable.h:
1:29 PM Changeset in webkit [233621] by Yusuke Suzuki
  • 5 edits in trunk/Source/JavaScriptCore

[JSC] Optimize layout of RegExp to reduce padding
https://bugs.webkit.org/show_bug.cgi?id=187438

Reviewed by Mark Lam.

Reduce the size of RegExp from 168 to 144.

  • runtime/RegExp.cpp:

(JSC::RegExp::RegExp):

  • runtime/RegExp.h:
  • runtime/RegExpKey.h:
  • yarr/YarrErrorCode.h:
1:29 PM Changeset in webkit [233620] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Optimize layout of ValueProfile to reduce padding
https://bugs.webkit.org/show_bug.cgi?id=187439

Reviewed by Mark Lam.

Reduce the size of ValueProfile from 40 to 32 by reordering members.

  • bytecode/ValueProfile.h:

(JSC::ValueProfileBase::ValueProfileBase):

11:40 AM Changeset in webkit [233619] by bshafiei@apple.com
  • 7 edits in branches/safari-606.1.24-branch/Source

Versioning.

11:39 AM Changeset in webkit [233618] by bshafiei@apple.com
  • 1 copy in tags/Safari-606.1.24.4

Tag Safari-606.1.24.4.

11:38 AM Changeset in webkit [233617] by bshafiei@apple.com
  • 2 edits in branches/safari-606.1.24-branch/Source/WebKit

Cherry-pick r233616. rdar://problem/41931915

REGRESSION (r233561): MobileMail crashes when replying to an email
https://bugs.webkit.org/show_bug.cgi?id=187436
rdar://problem/41931915

Reviewed by Alan Bujtas.

r233561 added a RELEASE_ASSERT(isMainThread()) in this function. This is fine most of the time,
until Mail spawns a WebThread for mail compose, at which point the meaning of isMainThread changes
and the RELEASE_ASSERT fires.

For now, just remove the RELEASE_ASSERT.

  • UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _scheduleVisibleContentRectUpdateAfterScrollInView:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233616 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10:50 AM Changeset in webkit [233616] by Simon Fraser
  • 2 edits in trunk/Source/WebKit

REGRESSION (r233561): MobileMail crashes when replying to an email
https://bugs.webkit.org/show_bug.cgi?id=187436
rdar://problem/41931915

Reviewed by Alan Bujtas.

r233561 added a RELEASE_ASSERT(isMainThread()) in this function. This is fine most of the time,
until Mail spawns a WebThread for mail compose, at which point the meaning of isMainThread changes
and the RELEASE_ASSERT fires.

For now, just remove the RELEASE_ASSERT.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _scheduleVisibleContentRectUpdateAfterScrollInView:]):

9:20 AM Changeset in webkit [233615] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WTF

iOS port should define HAVE_RUNLOOP_TIMER
<https://webkit.org/b/187370>

Reviewed by Simon Fraser.

  • wtf/Platform.h:

(HAVE_DTRACE): Remove unused macro since r200568.
(HAVE_RUNLOOP_TIMER): Define for PLATFORM(COCOA), not just
PLATFORM(MAC). Alphabetize macros.

8:52 AM Changeset in webkit [233614] by Simon Fraser
  • 5 edits
    1 copy
    3 adds in trunk/Tools

dump-class-layout reports wrong padding in many cases
https://bugs.webkit.org/show_bug.cgi?id=185801

Reviewed by Dan Bates.

Enhance dump-class-layout, fixing bugs and adding unit tests. This also includes
the patch from bug 187141.

Move the code that uses lldb to fetch the class layout to its own module,
lldb_dump_class_layout.py, so it can be unit tested. Change this code
to build up a data structure for the class. This is necessary since correct
padding computation is easier with second traversal over the data structure.

Try to deal with the empty base class optimization, which is necessary to report
correct padding in classes using std::unique_ptr, and correctly handle virtual base classes.

The ClassLayoutBase class knows how to test for equality and generate a string
or string list representation of itself. The derived ClassLayout class knows
how to build up the class layout using the lldb Python bindings.

Finally we wrap the lldb debugger instance in LLDBDebuggerInstance so that we don't
have to make a new one for each unit test. The tests have to run serially.

Add to lldbWebKitTester a .cpp file that contains a set of C++ classes to unit-test
dump-class-layout.

  • Scripts/dump-class-layout:

(main):

  • lldb/dump_class_layout_unittest.py:

(destroy_cached_debug_session):
(TestDumpClassLayout):
(TestDumpClassLayout.setUpClass):
(TestDumpClassLayout.setUp):
(TestDumpClassLayout.serial_test_BasicClassLayout):
(serial_test_PaddingBetweenClassMembers):
(serial_test_BoolPaddingClass):
(serial_test_ClassWithEmptyClassMembers):
(serial_test_SimpleVirtualClass):
(serial_test_SimpleVirtualClassWithNonVirtualBase):
(serial_test_InterleavedVirtualNonVirtual):
(serial_test_ClassWithTwoVirtualBaseClasses):
(serial_test_ClassWithClassMembers):
(serial_test_ClassWithBitfields):
(serial_test_ClassWithUniquePtrs):
(serial_test_ClassWithOptionals):
(TestDumpClassLayout.test_BasicClassLayout): Deleted.

  • lldb/lldbWebKitTester/DumpClassLayoutTesting.cpp:

(EmptyClass::doStuff):
(VirtualBaseClass::~VirtualBaseClass):
(VirtualBaseClass2::~VirtualBaseClass2):
(SimpleVirtualClass::~SimpleVirtualClass):
(SimpleVirtualClass::doStuff):
(SimpleVirtualClassWithNonVirtualBase::~SimpleVirtualClassWithNonVirtualBase):
(SimpleVirtualClassWithNonVirtualBase::doStuff):
(avoidClassDeadStripping):

  • lldb/lldb_dump_class_layout.py:

(ansi_colors):
(ClassLayoutBase):
(ClassLayoutBase.init):
(ClassLayoutBase.ne):
(ClassLayoutBase.eq):
(ClassLayoutBase._to_string_recursive):
(ClassLayoutBase.as_string_list):
(ClassLayoutBase.as_string):
(ClassLayoutBase.dump):
(ClassLayoutExpected):
(ClassLayoutExpected.init):
(ClassLayout):
(ClassLayout.init):
(ClassLayout._has_polymorphic_base_class):
(ClassLayout._parse):
(ClassLayout._probably_has_empty_base_class_optimization):
(ClassLayout._compute_padding_recursive):
(ClassLayout._compute_padding):
(LLDBDebuggerInstance):
(LLDBDebuggerInstance.init):
(LLDBDebuggerInstance.del):
(LLDBDebuggerInstance._get_first_file_architecture):
(LLDBDebuggerInstance.layout_for_classname):
(ClassLayoutDumper): Deleted.
(ClassLayoutDumper.init): Deleted.
(ClassLayoutDumper._get_first_file_architecture): Deleted.
(ClassLayoutDumper.verify_type): Deleted.
(ClassLayoutDumper.verify_type_recursive): Deleted.
(ClassLayoutDumper._class_layout_as_string): Deleted.
(ClassLayoutDumper.dump_to_string): Deleted.
(ClassLayoutDumper.dump): Deleted.

12:10 AM Changeset in webkit [233613] by Yusuke Suzuki
  • 2 edits in trunk/Source/WTF

[linux] ASSERT: Using an alternative signal stack is not supported. Consider disabling the concurrent GC.
https://bugs.webkit.org/show_bug.cgi?id=187297

Reviewed by Mark Lam.

This patch relaxes the JSC's limitation: accepting an alternative signal stack mechanism.

  • wtf/ThreadingPthreads.cpp:

(WTF::getApproximateStackPointer):
Fix approximate stack pointer function to make it valid.

(WTF::Thread::signalHandlerSuspendResume):
Use StackBounds::contains to check whether the given stack pointer is in range of StackBounds.
If it is out of range, it seems that this stack pointer is pointing an alternative signal stack.

(WTF::Thread::suspend):
Repeatedly retry suspension by using Thread::yield().

(WTF::isOnAlternativeSignalStack): Deleted.

Note: See TracTimeline for information about the timeline view.