WebKit-https.git
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

3 years agoMark fast/scrolling/rtl-scrollbars.html as flaky.
ryanhaddad@apple.com [Tue, 14 Nov 2017 23:32:42 +0000 (23:32 +0000)]
Mark fast/scrolling/rtl-scrollbars.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=179455

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years agoImplement ServiceWorker handle fetch for navigation loads
commit-queue@webkit.org [Tue, 14 Nov 2017 23:25:28 +0000 (23:25 +0000)]
Implement ServiceWorker handle fetch for navigation loads
https://bugs.webkit.org/show_bug.cgi?id=179404

Patch by Youenn Fablet <youenn@apple.com> on 2017-11-14
Reviewed by Alex Christensen and Chris Dumez.

LayoutTests/imported/w3c:

* web-platform-tests/service-workers/cache-storage/serviceworker/credentials.https-expected.txt:
* web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/extendable-message-event.https-expected.txt:
* web-platform-tests/service-workers/service-worker/claim-not-using-registration.https-expected.txt:
* web-platform-tests/service-workers/service-worker/client-id.https-expected.txt:
* web-platform-tests/service-workers/service-worker/client-navigate.https-expected.txt:
* web-platform-tests/service-workers/service-worker/clients-get-cross-origin.https-expected.txt:
* web-platform-tests/service-workers/service-worker/clients-get.https-expected.txt:
* web-platform-tests/service-workers/service-worker/clients-matchall-client-types.https-expected.txt:
* web-platform-tests/service-workers/service-worker/clients-matchall-include-uncontrolled.https-expected.txt:
* web-platform-tests/service-workers/service-worker/clients-matchall.https-expected.txt:
* web-platform-tests/service-workers/service-worker/controller-on-disconnect.https-expected.txt:
* web-platform-tests/service-workers/service-worker/controller-on-load.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/fetch-cors-xhr.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-csp.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-event-after-navigation-within-page.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-event-async-respond-with.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-event-network-error.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-event-redirect.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-event-referrer-policy.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-event-respond-with-argument.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-event-respond-with-readable-stream.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-event-respond-with-response-body-with-invalid-chunk.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-event-respond-with-stops-propagation.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-event-within-sw.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-event.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-frame-resource.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-header-visibility.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-mixed-content-to-inscope.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-mixed-content-to-outscope.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-request-css-cross-origin-mime-check.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-request-redirect.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-request-xhr.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-response-taint.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-response-xhr.https-expected.txt:
* web-platform-tests/service-workers/service-worker/foreign-fetch-workers.https-expected.txt:
* web-platform-tests/service-workers/service-worker/interfaces-sw.https-expected.txt:
* web-platform-tests/service-workers/service-worker/invalid-header.https-expected.txt:
* web-platform-tests/service-workers/service-worker/mime-sniffing.https-expected.txt:
* web-platform-tests/service-workers/service-worker/navigation-preload/chunked-encoding.https-expected.txt:
* web-platform-tests/service-workers/service-worker/navigation-preload/request-headers.https-expected.txt:
* web-platform-tests/service-workers/service-worker/navigation-redirect-to-http.https-expected.txt:
* web-platform-tests/service-workers/service-worker/navigation-redirect.https-expected.txt:
* web-platform-tests/service-workers/service-worker/opaque-response-preloaded.https-expected.txt:
* web-platform-tests/service-workers/service-worker/performance-timeline.https-expected.txt:
* web-platform-tests/service-workers/service-worker/postmessage-msgport-to-client.https-expected.txt:
* web-platform-tests/service-workers/service-worker/postmessage-to-client.https-expected.txt:
* web-platform-tests/service-workers/service-worker/referer.https-expected.txt:
* web-platform-tests/service-workers/service-worker/referrer-policy-header.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/registration-updateviacache.https-expected.txt:
* web-platform-tests/service-workers/service-worker/request-end-to-end.https-expected.txt:
* web-platform-tests/service-workers/service-worker/resource-timing.https-expected.txt:
* web-platform-tests/service-workers/service-worker/serviceworker-message-event-historical.https-expected.txt:
* web-platform-tests/service-workers/service-worker/skip-waiting-installed.https-expected.txt:
* web-platform-tests/service-workers/service-worker/skip-waiting-using-registration.https-expected.txt:
* web-platform-tests/service-workers/service-worker/skip-waiting-without-using-registration.https-expected.txt:
* web-platform-tests/service-workers/service-worker/unregister-controller.https-expected.txt:
* web-platform-tests/service-workers/service-worker/unregister-then-register.https-expected.txt:
* web-platform-tests/service-workers/service-worker/update-bytecheck.https-expected.txt:
* web-platform-tests/service-workers/service-worker/update-recovery.https-expected.txt:
* web-platform-tests/service-workers/service-worker/worker-interception.https-expected.txt:

Source/WebCore:

Covered by rebased tests.

Step 11 of https://w3c.github.io/ServiceWorker/#on-fetch-request-algorithm is implemented in DocumentLoader as it centralizes main request loading
and knows about the context of it.

For each main resource load in document loader, we first check whether there is a matching service worker.
The fetch request is updated accordingly so that there is no difference in the handling of navigation vs. subresource requests after that point.

Updated DocumentThreadableLoader::didReceiveResponse since it can now receive responses from service worker with various response types.
A follow-up patch should properly handle cross origin responses.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::commitData):
(WebCore::DocumentLoader::startLoadingMainResource):
(WebCore::DocumentLoader::doLoadingMainResource):
* loader/DocumentLoader.h:
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::didReceiveResponse):
* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::setNavigationServiceWorkerRegistrationData):
* loader/cache/CachedResourceRequest.h:
* platform/MIMETypeRegistry.h:
* platform/network/cocoa/WebCoreNSURLSession.mm:
(-[WebCoreNSURLSessionDataTask resource:receivedResponse:]):

Source/WebKit:

Update handle fetch algorithm to support navigation requests.
In case of navigation requests, set service worker response mime type to text/html if none is provided.

* WebProcess/Storage/ServiceWorkerClientFetch.cpp:
(WebKit::ServiceWorkerClientFetch::didReceiveResponse):
* WebProcess/Storage/WebSWClientConnection.cpp:
(WebKit::WebSWClientConnection::startFetch):
* WebProcess/Storage/WebServiceWorkerProvider.cpp:
(WebKit::shouldHandleFetch):
(WebKit::WebServiceWorkerProvider::handleFetch):

LayoutTests:

Some new tests are timing out due to missing SW API support.
fetch-request-xhr.https.html is flaky due to always changing assertions.
uncontrolled-page.https.html is probably flaky due to setting the active service worker
in ServiceWorkerRegistration constructor. Plan is to fix that hack as a follow-up.
fetch-event-respond-with-response-body-with-invalid-chunk.https.html might be flaky for the same reason.
Marking unregister-then-register.https.html as flaky. Will follow-up investigating.

* TestExpectations: Skipping some timing out tests and marking some as flaky.

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

3 years agoWeb Inspector: Network Detail Views - Split Metrics into Sizes and Timing
commit-queue@webkit.org [Tue, 14 Nov 2017 23:22:45 +0000 (23:22 +0000)]
Web Inspector: Network Detail Views - Split Metrics into Sizes and Timing
https://bugs.webkit.org/show_bug.cgi?id=179569
<rdar://problem/35484914>

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

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
New resources and strings.

* UserInterface/Views/NetworkResourceDetailView.js:
(WI.NetworkResourceDetailView):
(WI.NetworkResourceDetailView.prototype.initialLayout):
(WI.NetworkResourceDetailView.prototype._showPreferredContentView):
(WI.NetworkResourceDetailView.prototype._showContentViewForNavigationItem):
(WI.NetworkResourceDetailView.prototype.sizesContentViewGoToHeaders): Renamed.
(WI.NetworkResourceDetailView.prototype.sizesContentViewGoToRequestBody): Renamed.
(WI.NetworkResourceDetailView.prototype.sizesContentViewGoToResponseBody): Renamed.
Split into two navigation items and views.

* UserInterface/Views/ResourceMetricsContentView.css: Removed.
* UserInterface/Views/ResourceMetricsContentView.js: Removed.
* UserInterface/Views/ResourceSizesContentView.css: Added.
* UserInterface/Views/ResourceSizesContentView.js: Added.
* UserInterface/Views/ResourceTimingContentView.css: Added.
* UserInterface/Views/ResourceTimingContentView.js: Added.
Split Metrics into two views.

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

3 years agoLog moveFile failure errors
achristensen@apple.com [Tue, 14 Nov 2017 22:59:42 +0000 (22:59 +0000)]
Log moveFile failure errors
https://bugs.webkit.org/show_bug.cgi?id=179695

Reviewed by Brady Eidson.

Content extension tests are flaky. In r224790 I added logs to find out why, and they indicate that moveFile is failing.
To further understand why, I'm adding logs to see what's happening sometimes on the bots.

* platform/cocoa/FileSystemCocoa.mm:
(WebCore::FileSystem::moveFile):

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

3 years agoFix Windows build.
dino@apple.com [Tue, 14 Nov 2017 22:31:50 +0000 (22:31 +0000)]
Fix Windows build.

* html/OffscreenCanvas.cpp:
* html/OffscreenCanvas.h:
* html/OffscreenCanvas.idl:

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

3 years agoUnreviewed test gardening for High Sierra.
ryanhaddad@apple.com [Tue, 14 Nov 2017 22:26:21 +0000 (22:26 +0000)]
Unreviewed test gardening for High Sierra.

* platform/mac-sierra/http/tests/blink/sendbeacon/beacon-same-origin-expected.txt: Added.
* platform/mac-sierra/imported/w3c/web-platform-tests/beacon/headers/header-content-type-expected.txt: Renamed from LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/beacon/headers/header-content-type-expected.txt.
* platform/mac/http/tests/blink/sendbeacon/beacon-same-origin-expected.txt: Added.
* platform/mac/imported/w3c/web-platform-tests/beacon/headers/header-content-type-expected.txt: Added.

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

3 years agoRemove Cocoa CFURLConnection loading code
achristensen@apple.com [Tue, 14 Nov 2017 22:20:42 +0000 (22:20 +0000)]
Remove Cocoa CFURLConnection loading code
https://bugs.webkit.org/show_bug.cgi?id=179688

Reviewed by Antti Koivisto.

Source/WebCore:

CFURLConnection is only used on the AppleWin port now.

