WebKit-https.git
3 years ago[WinCairo] Update WinCairoRequirements
don.olmstead@sony.com [Fri, 17 Nov 2017 03:36:59 +0000 (03:36 +0000)]
[WinCairo] Update WinCairoRequirements
https://bugs.webkit.org/show_bug.cgi?id=179790

Reviewed by Alex Christensen.

.:

* Source/cmake/OptionsWinCairo.cmake:

Source/WebCore:

No new tests. No change in behavior.

* PlatformWin.cmake:

Source/WebKit:

* PlatformWin.cmake:

Tools:

* TestWebKitAPI/PlatformWin.cmake:

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

3 years agoUnreviewed, rebaseline skipped / flaky service worker tests
cdumez@apple.com [Fri, 17 Nov 2017 03:28:06 +0000 (03:28 +0000)]
Unreviewed, rebaseline skipped / flaky service worker tests

* web-platform-tests/service-workers/cache-storage/serviceworker/cache-match.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-canvas-tainting-cache.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-canvas-tainting.https-expected.txt:
* web-platform-tests/service-workers/service-worker/respond-with-body-accessed-response.https-expected.txt:
* web-platform-tests/service-workers/service-worker/unregister-controller.https-expected.txt:

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

3 years ago[Web Animations] Allow KeyframeEffect to support CSS property animation blending
graouts@webkit.org [Fri, 17 Nov 2017 03:25:07 +0000 (03:25 +0000)]
[Web Animations] Allow KeyframeEffect to support CSS property animation blending
https://bugs.webkit.org/show_bug.cgi?id=179810

Reviewed by Tim Horton.

We used to pass nullptr instead of a valid AnimationBase when calling CSSPropertyAnimation::blendProperties()
in KeyframeEffect::applyAtLocalTime() when blending CSS styles during a keyframe animation. Without this
AnimationBase, some blending functions would crash as certain supporting calls couldn't be made.

We now add a new CSSPropertyBlendingClient virtual interface that both KeyframeEffect and AnimationBase
implement and that CSSPropertyAnimation::blendProperties() take as a parameter in order to support
blending code.

* WebCore.xcodeproj/project.pbxproj:
* animation/CSSPropertyBlendingClient.h: Added.
* animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::applyAtLocalTime):
(WebCore::KeyframeEffect::renderer const):
(WebCore::KeyframeEffect::currentStyle const):
* animation/KeyframeEffect.h:
* page/animation/AnimationBase.h:
(WebCore::AnimationBase::isAccelerated const):
(WebCore::AnimationBase::transformFunctionListsMatch const):
(WebCore::AnimationBase::filterFunctionListsMatch const):
(WebCore::AnimationBase::backdropFilterFunctionListsMatch const):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
(WebCore::blendFilterOperations):
(WebCore::blendFilter):
(WebCore::crossfadeBlend):
(WebCore::PropertyWrapperAcceleratedBackdropFilter::blend const):
(WebCore::PropertyWrapperShadow::blendSimpleOrMatchedShadowLists const):
(WebCore::PropertyWrapperShadow::blendMismatchedShadowLists const):
(WebCore::CSSPropertyAnimation::blendProperties):
* page/animation/CSSPropertyAnimation.h:

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

3 years agoService Worker should get the body of intercepted requests
commit-queue@webkit.org [Fri, 17 Nov 2017 02:36:03 +0000 (02:36 +0000)]
Service Worker should get the body of intercepted requests
https://bugs.webkit.org/show_bug.cgi?id=179776

Patch by Youenn Fablet <youenn@apple.com> on 2017-11-16
Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* imported/w3c/web-platform-tests/fetch/api/request/request-consume-empty-expected.txt:
* imported/w3c/web-platform-tests/fetch/api/request/request-init-002-expected.txt:
* imported/w3c/web-platform-tests/fetch/api/response/response-consume-empty-expected.txt:
* imported/w3c/web-platform-tests/fetch/api/response/response-consume-expected.txt:
* imported/w3c/web-platform-tests/fetch/api/response/response-init-002-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-event.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-request-xhr.https-expected.txt:

Source/WebCore:

Test: http/tests/workers/service/service-worker-request-with-body.https.html

Make use of FetchBodyConsumer to store raw data for FetchRequest.
This is used when setting FetchRequest body from a FormData.
If FormData is only bytes (no blob, no file), FetchBodyConsumer will store that data.
This allows Service Worker to get access to simple request bodies.

* Modules/fetch/FetchBody.cpp:
(WebCore::FetchBody::fromFormData):
(WebCore::FetchBody::consume):
(WebCore::FetchBody::bodyAsFormData const): Making sure body is set appropriately when used to make fetch load.
* Modules/fetch/FetchBody.h: Making some methods private.
* Modules/fetch/FetchBodyConsumer.h: Adding accessors.
(WebCore::FetchBodyConsumer::hasData const):
(WebCore::FetchBodyConsumer::data const):
* Modules/fetch/FetchRequest.h:
(WebCore::FetchRequest::FetchRequest):
* platform/network/FormData.cpp:
(WebCore::FormData::asSharedBuffer const):
* platform/network/FormData.h:
* workers/service/context/ServiceWorkerFetch.cpp:
(WebCore::ServiceWorkerFetch::dispatchFetchEvent): Setting FetchRequest body based on given FormData.

Source/WebKit:

Pass a FormDataReference when starting fetch IPC.
Convert this FormDataReference in a FormData and using it to set the FetchRequest body properly in Service Worker process.
Forbid fetch interception when URL is not HTTP/HTTPS.

* Platform/IPC/FormDataReference.h:
(IPC::FormDataReference::FormDataReference):
(IPC::FormDataReference::takeData):
(IPC::FormDataReference::encode const):
(IPC::FormDataReference::decode):
* StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::startFetch):
* StorageProcess/ServiceWorker/WebSWServerConnection.h:
* StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
* WebProcess/Storage/WebSWClientConnection.cpp:
(WebKit::WebSWClientConnection::startFetch):
* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::startFetch):
* WebProcess/Storage/WebSWContextManagerConnection.h:
* WebProcess/Storage/WebSWContextManagerConnection.messages.in:
* WebProcess/Storage/WebServiceWorkerProvider.cpp:
(WebKit::WebServiceWorkerProvider::handleFetch):

LayoutTests:

* http/tests/workers/service/resources/service-worker-fetch.js:
* http/tests/workers/service/service-worker-fetch.https-expected.txt:
* http/tests/workers/service/resources/service-worker-request-with-body-worker.js: Added.
* http/tests/workers/service/service-worker-request-with-body.https-expected.txt: Added.
* http/tests/workers/service/service-worker-request-with-body.https.html: Added.

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

3 years agoMake sure service workers get terminated between tests
cdumez@apple.com [Fri, 17 Nov 2017 02:32:12 +0000 (02:32 +0000)]
Make sure service workers get terminated between tests
https://bugs.webkit.org/show_bug.cgi?id=179774

Reviewed by Alex Christensen.

Make sure service workers get terminated between tests. Previously, we
would merely clear all registrations and job queues but it would not
cause the registrations' service workers to get terminated.

* workers/service/context/ServiceWorkerThread.cpp:
(WebCore::ServiceWorkerThread::updateExtendedEventsSet):
* workers/service/server/SWServer.cpp:
(WebCore::SWServer::clearAll):
* workers/service/server/SWServerJobQueue.cpp:
(WebCore::SWServerJobQueue::scriptFetchFinished):
(WebCore::SWServerJobQueue::scriptContextFailedToStart):
(WebCore::SWServerJobQueue::didFinishInstall):
(WebCore::SWServerJobQueue::tryClearRegistration):
(WebCore::SWServerJobQueue::clearRegistration):
* workers/service/server/SWServerJobQueue.h:

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

3 years agoFetchLoader should unregister its blob URL
commit-queue@webkit.org [Fri, 17 Nov 2017 02:29:04 +0000 (02:29 +0000)]
FetchLoader should unregister its blob URL
https://bugs.webkit.org/show_bug.cgi?id=179768

Patch by Youenn Fablet <youenn@apple.com> on 2017-11-16
Reviewed by Alex Christensen.

No observable change.

Keep the blob URL used for reading and unregister it in destructor.

* Modules/fetch/FetchLoader.cpp:
(WebCore::FetchLoader::~FetchLoader):
(WebCore::FetchLoader::start):
* Modules/fetch/FetchLoader.h:

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

3 years agoAX: AOM: Implement string type properties
n_wang@apple.com [Fri, 17 Nov 2017 02:24:53 +0000 (02:24 +0000)]
AX: AOM: Implement string type properties
https://bugs.webkit.org/show_bug.cgi?id=179495

Reviewed by Chris Fleizach.

Source/WebCore:

Implemented the rest of the string type properties for Accessibility
Object Model.

Test: accessibility/mac/AOM-string-properties.html

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::handleLiveRegionCreated):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::childrenChanged):
(WebCore::AccessibilityNodeObject::isPressed const):
(WebCore::AccessibilityNodeObject::isChecked const):
(WebCore::AccessibilityNodeObject::valueDescription const):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isAccessibilityObjectSearchMatchAtIndex):
(WebCore::AccessibilityObject::supportsAutoComplete const):
(WebCore::AccessibilityObject::autoCompleteValue const):
(WebCore::AccessibilityObject::invalidStatus const):
(WebCore::AccessibilityObject::supportsCurrent const):
(WebCore::AccessibilityObject::currentState const):
(WebCore::AccessibilityObject::currentValue const):
(WebCore::AccessibilityObject::roleDescription const):
(WebCore::AccessibilityObject::keyShortcutsValue const):
(WebCore::AccessibilityObject::placeholderValue const):
(WebCore::AccessibilityObject::isInsideLiveRegion const):
(WebCore::AccessibilityObject::liveRegionAncestor const):
(WebCore::AccessibilityObject::supportsARIAAttributes const):
(WebCore::AccessibilityObject::supportsLiveRegion const):
(WebCore::AccessibilityObject::sortDirection const):
(WebCore::AccessibilityObject::supportsHasPopup const):
(WebCore::AccessibilityObject::hasPopupValue const):
(WebCore::AccessibilityObject::supportsPressed const):
(WebCore::AccessibilityObject::checkboxOrRadioValue const):
(WebCore::AccessibilityObject::pressedIsPresent const):
(WebCore::AccessibilityObject::buttonRoleType const):
(WebCore::AccessibilityObject::supportsARIAAutoComplete const): Deleted.
(WebCore::AccessibilityObject::ariaAutoCompleteValue const): Deleted.
(WebCore::AccessibilityObject::supportsARIACurrent const): Deleted.
(WebCore::AccessibilityObject::ariaCurrentState const): Deleted.
(WebCore::AccessibilityObject::ariaCurrentValue const): Deleted.
(WebCore::AccessibilityObject::ariaKeyShortcutsValue const): Deleted.
(WebCore::AccessibilityObject::isInsideARIALiveRegion const): Deleted.
(WebCore::AccessibilityObject::ariaLiveRegionAncestor const): Deleted.
(WebCore::AccessibilityObject::supportsARIALiveRegion const): Deleted.
(WebCore::AccessibilityObject::supportsARIAHasPopup const): Deleted.
(WebCore::AccessibilityObject::ariaPopupValue const): Deleted.
(WebCore::AccessibilityObject::supportsARIAPressed const): Deleted.
(WebCore::AccessibilityObject::ariaPressedIsPresent const): Deleted.
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::hasPopup const):
(WebCore::AccessibilityObject::liveRegionStatus const):
(WebCore::AccessibilityObject::liveRegionRelevant const):
(WebCore::AccessibilityObject::liveRegionAtomic const):
(WebCore::AccessibilityObject::ariaHasPopup const): Deleted.
(WebCore::AccessibilityObject::ariaLiveRegionStatus const): Deleted.
(WebCore::AccessibilityObject::ariaLiveRegionRelevant const): Deleted.
(WebCore::AccessibilityObject::ariaLiveRegionAtomic const): Deleted.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::hasPopup const):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
(WebCore::AccessibilityRenderObject::orientation const):
(WebCore::AccessibilityRenderObject::textChanged):
(WebCore::AccessibilityRenderObject::liveRegionStatus const):
(WebCore::AccessibilityRenderObject::liveRegionRelevant const):
(WebCore::AccessibilityRenderObject::liveRegionAtomic const):
(WebCore::AccessibilityRenderObject::ariaHasPopup const): Deleted.
(WebCore::AccessibilityRenderObject::ariaLiveRegionStatus const): Deleted.
(WebCore::AccessibilityRenderObject::ariaLiveRegionRelevant const): Deleted.
(WebCore::AccessibilityRenderObject::ariaLiveRegionAtomic const): Deleted.
* accessibility/AccessibilityRenderObject.h:
* accessibility/AccessibleNode.cpp:
(WebCore::ariaAttributeMap):
(WebCore::isPropertyValueString):
(WebCore::AccessibleNode::notifyAttributeChanged):
(WebCore::AccessibleNode::autocomplete const):
(WebCore::AccessibleNode::setAutocomplete):
(WebCore::AccessibleNode::checked const):
(WebCore::AccessibleNode::setChecked):
(WebCore::AccessibleNode::current const):
(WebCore::AccessibleNode::setCurrent):
(WebCore::AccessibleNode::hasPopUp const):
(WebCore::AccessibleNode::setHasPopUp):
(WebCore::AccessibleNode::invalid const):
(WebCore::AccessibleNode::setInvalid):
(WebCore::AccessibleNode::keyShortcuts const):
(WebCore::AccessibleNode::setKeyShortcuts):
(WebCore::AccessibleNode::live const):
(WebCore::AccessibleNode::setLive):
(WebCore::AccessibleNode::setLabel):
(WebCore::AccessibleNode::orientation const):
(WebCore::AccessibleNode::setOrientation):
(WebCore::AccessibleNode::placeholder const):
(WebCore::AccessibleNode::setPlaceholder):
(WebCore::AccessibleNode::pressed const):
(WebCore::AccessibleNode::setPressed):
(WebCore::AccessibleNode::relevant const):
(WebCore::AccessibleNode::setRelevant):
(WebCore::AccessibleNode::role const):
(WebCore::AccessibleNode::setRole):
(WebCore::AccessibleNode::roleDescription const):
(WebCore::AccessibleNode::setRoleDescription):
(WebCore::AccessibleNode::sort const):
(WebCore::AccessibleNode::setSort):
(WebCore::AccessibleNode::valueText const):
(WebCore::AccessibleNode::setValueText):
* accessibility/AccessibleNode.h:
(WebCore::AXPropertyHashTraits::constructDeletedValue):
(WebCore::AXPropertyHashTraits::isDeletedValue):
* accessibility/AccessibleNode.idl:
* accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::AXObjectCache::postPlatformNotification):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetAttributes):
(atkRole):
(setAtkStateSetFromCoreObject):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityHasPopup]):
(-[WebAccessibilityObjectWrapper accessibilityARIALiveRegionStatus]):
(-[WebAccessibilityObjectWrapper accessibilityARIARelevantStatus]):
(-[WebAccessibilityObjectWrapper accessibilityARIALiveRegionIsAtomic]):
(-[WebAccessibilityObjectWrapper accessibilitySupportsARIAPressed]):
(-[WebAccessibilityObjectWrapper accessibilityARIACurrentStatus]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
* inspector/agents/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):

LayoutTests:

* accessibility/accessibility-object-model.html:
* accessibility/mac/AOM-string-properties-expected.txt: Added.
* accessibility/mac/AOM-string-properties.html: Added.

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

3 years agoUse RunLoop and Mode from NetworkingContext if they are given
achristensen@apple.com [Fri, 17 Nov 2017 01:34:41 +0000 (01:34 +0000)]
Use RunLoop and Mode from NetworkingContext if they are given
https://bugs.webkit.org/show_bug.cgi?id=179800
<rdar://problem/35519421>

Reviewed by Brady Eidson.

We used to call [NSURLConnection scheduleInRunLoop:forMode:] before r224267.
That change broke WebKitLegacy clients using custom run loop modes, which I partially fixed in r224687 and r224896,
but that hangs if there are any non-scheduled calls to callOnMainThread and it ignores the CFRunLoop part of the SchedulePair.
This is a more elegant solution that fixes all known bugs with custom run loop modes and makes the
behavior as close to the pre-r224267 behavior as possible by using all parameters in a good way.

I verified the bug in the radar is fixed, the API test WebKitLegacy.ScheduleInRunLoop still passes,
and UIWebView still works on iOS.

* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
(callOnMainThreadOrSchedule):
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveAuthenticationChallenge:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:canAuthenticateAgainstProtectionSpace:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveData:lengthReceived:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:didSendBodyData:totalBytesWritten:totalBytesExpectedToWrite:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate connectionDidFinishLoading:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:didFailWithError:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:willCacheResponse:]):

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

3 years agoAdd feature define for alternative presentation button element
dbates@webkit.org [Fri, 17 Nov 2017 01:17:25 +0000 (01:17 +0000)]
Add feature define for alternative presentation button element
https://bugs.webkit.org/show_bug.cgi?id=179692
Part of <rdar://problem/34917108>

Reviewed by Andy Estes.

Only enabled on Cocoa platforms by default.

.:

* Source/cmake/OptionsMac.cmake:
* Source/cmake/WebKitFeatures.cmake:
* Source/cmake/tools/vsprops/FeatureDefines.props:
* Source/cmake/tools/vsprops/FeatureDefinesCairo.props:

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore/PAL:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit:

* Configurations/FeatureDefines.xcconfig:

Source/WebKitLegacy/mac:

* Configurations/FeatureDefines.xcconfig:

Tools:

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

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

3 years agoVersioning.
jmarcell@apple.com [Fri, 17 Nov 2017 01:15:21 +0000 (01:15 +0000)]
Versioning.

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

3 years agoMark test262/test/language/statements/class/definition/fn-name-static-precedence...
ryanhaddad@apple.com [Fri, 17 Nov 2017 01:04:11 +0000 (01:04 +0000)]
Mark test262/test/language/statements/class/definition/fn-name-static-precedence.js as passing after r224927.

Unreviewed test gardening.

* test262.yaml:

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

3 years ago[Service Worker] Implement "Try Clear Registration" algorithm
cdumez@apple.com [Fri, 17 Nov 2017 00:59:10 +0000 (00:59 +0000)]
[Service Worker] Implement "Try Clear Registration" algorithm
https://bugs.webkit.org/show_bug.cgi?id=179791

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Rebaseline several WPT tests that are now passing or failing later.

* web-platform-tests/service-workers/service-worker/clients-matchall-client-types.https-expected.txt:
* web-platform-tests/service-workers/service-worker/getregistrations.https-expected.txt:
* web-platform-tests/service-workers/service-worker/ready.https-expected.txt:
* web-platform-tests/service-workers/service-worker/unregister-then-register-new-script.https-expected.txt:
* web-platform-tests/service-workers/service-worker/unregister-then-register.https-expected.txt:

Source/WebCore:

Implement "Try Clear Registration" algorithm:
- https://w3c.github.io/ServiceWorker/#try-clear-registration-algorithm

In particular, a SWServerRegistration now knows if it is "in use" by a given
service worker client (i.e. The registration's active service worker is
controlling the service worker client). See:
- https://w3c.github.io/ServiceWorker/#selection (last paragraph)

No new tests, rebaselined existing tests.

* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::setActiveServiceWorker):
* workers/service/server/SWClientConnection.h:
* workers/service/server/SWServer.cpp:
(WebCore::SWServer::Connection::serviceWorkerStartedControllingClient):
(WebCore::SWServer::Connection::serviceWorkerStoppedControllingClient):
(WebCore::SWServer::serviceWorkerStartedControllingClient):
(WebCore::SWServer::serviceWorkerStoppedControllingClient):
* workers/service/server/SWServer.h:
* workers/service/server/SWServerJobQueue.cpp:
(WebCore::SWServerJobQueue::tryClearRegistration):
* workers/service/server/SWServerRegistration.h:
(WebCore::SWServerRegistration::hasClientsUsingRegistration const):
(WebCore::SWServerRegistration::addClientUsingRegistration):
(WebCore::SWServerRegistration::removeClientUsingRegistration):

Source/WebKit:

* StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
* WebProcess/Storage/WebSWClientConnection.cpp:
(WebKit::WebSWClientConnection::serviceWorkerStartedControllingClient):
(WebKit::WebSWClientConnection::serviceWorkerStoppedControllingClient):
* WebProcess/Storage/WebSWClientConnection.h:

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

3 years agoMark imported/w3c/web-platform-tests/fetch/api/abort/serviceworker-intercepted.https...
ryanhaddad@apple.com [Fri, 17 Nov 2017 00:52:51 +0000 (00:52 +0000)]
Mark imported/w3c/web-platform-tests/fetch/api/abort/serviceworker-intercepted.https.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=179773

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years agoREGRESSION(r224179): layer flush now requires sync IPC to compute undo/redo availabil...
mcatanzaro@igalia.com [Fri, 17 Nov 2017 00:48:21 +0000 (00:48 +0000)]
REGRESSION(r224179): layer flush now requires sync IPC to compute undo/redo availability in EditorState
https://bugs.webkit.org/show_bug.cgi?id=179797

Reviewed by Simon Fraser.

Source/WebCore:

Editor::canUndo and Editor::CanRedo no longer need to be exported.

* editing/Editor.h:

Source/WebKit:

