WebKit-https.git
18 months ago[WPE] Test gardening
Ms2ger@igalia.com [Wed, 7 Mar 2018 11:59:20 +0000 (11:59 +0000)]
[WPE] Test gardening
https://bugs.webkit.org/show_bug.cgi?id=183402

Unreviewed test gardening.

WebDriverTests:

* TestExpectations.json: mark element_clear.py::test_closed_context as passing.

LayoutTests:

* platform/gtk/TestExpectations: skip some more appcache-sw tests.
* platform/wpe/TestExpectations:
  - Mark http/tests/appcache/different-https-origin-resource-main.html as passing after r228892.
  - Mark fast/canvas/canvas-createPattern-video-modify.html as passing after r228221.
  - Mark storage/indexeddb/modern/index-3-private.html as passing since r228560.
  - Skip some more appcache - service worker tests.
  - Mark some svg/animations tests as flaky (as they already are on GTK).
  - Mark imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-multiple-times-with-the-same-mediakeys.html as passing after r228983.
  - Mark http/tests/appcache/fail-on-update-2.html as flaky.
* platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt: Added baseline.
* platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt: Added baseline.
* platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt: Added baseline.
* platform/wpe/js/dom/dom-static-property-for-in-iteration-expected.txt: rebaseline.

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

18 months agoMark get_element_property.py::test_element as passing.
Ms2ger@igalia.com [Wed, 7 Mar 2018 11:32:44 +0000 (11:32 +0000)]
Mark get_element_property.py::test_element as passing.
https://bugs.webkit.org/show_bug.cgi?id=180414

Unreviewed test gardening.

It has been passing since the test was updated to expect the correct value
in r229166.

* TestExpectations.json:

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

18 months ago[ARM] offlineasm: fix indentation in armOpcodeReversedOperands
commit-queue@webkit.org [Wed, 7 Mar 2018 09:38:57 +0000 (09:38 +0000)]
[ARM] offlineasm: fix indentation in armOpcodeReversedOperands
https://bugs.webkit.org/show_bug.cgi?id=183400

Patch by Dominik Infuehr <dinfuehr@igalia.com> on 2018-03-07
Reviewed by Mark Lam.

* offlineasm/arm.rb:

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

18 months ago[GTK] fast/animation/request-animation-frame-during-modal.html sometimes crashing
csaavedra@igalia.com [Wed, 7 Mar 2018 09:17:26 +0000 (09:17 +0000)]
[GTK] fast/animation/request-animation-frame-during-modal.html sometimes crashing

Unreviewed gardening
* platform/gtk/TestExpectations:

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

18 months agoPrepare LLInt code to support pointer profiling.
mark.lam@apple.com [Wed, 7 Mar 2018 06:44:46 +0000 (06:44 +0000)]
Prepare LLInt code to support pointer profiling.
https://bugs.webkit.org/show_bug.cgi?id=183387
<rdar://problem/38199678>

Reviewed by JF Bastien.

Source/JavaScriptCore:

1. Introduced PtrTag enums for supporting pointer profiling later.

2. Also introduced tagging, untagging, retagging, and tag removal placeholder
   template functions for the same purpose.

3. Prepare the offlineasm for supporting pointer profiling later.

4. Tagged some pointers in LLInt asm code.  Currently, these should have no
   effect on behavior.

5. Removed returnToThrowForThrownException() because it is not used anywhere.

6. Added the offlineasm folder to JavaScriptCore Xcode project so that it's
   easier to view and edit these files in Xcode.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/LLIntCallLinkInfo.h:
(JSC::LLIntCallLinkInfo::unlink):
* llint/LLIntData.cpp:
(JSC::LLInt::initialize):
* llint/LLIntData.h:
* llint/LLIntExceptions.cpp:
(JSC::LLInt::returnToThrowForThrownException): Deleted.
* llint/LLIntExceptions.h:
* llint/LLIntOfflineAsmConfig.h:
* llint/LLIntOffsetsExtractor.cpp:
* llint/LLIntPCRanges.h:
(JSC::LLInt::isLLIntPC):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
(JSC::LLInt::handleHostCall):
(JSC::LLInt::setUpCall):
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* offlineasm/ast.rb:
* offlineasm/instructions.rb:
* offlineasm/risc.rb:
* runtime/PtrTag.h: Added.
(JSC::uniquePtrTagID):
(JSC::ptrTag):
(JSC::tagCodePtr):
(JSC::untagCodePtr):
(JSC::retagCodePtr):
(JSC::removeCodePtrTag):

Source/WTF:

* wtf/Platform.h:

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

18 months ago[Cocoa] Stop copying ForwardingHeaders directory that no longer exists
bburg@apple.com [Wed, 7 Mar 2018 05:17:30 +0000 (05:17 +0000)]
[Cocoa] Stop copying ForwardingHeaders directory that no longer exists
https://bugs.webkit.org/show_bug.cgi?id=183396

Reviewed by Dan Bernstein.

* WebCore.xcodeproj/project.pbxproj:
Rename the phase to "Copy ICU Headers". ForwardingHeaders are no longer a thing.

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

18 months agoSkip fast/loader/redirect-to-invalid-url-using-javascript-disallowed.html and related...
pvollan@apple.com [Wed, 7 Mar 2018 03:06:58 +0000 (03:06 +0000)]
Skip fast/loader/redirect-to-invalid-url-using-javascript-disallowed.html and related tests on Windows.
https://bugs.webkit.org/show_bug.cgi?id=183393

Unreviewed test gardening.

* platform/win/TestExpectations:

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

18 months ago[WinCairo] Unreviewed. Add platform-specific expectations.
ross.kirsling@sony.com [Wed, 7 Mar 2018 02:08:21 +0000 (02:08 +0000)]
[WinCairo] Unreviewed. Add platform-specific expectations.

Individual filenames are omitted for brevity.

* platform/wincairo/accessibility/: Added.
* platform/wincairo/animations/: Added.
* platform/wincairo/css1/: Added.
* platform/wincairo/css2.1/: Added.
* platform/wincairo/css3/: Added.
* platform/wincairo/editing/: Added.
* platform/wincairo/fast/: Added.
* platform/wincairo/fonts/: Added.
* platform/wincairo/ietestcenter/: Added.
* platform/wincairo/js/: Added.
* platform/wincairo/mathml/: Added.
* platform/wincairo/media/: Added.
* platform/wincairo/plugins/: Added.
* platform/wincairo/printing/: Added.
* platform/wincairo/scrollbars/: Added.
* platform/wincairo/svg/: Added.
* platform/wincairo/tables/: Added.
* platform/wincairo/transforms/: Added.
* platform/wincairo/transitions/: Added.

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

18 months agoVersioning.
kocsen_chung@apple.com [Wed, 7 Mar 2018 02:05:42 +0000 (02:05 +0000)]
Versioning.

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

18 months agodidReceiveServerRedirectForProvisionalNavigation is not called in case of document...
commit-queue@webkit.org [Wed, 7 Mar 2018 01:15:37 +0000 (01:15 +0000)]
didReceiveServerRedirectForProvisionalNavigation is not called in case of document redirection with service worker registration change
https://bugs.webkit.org/show_bug.cgi?id=183299
<rdar://problem/37547029>

Patch by Youenn Fablet <youenn@apple.com> on 2018-03-06
Reviewed by Alex Christensen.

Source/WebCore:

In case of redirection with service worker registration change, we cancel the load and create a new one.
This prevent ResourceLoader::willSendRequestInternal to call the didReceiveServerRedirectForProvisionalNavigation
callback. We thus explictly call this callback after restarting the load with the new service worker step.
We only call this callback if the main resource is there as we do not want to call it if it was blocked by content extension.

Test: http/wpt/service-workers/navigation-redirect-main-frame.https.html

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::restartLoadingDueToServiceWorkerRegistrationChange):

Tools:

Add support for checking whether this callback is called.
Used in the added layout test.

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const):
(WTR::TestRunner::clearDidReceiveServerRedirectForProvisionalNavigation):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createOtherPage):
(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::didReceiveServerRedirectForProvisionalNavigation):
* WebKitTestRunner/TestController.h:
(WTR::TestController::didReceiveServerRedirectForProvisionalNavigation const):
(WTR::TestController::clearDidReceiveServerRedirectForProvisionalNavigation):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

* http/wpt/service-workers/navigation-redirect-main-frame-worker.js: Added.
* http/wpt/service-workers/navigation-redirect-main-frame.https-expected.txt: Added.
* http/wpt/service-workers/navigation-redirect-main-frame.https.html: Added.

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

18 months agohttp/wpt/html/browsers/history/the-location-interface/location-protocol-setter-non...
cdumez@apple.com [Wed, 7 Mar 2018 01:02:09 +0000 (01:02 +0000)]
http/wpt/html/browsers/history/the-location-interface/location-protocol-setter-non-broken-async-delegate.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=183390

Unreviewed, temporarily mark the test as flaky while I investigate.

* platform/mac-wk1/TestExpectations:

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

18 months ago[Curl] Remove unnecessary copied ResourceRequest member variable.
commit-queue@webkit.org [Wed, 7 Mar 2018 00:32:20 +0000 (00:32 +0000)]
[Curl] Remove unnecessary copied ResourceRequest member variable.
https://bugs.webkit.org/show_bug.cgi?id=183010

Patch by Basuke Suzuki <Basuke.Suzuki@sony.com> on 2018-03-06
Reviewed by Youenn Fablet.

* platform/network/ResourceHandle.h:
* platform/network/ResourceHandleInternal.h:
(WebCore::ResourceHandleInternal::ResourceHandleInternal):
* platform/network/curl/CurlRequest.h:
(WebCore::CurlRequest::resourceRequest const):
* platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::start):
(WebCore::ResourceHandle::addCacheValidationHeaders):
(WebCore::ResourceHandle::createCurlRequest):
(WebCore::ResourceHandle::restartRequestWithCredential):
(WebCore::ResourceHandle::continueAfterWillSendRequest):

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

18 months agoUnreviewed, fixed incorrect name of test expectation file.
pvollan@apple.com [Tue, 6 Mar 2018 23:26:21 +0000 (23:26 +0000)]
Unreviewed, fixed incorrect name of test expectation file.

* platform/win/fast/text/combining-enclosing-keycap-expected.txt: Copied from LayoutTests/platform/win/fast/text/combining-enclosing-keycap.txt.
* platform/win/fast/text/combining-enclosing-keycap.txt: Removed.

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

18 months agoAX: Flaky test after r229310
n_wang@apple.com [Tue, 6 Mar 2018 22:49:27 +0000 (22:49 +0000)]
AX: Flaky test after r229310
https://bugs.webkit.org/show_bug.cgi?id=183376
<rdar://problem/38188685>

Reviewed by Chris Fleizach.

Source/WebCore:

The test that forces the context menu to show sometimes locks up
the test runner. Also, we missed a case where calling AXShowMenu
action on a combobox is not dispatching the accessibility event.

Using the combobox example to test the event dispatching in order to
avoid the test hang.

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityPerformShowMenuAction]):
(-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):

LayoutTests:

* accessibility/mac/AOM-events-all-expected.txt:
* accessibility/mac/AOM-events-all.html:

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

18 months agoNetworkDataTask should enable logging for automation clients
bfulgham@apple.com [Tue, 6 Mar 2018 22:49:21 +0000 (22:49 +0000)]
NetworkDataTask should enable logging for automation clients
https://bugs.webkit.org/show_bug.cgi?id=183378
<rdar://problem/38189556>

Reviewed by Brian Burg.

The NetworkDataTaskCocoa class was only logging if the SessionID object allowed logging.
It should also be considering whether the current session is working on behalf of an
automation client. If so, it should allow logging.

* NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
(WebKit::NetworkDataTaskCocoa::isAlwaysOnLoggingAllowed const):

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

18 months agoUnreviewed build fix.
ryanhaddad@apple.com [Tue, 6 Mar 2018 22:41:41 +0000 (22:41 +0000)]
Unreviewed build fix.

* UIProcess/ios/WKFullScreenWindowControllerIOS.mm:
(-[WKFullScreenWindowController _EVOrganizationName]):

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

18 months agofast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed.html fails with...
cdumez@apple.com [Tue, 6 Mar 2018 22:01:27 +0000 (22:01 +0000)]
fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed.html fails with async policy delegates
https://bugs.webkit.org/show_bug.cgi?id=183345

Reviewed by Alex Christensen.

Source/WebCore:

FrameLoader::loadURL() was calling loadWithNavigationAction() and then resetting the
m_quickRedirectComing flag right after. This works if the navigation policy decision
triggered by loadWithNavigationAction() is made synchronously. However, when it is
made asynchronously, the flag gets reset too early, before the policy decision
handler has been called. This is an issue because the policy decision handler
relies on the m_quickRedirectComing flag.

Similarly, FrameLoader::loadFrameRequest() was calling loadPostRequest() / loadURL()
and then focusing a frame right after. This does not work as intended when the navigation
policy decision is made asynchronously.

To address the issue, we now pass a completion handler that gets called when the operation
has actually completion, after the policy decision has been made. This maintains the
behavior in place with synchronous policy delegates.

Test: fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed-async-delegates.html

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadURLIntoChildFrame):
(WebCore::FrameLoader::loadFrameRequest):
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::loadWithNavigationAction):
(WebCore::FrameLoader::load):
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::FrameLoader::reloadWithOverrideEncoding):
(WebCore::FrameLoader::reload):
(WebCore::FrameLoader::loadPostRequest):
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
(WebCore::FrameLoader::loadDifferentDocumentItem):
* loader/FrameLoader.h:

Tools:

Add layout test infrastructure so a test can know when didCancelClientRedirectForFrame has
been called. The tests used to rely on a 0-timer but this does not work when the client
responds to the navigation policy asynchronously.

* DumpRenderTree/TestRunner.cpp:
(getDidCancelClientRedirect):
(TestRunner::staticValues):
* DumpRenderTree/TestRunner.h:
(TestRunner::didCancelClientRedirect const):
(TestRunner::setDidCancelClientRedirect):
* DumpRenderTree/mac/FrameLoadDelegate.mm:
(-[FrameLoadDelegate webView:didCancelClientRedirectForFrame:]):
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::didCancelClientRedirectForFrame):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
(WTR::TestRunner::didCancelClientRedirect const):
(WTR::TestRunner::setDidCancelClientRedirect):

LayoutTests:

* fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed-async-delegates-expected.txt: Added.
* fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed-async-delegates.html: Added.
Add layout test coverage.

* fast/loader/redirect-to-invalid-url-using-javascript-disallowed-expected.txt:
* fast/loader/redirect-to-invalid-url-using-javascript-disallowed.html:
* fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed-expected.txt:
* fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed.html:
* fast/loader/window-open-to-invalid-url-disallowed-expected.txt:
* fast/loader/window-open-to-invalid-url-disallowed.html:
* platform/mac-wk1/fast/loader/redirect-to-invalid-url-using-javascript-disallowed-expected.txt:
* platform/mac-wk1/fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed-async-delegates-expected.txt: Added.
* platform/mac-wk1/fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed-expected.txt:
* platform/mac-wk1/fast/loader/window-open-to-invalid-url-disallowed-expected.txt:
Update tests that were relying on a 0-timer to make sure that didCancelClientRedirectForFrame was
called to rely on our new test infrastructure instead. This is needed so that these tests keep passing
once we make policy delegates asynchronous by default. Without this, the didCancelClientRedirectForFrame lines
would be missing in the tests' output.

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

18 months ago[Web Animations] Add a new CSSTransition subclass of WebAnimation
commit-queue@webkit.org [Tue, 6 Mar 2018 21:27:03 +0000 (21:27 +0000)]
[Web Animations] Add a new CSSTransition subclass of WebAnimation
https://bugs.webkit.org/show_bug.cgi?id=183373
<rdar://problem/38181985>

Patch by Antoine Quint <graouts@apple.com> on 2018-03-06
Reviewed by Dean Jackson.

Adding a new CSSAnimation subclass which we will create in a later patch while resolving styles
upon identifying that a new CSS Animation has been added to an element.

* CMakeLists.txt:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* animation/CSSTransition.cpp: Added.
(WebCore::CSSTransition::create):
(WebCore::CSSTransition::CSSTransition):
* animation/CSSTransition.h: Added.
* animation/CSSTransition.idl: Added.
* animation/KeyframeEffect.cpp:
* animation/WebAnimation.h:
(WebCore::WebAnimation::isCSSTransition const):
* bindings/js/JSWebAnimationCustom.cpp:
(WebCore::toJSNewlyCreated):
* bindings/js/WebCoreBuiltinNames.h:

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

18 months agoUnreviewed, rolling out r229330.
commit-queue@webkit.org [Tue, 6 Mar 2018 20:53:52 +0000 (20:53 +0000)]
Unreviewed, rolling out r229330.
https://bugs.webkit.org/show_bug.cgi?id=183379

Broke some Apple internal code (Requested by ap on #webkit).

Reverted changeset:

"Remove unused crash hook functionality"
https://bugs.webkit.org/show_bug.cgi?id=183369
https://trac.webkit.org/changeset/229330

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

18 months agoEnsure system appearance is default for web content
megan_gardner@apple.com [Tue, 6 Mar 2018 20:20:29 +0000 (20:20 +0000)]
Ensure system appearance is default for web content
https://bugs.webkit.org/show_bug.cgi?id=183354
<rdar://problem/36975571>
<rdar://problem/38162381>

Make sure the the system appearance for web content is default, and
consolidate that code to a single class.

Reviewed by Tim Horton.

Not currently testable, will add tests in a future patch.

* WebCore.xcodeproj/project.pbxproj:
* platform/mac/LocalDefaultSystemAppearance.h: Added.
* platform/mac/LocalDefaultSystemAppearance.mm: Added.
(WebCore::LocalDefaultSystemAppearance::LocalDefaultSystemAppearance):
(WebCore::LocalDefaultSystemAppearance::~LocalDefaultSystemAppearance):
* platform/mac/ThemeMac.mm:
(-[WebCoreThemeView init]):
(WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::systemColor const):

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

18 months agoService worker test gardening
commit-queue@webkit.org [Tue, 6 Mar 2018 20:12:52 +0000 (20:12 +0000)]
Service worker test gardening
https://bugs.webkit.org/show_bug.cgi?id=183264
<rdar://problem/38048743>

Unreviewed.

Patch by Youenn Fablet <youenn@apple.com> on 2018-03-06

* TestExpectations: mark test as slow in Debug.

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

18 months ago[Web Animations] Add a new runtime flag to control whether CSS Animations and CSS...
commit-queue@webkit.org [Tue, 6 Mar 2018 19:50:55 +0000 (19:50 +0000)]
[Web Animations] Add a new runtime flag to control whether CSS Animations and CSS Transitions should run using the Web Animations timeline
https://bugs.webkit.org/show_bug.cgi?id=183370
<rdar://problem/38180729>

Patch by Antoine Quint <graouts@apple.com> on 2018-03-06
Reviewed by Dean Jackson.

Before we start creating WebAnimation objects to perform CSS Animations and CSS Transitions, which will replace the existing codepath
involving CSSAnimationController and CompositeAnimation, we need a runtime flag that will allow all the new code to be turned off by
default while we bring this feature up.

Source/WebCore:

* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled):
(WebCore::RuntimeEnabledFeatures::cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled const):

Source/WebKit:

* Shared/WebPreferences.yaml:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled):
(WKPreferencesGetCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _setCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled:]):
(-[WKPreferences _cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
(WebKit::InjectedBundle::setCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled):
* WebProcess/InjectedBundle/InjectedBundle.h:

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

18 months agoMake more use of USE(OPENGL_ES) and replace typedefs with C++11 using statements
dbates@webkit.org [Tue, 6 Mar 2018 19:46:46 +0000 (19:46 +0000)]
Make more use of USE(OPENGL_ES) and replace typedefs with C++11 using statements
in TextureCacheCV.h

Rubber-stamped by Tim Horton.

* platform/graphics/cv/TextureCacheCV.h:

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

18 months agoCache hasComplexSelectorsForStyleAttribute bit
antti@apple.com [Tue, 6 Mar 2018 19:41:35 +0000 (19:41 +0000)]
Cache hasComplexSelectorsForStyleAttribute bit
https://bugs.webkit.org/show_bug.cgi?id=183363

Reviewed by Andreas Kling.

* css/DocumentRuleSets.cpp:
(WebCore::DocumentRuleSets::collectFeatures const):
(WebCore::DocumentRuleSets::hasComplexSelectorsForStyleAttribute const):

Cache the bit to avoid hash lookups.

* css/DocumentRuleSets.h:
* dom/StyledElement.cpp:
(WebCore::StyledElement::invalidateStyleAttribute):
(WebCore::shouldSynchronizeStyleAttributeImmediatelyForInvalidation): Deleted.

Move code to DocumentRuleSets.

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

18 months ago[ARM] Assembler warnings: "use of r13 is deprecated"
commit-queue@webkit.org [Tue, 6 Mar 2018 19:14:10 +0000 (19:14 +0000)]
[ARM] Assembler warnings: "use of r13 is deprecated"
https://bugs.webkit.org/show_bug.cgi?id=183286

Patch by Dominik Infuehr <dinfuehr@igalia.com> on 2018-03-06
Reviewed by Mark Lam.

Usage of sp/r13 as operand Rm is deprecated on ARM. offlineasm
sometimes generates assembly code that triggers this warning. Prevent
this by simply switching operands.

* offlineasm/arm.rb:

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

18 months agoRemove unused crash hook functionality
mcatanzaro@igalia.com [Tue, 6 Mar 2018 19:10:52 +0000 (19:10 +0000)]
Remove unused crash hook functionality
https://bugs.webkit.org/show_bug.cgi?id=183369

Reviewed by Alexey Proskuryakov.

WTFSetCrashHook and WTFInstallReportBacktraceOnCrashHook are not used on any platforms and
can be removed.

* wtf/Assertions.cpp:
* wtf/Assertions.h:

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

18 months agoChange the type of SVGToOTFFontConverter::m_weight to be not a char
mmaxfield@apple.com [Tue, 6 Mar 2018 18:35:49 +0000 (18:35 +0000)]
Change the type of SVGToOTFFontConverter::m_weight to be not a char
https://bugs.webkit.org/show_bug.cgi?id=183339

Reviewed by Alex Christensen.

No new tests because there is no behavior change.

* svg/SVGToOTFFontConversion.cpp:
(WebCore::SVGToOTFFontConverter::appendOS2Table):
(WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):

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

18 months ago[Web Animations] Add a new CSSAnimation subclass of WebAnimation
graouts@webkit.org [Tue, 6 Mar 2018 18:34:22 +0000 (18:34 +0000)]
[Web Animations] Add a new CSSAnimation subclass of WebAnimation
https://bugs.webkit.org/show_bug.cgi?id=183371
<rdar://problem/38181724>

Reviewed by Dean Jackson.

Adding a new CSSAnimation subclass which we will create in a later patch while resolving styles
upon identifying that a new CSS Animation has been added to an element.

* CMakeLists.txt:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* animation/CSSAnimation.cpp: Added.
(WebCore::CSSAnimation::create):
(WebCore::CSSAnimation::CSSAnimation):
* animation/CSSAnimation.h: Added.
* animation/CSSAnimation.idl: Added.
* animation/KeyframeEffectReadOnly.cpp
* animation/WebAnimation.h:
(WebCore::WebAnimation::isCSSAnimation const):
* animation/WebAnimation.idl:
* bindings/js/JSWebAnimationCustom.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
* bindings/js/WebCoreBuiltinNames.h:

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

18 months ago[GTK] Add new baseline after r229177
csaavedra@igalia.com [Tue, 6 Mar 2018 18:02:33 +0000 (18:02 +0000)]
[GTK] Add new baseline after r229177

Unreviewed gardening.

This baseline is needed because our mimetype database recognizes
the type of the file in the test and therefore the extension gets
added to the downloaded file.
* platform/gtk/fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download-async-delegate-expected.txt: Added.

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

18 months agoREGRESSION(r229309): s_exceptionInstructions allocation change causing crashes in...
zandobersek@gmail.com [Tue, 6 Mar 2018 17:38:05 +0000 (17:38 +0000)]
REGRESSION(r229309): s_exceptionInstructions allocation change causing crashes in LLInt on WPE
https://bugs.webkit.org/show_bug.cgi?id=183366

Reviewed by Michael Catanzaro.

Have the TestRunnerInjectedBundle CMake library link against libraries
in the WebKitTestRunnerInjectedBundle_LIBRARIES list, and not the
WebKitTestRunner_LIBRARIES list, which is used for the WebKitTestRunner
executable. This allows narrowing down the libraries to only those that
are necessary for the injected bundle shared object.

The GTK+ port already has this list specified, adding one for the WPE
port.

* WebKitTestRunner/CMakeLists.txt:
Link the TestRunnerInjectedBundle library against the libraries in the
WebKitTestRunnerInjectedBundle_LIBRARIES list.
* WebKitTestRunner/PlatformWPE.cmake:
Specify the WebKitTestRunnerInjectedBundle_LIBRARIES list, including the
basic system dependencies, WebCoreTestSupport and WebKit. This follows
the GTK+ port.

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

18 months agoUnreviewed, fix incorrect assertion after r229309
utatane.tea@gmail.com [Tue, 6 Mar 2018 17:38:03 +0000 (17:38 +0000)]
Unreviewed, fix incorrect assertion after r229309
https://bugs.webkit.org/show_bug.cgi?id=182975

* runtime/TypeProfilerLog.cpp:
(JSC::TypeProfilerLog::TypeProfilerLog):

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

18 months agoExplicitly qualify some method calls on this in lambdas in Service Worker code.
Ms2ger@igalia.com [Tue, 6 Mar 2018 17:10:24 +0000 (17:10 +0000)]
Explicitly qualify some method calls on this in lambdas in Service Worker code.
https://bugs.webkit.org/show_bug.cgi?id=183367

Reviewed by Chris Dumez.

No new tests -- no change in behavior.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::startLoadingMainResource):
* workers/service/server/SWServer.cpp:
(WebCore::SWServer::matchAll):

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

18 months agoUnreviewed, add baseline for fast/text/combining-enclosing-keycap.html.
pvollan@apple.com [Tue, 6 Mar 2018 16:35:35 +0000 (16:35 +0000)]
Unreviewed, add baseline for fast/text/combining-enclosing-keycap.html.

* platform/win/fast/text/combining-enclosing-keycap.txt: Added.

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

18 months ago[GTK] Mark a few Wayland tests as failing
csaavedra@igalia.com [Tue, 6 Mar 2018 13:47:42 +0000 (13:47 +0000)]
[GTK] Mark a few Wayland tests as failing

Unreviewed gardening
* platform/gtk-wayland/TestExpectations:

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

18 months ago[GLib] Implement WebsiteDataStore::defaultServiceWorkerRegistrationDirectory().
Ms2ger@igalia.com [Tue, 6 Mar 2018 13:30:04 +0000 (13:30 +0000)]
[GLib] Implement WebsiteDataStore::defaultServiceWorkerRegistrationDirectory().
https://bugs.webkit.org/show_bug.cgi?id=183364

Reviewed by Michael Catanzaro.

* UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp:
(API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): implement.

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

18 months agoUnreviewed. Addressing further review feedback for patch landed in r229315.
zandobersek@gmail.com [Tue, 6 Mar 2018 12:17:36 +0000 (12:17 +0000)]
Unreviewed. Addressing further review feedback for patch landed in r229315.

* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::commitSceneState): There's no need for
explicit calls of the clear() method on both containers in the CommitScope
objects, the destructors invoked for these objects from the CommitScope
destructor will have the same effect.

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