* PlatformMac.cmake:
* SourcesCocoa.txt:
* SourcesIOS.txt:
* WebCore.xcodeproj/project.pbxproj:
* loader/DocumentLoader.h:
* loader/EmptyFrameLoaderClient.h:
* loader/FrameLoaderClient.h:
* loader/ResourceLoader.cpp:
* loader/ResourceLoader.h:
* loader/SubresourceLoader.h:
* loader/cf/ResourceLoaderCFNet.cpp:
* loader/cocoa/SubresourceLoaderCocoa.mm:
* loader/mac/DocumentLoaderMac.cpp:
* loader/mac/ResourceLoaderMac.mm:
* page/mac/PageMac.mm:
(WebCore::Page::platformInitialize):
(WebCore::Page::addSchedulePair):
(WebCore::Page::removeSchedulePair):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForResponseToAuthenticationChallenge):
(WebCore::WebCoreNSURLAuthenticationChallengeClient::create): Deleted.
(WebCore::WebCoreNSURLAuthenticationChallengeClient::WebCoreNSURLAuthenticationChallengeClient): Deleted.
(): Deleted.
* platform/network/ProtectionSpaceBase.cpp:
* platform/network/ResourceHandle.h:
* platform/network/ResourceHandleInternal.h:
* platform/network/cf/AuthenticationCF.cpp:
(WebCore::AuthenticationChallenge::AuthenticationChallenge):
(WebCore::createCF):
(WebCore::core):
(): Deleted.
* platform/network/cf/AuthenticationCF.h:
* platform/network/cf/CookieJarCFNet.cpp:
(WebCore::copyCookiesForURLWithFirstPartyURL):
(WebCore::createCookies):
(WebCore::deleteAllCookiesModifiedSince):
* platform/network/cf/CookieStorageCFNet.cpp:
* platform/network/cf/CredentialStorageCFNet.cpp:
(WebCore::CredentialStorage::getFromPersistentStorage):
* platform/network/cf/ResourceErrorCF.cpp:
(WebCore::ResourceError::setCertificate):
(WebCore::ResourceError::platformLazyInit):
(WebCore::ResourceError::doPlatformIsolatedCopy):
(WebCore::ResourceError::cfError const):
* platform/network/cf/ResourceHandleCFNet.cpp:
* platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
* platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupRequest):
(WebCore::installHookToRemoveCFNetworkMessageBlockingMainThread):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupConnectionScheduling):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):
* platform/network/cocoa/CredentialCocoa.mm:
(WebCore::Credential::cfCredential const): Deleted.
* platform/network/cocoa/ProtectionSpaceCocoa.mm:
(WebCore::ProtectionSpace::cfSpace const): Deleted.
* platform/network/cocoa/ResourceRequestCocoa.mm:
(WebCore::ResourceRequest::nsURLRequest const):
(WebCore::ResourceRequest::clearOrUpdateNSURLRequest): Deleted.
* platform/network/cocoa/ResourceResponseCocoa.mm:
(WebCore::ResourceResponse::platformCertificateInfo const):
(WebCore::ResourceResponse::ResourceResponse): Deleted.
* platform/network/ios/ResourceHandleIOS.mm: Removed.
* platform/network/mac/AuthenticationMac.mm:
(WebCore::AuthenticationChallenge::authenticationClient const):
(WebCore::mac):
(-[WebCoreAuthenticationClientAsChallengeSender setCFChallenge:]): Deleted.
(-[WebCoreAuthenticationClientAsChallengeSender cfChallenge]): Deleted.
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::synchronousWillSendRequestEnabled):
* platform/network/mac/ResourceRequestMac.mm: Removed.

Source/WebKit:

* NetworkProcess/Downloads/Download.h:

Source/WebKitLegacy:

* WebCoreSupport/WebResourceLoadScheduler.cpp:
(WebResourceLoadScheduler::scheduleLoad):

Source/WebKitLegacy/mac:

* Misc/WebDownload.mm:
(-[WebDownload _initWithLoadingCFURLConnection:request:response:delegate:proxy:]): Deleted.
* Misc/WebDownloadInternal.h:
* Plugins/WebBaseNetscapePluginView.mm:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::convertMainResourceLoadToDownload):
* WebView/WebView.mm:
(-[WebView scheduleInRunLoop:forMode:]):
(-[WebView unscheduleFromRunLoop:forMode:]):

Source/WTF:

* wtf/SchedulePair.h:
* wtf/SchedulePairMac.mm:

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

3 years agowebkitpy: Use more verbose version info from simctl
jbedard@apple.com [Tue, 14 Nov 2017 22:19:46 +0000 (22:19 +0000)]
webkitpy: Use more verbose version info from simctl
https://bugs.webkit.org/show_bug.cgi?id=179687
<rdar://problem/35539392>

Reviewed by Tim Horton.

* Scripts/webkitpy/xcode/simulator.py:
(Simulator): Address FIXME, use more verbose version.
(Simulator._parse_runtimes): 'Internal' no longer stands along, check os for this
string instead.
* Scripts/webkitpy/xcode/simulator_unittest.py: Mock simctl output specifies iOS
8.4.1, not iOS 8.4.

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

3 years agoREGRESSION(r224623) [MIPS] branchTruncateDoubleToInt32() doesn't set return register...
guijemont@igalia.com [Tue, 14 Nov 2017 21:53:41 +0000 (21:53 +0000)]
REGRESSION(r224623) [MIPS] branchTruncateDoubleToInt32() doesn't set return register when branching
https://bugs.webkit.org/show_bug.cgi?id=179563

Reviewed by Carlos Alberto Lopez Perez.

When run with BranchIfTruncateSuccessful,
branchTruncateDoubleToInt32() should set the destination register
before branching.
This change also removes branchTruncateDoubleToUInt32() as it is
deprecated (see r160205), merges branchOnTruncateResult() into
branchTruncateDoubleToInt32() and adds test cases in testmasm.

* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::branchOnTruncateResult): Deleted.
(JSC::MacroAssemblerMIPS::branchTruncateDoubleToInt32):
Properly set dest before branching.
(JSC::MacroAssemblerMIPS::branchTruncateDoubleToUInt32): Deleted.
* assembler/testmasm.cpp:
(JSC::testBranchTruncateDoubleToInt32):
(JSC::run):
Add tests for branchTruncateDoubleToInt32().

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

3 years agoUpdate comment in FeatureDefines.xcconfig to reflect location of Visual Studio proper...
dbates@webkit.org [Tue, 14 Nov 2017 21:30:07 +0000 (21:30 +0000)]
Update comment in FeatureDefines.xcconfig to reflect location of Visual Studio property files
for feature defines

Following r195498 and r201917 the Visual Studio property files for feature defines have
moved from directory WebKitLibraries/win/tools/vsprops to directory Source/cmake/tools/vsprops.
Update the comment in FeatureDefines.xcconfig to reflect the new location and names of these
files.

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@224841 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoRemove StyleResolver::State::document()
antti@apple.com [Tue, 14 Nov 2017 21:26:48 +0000 (21:26 +0000)]
Remove StyleResolver::State::document()
https://bugs.webkit.org/show_bug.cgi?id=179678

Reviewed by Antoine Quint.

We don't need both StyleResolver::document() and StyleResolver::State::document().

* css/StyleResolver.cpp:
(WebCore::StyleResolver::State::updateConversionData):
(WebCore::StyleResolver::resolvedVariableValue):
(WebCore::StyleResolver::colorFromPrimitiveValue const):
(WebCore::StyleResolver::createFilterOperations):
* css/StyleResolver.h:
(WebCore::StyleResolver::State::document const): Deleted.

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

3 years agoRemove JSDollarVMPrototype.
mark.lam@apple.com [Tue, 14 Nov 2017 21:16:24 +0000 (21:16 +0000)]
Remove JSDollarVMPrototype.
https://bugs.webkit.org/show_bug.cgi?id=179685

Reviewed by Saam Barati.

1. Move the JSDollarVMPrototype C++ utility functions into VMInspector.cpp.

   This allows us to call these functions during lldb debugging sessions using
   VMInspector::foo() instead of JSDollarVMPrototype::foo().  It makes sense that
   VMInspector provides VM debugging utility methods.  It doesn't make sense to
   have a JSDollarVMPrototype object provide these methods.

   Plus, it's shorter to type VMInspector than JSDollarVMPrototype.

2. Move the JSDollarVMPrototype JS functions into JSDollarVM.cpp.

   JSDollarVM is a special object used only for debugging purposes.  There's no
   gain in requiring its methods to be stored in a prototype object other than to
   conform to typical JS convention.  We can remove this complexity.

* JavaScriptCore.xcodeproj/project.pbxproj:
* Sources.txt:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* tools/JSDollarVM.cpp:
(JSC::JSDollarVM::addFunction):
(JSC::functionCrash):
(JSC::functionDFGTrue):
(JSC::CallerFrameJITTypeFunctor::CallerFrameJITTypeFunctor):
(JSC::CallerFrameJITTypeFunctor::operator() const):
(JSC::CallerFrameJITTypeFunctor::jitType):
(JSC::functionLLintTrue):
(JSC::functionJITTrue):
(JSC::functionGC):
(JSC::functionEdenGC):
(JSC::functionCodeBlockForFrame):
(JSC::codeBlockFromArg):
(JSC::functionCodeBlockFor):
(JSC::functionPrintSourceFor):
(JSC::functionPrintBytecodeFor):
(JSC::functionPrint):
(JSC::functionPrintCallFrame):
(JSC::functionPrintStack):
(JSC::functionValue):
(JSC::functionGetPID):
(JSC::JSDollarVM::finishCreation):
* tools/JSDollarVM.h:
(JSC::JSDollarVM::create):
* tools/JSDollarVMPrototype.cpp: Removed.
* tools/JSDollarVMPrototype.h: Removed.
* tools/VMInspector.cpp:
(JSC::VMInspector::currentThreadOwnsJSLock):
(JSC::ensureCurrentThreadOwnsJSLock):
(JSC::VMInspector::gc):
(JSC::VMInspector::edenGC):
(JSC::VMInspector::isInHeap):
(JSC::CellAddressCheckFunctor::CellAddressCheckFunctor):
(JSC::CellAddressCheckFunctor::operator() const):
(JSC::VMInspector::isValidCell):
(JSC::VMInspector::isValidCodeBlock):
(JSC::VMInspector::codeBlockForFrame):
(JSC::PrintFrameFunctor::PrintFrameFunctor):
(JSC::PrintFrameFunctor::operator() const):
(JSC::VMInspector::printCallFrame):
(JSC::VMInspector::printStack):
(JSC::VMInspector::printValue):
* tools/VMInspector.h:

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

3 years agoWhitelist some IOKIt properties to avoid sandbox violations on YouTube
bfulgham@apple.com [Tue, 14 Nov 2017 21:14:57 +0000 (21:14 +0000)]
Whitelist some IOKIt properties to avoid sandbox violations on YouTube
https://bugs.webkit.org/show_bug.cgi?id=179683
<rdar://problem/35415368>

Reviewed by Dean Jackson.

YouTube video playback on some hardware (and some video encodings) generates sandbox violations. Add
whitelist entries for the relevant IOKit properties needed to support these activities.

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

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

3 years agoStub implementations of OffscreenCanvas getContext and transferToImageBitmap
dino@apple.com [Tue, 14 Nov 2017 21:11:18 +0000 (21:11 +0000)]
Stub implementations of OffscreenCanvas getContext and transferToImageBitmap
https://bugs.webkit.org/show_bug.cgi?id=179671
<rdar://problem/35534018>

Reviewed by Antoine Quint.

Source/WebCore:

Empty implementations of getContext and transferToImageBitmap. At the moment
only return a WebGLRenderingContext from getContext, since we don't
have an Offscreen 2d context type yet.

Tests: http/wpt/offscreen-canvas/getContext-webgl.html
       http/wpt/offscreen-canvas/transferToImageBitmap.html

* html/OffscreenCanvas.cpp:
(WebCore::OffscreenCanvas::getContext):
(WebCore::OffscreenCanvas::transferToImageBitmap):
* html/OffscreenCanvas.h:
* html/OffscreenCanvas.idl:
* html/canvas/GPUBasedCanvasRenderingContext.h: Drive-by parameter rename.
(WebCore::GPUBasedCanvasRenderingContext::GPUBasedCanvasRenderingContext):

LayoutTests:

* http/wpt/offscreen-canvas/getContext-webgl-expected.txt: Added.
* http/wpt/offscreen-canvas/getContext-webgl.html: Added.
* http/wpt/offscreen-canvas/transferToImageBitmap-expected.txt: Added.
* http/wpt/offscreen-canvas/transferToImageBitmap.html: Added.

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

3 years agoMark WebChromeClient::requestStorageAccess() as final
dbates@webkit.org [Tue, 14 Nov 2017 20:48:49 +0000 (20:48 +0000)]
Mark WebChromeClient::requestStorageAccess() as final
https://bugs.webkit.org/show_bug.cgi?id=179673

Reviewed by Sam Weinig.

Mark WebChromeClient::requestStorageAccess() as final so that it overrides the virtual function
in ChromeClient with the same name and hence we actually call it through a ChromeClient pointer.

* WebProcess/WebCoreSupport/WebChromeClient.h:

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

3 years agoUnreviewed test gardening for High Sierra.
ryanhaddad@apple.com [Tue, 14 Nov 2017 20:38:55 +0000 (20:38 +0000)]
Unreviewed test gardening for High Sierra.