r224179 introduced a performance regression. The newly-added code in WebPage::editorState is
part of a performance-critical path. (The editor state is computed and sent to the UI
process during the layer flush.) Calls to Editor::canUndo and Editor::canRedo were added,
but these calls are both implemented with sync IPC calls to WebPageProxy in the UI process.
WebPageProxy passes them along to PageClientImpl to compute the availability of the
commands.

That's all pointless because this code only exists for the purpose of getting editing
command availability to the UI process. In the case of undo and redo, it's not needed at
all. I did not realize that when writing the code. So canUndo and canRedo should be removed
from EditorState. This ought to be sufficient to avoid the perf regression.

No changes are needed to the GTK/WPE WebKitEditorState API. The API is reimplemented using
WebPageProxy::canUndoRedo instead of EditorState. There should be no changes in behavior,
only performance.

* Shared/EditorState.cpp:
(WebKit::EditorState::PostLayoutData::encode const):
(WebKit::EditorState::PostLayoutData::decode):
* Shared/EditorState.h:
* UIProcess/API/glib/WebKitEditorState.cpp:
(webkitEditorStateCreate):
(webkitEditorStateChanged):
* UIProcess/API/glib/WebKitEditorStatePrivate.h:
* UIProcess/API/glib/WebKitWebView.cpp:
(webkit_web_view_get_editor_state):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::canUndo):
(WebKit::WebPageProxy::canRedo):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState const):

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

3 years agoDispatching an event on a ServiceWorkerRegistration may fail or crash due to GC
cdumez@apple.com [Fri, 17 Nov 2017 00:45:06 +0000 (00:45 +0000)]
Dispatching an event on a ServiceWorkerRegistration may fail or crash due to GC
https://bugs.webkit.org/show_bug.cgi?id=179751

Reviewed by Geoffrey Garen.

Source/WebCore:

Dispatching an event on a ServiceWorkerRegistration may fail or crash due to GC. We
need to make sure that a ServiceWorkerRegistration's wrapper stays alive as long as
we may dispatch events on it.

Keep the wrapper alive by making ServiceWorker an ActiveDOMObject and making sure the
implementation object keeps a PendingActivity alive while it may dispatch JS events.
The only event dispatched on ServiceWorkerRegistration objects is the "updatefound"
one. We may dispatch updatefound events on a ServiceWorkerRegistration until the
registration gets cleared on server side, in which case the ServiceWorkerRegistration
object ends up with no service worker. We therefore take a PendingActivity when the
ServiceWorkerRegistration is constructed and we release it once the registration has
no more associated ServiceWorker or the ActiveDOMObject is stopped (to avoid leaks on
navigation).

Test: http/tests/workers/service/service-worker-registration-gc-event.html

* workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::scheduleTaskToFireUpdateFoundEvent):
* workers/service/ServiceWorkerRegistration.cpp:
(WebCore::ServiceWorkerRegistration::getOrCreate):
(WebCore::ServiceWorkerRegistration::updateStateFromServer):
(WebCore::ServiceWorkerRegistration::scheduleTaskToFireUpdateFoundEvent):
(WebCore::ServiceWorkerRegistration::stop):
(WebCore::ServiceWorkerRegistration::updatePendingActivityForEventDispatch):
* workers/service/ServiceWorkerRegistration.h:
* workers/service/ServiceWorkerRegistration.idl:

LayoutTests:

Add layout test coverage.

* http/tests/workers/service/service-worker-registration-gc-event-expected.txt: Added.
* http/tests/workers/service/service-worker-registration-gc-event.html: Added.

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

3 years agoCrash in WebCore::SWServerJobQueue::scriptFetchFinished(WebCore::SWServer::Connection...
cdumez@apple.com [Fri, 17 Nov 2017 00:35:51 +0000 (00:35 +0000)]
Crash in WebCore::SWServerJobQueue::scriptFetchFinished(WebCore::SWServer::Connection&, WebCore::ServiceWorkerFetchResult const&) + 77
https://bugs.webkit.org/show_bug.cgi?id=179394
<rdar://problem/35478190>

Reviewed by Youenn Fablet.

In SWServerJobQueue::scriptFetchFinished(), make sure the job queue is still processing the
job that triggered the fetch. If it is not, ignore the callback.

This could happen when calling SWServer::clear() while a script fetch was pending.

No new tests, already covered by existing tests that sometimes crash on the bots.

* workers/service/server/SWServerJobQueue.cpp:
(WebCore::SWServerJobQueue::isCurrentlyProcessingJob const):
(WebCore::SWServerJobQueue::scriptFetchFinished):
* workers/service/server/SWServerJobQueue.h:

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

3 years agoFix a bug with cpuid in the FTL.
sbarati@apple.com [Fri, 17 Nov 2017 00:35:49 +0000 (00:35 +0000)]
Fix a bug with cpuid in the FTL.

Rubber stamped by Mark Lam.

Before uploading the previous patch, I tried to condense the code. I
accidentally removed a crucial line saying that CPUID clobbers various
registers.

* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCPUIntrinsic):

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

3 years agoCrash in worker tests handling the m_stoppedCallback.
beidson@apple.com [Fri, 17 Nov 2017 00:28:30 +0000 (00:28 +0000)]
Crash in worker tests handling the m_stoppedCallback.
<rdar://problem/35590875> and https://bugs.webkit.org/show_bug.cgi?id=179798

Reviewed by Chris Dumez.

No new tests (Covered by existing tests).

Protect manipulation of m_stoppedCallback with m_threadCreationAndWorkerGlobalScopeMutex.

* workers/WorkerThread.cpp:
(WebCore::WorkerThread::workerThread):
(WebCore::WorkerThread::stop):

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

3 years agoMarked svg/wicd/test-rightsizing-a.xhtml as flaky.
jlewis3@apple.com [Fri, 17 Nov 2017 00:26:30 +0000 (00:26 +0000)]
Marked svg/wicd/test-rightsizing-a.xhtml as flaky.
https://bugs.webkit.org/show_bug.cgi?id=179176

Unreviewed test gardening.

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

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

3 years ago[Web Animations] Express time in milliseconds through the API
commit-queue@webkit.org [Thu, 16 Nov 2017 23:56:13 +0000 (23:56 +0000)]
[Web Animations] Express time in milliseconds through the API
https://bugs.webkit.org/show_bug.cgi?id=179799

Patch by Antoine Quint <graouts@apple.com> on 2017-11-16
Reviewed by Simon Fraser.

Source/WebCore:

While internally we use seconds to specify times and durations, the Web Animations API
uses milliseconds, so we have to convert times and durations from and to milliseconds.

* animation/AnimationEffectTiming.h:
* animation/AnimationTimeline.cpp:
(WebCore::AnimationTimeline::bindingsCurrentTime):
* animation/WebAnimation.cpp:
(WebCore::WebAnimation::bindingsStartTime const):
(WebCore::WebAnimation::setBindingsStartTime):
(WebCore::WebAnimation::bindingsCurrentTime const):
(WebCore::WebAnimation::setBindingsCurrentTime):
* testing/Internals.cpp:
(WebCore::Internals::setTimelineCurrentTime):

LayoutTests:

Update tests to use milliseconds rather than seconds.

* http/wpt/wk-web-animations/timing-model/animation-current-time.html:
* http/wpt/wk-web-animations/timing-model/animation-interface-start-time-property.html:
* http/wpt/wk-web-animations/timing-model/animation-playback-rate.html:
* http/wpt/wk-web-animations/timing-model/keyframe-effect-interface-timing-duration.html:
* http/wpt/wk-web-animations/timing-model/timeline-current-time.html:

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

3 years agoAdd some X86 intrinsics to $vm to help with some perf testing
sbarati@apple.com [Thu, 16 Nov 2017 23:44:12 +0000 (23:44 +0000)]
Add some X86 intrinsics to $vm to help with some perf testing
https://bugs.webkit.org/show_bug.cgi?id=179693

Reviewed by Mark Lam.

I've been doing some local perf testing of various ideas and have
had these come in handy. I'm going to land them to dollarVM to prevent
having to add them to my local build every time I do perf testing.

* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::mfence):
(JSC::MacroAssemblerX86Common::rdtsc):
(JSC::MacroAssemblerX86Common::pause):
(JSC::MacroAssemblerX86Common::cpuid):
* assembler/X86Assembler.h:
(JSC::X86Assembler::rdtsc):
(JSC::X86Assembler::pause):
(JSC::X86Assembler::cpuid):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
* dfg/DFGNode.h:
(JSC::DFG::Node::intrinsic):
* dfg/DFGNodeType.h:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGValidate.cpp:
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileCPUIntrinsic):
* runtime/Intrinsic.cpp:
(JSC::intrinsicName):
* runtime/Intrinsic.h:
* tools/JSDollarVM.cpp:
(JSC::functionCpuMfence):
(JSC::functionCpuRdtsc):
(JSC::functionCpuCpuid):
(JSC::functionCpuPause):
(JSC::functionCpuClflush):
(JSC::JSDollarVM::finishCreation):

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

3 years agoREGRESSION(r224887): GCC 5 build broken
mcatanzaro@igalia.com [Thu, 16 Nov 2017 23:27:59 +0000 (23:27 +0000)]
REGRESSION(r224887): GCC 5 build broken
https://bugs.webkit.org/show_bug.cgi?id=179750

Reviewed by Jer Noble.

Add a legacy FourCC constructor that will be used only when building with GCC 5. This is
bad, but it seems acceptable for use with a fallback codepath.

Unfortunately, this requires adjusting some initializations to avoid ambiguity with the
uint32_t constructor.

* platform/graphics/FourCC.h:
(WebCore::FourCC::FourCC):
* platform/graphics/iso/ISOBox.cpp:
(WebCore::ISOBox::peekBox):
* platform/graphics/iso/ISOBox.h:
* platform/graphics/iso/ISOOriginalFormatBox.h:
* platform/graphics/iso/ISOSchemeTypeBox.h:

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

3 years agoMarked multiple http/tests/cache/disk-cache/ tests as flaky.
jlewis3@apple.com [Thu, 16 Nov 2017 22:27:46 +0000 (22:27 +0000)]
Marked multiple http/tests/cache/disk-cache/ tests as flaky.

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years ago[Payment Request] Update feature status to "Supported In Preview"
aestes@apple.com [Thu, 16 Nov 2017 21:59:39 +0000 (21:59 +0000)]
[Payment Request] Update feature status to "Supported In Preview"
https://bugs.webkit.org/show_bug.cgi?id=179793

Reviewed by Tim Horton.

* features.json:

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

3 years agoClean up KeyframeEffect
commit-queue@webkit.org [Thu, 16 Nov 2017 20:38:25 +0000 (20:38 +0000)]
Clean up KeyframeEffect
https://bugs.webkit.org/show_bug.cgi?id=179777

Patch by Antoine Quint <graouts@apple.com> on 2017-11-16
Reviewed by Daniel Bates.

A few review comments came in after https://bugs.webkit.org/show_bug.cgi?id=179707 landed,
addressing them with this follow-up patch.

* animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::create): Use "keyframeEffect" instead of "result" for clarity.
(WebCore::KeyframeEffect::processKeyframes): Use consistent index and length types while iterating
over properties in PropertyNameArray and explicitly size the properties array since we already
know its final size.
* dom/Element.cpp:
(WebCore::Element::getAnimations):

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

3 years agoAlways invoke RenderObject::insertedIntoTree/willBeRemovedFromTree
zalan@apple.com [Thu, 16 Nov 2017 20:26:37 +0000 (20:26 +0000)]
Always invoke RenderObject::insertedIntoTree/willBeRemovedFromTree
https://bugs.webkit.org/show_bug.cgi?id=178007

Reviewed by Antti Koivisto.

Based on Antti Koivisto's patch:
These call are currently skipped in some cases making them bug prone and difficult to reason about.
This is done as an optimization that doesn't appear to be valuable anymore.

Covered by existing tests.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::makeChildrenNonInline):
(WebCore::RenderBlock::dropAnonymousBoxChild):
(WebCore::RenderBlock::takeChild):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::moveAllChildrenIncludingFloatsTo):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::styleDidChange):
(WebCore::RenderBlockFlow::moveAllChildrenIncludingFloatsTo):
* rendering/RenderBlockFlow.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::splitAnonymousBoxesAroundChild):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::moveChildTo):
(WebCore::RenderBoxModelObject::moveChildrenTo):
* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::moveChildTo):
(WebCore::RenderBoxModelObject::moveAllChildrenTo):
(WebCore::RenderBoxModelObject::moveChildrenTo):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::addChild):
(WebCore::RenderElement::takeChild):
(WebCore::RenderElement::insertChildInternal):
(WebCore::RenderElement::takeChildInternal):
(WebCore::RenderElement::handleDynamicFloatPositionChange):
* rendering/RenderElement.h:
* rendering/RenderInline.cpp:
(WebCore::RenderInline::splitInlines):
(WebCore::RenderInline::splitFlow):
(WebCore::RenderInline::childBecameNonInline):
* rendering/RenderMultiColumnFlow.cpp:
(WebCore::RenderMultiColumnFlow::fragmentedFlowDescendantInserted):
* rendering/RenderRubyBase.cpp:
(WebCore::RenderRubyBase::moveInlineChildren):
(WebCore::RenderRubyBase::moveBlockChildren):
* rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::takeChild):
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::collapseAndDestroyAnonymousSiblingRows):
* style/RenderTreeUpdaterMultiColumn.cpp:
(WebCore::RenderTreeUpdater::MultiColumn::createFragmentedFlow):
(WebCore::RenderTreeUpdater::MultiColumn::destroyFragmentedFlow):

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

3 years agoimported/w3c/web-platform-tests/2dcontext/the-canvas-state/canvas_state_restore_001...
commit-queue@webkit.org [Thu, 16 Nov 2017 20:02:28 +0000 (20:02 +0000)]
imported/w3c/web-platform-tests/2dcontext/the-canvas-state/canvas_state_restore_001.htm is an ImageOnlyFailure
https://bugs.webkit.org/show_bug.cgi?id=179786

Unreviewed.

Patch by Youenn Fablet <youenn@apple.com> on 2017-11-16

* TestExpectations: Temporarily marking test as failing.

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

3 years agoRemove allowBlockSelection as block selection is not supported anymore
megan_gardner@apple.com [Thu, 16 Nov 2017 19:33:57 +0000 (19:33 +0000)]
Remove allowBlockSelection as block selection is not supported anymore
https://bugs.webkit.org/show_bug.cgi?id=179738

Reviewed by Tim Horton.

Remove all instances of the alloweBlockSelection flag. Blocks selection is fully disabled
and thus this flag will do nothing. This was only added as a debug measure last year, and nothing
ever actually used it.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode const):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _allowsBlockSelection]): Deleted.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _allowsBlockSelection]): Deleted.
(-[WKWebViewConfiguration _setAllowsBlockSelection:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::allowsBlockSelection): Deleted.
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:

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

3 years agoAdd a base class for HTMLCanvasElement and OffscreenCanvas
dino@apple.com [Thu, 16 Nov 2017 19:19:39 +0000 (19:19 +0000)]
Add a base class for HTMLCanvasElement and OffscreenCanvas
https://bugs.webkit.org/show_bug.cgi?id=179701
<rdar://problem/35545195>

Reviewed by Sam Weinig.

In order for OffscreenCanvas to be able to create a WebGLRenderingContext,
there needs to be a shared base class with HTMLCanvasElement. Add such a
class called CanvasBase.

There is a lot of potential for functionality to move into the base class, but
unfortunately HTMLCanvasElement is a bit messy. It implements a lot of the 2d
rendering context functionality, and also many const functions that actually
cause changes. Thus, things like the canvas size have to remain in the subclasses
for now.

The existence of the new base class meant the canvas() accessor in CanvasRenderingContext
had to move out into the subclasses, and do the correct casting. Eventually, at least
for WebGLRenderingContext, this will have a change in behaviour, but for now we only
ever use HTMLCanvasElements, so most of these changes are just for the sake of
compilation.

No behaviour change - covered by existing tests.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* html/CanvasBase.cpp: Copied from Source/WebCore/html/canvas/GPUBasedCanvasRenderingContext.h.
(WebCore::CanvasBase::CanvasBase): New base class.
(WebCore::CanvasBase::asHTMLCanvasElement): Casts to an HTMLCanvasElement*, which many of the
rendering context code uses.
* html/CanvasBase.h: Copied from Source/WebCore/html/canvas/GPUBasedCanvasRenderingContext.h.
(WebCore::CanvasBase::isHTMLCanvasElement const):
(WebCore::CanvasBase::isOffscreenCanvas const):
(WebCore::CanvasBase::setOriginClean):
(WebCore::CanvasBase::setOriginTainted):
(WebCore::CanvasBase::originClean const):
(WebCore::CanvasBase::securityOrigin const):
(WebCore::CanvasBase::scriptExecutionContext const):

* html/HTMLCanvasElement.cpp: Use the base class methods where possible.
(WebCore::HTMLCanvasElement::HTMLCanvasElement):
(WebCore::HTMLCanvasElement::toDataURL):
(WebCore::HTMLCanvasElement::toBlob):
(WebCore::HTMLCanvasElement::createImageBuffer const): Be explict as to
which of the derived classes scriptExecutionContext() method we are calling.

* html/HTMLCanvasElement.h: Use the base class, mark a few things as virtual,
and remove the parts that are now in CanvasBase.

* html/OffscreenCanvas.cpp: Use the base class.
(WebCore::OffscreenCanvas::OffscreenCanvas):
(WebCore::OffscreenCanvas::size const):
(WebCore::OffscreenCanvas::setSize):
* html/OffscreenCanvas.h:

* html/canvas/CanvasRenderingContext.cpp:
(WebCore::CanvasRenderingContext::CanvasRenderingContext):
(WebCore::CanvasRenderingContext::ref): Call the correct ref/deref functions, depending
on the base class type.
(WebCore::CanvasRenderingContext::deref):
(WebCore::CanvasRenderingContext::wouldTaintOrigin): We no longer have a canvas() method.
(WebCore::CanvasRenderingContext::checkOrigin):

* html/canvas/CanvasRenderingContext.h:
(WebCore::CanvasRenderingContext::canvasBase const): Add this accessor to the base canvas object
to replace the canvas() call.
(WebCore::CanvasRenderingContext::checkOrigin):
(WebCore::CanvasRenderingContext::ref): Deleted.
(WebCore::CanvasRenderingContext::deref): Deleted.
(WebCore::CanvasRenderingContext::canvas const): Deleted.

* html/canvas/CanvasRenderingContext2D.cpp: Use the base class.
(WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
* html/canvas/CanvasRenderingContext2D.h:
* html/canvas/GPUBasedCanvasRenderingContext.h:
(WebCore::GPUBasedCanvasRenderingContext::GPUBasedCanvasRenderingContext):
* html/canvas/ImageBitmapRenderingContext.cpp:
(WebCore::ImageBitmapRenderingContext::ImageBitmapRenderingContext):
(WebCore::ImageBitmapRenderingContext::canvas const):
(WebCore::ImageBitmapRenderingContext::setOutputBitmap):
* html/canvas/ImageBitmapRenderingContext.h:
* html/canvas/PlaceholderRenderingContext.cpp:
(WebCore::PlaceholderRenderingContext::PlaceholderRenderingContext):
* html/canvas/PlaceholderRenderingContext.h:
* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::WebGL2RenderingContext):
* html/canvas/WebGL2RenderingContext.h:
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::WebGLRenderingContext):

* html/canvas/WebGLRenderingContext.h:
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::create): Assume that we're still getting an HTMLCanvasElement,
but protect some of the logic just in case we don't.
(WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
(WebCore::WebGLRenderingContextBase::canvas):
(WebCore::WebGLRenderingContextBase::checkForContextLossHandling):
(WebCore::WebGLRenderingContextBase::registerWithWebGLStateTracker):
(WebCore::WebGLRenderingContextBase::setupFlags):
(WebCore::WebGLRenderingContextBase::addActivityStateChangeObserverIfNecessary):
(WebCore::WebGLRenderingContextBase::removeActivityStateChangeObserver):
(WebCore::WebGLRenderingContextBase::markContextChanged):
(WebCore::WebGLRenderingContextBase::markContextChangedAndNotifyCanvasObserver):
(WebCore::WebGLRenderingContextBase::paintRenderingResultsToCanvas):
(WebCore::WebGLRenderingContextBase::reshape):
(WebCore::WebGLRenderingContextBase::compileShader):
(WebCore::WebGLRenderingContextBase::isContextLostOrPending):
(WebCore::WebGLRenderingContextBase::readPixels):
(WebCore::WebGLRenderingContextBase::loseContextImpl):
(WebCore::WebGLRenderingContextBase::printToConsole):
(WebCore::WebGLRenderingContextBase::dispatchContextLostEvent):
(WebCore::WebGLRenderingContextBase::maybeRestoreContext):
(WebCore::WebGLRenderingContextBase::dispatchContextChangedEvent):
(WebCore::WebGLRenderingContextBase::clampedCanvasSize):
* html/canvas/WebGLRenderingContextBase.h:
* html/canvas/WebGLRenderingContextBase.idl:
* html/canvas/WebGPURenderingContext.cpp:
(WebCore::WebGPURenderingContext::create):
(WebCore::WebGPURenderingContext::WebGPURenderingContext):
(WebCore::WebGPURenderingContext::canvas const):
(WebCore::WebGPURenderingContext::clampedCanvasSize const):
* html/canvas/WebGPURenderingContext.h:
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::recordCanvasAction):
(WebCore::InspectorInstrumentation::didEnableExtension):
(WebCore::InspectorInstrumentation::didCreateProgram):
(WebCore::InspectorInstrumentation::willDeleteProgram):
(WebCore::InspectorInstrumentation::isShaderProgramDisabled):
* inspector/agents/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::recordCanvasAction):
(WebCore::InspectorCanvasAgent::didEnableExtension):
(WebCore::InspectorCanvasAgent::didCreateProgram):

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