18 months ago[CoordGraphics] Remove unused scrolling-related code in TextureMapperLayer, Coordinat...
zandobersek@gmail.com [Tue, 6 Mar 2018 12:12:04 +0000 (12:12 +0000)]
[CoordGraphics] Remove unused scrolling-related code in TextureMapperLayer, CoordinatedGraphics stack
https://bugs.webkit.org/show_bug.cgi?id=183340

Reviewed by Michael Catanzaro.

Source/WebCore:

TextureMapperLayer::scrollBy() method is completely unused and can be
removed. This opens the gates on removing majority of scrolling-related
code in TextureMapperLayer, CoordinatedGraphicsLayer and
CoordinatedGraphicsScene classes, along with smaller bits in other
closely-associated classes.

We're able to remove two virtual method overrides in the
ScrollingCoordinatorCoordinatedGraphics class.

TextureMapperLayer can drop the ScrollingClient member variable, along
with multiple others. Various unused methods in that class are removed
as well.

CoordinatedGraphicsLayer and GraphicsLayerTextureMapper can both remove
the custom scrolling state tracking.

No new tests -- no change in behavior.

* page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
(WebCore::ScrollingCoordinatorCoordinatedGraphics::scrollableAreaScrollLayerDidChange): Deleted.
(WebCore::ScrollingCoordinatorCoordinatedGraphics::willDestroyScrollableArea): Deleted.
* page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h:
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
(WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
(WebCore::GraphicsLayerTextureMapper::didCommitScrollOffset): Deleted.
(WebCore::GraphicsLayerTextureMapper::setIsScrollable): Deleted.
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::hitTest): Deleted.
(WebCore::TextureMapperLayer::scrollableLayerHitTestCondition): Deleted.
(WebCore::TextureMapperLayer::findScrollableContentsLayerAt): Deleted.
(WebCore::TextureMapperLayer::mapScrollOffset): Deleted.
(WebCore::TextureMapperLayer::commitScrollOffset): Deleted.
(WebCore::TextureMapperLayer::scrollBy): Deleted.
(WebCore::TextureMapperLayer::didCommitScrollOffset): Deleted.
* platform/graphics/texmap/TextureMapperLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
(WebCore::CoordinatedGraphicsLayer::syncLayerState):
(WebCore::CoordinatedGraphicsLayer::resetLayerState):
(WebCore::CoordinatedGraphicsLayer::setScrollableArea): Deleted.
(WebCore::CoordinatedGraphicsLayer::commitScrollOffset): Deleted.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:

Source/WebKit:

With most of the scrolling-related code in TextureMapperLayer on the
chopping block, we can now drop the ScrollingClient inheritance and the
commitScrollOffset() virtual method implementation. This enables
removing the whole commitScrollOffset() call chain that ran from
CoordinatedGraphicsScene through CoordinatedLayerTreeHost and
CompositingCoordinator to the affected CoordinatedGraphicsLayer object.

The CoordinatedGraphicsScene::findScrollableContentsLayerAt() method is
also unused and can be deleted.

* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::setLayerState):
(WebKit::CoordinatedGraphicsScene::createLayer):
(WebKit::CoordinatedGraphicsScene::commitScrollOffset): Deleted.
(WebKit::CoordinatedGraphicsScene::findScrollableContentsLayerAt): Deleted.
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
(WebKit::ThreadedCompositor::commitScrollOffset): Deleted.
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
* WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
(WebKit::CompositingCoordinator::commitScrollOffset): Deleted.
* WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::commitScrollOffset): Deleted.
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:

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

18 months ago[CoordGraphics] Apply TextureMapperLayer animations with a single MonotonicTime value
zandobersek@gmail.com [Tue, 6 Mar 2018 11:51:53 +0000 (11:51 +0000)]
[CoordGraphics] Apply TextureMapperLayer animations with a single MonotonicTime value
https://bugs.webkit.org/show_bug.cgi?id=183360

Reviewed by Sergio Villar Senin.

Source/WebCore:

When animations are being applied on the TextureMapperLayer tree, the
monotonic time value is retrieved repeatedly in TextureMapperAnimation
class. Instead of spawning repeated syscalls that are required to obtain
the time value, TextureMapperLayer::applyAnimationsRecursively() now
accepts a MonotonicTime value that should be used for all animation
updates.

No new tests -- no change in behavior.

* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly):
* platform/graphics/texmap/TextureMapperAnimation.cpp:
(WebCore::TextureMapperAnimation::apply):
(WebCore::TextureMapperAnimation::computeTotalRunningTime):
(WebCore::TextureMapperAnimations::apply):
* platform/graphics/texmap/TextureMapperAnimation.h:
(WebCore::TextureMapperAnimation::keyframes const):
(WebCore::TextureMapperAnimation::animation const):
(WebCore::TextureMapperAnimation::boxSize const): Deleted.
(WebCore::TextureMapperAnimation::listsMatch const): Deleted.
(WebCore::TextureMapperAnimation::startTime const): Deleted.
(WebCore::TextureMapperAnimation::pauseTime const): Deleted.
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::applyAnimationsRecursively):
(WebCore::TextureMapperLayer::syncAnimations):
* platform/graphics/texmap/TextureMapperLayer.h:

Source/WebKit:

* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
Pass the monotic time value, as returned by MonotonicTime::now(), to the
TextureMapperLayer::applyAnimationsRecursively() call.

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

18 months ago[CoordGraphics] Clean up CoordinatedImageBacking
zandobersek@gmail.com [Tue, 6 Mar 2018 11:35:22 +0000 (11:35 +0000)]
[CoordGraphics] Clean up CoordinatedImageBacking
https://bugs.webkit.org/show_bug.cgi?id=183332

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Clean up the CoordinatedImageBacking class. Prefer reference values in
class functions, methods and member variables, where possible. Move
member variables into a more sensible order. Initialize a few member
variables at the place of declaration.

Drop releaseSurfaceIfNeeded() and updateVisibilityIfNeeded() methods,
integrating them into the update() method, which was the only place
where they were called from.

We don't have to keep a reference to the buffer object, since we're
not using it internally after it's been passed to the client's
updateImageBacking() implementation.

No new tests -- no change in behavior.

* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::syncImageBacking):
(WebCore::CoordinatedGraphicsLayer::releaseImageBackingIfNeeded):
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
(WebCore::CoordinatedImageBacking::getCoordinatedImageBackingID):
(WebCore::CoordinatedImageBacking::CoordinatedImageBacking):
(WebCore::CoordinatedImageBacking::addHost):
(WebCore::CoordinatedImageBacking::removeHost):
(WebCore::CoordinatedImageBacking::update):
(WebCore::CoordinatedImageBacking::clearContentsTimerFired):
(WebCore::CoordinatedImageBacking::create): Deleted.
(WebCore::CoordinatedImageBacking::markDirty): Deleted.
(WebCore::CoordinatedImageBacking::releaseSurfaceIfNeeded): Deleted.
(WebCore::CoordinatedImageBacking::updateVisibilityIfNeeded): Deleted.
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.h:

Source/WebKit:

* WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
(WebKit::CompositingCoordinator::createImageBackingIfNeeded):
Adjust call to CoordinatedImageBacking::getCoordinatedImageBackingID().

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

18 months agoCoordinatedGraphicsScene: properly limit data specific to state commit operation
zandobersek@gmail.com [Tue, 6 Mar 2018 11:34:19 +0000 (11:34 +0000)]
CoordinatedGraphicsScene: properly limit data specific to state commit operation
https://bugs.webkit.org/show_bug.cgi?id=183326

Reviewed by Sergio Villar Senin.

In the process of state commit in CoordinatedGraphicsScene, the released
image backings and backing stores with pending updates are stored in
Vector and HashSet objects, respectively. Instead of these two objects
being member variables on the CoordinatedGraphicsScene class, keep them
in the CommitScope structure that's limited to the operations done in
the commitSceneState() method.

The two member variables are dropped, and the CommitScope object is
passed by reference to any helper method that needs to append either
kind of object to the respective container. At the end of the state
commit, backing stores with pending updates have those updates applied,
and the two containers are cleared out as the CommitScope object is
destroyed.

* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::setLayerState):
(WebKit::CoordinatedGraphicsScene::prepareContentBackingStore):
(WebKit::CoordinatedGraphicsScene::resetBackingStoreSizeToLayerSize):
(WebKit::CoordinatedGraphicsScene::removeTilesIfNeeded):
(WebKit::CoordinatedGraphicsScene::updateTilesIfNeeded):
(WebKit::CoordinatedGraphicsScene::syncImageBackings):
(WebKit::CoordinatedGraphicsScene::updateImageBacking):
(WebKit::CoordinatedGraphicsScene::clearImageBackingContents):
(WebKit::CoordinatedGraphicsScene::removeImageBacking):
(WebKit::CoordinatedGraphicsScene::commitSceneState):
(WebKit::CoordinatedGraphicsScene::purgeGLResources):
(WebKit::CoordinatedGraphicsScene::removeReleasedImageBackingsIfNeeded): Deleted.
(WebKit::CoordinatedGraphicsScene::commitPendingBackingStoreOperations): Deleted.
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:

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

18 months ago[ARM] Disable tests that run out of memory
commit-queue@webkit.org [Tue, 6 Mar 2018 11:31:50 +0000 (11:31 +0000)]
[ARM] Disable tests that run out of memory
https://bugs.webkit.org/show_bug.cgi?id=182699

Patch by Dominik Infuehr <dinfuehr@igalia.com> on 2018-03-06
Reviewed by Žan Doberšek.

JSTests:

Skip tests that run of of memory. Do not run
modules/module-jit-reachability.js without LLInt to prevent
running out of executable memory.

* modules.yaml:
* modules/module-jit-reachability.js:
* stress/has-own-property-name-cache-string-keys.js:
* stress/has-own-property-name-cache-symbol-keys.js:

Tools:

Add run mode to allow running modules.yaml-tests without
disabling LLInt for specific tests.

* Scripts/run-jsc-stress-tests:

LayoutTests:

Do not run test with LLInt disabled on Linux.

* js/script-tests/dfg-osr-entry-hoisted-clobbered-structure-check.js:

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

18 months agoGraphicsLayerTextureMapper: remove the setAnimations() method
zandobersek@gmail.com [Tue, 6 Mar 2018 11:23:08 +0000 (11:23 +0000)]
GraphicsLayerTextureMapper: remove the setAnimations() method
https://bugs.webkit.org/show_bug.cgi?id=183358

Reviewed by Carlos Garcia Campos.

Remove the GraphicsLayerTextureMapper::setAnimations() method. This was
not called from anywhere, and is not the way animations are generated
for a given GraphicsLayer object (that would be addAnimation() method).

* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::setAnimations): Deleted.
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:

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

18 months agoAX: AOM: More accessibility events support
n_wang@apple.com [Tue, 6 Mar 2018 08:18:53 +0000 (08:18 +0000)]
AX: AOM: More accessibility events support
https://bugs.webkit.org/show_bug.cgi?id=183023
<rdar://problem/37764380>

Reviewed by Chris Fleizach.

Source/WebCore:

Accessibility events.
Spec: https://wicg.github.io/aom/spec/phase2.html

This change adds support for these new events:
  accessiblecontextmenu
  accessibledecrement
  accessibledismiss
  accessiblefocus
  accessibleincrement
  accessiblescrollintoview
  accessibleselect

Note: The show context menu action is only supported on macOS now.
The dismiss action is not implemented for all the platforms yet.

Test: accessibility/mac/AOM-events-all.html

* accessibility/AccessibilityListBoxOption.cpp:
(WebCore::AccessibilityListBoxOption::setSelected):
* accessibility/AccessibilityMediaObject.cpp:
(WebCore::AccessibilityMediaObject::increment):
(WebCore::AccessibilityMediaObject::decrement):
* accessibility/AccessibilityMenuListOption.cpp:
(WebCore::AccessibilityMenuListOption::setSelected):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::increment):
(WebCore::AccessibilityNodeObject::decrement):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::press):
(WebCore::AccessibilityObject::dispatchAccessibilityEvent const):
(WebCore::AccessibilityObject::dispatchAccessibilityEventWithType const):
(WebCore::AccessibilityObject::dispatchAccessibleSetValueEvent const):
(WebCore::AccessibilityObject::scrollToMakeVisible const):
(WebCore::AccessibilityObject::dispatchAccessibilityEvent): Deleted.
(WebCore::AccessibilityObject::dispatchAccessibleSetValueEvent): Deleted.
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::setFocused):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
* dom/Element.idl:
* dom/EventNames.h:

LayoutTests:

* accessibility/mac/AOM-events-all-expected.txt: Added.
* accessibility/mac/AOM-events-all.html: Added.
* js/dom/dom-static-property-for-in-iteration-expected.txt:

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