* platform/mac/TestExpectations:
* platform/mac/editing/deleting/delete-emoji-9-expected.txt:

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

3 years agoEnable Modern EME tests in DumpRenderTree
jer.noble@apple.com [Tue, 14 Nov 2017 20:29:05 +0000 (20:29 +0000)]
Enable Modern EME tests in DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=179544

Reviewed by Alex Christensen.

Source/WebKitLegacy/mac:

Add a WebPreferences property to enable the (modern) EME API.

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

Tools:

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

LayoutTests:

* platform/mac-wk1/TestExpectations:
* platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt:

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

3 years agoWebSWClientConnection should do IPC to StorageProcess if its WebSWOriginTable is...
commit-queue@webkit.org [Tue, 14 Nov 2017 20:28:34 +0000 (20:28 +0000)]
WebSWClientConnection should do IPC to StorageProcess if its WebSWOriginTable is not yet initialized
https://bugs.webkit.org/show_bug.cgi?id=179668

Patch by Youenn Fablet <youenn@apple.com> on 2017-11-14
Reviewed by Chris Dumez.

Source/WebCore:

Covered by existing updated tests.

Removing hasServiceWorkerRegisteredForOrigin and using hasServiceWorkerRegistration instead.
The former is only checking the shared map which might not be initialized at the time the function is called.
The latter is going to the StorageProcess if the map is not yet initialized.

* testing/Internals.cpp:
(WebCore::Internals::hasServiceWorkerRegisteredForOrigin): Deleted.
* testing/Internals.h:
* testing/Internals.idl:
* workers/service/server/SWClientConnection.h:

Source/WebKit:

There may be cases where the origin table is not initialized and we would think there is no service worker registration.
In such a case, we should go to the StorageProcess.
StorageProcess is now sending an IPC message back to each registered SW connection so that WebProcess will know whether its map
is correctly initialized or not.

Renaming hasServiceWorkerRegisteredForOrigin in mayHaveServiceWorkerRegisteredForOrigin.

* WebProcess/Storage/WebSWClientConnection.cpp:
(WebKit::WebSWClientConnection::mayHaveServiceWorkerRegisteredForOrigin const):
(WebKit::WebSWClientConnection::matchRegistration):
(WebKit::WebSWClientConnection::hasServiceWorkerRegisteredForOrigin const): Deleted.
* WebProcess/Storage/WebSWClientConnection.h:
* WebProcess/Storage/WebSWOriginTable.h:
(WebKit::WebSWOriginTable::isInitialized const):
* WebProcess/Storage/WebServiceWorkerProvider.cpp:
(WebKit::shouldHandleFetch):

LayoutTests:

Updated tests to use hasServiceWorkerRegistration instead of hasServiceWorkerRegisteredForOrigin.
Since the latter is trying to match a registration and compares scopes, we need the scopes to be set right on the tests.

* http/tests/workers/service/basic-unregister.https-expected.txt:
* http/tests/workers/service/resources/basic-register.js:
* http/tests/workers/service/resources/basic-unregister.js:

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

3 years agoUnreviewed, rolling out r224800.
commit-queue@webkit.org [Tue, 14 Nov 2017 20:22:58 +0000 (20:22 +0000)]
Unreviewed, rolling out r224800.
https://bugs.webkit.org/show_bug.cgi?id=179684

"Broke CLoop test mozilla/js1_6/Array/regress-304828.js"
(Requested by mlam on #webkit).

Reverted changeset:

"Pass --useDollarVM=true to all JSC tests."
https://bugs.webkit.org/show_bug.cgi?id=179647
https://trac.webkit.org/changeset/224800

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

3 years agoConsolidate sysctl-read rules in WebProcess sandbox
bfulgham@apple.com [Tue, 14 Nov 2017 20:09:55 +0000 (20:09 +0000)]
Consolidate sysctl-read rules in WebProcess sandbox
https://bugs.webkit.org/show_bug.cgi?id=179674
<rdar://problem/35367154>

Reviewed by Dean Jackson.

Consolidate the various calls to 'allow sysctl-read' imported during Bug 179548 into
the main function in the sandbox profile.

Remove the statement to grant global sysctl-read permissions that was copied into this
sandbox profile in an earlier checkin. We started blocking the blanket read permissions in
macOS 10.13, and want to continue to do so.

The earlier "grant global read access" in 'system.sb' apparently allowed some sysctl reads
to occur before we hit the block declaration in the WebContent sandbox. Now that we are
consistently blocking systcl reads from the start, we need to add whitelist entries for a
few more entries to avoid creating new sandbox violations.

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

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

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

* 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:
* web-platform-tests/service-workers/service-worker/fetch-request-redirect.https-expected.txt:
* web-platform-tests/service-workers/service-worker/interfaces-sw.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/registration-updateviacache.https-expected.txt:
* web-platform-tests/service-workers/service-worker/skip-waiting-without-using-registration.https-expected.txt:

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

3 years agoRemove WebKit CFURLConnection code
achristensen@apple.com [Tue, 14 Nov 2017 19:54:01 +0000 (19:54 +0000)]
Remove WebKit CFURLConnection code
https://bugs.webkit.org/show_bug.cgi?id=179645

Reviewed by Alexey Proskuryakov.

The CFURLConnection code is Windows-specific now. Nobody can use it in modern WebKit.

* NetworkProcess/Downloads/Download.h:
* NetworkProcess/Downloads/mac/DownloadMac.mm:
* NetworkProcess/NetworkLoad.h:
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::serverTrustCredential):
* NetworkProcess/mac/NetworkLoadMac.mm:
* Shared/Authentication/AuthenticationManager.cpp:
(WebKit::AuthenticationManager::useCredentialForSingleChallenge):
(WebKit::AuthenticationManager::continueWithoutCredentialForSingleChallenge):
(WebKit::AuthenticationManager::cancelSingleChallenge):
(WebKit::AuthenticationManager::performDefaultHandlingForSingleChallenge):
(WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):
* Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm:
* Shared/Authentication/mac/AuthenticationManager.mac.mm:
(WebKit::AuthenticationManager::tryUseCertificateInfoForChallenge):
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
(IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
* config.h:

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

3 years agoRemove assertions added in r224791
achristensen@apple.com [Tue, 14 Nov 2017 19:50:30 +0000 (19:50 +0000)]
Remove assertions added in r224791
https://bugs.webkit.org/show_bug.cgi?id=178751#c10

* NetworkProcess/mac/RemoteNetworkingContext.mm:
(WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession):
I had added assertions that sandbox extension handle consumption succeeds.
In the API test IndexedDB.StructuredCloneBackwardCompatibility we get a sandbox extension handle
to give access to a directory that does not exist and consumption fails.  We want it to fail,
so my optimistic addition of a success assertion was incorrect.  The test passes without it
and behaves like it used to.

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

3 years agoWeb Inspector: Add a ServiceWorker domain to get information about an inspected Servi...
joepeck@webkit.org [Tue, 14 Nov 2017 19:44:18 +0000 (19:44 +0000)]
Web Inspector: Add a ServiceWorker domain to get information about an inspected ServiceWorker
https://bugs.webkit.org/show_bug.cgi?id=179640
<rdar://problem/35517361>

Reviewed by Devin Rousso.

Source/JavaScriptCore:

* CMakeLists.txt:
* DerivedSources.make:
Gate the ServiceWorker domain on the ENABLE feature flag.

* inspector/protocol/ServiceWorker.json: Added.
New domain to be made available inside of a ServiceWorker target.

Source/WebCore:

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorAllInOne.cpp:
New files.

* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::createLazyAgents):
Add a ServiceWorkerAgent when the Worker is a ServiceWorker.

* inspector/agents/worker/ServiceWorkerAgent.h: Added.
* inspector/agents/worker/ServiceWorkerAgent.cpp: Added.
(WebCore::ServiceWorkerAgent::ServiceWorkerAgent):
(WebCore::ServiceWorkerAgent::didCreateFrontendAndBackend):
(WebCore::ServiceWorkerAgent::willDestroyFrontendAndBackend):
(WebCore::ServiceWorkerAgent::getInitializationInfo):
Populate initialization info.

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

3 years agoDon't use -[NSString stringWithFormat:] to build defaults keys
timothy_horton@apple.com [Tue, 14 Nov 2017 19:43:25 +0000 (19:43 +0000)]
Don't use -[NSString stringWithFormat:] to build defaults keys
https://bugs.webkit.org/show_bug.cgi?id=179680

Reviewed by Simon Fraser.

* UIProcess/mac/WebPreferencesMac.mm:
(WebKit::makeKey):
(WebKit::debugUserDefaultsValue):
Use string concatenation instead of stringWithFormat to build
preference keys. This wasn't a huge cost, but it shaves a few milliseconds
off process launch.

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

3 years agoRemove some accidentally checked-in commented-out code.
beidson@apple.com [Tue, 14 Nov 2017 19:40:02 +0000 (19:40 +0000)]
Remove some accidentally checked-in commented-out code.

Unreviewed.

* workers/service/server/SWServer.cpp:
(WebCore::SWServer::fireInstallEvent):
(WebCore::SWServer::fireActivateEvent):

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

3 years agoClean up old URL parser remnants
achristensen@apple.com [Tue, 14 Nov 2017 19:15:23 +0000 (19:15 +0000)]
Clean up old URL parser remnants
https://bugs.webkit.org/show_bug.cgi?id=179573

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

* web-platform-tests/url/url-setters-expected.txt:
We're more spec compliant!  Hooray!

Source/WebCore:

When we transitioned to the new URLParser, we kept the old character tables which were less spec-conformant.
Removing them and transitioning to URLParser's table makes more web platform tests pass!

* fileapi/BlobURL.cpp:
(WebCore::BlobURL::createBlobURL):
There's no need to percent-encode an origin.  It's already ascii, and if it's not, then the URLParser will escape it.
* loader/appcache/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::createFileURL):
Removed comment that no longer applies.
* platform/URL.cpp:
(WebCore::URL::setProtocol):
(WebCore::percentEncodeCharacters):
(WebCore::URL::setUser):
(WebCore::URL::setPass):
Percent encode the userinfo character set from the URLParser according to https://url.spec.whatwg.org/#set-the-username and https://url.spec.whatwg.org/#set-the-password
(WebCore::URL::setPath):
A ? or a # are the only two characters that need to be pre-encoded when setting the path because they indicate the
beginning of a query or fragment.  All other characters will be encoded if necessary during parsing.
(WebCore::protocolIsInternal):
(): Deleted.
(WebCore::isSchemeFirstChar): Deleted.
(WebCore::isSchemeChar): Deleted.
(WebCore::isBadChar): Deleted.
(WebCore::isTabNewline): Deleted.
(WebCore::appendEscapedChar): Deleted.
(WebCore::encodeWithURLEscapeSequences):
Encode characters needed.  I used the user info set of characters because that was most similar to the BadChar set of the old parser.
This isn't standardized, and it's only used for the search context menu item which certainly isn't standardized.
(WebCore::isValidProtocol): Deleted.
Remove a bunch of old unused functions.
* platform/URLParser.cpp:
(WebCore::URLParser::isInUserInfoEncodeSet):
(WebCore::URLParser::parseAuthority):
* platform/URLParser.h:
Expose a few functions for URL.cpp to use.

Source/WebKit:

* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit::WebContextMenuClient::searchWithGoogle):
Use https if we do end up searching with google.

Source/WebKitLegacy/win:

* WebCoreSupport/WebContextMenuClient.cpp:
(WebContextMenuClient::searchWithGoogle):
Use https if we do end up searching with google.

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

3 years agoEnable display:contents by default
antti@apple.com [Tue, 14 Nov 2017 19:01:22 +0000 (19:01 +0000)]
Enable display:contents by default
https://bugs.webkit.org/show_bug.cgi?id=179655

Reviewed by Sam Weinig.

Source/WebCore:

* page/RuntimeEnabledFeatures.h:

Source/WebKit:

* Shared/WebPreferences.yaml:

Make non-experimental and enabled.