3 years agoSource/WebCore:
commit-queue@webkit.org [Thu, 16 Nov 2017 19:13:42 +0000 (19:13 +0000)]
Source/WebCore:
Added mime type check to the picture source preloader to avoid downloading incompatible resources.
https://bugs.webkit.org/show_bug.cgi?id=179231

Patch by Colin Bendell <colin@bendell.ca> on 2017-11-16
Reviewed by Alex Christensen.

Test: http/tests/loading/preload-picture-type.html

* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::StartTagScanner::processAttributes): include type match state when selecting candidate imgs
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): added type attribute evaluation and matching

LayoutTests:
Add tests to ensure that <source> tags are only preloaded when the `type`
attribute matches.
https://bugs.webkit.org/show_bug.cgi?id=179231

Patch by Colin Bendell <colin@bendell.ca> on 2017-11-16
Reviewed by Alex Christensen.

* http/tests/preload/picture-type-expected.txt: Added.
* http/tests/preload/picture-type.html: Added.

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

3 years agoIt should be easier to reify lazy property names
jfbastien@apple.com [Thu, 16 Nov 2017 19:08:37 +0000 (19:08 +0000)]
It should be easier to reify lazy property names
https://bugs.webkit.org/show_bug.cgi?id=179734
<rdar://problem/35492521>

Reviewed by Keith Miller.

We reify lazy property names in a few different ways, each
specific to the JSCell implementation, in put() instead of having
a special function to do reification. Let's make that simpler.

This patch makes it easier to reify property names in a uniform
manner, and does so in JSFunction. As a follow up I'll use the
same mechanics for:

ClonedArguments   callee, iteratorSymbol (Symbol.iterator)
ErrorConstructor  stackTraceLimit
ErrorInstance     line, column, sourceURL, stack
GenericArguments  length, callee, iteratorSymbol (Symbol.iterator)
GetterSetter      RELEASE_ASSERT_NOT_REACHED()
JSArray           length
RegExpObject      lastIndex
StringObject      length

* runtime/ClassInfo.h: Add reifyPropertyNameIfNeeded to method table.
* runtime/JSCell.cpp:
(JSC::JSCell::reifyPropertyNameIfNeeded): by default, don't reify.
* runtime/JSCell.h:
* runtime/JSFunction.cpp: `name` and `length` can be reified.
(JSC::JSFunction::reifyPropertyNameIfNeeded):
(JSC::JSFunction::put):
(JSC::JSFunction::reifyLength):
(JSC::JSFunction::reifyName):
(JSC::JSFunction::reifyLazyPropertyIfNeeded):
(JSC::JSFunction::reifyLazyPropertyForHostOrBuiltinIfNeeded):
(JSC::JSFunction::reifyLazyLengthIfNeeded):
(JSC::JSFunction::reifyLazyNameIfNeeded):
(JSC::JSFunction::reifyLazyBoundNameIfNeeded):
* runtime/JSFunction.h:
(JSC::JSFunction::isLazy):
(JSC::JSFunction::isReified):
* runtime/JSObjectInlines.h:
(JSC::JSObject::putDirectInternal): do the reification here.

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

3 years ago[WPE] Expose ENABLE_JIT and USE_SYSTEM_MALLOC options
mcatanzaro@igalia.com [Thu, 16 Nov 2017 19:07:35 +0000 (19:07 +0000)]
[WPE] Expose ENABLE_JIT and USE_SYSTEM_MALLOC options
https://bugs.webkit.org/show_bug.cgi?id=179730

Reviewed by Carlos Alberto Lopez Perez.

* Source/cmake/OptionsWPE.cmake:

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

3 years agoWhitelist additional IOKit properties based on customer feedback
bfulgham@apple.com [Thu, 16 Nov 2017 18:47:50 +0000 (18:47 +0000)]
Whitelist additional IOKit properties based on customer feedback
https://bugs.webkit.org/show_bug.cgi?id=179782
<rdar://problem/35508246>

Reviewed by Dean Jackson.

Expand the IOKit property whitelist to recognize a few more properties as valid based on review of logs
from customer systems and our test infrastructure.

* WebProcess/com.apple.WebProcess.sb.in:

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

3 years agoDispatching an event on a ServiceWorker may fail or crash due to GC
cdumez@apple.com [Thu, 16 Nov 2017 18:21:44 +0000 (18:21 +0000)]
Dispatching an event on a ServiceWorker may fail or crash due to GC
https://bugs.webkit.org/show_bug.cgi?id=179745

Reviewed by Geoffrey Garen.

Source/WebCore:

Dispatching an event on a ServiceWorker may fail or crash due to GC. We need to make sure
that a ServiceWorker's wrapper stays alive as long as we may dispatch events on it.

Keep the wrapper alive by making ServiceWorker an ActiveDOMObject and making sure the
implementation object keeps a PendingActivity alive while it may dispatch JS events.
The only event dispatched on ServiceWorker objects is the "statechange" one. We may
dispatch statechange events on a ServiceWorker until its state becomes "redundant".
We therefore take a PendingActivity when the ServiceWorker's state is or becomes
non-redundant (becoming non redundant can only happen when switching initially from
redundant to installing, at which point the ServiceWorker object is not exposed to
the JS yet). We release the PendingActivity when the ServiceWorker's state becomes
redundant or the ActiveDOMObject is stopped (to avoid leaks on navigation).

Test: http/tests/workers/service/service-worker-gc-event.html

* workers/service/ServiceWorker.cpp:
(WebCore::mutableAllWorkers):
(WebCore::ServiceWorker::removeFromAllWorkers):
(WebCore::ServiceWorker::getOrCreate):
(WebCore::ServiceWorker::ServiceWorker):
(WebCore::ServiceWorker::~ServiceWorker):
(WebCore::ServiceWorker::scheduleTaskToUpdateState):
(WebCore::ServiceWorker::activeDOMObjectName const):
(WebCore::ServiceWorker::canSuspendForDocumentSuspension const):
(WebCore::ServiceWorker::stop):
(WebCore::ServiceWorker::updatePendingActivityForEventDispatch):
* workers/service/ServiceWorker.h:
* workers/service/ServiceWorker.idl:

LayoutTests:

Add layout test coverage.

* http/tests/workers/service/resources/sw-test-pre.js:
* http/tests/workers/service/service-worker-gc-event.html: Added.
* http/tests/workers/service/service-worker-gc-event-expected.txt: Added.

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

3 years agoUnreviewed, rebaseline skipped and flaky service workers tests.
cdumez@apple.com [Thu, 16 Nov 2017 18:05:29 +0000 (18:05 +0000)]
Unreviewed, rebaseline skipped and flaky service workers tests.

* web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/extendable-message-event.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-request-redirect.https-expected.txt:
* web-platform-tests/service-workers/service-worker/navigation-redirect.https-expected.txt:
* web-platform-tests/service-workers/service-worker/register-same-scope-different-script-url.https-expected.txt:
* web-platform-tests/service-workers/service-worker/respond-with-body-accessed-response.https-expected.txt:
* web-platform-tests/service-workers/service-worker/uncontrolled-page.https-expected.txt:
* web-platform-tests/service-workers/service-worker/unregister-controller.https-expected.txt:
* web-platform-tests/service-workers/service-worker/update-bytecheck.https-expected.txt:
* web-platform-tests/service-workers/service-worker/worker-interception.https-expected.txt:

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

3 years agoLayoutTest imported/w3c/web-platform-tests/service-workers/service-worker/fetch-cors...
commit-queue@webkit.org [Thu, 16 Nov 2017 17:37:22 +0000 (17:37 +0000)]
LayoutTest imported/w3c/web-platform-tests/service-workers/service-worker/fetch-cors-xhr.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=179771

Unreviewed.

Patch by Youenn Fablet <youenn@apple.com> on 2017-11-16

* TestExpectations: Marking test as flaky until we have full support of SW opaque responses.

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

3 years agoLayoutTests/imported/w3c:
Ms2ger@igalia.com [Thu, 16 Nov 2017 17:30:03 +0000 (17:30 +0000)]
LayoutTests/imported/w3c:
Import 2dcontext/the-canvas-state/ from wpt.
https://bugs.webkit.org/show_bug.cgi?id=179769

Reviewed by Youenn Fablet.

Also remove the outdated and unmaintained copies of those tests.

The only substantive changes are changes from _assertEqual to _assertSame;
that is, from comparing with == to comparing with ===. (I made this
change upstream in 2014.)

* resources/import-expectations.json:
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.bitmap-expected.txt: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.bitmap-expected.txt.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.bitmap.html: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.bitmap.html.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.clip-expected.txt: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.clip-expected.txt.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.clip.html: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.clip.html.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.fillStyle-expected.txt: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.fillStyle-expected.txt.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.fillStyle.html: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.fillStyle.html.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.font-expected.txt: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.font-expected.txt.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.font.html: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.font.html.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.globalAlpha-expected.txt: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.globalAlpha-expected.txt.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.globalAlpha.html: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.globalAlpha.html.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.globalCompositeOperation-expected.txt: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.globalCompositeOperation-expected.txt.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.globalCompositeOperation.html: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.globalCompositeOperation.html.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.imageSmoothingEnabled-expected.txt: Added.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.imageSmoothingEnabled.html: Added.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.lineCap-expected.txt: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.lineCap-expected.txt.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.lineCap.html: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.lineCap.html.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.lineJoin-expected.txt: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.lineJoin-expected.txt.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.lineJoin.html: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.lineJoin.html.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.lineWidth-expected.txt: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.lineWidth-expected.txt.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.lineWidth.html: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.lineWidth.html.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.miterLimit-expected.txt: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.miterLimit-expected.txt.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.miterLimit.html: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.miterLimit.html.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.path-expected.txt: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.path-expected.txt.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.path.html: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.path.html.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.shadowBlur-expected.txt: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.shadowBlur-expected.txt.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.shadowBlur.html: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.shadowBlur.html.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.shadowColor-expected.txt: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.shadowColor-expected.txt.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.shadowColor.html: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.shadowColor.html.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.shadowOffsetX-expected.txt: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.shadowOffsetX-expected.txt.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.shadowOffsetX.html: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.shadowOffsetX.html.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.shadowOffsetY-expected.txt: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.shadowOffsetY-expected.txt.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.shadowOffsetY.html: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.shadowOffsetY.html.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.stack-expected.txt: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.stack-expected.txt.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.stack.html: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.stack.html.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.stackdepth-expected.txt: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.stackdepth-expected.txt.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.stackdepth.html: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.stackdepth.html.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.strokeStyle-expected.txt: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.strokeStyle-expected.txt.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.strokeStyle.html: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.strokeStyle.html.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.textAlign-expected.txt: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.textAlign-expected.txt.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.textAlign.html: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.textAlign.html.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.textBaseline-expected.txt: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.textBaseline-expected.txt.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.textBaseline.html: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.textBaseline.html.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.transformation-expected.txt: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.transformation-expected.txt.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.transformation.html: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.transformation.html.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.underflow-expected.txt: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.underflow-expected.txt.
* web-platform-tests/2dcontext/the-canvas-state/2d.state.saverestore.underflow.html: Renamed from LayoutTests/imported/w3c/canvas/2d.state.saverestore.underflow.html.
* web-platform-tests/2dcontext/the-canvas-state/canvas_state_restore_001-expected.htm: Added.
* web-platform-tests/2dcontext/the-canvas-state/canvas_state_restore_001.htm: Added.
* web-platform-tests/2dcontext/the-canvas-state/w3c-import.log: Added.

LayoutTests:
Remove the outdated and unmaintained copies of the tests in wpt/2dcontext/the-canvas-state/.
https://bugs.webkit.org/show_bug.cgi?id=179769

Reviewed by Youenn Fablet.

* canvas/philip/tests/2d.state.saverestore.bitmap-expected.txt: Removed.
* canvas/philip/tests/2d.state.saverestore.bitmap.html: Removed.
* canvas/philip/tests/2d.state.saverestore.clip-expected.txt: Removed.
* canvas/philip/tests/2d.state.saverestore.clip.html: Removed.
* canvas/philip/tests/2d.state.saverestore.fillStyle-expected.txt: Removed.
* canvas/philip/tests/2d.state.saverestore.fillStyle.html: Removed.
* canvas/philip/tests/2d.state.saverestore.font-expected.txt: Removed.
* canvas/philip/tests/2d.state.saverestore.font.html: Removed.
* canvas/philip/tests/2d.state.saverestore.globalAlpha-expected.txt: Removed.
* canvas/philip/tests/2d.state.saverestore.globalAlpha.html: Removed.
* canvas/philip/tests/2d.state.saverestore.globalCompositeOperation-expected.txt: Removed.
* canvas/philip/tests/2d.state.saverestore.globalCompositeOperation.html: Removed.
* canvas/philip/tests/2d.state.saverestore.lineCap-expected.txt: Removed.
* canvas/philip/tests/2d.state.saverestore.lineCap.html: Removed.
* canvas/philip/tests/2d.state.saverestore.lineJoin-expected.txt: Removed.
* canvas/philip/tests/2d.state.saverestore.lineJoin.html: Removed.
* canvas/philip/tests/2d.state.saverestore.lineWidth-expected.txt: Removed.
* canvas/philip/tests/2d.state.saverestore.lineWidth.html: Removed.
* canvas/philip/tests/2d.state.saverestore.miterLimit-expected.txt: Removed.
* canvas/philip/tests/2d.state.saverestore.miterLimit.html: Removed.
* canvas/philip/tests/2d.state.saverestore.path-expected.txt: Removed.
* canvas/philip/tests/2d.state.saverestore.path.html: Removed.
* canvas/philip/tests/2d.state.saverestore.shadowBlur-expected.txt: Removed.
* canvas/philip/tests/2d.state.saverestore.shadowBlur.html: Removed.
* canvas/philip/tests/2d.state.saverestore.shadowColor-expected.txt: Removed.
* canvas/philip/tests/2d.state.saverestore.shadowColor.html: Removed.
* canvas/philip/tests/2d.state.saverestore.shadowOffsetX-expected.txt: Removed.
* canvas/philip/tests/2d.state.saverestore.shadowOffsetX.html: Removed.
* canvas/philip/tests/2d.state.saverestore.shadowOffsetY-expected.txt: Removed.
* canvas/philip/tests/2d.state.saverestore.shadowOffsetY.html: Removed.
* canvas/philip/tests/2d.state.saverestore.stack-expected.txt: Removed.
* canvas/philip/tests/2d.state.saverestore.stack.html: Removed.
* canvas/philip/tests/2d.state.saverestore.stackdepth-expected.txt: Removed.
* canvas/philip/tests/2d.state.saverestore.stackdepth.html: Removed.
* canvas/philip/tests/2d.state.saverestore.strokeStyle-expected.txt: Removed.
* canvas/philip/tests/2d.state.saverestore.strokeStyle.html: Removed.
* canvas/philip/tests/2d.state.saverestore.textAlign-expected.txt: Removed.
* canvas/philip/tests/2d.state.saverestore.textAlign.html: Removed.
* canvas/philip/tests/2d.state.saverestore.textBaseline-expected.txt: Removed.
* canvas/philip/tests/2d.state.saverestore.textBaseline.html: Removed.
* canvas/philip/tests/2d.state.saverestore.transformation-expected.txt: Removed.
* canvas/philip/tests/2d.state.saverestore.transformation.html: Removed.
* canvas/philip/tests/2d.state.saverestore.underflow-expected.txt: Removed.
* canvas/philip/tests/2d.state.saverestore.underflow.html: Removed.

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

3 years agoWin EWS bots should reboot after N webkit-patch iterations.
pvollan@apple.com [Thu, 16 Nov 2017 15:52:28 +0000 (15:52 +0000)]
Win EWS bots should reboot after N webkit-patch iterations.
https://bugs.webkit.org/show_bug.cgi?id=177970

Reviewed by Brent Fulgham.

* EWSTools/start-queue-win.sh:

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

3 years agoMark http/wpt/offscreen-canvas/getContext-webgl.html as failing on Windows.
pvollan@apple.com [Thu, 16 Nov 2017 15:49:22 +0000 (15:49 +0000)]
Mark http/wpt/offscreen-canvas/getContext-webgl.html as failing on Windows.
https://bugs.webkit.org/show_bug.cgi?id=179767

Unreviewed test gardening.

* platform/win/TestExpectations:

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

3 years agoProvide a runtime option for disabling the optimization of recursive tail calls
rmorisset@apple.com [Thu, 16 Nov 2017 15:48:11 +0000 (15:48 +0000)]
Provide a runtime option for disabling the optimization of recursive tail calls
https://bugs.webkit.org/show_bug.cgi?id=179765

Reviewed by Mark Lam.

* bytecode/PreciseJumpTargets.cpp:
(JSC::getJumpTargetsForBytecodeOffset):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitEnter):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleRecursiveTailCall):
* runtime/Options.h:

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

3 years agoMark accessibility/accessibility-object-model.html as failing on Windows.
pvollan@apple.com [Thu, 16 Nov 2017 15:41:00 +0000 (15:41 +0000)]
Mark accessibility/accessibility-object-model.html as failing on Windows.
https://bugs.webkit.org/show_bug.cgi?id=179766

Unreviewed test gardening.

* platform/win/TestExpectations:

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

3 years agoFix null pointer dereference in bytecodeDumper
rmorisset@apple.com [Thu, 16 Nov 2017 15:08:10 +0000 (15:08 +0000)]
Fix null pointer dereference in bytecodeDumper
https://bugs.webkit.org/show_bug.cgi?id=179764

Reviewed by Mark Lam.

The problem was just a call to lastSeenCallee() that was unguarded by haveLastSeenCallee().

* bytecode/BytecodeDumper.cpp:
(JSC::BytecodeDumper<Block>::printCallOp):

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

3 years agoREGRESSION (r224592): oss-fuzz: jsc: Null-dereference READ in JSC::JSCell::isObject...
rmorisset@apple.com [Thu, 16 Nov 2017 15:04:37 +0000 (15:04 +0000)]
REGRESSION (r224592): oss-fuzz: jsc: Null-dereference READ in JSC::JSCell::isObject (4216)
https://bugs.webkit.org/show_bug.cgi?id=179763
<rdar://problem/35550513>

Reviewed by Keith Miller.

JSTests:

Just adding a slightly cleaned-up version of the original fuzzer-found test.

* stress/tdz-this-in-try-catch.js: Added.
(__v_6388):
(__v_6392):

Source/JavaScriptCore:

Fix null pointer dereference caused by an eliminated tdz_check

The problem was when doing an OSR entry in DFG while |this| was null
(because super() had not yet been called in the constructor of this
subclass), it would be marked as non-null, and the tdz_check eliminated.

* dfg/DFGInPlaceAbstractState.cpp:
(JSC::DFG::InPlaceAbstractState::initialize):

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

3 years agoConsider non-main frames for frameViewRootLayerDidChange
fred.wang@free.fr [Thu, 16 Nov 2017 13:49:02 +0000 (13:49 +0000)]
Consider non-main frames for frameViewRootLayerDidChange
https://bugs.webkit.org/show_bug.cgi?id=178508

Patch by Frederic Wang <fwang@igalia.com> on 2017-11-16
Reviewed by Antonio Gomes.

No new tests, behavior unchanged.

AsyncScrollingCoordinator::frameViewRootLayerDidChange assumes that frameView is always a
main-frame. It calls ensureRootStateNodeForFrameView, which always attaches a frame node with
null parent ID. It also has an ASSERT to check m_scrollingStateTree->rootStateNode(), instead
of m_scrollingStateTree->stateNodeForID(frameView.scrollLayerID()). This patch makes the
ASSERT more generic. It also adds an early return into ensureRootStateNodeForFrameView when the
node already exists so that the call to attachToStateTree can be skipped. It turns out that that
call is actually only necessary for main frame, so another ASSERT is added to verify it.

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange): Modify the ASSERT to
verify the availability of a scrolling node for the frame, not just the root node.
(WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView): Add an early return to
skip the call to attachToStateTree when the node is actually already available. Add an ASSERT to
ensure that attaching a new node is only necessary for main frames.

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

3 years ago[WPE] Add initial support for WebDriver
carlosgc@webkit.org [Thu, 16 Nov 2017 12:48:22 +0000 (12:48 +0000)]
[WPE] Add initial support for WebDriver
https://bugs.webkit.org/show_bug.cgi?id=179727

Reviewed by Michael Catanzaro.

.:

Enable WebDriver by default in WPE.

* Source/cmake/OptionsWPE.cmake:

Source/WebDriver:

Add WPE implementation for platform-specific methods. Move the version handling to a common file
WebDriverServiceGLib.cpp.

* Capabilities.h:
* PlatformGTK.cmake:
* PlatformWPE.cmake:
* glib/WebDriverServiceGLib.cpp: Added.
(WebDriver::parseVersion):
(WebDriver::WebDriverService::platformCompareBrowserVersions):
* gtk/WebDriverServiceGtk.cpp:
* wpe/WebDriverServiceWPE.cpp: Copied from Source/WebDriver/gtk/WebDriverServiceGtk.cpp.
(WebDriver::WebDriverService::platformCapabilities):
(WebDriver::WebDriverService::platformValidateCapability const):
(WebDriver::WebDriverService::platformMatchCapability const):
(WebDriver::WebDriverService::platformParseCapabilities const):