18 months agoFix std::make_unique / new[] using system malloc
utatane.tea@gmail.com [Tue, 6 Mar 2018 07:25:14 +0000 (07:25 +0000)]
Fix std::make_unique / new[] using system malloc
https://bugs.webkit.org/show_bug.cgi?id=182975

Reviewed by JF Bastien.

Source/JavaScriptCore:

Use Vector, FAST_ALLOCATED, or UniqueArray instead.

* API/JSStringRefCF.cpp:
(JSStringCreateWithCFString):
* bytecode/BytecodeKills.h:
* bytecode/BytecodeLivenessAnalysis.cpp:
(JSC::BytecodeLivenessAnalysis::computeKills):
* dfg/DFGDisassembler.cpp:
(JSC::DFG::Disassembler::dumpDisassembly):
* jit/PolymorphicCallStubRoutine.cpp:
(JSC::PolymorphicCallStubRoutine::PolymorphicCallStubRoutine):
* jit/PolymorphicCallStubRoutine.h:
* jit/Repatch.cpp:
(JSC::linkPolymorphicCall):
* jsc.cpp:
(currentWorkingDirectory):
* llint/LLIntData.cpp:
(JSC::LLInt::initialize):
* llint/LLIntData.h:
* runtime/ArgList.h:
* runtime/StructureChain.h:
* runtime/StructureIDTable.cpp:
(JSC::StructureIDTable::StructureIDTable):
(JSC::StructureIDTable::resize):
* runtime/StructureIDTable.h:
* runtime/TypeProfilerLog.cpp:
(JSC::TypeProfilerLog::TypeProfilerLog):
(JSC::TypeProfilerLog::initializeLog): Deleted.
* runtime/TypeProfilerLog.h:
(JSC::TypeProfilerLog::TypeProfilerLog): Deleted.
* runtime/VM.cpp:
(JSC::VM::~VM):
(JSC::VM::acquireRegExpPatternContexBuffer):
* runtime/VM.h:
* testRegExp.cpp:
(runFromFiles):
* tools/HeapVerifier.cpp:
(JSC::HeapVerifier::HeapVerifier):
* tools/HeapVerifier.h:

Source/WebCore:

Use Vector, FAST_ALLOCATED, or UniqueArray instead.

* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::setBuffer):
* Modules/webaudio/AudioBufferSourceNode.h:
* css/StyleRule.h:
* cssjit/CompiledSelector.h:
* html/HTMLFrameSetElement.h:
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::copyTexSubImage2D):
(WebCore::WebGLRenderingContextBase::simulateVertexAttrib0):
(WebCore::WebGLRenderingContextBase::LRUImageBufferCache::LRUImageBufferCache):
(WebCore::WebGLRenderingContextBase::LRUImageBufferCache::imageBuffer):
(WebCore::WebGLRenderingContextBase::LRUImageBufferCache::bubbleToFront):
* html/canvas/WebGLRenderingContextBase.h:
* platform/Length.cpp:
(WebCore::newCoordsArray):
(WebCore::newLengthArray):
(): Deleted.
* platform/Length.h:
* platform/audio/DynamicsCompressor.cpp:
(WebCore::DynamicsCompressor::setNumberOfChannels):
* platform/audio/DynamicsCompressor.h:
* platform/audio/FFTFrame.h:
* platform/audio/gstreamer/FFTFrameGStreamer.cpp:
(WebCore::FFTFrame::FFTFrame):
* platform/graphics/FormatConverter.h:
(WebCore::FormatConverter::FormatConverter):
* platform/graphics/GraphicsContext3D.cpp:
(WebCore::GraphicsContext3D::texImage2DResourceSafe):
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/ca/win/CACFLayerTreeHost.cpp:
(WebCore::getDirtyRects):
* platform/graphics/cairo/CairoUtilities.cpp:
(WebCore::flipImageSurfaceVertically):
* platform/graphics/cg/GraphicsContext3DCG.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage):
* platform/graphics/gpu/Texture.cpp:
(WebCore::Texture::updateSubRect):
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
(WebCore::GraphicsContext3D::compileShader):
(WebCore::GraphicsContext3D::getActiveAttribImpl):
(WebCore::GraphicsContext3D::getActiveUniformImpl):
(WebCore::GraphicsContext3D::getProgramInfoLog):
(WebCore::GraphicsContext3D::getShaderInfoLog):
* platform/graphics/texmap/TextureMapperShaderProgram.cpp:
(WebCore::getShaderLog):
(WebCore::getProgramLog):
* platform/graphics/win/ImageBufferDataDirect2D.cpp:
(WebCore::ImageBufferData::putData):
* platform/image-decoders/png/PNGImageDecoder.cpp:
(WebCore::PNGImageReader::PNGImageReader):
(WebCore::PNGImageReader::close):
(WebCore::PNGImageReader::interlaceBuffer const):
(WebCore::PNGImageReader::createInterlaceBuffer):
* platform/image-decoders/webp/WEBPImageDecoder.cpp:
(WebCore::WEBPImageDecoder::decodeFrame):
* platform/network/curl/SocketStreamHandleImpl.h:
(WebCore::SocketStreamHandleImpl::SocketData::SocketData):
* platform/network/curl/SocketStreamHandleImplCurl.cpp:
(WebCore::createCopy):
(WebCore::SocketStreamHandleImpl::readData):
(): Deleted.
* platform/network/soup/SocketStreamHandleImpl.h:
* platform/network/soup/SocketStreamHandleImplSoup.cpp:
(WebCore::SocketStreamHandleImpl::connected):
* platform/win/LoggingWin.cpp:
(WebCore::logLevelString):

Source/WebCore/PAL:

Use Vector instead.

* pal/win/LoggingWin.cpp:
(PAL::logLevelString):

Source/WebKit:

Use Vector instead.

* NetworkProcess/win/SystemProxyWin.cpp:
(WindowsSystemProxy::getSystemHttpProxy):
* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::Connection::processMessage):
(IPC::Connection::sendOutputMessage):
* Platform/win/LoggingWin.cpp:
(WebKit::logLevelString):
* Shared/SandboxExtension.h:
* Shared/mac/SandboxExtensionMac.mm:
(WebKit::SandboxExtension::HandleArray::allocate):
(WebKit::SandboxExtension::HandleArray::operator[]):
(WebKit::SandboxExtension::HandleArray::operator[] const):
(WebKit::SandboxExtension::HandleArray::size const):
(WebKit::SandboxExtension::HandleArray::encode const):

Source/WebKitLegacy/win:

Use Vector instead.

* MarshallingHelpers.cpp:
(MarshallingHelpers::safeArrayToStringArray):
(MarshallingHelpers::safeArrayToIntArray):
* Plugins/PluginPackageWin.cpp:
(WebCore::PluginPackage::fetchInfo):
* WebPreferences.cpp:
(WebPreferences::copyWebKitPreferencesToCFPreferences):
* WebView.cpp:
(WebView::onMenuCommand):

Source/WTF:

If we use `make_unique<char[]>(num)` or `new char[num]`, allocation is
done by the system malloc instead of bmalloc. This patch fixes this issue
by following three changes.

1. Introduce UniqueArray<T>. It allocates memory from FastMalloc. While C++
array with `new` need to hold the size to call destructor correctly, our
UniqueArray only supports type T which does not have a non trivial destructor.
It reduces the allocation size since we do not need to track the size of the
array compared to standard `new T[]`. This is basically usable if we want to
have raw array which pointer won't be changed even if the container is moved.
In addition, we also extend UniqueArray<T> for types which have non trivial
destructors.

2. Use Vector<T> instead.

3. Annotate allocated types with MAKE_FAST_ALLOCATED. Since it introduces
new[] and delete[] operators, make_unique<T[]>(num) will allocate memory
from FastMalloc.

* WTF.xcodeproj/project.pbxproj:
* wtf/Assertions.cpp:
* wtf/CMakeLists.txt:
* wtf/FastMalloc.h:
(WTF::FastFree::operator() const):
(WTF::FastFree<T::operator() const):
* wtf/MallocPtr.h:
(WTF::MallocPtr::operator bool const):
* wtf/StackShot.h:
(WTF::StackShot::StackShot):
(WTF::StackShot::operator=):
* wtf/SystemFree.h:
(WTF::SystemFree<T::operator() const):
* wtf/UniqueArray.h: Copied from Source/WebKit/Platform/win/LoggingWin.cpp.
(WTF::makeUniqueArray):
* wtf/Vector.h:
(WTF::VectorTypeOperations::forceInitialize):

Tools:

* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/UniqueArray.cpp: Copied from Source/WebKit/Platform/win/LoggingWin.cpp.
(TestWebKitAPI::NonTrivialDestructor::NonTrivialDestructor):
(TestWebKitAPI::NonTrivialDestructor::~NonTrivialDestructor):
(TestWebKitAPI::NonTrivialDestructor::setLog):
(TestWebKitAPI::TEST):

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

18 months agoSupport for preconnect Link headers
yoav@yoav.ws [Tue, 6 Mar 2018 06:59:34 +0000 (06:59 +0000)]
Support for preconnect Link headers
https://bugs.webkit.org/show_bug.cgi?id=181657

Reviewed by Darin Adler.

Source/WebCore:

Move the preconnect functionality into its own function, and
also call this function when Link headers are processed.

Test: http/tests/preconnect/link-header-rel-preconnect-http.php

* loader/LinkLoader.cpp:
(WebCore::LinkLoader::loadLinksFromHeader): Call preconnectIfNeeded.
(WebCore::LinkLoader::preconnectIfNeeded): Preconnect to a host functionality moved here.
(WebCore::LinkLoader::loadLink): Call preconnectIfNeeded.
* loader/LinkLoader.h:

LayoutTests:

Add test to see Link preconnect headers trigger a connection.

* http/tests/preconnect/link-header-rel-preconnect-http-expected.txt: Added.
* http/tests/preconnect/link-header-rel-preconnect-http.html: Added.
* http/tests/preconnect/resources/header-preconnect.php: Added.
* platform/win/TestExpectations: Skipped the preconnect test directory, rather than the individual files in it.

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

18 months agoAdd ChildrenAffectedByForwardPositionalRules bit for nth-child pseudo class marking
antti@apple.com [Tue, 6 Mar 2018 05:59:08 +0000 (05:59 +0000)]
Add ChildrenAffectedByForwardPositionalRules bit for nth-child pseudo class marking
https://bugs.webkit.org/show_bug.cgi?id=183341
<rdar://problem/38151470>

Reviewed by Zalan Bujtas.

Use it instead of AffectsNextSibling/AffectedByPreviousSibling bits, similar to ChildrenAffectedByBackwardPositionalRules bit.
This is more efficient and requires way less marking.

* css/SelectorChecker.cpp:
(WebCore::countElementsBefore):
(WebCore::countElementsOfTypeBefore):
(WebCore::SelectorChecker::checkOne const):

    Mark with ChildrenAffectedByForwardPositionalRules.

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChildOf):

     Mark with ChildrenAffectedByForwardPositionalRules.

* dom/Element.cpp:
(WebCore::checkForSiblingStyleChanges):

    Invalidate siblings after added/removed element.

(WebCore::Element::setChildrenAffectedByForwardPositionalRules):
(WebCore::Element::hasFlagsSetDuringStylingOfChildren const):
(WebCore::Element::rareDataChildrenAffectedByForwardPositionalRules const):

    Add the new marking bit.

* dom/Element.h:
(WebCore::Element::childrenAffectedByForwardPositionalRules const):
(WebCore::Element::attributeWithoutSynchronization const):

    Remove assert so we can use this to get the current unresolved lazy value of style attrbute.

* dom/ElementRareData.h:
(WebCore::ElementRareData::childrenAffectedByForwardPositionalRules const):
(WebCore::ElementRareData::setChildrenAffectedByForwardPositionalRules):
(WebCore::ElementRareData::ElementRareData):
(WebCore::ElementRareData::resetStyleRelations):

     Add the new marking bit.

* dom/StyledElement.cpp:
(WebCore::StyledElement::invalidateStyleAttribute):

    In special case where we have attribute selectors for style attribute, synchronize the attribute immediately so we get invalidation right.
    Tested by fast/css/style-attribute-invalidation-propagates-to-counted-siblings.html

* style/StyleRelations.cpp:
(WebCore::Style::commitRelationsToRenderStyle):
(WebCore::Style::commitRelations):

    Commit the new bit.

* style/StyleRelations.h:

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

18 months agoMark imported/w3c/web-platform-tests/service-workers/service-worker/registration...
ryanhaddad@apple.com [Tue, 6 Mar 2018 04:38:40 +0000 (04:38 +0000)]
Mark imported/w3c/web-platform-tests/service-workers/service-worker/registration-updateviacache.https.html as slow.
https://bugs.webkit.org/show_bug.cgi?id=180982

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

18 months agoUnreviewed build fix, remove unused variables.
ryanhaddad@apple.com [Tue, 6 Mar 2018 04:22:46 +0000 (04:22 +0000)]
Unreviewed build fix, remove unused variables.

* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeSpeakAs):
(WebCore::consumeHangingPunctuation):

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

18 months agofast/loader/onload-policy-ignore-for-frame.html is timing out with async policy delegates
cdumez@apple.com [Tue, 6 Mar 2018 03:13:32 +0000 (03:13 +0000)]
fast/loader/onload-policy-ignore-for-frame.html is timing out with async policy delegates
https://bugs.webkit.org/show_bug.cgi?id=183337

Reviewed by Ryosuke Niwa.

Source/WebCore:

Make sure we call checkCompleted() before calling checkLoadComplete() in
FrameLoader::continueLoadAfterNavigationPolicy() when the client tells us
to ignore the navigation, so that we properly recognize that the load is
done. This matches what is already done in FrameLoader::receivedMainResourceError().