Source/WebKitLegacy/mac:

* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):

Tools:

No need to enable this specifically for tests anymore.

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

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

3 years agoConsolidate mach-lookup calls in WebProcess sandbox
bfulgham@apple.com [Tue, 14 Nov 2017 18:36:27 +0000 (18:36 +0000)]
Consolidate mach-lookup calls in WebProcess sandbox
https://bugs.webkit.org/show_bug.cgi?id=179650
<rdar://problem/35367154>

Reviewed by Dean Jackson.

Consolidate the various calls to 'allow mach-lookup' imported during Bug 179548 into the main
function in the sandbox profile. Remove some entries that are not needed by WebKit.

Remove the statement to grant global permission to perform mach-lookup for any xpc
service name that was copied into this sandbox profile in Bug 179548. We started blocking
this in macOS 10.13 and want to continue to do so.

The earlier "grant global permission" in 'system.sb' apparently allowed some xpc lookups to occur
before we hit the block declaration in the WebContent sandbox. Now that we are consistently blocking
mach lookups we need to add whitelist entries for a few more services to avoid creating new
sandbox violations.

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

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

3 years ago[Cairo] Move drawLine operation from GraphicsContextCairo to CairoOperations
zandobersek@gmail.com [Tue, 14 Nov 2017 18:02:41 +0000 (18:02 +0000)]
[Cairo] Move drawLine operation from GraphicsContextCairo to CairoOperations
https://bugs.webkit.org/show_bug.cgi?id=179669

Reviewed by Carlos Garcia Campos.

Move the drawLine operation implementation into the CairoOperations
implementation file, with the Cairo::drawLine() function only expecting
a PlatformContextCairo object, two FloatingPoints, and a const reference
to a GraphicsContextState object.

As with drawLinesForText(), the drawLine() implementation utilized a few
private GraphicsContext methods that we for now reimplement in the
Cairo namespace as static functions, providing necessary state values to
perform the computations. The GraphicsContext methods should be changed
to become static public functions -- after that we'll be able to remove
the new duplicated helper functions.

No new tests -- no change in behavior.

* platform/graphics/cairo/CairoOperations.cpp:
(WebCore::Cairo::dashedLineCornerWidthForStrokeWidth):
(WebCore::Cairo::dashedLinePatternWidthForStrokeWidth):
(WebCore::Cairo::dashedLinePatternOffsetForPatternAndStrokeWidth):
(WebCore::Cairo::centerLineAndCutOffCorners):
(WebCore::Cairo::drawLine):
* platform/graphics/cairo/CairoOperations.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::drawLine):

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

3 years agoLong pressing a phone number with spaces in it results in a link sheet instead of...
timothy_horton@apple.com [Tue, 14 Nov 2017 17:44:17 +0000 (17:44 +0000)]
Long pressing a phone number with spaces in it results in a link sheet instead of a data detectors sheet
https://bugs.webkit.org/show_bug.cgi?id=179646
<rdar://problem/35337288>

Reviewed by Simon Fraser.

Source/WebCore:

* editing/cocoa/DataDetection.h:
* editing/cocoa/DataDetection.mm:
(WebCore::DataDetection::canBePresentedByDataDetectors):
(WebCore::DataDetection::isDataDetectorLink):
Expose canBePresentedByDataDetectors, which tests if the URL's
scheme is one of Data Detectors' known long-press schemes.

Source/WebKit:

* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant showImageSheet]):
(-[WKActionSheetAssistant showLinkSheet]):
(-[WKActionSheetAssistant showDataDetectorsSheet]):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _actionForLongPressFromPositionInformation:]):
(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
Make use of canBePresentedByDataDetectors with our WebCore URL instead
of (sometimes unsucessfully) reparsing the URL with NSURL's parser.
Also, avoid a few unnecessary round-trips through String when converting
from URL to NSURL.

Tools:

* TestWebKitAPI/Tests/ios/ActionSheetTests.mm:
(-[ActionSheetObserver _dataDetectionContextForWebView:]):
(TestWebKitAPI::TEST):
Add a test that ensures that a phone number with spaces in it
invokes a data detectors sheet, not a normal link sheet.

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

3 years ago[DFG][FTL] Support Array::DirectArguments with OutOfBounds
utatane.tea@gmail.com [Tue, 14 Nov 2017 17:35:33 +0000 (17:35 +0000)]
[DFG][FTL] Support Array::DirectArguments with OutOfBounds
https://bugs.webkit.org/show_bug.cgi?id=179594

Reviewed by Saam Barati.

JSTests:

* stress/direct-arguments-in-bounds-to-out-of-bounds.js: Added.
(shouldBe):
(args):
* stress/direct-arguments-out-of-bounds-watchpoint.js: Added.
(shouldBe):
(args):

Source/JavaScriptCore:

Currently we handle OOB access to DirectArguments as GetByVal(Array::Generic).
If we can handle it as GetByVal(Array::DirectArguments+OutOfBounds), we can (1) optimize
`arguments[i]` accesses if i is in bound, and (2) encourage arguments elimination phase
to convert CreateDirectArguments and GetByVal(Array::DirectArguments+OutOfBounds) to
PhantomDirectArguments and GetMyArgumentOutOfBounds respectively.

This patch introduces Array::DirectArguments+OutOfBounds array mode. GetByVal can
accept this type, and emit optimized code compared to Array::Generic case.

We make OOB check failures in GetByVal(Array::DirectArguments+InBounds) as OutOfBounds
exit instead of ExoticObjectMode.

This change significantly improves SixSpeed rest.es5 since it uses OOB access.
Our arguments elimination phase can change CreateDirectArguments to PhantomDirectArguments.

    rest.es5                       59.6719+-2.2440     ^      3.1634+-0.5507        ^ definitely 18.8635x faster

* dfg/DFGArgumentsEliminationPhase.cpp:
* dfg/DFGArrayMode.cpp:
(JSC::DFG::ArrayMode::refine const):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileGetByValOnDirectArguments):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
(JSC::FTL::DFG::LowerDFGToB3::compileGetMyArgumentByVal):

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

3 years ago[GTK][WPE] Don't require brotli
mcatanzaro@igalia.com [Tue, 14 Nov 2017 17:18:06 +0000 (17:18 +0000)]
[GTK][WPE] Don't require brotli
https://bugs.webkit.org/show_bug.cgi?id=178122

Reviewed by Frédéric Wang.

Remove stray remaining use of brotli CMake variable.

* CMakeLists.txt:

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

3 years agoREGRESSION(r224799): WebKit crashes on Sierra due to sandbox violation
bfulgham@apple.com [Tue, 14 Nov 2017 16:37:29 +0000 (16:37 +0000)]
REGRESSION(r224799): WebKit crashes on Sierra due to sandbox violation
https://bugs.webkit.org/show_bug.cgi?id=179656

Unreviewed build fix.

* WebProcess/com.apple.WebProcess.sb.in: Switch to Dan's recommended version check.

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

3 years agoAdd committer status for Emilio Cobos Álvarez.
emilio@crisal.io [Tue, 14 Nov 2017 15:47:11 +0000 (15:47 +0000)]
Add committer status for Emilio Cobos Álvarez.
https://bugs.webkit.org/show_bug.cgi?id=179667

Unreviewed.

* Scripts/webkitpy/common/config/contributors.json:

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

3 years ago[Cairo] Move drawLinesForText operation from GraphicsContextCairo to CairoOperations
zandobersek@gmail.com [Tue, 14 Nov 2017 13:45:09 +0000 (13:45 +0000)]
[Cairo] Move drawLinesForText operation from GraphicsContextCairo to CairoOperations
https://bugs.webkit.org/show_bug.cgi?id=179661

Reviewed by Carlos Garcia Campos.

Encapsulate the drawLinesForText() operation in the WebCore::Cairo
namespace. Apart from moving gist of the code from GraphicsContextCairo
to CairoOperations, we also (for the moment) have to duplicate the
GraphicsContext::computeLineBoundsAndAntialiasingModeForText() code.
This is necessary because the given method is private on the
GraphicsContext class, and relies on an underlying GraphicsContext
object to retrieve the current CTM and stroke thickness values.

The adjusted reimplementation uses PlatformContextCairo to retrieve
the CTM (just like Cairo's GraphicsContext::getCTM() does), and
requires the stroke thickness value to be passed in as an argument.
Similar modifications will be proposed for the existing
GraphicsContext::computeLineBoundsAndAntialiasingModeForText() code,
and once that's approved the duplicated code will be eliminated.

No new tests -- no change in behavior.

* platform/graphics/cairo/CairoOperations.cpp:
(WebCore::Cairo::computeLineBoundsAndAntialiasingModeForText):
(WebCore::Cairo::drawLinesForText):
* platform/graphics/cairo/CairoOperations.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::drawLinesForText):

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

3 years ago[Cairo] Move native image drawing operation to CairoOperations
zandobersek@gmail.com [Tue, 14 Nov 2017 13:42:14 +0000 (13:42 +0000)]
[Cairo] Move native image drawing operation to CairoOperations
https://bugs.webkit.org/show_bug.cgi?id=179660

Reviewed by Carlos Garcia Campos.

Unify the native image drawing operation behavior between the
Cairo-specific GraphicsContext and drawNativeImage() implementations and
then move the code into the Cairo::drawNativeImage() function, inside
the CairoOperations implementation file.

No new tests -- no change in behavior.

* platform/graphics/cairo/CairoOperations.cpp:
(WebCore::Cairo::cairoSurfaceHasAlpha):
(WebCore::Cairo::drawNativeImage):
* platform/graphics/cairo/CairoOperations.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::drawNativeImage):
* platform/graphics/cairo/NativeImageCairo.cpp:
(WebCore::drawNativeImage):

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

3 years agoAdd some bug numbers for failing XHR tests
Ms2ger@igalia.com [Tue, 14 Nov 2017 13:23:55 +0000 (13:23 +0000)]
Add some bug numbers for failing XHR tests
https://bugs.webkit.org/show_bug.cgi?id=179664

Unreviewed test gardening.

* TestExpectations:
* platform/gtk/TestExpectations:
  The two send-entity-body tests were not marked as failing anywhere,
  so the annotations here were superfluous.

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

3 years agoMake the gigacage runway 32GB
sbarati@apple.com [Tue, 14 Nov 2017 09:08:06 +0000 (09:08 +0000)]
Make the gigacage runway 32GB
https://bugs.webkit.org/show_bug.cgi?id=175062

Reviewed by Mark Lam.

Making the gigacage runway 32GB defends us against buffer overflows in the
cage reaching memory outside the cage assuming indices are 32-bit unsigned
integers and the type they're indexing into has size <= 8 bytes. This is
exactly the case for many things in JSC. For example, butterfly access in
JSC meet this criteria, as does typed array access.

The 32GB comes from 8 * 2^32 = 32GB.

* bmalloc/Gigacage.cpp:

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

3 years agoWe need to set topCallFrame when calling Wasm::Memory::grow from the JIT
sbarati@apple.com [Tue, 14 Nov 2017 09:05:33 +0000 (09:05 +0000)]
We need to set topCallFrame when calling Wasm::Memory::grow from the JIT
https://bugs.webkit.org/show_bug.cgi?id=179639
<rdar://problem/35513018>

Reviewed by JF Bastien.

JSTests:

* wasm/function-tests/grow-memory-cause-gc.js: Added.
(escape):
(i.func):

Source/JavaScriptCore:

Calling Wasm::Memory::grow from the JIT may cause us to GC. When we GC, we will
walk the stack for ShadowChicken (and maybe other things). We weren't updating
topCallFrame when calling grow from the Wasm JIT. This would cause the GC to
use stale topCallFrame bits in VM, often leading to crashes. This patch fixes
this bug by giving Wasm::Instance a lambda that is called when we need to store
the topCallFrame. Users of Wasm::Instance can provide a function to do this action.
Currently, JSWebAssemblyInstance passes in a lambda that stores to
VM.topCallFrame.

* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::addGrowMemory):
* wasm/WasmInstance.cpp:
(JSC::Wasm::Instance::Instance):
(JSC::Wasm::Instance::create):
* wasm/WasmInstance.h:
(JSC::Wasm::Instance::storeTopCallFrame):
* wasm/js/JSWebAssemblyInstance.cpp:
(JSC::JSWebAssemblyInstance::create):
* wasm/js/JSWebAssemblyInstance.h:
* wasm/js/WasmToJS.cpp:
(JSC::Wasm::wasmToJSException):
* wasm/js/WebAssemblyInstanceConstructor.cpp:
(JSC::constructJSWebAssemblyInstance):
* wasm/js/WebAssemblyPrototype.cpp:
(JSC::instantiate):

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

3 years ago[Cairo] Perform GraphicsContextPlatformPrivate method calls from CairoOperations
zandobersek@gmail.com [Tue, 14 Nov 2017 08:56:15 +0000 (08:56 +0000)]
[Cairo] Perform GraphicsContextPlatformPrivate method calls from CairoOperations
https://bugs.webkit.org/show_bug.cgi?id=179657

Reviewed by Carlos Garcia Campos.

To enable encapsulating remaining Cairo operations in static functions
inside the WebCore::Cairo namespace, we have to work around the
GraphicsContextPlatformPrivate methods that are invoked in the current
GraphicsContext implementation for Cairo.

A pointer to the GraphicsContextPlatformPrivate object is now kept on
the PlatformContextCairo instance, and we take care of setting it up
and clearing it out appropriate to the GraphicsContextPlatformPrivate
lifetime (as managed in Cairo-specific GraphicsContext implementation).
The GraphicsContextPlatformPrivate method invocations are then moved
to the appropriate CairoOperations functions.

No new tests -- no change in behavior.

* platform/graphics/cairo/CairoOperations.cpp:
(WebCore::Cairo::State::setCTM):
(WebCore::Cairo::save):
(WebCore::Cairo::restore):
(WebCore::Cairo::translate):
(WebCore::Cairo::rotate):
(WebCore::Cairo::scale):
(WebCore::Cairo::concatCTM):
(WebCore::Cairo::clip):
(WebCore::Cairo::clipPath):
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::GraphicsContext):
(WebCore::GraphicsContext::platformInit):
(WebCore::GraphicsContext::platformDestroy):
(WebCore::GraphicsContext::savePlatformState):
(WebCore::GraphicsContext::restorePlatformState):
(WebCore::GraphicsContext::clip):
(WebCore::GraphicsContext::clipPath):
(WebCore::GraphicsContext::translate):
(WebCore::GraphicsContext::concatCTM):
(WebCore::GraphicsContext::setCTM):
(WebCore::GraphicsContext::rotate):
(WebCore::GraphicsContext::scale):
* platform/graphics/cairo/PlatformContextCairo.h:
(WebCore::PlatformContextCairo::graphicsContextPrivate):
(WebCore::PlatformContextCairo::setGraphicsContextPrivate):

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

3 years ago[Cairo] Move simpler draw operations from GraphicsContextCairo to CairoOperations
zandobersek@gmail.com [Tue, 14 Nov 2017 08:50:12 +0000 (08:50 +0000)]
[Cairo] Move simpler draw operations from GraphicsContextCairo to CairoOperations
https://bugs.webkit.org/show_bug.cgi?id=179614

Reviewed by Carlos Garcia Campos.

Move operations that perform simpler drawing to the CairoOperations
file. This isolates the Cairo code and encapsulates operation work
into a limited scope. This patch only covers drawing patterns,
rectangles, document marker lines and ellipses. A missing forward
declaration for the drawGlyphs() function is also added in the
CairoOperations header.

No new tests -- no change in behavior.

* platform/graphics/cairo/CairoOperations.cpp:
(WebCore::Cairo::drawPattern):
(WebCore::Cairo::drawRect):
(WebCore::Cairo::drawLineForDocumentMarker):
(WebCore::Cairo::drawEllipse):
* platform/graphics/cairo/CairoOperations.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::drawRect):
(WebCore::GraphicsContext::drawEllipse):
(WebCore::GraphicsContext::drawLineForDocumentMarker):
(WebCore::GraphicsContext::drawPattern):

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

3 years agoWeb Inspector: Cleanup navigation bar dividers and separators
mattbaker@apple.com [Tue, 14 Nov 2017 08:49:13 +0000 (08:49 +0000)]
Web Inspector: Cleanup navigation bar dividers and separators
https://bugs.webkit.org/show_bug.cgi?id=179654
<rdar://problem/35523734>

Reviewed by Devin Rousso.

Update path separator icon, and reduce number of dividers used in the
content browser's navigation bar, to more closely match modern Xcode.

* UserInterface/Images/HierarchicalNavigationItemChevron.svg:
Update icon, remove tapered arrow head.

* UserInterface/Views/ContentBrowser.js:
(WI.ContentBrowser):
Remove divider between back/forward buttons and item name.
(WI.ContentBrowser.prototype._updateContentViewNavigationItems):

* UserInterface/Views/HierarchicalPathComponent.css:
(.hierarchical-path-component > .separator):

* UserInterface/Views/LogContentView.js:
(WI.LogContentView.prototype.get navigationItems):
Remove dividers between buttons provided by the current content view.

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

3 years agoGive a ServiceWorker WebContentProcess a different display name
commit-queue@webkit.org [Tue, 14 Nov 2017 07:34:06 +0000 (07:34 +0000)]
Give a ServiceWorker WebContentProcess a different display name
https://bugs.webkit.org/show_bug.cgi?id=179653

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-11-13
Reviewed by Brady Eidson.

Source/WebCore:

* English.lproj/Localizable.strings:

Source/WebKit:

* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::create):
Call connect after construction so virtual methods will use subclass implementations.

* UIProcess/ServiceWorkerProcessProxy.h:
* UIProcess/ServiceWorkerProcessProxy.cpp:
(WebKit::ServiceWorkerProcessProxy::create):
Copy the pattern from WebProcessProxy to ensure connect() gets called after construction.

(WebKit::ServiceWorkerProcessProxy::getLaunchOptions):
Set a launch option to signal this is a Service Worker process.

* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
(WebKit::XPCServiceInitializerDelegate::getExtraInitializationData):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::initializeProcessName):
Consume the launch option to configuration the process name.

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

3 years agoREGRESSION(r224799): WebKit crashes at launch on macOS Sierra due to a sandbox violation
rniwa@webkit.org [Tue, 14 Nov 2017 07:26:35 +0000 (07:26 +0000)]
REGRESSION(r224799): WebKit crashes at launch on macOS Sierra due to a sandbox violation
https://bugs.webkit.org/show_bug.cgi?id=179656

Unreviewed. Revert r224799 on macOS Sierra.

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

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

3 years agoSend ServiceWorkerData structs to the WebProcesses instead of ServiceWorkerIdentifiers
cdumez@apple.com [Tue, 14 Nov 2017 06:21:43 +0000 (06:21 +0000)]
Send ServiceWorkerData structs to the WebProcesses instead of ServiceWorkerIdentifiers
https://bugs.webkit.org/show_bug.cgi?id=179649

Reviewed by Brady Eidson.

LayoutTests/imported/w3c:

Rebaseline a couple of WPT tests that are now passing.

* web-platform-tests/service-workers/service-worker/register-wait-forever-in-install-worker.https-expected.txt:
* web-platform-tests/service-workers/service-worker/skip-waiting.https-expected.txt:

Source/WebCore:

Send ServiceWorkerData structs to the WebProcesses instead of ServiceWorkerIdentifiers so that the
WebProcesses can correctly construct ServiceWorker objects, with the right attributes / state.

No new tests, rebaselined existing tests.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* workers/service/ServiceWorker.cpp:
(WebCore::ServiceWorker::getOrCreate):
(WebCore::ServiceWorker::ServiceWorker):
(WebCore::ServiceWorker::~ServiceWorker):
(WebCore::ServiceWorker::scheduleTaskToUpdateState):
(WebCore::ServiceWorker::postMessage):
* workers/service/ServiceWorker.h:
* workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::scheduleTaskToUpdateRegistrationState):
* workers/service/ServiceWorkerContainer.h:
* workers/service/ServiceWorkerData.cpp: Copied from Source/WebCore/workers/service/ServiceWorkerRegistrationData.cpp.
(WebCore::ServiceWorkerData::isolatedCopy const):
* workers/service/ServiceWorkerData.h: Copied from Source/WebCore/workers/service/server/SWServerWorker.cpp.
(WebCore::ServiceWorkerData::encode const):
(WebCore::ServiceWorkerData::decode):
* workers/service/ServiceWorkerRegistration.cpp:
(WebCore::ServiceWorkerRegistration::ServiceWorkerRegistration):
(WebCore::ServiceWorkerRegistration::updateStateFromServer):
* workers/service/ServiceWorkerRegistration.h:
* workers/service/ServiceWorkerRegistrationData.cpp:
(WebCore::ServiceWorkerRegistrationData::isolatedCopy const):
* workers/service/ServiceWorkerRegistrationData.h:
(WebCore::ServiceWorkerRegistrationData::encode const):
(WebCore::ServiceWorkerRegistrationData::decode):
* workers/service/server/SWClientConnection.cpp:
(WebCore::SWClientConnection::postMessageToServiceWorkerClient):
(WebCore::SWClientConnection::updateRegistrationState):
* workers/service/server/SWClientConnection.h:
* workers/service/server/SWServer.h:
* workers/service/server/SWServerRegistration.cpp:
(WebCore::SWServerRegistration::updateRegistrationState):
(WebCore::SWServerRegistration::data const):
* workers/service/server/SWServerWorker.cpp:
(WebCore::SWServerWorker::SWServerWorker):
(WebCore::m_script):
* workers/service/server/SWServerWorker.h:
(WebCore::SWServerWorker::scriptURL const):
(WebCore::SWServerWorker::type const):
(WebCore::SWServerWorker::identifier const):
(WebCore::SWServerWorker::state const):
(WebCore::SWServerWorker::setState):
(WebCore::SWServerWorker::data const):

Source/WebKit:

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

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

3 years agoiOS: Enable release asserts in updateStyleIfNeeded() and updateLayout() for WebKit2
rniwa@webkit.org [Tue, 14 Nov 2017 06:03:07 +0000 (06:03 +0000)]
iOS: Enable release asserts in updateStyleIfNeeded() and updateLayout() for WebKit2
https://bugs.webkit.org/show_bug.cgi?id=179651

Reviewed by Antti Koivisto.

r224604 disabled the release assertions on iOS entirely even though the underlying bug only affected iOS WebKit1 port
due to various time constraints. Enable them back on iOS WebKit2 port.

* dom/Document.cpp:
(WebCore::isSafeToUpdateStyleOrLayout):
(WebCore::Document::updateStyleIfNeeded):
(WebCore::Document::updateLayout):

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

3 years agoRemove pointer caging for HashMapImpl, JSLexicalEnvironment, DirectArguments, ScopedA...
sbarati@apple.com [Tue, 14 Nov 2017 05:33:30 +0000 (05:33 +0000)]
Remove pointer caging for HashMapImpl, JSLexicalEnvironment, DirectArguments, ScopedArguments, and ScopedArgumentsTable
https://bugs.webkit.org/show_bug.cgi?id=179203

Reviewed by Yusuke Suzuki.

This patch only removes the pointer caging for the described types in the title.
These types still allocate out of the gigacage. This is a just a cost vs benefit
tradeoff of performance vs security.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileGetByValOnDirectArguments):
(JSC::DFG::SpeculativeJIT::compileGetByValOnScopedArguments):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emitDirectArgumentsGetByVal):
(JSC::JIT::emitScopedArgumentsGetByVal):
* runtime/DirectArguments.h:
(JSC::DirectArguments::storage):
* runtime/HashMapImpl.cpp:
(JSC::HashMapImpl<HashMapBucket>::visitChildren):
* runtime/HashMapImpl.h:
* runtime/JSLexicalEnvironment.h:
(JSC::JSLexicalEnvironment::variables):
* runtime/ScopedArguments.h:
(JSC::ScopedArguments::overflowStorage const):

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