Tools:

Make it possible to run WebDriver tests with WPE.

* Scripts/run-webdriver-tests: Add --wpe alias for --platform=wpe.
* Scripts/webkitpy/port/wpe.py:
(WPEPort.__init__): Initialize _display_server from options.
(WPEPort._driver_class): Use WaylandDriver when wayland is passed as display server option.
* Scripts/webkitpy/webdriver_tests/webdriver_driver.py:
(WebDriver.browser_env): Add virtual method to get the environment that should be used.
* Scripts/webkitpy/webdriver_tests/webdriver_driver_wpe.py: Copied from Tools/Scripts/webkitpy/webdriver_tests/webdriver_driver.py.
(WebDriverWPE):
(WebDriverWPE.__init__):
(WebDriverWPE.binary_path):
(WebDriverWPE.browser_name):
(WebDriverWPE.capabilities):
(WebDriverWPE.browser_env):
* Scripts/webkitpy/webdriver_tests/webdriver_w3c_executor.py:
(WebDriverW3CExecutor.__init__): Update the environment with the one provided by the driver.
* wpe/jhbuild.modules: Upgrade dyz to newer version that supports automation.

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

3 years ago[TexMap] Remove use of GraphicsContext3D
magomez@igalia.com [Thu, 16 Nov 2017 12:22:47 +0000 (12:22 +0000)]
[TexMap] Remove use of GraphicsContext3D
https://bugs.webkit.org/show_bug.cgi?id=174860

Reviewed by Žan Doberšek.

Remove remaining uses of GC3D that are not WebGL related:
- Remove the option to create a GC3D to render to the curren OpenGL context.
- Remove the remaining usage of GC3D inside MediaPlayerPrivateGStreamerBase.
- Replace the usage inside TextureMapper with direct OpenGL calls, and use a
VAO when the OpenGL version is higher than 3.2.

This also modifies TextureMapperContextAttributes so all the tested features are
supported when using OpenGL, and we only check for the extensions when using GLES2.

No new tests as there's no behavior change.

* platform/graphics/GraphicsContext3D.h:
* platform/graphics/GraphicsContext3DPrivate.cpp:
(WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
* platform/graphics/GraphicsContext3DPrivate.h:
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::~GraphicsContext3D):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
* platform/graphics/texmap/TextureMapper.h:
* platform/graphics/texmap/TextureMapperContextAttributes.cpp:
(WebCore::TextureMapperContextAttributes::initialize):
* platform/graphics/texmap/TextureMapperContextAttributes.h:
* platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp:
(WebCore::TextureMapperGC3DPlatformLayer::TextureMapperGC3DPlatformLayer):
(WebCore::TextureMapperGC3DPlatformLayer::makeContextCurrent):
(WebCore::TextureMapperGC3DPlatformLayer::platformContext):
(WebCore::TextureMapperGC3DPlatformLayer::swapBuffersIfNeeded):
(WebCore::TextureMapperGC3DPlatformLayer::paintToTextureMapper):
* platform/graphics/texmap/TextureMapperGC3DPlatformLayer.h:
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGLData::SharedGLData::currentSharedGLData):
(WebCore::TextureMapperGLData::TextureMapperGLData):
(WebCore::TextureMapperGLData::~TextureMapperGLData):
(WebCore::TextureMapperGLData::initializeStencil):
(WebCore::TextureMapperGLData::getStaticVBO):
(WebCore::TextureMapperGLData::getVAO):
(WebCore::TextureMapperGLData::getShaderProgram):
(WebCore::TextureMapperGL::TextureMapperGL):
(WebCore::TextureMapperGL::beginPainting):
(WebCore::TextureMapperGL::endPainting):
(WebCore::TextureMapperGL::drawBorder):
(WebCore::prepareFilterProgram):
(WebCore::TextureMapperGL::drawTexture):
(WebCore::TextureMapperGL::drawSolidColor):
(WebCore::TextureMapperGL::clearColor):
(WebCore::TextureMapperGL::drawEdgeTriangles):
(WebCore::TextureMapperGL::drawUnitRect):
(WebCore::TextureMapperGL::draw):
(WebCore::TextureMapperGL::drawTexturedQuadWithProgram):
(WebCore::TextureMapperGL::drawFiltered):
(WebCore::TextureMapperGL::bindDefaultSurface):
(WebCore::TextureMapperGL::beginClip):
(WebCore::TextureMapperGL::createTexture):
* platform/graphics/texmap/TextureMapperGL.h:

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

3 years agoUnreviewed GTK+ and WPE gardening after r224910.
magomez@igalia.com [Thu, 16 Nov 2017 11:20:41 +0000 (11:20 +0000)]
Unreviewed GTK+ and WPE gardening after r224910.

* platform/gtk/TestExpectations:
* platform/wpe/TestExpectations:

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

3 years agoASSERTION FAILED: !isAnonymous() in WebCore::RenderMathMLOperator::updateTokenContent
fred.wang@free.fr [Thu, 16 Nov 2017 08:14:33 +0000 (08:14 +0000)]
ASSERTION FAILED: !isAnonymous() in WebCore::RenderMathMLOperator::updateTokenContent
https://bugs.webkit.org/show_bug.cgi?id=166011

Patch by Frederic Wang <fwang@igalia.com> on 2017-11-16
Reviewed by Alejandro G. Castro.

Source/WebCore:

RenderMathMLFencedOperator does not support mathvariant or displaystyle transforms. This is
one of several issues of the mfenced element (see bug 160509). However,
MathMLStyle::updateStyleIfNeeded() still tries to use the implementation of the parent
RenderMathMLOperator class, which only works for non-anonymous operators. This patch skips
the updateTokenContent() calls for anonymous mfenced operators in order to avoid ASSERTION
failures.

Test: mathml/mfenced-displaystyle-and-mathvariant-crash.html

* rendering/mathml/MathMLStyle.cpp:
(WebCore::MathMLStyle::updateStyleIfNeeded): Skip anonymous token elements.

LayoutTests:

Add a crash test checking displaystyle and mathvariant on mfenced operators.

* mathml/mfenced-displaystyle-and-mathvariant-crash-expected.txt: Added.
* mathml/mfenced-displaystyle-and-mathvariant-crash.html: Added.

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

3 years agoImplement basics of "Terminate Service Worker" algorithm.
beidson@apple.com [Thu, 16 Nov 2017 03:05:02 +0000 (03:05 +0000)]
Implement basics of "Terminate Service Worker" algorithm.
https://bugs.webkit.org/show_bug.cgi?id=179551

Reviewed by Chris Dumez.

Source/WebCore:

No new tests (No observable behavior change yet).

* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::stopIndexedDatabase):

* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::workerThreadCreated):
(WebCore::WorkerMessagingProxy::terminateWorkerGlobalScope):

* workers/WorkerThread.cpp:
(WebCore::WorkerThread::workerThread):
(WebCore::WorkerThread::stop):
* workers/WorkerThread.h:

* workers/service/context/SWContextManager.cpp:
(WebCore::SWContextManager::terminateWorker):
* workers/service/context/SWContextManager.h:

* workers/service/server/SWServer.cpp:
(WebCore::SWServer::workerContextTerminated):
(WebCore::SWServer::terminateWorker):
* workers/service/server/SWServer.h:

* workers/service/server/SWServerToContextConnection.cpp:
(WebCore::SWServerToContextConnection::workerTerminated):
* workers/service/server/SWServerToContextConnection.h:

* workers/service/server/SWServerWorker.cpp:
(WebCore::SWServerWorker::terminate):
(WebCore::SWServerWorker::contextTerminated):
* workers/service/server/SWServerWorker.h:

Source/WebKit:

* StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
(WebKit::WebSWServerToContextConnection::terminateWorker):
* StorageProcess/ServiceWorker/WebSWServerToContextConnection.h:
* StorageProcess/ServiceWorker/WebSWServerToContextConnection.messages.in:

* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::terminateWorker):
(WebKit::WebSWContextManagerConnection::workerTerminated):
* WebProcess/Storage/WebSWContextManagerConnection.h:
* WebProcess/Storage/WebSWContextManagerConnection.messages.in:

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

3 years agoRemove access to 'com.apple.mediaaccessibility.public' preferences in WebContent...
bfulgham@apple.com [Thu, 16 Nov 2017 01:17:02 +0000 (01:17 +0000)]
Remove access to 'com.apple.mediaaccessibility.public' preferences in WebContent sandbox
https://bugs.webkit.org/show_bug.cgi?id=179747
<rdar://problem/35367346>

Reviewed by Dean Jackson.

The 'mediaaccessibilityd' process handles access to MediaAccessibility preferences. We don't need
to grant the WebContent Process sandbox access to them.

* WebProcess/com.apple.WebProcess.sb.in:

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

3 years agoFix fast/events/message-port-postMessage-recursive.html after r224896
achristensen@apple.com [Thu, 16 Nov 2017 00:36:30 +0000 (00:36 +0000)]
Fix fast/events/message-port-postMessage-recursive.html after r224896
https://bugs.webkit.org/show_bug.cgi?id=179749

Reviewed by Jer Noble.

* wtf/mac/MainThreadMac.mm:
(WTF::currentRunLoopInCommonMode):
We sometimes run the runloop in kCFRunLoopDefaultMode, which should also have the responsiveness optimization.
This allows the runloop to continue to iterate when we are doing lots of things on the main thread.
CFRunLoop.h has a special definition of these two constants.

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

3 years agoWeb Inspector: Styles Redesign: typing colon in property name should advance to value...
nvasilyev@apple.com [Thu, 16 Nov 2017 00:31:00 +0000 (00:31 +0000)]
Web Inspector: Styles Redesign: typing colon in property name should advance to value field
https://bugs.webkit.org/show_bug.cgi?id=178795
<rdar://problem/35174674>

Reviewed by Devin Rousso.

* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype._update):
(WI.SpreadsheetStyleProperty.prototype._handleNameBeforeInput):
Unlike pressing Tab or Enter, typing ":" in the property name should discard suggestion hint.

(WI.SpreadsheetStyleProperty.prototype._valueCompletionDataProvider):
We use 250ms debounce before updating this._property.name.
When typing "font-f:", we want to discard suggestion hint (i.e. "font-family"),
and immediately show autocomplete for "font-f" (in this case, invalid property).

* UserInterface/Views/SpreadsheetTextField.js:
(WI.SpreadsheetTextField):
(WI.SpreadsheetTextField.prototype.stopEditing):
(WI.SpreadsheetTextField.prototype.discardCompletion):
Call spreadsheetTextFieldDidChange when discarding non-empty suggestion hint.

(WI.SpreadsheetTextField.prototype.detached):
(WI.SpreadsheetTextField.prototype.completionSuggestionsClickedCompletion):
(WI.SpreadsheetTextField.prototype._handleBlur):
(WI.SpreadsheetTextField.prototype._handleKeyDownForSuggestionView):
(WI.SpreadsheetTextField.prototype._updateCompletions):
(WI.SpreadsheetTextField.prototype._applyCompletionHint):
(WI.SpreadsheetTextField.prototype._hideCompletions): Deleted.

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

3 years agoWeb Inspector: REGRESSION (r217750): Navigation sidebar broken after closing and...
mattbaker@apple.com [Wed, 15 Nov 2017 23:39:54 +0000 (23:39 +0000)]
Web Inspector: REGRESSION (r217750): Navigation sidebar broken after closing and re-opening tab
https://bugs.webkit.org/show_bug.cgi?id=179717
<rdar://problem/35551541>

Reviewed by Devin Rousso.

NavigationSidebarPanels should not be created with WI.instanceForClass.

* UserInterface/Views/DebuggerSidebarPanel.js:
* UserInterface/Views/ResourceSidebarPanel.js:
(WI.ResourceSidebarPanel):
* UserInterface/Views/SearchSidebarPanel.js:
(WI.SearchSidebarPanel):
* UserInterface/Views/StorageSidebarPanel.js:
(WI.StorageSidebarPanel):
* UserInterface/Views/TabContentView.js:
(WI.TabContentView.prototype.get navigationSidebarPanel):

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

3 years agoLog media readyState and networkState as strings
eric.carlson@apple.com [Wed, 15 Nov 2017 23:25:34 +0000 (23:25 +0000)]
Log media readyState and networkState as strings
https://bugs.webkit.org/show_bug.cgi?id=179732

Reviewed by Youenn Fablet.

* html/HTMLMediaElement.cpp:
(WebCore::convertEnumerationToString):
(WebCore::HTMLMediaElement::scheduleDelayedAction): Fix logic error.
(WebCore::HTMLMediaElement::pendingActionTimerFired): Fix incorrect log string.
(WebCore::HTMLMediaElement::setNetworkState): Don't cast to int for logging.
(WebCore::HTMLMediaElement::setReadyState): Ditto. Log when autoplay is blocked.

* html/HTMLMediaElementEnums.h:
(PAL::LogArgument<WebCore::HTMLMediaElementEnums::ReadyState>::toString): New.
(PAL::LogArgument<WebCore::HTMLMediaElementEnums::NetworkState>::toString): New.

* platform/graphics/MediaPlayer.cpp:
(WebCore::convertEnumerationToString):
* platform/graphics/MediaPlayerEnums.h:
(PAL::LogArgument<WebCore::MediaPlayerEnums::ReadyState>::toString):
(PAL::LogArgument<WebCore::MediaPlayerEnums::NetworkState>::toString):

* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::updateStates): Log strings.

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

3 years agoService Worker fetch should handle empty responses
commit-queue@webkit.org [Wed, 15 Nov 2017 23:05:41 +0000 (23:05 +0000)]
Service Worker fetch should handle empty responses
https://bugs.webkit.org/show_bug.cgi?id=179740

Patch by Youenn Fablet <youenn@apple.com> on 2017-11-15
Reviewed by Alex Christensen.

Source/WebCore:

Covered by updated test.

* Modules/streams/ReadableStreamSink.cpp:
(WebCore::ReadableStreamToSharedBufferSink::enqueue): Not create a buffer until actually needed.
* workers/service/context/ServiceWorkerFetch.cpp:
(WebCore::ServiceWorkerFetch::processResponse): Check for null buffers.

LayoutTests:

* http/tests/workers/service/resources/service-worker-fetch-worker.js:
(event.event.request.url.endsWith):
* http/tests/workers/service/resources/service-worker-fetch.js:
(async.test):
* http/tests/workers/service/service-worker-fetch.https-expected.txt:

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

3 years agoReloadFromOrigin loads should not select any service worker
commit-queue@webkit.org [Wed, 15 Nov 2017 22:56:59 +0000 (22:56 +0000)]
ReloadFromOrigin loads should not select any service worker
https://bugs.webkit.org/show_bug.cgi?id=179736

Patch by Youenn Fablet <youenn@apple.com> on 2017-11-15
Reviewed by Brady Eidson.

Source/WebCore:

Test: http/tests/workers/service/shift-reload-navigation.html

In case of ReloadFromOrigin (equivalent of shift reload), do not select any service worker.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::startLoadingMainResource):
* loader/FrameLoader.h:
(WebCore::FrameLoader::isReloadingFromOrigin const):

LayoutTests:

* http/tests/workers/service/resources/shift-reload-navigation.js: Added.
(async.test):
* http/tests/workers/service/shift-reload-navigation-expected.txt: Added.
* http/tests/workers/service/shift-reload-navigation.html: Added.

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

3 years agoRevert r224885
achristensen@apple.com [Wed, 15 Nov 2017 22:07:10 +0000 (22:07 +0000)]
Revert r224885
https://bugs.webkit.org/show_bug.cgi?id=179719

* UIProcess/API/APIContentRuleListStore.cpp:
(API::compiledToFile):
r224885 was a speculative fix that did not fix anything on the bots.

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

3 years agoAX triggers sync layout while building the render tree on www.macrumors.com.
zalan@apple.com [Wed, 15 Nov 2017 21:50:04 +0000 (21:50 +0000)]
AX triggers sync layout while building the render tree on macrumors.com.
https://bugs.webkit.org/show_bug.cgi?id=179741
rdar://problem/35462531

Reviewed by Antti Koivisto.

It's unsafe to issue layout while mutating the render tree. If a mutation
requires AX to issue a layout, it needs to be issued in a delayed manner (which the render
tree mutation will trigger anyway).

Unable to reproduce.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::updateBackingStore):

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

3 years ago[Web Animations] Implement basic to-from animations
graouts@webkit.org [Wed, 15 Nov 2017 21:35:38 +0000 (21:35 +0000)]
[Web Animations] Implement basic to-from animations
https://bugs.webkit.org/show_bug.cgi?id=179707
<rdar://problem/34932456>

Source/WebCore:

We can now actually perform an animation, in software only, when provided two keyframes on an AnimationEffect.
To parse a keyframes object from JS, we use the StyleResolver to create RenderStyle objects based on the strings
provided for the property names and values. Then, when the DocumentTimeline indicates that animations are ready
to be updated, we invalidate the style of elements with animations, so that during style resolution we can perform
blending between the RenderStyles for each keyframe.

Reviewed by Dean Jackson.

* animation/AnimationEffect.h:
(WebCore::AnimationEffect::~AnimationEffect): Deleted.
* animation/AnimationTimeline.h:
(WebCore::AnimationTimeline::elementToAnimationsMap const):
* animation/DocumentTimeline.cpp:
(WebCore::DocumentTimeline::animationResolutionTimerFired):
(WebCore::DocumentTimeline::updateAnimations): Renamed from resolveAnimations() since we're not
actually resolving animations, merely invalidating styles in preparation for resolution.
(WebCore::DocumentTimeline::resolveAnimations): Deleted.
* animation/DocumentTimeline.h:
* animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::create): Pass the keyframes argument to setKeyframes() and forward the
exception in case one was raised in the setter.
(WebCore::KeyframeEffect::setKeyframes): Pass the keyframes argument to processKeyframes() and
forward the exception in case one was raised during processing.
(WebCore::KeyframeEffect::processKeyframes): Deal with exactly two keyframes, set at 0 and 1 offsets,
specified in array forms for the keyframes object. As we parse the content of the provided JS object,
we create RenderStyle objects using the element's StyleResolver from a CSS text string we create
based on the property and values as strings.
(WebCore::KeyframeEffect::applyAtLocalTime): Compute the progress based on the local time and duration,
using the existing CSSPropertyAnimation::blendProperties() mechanics to perform the blend between the
from and to keyframes.
* animation/KeyframeEffect.h:
* animation/KeyframeEffect.idl:
* animation/WebAnimation.cpp:
(WebCore::WebAnimation::resolve):
* animation/WebAnimation.h:
* bindings/IDLTypes.h:
(WebCore::IDLObject::nullValue): Make JSC::Strong an optional type.
* dom/Document.h:
(WebCore::Document::existingTimeline const): Provide an explicit method for call sites to check existence
of a timeline before forcing one to be created if missing by calling timeline().
* dom/Element.cpp:
(WebCore::Element::getAnimations): Do not force the creation of a timeline if one isn't already created.
* style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::createAnimatedElementUpdate): When applying styles, account for any Web
Animation applied to the provided element.

LayoutTests:

Reviewed by Dean Jackson.

Update existing tests to explicitly pass null for keyframes and update WPT expectations.

* http/wpt/web-animations/interfaces/AnimationTimeline/document-timeline-expected.txt:
* http/wpt/web-animations/interfaces/KeyframeEffect/constructor-expected.txt:
* http/wpt/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001-expected.txt:
* http/wpt/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-002-expected.txt:
* http/wpt/web-animations/interfaces/KeyframeEffect/setKeyframes-expected.txt:
* http/wpt/wk-web-animations/interfaces/element-get-animations.html:
* http/wpt/wk-web-animations/timing-model/animation-creation-basic.html:
* http/wpt/wk-web-animations/timing-model/animation-effect-unique-relationship.html:
* http/wpt/wk-web-animations/timing-model/animation-interface-effect-property.html:
* http/wpt/wk-web-animations/timing-model/keyframe-effect-expected.txt:
* http/wpt/wk-web-animations/timing-model/keyframe-effect-interface-timing-duration.html:
* http/wpt/wk-web-animations/timing-model/keyframe-effect.html:

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

3 years agoWebViews scheduled in custom run loop modes should be able to do more than 50ms of...
achristensen@apple.com [Wed, 15 Nov 2017 21:28:15 +0000 (21:28 +0000)]
WebViews scheduled in custom run loop modes should be able to do more than 50ms of work at a time
https://bugs.webkit.org/show_bug.cgi?id=179742
<rdar://problem/35519421>

Reviewed by Jer Noble.
Source/WTF:

In r224687 I fixed loading from scheduled WebViews with custom run loop modes, but in
dispatchFunctionsFromMainThread we have an optimization to yield the run loop if we have already
done more than 50ms of work on the main thread in this run loop iteration.  When this happens
and we are running in a custom run loop mode, we disable this responsiveness optimization.
We are calling CFRunLoopRunInMode or [NSRunLoop acceptInputForMode:beforeDate:] in a while loop anyways,
so we would not benefit from a responsiveness optimization.  We definitely don't want to reschedule
on the main thread in the common run loop mode in this case.