Test: fast/loader/onload-policy-ignore-for-frame-async-delegates.html

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy):

LayoutTests:

Add layout test coverage.

* fast/loader/onload-policy-ignore-for-frame-async-delegates-expected.txt: Added.
* fast/loader/onload-policy-ignore-for-frame-async-delegates.html: Added.

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

18 months ago[Cocoa] Allow user-installed fonts to be disabled
mmaxfield@apple.com [Tue, 6 Mar 2018 03:06:06 +0000 (03:06 +0000)]
[Cocoa] Allow user-installed fonts to be disabled
https://bugs.webkit.org/show_bug.cgi?id=183349

Rubber stamped by Brent Fulgham.

Tests: fast/text/user-installed-font.html
       fast/text/user-installed-fonts/disable.html
       fast/text/user-installed-fonts/shadow-disable.html
       fast/text/user-installed-fonts/shadow-family-disable.html
       fast/text/user-installed-fonts/shadow-family.html
       fast/text/user-installed-fonts/shadow-postscript-disable.html
       fast/text/user-installed-fonts/shadow-postscript-family-disable.html
       fast/text/user-installed-fonts/shadow-postscript-family.html
       fast/text/user-installed-fonts/shadow-postscript.html
       fast/text/user-installed-fonts/shadow.html
       fast/text/user-installed-fonts/system-ui.html

* platform/graphics/cocoa/FontCacheCoreText.cpp:

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

18 months agoJITThunk functions should only be called when the JIT is enabled.
mark.lam@apple.com [Tue, 6 Mar 2018 03:03:01 +0000 (03:03 +0000)]
JITThunk functions should only be called when the JIT is enabled.
https://bugs.webkit.org/show_bug.cgi?id=183351
<rdar://problem/38160091>

Reviewed by Keith Miller.

* jit/JITThunks.cpp:
(JSC::JITThunks::ctiNativeCall):
(JSC::JITThunks::ctiNativeConstruct):
(JSC::JITThunks::ctiInternalFunctionCall):
(JSC::JITThunks::ctiInternalFunctionConstruct):
* runtime/VM.cpp:
(JSC::VM::VM):
(JSC::VM::getCTIInternalFunctionTrampolineFor):

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

18 months agoStart using MAP_JIT for macOS
msaboff@apple.com [Tue, 6 Mar 2018 02:34:09 +0000 (02:34 +0000)]
Start using MAP_JIT for macOS
https://bugs.webkit.org/show_bug.cgi?id=183353

Reviewed by Filip Pizlo.

Unify setting this flag for both iOS and macOS.

* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserveAndCommit):

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

18 months agoDumpRenderTree build fix
mmaxfield@apple.com [Tue, 6 Mar 2018 02:15:56 +0000 (02:15 +0000)]
DumpRenderTree build fix

Unreviewed.

* DumpRenderTree/mac/LayoutTestHelper.m:

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

18 months agoSilence OpenGL and OpenGL ES deprecation warnings in newer SDKs
mmaxfield@apple.com [Tue, 6 Mar 2018 02:13:01 +0000 (02:13 +0000)]
Silence OpenGL and OpenGL ES deprecation warnings in newer SDKs
https://bugs.webkit.org/show_bug.cgi?id=183350

Unreviewed.

* Configurations/WebCore.xcconfig:

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

18 months ago[Mac] Teach WebCore::Pasteboard about file promise drags
aestes@apple.com [Tue, 6 Mar 2018 01:36:31 +0000 (01:36 +0000)]
[Mac] Teach WebCore::Pasteboard about file promise drags
https://bugs.webkit.org/show_bug.cgi?id=183314
<rdar://problem/38105493>

Reviewed by Darin Adler.

Source/WebCore:

While WebKit does support receiving file promise drags (since r210360), WebCore::Pasteboard
has not been instructed on how to read their file paths. When the various pasteboard readers
ask for file paths after a file promise drop, they receive an empty vector. This impacts
various features, most notably the DataTransfer API.

Pasteboard actually cannot learn about promised file paths from the pasteboard itself, as
the pasteboard only contains the dragged files' UTIs. Promised file paths aren't known until
the WebKits call -[NSFilePromiseReceiver receivePromisedFilesAtDestination:...], at which
point the file paths are passed to WebCore as part of WebCore::DragData.

When we construct new Pasteboards for drag and drop, we need to store any promised file
paths from the DragData. Then, when the various pasteboard readers ask for file paths and
NSFilesPromisePboardType is on the pasteboard, we can return these promised file paths.

Tests: editing/pasteboard/data-transfer-items-drag-drop-file-promise.html
       editing/pasteboard/data-transfer-items-drop-file-promise.html
       editing/pasteboard/datatransfer-items-drop-plaintext-file-promise.html
       editing/pasteboard/datatransfer-types-dropping-text-file-promise.html
       editing/pasteboard/drag-file-promises-to-editable-element-as-URLs.html
       editing/pasteboard/drag-file-promises-to-editable-element-as-attachment.html
       editing/pasteboard/file-input-files-access-promise.html

* platform/FileSystem.h:
* platform/Pasteboard.h:
(WebCore::Pasteboard::Pasteboard):
* platform/mac/DragDataMac.mm:
(WebCore::DragData::containsPromise const):
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::Pasteboard):
(WebCore::Pasteboard::createForDragAndDrop):
(WebCore::toString):
(WebCore::Pasteboard::read):
(WebCore::Pasteboard::readFilePaths):
(WebCore::absoluteURLsFromPasteboardFilenames): Deleted.
* platform/mac/PlatformPasteboardMac.mm:
(WebCore::PlatformPasteboard::numberOfFiles const):

Source/WebKit:

Added a FIXME comment.

* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::performDragOperation):

Source/WebKitLegacy/mac:

Added a FIXME comment.

* WebView/WebView.mm:
(-[WebView performDragOperation:]):

Tools:

* DumpRenderTree/DumpRenderTreeFileDraggingSource.h:
* DumpRenderTree/DumpRenderTreeFileDraggingSource.m:
(-[DumpRenderTreeFileDraggingSource initWithPromisedFileURLs:]):
(-[DumpRenderTreeFileDraggingSource dealloc]):

Taught DumpRenderTreeFileDraggingSource to store the promised file URLs.

* DumpRenderTree/mac/DumpRenderTree.mm:
(runTest):

Called +[DumpRenderTreeDraggingInfo clearAllFilePromiseReceivers] after running a test.

* DumpRenderTree/mac/DumpRenderTreeDraggingInfo.h:
* DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm:
(-[DumpRenderTreeFilePromiseReceiver initWithPromisedUTIs:]):
(-[DumpRenderTreeFilePromiseReceiver fileTypes]):
(-[DumpRenderTreeFilePromiseReceiver fileNames]):
(-[DumpRenderTreeFilePromiseReceiver dealloc]):
(copyFile):
(-[DumpRenderTreeFilePromiseReceiver receivePromisedFilesAtDestination:options:operationQueue:reader:]):

We can't instantiate real NSFilePromiseReceivers in DumpRenderTree. They rely on the
pasteboard server to generate unique file URLs, which is incompatible with our swizzled
NSPasteboard.

Instead, create a subclass of NSFilePromiseReceiver that implements its own promise resolution.
-receivePromisedFilesAtDestination:... asks its DumpRenderTreeFileDraggingSource for the
array of file URLs, then copies each to the destination directory on the specified operation
queue. It emulates how NSPasteboard tries to find a unique destination name by appending
numbers to the file name.

All receivers are collected in a global array that is cleared when each test finishes.
DumpRenderTreeFilePromiseReceiver will delete the files it copied in -dealloc.

(+[DumpRenderTreeDraggingInfo clearAllFilePromiseReceivers]):
(-[DumpRenderTreeDraggingInfo enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:]):

If NSFilesPromisePboardType is on the pasteboard and classArray contains
NSFilePromiseReceiver, construct a DumpRenderTreeFilePromiseReceiver, add it to the array of
all file promise receivers, then wrap it in an NSDraggingItem and call block.

* DumpRenderTree/mac/EventSendingController.mm:
(+[EventSendingController isSelectorExcludedFromWebScript:]):
(+[EventSendingController webScriptNameForSelector:]):
(-[EventSendingController beginDragWithFilePromises:]):

Implement eventSender.beginDragWithFilePromises() by placing file UTIs on the pasteboard
with type NSFilesPromisePboardType, creating a DumpRenderTreeFileDraggingSource with the
file URLs, and creating a new DumpRenderTreeDraggingInfo and passing it to
-[WebView draggingEntered:].

LayoutTests:

Added versions of file dragging tests in editing/pasteboard/ that use
beginDragWithFilePromises() instead of beginDragWithFiles().

* TestExpectations: Skipped the new tests.
* editing/pasteboard/data-transfer-items-drag-drop-file-promise-expected.txt: Added.
* editing/pasteboard/data-transfer-items-drag-drop-file-promise.html: Added.
* editing/pasteboard/data-transfer-items-drop-file-promise-expected.txt: Added.
* editing/pasteboard/data-transfer-items-drop-file-promise.html: Added.
* editing/pasteboard/datatransfer-items-drop-plaintext-file-promise-expected.txt: Added.
* editing/pasteboard/datatransfer-items-drop-plaintext-file-promise.html: Added.
* editing/pasteboard/datatransfer-types-dropping-text-file-promise-expected.txt: Added.
* editing/pasteboard/datatransfer-types-dropping-text-file-promise.html: Added.
* editing/pasteboard/drag-file-promises-to-editable-element-as-URLs-expected.txt: Added.
* editing/pasteboard/drag-file-promises-to-editable-element-as-URLs.html: Added.
* editing/pasteboard/drag-file-promises-to-editable-element-as-attachment-expected.txt: Added.
* editing/pasteboard/drag-file-promises-to-editable-element-as-attachment.html: Added.
* editing/pasteboard/file-input-files-access-promise-expected.txt: Added.
* editing/pasteboard/file-input-files-access-promise.html: Added.
* platform/mac-wk1/TestExpectations: Un-skipped the new tests.
* platform/win/TestExpectations: Skipped the new tests.

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

18 months ago[webkitpy] Bugzilla class should use NetworkTransaction for network operations
aakash_jain@apple.com [Tue, 6 Mar 2018 01:30:37 +0000 (01:30 +0000)]
[webkitpy] Bugzilla class should use NetworkTransaction for network operations
https://bugs.webkit.org/show_bug.cgi?id=183222

Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
(Bugzilla.open_url): Method which uses NetworkTransaction for opening url.
(Bugzilla.fetch_user): Used self.open_url instead of directly calling browser.open().
(Bugzilla.add_user_to_groups): Ditto.
(Bugzilla._fetch_bug_page): Ditto.
(Bugzilla.fetch_attachment_contents): Ditto.
(Bugzilla.get_bug_id_for_attachment_id): Ditto.
(Bugzilla.authenticate): Ditto.
(Bugzilla.add_attachment_to_bug): Ditto.
(Bugzilla.add_patch_to_bug): Ditto.
(Bugzilla.create_bug): Ditto.
(Bugzilla.clear_attachment_flags): Ditto.
(Bugzilla.set_flag_on_attachment): Ditto.
(Bugzilla.obsolete_attachment): Ditto.
(Bugzilla.add_cc_to_bug): Ditto.
(Bugzilla.post_comment_to_bug): Ditto.
(Bugzilla.close_bug_as_fixed): Ditto.
(Bugzilla.reassign_bug): Ditto.
(Bugzilla.reopen_bug): Ditto.
(Bugzilla._fetch_bug_page_by_url): Deleted, not required anymore.
* Scripts/webkitpy/common/net/networktransaction.py:
(NetworkTransaction.run): Added a FIXME.

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

18 months ago[Mac] Fix the build
aestes@apple.com [Tue, 6 Mar 2018 00:24:20 +0000 (00:24 +0000)]
[Mac] Fix the build

* Modules/applepay/ApplePaySession.cpp:
(WebCore::convertAndValidate): Removed unused variables.

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

18 months agoExpose still more WKPreferences SPI to match C SPI
jeffm@apple.com [Mon, 5 Mar 2018 23:19:33 +0000 (23:19 +0000)]
Expose still more WKPreferences SPI to match C SPI
https://bugs.webkit.org/show_bug.cgi?id=183045

Reviewed by Alex Christensen.

* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _setAllowsInlineMediaPlayback:]):
(-[WKPreferences _allowsInlineMediaPlayback]):
(-[WKPreferences _setApplePayEnabled:]):
(-[WKPreferences _applePayEnabled]):
(-[WKPreferences _setDNSPrefetchingEnabled:]):
(-[WKPreferences _dnsPrefetchingEnabled]):
(-[WKPreferences _setInlineMediaPlaybackRequiresPlaysInlineAttribute:]):
(-[WKPreferences _inlineMediaPlaybackRequiresPlaysInlineAttribute]):
(-[WKPreferences _setInvisibleMediaAutoplayNotPermitted:]):
(-[WKPreferences _invisibleMediaAutoplayNotPermitted]):
(-[WKPreferences _setLegacyEncryptedMediaAPIEnabled:]):
(-[WKPreferences _legacyEncryptedMediaAPIEnabled]):
(-[WKPreferences _setMainContentUserGestureOverrideEnabled:]):
(-[WKPreferences _mainContentUserGestureOverrideEnabled]):
(-[WKPreferences _setMediaStreamEnabled:]):
(-[WKPreferences _mediaStreamEnabled]):
(-[WKPreferences _setNeedsStorageAccessFromFileURLsQuirk:]):
(-[WKPreferences _needsStorageAccessFromFileURLsQuirk]):
(-[WKPreferences _setPDFPluginEnabled:]):
(-[WKPreferences _pdfPluginEnabled]):
(-[WKPreferences _setRequiresUserGestureForAudioPlayback:]):
(-[WKPreferences _requiresUserGestureForAudioPlayback]):
(-[WKPreferences _setRequiresUserGestureForVideoPlayback:]):
(-[WKPreferences _requiresUserGestureForVideoPlayback]):
(-[WKPreferences _setServiceControlsEnabled:]):
(-[WKPreferences _serviceControlsEnabled]):
(-[WKPreferences _setShowsToolTipOverTruncatedText:]):
(-[WKPreferences _showsToolTipOverTruncatedText]):
(-[WKPreferences _setTextAreasAreResizable:]):
(-[WKPreferences _textAreasAreResizable]):
(-[WKPreferences _setUseGiantTiles:]):
(-[WKPreferences _useGiantTiles]):
(-[WKPreferences _setWantsBalancedSetDefersLoadingBehavior:]):
(-[WKPreferences _wantsBalancedSetDefersLoadingBehavior]):
(-[WKPreferences _setWebAudioEnabled:]):
(-[WKPreferences _webAudioEnabled]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:

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

18 months agoGardening: build fix.
mark.lam@apple.com [Mon, 5 Mar 2018 22:16:49 +0000 (22:16 +0000)]
Gardening: build fix.

Not reviewed.

* interpreter/AbstractPC.h:
(JSC::AbstractPC::AbstractPC):

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

18 months agoUnreviewed, add baseline for fast/text/combining-enclosing-keycap.html.
ryanhaddad@apple.com [Mon, 5 Mar 2018 19:54:29 +0000 (19:54 +0000)]
Unreviewed, add baseline for fast/text/combining-enclosing-keycap.html.

* platform/ios/fast/text/combining-enclosing-keycap-expected.txt: Added.
* platform/mac/fast/text/combining-enclosing-keycap-expected.txt: Added.

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

18 months agodump-class-layout mishandles duplicates base classes and miscomputes padding
commit-queue@webkit.org [Mon, 5 Mar 2018 19:40:18 +0000 (19:40 +0000)]
dump-class-layout mishandles duplicates base classes and miscomputes padding
https://bugs.webkit.org/show_bug.cgi?id=183311

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2018-03-05
Reviewed by Simon Fraser.

* Scripts/dump-class-layout:
(verify_type):
(verify_type_recursive):
Keep a list of seen (offset, type) that we have output and don't re-output them.
The Python types list the base classes as members multiple times as you iterate
through the members, so just ignore them if we have seem them already at a
specific offset.

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

18 months ago[GTK][Wayland] The GTK Wayland bot exits early because of assertions related with...
clopez@igalia.com [Mon, 5 Mar 2018 19:29:44 +0000 (19:29 +0000)]
[GTK][Wayland] The GTK Wayland bot exits early because of assertions related with libsecret since r221925
https://bugs.webkit.org/show_bug.cgi?id=183330

Reviewed by Michael Catanzaro.

Add libsecret to the JHBuild and build it only when the system version is
less than 0.18.6 (unreleased as of writing this) in order to cherry pick
a fix for a bug that causes crashes with layout tests.

* gtk/jhbuild.modules:
* gtk/patches/libsecret-secret-methods-Don-t-unref-NULL-when-search-fails.patch: Added.

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

18 months agoUnreviewed, follow-up after r229209
utatane.tea@gmail.com [Mon, 5 Mar 2018 19:03:59 +0000 (19:03 +0000)]
Unreviewed, follow-up after r229209
https://bugs.webkit.org/show_bug.cgi?id=183312

Add RELEASE_ASSERT to ensure success.

* wtf/cocoa/CPUTimeCocoa.mm:
(WTF::CPUTime::forCurrentThread):
* wtf/unix/CPUTimeUnix.cpp:
(WTF::CPUTime::forCurrentThread):
* wtf/win/CPUTimeWin.cpp:
(WTF::CPUTime::forCurrentThread):

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

18 months agoDon't invalidate all children when doing insertion/deletion in presence of backward...
antti@apple.com [Mon, 5 Mar 2018 18:43:53 +0000 (18:43 +0000)]
Don't invalidate all children when doing insertion/deletion in presence of backward positional selectors
https://bugs.webkit.org/show_bug.cgi?id=183325
<rdar://problem/38134480>

Reviewed by Zalan Bujtas.

It is sufficient to invalidate siblings before the mutation point.

* dom/Element.cpp:
(WebCore::checkForSiblingStyleChanges):

We already do sibling walk in the case of forwards positional rules and sibling combinators. The work
done here is insignifant compared to cost of overinvalidating.

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

18 months ago[JSC] Use WTF::ArithmeticOperations for CLoop overflow operations
utatane.tea@gmail.com [Mon, 5 Mar 2018 18:31:40 +0000 (18:31 +0000)]
[JSC] Use WTF::ArithmeticOperations for CLoop overflow operations
https://bugs.webkit.org/show_bug.cgi?id=183324

Reviewed by JF Bastien.

We have WTF::ArithmeticOperations which has operations with overflow checking.
This is suitable for CLoop's overflow checking operations. This patch emits
WTF::ArithmeticOperations for CLoop's overflow checking operations. And it is
lowered to optimized code using CPU's overflow flag.

* offlineasm/cloop.rb:

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

18 months agoimported/w3c/web-platform-tests/html/semantics/text-level-semantics/the-a-element...
cdumez@apple.com [Mon, 5 Mar 2018 18:15:48 +0000 (18:15 +0000)]
imported/w3c/web-platform-tests/html/semantics/text-level-semantics/the-a-element/a-download-click-404.html times out with async policy delegates
https://bugs.webkit.org/show_bug.cgi?id=183297

Patch by Ali Juma <ajuma@chromium.org> on 2018-03-05
Reviewed by Chris Dumez.

Source/WebCore:

When a FrameLoader's policy document loader is cleared after receiving a navigation policy decision
to not continue loading, we still need to trigger a check for load completion, since this loader or
an ancestor loader may have been in state isLoadingInAPISense only because of the existence of
the just-cleared policy document loader. Without triggering this check, these loaders may never
call WebFrameLoaderClient::dispatchDidFinishLoad.

Test: http/wpt/html/semantics/text-level-semantics/the-a-element/a-download-click-404.html

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy):

LayoutTests:

Add layout test coverage. Copy expectations from the existing sync-policy version of the test.

* http/wpt/html/semantics/text-level-semantics/the-a-element/a-download-click-404-expected.txt: Added.
* http/wpt/html/semantics/text-level-semantics/the-a-element/a-download-click-404.html: Added.
* http/wpt/html/semantics/text-level-semantics/the-a-element/resources/a-download-404.html: Added.
* platform/ios-wk2/http/wpt/html/semantics/text-level-semantics/the-a-element/a-download-click-404-expected.txt: Added.
* platform/mac-wk1/http/wpt/html/semantics/text-level-semantics/the-a-element/a-download-click-404-expected.txt: Added.
* platform/win/http/wpt/html/semantics/text-level-semantics/the-a-element/a-download-click-404-expected.txt: Added.
* platform/wpe/TestExpectations:

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

18 months agoService worker test gardening
commit-queue@webkit.org [Mon, 5 Mar 2018 18:06:08 +0000 (18:06 +0000)]
Service worker test gardening
https://bugs.webkit.org/show_bug.cgi?id=183264
<rdar://problem/38048743>

Unreviewed.

Patch by Youenn Fablet <youenn@apple.com> on 2018-03-05

* TestExpectations:
* platform/mac-wk2/TestExpectations:

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

18 months ago[GTK] fast/events/blur-focus-window-should-blur-focus-element.html failing
csaavedra@igalia.com [Mon, 5 Mar 2018 15:04:36 +0000 (15:04 +0000)]
[GTK] fast/events/blur-focus-window-should-blur-focus-element.html failing

Unreviewed gardening.

* platform/gtk/TestExpectations: Move this test to the failing test section.

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

18 months ago[GTK] Implement WTR's PlatformWebView::setWindowIsKey()
csaavedra@igalia.com [Mon, 5 Mar 2018 14:44:20 +0000 (14:44 +0000)]
[GTK] Implement WTR's PlatformWebView::setWindowIsKey()
https://bugs.webkit.org/show_bug.cgi?id=183143

Reviewed by Carlos Garcia Campos.

Tools:

Implement ::setWindowIsKey() by keeping a second window to be
presented when the webview's window is to lose its key status.

* WebKitTestRunner/PlatformWebView.h:
* WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
(WTR::PlatformWebView::PlatformWebView):
(WTR::PlatformWebView::~PlatformWebView):
(WTR::PlatformWebView::setWindowIsKey):

LayoutTests:

* platform/gtk/TestExpectations: Unmark the passing tests

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

18 months ago[CMake] Split JSC header copying into public and private targets
don.olmstead@sony.com [Mon, 5 Mar 2018 13:28:35 +0000 (13:28 +0000)]
[CMake] Split JSC header copying into public and private targets
https://bugs.webkit.org/show_bug.cgi?id=183251

Reviewed by Konstantin Tokarev.

.:

* Source/cmake/WebKitMacros.cmake:

Source/JavaScriptCore:

* CMakeLists.txt:

Source/ThirdParty:

* gtest/CMakeLists.txt:

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

18 months agoUnreviewed, attempt to fix Apple port build
utatane.tea@gmail.com [Mon, 5 Mar 2018 12:26:09 +0000 (12:26 +0000)]
Unreviewed, attempt to fix Apple port build

* TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:

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

18 months agoUnreviewed, attempt to fix WPE build
utatane.tea@gmail.com [Mon, 5 Mar 2018 12:21:52 +0000 (12:21 +0000)]
Unreviewed, attempt to fix WPE build

* WebKitTestRunner/InjectedBundle/wpe/TestRunnerWPE.cpp:
(WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
* WebKitTestRunner/wpe/PlatformWebViewWPE.cpp:
(WTR::PlatformWebView::windowSnapshotImage):
* WebKitTestRunner/wpe/TestControllerWPE.cpp:
(WTR::TestController::platformRunUntil):

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

18 months agoUnreviewed, fix MediaTime test
utatane.tea@gmail.com [Mon, 5 Mar 2018 11:12:57 +0000 (11:12 +0000)]
Unreviewed, fix MediaTime test
https://bugs.webkit.org/show_bug.cgi?id=183319

__builtin_xxx_overflow writes overflowed data into ResultType value even if overflow happens.
This is different from the original CheckedArithmetic semantics.

* wtf/CheckedArithmetic.h:

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

18 months agoUnreviewed. Update Selenium WebDriver imported tests.
carlosgc@webkit.org [Mon, 5 Mar 2018 08:40:26 +0000 (08:40 +0000)]
Unreviewed. Update Selenium WebDriver imported tests.

* imported/selenium/importer.json:
* imported/selenium/py/selenium/__init__.py:
* imported/selenium/py/selenium/common/exceptions.py:
* imported/selenium/py/selenium/webdriver/__init__.py:
* imported/selenium/py/selenium/webdriver/remote/webelement.py:
* imported/selenium/py/selenium/webdriver/safari/webdriver.py:
* imported/selenium/py/test/selenium/webdriver/common/select_class_tests.py:

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

18 months agoAutomation: clicking on a disabled option element shouldn't produce an error
carlosgc@webkit.org [Mon, 5 Mar 2018 08:33:58 +0000 (08:33 +0000)]
Automation: clicking on a disabled option element shouldn't produce an error
https://bugs.webkit.org/show_bug.cgi?id=183284

Reviewed by Brian Burg.

This was expected by selenium, but the WebDriver spec says we should simply do nothing in those cases.

14.1 Element Click.
https://w3c.github.io/webdriver/webdriver-spec.html#element-click

Fixes: imported/w3c/webdriver/tests/element_click/select.py::test_option_disabled

* WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::WebAutomationSessionProxy::selectOptionElement):

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

18 months agoWebDriver: Also ignore NoSuchwindow errors when waiting for navigation to complete
carlosgc@webkit.org [Mon, 5 Mar 2018 08:30:59 +0000 (08:30 +0000)]
WebDriver: Also ignore NoSuchwindow errors when waiting for navigation to complete
https://bugs.webkit.org/show_bug.cgi?id=183280

Reviewed by Brian Burg.

We currently ignore NoSuchFrame, but navigation or previous command might have closed the window too.

Fixes: imported/selenium/py/test/selenium/webdriver/common/window_switching_tests.py::testClickingOnAButtonThatClosesAnOpenWindowDoesNotCauseTheBrowserToHang
       imported/selenium/py/test/selenium/webdriver/common/window_switching_tests.py::testCanCallGetWindowHandlesAfterClosingAWindow

* Session.cpp:
(WebDriver::Session::waitForNavigationToComplete): Ignore NoSuchWindow errors.

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

18 months agoAutomation: stale elements not detected when removed from the DOM
carlosgc@webkit.org [Mon, 5 Mar 2018 08:28:42 +0000 (08:28 +0000)]
Automation: stale elements not detected when removed from the DOM
https://bugs.webkit.org/show_bug.cgi?id=183278

Reviewed by Brian Burg.

We detect stale elements when the page is reloaded because the maps are recreated, but if an element is removed
from the DOM for the same document we keep the nodes in the maps. We should clear stale elements before
accessing the maps.

Fixes: imported/selenium/py/test/selenium/webdriver/common/webdriverwait_tests.py::testExpectedConditionStalenessOf