3 years agoMassive "Server-process-to-context-process" connection overhaul.
beidson@apple.com [Tue, 14 Nov 2017 03:58:01 +0000 (03:58 +0000)]
Massive "Server-process-to-context-process" connection overhaul.
https://bugs.webkit.org/show_bug.cgi?id=179554

Reviewed by Chris Dumez.

Source/WebCore:

No new tests (Refactor, no behavior change).

Having the SWServer::Connection object be overloaded to mean both client->server and server->context
was the wrong design and was starting to crumble under its own weight.

So this patch introduces a SWServerToContextConnection to manage the StorageProcess-side of connections
to context processes.

Any message that is specifically about the connection between the StorageProcess and context process
should use this connection going forward.

Right now there is only one context process, but this design keeps us ready for that to change.

This patch also gets rid of a lot of "server connection identifier" integers being passed amongst processes
that were actually pointless.

This patch is also a prerequisite for many things that are coming up soon, such as termination.

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

* workers/service/ServiceWorkerContextData.cpp:
(WebCore::ServiceWorkerContextData::isolatedCopy const):
* workers/service/ServiceWorkerContextData.h:
(WebCore::ServiceWorkerContextData::encode const):
(WebCore::ServiceWorkerContextData::decode):

* workers/service/ServiceWorkerGlobalScope.cpp:
(WebCore::ServiceWorkerGlobalScope::ServiceWorkerGlobalScope):
* workers/service/ServiceWorkerGlobalScope.h:
(WebCore::ServiceWorkerGlobalScope::serverConnectionIdentifier const): Deleted.

* workers/service/ServiceWorkerTypes.h:

* workers/service/context/ServiceWorkerThread.cpp:
(WebCore::ServiceWorkerThread::ServiceWorkerThread):
(WebCore::ServiceWorkerThread::createWorkerGlobalScope):
* workers/service/context/ServiceWorkerThread.h:
(WebCore::ServiceWorkerThread::serverConnectionIdentifier const): Deleted.

* workers/service/context/ServiceWorkerThreadProxy.cpp:
(WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy):
(WebCore::ServiceWorkerThreadProxy::create): Deleted.
* workers/service/context/ServiceWorkerThreadProxy.h:

* workers/service/server/SWServer.cpp:
(WebCore::generateServiceWorkerIdentifier):
(WebCore::SWServer::~SWServer):
(WebCore::SWServer::SWServer):
(WebCore::SWServer::scriptContextFailedToStart):
(WebCore::SWServer::scriptContextStarted):
(WebCore::SWServer::didFinishInstall):
(WebCore::SWServer::didFinishActivation):
(WebCore::SWServer::didResolveRegistrationPromise):
(WebCore::SWServer::updateWorker):
(WebCore::SWServer::serverToContextConnectionCreated):
(WebCore::SWServer::installContextData):
(WebCore::SWServer::fireInstallEvent):
(WebCore::SWServer::fireActivateEvent):
(WebCore::SWServer::Connection::didFinishInstall): Deleted.
(WebCore::SWServer::Connection::didFinishActivation): Deleted.
(WebCore::SWServer::Connection::setServiceWorkerHasPendingEvents): Deleted.
(WebCore::SWServer::Connection::scriptContextFailedToStart): Deleted.
(WebCore::SWServer::Connection::scriptContextStarted): Deleted.
(WebCore::SWServer::setServiceWorkerHasPendingEvents): Deleted.
* workers/service/server/SWServer.h:

* workers/service/server/SWServerJobQueue.cpp:
(WebCore::SWServerJobQueue::scriptContextFailedToStart):
(WebCore::SWServerJobQueue::scriptContextStarted):
(WebCore::SWServerJobQueue::install):
(WebCore::SWServerJobQueue::didResolveRegistrationPromise):
(WebCore::SWServerJobQueue::didFinishInstall):
(WebCore::SWServerJobQueue::tryActivate):
(WebCore::SWServerJobQueue::activate):
* workers/service/server/SWServerJobQueue.h:

* workers/service/server/SWServerRegistration.cpp:
(WebCore::generateServiceWorkerRegistrationIdentifier):

* workers/service/server/SWServerToContextConnection.cpp: Added.
(WebCore::generateServerToContextConnectionIdentifier):
(WebCore::SWServerToContextConnection::SWServerToContextConnection):
(WebCore::SWServerToContextConnection::~SWServerToContextConnection):
(WebCore::SWServerToContextConnection::connectionForIdentifier):
(WebCore::SWServerToContextConnection::globalServerToContextConnection):
(WebCore::SWServerToContextConnection::scriptContextFailedToStart):
(WebCore::SWServerToContextConnection::scriptContextStarted):
(WebCore::SWServerToContextConnection::didFinishInstall):
(WebCore::SWServerToContextConnection::didFinishActivation):
(WebCore::SWServerToContextConnection::setServiceWorkerHasPendingEvents):
* workers/service/server/SWServerToContextConnection.h: Copied from Source/WebCore/workers/service/server/SWServerWorker.h.
(WebCore::SWServerToContextConnection::identifier const):

* workers/service/server/SWServerWorker.cpp:
(WebCore::SWServerWorker::existingWorkerForIdentifier):
(WebCore::SWServerWorker::SWServerWorker):
(WebCore::SWServerWorker::~SWServerWorker):
(WebCore::SWServerWorker::scriptContextFailedToStart):
(WebCore::SWServerWorker::scriptContextStarted):
(WebCore::SWServerWorker::didFinishInstall):
(WebCore::SWServerWorker::didFinishActivation):
* workers/service/server/SWServerWorker.h:
(WebCore::SWServerWorker::create):
(WebCore::SWServerWorker::registrationKey const):
(WebCore::SWServerWorker::contextConnectionIdentifier const):

Source/WebKit:

* DerivedSources.make:
* WebKit.xcodeproj/project.pbxproj:

* Shared/WebCoreArgumentCoders.h:

* StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::sendToContextProcess):
(WebKit::WebSWServerConnection::installServiceWorkerContext): Deleted.
(WebKit::WebSWServerConnection::fireInstallEvent): Deleted.
(WebKit::WebSWServerConnection::fireActivateEvent): Deleted.
(WebKit::WebSWServerConnection::setContextConnection): Deleted.
* StorageProcess/ServiceWorker/WebSWServerConnection.h:

* StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp: Copied from Source/WebCore/workers/service/server/SWServerWorker.cpp.
(WebKit::WebSWServerToContextConnection::WebSWServerToContextConnection):
(WebKit::WebSWServerToContextConnection::messageSenderConnection):
(WebKit::WebSWServerToContextConnection::messageSenderDestinationID):
(WebKit::WebSWServerToContextConnection::connectionClosed):
(WebKit::WebSWServerToContextConnection::installServiceWorkerContext):
(WebKit::WebSWServerToContextConnection::fireInstallEvent):
(WebKit::WebSWServerToContextConnection::fireActivateEvent):
* StorageProcess/ServiceWorker/WebSWServerToContextConnection.h: Copied from Source/WebCore/workers/service/ServiceWorkerTypes.h.
(WebKit::WebSWServerToContextConnection::create):
(WebKit::WebSWServerToContextConnection::ipcConnection const):
* StorageProcess/ServiceWorker/WebSWServerToContextConnection.messages.in: Copied from Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.messages.in.

* StorageProcess/StorageProcess.cpp:
(WebKit::StorageProcess::didClose):
(WebKit::StorageProcess::didReceiveMessage):
(WebKit::StorageProcess::globalServerToContextConnection):
(WebKit::StorageProcess::createServerToContextConnection):
(WebKit::StorageProcess::didGetWorkerContextProcessConnection):
(WebKit::StorageProcess::workerContextProcessConnection): Deleted.
(WebKit::StorageProcess::createWorkerContextProcessConnection): Deleted.
(WebKit::StorageProcess::serviceWorkerContextFailedToStart): Deleted.
(WebKit::StorageProcess::serviceWorkerContextStarted): Deleted.
(WebKit::StorageProcess::didFinishServiceWorkerInstall): Deleted.
(WebKit::StorageProcess::didFinishServiceWorkerActivation): Deleted.
(WebKit::StorageProcess::setServiceWorkerHasPendingEvents): Deleted.
* StorageProcess/StorageProcess.h:
* StorageProcess/StorageProcess.messages.in:

* StorageProcess/StorageToWebProcessConnection.cpp:
(WebKit::StorageToWebProcessConnection::didReceiveMessage):
(WebKit::StorageToWebProcessConnection::establishSWServerConnection):
(WebKit::StorageToWebProcessConnection::workerContextProcessConnectionCreated):

* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::installServiceWorker):
(WebKit::WebSWContextManagerConnection::serviceWorkerStartedWithMessage):
(WebKit::WebSWContextManagerConnection::fireInstallEvent):
(WebKit::WebSWContextManagerConnection::fireActivateEvent):
(WebKit::WebSWContextManagerConnection::didFinishInstall):
(WebKit::WebSWContextManagerConnection::didFinishActivation):
(WebKit::WebSWContextManagerConnection::setServiceWorkerHasPendingEvents):
* WebProcess/Storage/WebSWContextManagerConnection.h:
* WebProcess/Storage/WebSWContextManagerConnection.messages.in:

Source/WTF:

* wtf/ObjectIdentifier.h:
(WTF::generateObjectIdentifier):
(WTF::makeObjectIdentifier): Deleted.

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

3 years agoPass --useDollarVM=true to all JSC tests.
mark.lam@apple.com [Tue, 14 Nov 2017 02:59:37 +0000 (02:59 +0000)]
Pass --useDollarVM=true to all JSC tests.
https://bugs.webkit.org/show_bug.cgi?id=179647

Reviewed by Saam Barati.

* Scripts/run-jsc-stress-tests:

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

3 years agoWebContent sandbox should not include 'system.sb'
bfulgham@apple.com [Tue, 14 Nov 2017 02:58:36 +0000 (02:58 +0000)]
WebContent sandbox should not include 'system.sb'
https://bugs.webkit.org/show_bug.cgi?id=179548
<rdar://problem/35367154>

Reviewed by Darin Adler.

Stop including 'system.sb', and just include the portions of that sandbox that we
actually use in WebContent Process. This is the first step in some further sandbox
tightening.

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

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

3 years agoUnreviewed build fix after r224791.
don.olmstead@sony.com [Tue, 14 Nov 2017 02:39:29 +0000 (02:39 +0000)]
Unreviewed build fix after r224791.

* platform/network/NetworkStorageSessionStub.cpp:
(WebCore::NetworkStorageSession::ensurePrivateBrowsingSession): Deleted.

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

3 years agoMinor DisplayRefreshMonitor-related cleanup
simon.fraser@apple.com [Tue, 14 Nov 2017 02:28:36 +0000 (02:28 +0000)]
Minor DisplayRefreshMonitor-related cleanup
https://bugs.webkit.org/show_bug.cgi?id=179648

Reviewed by Alex Christensen.

Use more "#pragma once" and C++ initializers.

Make more member functions of DisplayRefreshMonitor protected.

Improve the ordering of member variables.

Don't mix member variables and member functions in the declaration of ScriptedAnimationController.

* dom/ScriptedAnimationController.h:
* platform/graphics/DisplayRefreshMonitor.cpp:
(WebCore::DisplayRefreshMonitor::DisplayRefreshMonitor):
(WebCore::DisplayRefreshMonitor::displayDidRefresh):
* platform/graphics/DisplayRefreshMonitor.h:
(WebCore::DisplayRefreshMonitor::mutex):
* platform/graphics/DisplayRefreshMonitorManager.h:
* platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
(WebCore::DisplayRefreshMonitorMac::DisplayRefreshMonitorMac):
* platform/graphics/mac/DisplayRefreshMonitorMac.h:

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