* wtf/MainThread.cpp:
(WTF::dispatchFunctionsFromMainThread):
* wtf/MainThread.h:
* wtf/generic/MainThreadGeneric.cpp:
(WTF::currentRunLoopInCommonMode):
* wtf/mac/MainThreadMac.mm:
(WTF::currentRunLoopInCommonMode):
* wtf/win/MainThreadWin.cpp:
(WTF::currentRunLoopInCommonMode):

Tools:

* TestWebKitAPI/Tests/mac/WebViewScheduleInRunLoop.mm:
(-[ScheduleInRunLoopDelegate webView:didFinishLoadForFrame:]):
(TestWebKitAPI::TEST):
Load more than one scheduled WebView to test work that typically takes more than 50 ms.

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

3 years agoASSERTION FAILED: !renderer->needsLayout() in WebCore::RenderBlock::checkPositionedOb...
fred.wang@free.fr [Wed, 15 Nov 2017 20:07:51 +0000 (20:07 +0000)]
ASSERTION FAILED: !renderer->needsLayout() in WebCore::RenderBlock::checkPositionedObjectsNeedLayout with MathML
https://bugs.webkit.org/show_bug.cgi?id=178865

Patch by Frederic Wang <fwang@igalia.com> on 2017-11-15
Reviewed by Manuel Rego Casasnovas.

Source/WebCore:

MathML token elements can contain HTML elements and hence MathML elements can contain
out-of-flow positioned descendants. Also all MathML elements can be containing block and hence
should position their out-of-flow positioned descendants before calling clearNeedsLayout().
This patch does that in all places in the MathML renderer classes, except a few of them:
- RenderMathMLSpace, which can not have descendants.
- RenderMathMLToken and RenderMathMLOperator, since they will use the layout implementation
  of RenderMathMLBlock when they contain non-text children.
The patch also fixes an ASSERTION failure in WebCore::RenderBlock::checkPositionedObjectsNeedLayout
due to some descendants that are not laid out.

Test: mathml/out-of-flow-in-token-crash.html

* rendering/mathml/RenderMathMLBlock.cpp:
(WebCore::RenderMathMLBlock::layoutBlock): Call layoutPositionedObjects.
(WebCore::RenderMathMLBlock::layoutInvalidMarkup): Ditto and pass the relayoutChildren boolean.
* rendering/mathml/RenderMathMLBlock.h: Add a relayoutChildren boolean to layoutInvalidMarkup.
* rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::layoutBlock): Pass the relayoutChildren boolean to layoutInvalidMarkup
and call layoutPositionedObjects.
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::layoutBlock): Ditto.
* rendering/mathml/RenderMathMLScripts.cpp:
(WebCore::RenderMathMLScripts::layoutBlock): Ditto.
* rendering/mathml/RenderMathMLUnderOver.cpp:
(WebCore::RenderMathMLUnderOver::layoutBlock): Ditto.
* rendering/mathml/RenderMathMLMenclose.cpp:
(WebCore::RenderMathMLMenclose::layoutBlock): Call layoutPositionedObjects.
* rendering/mathml/RenderMathMLPadded.cpp:
(WebCore::RenderMathMLPadded::layoutBlock): Ditto.
* rendering/mathml/RenderMathMLRow.cpp:
(WebCore::RenderMathMLRow::layoutBlock): Ditto.

LayoutTests:

Add a test to trigger various clearNeedsLayout() in a MathML containing block with
out-of-flow positioned descendants.

* mathml/out-of-flow-in-token-crash-expected.txt: Added.
* mathml/out-of-flow-in-token-crash.html: Added.

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

3 years ago[GTK] accessibility/accessibility-object-model.html fails
n_wang@apple.com [Wed, 15 Nov 2017 20:02:04 +0000 (20:02 +0000)]
[GTK] accessibility/accessibility-object-model.html fails
https://bugs.webkit.org/show_bug.cgi?id=179723

Reviewed by Chris Fleizach.

Updated the test to support different platforms.

* accessibility/accessibility-object-model-expected.txt:
* accessibility/accessibility-object-model.html:

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

3 years agoUnreviewed, fix tests introduced in r224880.
cdumez@apple.com [Wed, 15 Nov 2017 19:50:41 +0000 (19:50 +0000)]
Unreviewed, fix tests introduced in r224880.

This is needed because of the changes in r224876.

* http/tests/workers/service/Client-properties.html:

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

3 years agoSome service worker tests are flaky due to console log messages
commit-queue@webkit.org [Wed, 15 Nov 2017 19:40:47 +0000 (19:40 +0000)]
Some service worker tests are flaky due to console log messages
https://bugs.webkit.org/show_bug.cgi?id=179601

Patch by Youenn Fablet <youenn@apple.com> on 2017-11-15
Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* web-platform-tests/service-workers/service-worker/fetch-canvas-tainting-cache.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-canvas-tainting.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-cors-xhr.https-expected.txt:

LayoutTests:

* TestExpectations:

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

3 years agoUnreviewed build fix after r224830.
bfulgham@apple.com [Wed, 15 Nov 2017 19:36:17 +0000 (19:36 +0000)]
Unreviewed build fix after r224830.

* WebProcess/com.apple.WebProcess.sb.in: Add missing sysctl-read permissions needed
to support testing on Mac Mini hardware.

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

3 years agoAdd ServiceWorker to WebProcess plumbery for FormData fetch responses
commit-queue@webkit.org [Wed, 15 Nov 2017 19:28:03 +0000 (19:28 +0000)]
Add ServiceWorker to WebProcess plumbery for FormData fetch responses
https://bugs.webkit.org/show_bug.cgi?id=179694

Patch by Youenn Fablet <youenn@apple.com> on 2017-11-15
Reviewed by Alex Christensen.

Source/WebCore:

No observable changes since we are not actually loading FormData right now.

* workers/service/context/ServiceWorkerFetch.cpp:
(WebCore::ServiceWorkerFetch::processResponse):
* workers/service/context/ServiceWorkerFetch.h:

Source/WebKit:

Added plumbery from Service Worker up to Web Process to pass form data response bodies.
A follow-up patch should read the data from Network Process and send it to the ResourceLoader.

* Platform/IPC/FormDataReference.h: Added.
(IPC::FormDataReference::FormDataReference):
(IPC::FormDataReference::takeData):
(IPC::FormDataReference::encode const):
(IPC::FormDataReference::decode):
* StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::didReceiveFetchFormData):
* StorageProcess/ServiceWorker/WebSWServerConnection.h:
* StorageProcess/StorageProcess.cpp:
(WebKit::StorageProcess::didReceiveFetchFormData):
* StorageProcess/StorageProcess.h:
* StorageProcess/StorageProcess.messages.in:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/Storage/ServiceWorkerClientFetch.cpp:
(WebKit::ServiceWorkerClientFetch::didReceiveFormData):
* WebProcess/Storage/ServiceWorkerClientFetch.h:
* WebProcess/Storage/ServiceWorkerClientFetch.messages.in:
* WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp:
(WebKit::WebServiceWorkerFetchTaskClient::didReceiveFormData):
* WebProcess/Storage/WebServiceWorkerFetchTaskClient.h:

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

3 years agoUnreviewed, sort async iteration feature.
keith_miller@apple.com [Wed, 15 Nov 2017 19:22:44 +0000 (19:22 +0000)]
Unreviewed, sort async iteration feature.

* Source/cmake/WebKitFeatures.cmake:

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

3 years agoAdd a compile-time-checked string literal initializer for FourCC.
jer.noble@apple.com [Wed, 15 Nov 2017 19:06:53 +0000 (19:06 +0000)]
Add a compile-time-checked string literal initializer for FourCC.
https://bugs.webkit.org/show_bug.cgi?id=179706

Reviewed by Alex Christensen.

Add a contexpr constructor for FourCC that takes a string literal and static_asserts that it
is exactly 4 chars long. Use this string literal constructor everywhere instead of multi-
character literals.

* platform/graphics/FourCC.h:
(WebCore::FourCC::FourCC):
* platform/graphics/iso/ISOBox.cpp:
(WebCore::ISOBox::parse):
* platform/graphics/iso/ISOOriginalFormatBox.h:
(WebCore::ISOOriginalFormatBox::boxTypeName):
* platform/graphics/iso/ISOProtectionSchemeInfoBox.h:
(WebCore::ISOProtectionSchemeInfoBox::boxTypeName):
* platform/graphics/iso/ISOSchemeInformationBox.h:
(WebCore::ISOSchemeInformationBox::boxTypeName):
* platform/graphics/iso/ISOSchemeTypeBox.h:
(WebCore::ISOSchemeTypeBox::boxTypeName):
* platform/graphics/iso/ISOTrackEncryptionBox.h:
(WebCore::ISOTrackEncryptionBox::boxTypeName):
* platform/graphics/iso/ISOVTTCue.h:
(WebCore::ISOWebVTTCue::boxTypeName):

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

3 years agoUnreviewed, rolling out r223781.
ryanhaddad@apple.com [Wed, 15 Nov 2017 18:48:01 +0000 (18:48 +0000)]
Unreviewed, rolling out r223781.

The test is now returning false, so the FIXME is not needed
anymore.

Reverted changeset:

"WebsiteDataStoreCustomPaths.mm is failing after r223718"
https://bugs.webkit.org/show_bug.cgi?id=178596
https://trac.webkit.org/changeset/223781

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

3 years agoMove a compiled WKContentRuleList to its destination before calling mmap
achristensen@apple.com [Wed, 15 Nov 2017 18:36:57 +0000 (18:36 +0000)]
Move a compiled WKContentRuleList to its destination before calling mmap
https://bugs.webkit.org/show_bug.cgi?id=179719

Reviewed by Brady Eidson.

Right now we compile a WKContentRuleList to a temporary file, call mmap, close the file, then move it.
Sometimes, especially on bots running tests, the move fails because the temporary file doesn't exist
any more.  Moving the file before mmaping and closing the file might prevent this failure.

* UIProcess/API/APIContentRuleListStore.cpp:
(API::compiledToFile):

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

3 years agoREGRESSION(r224787): [Linux] Introduced 144 GTK/WPE JS test failures
keith_miller@apple.com [Wed, 15 Nov 2017 18:31:04 +0000 (18:31 +0000)]
REGRESSION(r224787): [Linux] Introduced 144 GTK/WPE JS test failures
https://bugs.webkit.org/show_bug.cgi?id=179704

Reviewed by Yusuke Suzuki.

Add feature flag for Async iteration.

* Source/cmake/WebKitFeatures.cmake:

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

3 years agoAdjusted expectations for compositing/repaint/fixed-background-scroll.html.
jlewis3@apple.com [Wed, 15 Nov 2017 18:24:22 +0000 (18:24 +0000)]
Adjusted expectations for compositing/repaint/fixed-background-scroll.html.
https://bugs.webkit.org/show_bug.cgi?id=154612

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

3 years ago[Cairo] Clang warns about mismatched declaration type tag for GraphicsContextState
aperez@igalia.com [Wed, 15 Nov 2017 18:06:05 +0000 (18:06 +0000)]
[Cairo] Clang warns about mismatched declaration type tag for GraphicsContextState
https://bugs.webkit.org/show_bug.cgi?id=179729

Reviewed by Michael Catanzaro.

No new tests needed.

* platform/graphics/cairo/CairoOperations.h: Make the forward declaration use "struct"
as the actual implementation of the type does.

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

3 years ago[Service Workers] Implement Client API
cdumez@apple.com [Wed, 15 Nov 2017 18:00:24 +0000 (18:00 +0000)]
[Service Workers] Implement Client API
https://bugs.webkit.org/show_bug.cgi?id=179709

Reviewed by Alex Christensen.

Source/WebCore:

Implement Client API as per:
- https://w3c.github.io/ServiceWorker/#client-interface

Tests:
http/tests/workers/service/Client-properties.html
http/tests/workers/service/Client-properties-subframe.html
http/tests/workers/service/Client-properties-auxiliary.html

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* workers/service/ServiceWorker.cpp:
(WebCore::ServiceWorker::postMessage):
* workers/service/ServiceWorkerClient.cpp:
(WebCore::ServiceWorkerClient::ServiceWorkerClient):
(WebCore::ServiceWorkerClient::url const):
(WebCore::ServiceWorkerClient::type const):
(WebCore::ServiceWorkerClient::frameType const):
(WebCore::ServiceWorkerClient::id const):
(WebCore::ServiceWorkerClient::postMessage):
* workers/service/ServiceWorkerClient.h:
(WebCore::ServiceWorkerClient::create):
* workers/service/ServiceWorkerClientData.cpp: Copied from Source/WebCore/workers/service/ServiceWorkerWindowClient.cpp.
(WebCore::toServiceWorkerClientFrameType):
(WebCore::ServiceWorkerClientData::isolatedCopy const):
(WebCore::ServiceWorkerClientData::from):
* workers/service/ServiceWorkerClientData.h: Copied from Source/WebCore/workers/service/ServiceWorkerClient.h.
(WebCore::ServiceWorkerClientData::encode const):
(WebCore::ServiceWorkerClientData::decode):
* workers/service/ServiceWorkerClientIdentifier.h:
(WebCore::ServiceWorkerClientIdentifier::encode const):
(WebCore::ServiceWorkerClientIdentifier::decode):
* workers/service/ServiceWorkerTypes.h:
* workers/service/ServiceWorkerWindowClient.cpp:
(WebCore::ServiceWorkerWindowClient::ServiceWorkerWindowClient):
* workers/service/ServiceWorkerWindowClient.h:
* workers/service/context/SWContextManager.cpp:
(WebCore::SWContextManager::postMessageToServiceWorkerGlobalScope):
* workers/service/context/SWContextManager.h:
* workers/service/context/ServiceWorkerThread.cpp:
(WebCore::ServiceWorkerThread::postMessageToServiceWorkerGlobalScope):
* workers/service/context/ServiceWorkerThread.h:
* workers/service/server/SWClientConnection.h:

Source/WebKit:

* Shared/WebCoreArgumentCoders.cpp:
* Shared/WebCoreArgumentCoders.h:
* StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::postMessageToServiceWorkerGlobalScope):
* StorageProcess/ServiceWorker/WebSWServerConnection.h:
* StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
* WebProcess/Storage/WebSWClientConnection.cpp:
(WebKit::WebSWClientConnection::postMessageToServiceWorkerGlobalScope):
* WebProcess/Storage/WebSWClientConnection.h:
* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::postMessageToServiceWorkerGlobalScope):
* WebProcess/Storage/WebSWContextManagerConnection.h:
* WebProcess/Storage/WebSWContextManagerConnection.messages.in:

LayoutTests:

Add layout test coverage.

* http/tests/workers/service/Client-properties-auxiliary-expected.txt: Added.
* http/tests/workers/service/Client-properties-auxiliary.html: Added.
* http/tests/workers/service/Client-properties-expected.txt: Added.
* http/tests/workers/service/Client-properties-subframe-expected.txt: Added.
* http/tests/workers/service/Client-properties-subframe.html: Added.
* http/tests/workers/service/Client-properties.html: Added.
* http/tests/workers/service/resources/Client-properties-worker.js: Added.

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

3 years agoUnreviewed, rolling out r224863.
ryanhaddad@apple.com [Wed, 15 Nov 2017 17:13:25 +0000 (17:13 +0000)]
Unreviewed, rolling out r224863.

Introduced LayoutTest crashes on iOS Simulator.

Reverted changeset:

"Move JSONValues to WTF and convert uses of InspectorValues.h
to JSONValues.h"
https://bugs.webkit.org/show_bug.cgi?id=173793
https://trac.webkit.org/changeset/224863

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

3 years agoRemove access to "com.apple.pbs.fetch_services" from WebContent sandbox
bfulgham@apple.com [Wed, 15 Nov 2017 16:59:52 +0000 (16:59 +0000)]
Remove access to "com.apple.pbs.fetch_services" from WebContent sandbox
https://bugs.webkit.org/show_bug.cgi?id=179689
<rdar://problem/35369172>

Reviewed by Per Arne Vollan.

WebKit's WebContent process should not have any need to interact with the fetch_services
API exposed to the system. These interactions (if needed) should be happening in the UIProcess,
so we should prevent the untrusted Web Content Process from being able to connect.

* WebProcess/com.apple.WebProcess.sb.in:

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

3 years agoRemove GTK web inspector images
mcatanzaro@igalia.com [Wed, 15 Nov 2017 16:56:55 +0000 (16:56 +0000)]
Remove GTK web inspector images
https://bugs.webkit.org/show_bug.cgi?id=179716

Reviewed by Carlos Garcia Campos.

Source/WebInspectorUI:

* Scripts/copy-user-interface-resources.pl:
* UserInterface/Images/gtk/AUTHORS: Removed.
* UserInterface/Images/gtk/ActiveCallFrame.svg: Removed.
* UserInterface/Images/gtk/AnimationPlayStatePaused.svg: Removed.
* UserInterface/Images/gtk/AnimationPlayStateRunning.svg: Removed.
* UserInterface/Images/gtk/ApplicationCache.png: Removed.
* UserInterface/Images/gtk/ApplicationCache@2x.png: Removed.
* UserInterface/Images/gtk/ApplicationCacheManifest.png: Removed.
* UserInterface/Images/gtk/ApplicationCacheManifest@2x.png: Removed.
* UserInterface/Images/gtk/ArrowUp.svg: Removed.
* UserInterface/Images/gtk/Assertion.svg: Removed.
* UserInterface/Images/gtk/BackForwardArrows.svg: Removed.
* UserInterface/Images/gtk/Breakpoint.png: Removed.
* UserInterface/Images/gtk/Breakpoint@2x.png: Removed.
* UserInterface/Images/gtk/BreakpointButton.svg: Removed.
* UserInterface/Images/gtk/BreakpointInactive.png: Removed.
* UserInterface/Images/gtk/BreakpointInactive@2x.png: Removed.
* UserInterface/Images/gtk/BreakpointInactiveButton.svg: Removed.
* UserInterface/Images/gtk/Breakpoints.svg: Removed.
* UserInterface/Images/gtk/COPYING: Removed.
* UserInterface/Images/gtk/COPYING_CCBYSA3: Removed.
* UserInterface/Images/gtk/COPYING_LGPL2: Removed.
* UserInterface/Images/gtk/CSSVariable.svg: Removed.
* UserInterface/Images/gtk/CallTrees.svg: Removed.
* UserInterface/Images/gtk/Canvas.svg: Removed.
* UserInterface/Images/gtk/Canvas2D.svg: Removed.
* UserInterface/Images/gtk/Canvas3D.svg: Removed.
* UserInterface/Images/gtk/CanvasOverview.svg: Removed.
* UserInterface/Images/gtk/Checkers.svg: Removed.
* UserInterface/Images/gtk/Circle.svg: Removed.
* UserInterface/Images/gtk/ClearBoth.svg: Removed.
* UserInterface/Images/gtk/ClearLeft.svg: Removed.
* UserInterface/Images/gtk/ClearRight.svg: Removed.
* UserInterface/Images/gtk/ClippingCSS.png: Removed.
* UserInterface/Images/gtk/ClippingCSS@2x.png: Removed.
* UserInterface/Images/gtk/ClippingCSSLarge.png: Removed.
* UserInterface/Images/gtk/ClippingCSSLarge@2x.png: Removed.
* UserInterface/Images/gtk/ClippingGeneric.png: Removed.
* UserInterface/Images/gtk/ClippingGeneric@2x.png: Removed.
* UserInterface/Images/gtk/ClippingGenericLarge.png: Removed.
* UserInterface/Images/gtk/ClippingGenericLarge@2x.png: Removed.
* UserInterface/Images/gtk/ClippingJS.png: Removed.
* UserInterface/Images/gtk/ClippingJS@2x.png: Removed.
* UserInterface/Images/gtk/ClippingJSLarge.png: Removed.
* UserInterface/Images/gtk/ClippingJSLarge@2x.png: Removed.
* UserInterface/Images/gtk/Close.svg: Removed.
* UserInterface/Images/gtk/CloseLarge.svg: Removed.
* UserInterface/Images/gtk/CloseWhite.svg: Removed.
* UserInterface/Images/gtk/ColorIcon.png: Removed.
* UserInterface/Images/gtk/ColorIcon@2x.png: Removed.
* UserInterface/Images/gtk/Console.svg: Removed.
* UserInterface/Images/gtk/Cookie.png: Removed.
* UserInterface/Images/gtk/Cookie@2x.png: Removed.
* UserInterface/Images/gtk/Crosshair.svg: Removed.
* UserInterface/Images/gtk/CubicBezier.svg: Removed.
* UserInterface/Images/gtk/DOMBreakpoint.svg: Removed.
* UserInterface/Images/gtk/DOMCharacterData.svg: Removed.
* UserInterface/Images/gtk/DOMComment.svg: Removed.
* UserInterface/Images/gtk/DOMDocument.svg: Removed.
* UserInterface/Images/gtk/DOMDocumentType.svg: Removed.
* UserInterface/Images/gtk/DOMElement.svg: Removed.
* UserInterface/Images/gtk/DOMNode.svg: Removed.
* UserInterface/Images/gtk/DOMTextNode.svg: Removed.
* UserInterface/Images/gtk/Database.png: Removed.
* UserInterface/Images/gtk/Database@2x.png: Removed.
* UserInterface/Images/gtk/DatabaseTable.png: Removed.
* UserInterface/Images/gtk/DatabaseTable@2x.png: Removed.
* UserInterface/Images/gtk/Debug.svg: Removed.
* UserInterface/Images/gtk/Debugger.svg: Removed.
* UserInterface/Images/gtk/DisclosureTriangles.svg: Removed.
* UserInterface/Images/gtk/DockBottom.svg: Removed.
* UserInterface/Images/gtk/DockLeft.svg: Removed.
* UserInterface/Images/gtk/DockRight.svg: Removed.
* UserInterface/Images/gtk/DocumentCSS.png: Removed.
* UserInterface/Images/gtk/DocumentCSS@2x.png: Removed.
* UserInterface/Images/gtk/DocumentCSSLarge.png: Removed.
* UserInterface/Images/gtk/DocumentCSSLarge@2x.png: Removed.
* UserInterface/Images/gtk/DocumentFont.png: Removed.
* UserInterface/Images/gtk/DocumentFont@2x.png: Removed.
* UserInterface/Images/gtk/DocumentFontLarge.png: Removed.
* UserInterface/Images/gtk/DocumentFontLarge@2x.png: Removed.
* UserInterface/Images/gtk/DocumentGeneric.png: Removed.
* UserInterface/Images/gtk/DocumentGeneric@2x.png: Removed.
* UserInterface/Images/gtk/DocumentGenericLarge.png: Removed.
* UserInterface/Images/gtk/DocumentGenericLarge@2x.png: Removed.
* UserInterface/Images/gtk/DocumentImage.png: Removed.
* UserInterface/Images/gtk/DocumentImage@2x.png: Removed.
* UserInterface/Images/gtk/DocumentImageLarge.png: Removed.
* UserInterface/Images/gtk/DocumentImageLarge@2x.png: Removed.
* UserInterface/Images/gtk/DocumentJS.png: Removed.
* UserInterface/Images/gtk/DocumentJS@2x.png: Removed.
* UserInterface/Images/gtk/DocumentJSLarge.png: Removed.
* UserInterface/Images/gtk/DocumentJSLarge@2x.png: Removed.
* UserInterface/Images/gtk/DocumentMarkup.png: Removed.
* UserInterface/Images/gtk/DocumentMarkup@2x.png: Removed.
* UserInterface/Images/gtk/DocumentMarkupLarge.png: Removed.
* UserInterface/Images/gtk/DocumentMarkupLarge@2x.png: Removed.
* UserInterface/Images/gtk/DownloadArrow.svg: Removed.
* UserInterface/Images/gtk/Elements.svg: Removed.
* UserInterface/Images/gtk/Error.svg: Removed.
* UserInterface/Images/gtk/Errors.svg: Removed.
* UserInterface/Images/gtk/ErrorsEnabled.svg: Removed.
* UserInterface/Images/gtk/EventListener.svg: Removed.
* UserInterface/Images/gtk/Events.svg: Removed.
* UserInterface/Images/gtk/Exception.svg: Removed.
* UserInterface/Images/gtk/Eye.svg: Removed.
* UserInterface/Images/gtk/FilterFieldActiveGlyph.svg: Removed.
* UserInterface/Images/gtk/FilterFieldGlyph.svg: Removed.
* UserInterface/Images/gtk/FloatLeft.svg: Removed.
* UserInterface/Images/gtk/FloatRight.svg: Removed.
* UserInterface/Images/gtk/FolderGeneric.png: Removed.
* UserInterface/Images/gtk/FolderGeneric@2x.png: Removed.
* UserInterface/Images/gtk/FontStyleItalic.svg: Removed.
* UserInterface/Images/gtk/FontStyleNormal.svg: Removed.
* UserInterface/Images/gtk/Function.svg: Removed.
* UserInterface/Images/gtk/Gear.svg: Removed.
* UserInterface/Images/gtk/GoToArrow.svg: Removed.
* UserInterface/Images/gtk/GradientStop.png: Removed.
* UserInterface/Images/gtk/GradientStop@2x.png: Removed.
* UserInterface/Images/gtk/GradientStopSelected.png: Removed.
* UserInterface/Images/gtk/GradientStopSelected@2x.png: Removed.
* UserInterface/Images/gtk/HeapAllocationsInstrument.svg: Removed.
* UserInterface/Images/gtk/HeapSnapshotObjectGraph.svg: Removed.
* UserInterface/Images/gtk/HierarchicalNavigationItemChevron.svg: Removed.
* UserInterface/Images/gtk/HoverMenuButton.png: Removed.
* UserInterface/Images/gtk/HoverMenuButton@2x.png: Removed.
* UserInterface/Images/gtk/IgnoreCaches.svg: Removed.
* UserInterface/Images/gtk/Image.svg: Removed.
* UserInterface/Images/gtk/IndeterminateProgressSpinner1.svg: Removed.
* UserInterface/Images/gtk/IndeterminateProgressSpinner10.svg: Removed.
* UserInterface/Images/gtk/IndeterminateProgressSpinner11.svg: Removed.
* UserInterface/Images/gtk/IndeterminateProgressSpinner12.svg: Removed.
* UserInterface/Images/gtk/IndeterminateProgressSpinner2.svg: Removed.
* UserInterface/Images/gtk/IndeterminateProgressSpinner3.svg: Removed.
* UserInterface/Images/gtk/IndeterminateProgressSpinner4.svg: Removed.
* UserInterface/Images/gtk/IndeterminateProgressSpinner5.svg: Removed.
* UserInterface/Images/gtk/IndeterminateProgressSpinner6.svg: Removed.
* UserInterface/Images/gtk/IndeterminateProgressSpinner7.svg: Removed.
* UserInterface/Images/gtk/IndeterminateProgressSpinner8.svg: Removed.
* UserInterface/Images/gtk/IndeterminateProgressSpinner9.svg: Removed.
* UserInterface/Images/gtk/Info.svg: Removed.
* UserInterface/Images/gtk/InstructionPointer.png: Removed.
* UserInterface/Images/gtk/InstructionPointer@2x.png: Removed.
* UserInterface/Images/gtk/Issues.svg: Removed.
* UserInterface/Images/gtk/IssuesEnabled.svg: Removed.
* UserInterface/Images/gtk/LayerBorders.svg: Removed.
* UserInterface/Images/gtk/Layers.svg: Removed.
* UserInterface/Images/gtk/LayoutInstrument.svg: Removed.
* UserInterface/Images/gtk/ListStylePositionInside.svg: Removed.
* UserInterface/Images/gtk/ListStylePositionOutside.svg: Removed.
* UserInterface/Images/gtk/LocalStorage.png: Removed.
* UserInterface/Images/gtk/LocalStorage@2x.png: Removed.
* UserInterface/Images/gtk/Locked.svg: Removed.
* UserInterface/Images/gtk/Log.svg: Removed.
* UserInterface/Images/gtk/Logs.svg: Removed.
* UserInterface/Images/gtk/MemoryInstrument.svg: Removed.
* UserInterface/Images/gtk/Minus.svg: Removed.
* UserInterface/Images/gtk/Native.svg: Removed.
* UserInterface/Images/gtk/NavigationItemCheckers.svg: Removed.
* UserInterface/Images/gtk/NavigationItemCodeCoverage.svg: Removed.
* UserInterface/Images/gtk/NavigationItemCurleyBraces.svg: Removed.
* UserInterface/Images/gtk/NavigationItemGarbageCollect.svg: Removed.
* UserInterface/Images/gtk/NavigationItemTrash.svg: Removed.
* UserInterface/Images/gtk/NavigationItemTypes.svg: Removed.
* UserInterface/Images/gtk/Network.svg: Removed.
* UserInterface/Images/gtk/NetworkInstrument.svg: Removed.
* UserInterface/Images/gtk/NewTab.svg: Removed.
* UserInterface/Images/gtk/NewTabPlus.svg: Removed.
* UserInterface/Images/gtk/Paint.svg: Removed.
* UserInterface/Images/gtk/Path.svg: Removed.
* UserInterface/Images/gtk/Pause.svg: Removed.
* UserInterface/Images/gtk/PausedBreakpoint.svg: Removed.
* UserInterface/Images/gtk/Pencil.svg: Removed.
* UserInterface/Images/gtk/Plus13.svg: Removed.
* UserInterface/Images/gtk/Plus15.svg: Removed.
* UserInterface/Images/gtk/Printer.svg: Removed.
* UserInterface/Images/gtk/Program.svg: Removed.
* UserInterface/Images/gtk/PseudoElement.svg: Removed.
* UserInterface/Images/gtk/Receiving.svg: Removed.
* UserInterface/Images/gtk/Record.svg: Removed.
* UserInterface/Images/gtk/Recording.svg: Removed.
* UserInterface/Images/gtk/Reflection.svg: Removed.
* UserInterface/Images/gtk/ReloadFull.svg: Removed.
* UserInterface/Images/gtk/ReloadToolbar.svg: Removed.
* UserInterface/Images/gtk/RenderingFrame.svg: Removed.
* UserInterface/Images/gtk/RenderingFramesInstrument.svg: Removed.
* UserInterface/Images/gtk/Request.svg: Removed.
* UserInterface/Images/gtk/Resources.svg: Removed.
* UserInterface/Images/gtk/Response.svg: Removed.
* UserInterface/Images/gtk/ResultLine.svg: Removed.
* UserInterface/Images/gtk/Resume.svg: Removed.
* UserInterface/Images/gtk/ScriptsInstrument.svg: Removed.
* UserInterface/Images/gtk/Search.svg: Removed.
* UserInterface/Images/gtk/SearchResults.svg: Removed.
* UserInterface/Images/gtk/Sending.svg: Removed.
* UserInterface/Images/gtk/SessionStorage.png: Removed.
* UserInterface/Images/gtk/SessionStorage@2x.png: Removed.
* UserInterface/Images/gtk/ShadowDOM.svg: Removed.
* UserInterface/Images/gtk/SliderThumb.png: Removed.
* UserInterface/Images/gtk/SliderThumb@2x.png: Removed.
* UserInterface/Images/gtk/SliderThumbPressed.png: Removed.
* UserInterface/Images/gtk/SliderThumbPressed@2x.png: Removed.
* UserInterface/Images/gtk/SortIndicatorArrows.svg: Removed.
* UserInterface/Images/gtk/Source.svg: Removed.
* UserInterface/Images/gtk/SplitToggleUp.svg: Removed.
* UserInterface/Images/gtk/StepInto.svg: Removed.
* UserInterface/Images/gtk/StepOut.svg: Removed.
* UserInterface/Images/gtk/StepOver.svg: Removed.
* UserInterface/Images/gtk/Stop.svg: Removed.
* UserInterface/Images/gtk/Stopwatch.svg: Removed.
* UserInterface/Images/gtk/Storage.svg: Removed.
* UserInterface/Images/gtk/StyleRule.svg: Removed.
* UserInterface/Images/gtk/StyleRuleInheritedElement.svg: Removed.
* UserInterface/Images/gtk/StyleRulePseudoElement.svg: Removed.
* UserInterface/Images/gtk/TailDeletedFunction.svg: Removed.
* UserInterface/Images/gtk/TextAlignCenter.svg: Removed.
* UserInterface/Images/gtk/TextAlignJustify.svg: Removed.
* UserInterface/Images/gtk/TextAlignLeft.svg: Removed.
* UserInterface/Images/gtk/TextAlignRight.svg: Removed.
* UserInterface/Images/gtk/TextDecorationLineThrough.svg: Removed.
* UserInterface/Images/gtk/TextDecorationOverline.svg: Removed.
* UserInterface/Images/gtk/TextDecorationUnderline.svg: Removed.
* UserInterface/Images/gtk/TextTransformCapitalize.svg: Removed.
* UserInterface/Images/gtk/TextTransformLowercase.svg: Removed.
* UserInterface/Images/gtk/TextTransformUppercase.svg: Removed.
* UserInterface/Images/gtk/Thread.svg: Removed.
* UserInterface/Images/gtk/Time.svg: Removed.
* UserInterface/Images/gtk/Timeline.svg: Removed.
* UserInterface/Images/gtk/TimelineRecordAPI.svg: Removed.
* UserInterface/Images/gtk/TimelineRecordAnimation.svg: Removed.
* UserInterface/Images/gtk/TimelineRecordComposite.svg: Removed.
* UserInterface/Images/gtk/TimelineRecordConsoleProfile.svg: Removed.
* UserInterface/Images/gtk/TimelineRecordEvent.svg: Removed.
* UserInterface/Images/gtk/TimelineRecordLayout.svg: Removed.
* UserInterface/Images/gtk/TimelineRecordPaint.svg: Removed.
* UserInterface/Images/gtk/TimelineRecordProbeSampled.svg: Removed.
* UserInterface/Images/gtk/TimelineRecordScriptEvaluated.svg: Removed.
* UserInterface/Images/gtk/TimelineRecordStyle.svg: Removed.
* UserInterface/Images/gtk/TimelineRecordTimer.svg: Removed.
* UserInterface/Images/gtk/ToggleLeftSidebar.svg: Removed.
* UserInterface/Images/gtk/ToggleRightSidebar.svg: Removed.
* UserInterface/Images/gtk/TypeBoolean.svg: Removed.
* UserInterface/Images/gtk/TypeNull.svg: Removed.
* UserInterface/Images/gtk/TypeNumber.svg: Removed.
* UserInterface/Images/gtk/TypeObject.svg: Removed.
* UserInterface/Images/gtk/TypeRegex.svg: Removed.
* UserInterface/Images/gtk/TypeString.svg: Removed.
* UserInterface/Images/gtk/TypeSymbol.svg: Removed.
* UserInterface/Images/gtk/TypeUndefined.svg: Removed.
* UserInterface/Images/gtk/Undock.svg: Removed.
* UserInterface/Images/gtk/UpDownArrows.svg: Removed.
* UserInterface/Images/gtk/UserInputPrompt.svg: Removed.
* UserInterface/Images/gtk/UserInputPromptPrevious.svg: Removed.
* UserInterface/Images/gtk/UserInputResult.svg: Removed.
* UserInterface/Images/gtk/VisualStyleNone.svg: Removed.
* UserInterface/Images/gtk/VisualStylePropertyLinked.svg: Removed.
* UserInterface/Images/gtk/VisualStylePropertyUnlinked.svg: Removed.
* UserInterface/Images/gtk/Warning.svg: Removed.
* UserInterface/Images/gtk/WebSocket.png: Removed.
* UserInterface/Images/gtk/WebSocket@2x.png: Removed.
* UserInterface/Images/gtk/WebSocketLarge.png: Removed.
* UserInterface/Images/gtk/WebSocketLarge@2x.png: Removed.
* UserInterface/Images/gtk/Weight.svg: Removed.
* UserInterface/Images/gtk/WorkerScript.png: Removed.
* UserInterface/Images/gtk/WorkerScript@2x.png: Removed.
* UserInterface/Images/gtk/WorkerScriptLarge.png: Removed.
* UserInterface/Images/gtk/WorkerScriptLarge@2x.png: Removed.

Source/WebKit:

* InspectorGResources.cmake:

Tools:

* Scripts/webkitdirs.pm:
(shouldRemoveCMakeCache):
* glib/generate-inspector-gresource-manifest.py:
(get_filenames.should_ignore_resource):
* gtk/manifest.txt.in:
* wpe/manifest.txt.in:

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

3 years agoRemove service worker selection based on registration
commit-queue@webkit.org [Wed, 15 Nov 2017 16:24:31 +0000 (16:24 +0000)]
Remove service worker selection based on registration
https://bugs.webkit.org/show_bug.cgi?id=179705

Patch by Youenn Fablet <youenn@apple.com> on 2017-11-15
Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* web-platform-tests/service-workers/service-worker/controller-on-reload.https-expected.txt:

Source/WebCore:

Covered by updated tests.

Selection is now handled at navigation time.
We can remove the selection/unselection of worker based on registration.

* workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::jobResolvedWithUnregistrationResult):
* workers/service/ServiceWorkerRegistration.cpp:
(WebCore::ServiceWorkerRegistration::ServiceWorkerRegistration):

LayoutTests:

Updating tests to use actual selected frames.

* http/tests/inspector/network/resource-response-service-worker.html:
* http/tests/inspector/network/resources/fetch-service-worker.js:
* http/tests/workers/service/ServiceWorkerGlobalScope-properties.html:
* http/tests/workers/service/basic-fetch.https-expected.txt:
* http/tests/workers/service/cors-image-fetch-expected.txt:
* http/tests/workers/service/cors-image-fetch.html:
* http/tests/workers/service/image-fetch-expected.txt:
* http/tests/workers/service/resources/basic-ServiceWorker-postMessage.js:
(then):
* http/tests/workers/service/resources/basic-fetch-worker.js:
* http/tests/workers/service/resources/basic-fetch.js:
(async.test):
* http/tests/workers/service/resources/cors-image-fetch.js:
(async.test):
(async.loadedImage): Deleted.
(async.erroredImage): Deleted.
(async.logStatus): Deleted.
* http/tests/workers/service/resources/cors-image-fetch-iframe.html: Added.
* http/tests/workers/service/resources/image-fetch.js:
(async.test):
(done): Deleted.
(async.loadedImage): Deleted.
(async.erroredImage): Deleted.
(async.logStatus): Deleted.
* http/tests/workers/service/resources/service-worker-crossorigin-fetch.js:
(async.test):
(done): Deleted.
(async.logStatus): Deleted.
* http/tests/workers/service/resources/service-worker-fetch.js:
(async.test):
(done): Deleted.
(async.logStatus): Deleted.
* http/tests/workers/service/resources/service-worker-importScript.js:
(async.test):
(async.logStatus): Deleted.
* http/tests/workers/service/resources/sw-test-pre.js:
(async.interceptedFrame):
* http/tests/workers/service/resources/tainted-image-fetch.js:
(async.test):
(async.loadedImage): Deleted.
(async.erroredImage): Deleted.
(async.logStatus): Deleted.
* http/tests/workers/service/service-worker-fetch.https-expected.txt:
* http/tests/workers/service/tainted-image-fetch-expected.txt:

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

3 years agoREGRESSION(r221877): 'future' handled incorrectly for mac
jbedard@apple.com [Wed, 15 Nov 2017 16:17:47 +0000 (16:17 +0000)]
REGRESSION(r221877): 'future' handled incorrectly for mac
https://bugs.webkit.org/show_bug.cgi?id=179711
<rdar://problem/35546604>

Reviewed by Alex Christensen.

* Scripts/webkitpy/port/mac.py:
(MacPort.default_baseline_search_path): Use platform/mac-<version> instead of
platform/<version> as the baseline search path.

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

3 years ago[GTK][WPE] Unreviewed test gardening
Ms2ger@igalia.com [Wed, 15 Nov 2017 13:26:52 +0000 (13:26 +0000)]
[GTK][WPE] Unreviewed test gardening
https://bugs.webkit.org/show_bug.cgi?id=179726

Unreviewed test gardening.

* platform/gtk/TestExpectations: Add new expectations.
* platform/gtk/fast/events/input-events-paste-rich-datatransfer-expected.txt:
  Rebaseline for bug 179431.
* platform/gtk/js/dom/dom-static-property-for-in-iteration-expected.txt:
  Rebaseline for ​bug 179494.
* platform/wpe/TestExpectations: Remove expectations that were redundant
  with other (more correct) expectations in the same file, or with the
  new expectation file.
* platform/wpe/fast/workers/WorkerGlobalScope-properties-prototype-expected.txt:
  Removed: bug 179094 improved the results and made them match the
  platform-neutral expectation file.
* platform/wpe/fast/workers/self-hasOwnProperty-expected.txt:
  Removed: bug 179094 improved the results and made them match the
  platform-neutral expectation file.
* platform/wpe/http/tests/uri/css-href-expected.txt: Added: missing baseline.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/encrypted-media-default-feature-policy.https.sub-expected.txt:
  Rebaseline to make the test useful as a regression test.
* platform/wpe/js/dom/dom-static-property-for-in-iteration-expected.txt:
  Rebaseline for ​bug 179494.

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

3 years ago[Cairo] GraphicsContext::setPlatformShadow() has to update state's shadow offset...
zandobersek@gmail.com [Wed, 15 Nov 2017 13:00:19 +0000 (13:00 +0000)]
[Cairo] GraphicsContext::setPlatformShadow() has to update state's shadow offset when ignoring transforms
https://bugs.webkit.org/show_bug.cgi?id=179725

Reviewed by Carlos Garcia Campos.

In r224753, GraphicsContext::setPlatformShadow() stopped updating the
shadow offset value that's kept in GraphicsContextState. This regressed
a few tests, so the adjustment of the shadow offset value in the
GraphicsContext state is brought back.

* platform/graphics/cairo/CairoOperations.cpp:
(WebCore::Cairo::State::setShadowValues):
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::setPlatformShadow):

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

3 years ago[GTK] Automatically adjust font size when gtk-xft-dpi changes
commit-queue@webkit.org [Wed, 15 Nov 2017 12:06:43 +0000 (12:06 +0000)]
[GTK] Automatically adjust font size when gtk-xft-dpi changes
https://bugs.webkit.org/show_bug.cgi?id=142673

Some follow-up fixes for the previous patch.

Patch by Gabriel Ivascu <givascu@igalia.com> on 2017-11-15
Reviewed by Carlos Garcia Campos.

Source/WebCore:

* platform/PlatformScreen.h:
* platform/gtk/PlatformScreenGtk.cpp:
(WebCore::screenDPIObserverHandlersMap):
(WebCore::gtkXftDPIChangedCallback):
(WebCore::setScreenDPIObserverHandler):
* platform/wpe/PlatformScreenWPE.cpp:
(WebCore::setScreenDPIObserverHandler):