* WebProcess/Automation/WebAutomationSessionProxy.js:
(let.AutomationSessionProxy.prototype.evaluateJavaScriptFunction): Call _clearStaleNodes()
(let.AutomationSessionProxy.prototype.nodeForIdentifier): Ditto.
(let.AutomationSessionProxy.prototype._clearStaleNodes): Check if cached nodes are still in document and remove them
from the maps if they aren't.

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

18 months ago[WTF] Move currentCPUTime and sleep(Seconds) to CPUTime.h and Seconds.h respectively
utatane.tea@gmail.com [Mon, 5 Mar 2018 02:33:55 +0000 (02:33 +0000)]
[WTF] Move currentCPUTime and sleep(Seconds) to CPUTime.h and Seconds.h respectively
https://bugs.webkit.org/show_bug.cgi?id=183312

Reviewed by Mark Lam.

Source/JavaScriptCore:

Remove wtf/CurrentTime.h include pragma.

* API/tests/ExecutionTimeLimitTest.cpp:
(currentCPUTimeAsJSFunctionCallback):
(testExecutionTimeLimit):
* bytecode/SuperSampler.cpp:
* dfg/DFGPlan.cpp:
* heap/BlockDirectory.cpp:
* heap/Heap.cpp:
* heap/IncrementalSweeper.cpp:
* inspector/agents/InspectorConsoleAgent.cpp:
* inspector/agents/InspectorRuntimeAgent.cpp:
* profiler/ProfilerDatabase.cpp:
* runtime/CodeCache.h:
* runtime/JSDateMath.cpp:
* runtime/TypeProfilerLog.cpp:
* runtime/VM.cpp:
* runtime/Watchdog.cpp:
(JSC::Watchdog::shouldTerminate):
(JSC::Watchdog::startTimer):
* testRegExp.cpp:
* wasm/js/JSWebAssemblyCodeBlock.cpp:

Source/WebCore:

Remove wtf/CurrentTime.h include pragma.

* Modules/geolocation/Geolocation.cpp:
* Modules/mediasource/SourceBuffer.cpp:
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
* Modules/speech/SpeechSynthesis.cpp:
* contentextensions/ContentExtensionCompiler.cpp:
* contentextensions/ContentExtensionParser.cpp:
* dom/Document.cpp:
* dom/Element.cpp:
* dom/Event.cpp:
* dom/ScriptedAnimationController.cpp:
* dom/SimulatedClick.cpp:
* fileapi/File.cpp:
* fileapi/FileReader.cpp:
* history/CachedPage.cpp:
* html/BaseDateAndTimeInputType.cpp:
* html/DateTimeInputType.cpp:
* html/HTMLMediaElement.cpp:
* html/MediaController.cpp:
* html/MediaElementSession.cpp:
* html/MonthInputType.cpp:
* html/TimeInputType.cpp:
* html/parser/HTMLParserScheduler.h:
* inspector/InspectorCanvas.cpp:
* loader/FrameLoader.cpp:
* loader/LoadTiming.cpp:
* loader/NavigationScheduler.cpp:
* loader/ProgressTracker.cpp:
* loader/cache/CachedCSSStyleSheet.cpp:
* loader/cache/CachedImage.cpp:
* loader/cache/CachedResource.cpp:
* loader/cache/MemoryCache.cpp:
* page/DOMTimer.cpp:
* page/DOMWindow.cpp:
* page/DragController.cpp:
* page/EventHandler.cpp:
* page/FocusController.cpp:
* page/FrameView.cpp:
* page/Page.cpp:
* page/Performance.cpp:
* page/PerformanceTiming.cpp:
* page/animation/AnimationBase.cpp:
* page/animation/CSSAnimationController.cpp:
* page/mac/WheelEventDeltaFilterMac.mm:
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
* platform/ScrollAnimationKinetic.cpp:
* platform/ScrollAnimationSmooth.cpp:
* platform/ThreadTimers.cpp:
* platform/Timer.cpp:
* platform/audio/mac/AudioSampleDataSource.mm:
* platform/cocoa/ScrollController.mm:
* platform/gamepad/cocoa/GameControllerGamepad.mm:
* platform/gamepad/mac/HIDGamepad.cpp:
* platform/graphics/BitmapImage.cpp:
* platform/graphics/DisplayRefreshMonitorManager.cpp:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
* platform/graphics/ca/GraphicsLayerCA.cpp:
* platform/graphics/ca/LayerPool.cpp:
* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
* platform/graphics/ca/win/CACFLayerTreeHost.cpp:
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
* platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp:
* platform/graphics/cg/GraphicsContextCG.cpp:
* platform/graphics/cocoa/WebCoreDecompressionSession.mm:
* platform/graphics/ios/DisplayRefreshMonitorIOS.mm:
* platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
* platform/graphics/texmap/BitmapTexturePool.h:
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
* platform/graphics/texmap/TextureMapper.cpp:
* platform/graphics/texmap/TextureMapperAnimation.cpp:
* platform/graphics/texmap/TextureMapperFPSCounter.cpp:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
* platform/graphics/win/GraphicsContextDirect2D.cpp:
* platform/graphics/win/GraphicsLayerDirect2D.cpp:
* platform/gtk/PlatformKeyboardEventGtk.cpp:
* platform/gtk/ScrollAnimatorGtk.cpp:
* platform/ios/LegacyTileCache.mm:
* platform/ios/LegacyTileLayerPool.mm:
* platform/ios/ScrollViewIOS.mm:
* platform/mediastream/RealtimeOutgoingVideoSource.cpp:
* platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp:
* platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:
* platform/mock/MockRealtimeMediaSource.cpp:
* platform/mock/MockRealtimeVideoSource.cpp:
* platform/network/CacheValidation.cpp:
* platform/network/DNSResolveQueue.cpp:
* platform/network/ResourceResponseBase.cpp:
* platform/network/curl/CurlCacheEntry.cpp:
* platform/network/soup/ResourceHandleSoup.cpp:
* platform/text/TextEncodingRegistry.cpp:
* platform/text/win/LocaleWin.cpp:
* platform/win/MainThreadSharedTimerWin.cpp:
* platform/win/PlatformMouseEventWin.cpp:
* rendering/RenderLayerCompositor.cpp:
* rendering/RenderProgress.cpp:
* svg/animation/SMILTimeContainer.cpp:
* testing/MockGamepad.cpp:
* workers/WorkerRunLoop.cpp:

Source/WebCore/PAL:

Remove wtf/CurrentTime.h include pragma.

* pal/system/ClockGeneric.cpp:

Source/WebKit:

Remove wtf/CurrentTime.h include pragma.

* NetworkProcess/NetworkResourceLoader.cpp:
* NetworkProcess/cache/CacheStorageEngineCache.cpp:
* NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
* Platform/IPC/Connection.cpp:
* Platform/unix/SharedMemoryUnix.cpp:
* PluginProcess/WebProcessConnection.cpp:
* Shared/ios/NativeWebTouchEventIOS.mm:
* UIProcess/DrawingAreaProxyImpl.cpp:
* UIProcess/ios/WKContentView.mm:
* UIProcess/linux/MemoryPressureMonitor.cpp:
* WebProcess/Gamepad/WebGamepad.cpp:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
* WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:
* WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp:
* WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDisplayRefreshMonitor.mm:
* WebProcess/WebPage/WebURLSchemeTaskProxy.cpp:
* WebProcess/WebProcess.cpp:
* WebProcess/cocoa/WebProcessCocoa.mm:
* WebProcess/gtk/WebProcessMainGtk.cpp:
* WebProcess/win/WebProcessMainWin.cpp:
* WebProcess/wpe/WebProcessMainWPE.cpp:

Source/WebKitLegacy/mac:

Remove wtf/CurrentTime.h include pragma.

* WebView/WebFrame.mm:
* WebView/WebPDFView.mm:

Source/WebKitLegacy/win:

Remove wtf/CurrentTime.h include pragma.

* WebDownload.cpp:
* WebDownloadCFNet.cpp:
* WebDropSource.cpp:

Source/WTF:

1. currentCPUTime to CPUTime.h. It is now defined as CPUTime::forCurrentThread.
We also removes fallback implementation for currentCPUTime since (1) that implementation
is wrong and (2) no environments we support needs this.

2. sleep(Seconds) to Seconds.h. Since sleep(MonotonicTime) and sleep(WallTime) are defined
in MonotonicTime.h and WallTime.h, this code move is natural.

3. Remove wtf/CurrentTime.h since nothing is defined now. But we keep CurrentTime.cpp to
consolidate various time-source implementations in one place.

* WTF.xcodeproj/project.pbxproj:
* benchmarks/ConditionSpeedTest.cpp:
* benchmarks/LockFairnessTest.cpp:
* benchmarks/LockSpeedTest.cpp:
* wtf/CMakeLists.txt:
* wtf/CPUTime.h:
* wtf/CurrentTime.cpp:
(WTF::currentCPUTime): Deleted.
(WTF::sleep): Deleted.
* wtf/CurrentTime.h: Removed.
* wtf/DateMath.cpp:
* wtf/DebugUtilities.h:
* wtf/FastMalloc.cpp:
* wtf/MainThread.cpp:
* wtf/MonotonicTime.cpp:
* wtf/ParkingLot.cpp:
* wtf/Seconds.cpp:
(WTF::sleep):
* wtf/Seconds.h:
* wtf/StackShotProfiler.h:
* wtf/Stopwatch.h:
* wtf/ThreadingPthreads.cpp:
* wtf/ThreadingWin.cpp:
* wtf/cocoa/CPUTimeCocoa.mm:
(WTF::CPUTime::forCurrentThread):
* wtf/cocoa/MemoryPressureHandlerCocoa.mm:
* wtf/linux/MemoryPressureHandlerLinux.cpp:
* wtf/unix/CPUTimeUnix.cpp:
(WTF::CPUTime::forCurrentThread):
* wtf/win/CPUTimeWin.cpp:
(WTF::CPUTime::forCurrentThread):
* wtf/win/RunLoopWin.cpp:

Tools:

Remove wtf/CurrentTime.h include pragma.

* DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp:
* DumpRenderTree/TestNetscapePlugIn/Tests/EvaluateJSWithinNPP_New.cpp:
* DumpRenderTree/TestNetscapePlugIn/Tests/InvokeDestroysPluginWithinNPP_New.cpp:
* DumpRenderTree/TestNetscapePlugIn/Tests/SlowNPPNew.cpp:
* TestWebKitAPI/Tests/WTF/Condition.cpp:
* TestWebKitAPI/Tests/WTF/Signals.cpp:
* TestWebKitAPI/Tests/WTF/ThreadGroup.cpp:
* TestWebKitAPI/Tests/WTF/WorkQueue.cpp:
* TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:
* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
* TestWebKitAPI/jsconly/PlatformUtilitiesJSCOnly.cpp:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:

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

18 months ago[WTF] Use __builtin_xxx_overflow for CheckedArithmetic
utatane.tea@gmail.com [Mon, 5 Mar 2018 02:15:12 +0000 (02:15 +0000)]
[WTF] Use __builtin_xxx_overflow for CheckedArithmetic
https://bugs.webkit.org/show_bug.cgi?id=183319

Reviewed by Darin Adler.

GCC and Clang has the builtins for arithmetic operations with overflow flags.
CheckedArithmetic operations can be done with this builtins. Since the compiler
can use overflow flags, potentially this is more efficient. CheckedArithmetic
already has TestWebKitAPI tests and we ensured the tests pass.

* wtf/CheckedArithmetic.h:

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

18 months agoMark http/wpt/html/browsers/history/the-location-interface/location-protocol-setter...
pvollan@apple.com [Mon, 5 Mar 2018 00:44:24 +0000 (00:44 +0000)]
Mark http/wpt/html/browsers/history/the-location-interface/location-protocol-setter-non-broken-async-delegate.html as failure on Windows.
https://bugs.webkit.org/show_bug.cgi?id=183322

Unreviewed test gardening.

* platform/win/TestExpectations:

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

18 months agoWeb Automation: script evaluations via WebDriver should have a user gesture indicator
bburg@apple.com [Sun, 4 Mar 2018 22:59:20 +0000 (22:59 +0000)]
Web Automation: script evaluations via WebDriver should have a user gesture indicator
https://bugs.webkit.org/show_bug.cgi?id=183230
<rdar://problem/37959739>

Reviewed by Andy Estes.

APIs that normally require a user gesture should just work when using via WebDriver.
To support cases where tests need to simulate user actions with JavaScript, use a
fake user gesture, similar to how -[WKWebView evaluateJavaScript:] forces a user
gesture when clients evaluate JavaScript in their web view.

No new tests, this is covered by W3C tests that use the Fullscreen API.
This API does nothing if there is no user gesture; with this patch, it just works.

* WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction):

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

18 months agoMake !ENABLE(DATA_DETECTION) iOS build actually succeed
timothy_horton@apple.com [Sun, 4 Mar 2018 20:03:56 +0000 (20:03 +0000)]
Make !ENABLE(DATA_DETECTION) iOS build actually succeed
https://bugs.webkit.org/show_bug.cgi?id=183283
<rdar://problem/38062148>

Reviewed by Sam Weinig.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore/PAL:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit:

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
(-[WKContentView _dataForPreviewItemController:atPosition:type:]):
Guard some more code with ENABLE(DATA_DETECTION).

Source/WebKitLegacy/mac:

* Configurations/FeatureDefines.xcconfig:

Tools:

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

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