3 years agoWhen navigating back to a page, compositing layers may not use accelerated drawing
simon.fraser@apple.com [Tue, 14 Nov 2017 02:01:40 +0000 (02:01 +0000)]
When navigating back to a page, compositing layers may not use accelerated drawing
https://bugs.webkit.org/show_bug.cgi?id=178749
rdar://problem/35158946

Reviewed by Dean Jackson.
Source/WebCore:

There were two issues with setting GraphicsLayerCA's "acceleratesDrawing" state which
occurred on back navigation, related to the ordering of style recalcs and layout.

First, at style recalc time, we created a RenderLayerCompositor but hadn't yet called
its cacheAcceleratedCompositingFlags(), so any layers created during style update
didn't get accelerated drawing. Fix by making cacheAcceleratedCompositingFlags() internal
to RenderLayerCompositor and calling it from willRecalcStyle() and updateCompositingLayers().

We have to be careful to avoid m_forceCompositingMode flip-flopping between cacheAcceleratedCompositingFlags()
and cacheAcceleratedCompositingFlagsAfterLayout(), since, for subframes, it depends on layout.

Secondly, GraphicsLayerCA::commitLayerChangesBeforeSublayers() needs to updateAcceleratesDrawing()
before updating tiles, so that new tiles fetch the right acceleratesDrawing state from
the TileController.

Test: compositing/accelerated-layers-after-back.html

* page/FrameView.cpp:
(WebCore::FrameView::updateCompositingLayersAfterLayout):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::willRecalcStyle):
(WebCore::RenderLayerCompositor::didRecalcStyleWithNoPendingLayout):
(WebCore::RenderLayerCompositor::updateCompositingLayers):
* rendering/RenderLayerCompositor.h:

Source/WebKit:

Avoid assertions when a test enables accelerated drawing (which we can't support
in the iOS simulator).

* Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::ensureBackingStore):

Tools:

Fix WTR and DRT to parse "useAcceleratedDrawing" out of "webkit-test-runner" options
and use it to set the state of the web view.

* DumpRenderTree/TestOptions.h:
* DumpRenderTree/TestOptions.mm:
(TestOptions::TestOptions):
* DumpRenderTree/mac/DumpRenderTree.mm:
(setWebPreferencesForTestOptions):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::hasSameInitializationOptions const):

LayoutTests:

Moved iframes/resources/page-cache-helper.html up to compositing/resources/go-back.html.

* compositing/accelerated-layers-after-back-expected.txt: Added.
* compositing/accelerated-layers-after-back.html: Added.
* compositing/iframes/page-cache-layer-tree.html:
* compositing/page-cache-back-crash.html:
* compositing/resources/go-back.html: Renamed from LayoutTests/compositing/iframes/resources/page-cache-helper.html.
* platform/ios/compositing/accelerated-layers-after-back-expected.txt: Added.

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

3 years ago[Windows] Fix Python error for subprocess.popen with close_fds
commit-queue@webkit.org [Tue, 14 Nov 2017 00:55:41 +0000 (00:55 +0000)]
[Windows] Fix Python error for subprocess.popen with close_fds
https://bugs.webkit.org/show_bug.cgi?id=179553

Patch by Basuke Suzuki <Basuke.Suzuki@sony.com> on 2017-11-13
Reviewed by Per Arne Vollan.

* Scripts/webkitpy/port/server_process.py:
(ServerProcess._start):
(ServerProcess._should_close_fds):

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

3 years agoDisable two Modern EME LayoutTests on mac-wk1 until the feature is enabled in DumpRe...
ryanhaddad@apple.com [Tue, 14 Nov 2017 00:49:06 +0000 (00:49 +0000)]
Disable two Modern EME LayoutTests on mac-wk1  until the feature is enabled in DumpRenderTree.
https://bugs.webkit.org/show_bug.cgi?id=179544

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

3 years ago[GTK] Require woff2 1.0.2 and drop direct brotli dependency
mcatanzaro@igalia.com [Tue, 14 Nov 2017 00:42:20 +0000 (00:42 +0000)]
[GTK] Require woff2 1.0.2 and drop direct brotli dependency
https://bugs.webkit.org/show_bug.cgi?id=179630

Reviewed by Frédéric Wang.

.:

* Source/cmake/FindBrotliDec.cmake: Removed.
* Source/cmake/OptionsGTK.cmake:

Tools:

* gtk/jhbuild.modules:

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

3 years agomatchRegistration does not need to go to StorageProcess if no service worker is regis...
commit-queue@webkit.org [Tue, 14 Nov 2017 00:20:25 +0000 (00:20 +0000)]
matchRegistration does not need to go to StorageProcess if no service worker is registered
https://bugs.webkit.org/show_bug.cgi?id=179480

Patch by Youenn Fablet <youenn@apple.com> on 2017-11-13
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

* web-platform-tests/service-workers/service-worker/activation.https-expected.txt:
* web-platform-tests/service-workers/service-worker/activation.https.html:
* web-platform-tests/service-workers/service-worker/registration-iframe.https.html:

Source/WebCore:

Covered by existing tests.

Moving the origin store in SWServer since they share the same session ID.
This allows updating the origin store based on each registration map update.
This also allows clearing the origin store when clearing the SWServer.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* workers/service/server/SWOriginStore.cpp: Added.
(WebCore::SWOriginStore::add):
(WebCore::SWOriginStore::remove):
(WebCore::SWOriginStore::clear):
(WebCore::SWOriginStore::clearAll):
* workers/service/server/SWOriginStore.h: Added.
* workers/service/server/SWServer.cpp:
(WebCore::SWServer::addRegistration):
(WebCore::SWServer::removeRegistration):
(WebCore::SWServer::OriginStore::add):
(WebCore::SWServer::OriginStore::remove):
(WebCore::SWServer::OriginStore::clear):
(WebCore::SWServer::OriginStore::clearAll):
(WebCore::SWServer::clearAll):
(WebCore::SWServer::clear):
(WebCore::SWServer::SWServer):
* workers/service/server/SWServer.h:
(WebCore::SWServer::originStore):

Source/WebKit:

Removed origin store handling from StorageProcess since it is now handled within SWServer.
Updated clearing of web site data accordingly.
Optimized matchRegistration by looking at the origin store before doing any IPC.
Do IPC to the StorageProcess if the origin store is not yet initialized on the WebProcess.

* StorageProcess/ServiceWorker/WebSWOriginStore.h:
* StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::resolveRegistrationJobInClient):
(WebKit::WebSWServerConnection::resolveUnregistrationJobInClient):
* StorageProcess/StorageProcess.cpp:
(WebKit::StorageProcess::deleteWebsiteData):
(WebKit::StorageProcess::deleteWebsiteDataForOrigins):
(WebKit::StorageProcess::swServerForSession):
(WebKit::StorageProcess::swOriginStoreForSession):
(WebKit::StorageProcess::registerSWServerConnection):
(WebKit::StorageProcess::unregisterSWServerConnection):
(WebKit::StorageProcess::ensureSWOriginStoreForSession): Deleted.
(WebKit::StorageProcess::swOriginStoreForSession const): Deleted.
* StorageProcess/StorageProcess.h:
* StorageProcess/ServiceWorker/WebSWOriginStore.cpp:
(WebKit::WebSWOriginStore::addToStore):
(WebKit::WebSWOriginStore::removeFromStore):
(WebKit::WebSWOriginStore::clearStore):
(WebKit::WebSWOriginStore::add): Deleted.
(WebKit::WebSWOriginStore::remove): Deleted.
(WebKit::WebSWOriginStore::clear): Deleted.
* StorageProcess/ServiceWorker/WebSWOriginStore.h:
* WebProcess/Storage/WebSWClientConnection.cpp:
(WebKit::WebSWClientConnection::matchRegistration):

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

3 years agoMerge NetworkProcess::EnsurePrivateBrowsingSession and NetworkProcess::AddWebsiteData...
achristensen@apple.com [Mon, 13 Nov 2017 23:50:47 +0000 (23:50 +0000)]
Merge NetworkProcess::EnsurePrivateBrowsingSession and NetworkProcess::AddWebsiteDataStore into one message type
https://bugs.webkit.org/show_bug.cgi?id=178751

Reviewed by Brady Eidson.

Source/WebCore:

The creation of private browsing sessions and persistent browsing sessions has evolved to be the same thing
with differences in parameters, like no sandbox extensions or paths to persistent storage locations for private browsing.
These should be united to simplify future development of WebsiteDataStore construction.

* platform/network/NetworkStorageSession.h:
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::NetworkStorageSession::ensurePrivateBrowsingSession): Deleted.
* platform/network/soup/NetworkStorageSessionSoup.cpp:
(WebCore::NetworkStorageSession::ensureSession):
(WebCore::NetworkStorageSession::ensurePrivateBrowsingSession): Deleted.

Source/WebKit:

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::ensureLegacyPrivateBrowsingSession):
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::ensurePrivateBrowsingSession): Deleted.
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/RemoteNetworkingContext.h:
* NetworkProcess/mac/RemoteNetworkingContext.mm:
(WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):
(WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession): Deleted.
* Shared/WebsiteDataStoreParameters.cpp:
(WebKit::WebsiteDataStoreParameters::legacyPrivateSessionParameters):
* Shared/WebsiteDataStoreParameters.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled):
(WebKit::WebProcessPool::createNewWebProcess):
(WebKit::WebProcessPool::pageAddedToProcess):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setPrivateBrowsingEnabled):
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession):
(WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession): Deleted.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setSessionID):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::ensurePrivateBrowsingSession): Deleted.
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:

Source/WebKitLegacy/mac:

* WebCoreSupport/WebFrameNetworkingContext.mm:
(WebFrameNetworkingContext::ensurePrivateBrowsingSession):

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

3 years agoAdd logs to debug content extension test failures
achristensen@apple.com [Mon, 13 Nov 2017 23:25:00 +0000 (23:25 +0000)]
Add logs to debug content extension test failures
https://bugs.webkit.org/show_bug.cgi?id=179624

Reviewed by Chris Dumez.

* UIProcess/API/APIContentRuleListStore.cpp:
(API::compiledToFile):
Right now I'm seeing this log:
"Rule list compilation failed: Unspecified error during compile."
I need more information to debug what is failing on the bots.

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

3 years agoWeb Automation: inViewCenterPoint should not include topContentInset when computed...
bburg@apple.com [Mon, 13 Nov 2017 23:21:31 +0000 (23:21 +0000)]
Web Automation: inViewCenterPoint should not include topContentInset when computed in viewport coordinates
https://bugs.webkit.org/show_bug.cgi?id=179129
<rdar://problem/35297038>

Reviewed by Simon Fraser.

Source/WebCore:

Add or export some helpers needed to compute element layout for WebDriver.

* dom/Element.h: Export the non-DOM version of getClientBounds().
* page/FrameView.h:
* page/FrameView.cpp:
(WebCore::FrameView::clientToDocumentRect const):
Added. This does the same thing as clientToDocumentPoint. Export it, too.

Source/WebDriver:

Adjust code to use the proper coordinate system when requesting element layout.

* Session.cpp:
(WebDriver::Session::computeElementLayout):

Source/WebKit:

When computing the in view center point per W3C specification, the top content inset
is inadvertently added back in when converting to the root view coordinate system.

This patch reworks the protocol command so that it explicitly requests a coordinate
system, with options for "Page" (root / contents), "LayoutViewport", and "VisualViewport".
The latter is not implemented in this patch, since it is intended for use on iOS someday.

* UIProcess/Automation/Automation.json:
Change usesViewport to CoordinateSystem.
Add a new coordinate system enum type and use it.
Fix relevant comments for Automation.computElementLayout.

* UIProcess/Automation/WebAutomationSession.h:
* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::protocolStringToCoordinateSystem):
(WebKit::WebAutomationSession::computeElementLayout):
Parse the requested coordinate system and send it in the message to the web process.