Source/WebKit:

* UIProcess/API/glib/WebKitSettings.cpp:
(webKitSettingsDispose):
(webKitSettingsConstructed):

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

3 years agoAX: AOM: Implement AccessibleNode class and support label and role attributes
n_wang@apple.com [Wed, 15 Nov 2017 07:56:04 +0000 (07:56 +0000)]
AX: AOM: Implement AccessibleNode class and support label and role attributes
https://bugs.webkit.org/show_bug.cgi?id=179494

Reviewed by Ryosuke Niwa.

Source/WebCore:

Accessibility Object Model
Explainer: https://wicg.github.io/aom/explainer.html
Spec: https://wicg.github.io/aom/spec/

This change adds an accessibleNode getter on Element, and implements
the role and label properties of AccessibleNode.

In existing accessibility code, places where we previously retrieve an
ARIA attribute are replaced with a new function that first checks the
AOM property and then checks the equivalent ARIA attribute.

Test: accessibility/accessibility-object-model.html

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AXObjectCache.cpp:
(WebCore::nodeHasRole):
(WebCore::AXObjectCache::handleLiveRegionCreated):
* accessibility/AccessibilityAllInOne.cpp:
* accessibility/AccessibilityImageMapLink.cpp:
(WebCore::AccessibilityImageMapLink::roleValue const):
(WebCore::AccessibilityImageMapLink::accessibilityDescription const):
* accessibility/AccessibilityListBoxOption.cpp:
(WebCore::AccessibilityListBoxOption::stringValue const):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::ariaAccessibilityDescription const):
(WebCore::siblingWithAriaRole):
(WebCore::AccessibilityNodeObject::textForLabelElement const):
(WebCore::AccessibilityNodeObject::alternativeText const):
(WebCore::AccessibilityNodeObject::alternativeTextForWebArea const):
(WebCore::AccessibilityNodeObject::stringValue const):
(WebCore::accessibleNameForNode):
(WebCore::AccessibilityNodeObject::determineAriaRoleAttribute const):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::hasProperty const):
(WebCore::AccessibilityObject::stringValueForProperty const):
(WebCore::AccessibilityObject::supportsARIAAttributes const):
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::stringValue const):
(WebCore::AccessibilityRenderObject::exposesTitleUIElement const):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* accessibility/AccessibleNode.cpp: Added.
(WebCore::ariaAttributeMap):
(WebCore::isPropertyValueString):
(WebCore::AccessibleNode::hasProperty):
(WebCore::AccessibleNode::valueForProperty):
(WebCore::AccessibleNode::effectiveStringValueForElement):
(WebCore::AccessibleNode::stringValueForProperty):
(WebCore::AccessibleNode::setStringProperty):
(WebCore::AccessibleNode::role const):
(WebCore::AccessibleNode::setRole):
(WebCore::AccessibleNode::label const):
(WebCore::AccessibleNode::setLabel):
* accessibility/AccessibleNode.h: Added.
(WebCore::AXPropertyHashTraits::emptyValue):
(WebCore::AXPropertyHashTraits::constructDeletedValue):
(WebCore::AXPropertyHashTraits::isDeletedValue):
(WebCore::AccessibleNode::AccessibleNode):
(WebCore::AccessibleNode::ref):
(WebCore::AccessibleNode::deref):
* accessibility/AccessibleNode.idl: Added.
* bindings/js/WebCoreBuiltinNames.h:
* dom/Element.cpp:
(WebCore::Element::canContainRangeEndPoint const):
(WebCore::Element::accessibleNode):
(WebCore::Element::existingAccessibleNode const):
* dom/Element.h:
* dom/Element.idl:
* dom/ElementRareData.cpp:
* dom/ElementRareData.h:
(WebCore::ElementRareData::accessibleNode const):
(WebCore::ElementRareData::setAccessibleNode):
* editing/TextIterator.cpp:
(WebCore::isRendererReplacedElement):
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setAccessibilityObjectModelEnabled):
(WebCore::RuntimeEnabledFeatures::accessibilityObjectModelEnabled const):
* rendering/RenderMenuList.cpp:
(RenderMenuList::itemAccessibilityText const):

Source/WebKit:

* Shared/WebPreferences.yaml:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetAccessibilityObjectModelEnabled):
(WKPreferencesGetAccessibilityObjectModelEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:

Source/WebKitLegacy/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences accessibilityObjectModelEnabled]):
(-[WebPreferences setAccessibilityObjectModelEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):

LayoutTests:

* accessibility/accessibility-object-model-expected.txt: Added.
* accessibility/accessibility-object-model.html: Added.
* js/dom/dom-static-property-for-in-iteration-expected.txt:

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

3 years ago[Cairo] Add GraphicsContextImplCairo stub
zandobersek@gmail.com [Wed, 15 Nov 2017 06:08:44 +0000 (06:08 +0000)]
[Cairo] Add GraphicsContextImplCairo stub
https://bugs.webkit.org/show_bug.cgi?id=179658

Reviewed by Carlos Garcia Campos.

Add the GraphicsContextImplCairo class, which at this point is still
an empty implementation of the GraphicsContextImpl interface. Plan for
the near future is to start mapping method invocations to CairoOperation
functions, essentially mirroring what the Cairo-specific GraphicsContext
methods do today.

In the future this implementation would hopefully allow us to apply a
recorded list of GraphicsContext commands against a PlatformContextCairo
instance.

* platform/SourcesCairo.txt:
* platform/graphics/cairo/GraphicsContextImplCairo.cpp: Added.
(WebCore::GraphicsContextImplCairo::GraphicsContextImplCairo):
(WebCore::m_platformContext):
(WebCore::GraphicsContextImplCairo::updateState):
(WebCore::GraphicsContextImplCairo::clearShadow):
(WebCore::GraphicsContextImplCairo::setLineCap):
(WebCore::GraphicsContextImplCairo::setLineDash):
(WebCore::GraphicsContextImplCairo::setLineJoin):
(WebCore::GraphicsContextImplCairo::setMiterLimit):
(WebCore::GraphicsContextImplCairo::fillRect):
(WebCore::GraphicsContextImplCairo::fillRoundedRect):
(WebCore::GraphicsContextImplCairo::fillRectWithRoundedHole):
(WebCore::GraphicsContextImplCairo::fillPath):
(WebCore::GraphicsContextImplCairo::fillEllipse):
(WebCore::GraphicsContextImplCairo::strokeRect):
(WebCore::GraphicsContextImplCairo::strokePath):
(WebCore::GraphicsContextImplCairo::strokeEllipse):
(WebCore::GraphicsContextImplCairo::clearRect):
(WebCore::GraphicsContextImplCairo::drawGlyphs):
(WebCore::GraphicsContextImplCairo::drawImage):
(WebCore::GraphicsContextImplCairo::drawTiledImage):
(WebCore::GraphicsContextImplCairo::drawNativeImage):
(WebCore::GraphicsContextImplCairo::drawPattern):
(WebCore::GraphicsContextImplCairo::drawRect):
(WebCore::GraphicsContextImplCairo::drawLine):
(WebCore::GraphicsContextImplCairo::drawLinesForText):
(WebCore::GraphicsContextImplCairo::drawLineForDocumentMarker):
(WebCore::GraphicsContextImplCairo::drawEllipse):
(WebCore::GraphicsContextImplCairo::drawPath):
(WebCore::GraphicsContextImplCairo::drawFocusRing):
(WebCore::GraphicsContextImplCairo::save):
(WebCore::GraphicsContextImplCairo::restore):
(WebCore::GraphicsContextImplCairo::translate):
(WebCore::GraphicsContextImplCairo::rotate):
(WebCore::GraphicsContextImplCairo::scale):
(WebCore::GraphicsContextImplCairo::concatCTM):
(WebCore::GraphicsContextImplCairo::beginTransparencyLayer):
(WebCore::GraphicsContextImplCairo::endTransparencyLayer):
(WebCore::GraphicsContextImplCairo::clip):
(WebCore::GraphicsContextImplCairo::clipOut):
(WebCore::GraphicsContextImplCairo::clipPath):
(WebCore::GraphicsContextImplCairo::applyDeviceScaleFactor):
* platform/graphics/cairo/GraphicsContextImplCairo.h: Added.

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

3 years ago[Cairo] Clean up CairoOperations, GradientCairo, GraphicsContextCairo implementation...
zandobersek@gmail.com [Wed, 15 Nov 2017 06:05:11 +0000 (06:05 +0000)]
[Cairo] Clean up CairoOperations, GradientCairo, GraphicsContextCairo implementation files
https://bugs.webkit.org/show_bug.cgi?id=179679

Reviewed by Michael Catanzaro.

Clean up random tidbits in the CairoOperations, GradientCairo and
GraphicsContextCairo implementation files that I've been ravaging
through over the last few days.

No new tests -- no change in behavior.

* platform/graphics/cairo/CairoOperations.cpp:
Add a missing <algorithms> include, drop an unnecessary empty line.
(WebCore::Cairo::drawLine):
* platform/graphics/cairo/GradientCairo.cpp:
Add a missing CairoOperations.h include.
* platform/graphics/cairo/GraphicsContextCairo.cpp:
Drop unnecessary includes and a bunch of redundant helper functions.
(WebCore::GraphicsContext::drawLineForText):
Inline the DashArray object construction into the relay call.
(WebCore::GraphicsContext::drawLinesForText):
size_t can't be negative, so just check for DashArray being empty.
(WebCore::fillRectWithColor): Deleted.
(): Deleted.
(WebCore::drawPathShadow): Deleted.
(WebCore::fillCurrentCairoPath): Deleted.
(WebCore::shadowAndFillCurrentCairoPath): Deleted.
(WebCore::shadowAndStrokeCurrentCairoPath): Deleted.

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

3 years agoGardening: CLoop build fix after r224862.
mark.lam@apple.com [Wed, 15 Nov 2017 05:21:25 +0000 (05:21 +0000)]
Gardening: CLoop build fix after r224862.
https://bugs.webkit.org/show_bug.cgi?id=179699

Not reviewed..

* bytecode/CodeBlock.h:
(JSC::CodeBlock::calleeSaveSpaceAsVirtualRegisters):

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

3 years agoUnreviewed, another attempt to fix builds after r224707
mcatanzaro@igalia.com [Wed, 15 Nov 2017 04:09:51 +0000 (04:09 +0000)]
Unreviewed, another attempt to fix builds after r224707
https://bugs.webkit.org/show_bug.cgi?id=179499
<rdar://problem/35445033>

* PlatformWin.cmake:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:

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

3 years ago[Windows] Fix error while launching subprocess on Windows Python
commit-queue@webkit.org [Wed, 15 Nov 2017 03:46:12 +0000 (03:46 +0000)]
[Windows] Fix error while launching subprocess on Windows Python
https://bugs.webkit.org/show_bug.cgi?id=179637

Patch by Basuke Suzuki <Basuke.Suzuki@sony.com> on 2017-11-14
Reviewed by Alex Christensen.

To pass environment variables to subprocess.popen on Windows Python 2,
the dict values must be str not unicode.
Also is_native_win() method is added to port.

* Scripts/webkitpy/common/system/platforminfo.py:
(PlatformInfo.is_native_win):
* Scripts/webkitpy/common/system/platforminfo_mock.py:
(MockPlatformInfo.is_native_win):
* Scripts/webkitpy/common/system/platforminfo_unittest.py:
(TestPlatformInfo.test_os_name_and_wrappers):
* Scripts/webkitpy/port/server_process.py:
(ServerProcess.__init__):

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

3 years agoUnreviewed, rolling out r224860.
ryanhaddad@apple.com [Wed, 15 Nov 2017 01:25:26 +0000 (01:25 +0000)]
Unreviewed, rolling out r224860.

This change broke the macOS and iOS builds.

Reverted changeset:

"Unreviewed, fix CMake debug builds after r224707"
https://bugs.webkit.org/show_bug.cgi?id=179499
https://trac.webkit.org/changeset/224860

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

3 years agoMedia query with :host inside a custom elements doesn't get updated on window resize
antti@apple.com [Wed, 15 Nov 2017 01:15:21 +0000 (01:15 +0000)]
Media query with :host inside a custom elements doesn't get updated on window resize
https://bugs.webkit.org/show_bug.cgi?id=176101
<rdar://problem/34163850>

Reviewed by Simon Fraser.

Source/WebCore:

If a media query containing :host or ::slotted stops applying we fail to update the style.

* style/StyleScope.cpp:
(WebCore::Style::invalidateHostAndSlottedStyleIfNeeded):

    Factor into function.

(WebCore::Style::Scope::updateActiveStyleSheets):
(WebCore::Style::Scope::scheduleUpdate):

    Invalidate elements that may match :host and ::slotted before clearing style resolver for full update.

LayoutTests:

Expand the existing test case to cover :host and ::slotted.

* fast/shadow-dom/media-query-in-shadow-style-expected.html:
* fast/shadow-dom/resources/media-query-in-shadow-style-frame.html:

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

3 years agoMove JSONValues to WTF and convert uses of InspectorValues.h to JSONValues.h
bburg@apple.com [Wed, 15 Nov 2017 00:43:32 +0000 (00:43 +0000)]
Move JSONValues to WTF and convert uses of InspectorValues.h to JSONValues.h
https://bugs.webkit.org/show_bug.cgi?id=173793

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2017-11-14
Reviewed by Brian Burg.

Source/JavaScriptCore:

Based on patch by Brian Burg.

* JavaScriptCore.xcodeproj/project.pbxproj:
* Sources.txt:
* bindings/ScriptValue.cpp:
(Inspector::jsToInspectorValue):
(Inspector::toInspectorValue):
(Deprecated::ScriptValue::toInspectorValue const):
* bindings/ScriptValue.h:
* inspector/AsyncStackTrace.cpp:
* inspector/ConsoleMessage.cpp:
* inspector/ContentSearchUtilities.cpp:
* inspector/InjectedScript.cpp:
(Inspector::InjectedScript::getFunctionDetails):
(Inspector::InjectedScript::functionDetails):
(Inspector::InjectedScript::getPreview):
(Inspector::InjectedScript::getProperties):
(Inspector::InjectedScript::getDisplayableProperties):
(Inspector::InjectedScript::getInternalProperties):
(Inspector::InjectedScript::getCollectionEntries):
(Inspector::InjectedScript::saveResult):
(Inspector::InjectedScript::wrapCallFrames const):
(Inspector::InjectedScript::wrapObject const):
(Inspector::InjectedScript::wrapTable const):
(Inspector::InjectedScript::previewValue const):
(Inspector::InjectedScript::setExceptionValue):
(Inspector::InjectedScript::clearExceptionValue):
(Inspector::InjectedScript::inspectObject):
(Inspector::InjectedScript::releaseObject):
* inspector/InjectedScriptBase.cpp:
(Inspector::InjectedScriptBase::makeCall):
(Inspector::InjectedScriptBase::makeEvalCall):
* inspector/InjectedScriptBase.h:
* inspector/InjectedScriptManager.cpp:
(Inspector::InjectedScriptManager::injectedScriptForObjectId):
* inspector/InspectorBackendDispatcher.cpp:
(Inspector::BackendDispatcher::CallbackBase::sendSuccess):
(Inspector::BackendDispatcher::dispatch):
(Inspector::BackendDispatcher::sendResponse):
(Inspector::BackendDispatcher::sendPendingErrors):
(Inspector::BackendDispatcher::getPropertyValue):
(Inspector::castToInteger):
(Inspector::castToNumber):
(Inspector::BackendDispatcher::getInteger):
(Inspector::BackendDispatcher::getDouble):
(Inspector::BackendDispatcher::getString):
(Inspector::BackendDispatcher::getBoolean):
(Inspector::BackendDispatcher::getObject):
(Inspector::BackendDispatcher::getArray):
(Inspector::BackendDispatcher::getValue):
* inspector/InspectorBackendDispatcher.h:
* inspector/InspectorProtocolTypes.h:
(Inspector::Protocol::Array::openAccessors):
(Inspector::Protocol::PrimitiveBindingTraits::assertValueHasExpectedType):
(Inspector::Protocol::BindingTraits<Protocol::Array<T>>::runtimeCast):
(Inspector::Protocol::BindingTraits<Protocol::Array<T>>::assertValueHasExpectedType):
(Inspector::Protocol::BindingTraits<JSON::Value>::assertValueHasExpectedType):
* inspector/ScriptCallFrame.cpp:
* inspector/ScriptCallStack.cpp:
* inspector/agents/InspectorAgent.cpp:
(Inspector::InspectorAgent::inspect):
* inspector/agents/InspectorAgent.h:
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::buildAssertPauseReason):
(Inspector::buildCSPViolationPauseReason):
(Inspector::InspectorDebuggerAgent::buildBreakpointPauseReason):
(Inspector::InspectorDebuggerAgent::buildExceptionPauseReason):
(Inspector::buildObjectForBreakpointCookie):
(Inspector::InspectorDebuggerAgent::breakpointActionsFromProtocol):
(Inspector::parseLocation):
(Inspector::InspectorDebuggerAgent::setBreakpointByUrl):
(Inspector::InspectorDebuggerAgent::setBreakpoint):
(Inspector::InspectorDebuggerAgent::continueToLocation):
(Inspector::InspectorDebuggerAgent::schedulePauseOnNextStatement):
(Inspector::InspectorDebuggerAgent::didParseSource):
(Inspector::InspectorDebuggerAgent::breakProgram):
* inspector/agents/InspectorDebuggerAgent.h:
* inspector/agents/InspectorRuntimeAgent.cpp:
(Inspector::InspectorRuntimeAgent::callFunctionOn):
(Inspector::InspectorRuntimeAgent::saveResult):
(Inspector::InspectorRuntimeAgent::getRuntimeTypesForVariablesAtOffsets):
* inspector/agents/InspectorRuntimeAgent.h:
* inspector/scripts/codegen/generate_cpp_backend_dispatcher_header.py:
(CppBackendDispatcherHeaderGenerator._generate_dispatcher_declaration_for_command):
* inspector/scripts/codegen/generate_cpp_backend_dispatcher_implementation.py:
(CppBackendDispatcherImplementationGenerator.generate_output):
(CppBackendDispatcherImplementationGenerator._generate_dispatcher_implementation_for_command):
* inspector/scripts/codegen/generate_cpp_frontend_dispatcher_header.py:
(CppFrontendDispatcherHeaderGenerator.generate_output):
* inspector/scripts/codegen/generate_cpp_frontend_dispatcher_implementation.py:
(CppFrontendDispatcherImplementationGenerator._generate_dispatcher_implementation_for_event):
* inspector/scripts/codegen/generate_cpp_protocol_types_header.py:
(_generate_unchecked_setter_for_member):
* inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py:
(CppProtocolTypesImplementationGenerator):
* inspector/scripts/codegen/generate_objc_backend_dispatcher_implementation.py:
(ObjCBackendDispatcherImplementationGenerator.generate_output):
(ObjCBackendDispatcherImplementationGenerator._generate_success_block_for_command):
* inspector/scripts/codegen/generate_objc_frontend_dispatcher_implementation.py:
(ObjCFrontendDispatcherImplementationGenerator.generate_output):
(ObjCFrontendDispatcherImplementationGenerator._generate_event):
(ObjCFrontendDispatcherImplementationGenerator._generate_event_out_parameters):
* inspector/scripts/codegen/generate_objc_internal_header.py:
(ObjCInternalHeaderGenerator.generate_output):
* inspector/scripts/codegen/generate_objc_protocol_types_implementation.py:
(ObjCProtocolTypesImplementationGenerator.generate_output):
* inspector/scripts/codegen/generator.py:
* inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result:
* inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result:
* inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result:
* inspector/scripts/tests/generic/expected/definitions-with-mac-platform.json-result:
* inspector/scripts/tests/generic/expected/domain-availability.json-result:
* inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result:
* inspector/scripts/tests/generic/expected/enum-values.json-result:
* inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result:
* inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result:
* inspector/scripts/tests/generic/expected/same-type-id-different-domain.json-result:
* inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result:
* inspector/scripts/tests/generic/expected/type-declaration-aliased-primitive-type.json-result:
* inspector/scripts/tests/generic/expected/type-declaration-array-type.json-result:
* inspector/scripts/tests/generic/expected/type-declaration-enum-type.json-result:
* inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result:
* inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result:
* inspector/scripts/tests/generic/expected/type-with-open-parameters.json-result:
* inspector/scripts/tests/generic/expected/worker-supported-domains.json-result:
* inspector/scripts/tests/ios/expected/definitions-with-mac-platform.json-result:
* inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result:

Source/WebCore:

Based on patch by Brian Burg.