18 months agoBuilding with ONLY_ACTIVE_ARCH=NO and ARCHS=x86_64 fails
mitz@apple.com [Sun, 4 Mar 2018 19:37:23 +0000 (19:37 +0000)]
Building with ONLY_ACTIVE_ARCH=NO and ARCHS=x86_64 fails
https://bugs.webkit.org/show_bug.cgi?id=183320

Reviewed by Tim Horton.

* Configurations/PluginService.32.xcconfig: If the Apple build tool specifies
  RC_ARCHS=x86_64, then let the service build for x86_64, but don’t install it.

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

18 months ago[l10n] Updated Indonesian translation for WebKitGTK+
mcatanzaro@igalia.com [Sun, 4 Mar 2018 16:56:06 +0000 (16:56 +0000)]
[l10n] Updated Indonesian translation for WebKitGTK+
https://bugs.webkit.org/show_bug.cgi?id=183318

Patch by Andika Triwidada <atriwidada@gnome.org> on 2018-03-04
Rubber-stamped by Michael Catanzaro.

* id.po:

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

18 months agoDelete incorrect version of clampTo() function from SVGToOTFFontConversion.cpp
commit-queue@webkit.org [Sun, 4 Mar 2018 05:19:13 +0000 (05:19 +0000)]
Delete incorrect version of clampTo() function from SVGToOTFFontConversion.cpp
https://bugs.webkit.org/show_bug.cgi?id=183165

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2018-03-03
Reviewed by Darin Adler.

Source/WebCore:

Some of the calls in SVGToOTFFontConversion.cpp were directed to the function
in MathExtras.h while the rest were directed to this local static function.
There should not be two versions with the same name while they are supposed
to do the same thing. Besides, the local version does not work correctly
if the type of the argument's max limit is less the max limit of the returned
type, e.g. char -> uint16_t.

* svg/SVGToOTFFontConversion.cpp:
(WebCore::clampTo): Deleted.

LayoutTests:

Re-baseline the results of these two tests since the local version of
clampTo() was not returning the expected results always.

* platform/ios/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.txt:
* platform/ios/svg/text/text-altglyph-01-b-expected.txt:

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

18 months agoNotify the NetworkProcess when a session is servicing an automation client
bfulgham@apple.com [Sat, 3 Mar 2018 23:27:18 +0000 (23:27 +0000)]
Notify the NetworkProcess when a session is servicing an automation client
https://bugs.webkit.org/show_bug.cgi?id=183306
<rdar://problem/37835783>

Reviewed by Brian Burg.

Network loads servicing WebDriver are done through an ephemeral session. While this is great
for protecting a developer's machine from sharing state with test runs, it has the unintended
effect of blocking certain logging operations.

We do not log content in ephemeral sessions to protect user privacy. However, ephemeral sessions
generated by WebDriver should participate in logging so that proper testing (with logging) can
be done.

This patch signals the NetworkProcess when an ephemeral session (created for automation purposes)
is created, so that it can allow logging.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::destroySession): Remove controlled-by-automation entry.
(WebKit::NetworkProcess::sessionIsControlledByAutomation const): Added.
(WebKit::NetworkProcess::setSessionIsControlledByAutomation): Added.
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::isAlwaysOnLoggingAllowed const): Checks if the relevant session
is servicing an automation client, and returns true if it is.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Signal the network process if this page is being created
for an automation client.

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

18 months ago[RenderTreeBuilder] Move styleDidChange mutation logic to RenderTreeUpdater
zalan@apple.com [Sat, 3 Mar 2018 20:13:42 +0000 (20:13 +0000)]
[RenderTreeBuilder] Move styleDidChange mutation logic to RenderTreeUpdater
https://bugs.webkit.org/show_bug.cgi?id=183273
<rdar://problem/38054892>

Reviewed by Antti Koivisto.

Source/WebCore:

Covered by existing tests.

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::styleDidChange):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::styleDidChange):
(WebCore::RenderElement::noLongerAffectsParentBlock const): Deleted.
* rendering/RenderElement.h:
* rendering/updating/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::updateElementRenderer):

LayoutTests:

This is just a different repaint order.

* fast/repaint/absolute-position-change-containing-block-expected.txt:

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

18 months ago[GTK] POTFILES.in is out of date
mcatanzaro@igalia.com [Sat, 3 Mar 2018 19:02:23 +0000 (19:02 +0000)]
[GTK] POTFILES.in is out of date
https://bugs.webkit.org/show_bug.cgi?id=183313

Unreviewed, remove WebErrorsGLib.cpp after r229193

* POTFILES.in:

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

18 months agoSource/WebCore:
yoav@yoav.ws [Sat, 3 Mar 2018 08:57:34 +0000 (08:57 +0000)]
Source/WebCore:
Link headers for subresources are not being processes
https://bugs.webkit.org/show_bug.cgi?id=181789

Reviewed by Youenn Fablet.

Triggers Link header processing when the Link headers arrive on a subresource.

Test: http/tests/preload/link-header-on-subresource.html

* loader/LinkLoader.cpp:
(WebCore::LinkLoader::loadLinksFromHeader): Change the media check conditions.
* loader/LinkLoader.h: Add a third state for media checks.
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didReceiveResponse): Preload links from headers for subresources.

LayoutTests:
Link headers for subresources are not being processed
https://bugs.webkit.org/show_bug.cgi?id=181789

Reviewed by Youenn Fablet.

Adds tests to make sure Link headers on subresources are being processed.

* http/tests/preload/link-header-on-subresource-expected.txt: Added.
* http/tests/preload/link-header-on-subresource.html: Added.
* http/tests/preload/resources/dummy-preloads-subresource.css.php: Added.

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

18 months ago[WTF] Remove RunLoop and RunLoop::Timer's interface using double as seconds
utatane.tea@gmail.com [Sat, 3 Mar 2018 07:58:55 +0000 (07:58 +0000)]
[WTF] Remove RunLoop and RunLoop::Timer's interface using double as seconds
https://bugs.webkit.org/show_bug.cgi?id=183293

Reviewed by Alex Christensen.

Source/WebCore:

* platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
(WebCore::TextureMapperPlatformLayerProxy::dropCurrentBufferWhilePreservingTexture):

Source/WebKit:

* Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
(WebKit::CompositingRunLoop::scheduleUpdate):
(WebKit::CompositingRunLoop::compositionCompleted):
(WebKit::CompositingRunLoop::updateCompleted):
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.cpp:
(WebKit::ThreadedDisplayRefreshMonitor::dispatchDisplayRefreshCallback):

Source/WTF:

This patch mainly drops startRepeating(double) and startOneShot(double) interfaces.
Use startRepeating(Seconds) and startOneShot(Seconds) instead.

* wtf/MemoryPressureHandler.cpp:
(WTF::MemoryPressureHandler::setShouldUsePeriodicMemoryMonitor):
* wtf/RunLoop.h:
(WTF::RunLoop::TimerBase::startRepeating):
(WTF::RunLoop::TimerBase::startOneShot):
(WTF::RunLoop::TimerBase::startInternal):
* wtf/RunLoopTimer.h:
* wtf/RunLoopTimerCF.cpp:
(WTF::RunLoopTimerBase::start):
* wtf/cf/RunLoopCF.cpp:
(WTF::RunLoop::runForDuration):
(WTF::RunLoop::TimerBase::start):
* wtf/generic/RunLoopGeneric.cpp:
(WTF::RunLoop::TimerBase::start):
* wtf/glib/RunLoopGLib.cpp:
(WTF::RunLoop::TimerBase::start):
* wtf/win/MemoryPressureHandlerWin.cpp:
(WTF::MemoryPressureHandler::install):
* wtf/win/RunLoopWin.cpp:
(WTF::RunLoop::TimerBase::start):

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

18 months agoRemove NP_GLContext since it is unsupported
dino@apple.com [Sat, 3 Mar 2018 00:07:51 +0000 (00:07 +0000)]
Remove NP_GLContext since it is unsupported
https://bugs.webkit.org/show_bug.cgi?id=183305
<rdar://problem/36875555>

Reviewed by Simon Fraser.

* plugins/npapi.h: Remove NP_GLContext and mention that
it is not supported.

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

18 months agoShare common WebError implementation
don.olmstead@sony.com [Sat, 3 Mar 2018 00:07:33 +0000 (00:07 +0000)]
Share common WebError implementation
https://bugs.webkit.org/show_bug.cgi?id=183303

Reviewed by Ryosuke Niwa.

* Shared/WebErrors.cpp:
(WebKit::cancelledError):
(WebKit::fileDoesNotExistError):
* Shared/glib/WebErrorsGlib.cpp: Removed.
* SourcesGTK.txt:
* SourcesWPE.txt:

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

18 months agoService worker test gardening
commit-queue@webkit.org [Fri, 2 Mar 2018 23:15:29 +0000 (23:15 +0000)]
Service worker test gardening
https://bugs.webkit.org/show_bug.cgi?id=183264
<rdar://problem/38048743>

Unreviewed.

Patch by Youenn Fablet <youenn@apple.com> on 2018-03-02

* TestExpectations:
* platform/mac-wk2/TestExpectations:

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

18 months agoimported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location...
cdumez@apple.com [Fri, 2 Mar 2018 23:14:33 +0000 (23:14 +0000)]
imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location-protocol-setter-non-broken.html crashes with async policy delegates
https://bugs.webkit.org/show_bug.cgi?id=183294
<rdar://problem/38073596>

Reviewed by Youenn Fablet.

Source/WebCore:

Drop code that was added to SubresourceLoader::willCancel() in r228852. The purpose of this code
was to make sure that SubresourceLoader::m_policyForResponseCompletionHandler always gets called,
even when the load is cancelled. However, this code is not needed (since m_policyForResponseCompletionHandler
is a CompletionHandler, an assertion will be hit if we fail to call it and we'll know). Calling
the completionHandler inside SubresourceLoader::willCancel() is too early and leads to crashes.

The completionHandler currently gets called DocumentLoader::responseReceived() via a call to
mainResourceLoader->didReceiveResponsePolicy(). Note that in r229177, we made sure that the
call to didReceiveResponsePolicy() happens *after* the call to continueAfterContentPolicy()
to maintain our non-async policy delegate behavior. However, continueAfterContentPolicy()
would end up calling willCancel() and call the completionHandler when shouldContinue was
false.

Test: http/wpt/html/browsers/history/the-location-interface/location-protocol-setter-non-broken-async-delegate.html

* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::willCancel):

LayoutTests:

Add layout test coverage.

* http/wpt/html/browsers/history/the-location-interface/location-protocol-setter-non-broken-async-delegate-expected.txt: Added.
* http/wpt/html/browsers/history/the-location-interface/location-protocol-setter-non-broken-async-delegate.html: Added.

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

18 months agoFix the build after r229185 and r229184
timothy_horton@apple.com [Fri, 2 Mar 2018 22:55:12 +0000 (22:55 +0000)]
Fix the build after r229185 and r229184

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::exernalDeviceDisplayNameForPlayer):
* platform/ios/DeviceOrientationClientIOS.h:
* platform/ios/DeviceOrientationClientIOS.mm:

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

18 months agoAdd clang-format configuration
don.olmstead@sony.com [Fri, 2 Mar 2018 22:13:12 +0000 (22:13 +0000)]
Add clang-format configuration
https://bugs.webkit.org/show_bug.cgi?id=183302

Reviewed by Ryosuke Niwa.

* .clang-format: Added.

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

18 months agoLayoutTest imported/w3c/web-platform-tests/service-workers/service-worker/fetch-event...
commit-queue@webkit.org [Fri, 2 Mar 2018 22:10:17 +0000 (22:10 +0000)]
LayoutTest imported/w3c/web-platform-tests/service-workers/service-worker/fetch-event-within-sw.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=179248
<rdar://problem/35377756>

Patch by Youenn Fablet <youenn@apple.com> on 2018-03-02
Reviewed by Chris Dumez.

In case we go up to the initializeSize step and Caches was cleared
between the time we stated to initialize and the time we got there,
we need to make as if Caches was not initialized,
thus keeping m_isInitialized to false and m_storage to nullptr.

* NetworkProcess/cache/CacheStorageEngineCaches.cpp:
(WebKit::CacheStorage::Caches::initializeSize):

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

18 months agoBuild fix after r229174
commit-queue@webkit.org [Fri, 2 Mar 2018 22:00:14 +0000 (22:00 +0000)]
Build fix after r229174
https://bugs.webkit.org/show_bug.cgi?id=183301

Patch by Christopher Reid <chris.reid@sony.com> on 2018-03-02
Reviewed by Alex Christensen.

Updating MemoryPressureHandler::holdOff to use Seconds instead of unsigned.

* wtf/MemoryPressureHandler.cpp:

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

18 months agoMake the LLInt probe work for ARM64.
mark.lam@apple.com [Fri, 2 Mar 2018 20:19:17 +0000 (20:19 +0000)]
Make the LLInt probe work for ARM64.
https://bugs.webkit.org/show_bug.cgi?id=183298
<rdar://problem/38077413>

Reviewed by Filip Pizlo.

* llint/LowLevelInterpreter.asm:

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

18 months agoMake the !ENABLE(DEVICE_ORIENTATION) iOS build succeed
timothy_horton@apple.com [Fri, 2 Mar 2018 19:55:09 +0000 (19:55 +0000)]
Make the !ENABLE(DEVICE_ORIENTATION) iOS build succeed
https://bugs.webkit.org/show_bug.cgi?id=183296

Reviewed by Dan Bernstein.

* platform/ios/DeviceMotionClientIOS.h:
* platform/ios/DeviceMotionClientIOS.mm:
* platform/ios/WebCoreMotionManager.h:
* platform/ios/WebCoreMotionManager.mm:

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