* WebKit.xcodeproj/project.pbxproj:
* WebProcess/Automation/WebAutomationSessionProxy.messages.in:
* WebProcess/Automation/WebAutomationSessionProxy.h:
* WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::WebAutomationSessionProxy::computeElementLayout):
Rework the implementation. Get the element bounds and in-view center point in
client coordinates and convert back to root view coordinates for CoordinateSystem::Page.

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

3 years agoWeb Inspector: Include a NetworkAgent in ServiceWorkers for network debugging
joepeck@webkit.org [Mon, 13 Nov 2017 23:15:57 +0000 (23:15 +0000)]
Web Inspector: Include a NetworkAgent in ServiceWorkers for network debugging
https://bugs.webkit.org/show_bug.cgi?id=179513
<rdar://problem/35456402>

Reviewed by Brian Burg.

In order to show Network requests for a ServiceWorker, we need to add
inspector networking hooks for Worker loads. While we show Network
requests for DedicatedWorkers, we do that through the Page during Page
inspection. In ServiceWorker inspection, the remote connection is
connected to the ServiceWorkerThreadProxy, and interacts with the
WorkerGlobalScope without making any assumptions about a Page existing.
We don't want to make any assumptions about a Page/Document being needed
for Network hooks, so we should add new hooks that will work in the
WorkerGlobalScope's context.

This patch adds InspectorInstrumentation networking hooks for workers inside
of the WorkerThreadableLoader bridge. This is where the majority of Worker
initiated network requests happen (Fetch/XHR, but not WebSockets). The hooks
are simpler versions of the existing network hooks for a Page, and allow for
complete inspector networking information (will send, did receive response,
did receive data, success, failure, and timing metrics).

This patch generalizes InspectorNetworkAgent to work for a Page and Worker.
Some of the existing functionality was specific to a Page (frameId/loaderId)
but did not make sense for a Worker. In order to handle these cases, all
of the unique logic was extracted out into virtual methods that subclasses
PageNetworkAgent and WorkerNetworkAgent provide as appropriate. The majority
of NetworkAgent remains unchanged and algorithms are shared.

We needed to change the existing InspectorInstrumentation networking hooks
to allow for an optional DocumentLoader. This way we can keep all of the
same hooks leading inside of NetworkAgent, but loads for a Page will have a
DocumentLoader, and loads for a ServiceWorker will not.

While the WorkerNetworkAgent would work for a DedicatedWorker, we still
only create it for a ServiceWorker. The existing behavior of showing Network
loads for a DedicatedWorker will continue to go through the Page inspector
so we can avoid creating a NetworkAgent for DedicatedWorkers. If we created
a way to directly inspect a DedicatedWorker we could look at making this
always available, but it would require extra work to function perfectly.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorAllInOne.cpp:
Add new files.

* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
(WebCore::InspectorController::createLazyAgents):
Switch from InspectorNetworkAgent to PageNetworkAgent.

* inspector/WorkerInspectorController.h:
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::WorkerInspectorController):
(WebCore::WorkerInspectorController::workerAgentContext):
(WebCore::WorkerInspectorController::createLazyAgents):
Create a WorkerNetworkAgent when inside of a ServiceWorker.
Also start the lazy agent pattern for agents that can defer
creation until a frontend attached.

(WebCore::WorkerInspectorController::connectFrontend):
(WebCore::WorkerInspectorController::disconnectFrontend):
When frontends connect/disconnect toggle the necessary states.
Also start the execution stopwatch, otherwise it will always be at 0.

* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::willSendRequestImpl):
(WebCore::InspectorInstrumentation::willSendRequestOfTypeImpl):
(WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
(WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
(WebCore::InspectorInstrumentation::didFinishLoadingImpl):
(WebCore::InspectorInstrumentation::didFailLoadingImpl):
(WebCore::InspectorInstrumentation::frameDetachedFromParentImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::willSendRequest):
(WebCore::InspectorInstrumentation::didReceiveResourceResponse):
(WebCore::InspectorInstrumentation::didReceiveData):
(WebCore::InspectorInstrumentation::didFinishLoading):
(WebCore::InspectorInstrumentation::didFailLoading):
Add Worker networking hooks that pass through to the same general hooks.

* loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishLoading):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFail):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishTiming):
* loader/WorkerThreadableLoader.h:
Use the new worker networking instrumentation hooks.

* loader/ThreadableLoader.cpp:
(WebCore::ThreadableLoader::create):
Drive-by: use a move.
* inspector/agents/InspectorNetworkAgent.h:
* inspector/agents/InspectorNetworkAgent.cpp:
(WebCore::InspectorNetworkAgent::InspectorNetworkAgent):
(WebCore::InspectorNetworkAgent::willSendRequest):
(WebCore::InspectorNetworkAgent::willSendRequestOfType):
(WebCore::InspectorNetworkAgent::didReceiveResponse):
(WebCore::InspectorNetworkAgent::didFinishLoading):
(WebCore::InspectorNetworkAgent::didFailLoading):
(WebCore::InspectorNetworkAgent::didLoadResourceFromMemoryCache):
(WebCore::InspectorNetworkAgent::buildInitiatorObject):
(WebCore::InspectorNetworkAgent::enable):
(WebCore::InspectorNetworkAgent::disable):
(WebCore::InspectorNetworkAgent::setResourceCachingDisabled):
(WebCore::InspectorNetworkAgent::loadResource):
(WebCore::InspectorNetworkAgent::webSocketForRequestId):
(WebCore::InspectorNetworkAgent::resolveWebSocket):
(WebCore::InspectorNetworkAgent::mainFrameNavigated):
Extract logic for subclasses. Transition to DocumentLoader being null.

* inspector/agents/page/PageNetworkAgent.h:
* inspector/agents/page/PageNetworkAgent.cpp: Added.
(WebCore::PageNetworkAgent::PageNetworkAgent):
(WebCore::PageNetworkAgent::loaderIdentifier):
(WebCore::PageNetworkAgent::frameIdentifier):
(WebCore::PageNetworkAgent::setResourceCachingDisabled):
(WebCore::PageNetworkAgent::scriptExecutionContext):
Extracted Page implementation. This is just moving from the original.

* inspector/agents/worker/WorkerNetworkAgent.h:
* inspector/agents/worker/WorkerNetworkAgent.cpp:
(WebCore::WorkerNetworkAgent::WorkerNetworkAgent):
(WebCore::WorkerNetworkAgent::loaderIdentifier):
(WebCore::WorkerNetworkAgent::frameIdentifier):
(WebCore::WorkerNetworkAgent::setResourceCachingDisabled):
(WebCore::WorkerNetworkAgent::scriptExecutionContext):
Implement for a worker.

* inspector/agents/worker/WorkerDebuggerAgent.cpp:
(WebCore::WorkerDebuggerAgent::WorkerDebuggerAgent):
* inspector/agents/worker/WorkerConsoleAgent.cpp:
(WebCore::WorkerConsoleAgent::WorkerConsoleAgent):
* inspector/agents/worker/WorkerRuntimeAgent.cpp:
(WebCore::WorkerRuntimeAgent::WorkerRuntimeAgent):
Add some assertions for all Worker agents for clarify.

* workers/WorkerDebuggerProxy.h:
* workers/WorkerGlobalScope.h:
(WebCore::WorkerGlobalScope::identifier const):
(WebCore::WorkerGlobalScope::createUniqueIdentifier):
Provide a way to get unique identifiers in a worker. For the Page
this is done through the Page's ProgressTracker. For a Worker we just
put this on the WorkerGlobalScope. This is used for request ids.

* workers/WorkerMessagingProxy.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::setResourceCachingDisabled):
* workers/service/context/ServiceWorkerThreadProxy.h:
* workers/service/context/ServiceWorkerThreadProxy.cpp:
(WebCore::ServiceWorkerThreadProxy::setResourceCachingDisabled):
Add a debug method for disabling the resource cache from a worker.
In service workers this sets the override flag on the hidden page.

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

3 years agoAsync iteration should only fetch the next method once and add feature flag
keith_miller@apple.com [Mon, 13 Nov 2017 23:10:03 +0000 (23:10 +0000)]
Async iteration should only fetch the next method once and add feature flag
https://bugs.webkit.org/show_bug.cgi?id=179451

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Add feature flag for Async iteration. Also, change async iteration to match
the expected behavior of the proposal.

* Configurations/FeatureDefines.xcconfig:
* builtins/AsyncFromSyncIteratorPrototype.js:
(globalPrivate.createAsyncFromSyncIterator):
(globalPrivate.AsyncFromSyncIteratorConstructor):
* builtins/BuiltinNames.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitGetAsyncIterator):
* runtime/Options.h:

Source/WebCore:

Add feature flag for Async iteration.

* Configurations/FeatureDefines.xcconfig:

Source/WebCore/PAL:

Add feature flag for Async iteration.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit:

Add feature flag for Async iteration.

* Configurations/FeatureDefines.xcconfig:

Source/WebKitLegacy/mac:

Add feature flag for Async iteration.

* Configurations/FeatureDefines.xcconfig:

Tools:

Add feature flag for Async iteration.

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

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

3 years agoCall willPerformHTTPRedirection on WebCoreNSURLSession's delegate
achristensen@apple.com [Mon, 13 Nov 2017 23:00:38 +0000 (23:00 +0000)]
Call willPerformHTTPRedirection on WebCoreNSURLSession's delegate
https://bugs.webkit.org/show_bug.cgi?id=179539

Reviewed by Jer Noble.

This is now possible!
This will allow AVFoundation to fix redirect-related bugs.

* platform/network/cocoa/WebCoreNSURLSession.mm:
(-[WebCoreNSURLSession addDelegateOperation:]):
(-[WebCoreNSURLSession resetWithCompletionHandler:]):
(-[WebCoreNSURLSession flushWithCompletionHandler:]):
(WebCore::WebCoreNSURLSessionDataTaskClient::redirectReceived):
(-[WebCoreNSURLSessionDataTask resource:shouldCacheResponse:]):
(-[WebCoreNSURLSessionDataTask resource:receivedData:length:]):
(-[WebCoreNSURLSessionDataTask resource:receivedRedirect:request:completionHandler:]):
(-[WebCoreNSURLSessionDataTask resource:receivedRedirect:request:]): Deleted.

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

3 years agoAdd some more assertions in SWServerJobQueue
cdumez@apple.com [Mon, 13 Nov 2017 23:00:04 +0000 (23:00 +0000)]
Add some more assertions in SWServerJobQueue
https://bugs.webkit.org/show_bug.cgi?id=179626

Reviewed by Alex Christensen.

Add some more assertions in SWServerJobQueue for extra safety.

* workers/service/server/SWServerJobQueue.cpp:
(WebCore::SWServerJobQueue::didResolveRegistrationPromise):
(WebCore::SWServerJobQueue::didFinishInstall):

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

3 years agoAdd more overflow check book-keeping for MarkedArgumentBuffer.
mark.lam@apple.com [Mon, 13 Nov 2017 22:58:04 +0000 (22:58 +0000)]
Add more overflow check book-keeping for MarkedArgumentBuffer.
https://bugs.webkit.org/show_bug.cgi?id=179634
<rdar://problem/35492517>

Reviewed by Saam Barati.

JSTests:

* stress/regress-179634.js: Added.

Source/JavaScriptCore:

* runtime/ArgList.h:
(JSC::MarkedArgumentBuffer::overflowCheckNotNeeded):
* runtime/JSJob.cpp:
(JSC::JSJobMicrotask::run):
* runtime/ObjectConstructor.cpp:
(JSC::defineProperties):
* runtime/ReflectObject.cpp:
(JSC::reflectObjectConstruct):

Source/WebKit:

* WebProcess/Plugins/Netscape/NPJSObject.cpp:
(WebKit::NPJSObject::construct):
(WebKit::NPJSObject::invoke):

Source/WebKitLegacy/mac:

* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::invoke):
(WebKit::NetscapePluginInstanceProxy::invokeDefault):
(WebKit::NetscapePluginInstanceProxy::construct):

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