* ForwardingHeaders/inspector/InspectorValues.h: Removed.
* Modules/encryptedmedia/InitDataRegistry.cpp:
(WebCore::extractKeyIDsKeyids):
(WebCore::sanitizeKeyids):
* html/parser/XSSAuditorDelegate.cpp:
(WebCore::XSSAuditorDelegate::generateViolationReport):
* inspector/CommandLineAPIHost.cpp:
(WebCore::CommandLineAPIHost::inspect):
* inspector/CommandLineAPIHost.h:
* inspector/InspectorCanvas.cpp:
(WebCore::InspectorCanvas::recordAction):
(WebCore::InspectorCanvas::releaseData):
(WebCore::InspectorCanvas::indexForData):
(WebCore::buildArrayForVector):
(WebCore::InspectorCanvas::buildInitialState):
(WebCore::InspectorCanvas::buildAction):
(WebCore::InspectorCanvas::buildArrayForCanvasGradient):
(WebCore::InspectorCanvas::buildArrayForCanvasPattern):
(WebCore::InspectorCanvas::buildArrayForImageData):
(WebCore::InspectorCanvas::buildArrayForImageBitmap):
* inspector/InspectorCanvas.h:
* inspector/InspectorDatabaseResource.cpp:
* inspector/InspectorOverlay.cpp:
(WebCore::evaluateCommandInOverlay):
(WebCore::InspectorOverlay::evaluateInOverlay):
* inspector/InspectorOverlay.h:
* inspector/InspectorShaderProgram.h:
* inspector/InspectorStyleSheet.h:
(WebCore::InspectorCSSId::InspectorCSSId):
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createGenericRecord):
(WebCore::TimelineRecordFactory::createFunctionCallData):
(WebCore::TimelineRecordFactory::createConsoleProfileData):
(WebCore::TimelineRecordFactory::createProbeSampleData):
(WebCore::TimelineRecordFactory::createEventDispatchData):
(WebCore::TimelineRecordFactory::createGenericTimerData):
(WebCore::TimelineRecordFactory::createTimerInstallData):
(WebCore::TimelineRecordFactory::createEvaluateScriptData):
(WebCore::TimelineRecordFactory::createTimeStampData):
(WebCore::TimelineRecordFactory::createAnimationFrameData):
(WebCore::createQuad):
(WebCore::TimelineRecordFactory::createPaintData):
(WebCore::TimelineRecordFactory::appendLayoutRoot):
* inspector/TimelineRecordFactory.h:
* inspector/agents/InspectorApplicationCacheAgent.cpp:
* inspector/agents/InspectorApplicationCacheAgent.h:
* inspector/agents/InspectorCSSAgent.cpp:
(WebCore::computePseudoClassMask):
(WebCore::InspectorCSSAgent::setStyleText):
(WebCore::InspectorCSSAgent::setRuleSelector):
(WebCore::InspectorCSSAgent::forcePseudoState):
* inspector/agents/InspectorCSSAgent.h:
* inspector/agents/InspectorDOMAgent.cpp:
(WebCore::parseColor):
(WebCore::parseConfigColor):
(WebCore::parseQuad):
(WebCore::InspectorDOMAgent::performSearch):
(WebCore::InspectorDOMAgent::setSearchingForNode):
(WebCore::InspectorDOMAgent::highlightConfigFromInspectorObject):
(WebCore::InspectorDOMAgent::setInspectModeEnabled):
(WebCore::InspectorDOMAgent::highlightRect):
(WebCore::InspectorDOMAgent::highlightQuad):
(WebCore::InspectorDOMAgent::innerHighlightQuad):
(WebCore::InspectorDOMAgent::highlightSelector):
(WebCore::InspectorDOMAgent::highlightNode):
(WebCore::InspectorDOMAgent::highlightNodeList):
(WebCore::InspectorDOMAgent::highlightFrame):
* inspector/agents/InspectorDOMAgent.h:
* inspector/agents/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::didInvalidateStyleAttr):
(WebCore::InspectorDOMDebuggerAgent::willInsertDOMNode):
(WebCore::InspectorDOMDebuggerAgent::willRemoveDOMNode):
(WebCore::InspectorDOMDebuggerAgent::willModifyDOMAttr):
(WebCore::InspectorDOMDebuggerAgent::descriptionForDOMEvent):
(WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded):
(WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
* inspector/agents/InspectorDOMDebuggerAgent.h:
* inspector/agents/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
(WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
(WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
(WebCore::InspectorDOMStorageAgent::findStorageArea):
* inspector/agents/InspectorDOMStorageAgent.h:
* inspector/agents/InspectorDatabaseAgent.cpp:
* inspector/agents/InspectorIndexedDBAgent.cpp:
(WebCore::Inspector::idbKeyFromInspectorObject):
(WebCore::Inspector::idbKeyRangeFromKeyRange):
(WebCore::InspectorIndexedDBAgent::requestData):
* inspector/agents/InspectorIndexedDBAgent.h:
* inspector/agents/InspectorNetworkAgent.cpp:
(WebCore::buildObjectForHeaders):
(WebCore::InspectorNetworkAgent::buildObjectForResourceResponse):
(WebCore::InspectorNetworkAgent::setExtraHTTPHeaders):
* inspector/agents/InspectorNetworkAgent.h:
* inspector/agents/InspectorPageAgent.cpp:
* inspector/agents/InspectorPageAgent.h:
* inspector/agents/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::setInstruments):
(WebCore::InspectorTimelineAgent::internalStart):
(WebCore::InspectorTimelineAgent::didInvalidateLayout):
(WebCore::InspectorTimelineAgent::willLayout):
(WebCore::InspectorTimelineAgent::didScheduleStyleRecalculation):
(WebCore::InspectorTimelineAgent::willRecalculateStyle):
(WebCore::InspectorTimelineAgent::willComposite):
(WebCore::InspectorTimelineAgent::willPaint):
(WebCore::InspectorTimelineAgent::addRecordToTimeline):
(WebCore::InspectorTimelineAgent::setFrameIdentifier):
(WebCore::InspectorTimelineAgent::appendRecord):
(WebCore::InspectorTimelineAgent::sendEvent):
(WebCore::InspectorTimelineAgent::createRecordEntry):
(WebCore::InspectorTimelineAgent::pushCurrentRecord):
* inspector/agents/InspectorTimelineAgent.h:
* page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::reportViolation const):
* platform/encryptedmedia/clearkey/CDMClearKey.cpp:
(WebCore::parseJSONObject):
(WebCore::parseLicenseFormat):
(WebCore::parseLicenseReleaseAcknowledgementFormat):
(WebCore::CDMInstanceClearKey::updateLicense):
(WebCore::CDMInstanceClearKey::removeSessionData):
* platform/graphics/avfoundation/CDMFairPlayStreaming.cpp:
(WebCore::extractSinfData):
* testing/Internals.cpp:

Source/WebDriver:

* CMakeLists.txt:
* CommandResult.cpp:
(WebDriver::CommandResult::CommandResult):
* CommandResult.h:
(WebDriver::CommandResult::success):
(WebDriver::CommandResult::fail):
(WebDriver::CommandResult::result const):
(WebDriver::CommandResult::setAdditionalErrorData):
(WebDriver::CommandResult::additionalErrorData const):
* Session.cpp:
(WebDriver::firstWindowHandleInResult):
(WebDriver::Session::handleUserPrompts):
(WebDriver::Session::reportUnexpectedAlertOpen):
(WebDriver::Session::go):
(WebDriver::Session::getCurrentURL):
(WebDriver::Session::back):
(WebDriver::Session::forward):
(WebDriver::Session::refresh):
(WebDriver::Session::getTitle):
(WebDriver::Session::getWindowHandle):
(WebDriver::Session::closeTopLevelBrowsingContext):
(WebDriver::Session::switchToWindow):
(WebDriver::Session::getWindowHandles):
(WebDriver::Session::switchToFrame):
(WebDriver::Session::switchToParentFrame):
(WebDriver::Session::getToplevelBrowsingContextRect):
(WebDriver::Session::moveToplevelBrowsingContextWindow):
(WebDriver::Session::resizeToplevelBrowsingContextWindow):
(WebDriver::Session::createElement):
(WebDriver::Session::extractElement):
(WebDriver::Session::extractElementID):
(WebDriver::Session::computeElementLayout):
(WebDriver::Session::findElements):
(WebDriver::Session::isElementSelected):
(WebDriver::Session::getElementText):
(WebDriver::Session::getElementTagName):
(WebDriver::Session::getElementRect):
(WebDriver::Session::isElementEnabled):
(WebDriver::Session::isElementDisplayed):
(WebDriver::Session::getElementAttribute):
(WebDriver::Session::waitForNavigationToComplete):
(WebDriver::Session::selectOptionElement):
(WebDriver::Session::elementClick):
(WebDriver::Session::elementClear):
(WebDriver::Session::elementSendKeys):
(WebDriver::Session::elementSubmit):
(WebDriver::Session::handleScriptResult):
(WebDriver::Session::executeScript):
(WebDriver::Session::performMouseInteraction):
(WebDriver::Session::performKeyboardInteractions):
(WebDriver::parseAutomationCookie):
(WebDriver::builtAutomationCookie):
(WebDriver::serializeCookie):
(WebDriver::Session::getAllCookies):
(WebDriver::Session::getNamedCookie):
(WebDriver::Session::addCookie):
(WebDriver::Session::deleteCookie):
(WebDriver::Session::deleteAllCookies):
(WebDriver::Session::dismissAlert):
(WebDriver::Session::acceptAlert):
(WebDriver::Session::getAlertText):
(WebDriver::Session::sendAlertText):
(WebDriver::Session::takeScreenshot):
* Session.h:
* SessionHost.cpp:
(WebDriver::SessionHost::sendCommandToBackend):
(WebDriver::SessionHost::dispatchMessage):
* SessionHost.h:
* WebDriverService.cpp:
(WebDriver::WebDriverService::handleRequest):
(WebDriver::WebDriverService::sendResponse const):
(WebDriver::deserializeTimeouts):
(WebDriver::WebDriverService::parseCapabilities const):
(WebDriver::WebDriverService::findSessionOrCompleteWithError):
(WebDriver::WebDriverService::validatedCapabilities const):
(WebDriver::WebDriverService::mergeCapabilities const):
(WebDriver::WebDriverService::matchCapabilities const):
(WebDriver::WebDriverService::processCapabilities const):
(WebDriver::WebDriverService::newSession):
(WebDriver::WebDriverService::deleteSession):
(WebDriver::WebDriverService::setTimeouts):
(WebDriver::WebDriverService::go):
(WebDriver::WebDriverService::getCurrentURL):
(WebDriver::WebDriverService::back):
(WebDriver::WebDriverService::forward):
(WebDriver::WebDriverService::refresh):
(WebDriver::WebDriverService::getTitle):
(WebDriver::WebDriverService::getWindowHandle):
(WebDriver::WebDriverService::getWindowRect):
(WebDriver::valueAsNumberInRange):
(WebDriver::WebDriverService::setWindowRect):
(WebDriver::WebDriverService::closeWindow):
(WebDriver::WebDriverService::switchToWindow):
(WebDriver::WebDriverService::getWindowHandles):
(WebDriver::WebDriverService::switchToFrame):
(WebDriver::WebDriverService::switchToParentFrame):
(WebDriver::findElementOrCompleteWithError):
(WebDriver::findStrategyAndSelectorOrCompleteWithError):
(WebDriver::WebDriverService::findElement):
(WebDriver::WebDriverService::findElements):
(WebDriver::WebDriverService::findElementFromElement):
(WebDriver::WebDriverService::findElementsFromElement):
(WebDriver::WebDriverService::isElementSelected):
(WebDriver::WebDriverService::getElementAttribute):
(WebDriver::WebDriverService::getElementText):
(WebDriver::WebDriverService::getElementTagName):
(WebDriver::WebDriverService::getElementRect):
(WebDriver::WebDriverService::isElementEnabled):
(WebDriver::WebDriverService::isElementDisplayed):
(WebDriver::WebDriverService::elementClick):
(WebDriver::WebDriverService::elementClear):
(WebDriver::WebDriverService::elementSendKeys):
(WebDriver::WebDriverService::elementSubmit):
(WebDriver::findScriptAndArgumentsOrCompleteWithError):
(WebDriver::WebDriverService::executeScript):
(WebDriver::WebDriverService::executeAsyncScript):
(WebDriver::WebDriverService::getAllCookies):
(WebDriver::WebDriverService::getNamedCookie):
(WebDriver::deserializeCookie):
(WebDriver::WebDriverService::addCookie):
(WebDriver::WebDriverService::deleteCookie):
(WebDriver::WebDriverService::deleteAllCookies):
(WebDriver::WebDriverService::dismissAlert):
(WebDriver::WebDriverService::acceptAlert):
(WebDriver::WebDriverService::getAlertText):
(WebDriver::WebDriverService::sendAlertText):
(WebDriver::WebDriverService::takeScreenshot):
(WebDriver::WebDriverService::takeElementScreenshot):
* WebDriverService.h:
* gtk/WebDriverServiceGtk.cpp:
(WebDriver::WebDriverService::platformValidateCapability const):
(WebDriver::WebDriverService::platformMatchCapability const):
(WebDriver::WebDriverService::platformParseCapabilities const):

Source/WebKit:

Based on patch by Brian Burg.

* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::resizeWindowOfBrowsingContext):
(WebKit::WebAutomationSession::moveWindowOfBrowsingContext):
(WebKit::WebAutomationSession::waitForNavigationToCompleteOnPage):
(WebKit::WebAutomationSession::waitForNavigationToCompleteOnFrame):
(WebKit::WebAutomationSession::respondToPendingPageNavigationCallbacksWithTimeout):
(WebKit::WebAutomationSession::respondToPendingFrameNavigationCallbacksWithTimeout):
(WebKit::WebAutomationSession::navigationOccurredForFrame):
(WebKit::WebAutomationSession::documentLoadedForFrame):
(WebKit::WebAutomationSession::inspectorFrontendLoaded):
(WebKit::WebAutomationSession::keyboardEventsFlushedForPage):
(WebKit::WebAutomationSession::evaluateJavaScriptFunction):
(WebKit::WebAutomationSession::setFilesToSelectForFileUpload):
(WebKit::WebAutomationSession::addSingleCookie):
(WebKit::WebAutomationSession::setSessionPermissions):
(WebKit::WebAutomationSession::performMouseInteraction):
(WebKit::WebAutomationSession::performKeyboardInteractions):
* UIProcess/Automation/WebAutomationSession.h:

Source/WTF:

* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/JSONValues.cpp: Renamed from Source/JavaScriptCore/inspector/InspectorValues.cpp.
(JSON::Value::null):
(JSON::Value::create):
(JSON::Value::asValue):
(JSON::Value::asObject):
(JSON::Value::asArray):
(JSON::Value::parseJSON):
(JSON::Value::toJSONString const):
(JSON::Value::asBoolean const):
(JSON::Value::asDouble const):
(JSON::Value::asInteger const):
(JSON::Value::asString const):
(JSON::Value::writeJSON const):
(JSON::Value::memoryCost const):
(JSON::ObjectBase::~ObjectBase):
(JSON::ObjectBase::asObject):
(JSON::ObjectBase::openAccessors):
(JSON::ObjectBase::memoryCost const):
(JSON::ObjectBase::getBoolean const):
(JSON::ObjectBase::getString const):
(JSON::ObjectBase::getObject const):
(JSON::ObjectBase::getArray const):
(JSON::ObjectBase::getValue const):
(JSON::ObjectBase::remove):
(JSON::ObjectBase::writeJSON const):
(JSON::ObjectBase::ObjectBase):
(JSON::ArrayBase::~ArrayBase):
(JSON::ArrayBase::asArray):
(JSON::ArrayBase::writeJSON const):
(JSON::ArrayBase::ArrayBase):
(JSON::ArrayBase::get const):
(JSON::Object::create):
(JSON::Array::create):
(JSON::ArrayBase::memoryCost const):
* wtf/JSONValues.h: Renamed from Source/JavaScriptCore/inspector/InspectorValues.h.
(JSON::ObjectBase::find):
(JSON::ObjectBase::find const):
(JSON::ObjectBase::setBoolean):
(JSON::ObjectBase::setInteger):
(JSON::ObjectBase::setDouble):
(JSON::ObjectBase::setString):
(JSON::ObjectBase::setValue):
(JSON::ObjectBase::setObject):
(JSON::ObjectBase::setArray):
(JSON::ArrayBase::pushBoolean):
(JSON::ArrayBase::pushInteger):
(JSON::ArrayBase::pushDouble):
(JSON::ArrayBase::pushString):
(JSON::ArrayBase::pushValue):
(JSON::ArrayBase::pushObject):
(JSON::ArrayBase::pushArray):

Tools:

* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/PlatformGTK.cmake:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/JSONValue.cpp: Renamed from Tools/TestWebKitAPI/Tests/JavaScriptCore/InspectorValue.cpp.
(TestWebKitAPI::TEST):

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

3 years agoFix a bit-rotted Interpreter::dumpRegisters() and make it more robust.
mark.lam@apple.com [Wed, 15 Nov 2017 00:40:09 +0000 (00:40 +0000)]
Fix a bit-rotted Interpreter::dumpRegisters() and make it more robust.
https://bugs.webkit.org/show_bug.cgi?id=179699
<rdar://problem/35462346>

Reviewed by Michael Saboff.

* interpreter/Interpreter.cpp:
(JSC::Interpreter::dumpRegisters):
- Need to skip the callee saved registers

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

3 years agoRelicense non-distributable web inspector images
commit-queue@webkit.org [Wed, 15 Nov 2017 00:30:37 +0000 (00:30 +0000)]
Relicense non-distributable web inspector images
https://bugs.webkit.org/show_bug.cgi?id=166460
<rdar://problem/29800966>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-11-14
Reviewed by Brian Burg.

* APPLE_IMAGES_LICENSE.rtf: Removed.
Remove the restrictive Web Inspector images license and default to the
same license as the rest of WebKit.

The Apple Images license was never intended to restrict distribution of
Web Inspector images when used as part of WebKit. Now, all contributions
to Web Inspector, images and source, have the same licensing as all other
WebKit contributions.

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

3 years agoUnreviewed, fix CMake debug builds after r224707
mcatanzaro@igalia.com [Wed, 15 Nov 2017 00:12:34 +0000 (00:12 +0000)]
Unreviewed, fix CMake debug builds after r224707
https://bugs.webkit.org/show_bug.cgi?id=179499
<rdar://problem/35445033>

* PlatformWin.cmake:
* Sources.txt:

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

3 years agoAnother attempt to fix GTK/WPE debug builds
mcatanzaro@igalia.com [Wed, 15 Nov 2017 00:12:09 +0000 (00:12 +0000)]
Another attempt to fix GTK/WPE debug builds
https://bugs.webkit.org/show_bug.cgi?id=179660

* platform/graphics/cairo/NativeImageCairo.cpp:
(WebCore::drawNativeImage):

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

3 years agoFix Windows build.
achristensen@apple.com [Wed, 15 Nov 2017 00:09:48 +0000 (00:09 +0000)]
Fix Windows build.

* html/canvas/WebGLRenderingContext.h:

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

3 years ago[Service Workers] Implement container.getRegistrations()
cdumez@apple.com [Wed, 15 Nov 2017 00:04:33 +0000 (00:04 +0000)]
[Service Workers] Implement container.getRegistrations()
https://bugs.webkit.org/show_bug.cgi?id=179672

Reviewed by Brady Eidson.

LayoutTests/imported/w3c:

Rebaseline test now that more checks are passing.

* web-platform-tests/service-workers/service-worker/getregistrations.https-expected.txt:

Source/WebCore:

Implement container.getRegistrations():
- https://w3c.github.io/ServiceWorker/#dom-serviceworkercontainer-getregistrations

No new tests, rebaselined existing test.

* workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::getRegistration):
(WebCore::ServiceWorkerContainer::getRegistrations):
(WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):
* workers/service/ServiceWorkerContainer.h:
* workers/service/ServiceWorkerRegistration.cpp:
(WebCore::ServiceWorkerRegistration::getOrCreate):
* workers/service/ServiceWorkerRegistration.h:
* workers/service/ServiceWorkerRegistrationKey.cpp:
(WebCore::ServiceWorkerRegistrationKey::isMatching const):
(WebCore::ServiceWorkerRegistrationKey::originIsMatching const):
* workers/service/ServiceWorkerRegistrationKey.h:
* workers/service/server/SWClientConnection.h:
* workers/service/server/SWServer.cpp:
(WebCore::SWServer::getRegistrations):
* workers/service/server/SWServer.h:

Source/WebKit:

* StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::getRegistrations):
* StorageProcess/ServiceWorker/WebSWServerConnection.h:
* StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
* WebProcess/Storage/WebSWClientConnection.cpp:
(WebKit::WebSWClientConnection::didGetRegistrations):
(WebKit::WebSWClientConnection::getRegistrations):
* WebProcess/Storage/WebSWClientConnection.h:
* WebProcess/Storage/WebSWClientConnection.messages.in:

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

3 years agoFix Windows build.
achristensen@apple.com [Tue, 14 Nov 2017 23:49:24 +0000 (23:49 +0000)]
Fix Windows build.

* html/canvas/WebGLRenderingContext.h:

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

3 years agoUnreviewed, fix GTK/WPE debug builds even better after r224813
mcatanzaro@igalia.com [Tue, 14 Nov 2017 23:42:47 +0000 (23:42 +0000)]
Unreviewed, fix GTK/WPE debug builds even better after r224813
https://bugs.webkit.org/show_bug.cgi?id=179660

* platform/graphics/cairo/NativeImageCairo.cpp:
(WebCore::drawNativeImage):

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

3 years agoUnreviewed, fix GTK/WPE debug builds after r224813
mcatanzaro@igalia.com [Tue, 14 Nov 2017 23:40:21 +0000 (23:40 +0000)]
Unreviewed, fix GTK/WPE debug builds after r224813
https://bugs.webkit.org/show_bug.cgi?id=179660

* platform/graphics/cairo/NativeImageCairo.cpp:
(WebCore::drawNativeImage):

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