Timeline



May 6, 2018:

10:24 PM Changeset in webkit [231404] by Yusuke Suzuki
  • 5 edits in trunk/Source/WTF

[WTF] Embed default atomic string table in Thread
https://bugs.webkit.org/show_bug.cgi?id=185349

Reviewed by Darin Adler.

Do not need to allocate AtomicStringTable separate from Thread
since the table's lifetime is completely the same as Thread.

This patch just embeds it as a data member of Thread.

  • wtf/Threading.cpp:

(WTF::Thread::initializeInThread):
(WTF::Thread::didExit):

  • wtf/Threading.h:
  • wtf/text/AtomicStringTable.cpp:

(WTF::AtomicStringTable::create): Deleted.
(WTF::AtomicStringTable::destroy): Deleted.

  • wtf/text/AtomicStringTable.h:
7:46 PM Changeset in webkit [231403] by Yusuke Suzuki
  • 16 edits in trunk/Source

[JSC] Remove "using namespace std;" from JSC, bmalloc, WTF
https://bugs.webkit.org/show_bug.cgi?id=185362

Reviewed by Sam Weinig.

Source/bmalloc:

  • bmalloc/Allocator.cpp:
  • bmalloc/Deallocator.cpp:

Source/JavaScriptCore:

"namespace std" may include many names. It can conflict with names defined by our code,
and the other platform provided headers. For example, std::byte conflicts with Windows'
::byte.
This patch removes "using namespace std;" from JSC and bmalloc.

  • API/JSClassRef.cpp:

(OpaqueJSClass::create):

  • bytecode/Opcode.cpp:
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::newRegister):

  • heap/Heap.cpp:

(JSC::Heap::updateAllocationLimits):

  • interpreter/Interpreter.cpp:
  • jit/JIT.cpp:
  • parser/Parser.cpp:
  • runtime/JSArray.cpp:
  • runtime/JSLexicalEnvironment.cpp:
  • runtime/JSModuleEnvironment.cpp:
  • runtime/Structure.cpp:
  • shell/DLLLauncherMain.cpp:

(getStringValue):
(applePathFromRegistry):
(appleApplicationSupportDirectory):
(copyEnvironmentVariable):
(prependPath):
(fatalError):
(directoryExists):
(modifyPath):
(getLastErrorString):
(wWinMain):

7:46 PM Changeset in webkit [231402] by Yusuke Suzuki
  • 4 edits in trunk/Source/WTF

[WTF] Use static initializers for WTF::Mutex and WTF::ThreadCondition
https://bugs.webkit.org/show_bug.cgi?id=185361

Reviewed by Sam Weinig.

Use static initializers for WTF::Mutex and WTF::ThreadCondition to make
constructors of them simple and constexpr.

  • wtf/ThreadingPrimitives.h:
  • wtf/ThreadingPthreads.cpp:

(WTF::Mutex::Mutex): Deleted.
(WTF::ThreadCondition::ThreadCondition): Deleted.

  • wtf/ThreadingWin.cpp:

(WTF::Mutex::Mutex): Deleted.
(WTF::ThreadCondition::ThreadCondition): Deleted.

7:09 PM Changeset in webkit [231401] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC] Add assertions for stale Display::Box geometry
https://bugs.webkit.org/show_bug.cgi?id=185357

Reviewed by Antti Koivisto.

Ensure that we don't access stale geometry of other boxes during layout.
For example, in order to layout a block child we need the containing block's content box top/left and width (but not the height)

  • layout/displaytree/DisplayBox.h:

(WebCore::Display::Box::invalidateTop):
(WebCore::Display::Box::invalidateLeft):
(WebCore::Display::Box::invalidateWidth):
(WebCore::Display::Box::invalidateHeight):
(WebCore::Display::Box::hasValidPosition const):
(WebCore::Display::Box::hasValidSize const):
(WebCore::Display::Box::hasValidGeometry const):
(WebCore::Display::Box::invalidatePosition):
(WebCore::Display::Box::invalidateSize):
(WebCore::Display::Box::setHasValidPosition):
(WebCore::Display::Box::setHasValidSize):
(WebCore::Display::Box::setHasValidGeometry):
(WebCore::Display::Box::rect const):
(WebCore::Display::Box::top const):
(WebCore::Display::Box::left const):
(WebCore::Display::Box::bottom const):
(WebCore::Display::Box::right const):
(WebCore::Display::Box::topLeft const):
(WebCore::Display::Box::bottomRight const):
(WebCore::Display::Box::size const):
(WebCore::Display::Box::width const):
(WebCore::Display::Box::height const):
(WebCore::Display::Box::setRect):
(WebCore::Display::Box::setTopLeft):
(WebCore::Display::Box::setTop):
(WebCore::Display::Box::setLeft):
(WebCore::Display::Box::setSize):
(WebCore::Display::Box::setWidth):
(WebCore::Display::Box::setHeight):

1:00 PM Changeset in webkit [231400] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC] Add BlockFormattingContext::computeStaticPosition
https://bugs.webkit.org/show_bug.cgi?id=185352

Reviewed by Antti Koivisto.

This is the core logic for positioning inflow boxes in a block formatting context (very naive though).

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::computeStaticPosition const):

  • layout/displaytree/DisplayBox.h:

May 5, 2018:

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

DFG CFA phase should only do clobber asserts in debug
https://bugs.webkit.org/show_bug.cgi?id=185354

Reviewed by Saam Barati.

Clobber asserts are responsible for 1% of compile time. That's too much. This disables them
unless asserts are enabled.

  • dfg/DFGCFAPhase.cpp:

(JSC::DFG::CFAPhase::performBlockCFA):

4:45 PM Changeset in webkit [231398] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebCore

Cleanup XMLHttpRequestUpload a little
https://bugs.webkit.org/show_bug.cgi?id=185344

Patch by Sam Weinig <sam@webkit.org> on 2018-05-05
Reviewed by Yusuke Suzuki.

  • bindings/js/JSXMLHttpRequestCustom.cpp:

(WebCore::JSXMLHttpRequest::visitAdditionalChildren):
Use auto to reduce redundancy.

  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::upload):

  • xml/XMLHttpRequest.h:

Switch upload() to return a reference.

  • xml/XMLHttpRequestUpload.cpp:

(WebCore::XMLHttpRequestUpload::XMLHttpRequestUpload):
(WebCore::XMLHttpRequestUpload::dispatchProgressEvent):

  • xml/XMLHttpRequestUpload.h:

Cleanup formatting, modernize and switch XMLHttpRequest member from a pointer
to a reference.

3:42 PM Changeset in webkit [231397] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

Draw a drop-shadow behind the system preview badge
https://bugs.webkit.org/show_bug.cgi?id=185356
<rdar://problem/40004936>

Reviewed by Wenson Hsieh.

Draw a very subtle drop-shadow under the system
preview badge so that it is more visible on a pure
white background.

I also moved some code around to make it more clear
and improved comments.

  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::paintSystemPreviewBadge):

May 4, 2018:

9:39 PM Changeset in webkit [231396] by Wenson Hsieh
  • 4 edits in trunk

[iOS] Multiple links in Mail are dropped in a single line, and are difficult to tell apart
https://bugs.webkit.org/show_bug.cgi?id=185289
<rdar://problem/35756912>

Reviewed by Tim Horton and Darin Adler.

Source/WebCore:

When inserting multiple URLs as individual items in a single drop, we currently separate each item with a space
(see r217284). However, it still seems difficult to tell dropped links apart. This patch makes some slight
tweaks to WebContentReader::readURL so that it inserts line breaks before dropped URLs, if the dropped URL isn't
the first item to be inserted in the resulting document fragment.

Augments existing API tests in DataInteractionTests.

  • editing/ios/WebContentReaderIOS.mm:

Additionally remove some extraneous header imports from this implementation file.

(WebCore::WebContentReader::readURL):

Tools:

Augment and rebaseline some iOS drag-and-drop API tests that handle dropping URLs as a part of multi-item drop
sessions.

  • TestWebKitAPI/Tests/ios/DataInteractionTests.mm:

(TestWebKitAPI::TEST):

7:11 PM Changeset in webkit [231395] by youenn@apple.com
  • 2 edits in trunk/LayoutTests

webrtc/addICECandidate-closed.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=185336

Reviewed by Eric Carlson.

  • webrtc/addICECandidate-closed.html:
5:26 PM Changeset in webkit [231394] by dino@apple.com
  • 3 edits in trunk/Source/WebCore

Use IOSurfaces for CoreImage operations where possible
https://bugs.webkit.org/show_bug.cgi?id=185230
<rdar://problem/39926929>

Reviewed by Jon Lee.

On iOS hardware, we can use IOSurfaces as a rendering destination
for CoreImage, which means we're keeping data on the GPU
for rendering.

As a drive-by fix, I used a convenience method for Gaussian blurs.

  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::paintSystemPreviewBadge):

5:16 PM Changeset in webkit [231393] by timothy_horton@apple.com
  • 11 edits
    1 move in trunk/Source

Shift to a lower-level framework for simplifying URLs
https://bugs.webkit.org/show_bug.cgi?id=185334

Reviewed by Dan Bernstein.

Source/WebCore:

  • Configurations/WebCore.xcconfig:
  • platform/mac/DragImageMac.mm:

(WebCore::LinkImageLayout::LinkImageLayout):

Source/WebCore/PAL:

  • PAL.xcodeproj/project.pbxproj:
  • pal/PlatformMac.cmake:
  • pal/spi/cocoa/URLFormattingSPI.h: Renamed from Source/WebCore/PAL/pal/spi/cocoa/LinkPresentationSPI.h.

Source/WebKit:

  • Configurations/WebKit.xcconfig:
  • UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:

(-[WKFullScreenWindowController _updateLocationInfo]):

Source/WTF:

  • wtf/Platform.h:
4:58 PM Changeset in webkit [231392] by rniwa@webkit.org
  • 4 edits in trunk/Source/WebCore

Release assert in ScriptController::canExecuteScripts via HTMLMediaElement::~HTMLMediaElement()
https://bugs.webkit.org/show_bug.cgi?id=185288

Reviewed by Jer Noble.

The crash is caused by HTMLMediaElement::~HTMLMediaElement canceling the resource load via CachedResource
which ends up calling FrameLoader::checkCompleted() and fire load event on the document synchronously.
Speculatively fix the crash by scheduling the check instead.

In long term, ResourceLoader::cancel should never fire load event synchronously: webkit.org/b/185284.

Unfortunately, no new tests since I can't get MediaResource to get destructed at the right time.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::isRunningDestructor): Added to detect this specific case.
(WebCore::HTMLMediaElementDestructorScope): Added.
(WebCore::HTMLMediaElementDestructorScope::HTMLMediaElementDestructorScope): Added.
(WebCore::HTMLMediaElementDestructorScope::~HTMLMediaElementDestructorScope): Added.
(WebCore::HTMLMediaElement::~HTMLMediaElement): Instantiate HTMLMediaElement.

  • html/HTMLMediaElement.h:
  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::checkCompleted): Call scheduleCheckCompleted instead of synchronously calling
checkCompleted if we're in the middle of destructing a HTMLMediaElement.

4:56 PM Changeset in webkit [231391] by webkit@devinrousso.com
  • 43 edits in trunk

Web Inspector: simplify the WI.Collection interface
https://bugs.webkit.org/show_bug.cgi?id=185187

Reviewed by Brian Burg.

Source/WebInspectorUI:

  • UserInterface/Models/Collection.js:

(WI.Collection.prototype.get size): Added.
(WI.Collection.prototype.has): Added.
(WI.Collection.prototype.toJSON):
(WI.Collection.prototype.[Symbol.iterator]): Added.
(WI.Collection.prototype.get items): Deleted.
(WI.Collection.prototype.toArray): Deleted.

  • UserInterface/Controllers/CanvasManager.js:

(WI.CanvasManager.prototype._removeCanvas):

  • UserInterface/Controllers/DOMDebuggerManager.js:

(WebInspector.DOMDebuggerManager.prototype.get domBreakpoints):

  • UserInterface/Models/Frame.js:

(WI.Frame.prototype.removeAllChildFrames):
(WI.Frame.prototype.resourceForURL):
(WI.Frame.prototype.removeAllResources):

  • UserInterface/Models/Script.js:

(WI.Script):

  • UserInterface/Views/CanvasContentView.js:

(WI.CanvasContentView.prototype.initialLayout):

  • UserInterface/Views/CanvasOverviewContentView.js:

(WI.CanvasOverviewContentView.prototype._updateNavigationItems):

  • UserInterface/Views/CanvasSidebarPanel.js:

(WI.CanvasSidebarPanel.prototype._recordingRemoved):
(WI.CanvasSidebarPanel.prototype._canvasChanged):
(WI.CanvasSidebarPanel.prototype._updateRecordingScopeBar):

  • UserInterface/Views/CanvasTabContentView.js:

(WI.CanvasTabContentView.prototype.attached):
(WI.CanvasTabContentView.prototype._addCanvas):
(WI.CanvasTabContentView.prototype._removeCanvas):

  • UserInterface/Views/CanvasTreeElement.js:

(WI.CanvasTreeElement.prototype.onpopulate):

  • UserInterface/Views/CollectionContentView.js:

(WI.CollectionContentView.prototype.initialLayout):
(WI.CollectionContentView.prototype.attached):

  • UserInterface/Views/CookieStorageContentView.js:

(WI.CookieStorageContentView.prototype._filterCookies):

  • UserInterface/Views/DebuggerSidebarPanel.js:

(WI.DebuggerSidebarPanel.prototype._addResourcesRecursivelyForFrame):

  • UserInterface/Views/FolderizedTreeElement.js:

(WI.FolderizedTreeElement.prototype.updateParentStatus):
(WI.FolderizedTreeElement.prototype._shouldGroupIntoFolders):

  • UserInterface/Views/FrameTreeElement.js:

(WI.FrameTreeElement.prototype.onpopulate):

  • UserInterface/Views/NavigationSidebarPanel.js:

(WI.NavigationSidebarPanel.prototype.get contentTreeOutlines):

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView.prototype._populateWithInitialResourcesIfNeeded):

  • UserInterface/Views/OpenResourceDialog.js:

(WI.OpenResourceDialog.prototype._addResourcesForFrame):
(WI.OpenResourceDialog.prototype._addResourcesForTarget):

  • UserInterface/Views/TreeOutlineGroup.js:

(WI.TreeOutlineGroup.prototype.get selectedTreeElement):
(WI.TreeOutlineGroup.prototype._removeConflictingTreeSelections):

  • UserInterface/Views/WorkerTreeElement.js:

(WI.WorkerTreeElement.prototype.onpopulate):

LayoutTests:

  • http/tests/inspector/dom/cross-domain-inspected-node-access.html:
  • http/tests/inspector/dom/disconnect-dom-tree-after-main-frame-navigation.html:
  • http/tests/inspector/network/har/har-page.html:
  • http/tests/inspector/network/har/har-page-expected.txt:
  • http/tests/inspector/network/resource-response-source-memory-cache-revalidate-expired-only.html:
  • http/tests/inspector/network/resource-response-source-memory-cache.html:
  • http/tests/inspector/network/resource-sizes-memory-cache.html:
  • http/tests/inspector/network/set-resource-caching-disabled-memory-cache.html:
  • http/tests/inspector/worker/blob-script-with-cross-domain-imported-scripts.html:
  • http/tests/websocket/tests/hybi/inspector/before-load.html:
  • inspector/canvas/resources/recording-utilities.js:
  • inspector/css/manager-preferredInspectorStyleSheetForFrame.html:
  • inspector/debugger/resources/log-pause-location.js:

(TestPage.registerInitializer.window.findScript):

  • inspector/dom/highlightFrame.html:
  • inspector/dom/highlightNode.html:
  • inspector/dom/highlightNodeList.html:
  • inspector/dom/highlightSelector.html:
  • inspector/model/frame-extra-scripts.html:
  • inspector/page/empty-or-missing-resources.html:
  • inspector/unit-tests/resource-collection.html:
  • inspector/worker/resources-in-worker.html:
4:52 PM Changeset in webkit [231390] by rniwa@webkit.org
  • 7 edits
    2 moves in trunk/Source/WebCore

Rename DocumentOrderedMap to TreeScopeOrderedMap
https://bugs.webkit.org/show_bug.cgi?id=185290

Reviewed by Zalan Bujtas.

Renamed the class since it's almost always a mistake to use this class as a member variable of Document.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/MouseRelatedEvent.cpp: Include the forgotten DOMWindow.h. Unified build files bit us here.
  • dom/TreeScope.cpp:

(WebCore::TreeScope::addElementById):
(WebCore::TreeScope::addElementByName):
(WebCore::TreeScope::addImageMap):
(WebCore::TreeScope::addImageElementByUsemap):
(WebCore::TreeScope::labelElementForId):

  • dom/TreeScope.h:
  • dom/TreeScopeOrderedMap.cpp: Renamed from DocumentOrderedMap.cpp
  • dom/TreeScopeOrderedMap.h: Renamed from DocumentOrderedMap.h
  • html/HTMLDocument.h:
4:42 PM Changeset in webkit [231389] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

Shutdown WindowServer connections after checking in with launch services
https://bugs.webkit.org/show_bug.cgi?id=185082
<rdar://problem/39613173>

Reviewed by Brent Fulgham.

When WindowServer access is blocked in the WebContent process, we should shutdown all connections
after checking in with launch services.

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeProcess):

4:41 PM Changeset in webkit [231388] by youenn@apple.com
  • 4 edits
    1 delete in trunk/LayoutTests

REGRESSION (r230326?): Layout Test http/tests/contentextensions/make-https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=184476
<rdar://problem/39384226>

Reviewed by Ryosuke Niwa.

Removed flakiness expectation.
Updated test to no longer log load callbacks.
Instead, we rely on the fact that the four content extension upgrades
are also logged as console log messages.

  • http/tests/contentextensions/make-https-expected.txt:
  • http/tests/contentextensions/make-https.html:
  • platform/mac-sierra-wk2/http/tests/contentextensions/make-https-expected.txt: Removed.
  • platform/mac-wk2/TestExpectations:
4:29 PM Changeset in webkit [231387] by don.olmstead@sony.com
  • 8 edits in trunk/Source

[Win][WebKit] Fix forwarding headers for Windows build
https://bugs.webkit.org/show_bug.cgi?id=184412

Reviewed by Alex Christensen.

Source/WebCore:

No new tests. No change in behavior.

  • PlatformWin.cmake:

Source/WebKit:

  • PlatformWin.cmake:
  • UIProcess/API/APIAttachment.h:
  • UIProcess/API/APIContextMenuClient.h:
  • UIProcess/API/C/WKProcessTerminationReason.h:
  • WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
4:07 PM Changeset in webkit [231386] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark animations/duplicate-keys.html as flaky on iOS.
https://bugs.webkit.org/show_bug.cgi?id=185332

Unreviewed test gardening.

  • platform/ios/TestExpectations:
3:34 PM Changeset in webkit [231385] by Ryan Haddad
  • 4 edits in trunk/LayoutTests

Rebaseline tests for iOS after r231359.

Unreviewed test gardening.

  • platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:
3:23 PM Changeset in webkit [231384] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[Simple line layout] Add support for line layout box generation with multiple text renderers.
https://bugs.webkit.org/show_bug.cgi?id=185276

Reviewed by Antti Koivisto.

Covered by existing tests.

  • rendering/SimpleLineLayoutFunctions.cpp:

(WebCore::SimpleLineLayout::canUseForLineBoxTree):
(WebCore::SimpleLineLayout::generateLineBoxTree):

  • rendering/SimpleLineLayoutResolver.cpp:

(WebCore::SimpleLineLayout::RunResolver::Run::renderer const):
(WebCore::SimpleLineLayout::RunResolver::Run::localStart const):
(WebCore::SimpleLineLayout::RunResolver::Run::localEnd const):

  • rendering/SimpleLineLayoutResolver.h:
2:43 PM Changeset in webkit [231383] by timothy@apple.com
  • 155 edits in trunk

Deprecate legacy WebView and friends
https://bugs.webkit.org/show_bug.cgi?id=185279
rdar://problem/33268700

Reviewed by Tim Horton.

Source/WebCore:

  • Configurations/WebCore.xcconfig:

Added BUILDING_WEBKIT define to disable the deprecation macros.

  • bridge/objc/WebScriptObject.h:

Added deprecation macros to WebScriptObject and WebUndefined.

  • platform/cocoa/WebKitAvailability.h:

Added more macros and a way to disable deprecation warnings for
WebKit build and in clients like Safari.

Source/WebKitLegacy/mac:

Added deprecation macros to all the classes, extern strings, and enums.

  • Configurations/WebKitLegacy.xcconfig:

Added BUILDING_WEBKIT define to disable the deprecation macros.

  • DOM/DOMAbstractView.h:
  • DOM/DOMAttr.h:
  • DOM/DOMBlob.h:
  • DOM/DOMCDATASection.h:
  • DOM/DOMCSSCharsetRule.h:
  • DOM/DOMCSSFontFaceRule.h:
  • DOM/DOMCSSImportRule.h:
  • DOM/DOMCSSMediaRule.h:
  • DOM/DOMCSSPageRule.h:
  • DOM/DOMCSSPrimitiveValue.h:
  • DOM/DOMCSSRule.h:
  • DOM/DOMCSSRuleList.h:
  • DOM/DOMCSSStyleDeclaration.h:
  • DOM/DOMCSSStyleRule.h:
  • DOM/DOMCSSStyleSheet.h:
  • DOM/DOMCSSUnknownRule.h:
  • DOM/DOMCSSValue.h:
  • DOM/DOMCSSValueList.h:
  • DOM/DOMCharacterData.h:
  • DOM/DOMComment.h:
  • DOM/DOMCounter.h:
  • DOM/DOMDocument.h:
  • DOM/DOMDocumentFragment.h:
  • DOM/DOMDocumentType.h:
  • DOM/DOMElement.h:
  • DOM/DOMEntity.h:
  • DOM/DOMEntityReference.h:
  • DOM/DOMEvent.h:
  • DOM/DOMEventException.h:
  • DOM/DOMEventListener.h:
  • DOM/DOMEventTarget.h:
  • DOM/DOMException.h:
  • DOM/DOMFile.h:
  • DOM/DOMFileList.h:
  • DOM/DOMHTMLAnchorElement.h:
  • DOM/DOMHTMLAppletElement.h:
  • DOM/DOMHTMLAreaElement.h:
  • DOM/DOMHTMLBRElement.h:
  • DOM/DOMHTMLBaseElement.h:
  • DOM/DOMHTMLBaseFontElement.h:
  • DOM/DOMHTMLBodyElement.h:
  • DOM/DOMHTMLButtonElement.h:
  • DOM/DOMHTMLCanvasElement.h:
  • DOM/DOMHTMLCollection.h:
  • DOM/DOMHTMLDListElement.h:
  • DOM/DOMHTMLDirectoryElement.h:
  • DOM/DOMHTMLDivElement.h:
  • DOM/DOMHTMLDocument.h:
  • DOM/DOMHTMLElement.h:
  • DOM/DOMHTMLEmbedElement.h:
  • DOM/DOMHTMLFieldSetElement.h:
  • DOM/DOMHTMLFontElement.h:
  • DOM/DOMHTMLFormElement.h:
  • DOM/DOMHTMLFrameElement.h:
  • DOM/DOMHTMLFrameSetElement.h:
  • DOM/DOMHTMLHRElement.h:
  • DOM/DOMHTMLHeadElement.h:
  • DOM/DOMHTMLHeadingElement.h:
  • DOM/DOMHTMLHtmlElement.h:
  • DOM/DOMHTMLIFrameElement.h:
  • DOM/DOMHTMLImageElement.h:
  • DOM/DOMHTMLInputElement.h:
  • DOM/DOMHTMLLIElement.h:
  • DOM/DOMHTMLLabelElement.h:
  • DOM/DOMHTMLLegendElement.h:
  • DOM/DOMHTMLLinkElement.h:
  • DOM/DOMHTMLMapElement.h:
  • DOM/DOMHTMLMarqueeElement.h:
  • DOM/DOMHTMLMediaElement.h:
  • DOM/DOMHTMLMenuElement.h:
  • DOM/DOMHTMLMetaElement.h:
  • DOM/DOMHTMLModElement.h:
  • DOM/DOMHTMLOListElement.h:
  • DOM/DOMHTMLObjectElement.h:
  • DOM/DOMHTMLOptGroupElement.h:
  • DOM/DOMHTMLOptionElement.h:
  • DOM/DOMHTMLOptionsCollection.h:
  • DOM/DOMHTMLParagraphElement.h:
  • DOM/DOMHTMLParamElement.h:
  • DOM/DOMHTMLPreElement.h:
  • DOM/DOMHTMLQuoteElement.h:
  • DOM/DOMHTMLScriptElement.h:
  • DOM/DOMHTMLSelectElement.h:
  • DOM/DOMHTMLStyleElement.h:
  • DOM/DOMHTMLTableCaptionElement.h:
  • DOM/DOMHTMLTableCellElement.h:
  • DOM/DOMHTMLTableColElement.h:
  • DOM/DOMHTMLTableElement.h:
  • DOM/DOMHTMLTableRowElement.h:
  • DOM/DOMHTMLTableSectionElement.h:
  • DOM/DOMHTMLTextAreaElement.h:
  • DOM/DOMHTMLTitleElement.h:
  • DOM/DOMHTMLUListElement.h:
  • DOM/DOMHTMLVideoElement.h:
  • DOM/DOMImplementation.h:
  • DOM/DOMKeyboardEvent.h:
  • DOM/DOMMediaError.h:
  • DOM/DOMMediaList.h:
  • DOM/DOMMouseEvent.h:
  • DOM/DOMMutationEvent.h:
  • DOM/DOMNamedNodeMap.h:
  • DOM/DOMNode.h:
  • DOM/DOMNodeFilter.h:
  • DOM/DOMNodeIterator.h:
  • DOM/DOMNodeList.h:
  • DOM/DOMObject.h:
  • DOM/DOMOverflowEvent.h:
  • DOM/DOMProcessingInstruction.h:
  • DOM/DOMProgressEvent.h:
  • DOM/DOMRGBColor.h:
  • DOM/DOMRange.h:
  • DOM/DOMRangeException.h:
  • DOM/DOMRect.h:
  • DOM/DOMStyleSheet.h:
  • DOM/DOMStyleSheetList.h:
  • DOM/DOMText.h:
  • DOM/DOMTextEvent.h:
  • DOM/DOMTimeRanges.h:
  • DOM/DOMTokenList.h:
  • DOM/DOMTreeWalker.h:
  • DOM/DOMUIEvent.h:
  • DOM/DOMWheelEvent.h:
  • DOM/DOMXPathException.h:
  • DOM/DOMXPathExpression.h:
  • DOM/DOMXPathNSResolver.h:
  • DOM/DOMXPathResult.h:
  • History/WebBackForwardList.h:
  • History/WebHistory.h:
  • History/WebHistoryItem.h:
  • Misc/WebDownload.h:
  • Misc/WebKitErrors.h:
  • Plugins/WebPluginViewFactory.h:
  • WebView/WebArchive.h:
  • WebView/WebDataSource.h:
  • WebView/WebDocument.h:
  • WebView/WebEditingDelegate.h:
  • WebView/WebFormDelegate.h:
  • WebView/WebFrame.h:
  • WebView/WebFrameLoadDelegate.h:
  • WebView/WebFrameView.h:
  • WebView/WebPolicyDelegate.h:
  • WebView/WebPreferences.h:
  • WebView/WebPreferencesPrivate.h:
  • WebView/WebResourceLoadDelegate.h:
  • WebView/WebUIDelegate.h:
  • WebView/WebUIDelegatePrivate.h:
  • WebView/WebView.h:
  • WebView/WebViewPrivate.h:
  • postprocess-headers.sh:

Remove step that converts WEBKIT macros to NS macros.
Change it to just remove the macros on iOS builds.

Tools:

  • MiniBrowser/Configurations/Base.xcconfig: Added GCC_PREPROCESSOR_DEFINITIONS

to define DISABLE_LEGACY_WEBKIT_DEPRECATIONS.

2:39 PM Changeset in webkit [231382] by eric.carlson@apple.com
  • 7 edits in trunk/Source

Log media time range as JSON
https://bugs.webkit.org/show_bug.cgi?id=185321
<rdar://problem/39986746>

Reviewed by Youenn Fablet.

Source/WebCore:

No new tests, tested manually.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::addPlayedRange): Log as time range.
(WebCore::HTMLMediaElement::visibilityStateChanged): Cleanup.

  • platform/graphics/MediaPlayer.h:

(WTF::LogArgument<MediaTime>::toString):
(WTF::LogArgument<MediaTimeRange>::toString):

  • platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:

(WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): Log error as time range.

Source/WTF:

  • wtf/MediaTime.cpp:

(WTF::toJSONStringInternal): Extract guts of MediaTime::toJSONString to this static function
so it can be used by MediaTimeRange::toJSONString as well.
(WTF::MediaTime::toJSONString const):
(WTF::MediaTimeRange::toJSONString const):

  • wtf/MediaTime.h:
2:26 PM Changeset in webkit [231381] by Ryan Haddad
  • 4 edits in trunk/LayoutTests

Rebaseline tests after r231359.

Unreviewed test gardening.

  • platform/mac/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
  • platform/mac/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
  • platform/mac/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:
2:26 PM Changeset in webkit [231380] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Update TestExpectations for media/video-aspect-ratio.html.
https://bugs.webkit.org/show_bug.cgi?id=184457

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
  • platform/mac/TestExpectations:
2:15 PM Changeset in webkit [231379] by Alan Bujtas
  • 3 edits
    2 adds in trunk

Use the containing block to compute the pagination gap when the container is inline.
https://bugs.webkit.org/show_bug.cgi?id=184724
<rdar://problem/39521800>

Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/overflow/page-overflow-with-inline-body-crash.html

  • page/FrameView.cpp:

(WebCore::FrameView::applyPaginationToViewport):

LayoutTests:

  • fast/overflow/page-overflow-with-inline-body-crash-expected.txt: Added.
  • fast/overflow/page-overflow-with-inline-body-crash.html: Added.
1:54 PM Changeset in webkit [231378] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

Don't use GSFont* in minimal simulator mode
https://bugs.webkit.org/show_bug.cgi?id=185320
<rdar://problem/39734478>

Reviewed by Beth Dakin.

  • page/cocoa/MemoryReleaseCocoa.mm:

(WebCore::platformReleaseMemory):

1:51 PM Changeset in webkit [231377] by Nikita Vasilyev
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Styles: Newly added unsupported properties sometimes don't have warnings
https://bugs.webkit.org/show_bug.cgi?id=183097
<rdar://problem/37843816>

Reviewed by Matt Baker.

Update status of properties warnings every time focus moves.

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:

(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyFocusMoved):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype._updatePropertiesStatus):

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):

1:48 PM Changeset in webkit [231376] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

[iOS] Apps that are not visible may not get suspended if they trigger page loads while in the background
https://bugs.webkit.org/show_bug.cgi?id=185318

Reviewed by Geoffrey Garen.

Whenever there is a page load going on, we take a background process assertion to delay process
suspension until this load completes. However, there is also a 3 seconds grace period after
a load is complete to allow the app to trigger a new load shortly after. This grace period was
introduced to support use cases where a visible app does loads in an offscreen view. However,
it can be abused by apps running in the background as they could trigger new page loads while
in the background to delay process suspension. This patch tightens the policy so that only
apps that are currently visible get to use this grace period. Apps that are in the background
get to finish their current load and will then get suspended.

  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::didChangeIsLoading):

1:47 PM Changeset in webkit [231375] by keith_miller@apple.com
  • 3 edits
    1 add in trunk

isCacheableArrayLength should return true for undecided arrays
https://bugs.webkit.org/show_bug.cgi?id=185309

Reviewed by Michael Saboff.

JSTests:

  • stress/get-array-length-undecided.js: Added.

(test):

Source/JavaScriptCore:

Undecided arrays have butterflies so there is no reason why we
should not be able to cache their length.

  • bytecode/InlineAccess.cpp:

(JSC::InlineAccess::isCacheableArrayLength):

1:44 PM Changeset in webkit [231374] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

Adjust sandbox profile for simulator.
https://bugs.webkit.org/show_bug.cgi?id=185319

Reviewed by Brent Fulgham.

Disable Kerberos rules, as well as rules related to NSApplication initialization.

  • WebProcess/com.apple.WebProcess.sb.in:
1:40 PM Changeset in webkit [231373] by commit-queue@webkit.org
  • 1 edit
    2 adds in trunk/Tools

Test262-Runner: Add base module to the local deps - unicore/PVA.pl
https://bugs.webkit.org/show_bug.cgi?id=185314

Patch by Leo Balter <Leo Balter> on 2018-05-04
Reviewed by Michael Saboff.

  • Scripts/test262/local/lib/perl5/unicore/PVA.pl: Added.
1:29 PM Changeset in webkit [231372] by webkit@devinrousso.com
  • 7 edits in trunk/Source/WebInspectorUI

Web Inspector: Styles Redesign: ensure that tabbing through the last section wraps back to the first
https://bugs.webkit.org/show_bug.cgi?id=181973

Reviewed by Matt Baker.

Unified delegate functions to start editing previous/next rules into a single function for
simplicity.

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:

(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetCSSStyleDeclarationEditorFocusMoved):

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:

(WI.SpreadsheetCSSStyleDeclarationSection.prototype.startEditingRuleSelector):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetSelectorFieldDidChange):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetCSSStyleDeclarationEditorStartEditingAdjacentRule):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.cssStyleDeclarationEditorStartEditingAdjacentRule): Deleted.

  • UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:

(WI.SpreadsheetRulesStyleDetailsPanel.prototype.focusFirstSection):
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.focusLastSection):
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.spreadsheetCSSStyleDeclarationSectionStartEditingAdjacentRule):
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionStartEditingNextRule): Deleted.
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionStartEditingPreviousRule): Deleted.

  • UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:

(WI.GeneralStyleDetailsSidebarPanel.prototype.styleDetailsPanelFocusLastPseudoClassCheckbox):
(WI.GeneralStyleDetailsSidebarPanel.prototype.styleDetailsPanelFocusFilterBar):
(WI.GeneralStyleDetailsSidebarPanel.prototype.initialLayout):
(WI.GeneralStyleDetailsSidebarPanel.prototype._handleForcedPseudoClassCheckboxKeydown):
(WI.GeneralStyleDetailsSidebarPanel.prototype._forcedPseudoClassCheckboxChanged):
(WI.GeneralStyleDetailsSidebarPanel.prototype._handleFilterBarInputFieldKeyDown):

Drive-by fix: provide tabbing support for the Computed styles panel.

  • UserInterface/Views/CSSStyleDeclarationTextEditor.js:

(WI.CSSStyleDeclarationTextEditor.prototype._handleShiftTabKey.switchRule):
(WI.CSSStyleDeclarationTextEditor.prototype._handleTabKey.switchRule):

  • UserInterface/Views/ComputedStyleDetailsPanel.js:

(WI.ComputedStyleDetailsPanel.prototype.focusFirstSection):
(WI.ComputedStyleDetailsPanel.prototype.focusLastSection):
(WI.ComputedStyleDetailsPanel.prototype.cssStyleDeclarationTextEditorStartEditingAdjacentRule):

12:42 PM Changeset in webkit [231371] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebKit

Wasted time dlopening Lookup when tearing down a WKWebView
https://bugs.webkit.org/show_bug.cgi?id=185310
<rdar://problem/39934085>

Reviewed by Wenson Hsieh.

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

(-[WKWindowVisibilityObserver dealloc]):
(-[WKWindowVisibilityObserver startObservingLookupDismissalIfNeeded]):
(WebKit::WebViewImpl::prepareForDictionaryLookup):
(-[WKWindowVisibilityObserver startObservingLookupDismissal]): Deleted.
Avoid un-registering as a Lookup dismissal observer if we never
registered in the first place, because that involves dlopening Lookup.

12:16 PM Changeset in webkit [231370] by Megan Gardner
  • 2 edits in trunk/Source/WebKit

Allow Web Touch events to timeout
https://bugs.webkit.org/show_bug.cgi?id=185282
<rdar://problem/38728319>

Reviewed by Tim Horton.

Web Touch events currently never time out, which blocks the user from interacting with the UI Process at all.
We should allow these events to time out so that the user can interact with the rest of the UI.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::handleTouchEventSynchronously):

11:52 AM Changeset in webkit [231369] by commit-queue@webkit.org
  • 4 edits in trunk

REGRESSION: [ios-simulator] 3 WKWebViewAutofillTests API test failures seen with 11.3 SDK
https://bugs.webkit.org/show_bug.cgi?id=184196
<rdar://problem/39054481>

Patch by Wenson Hsieh <whsieh@berkeley.edu> on 2018-05-04
Reviewed by Tim Horton.

Source/WebKit:

Remove an unnecessary call to NSClassFromString, now that trunk WebKit only supports iOS 11.3+.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView insertTextSuggestion:]):

Tools:

Removes some unnecessary workarounds to enable running app autofill tests against iOS versions
earlier than 11.3. Also re-enables these tests.

  • TestWebKitAPI/Tests/ios/WKWebViewAutofillTests.mm:

(TestWebKitAPI::TEST):
(-[UITextAutofillSuggestion initWithUsername:password:]): Deleted.
(+[UITextAutofillSuggestion autofillSuggestionWithUsername:password:]): Deleted.

11:50 AM Changeset in webkit [231368] by webkit@devinrousso.com
  • 4 edits in trunk

Web Inspector: Canvas tab: Determine isFunction by looking at the prototype
https://bugs.webkit.org/show_bug.cgi?id=184990

Reviewed by Brian Burg.

Source/WebInspectorUI:

  • UserInterface/Models/RecordingAction.js:

(WI.RecordingAction.isFunctionForType):
(WI.RecordingAction._prototypeForType):
(WI.RecordingAction.prototype.async.swizzle):

LayoutTests:

  • inspector/canvas/recording-2d-expected.txt:
11:44 AM Changeset in webkit [231367] by Chris Dumez
  • 24 edits
    2 deletes in trunk

Unreviewed, rolling out r231331.

Caused a few tests to assert

Reverted changeset:

"Stop using an iframe's id as fallback if its name attribute
is not set"
https://bugs.webkit.org/show_bug.cgi?id=11388
https://trac.webkit.org/changeset/231331

11:37 AM Changeset in webkit [231366] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

Use more references in updateTracksOfType
https://bugs.webkit.org/show_bug.cgi?id=185305

Reviewed by Eric Carlson.

No change of behavior.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::updateTracksOfType):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateTracks):

11:35 AM Changeset in webkit [231365] by youenn@apple.com
  • 7 edits in trunk/Source/WebKit

NetworkProcessProxy::didReceiveAuthenticationChallenge should take an AuthenticationChallenge r-value
https://bugs.webkit.org/show_bug.cgi?id=185302

Reviewed by Geoffrey Garen.

Pass AuthenticationChallenge as an r-value since it comes from IPC.
No change of behavior.

  • UIProcess/Authentication/AuthenticationChallengeProxy.cpp:

(WebKit::AuthenticationChallengeProxy::AuthenticationChallengeProxy):

  • UIProcess/Authentication/AuthenticationChallengeProxy.h:

(WebKit::AuthenticationChallengeProxy::create):

  • UIProcess/Downloads/DownloadProxy.cpp:

(WebKit::DownloadProxy::didReceiveAuthenticationChallenge):

  • UIProcess/Downloads/DownloadProxy.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::didReceiveAuthenticationChallenge):

  • UIProcess/Network/NetworkProcessProxy.h:
11:01 AM Changeset in webkit [231364] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark http/tests/contentextensions/make-https.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=184476

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
11:01 AM Changeset in webkit [231363] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark media/navigate-with-pip-should-not-crash.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=173119

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
10:46 AM Changeset in webkit [231362] by commit-queue@webkit.org
  • 2 edits in trunk/JSTests

Disable tests on systems with limited memory
https://bugs.webkit.org/show_bug.cgi?id=185296

Patch by Dominik Infuehr <dinfuehr@igalia.com> on 2018-05-04
Reviewed by Saam Barati.

Test doesn't work with a limited amount of memory. I tried to reduce memory usage
but then it was hard to reproduce the failure the test was originally made to test.

  • stress/array-reverse-doesnt-clobber.js:
10:38 AM Changeset in webkit [231361] by mmaxfield@apple.com
  • 6 edits
    6 adds in trunk

Text shaping in the simple path is flipped in the y direction
https://bugs.webkit.org/show_bug.cgi?id=185062
<rdar://problem/39778678>

Reviewed by Simon Fraser.

Source/WebCore:

Shaping in our simple codepath occurs in an "increasing-y-goes-up" coordinate system, but our painting
code uses an "increasing-y-goes-down" coordinate system. We weren't fixing up the coordinate systems
because we never noticed. This is because the simple codepath is only designed for kerning and ligatures,
neither of which move glyphs vertically in the common case.

Test: fast/text/vertical-displacement-simple-codepath.html

  • platform/graphics/Font.cpp:

(WebCore::Font::applyTransforms const):

  • platform/graphics/WidthIterator.cpp:

(WebCore::WidthIterator::applyFontTransforms):

Tools:

Huge thanks to Ulrike Rausch of LiebeFonts for contributing the test fonts!!!

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

LayoutTests:

This test renders a font which uses our fast text codepath but also includes vertical
displacements inside its liga feature. The test makes sure that the vertical displacement
occurs in the correct direction.

The test fonts were created by Ulrike Rausch of LiebeFonts specifically for the purpose
of testing. Huge thanks to her!! Figuring out this bug would not have been possible if
not for her huge help!

  • fast/text/resources/LiebeTest-calt.woff: Added.
  • fast/text/resources/LiebeTest-dlig.woff: Added.
  • fast/text/resources/LiebeTest-liga.woff: Added.
  • fast/text/resources/LiebeTest-swsh.woff: Added.
  • fast/text/vertical-displacement-simple-codepath-expected.html: Added.
  • fast/text/vertical-displacement-simple-codepath.html: Added.
10:36 AM Changeset in webkit [231360] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Test262-Runner: place the processCLI inside the main call
https://bugs.webkit.org/show_bug.cgi?id=185304

Patch by Leo Balter <Leo Balter> on 2018-05-04
Reviewed by Michael Saboff.

  • Scripts/test262/Runner.pm:

(main):

10:32 AM Changeset in webkit [231359] by commit-queue@webkit.org
  • 80 edits
    1 delete in trunk

Serialize all URLs with double-quotes per CSSOM spec
https://bugs.webkit.org/show_bug.cgi?id=184935

Patch by Chris Nardi <cnardi@chromium.org> on 2018-05-04
Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Update expectations for using double quotes when serializing URLs.

  • web-platform-tests/cssom/serialize-values-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:

Source/WebCore:

According to https://drafts.csswg.org/cssom/#serialize-a-url, all URLs should be serialized as strings,
which means they should have double quotes around the text of the URL. Update our implementation to match
this (and Firefox/Chrome). Also remove isCSSTokenizerURL() as this method is no longer needed.

Tests: Many LayoutTests updated to use double quotes.

  • css/CSSMarkup.cpp:

(WebCore::serializeString): Remove FIXME as this was already fixed in a previous patch.
(WebCore::serializeURL): Remove FIXME and update implementation.

LayoutTests:

Update tests to use double quotes when serializing URLs, and fixes for using double quotes in the test.

  • css3/calc/cross-fade-calc.html:
  • css3/filters/backdrop/backdropfilter-property-computed-style-expected.txt:
  • css3/filters/backdrop/backdropfilter-property-computed-style.html:
  • css3/filters/backdrop/backdropfilter-property-parsing-expected.txt:
  • css3/filters/backdrop/backdropfilter-property-parsing.html:
  • css3/filters/filter-property-computed-style-expected.txt:
  • css3/filters/filter-property-computed-style.html:
  • css3/filters/filter-property-expected.txt:
  • css3/filters/filter-property-parsing-expected.txt:
  • css3/filters/filter-property-parsing.html:
  • css3/filters/filter-property.html:
  • css3/filters/unprefixed-expected.txt:
  • css3/filters/unprefixed.html:
  • fast/backgrounds/background-shorthand-after-set-backgroundSize-expected.txt:
  • fast/backgrounds/background-shorthand-after-set-backgroundSize.html:
  • fast/backgrounds/background-shorthand-with-backgroundSize-style-expected.txt:
  • fast/backgrounds/background-shorthand-with-backgroundSize-style.html:
  • fast/backgrounds/multiple-backgrounds-computed-style-expected.txt:
  • fast/backgrounds/multiple-backgrounds-computed-style.html:
  • fast/css/background-position-serialize-expected.txt:
  • fast/css/cursor-parsing-expected.txt:
  • fast/css/cursor-parsing-image-set-expected.txt:
  • fast/css/cursor-parsing-image-set.html:
  • fast/css/cursor-parsing.html:
  • fast/css/getComputedStyle/computed-style-border-image-expected.txt:
  • fast/css/getComputedStyle/computed-style-border-image.html:
  • fast/css/getComputedStyle/computed-style-cross-fade-expected.txt:
  • fast/css/getComputedStyle/computed-style-cross-fade.html:
  • fast/css/getComputedStyle/computed-style-properties-expected.txt:
  • fast/css/getComputedStyle/computed-style-properties.html:
  • fast/css/getComputedStyle/getComputedStyle-background-shorthand-expected.txt:
  • fast/css/getComputedStyle/getComputedStyle-background-shorthand.html:
  • fast/css/getComputedStyle/getComputedStyle-list-style-shorthand-expected.txt:
  • fast/css/getComputedStyle/getComputedStyle-list-style-shorthand.html:
  • fast/css/image-set-parsing.html:
  • fast/css/image-set-setting-expected.txt:
  • fast/css/image-set-setting.html:
  • fast/css/image-set-unprefixed-expected.txt:
  • fast/css/image-set-unprefixed.html:
  • fast/css/invalid-cursor-property-crash.html:
  • fast/css/parse-border-image-repeat-null-crash-expected.txt:
  • fast/css/uri-token-parsing-expected.txt:
  • fast/css/uri-token-parsing.html:
  • fast/css/url-with-multi-byte-unicode-escape-expected.txt:
  • fast/css/url-with-multi-byte-unicode-escape.html:
  • fast/filter-image/parse-filter-image-expected.txt:
  • fast/filter-image/parse-filter-image.html:
  • fast/innerHTML/innerHTML-uri-resolution.html:
  • fast/inspector-support/cssURLQuotes-expected.txt:
  • fast/inspector-support/cssURLQuotes.html:
  • fast/masking/parsing-clip-path-iri-expected.txt:
  • fast/masking/parsing-clip-path-iri.html:
  • fast/masking/parsing-mask-expected.txt:
  • fast/masking/parsing-mask.html:
  • fast/shapes/parsing/parsing-shape-outside-expected.txt:
  • fast/shapes/parsing/parsing-shape-outside.html:
  • fast/shapes/parsing/parsing-test-utils.js:

(removeBaseURL):

  • platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:
  • platform/ios/fast/css/image-set-unprefixed-expected.txt: Removed.
  • platform/mac-sierra/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
  • platform/mac-sierra/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
  • platform/mac-sierra/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:
  • platform/win/fast/css/parse-border-image-repeat-null-crash-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:
  • resources/image-preload-helper.js:

(preloadImagesFromStyle):

  • svg/css/svg-attribute-parser-mode-expected.txt:
  • svg/css/svg-attribute-parser-mode.html:
  • svg/custom/marker-getPropertyValue-expected.txt:
  • svg/custom/marker-getPropertyValue.svg:
10:24 AM Changeset in webkit [231358] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

LayoutTests/fast/mediastream/change-tracks-media-stream-being-played.html is crashing after r231304
https://bugs.webkit.org/show_bug.cgi?id=185303

Reviewed by Eric Carlson.

We need to stop observing the audio track like we do for video track once we are no longer interested in it.
Covered by test no longer crashing.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateTracks):

10:21 AM Changeset in webkit [231357] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

Improve test at media/modern-media-controls/airplay-button/airplay-button-on.html to not hardcode the -apple-wireless-playback-target-active color
https://bugs.webkit.org/show_bug.cgi?id=185297
<rdar://problem/39737716>

Patch by Antoine Quint <Antoine Quint> on 2018-05-04
Reviewed by Dean Jackson.

Create an element and set its "color" property to "-apple-wireless-playback-target-active" so we can use
getComputedStyle() to query the applied value instead of hard-coding the expected color.

  • media/modern-media-controls/airplay-button/airplay-button-on.html:
9:51 AM Changeset in webkit [231356] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Assertion failure in NetworkStorageSession::setCookie: privilege of UI process is not set
https://bugs.webkit.org/show_bug.cgi?id=185262

Patch by Sihui Liu <sihui_liu@apple.com> on 2018-05-04
Reviewed by Chris Dumez.

Fix an assertion failure by setting UI process privileges in constructor of WebsiteDataStore
because UI process may use the cookie API before creating a WebView.

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::WebsiteDataStore):

9:30 AM Changeset in webkit [231355] by Alan Bujtas
  • 8 edits
    1 copy in trunk/Source/WebCore

[LFC] Set the invalidation root as the result of style change.
https://bugs.webkit.org/show_bug.cgi?id=185301

Reviewed by Antti Koivisto.

Compute/propagate the update type on the ancestor chain and return the invalidation root
so that LayoutContext could use it as the entry point for the next layout frame.

  • layout/LayoutContext.cpp:

(WebCore::Layout::LayoutContext::updateLayout):
(WebCore::Layout::LayoutContext::styleChanged):

  • layout/LayoutContext.h: order is not important.
  • layout/blockformatting/BlockInvalidation.cpp:

(WebCore::Layout::invalidationStopsAtFormattingContextBoundary):
(WebCore::Layout::computeUpdateType):
(WebCore::Layout::computeUpdateTypeForAncestor):
(WebCore::Layout::BlockInvalidation::invalidate):

  • layout/blockformatting/BlockInvalidation.h:
  • layout/inlineformatting/InlineInvalidation.cpp:

(WebCore::Layout::InlineInvalidation::invalidate):

  • layout/inlineformatting/InlineInvalidation.h:
9:15 AM Changeset in webkit [231354] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

Adjust sandbox rules for simulator.
https://bugs.webkit.org/show_bug.cgi?id=185275

Reviewed by Brent Fulgham.

Enable rules related to CoreMedia for minimal simulator.

  • WebProcess/com.apple.WebProcess.sb.in:
8:35 AM Changeset in webkit [231353] by Antti Koivisto
  • 2 edits in trunk/Source/WTF

OptionsSet initializer list constructor should be constexpr
https://bugs.webkit.org/show_bug.cgi?id=185298

Reviewed by Anders Carlsson.

  • wtf/OptionSet.h:

(WTF::OptionSet::OptionSet):

8:18 AM Changeset in webkit [231352] by youenn@apple.com
  • 3 edits
    2 adds in trunk

PeerConnection should have its connectionState closed even if doing gathering
https://bugs.webkit.org/show_bug.cgi?id=185267

Reviewed by Darin Adler.

Source/WebCore:

Test: webrtc/addICECandidate-closed.html

In case m_iceConnectionState is closed, m_connectionState should also be set to closed
and RTCPeerConnection should be closed so as to reject any other call.

  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::close):
(WebCore::RTCPeerConnection::updateConnectionState):

LayoutTests:

  • webrtc/addICECandidate-closed-expected.txt: Added.
  • webrtc/addICECandidate-closed.html: Added.
6:26 AM Changeset in webkit [231351] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[MSE][GStreamer] Delete properly the stream from the WebKitMediaSource
https://bugs.webkit.org/show_bug.cgi?id=185242

Patch by Yacine Bandou <yacine.bandou_ext@softathome.com> on 2018-05-04
Reviewed by Xabier Rodriguez-Calvar.

When the sourceBuffer is removed from mediasource, the appropriate stream is not
properly deleted from WebKitMediaSource, because the appsrc and parser elements
of the stream are not removed from the WebKitMediaSource bin.

This patch avoids the regression of r231089, see https://bugs.webkit.org/show_bug.cgi?id=185071

  • platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:

(webKitMediaSrcFreeStream):

3:14 AM Changeset in webkit [231350] by Carlos Garcia Campos
  • 9 edits in trunk

[GTK] Epiphany (GNOME Web) says "Error downloading: Service Unavailable." when trying to download an image from discogs.com
https://bugs.webkit.org/show_bug.cgi?id=174730

Reviewed by Michael Catanzaro.

Source/WebCore:

Export ResourceRequestBase::hasHTTPHeaderField().

  • platform/network/ResourceRequestBase.h:

Source/WebKit:

The problem is that we don't send any User-Agent HTTP header for downloads started by WebProcessPool::download().

  • UIProcess/API/glib/WebKitDownload.cpp:

(webkitDownloadUpdateRequest): Helper to update the cached request.
(webkitDownloadStarted): Updated the cached request if we have one.
(webkit_download_get_request): Use webkitDownloadUpdateRequest().

  • UIProcess/API/glib/WebKitDownloadClient.cpp:
  • UIProcess/API/glib/WebKitDownloadPrivate.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::download): Set the User-Agent HTTP header if there isn't any.

Tools:

Update unit tests to check that User-Agent header is included in HTTP download requests.

  • TestWebKitAPI/Tests/WebKitGLib/TestDownloads.cpp:

(testDownloadRemoteFile):
(testWebViewDownloadURI):
(testPolicyResponseDownload):
(testPolicyResponseDownloadCancel):
(testDownloadMIMEType):
(testContextMenuDownloadActions):

3:12 AM Changeset in webkit [231349] by Carlos Garcia Campos
  • 4 edits in trunk

[GTK] Some event tests failing after r230817
https://bugs.webkit.org/show_bug.cgi?id=185072

Reviewed by Michael Catanzaro.

Source/WebKit:

Do not send mouse move events to the WebProcess for crossing events during testing. WTR never generates crossing
events and they can confuse tests.

Fixes: editing/pasteboard/drag-link-with-data-transfer-adds-trusted-link-to-pasteboard.html

fast/css/user-drag-none.html
fast/events/context-activated-by-key-event.html
fast/events/drag-selects-image.html
fast/events/dropzone-005.html
fast/events/mouse-click-events.html
fast/events/mouse-cursor-change.html

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseCrossingNotifyEvent):

LayoutTests:

Remove expectations for tests that are passing now.

  • platform/gtk/TestExpectations:

May 3, 2018:

11:03 PM Changeset in webkit [231348] by Chris Dumez
  • 11 edits in trunk/Source/WebKit

More aggressively terminate child processes when the connection to their parent process is severed
https://bugs.webkit.org/show_bug.cgi?id=177972
<rdar://problem/33317607>

Reviewed by Geoff Garen.

More aggressively terminate child processes when the connection to their parent process is severed.
Previously, we would dispatch to the main thread and then exit the process. This would sometimes
cause the process to say alive for 10 seconds until our watchdog would forcefully terminate the
process. This could happen in particular when the main thread is blocked on a synchronous IPC.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::didClose): Deleted.

  • NetworkProcess/NetworkProcess.h:
  • PluginProcess/PluginProcess.cpp:

(WebKit::PluginProcess::didClose): Deleted.

  • PluginProcess/PluginProcess.h:
  • Shared/ChildProcess.cpp:

(WebKit::ChildProcess::didClose):
(WebKit::didCloseOnConnectionWorkQueue):
(WebKit::ChildProcess::terminationTimerFired):

  • Shared/ChildProcess.h:
  • StorageProcess/StorageProcess.cpp:

(WebKit::StorageProcess::didClose): Deleted.

  • StorageProcess/StorageProcess.h:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::didClose): Deleted.

  • WebProcess/WebProcess.h:
10:32 PM Changeset in webkit [231347] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

Remove std::random_shuffle
https://bugs.webkit.org/show_bug.cgi?id=185292

Reviewed by Darin Adler.

std::random_shuffle is deprecated in C++14 and removed in C++17,
since std::random_shuffle relies on rand and srand.
Use std::shuffle instead.

  • jit/BinarySwitch.cpp:

(JSC::RandomNumberGenerator::RandomNumberGenerator):
(JSC::RandomNumberGenerator::operator()):
(JSC::RandomNumberGenerator::min):
(JSC::RandomNumberGenerator::max):
(JSC::BinarySwitch::build):

10:28 PM Changeset in webkit [231346] by Yusuke Suzuki
  • 4 edits in trunk/Source/WebCore

Use subprocess.call instead of os.system to handle path with spaces
https://bugs.webkit.org/show_bug.cgi?id=185291

Reviewed by Darin Adler.

If gperf path includes spaces, these python scripts fail to execute gperf.
We use subprocess module instead of os.system to invoke gperf.

  • css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
  • css/makeSelectorPseudoElementsMap.py:
  • platform/network/create-http-header-name-table:
9:33 PM Changeset in webkit [231345] by sbarati@apple.com
  • 13 edits
    2 adds in trunk

Don't prevent CreateThis being folded to NewObject when the structure is poly proto
https://bugs.webkit.org/show_bug.cgi?id=185177

Reviewed by Filip Pizlo.

JSTests:

  • microbenchmarks/construct-poly-proto-object.js: Added.

(foo.A):
(foo):

  • stress/allocation-sinking-new-object-with-poly-proto.js: Added.

(foo.A):
(foo):
(makePolyProto):
(bar):
(baz):

Source/JavaScriptCore:

This patch teaches the DFG/FTL how to constant fold CreateThis with
a known poly proto Structure to NewObject. We do it by emitting a NewObject
followed by a PutByOffset for the prototype value.

We make it so that ObjectAllocationProfile holds the prototype value.
This is sound because JSFunction clears that profile when its 'prototype'
field changes.

This patch also renames underscoreProtoPrivateName to polyProtoName since
that name was nonsensical: it was only used for poly proto.

This is a 2x speedup on the get_callee_polymorphic microbenchmark. I had
regressed that benchmark when I first introduced poly proto.

  • builtins/BuiltinNames.cpp:
  • builtins/BuiltinNames.h:

(JSC::BuiltinNames::BuiltinNames):
(JSC::BuiltinNames::polyProtoName const):
(JSC::BuiltinNames::underscoreProtoPrivateName const): Deleted.

  • bytecode/ObjectAllocationProfile.h:

(JSC::ObjectAllocationProfile::prototype):
(JSC::ObjectAllocationProfile::clear):
(JSC::ObjectAllocationProfile::visitAggregate):

  • bytecode/ObjectAllocationProfileInlines.h:

(JSC::ObjectAllocationProfile::initializeProfile):

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGByteCodeParser.cpp:

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

  • dfg/DFGConstantFoldingPhase.cpp:

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

  • dfg/DFGOperations.cpp:
  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/FunctionRareData.h:
  • runtime/Structure.cpp:

(JSC::Structure::create):

6:50 PM Changeset in webkit [231344] by Yusuke Suzuki
  • 2 edits in trunk/Source/WebCore

Unreviewed, attempt to fix WinCairo build failure
https://bugs.webkit.org/show_bug.cgi?id=185218

  • platform/text/win/LocaleWin.cpp:

(WebCore::LocaleWin::getLocaleInfoString):

6:11 PM Changeset in webkit [231343] by msaboff@apple.com
  • 3 edits
    1 add in trunk

OSR entry pruning of Program Bytecodes doesn't take into account try/catch
https://bugs.webkit.org/show_bug.cgi?id=185281

Reviewed by Saam Barati.

JSTests:

New regression test.

  • stress/baseline-osrentry-catch-is-reachable.js: Added.

(i.j.catch):

Source/JavaScriptCore:

When we compute bytecode block reachability, we need to take into account blocks
containing try/catch.

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):

6:00 PM Changeset in webkit [231342] by Yusuke Suzuki
  • 6 edits in trunk/Source

Use default std::optional if it is provided
https://bugs.webkit.org/show_bug.cgi?id=185159

Reviewed by Michael Catanzaro.

Source/WebKit:

  • Shared/SandboxExtension.h:

(WebKit::SandboxExtension::Handle::decode):

  • Shared/TouchBarMenuItemData.cpp:

(WebKit::TouchBarMenuItemData::decode):

Source/WTF:

  • wtf/Expected.h:
  • wtf/Optional.h:

Do not use <optional> for clang currently.
(WTF::valueOrCompute):

5:55 PM Changeset in webkit [231341] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

ARM: Wrong offset for operand rt in disassembler
https://bugs.webkit.org/show_bug.cgi?id=184083

Patch by Dominik Infuehr <dinfuehr@igalia.com> on 2018-05-03
Reviewed by Yusuke Suzuki.

  • disassembler/ARMv7/ARMv7DOpcode.h:

(JSC::ARMv7Disassembler::ARMv7DOpcodeVMOVDoublePrecision::rt):
(JSC::ARMv7Disassembler::ARMv7DOpcodeVMOVSinglePrecision::rt):

5:54 PM Changeset in webkit [231340] by commit-queue@webkit.org
  • 3 edits in trunk/Source/JavaScriptCore

ARM: Support vstr in disassembler
https://bugs.webkit.org/show_bug.cgi?id=184084

Patch by Dominik Infuehr <dinfuehr@igalia.com> on 2018-05-03
Reviewed by Yusuke Suzuki.

  • disassembler/ARMv7/ARMv7DOpcode.cpp:

(JSC::ARMv7Disassembler::ARMv7DOpcodeVLDRSTR::format):
(JSC::ARMv7Disassembler::ARMv7DOpcodeVLDR::format): Deleted.

  • disassembler/ARMv7/ARMv7DOpcode.h:

(JSC::ARMv7Disassembler::ARMv7DOpcodeVLDRSTR::opName):
(JSC::ARMv7Disassembler::ARMv7DOpcodeVLDR::condition): Deleted.
(JSC::ARMv7Disassembler::ARMv7DOpcodeVLDR::uBit): Deleted.
(JSC::ARMv7Disassembler::ARMv7DOpcodeVLDR::rn): Deleted.
(JSC::ARMv7Disassembler::ARMv7DOpcodeVLDR::vd): Deleted.
(JSC::ARMv7Disassembler::ARMv7DOpcodeVLDR::doubleReg): Deleted.
(JSC::ARMv7Disassembler::ARMv7DOpcodeVLDR::immediate8): Deleted.

5:49 PM Changeset in webkit [231339] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Invoke ensureArrayStorage for all arguments
https://bugs.webkit.org/show_bug.cgi?id=185247

Patch by Dominik Infuehr <dinfuehr@igalia.com> on 2018-05-03
Reviewed by Yusuke Suzuki.

ensureArrayStorage was only invoked for first argument in each loop iteration.

  • jsc.cpp:

(functionEnsureArrayStorage):

5:41 PM Changeset in webkit [231338] by fpizlo@apple.com
  • 10 edits
    2 adds
    1 delete in trunk/Source/JavaScriptCore

Make it easy to log compile times for all optimizing tiers
https://bugs.webkit.org/show_bug.cgi?id=185270

Reviewed by Keith Miller.

This makes --logPhaseTimes=true enable logging of phase times for DFG and B3 using a common
helper class, CompilerTimingScope. This used to be called B3::TimingScope and only B3 used
it.

This should help us reduce compile times by telling us where to look. So, far, it looks like
CFA is the worst.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • b3/B3Common.cpp:

(JSC::B3::shouldMeasurePhaseTiming): Deleted.

  • b3/B3Common.h:
  • b3/B3TimingScope.cpp: Removed.
  • b3/B3TimingScope.h:

(JSC::B3::TimingScope::TimingScope):

  • dfg/DFGPhase.h:

(JSC::DFG::runAndLog):

  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::compileInThread):

  • tools/CompilerTimingScope.cpp: Added.

(JSC::CompilerTimingScope::CompilerTimingScope):
(JSC::CompilerTimingScope::~CompilerTimingScope):

  • tools/CompilerTimingScope.h: Added.
  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):

  • runtime/Options.h:
5:40 PM Changeset in webkit [231337] by fpizlo@apple.com
  • 35 edits
    3 deletes in trunk/Source

Strings should not be allocated in a gigacage
https://bugs.webkit.org/show_bug.cgi?id=185218

Reviewed by Saam Barati.
Source/bmalloc:


This removes the string gigacage.

Putting strings in a gigacage prevents read gadgets. The other things that get to be in gigacages
are there to prevent read-write gadgets.

Also, putting strings in a gigacage seems to have been a bigger regression than putting other
things in gigacages.

Therefore, to maximize the benefit/cost ratio of gigacages, we should evict strings from them. If
we want to throw away perf for security, there are more beneficial things to sacrifice.

  • bmalloc/Gigacage.h:

(Gigacage::name):
(Gigacage::basePtr):
(Gigacage::size):
(Gigacage::forEachKind):

  • bmalloc/HeapKind.h:

(bmalloc::isGigacage):
(bmalloc::gigacageKind):
(bmalloc::heapKind):
(bmalloc::isActiveHeapKindAfterEnsuringGigacage):
(bmalloc::mapToActiveHeapKindAfterEnsuringGigacage):

Source/JavaScriptCore:

  • runtime/JSBigInt.cpp:

(JSC::JSBigInt::toStringGeneric):

  • runtime/JSString.cpp:

(JSC::JSRopeString::resolveRopeToAtomicString const):
(JSC::JSRopeString::resolveRope const):

  • runtime/JSString.h:

(JSC::JSString::create):
(JSC::JSString::createHasOtherOwner):

  • runtime/VM.h:

(JSC::VM::gigacageAuxiliarySpace):

Source/WebCore:

No new tests because no new behavior.

  • Modules/indexeddb/server/IDBSerialization.cpp:

(WebCore::decodeKey):

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneDeserializer::readString):

  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::normalizeSpaces):

  • html/parser/HTMLTreeBuilder.cpp:

(WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeRemainingWhitespace):

  • platform/URLParser.cpp:

(WebCore::percentEncodeByte):
(WebCore::serializeURLEncodedForm):
(WebCore::URLParser::serialize):

  • platform/URLParser.h:
  • platform/graphics/FourCC.cpp:

(WebCore::FourCC::toString const):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::ReplicaState::cloneID const):

  • platform/text/LocaleICU.cpp:

(WebCore::LocaleICU::decimalSymbol):
(WebCore::LocaleICU::decimalTextAttribute):
(WebCore::getDateFormatPattern):
(WebCore::LocaleICU::createLabelVector):
(WebCore::getFormatForSkeleton):

  • platform/win/FileSystemWin.cpp:

(WebCore::FileSystem::getFinalPathName):
(WebCore::FileSystem::pathByAppendingComponent):
(WebCore::FileSystem::storageDirectory):

Source/WTF:


  • WTF.xcodeproj/project.pbxproj:
  • wtf/Deque.h:
  • wtf/Forward.h:
  • wtf/Gigacage.h:

(Gigacage::name):
(Gigacage::basePtr):

  • wtf/Vector.h:

(WTF::VectorBufferBase::allocateBuffer):
(WTF::VectorBufferBase::tryAllocateBuffer):
(WTF::VectorBufferBase::reallocateBuffer):
(WTF::VectorBufferBase::deallocateBuffer):
(WTF::minCapacity>::Vector):
(WTF::=):
(WTF::minCapacity>::contains const):
(WTF::minCapacity>::findMatching const):
(WTF::minCapacity>::find const):
(WTF::minCapacity>::reverseFind const):
(WTF::minCapacity>::appendIfNotContains):
(WTF::minCapacity>::fill):
(WTF::minCapacity>::appendRange):
(WTF::minCapacity>::expandCapacity):
(WTF::minCapacity>::tryExpandCapacity):
(WTF::minCapacity>::resize):
(WTF::minCapacity>::resizeToFit):
(WTF::minCapacity>::shrink):
(WTF::minCapacity>::grow):
(WTF::minCapacity>::asanSetInitialBufferSizeTo):
(WTF::minCapacity>::asanSetBufferSizeToFullCapacity):
(WTF::minCapacity>::asanBufferSizeWillChangeTo):
(WTF::minCapacity>::reserveCapacity):
(WTF::minCapacity>::tryReserveCapacity):
(WTF::minCapacity>::reserveInitialCapacity):
(WTF::minCapacity>::shrinkCapacity):
(WTF::minCapacity>::append):
(WTF::minCapacity>::tryAppend):
(WTF::minCapacity>::constructAndAppend):
(WTF::minCapacity>::tryConstructAndAppend):
(WTF::minCapacity>::appendSlowCase):
(WTF::minCapacity>::constructAndAppendSlowCase):
(WTF::minCapacity>::tryConstructAndAppendSlowCase):
(WTF::minCapacity>::uncheckedAppend):
(WTF::minCapacity>::appendVector):
(WTF::minCapacity>::insert):
(WTF::minCapacity>::insertVector):
(WTF::minCapacity>::remove):
(WTF::minCapacity>::removeFirst):
(WTF::minCapacity>::removeFirstMatching):
(WTF::minCapacity>::removeAll):
(WTF::minCapacity>::removeAllMatching):
(WTF::minCapacity>::reverse):
(WTF::minCapacity>::map const):
(WTF::minCapacity>::releaseBuffer):
(WTF::minCapacity>::checkConsistency):
(WTF::swap):
(WTF::operator==):
(WTF::operator!=):
(WTF::removeRepeatedElements):
(WTF::Malloc>::Vector): Deleted.
(WTF::Malloc>::contains const): Deleted.
(WTF::Malloc>::findMatching const): Deleted.
(WTF::Malloc>::find const): Deleted.
(WTF::Malloc>::reverseFind const): Deleted.
(WTF::Malloc>::appendIfNotContains): Deleted.
(WTF::Malloc>::fill): Deleted.
(WTF::Malloc>::appendRange): Deleted.
(WTF::Malloc>::expandCapacity): Deleted.
(WTF::Malloc>::tryExpandCapacity): Deleted.
(WTF::Malloc>::resize): Deleted.
(WTF::Malloc>::resizeToFit): Deleted.
(WTF::Malloc>::shrink): Deleted.
(WTF::Malloc>::grow): Deleted.
(WTF::Malloc>::asanSetInitialBufferSizeTo): Deleted.
(WTF::Malloc>::asanSetBufferSizeToFullCapacity): Deleted.
(WTF::Malloc>::asanBufferSizeWillChangeTo): Deleted.
(WTF::Malloc>::reserveCapacity): Deleted.
(WTF::Malloc>::tryReserveCapacity): Deleted.
(WTF::Malloc>::reserveInitialCapacity): Deleted.
(WTF::Malloc>::shrinkCapacity): Deleted.
(WTF::Malloc>::append): Deleted.
(WTF::Malloc>::tryAppend): Deleted.
(WTF::Malloc>::constructAndAppend): Deleted.
(WTF::Malloc>::tryConstructAndAppend): Deleted.
(WTF::Malloc>::appendSlowCase): Deleted.
(WTF::Malloc>::constructAndAppendSlowCase): Deleted.
(WTF::Malloc>::tryConstructAndAppendSlowCase): Deleted.
(WTF::Malloc>::uncheckedAppend): Deleted.
(WTF::Malloc>::appendVector): Deleted.
(WTF::Malloc>::insert): Deleted.
(WTF::Malloc>::insertVector): Deleted.
(WTF::Malloc>::remove): Deleted.
(WTF::Malloc>::removeFirst): Deleted.
(WTF::Malloc>::removeFirstMatching): Deleted.
(WTF::Malloc>::removeAll): Deleted.
(WTF::Malloc>::removeAllMatching): Deleted.
(WTF::Malloc>::reverse): Deleted.
(WTF::Malloc>::map const): Deleted.
(WTF::Malloc>::releaseBuffer): Deleted.
(WTF::Malloc>::checkConsistency): Deleted.

  • wtf/text/AtomicStringImpl.h:
  • wtf/text/CString.cpp:

(WTF::CStringBuffer::createUninitialized):

  • wtf/text/CString.h:
  • wtf/text/StringBuffer.h:

(WTF::StringBuffer::StringBuffer):
(WTF::StringBuffer::~StringBuffer):
(WTF::StringBuffer::resize):

  • wtf/text/StringImpl.cpp:

(WTF::StringImpl::~StringImpl):
(WTF::StringImpl::destroy):
(WTF::StringImpl::createUninitializedInternalNonEmpty):
(WTF::StringImpl::reallocateInternal):
(WTF::StringImpl::releaseAssertCaged const): Deleted.

  • wtf/text/StringImpl.h:

(WTF::StringImpl::createSubstringSharingImpl):
(WTF::StringImpl::tryCreateUninitialized):
(WTF::StringImpl::adopt):
(WTF::StringImpl::assertCaged const): Deleted.

  • wtf/text/StringMalloc.cpp: Removed.
  • wtf/text/StringMalloc.h: Removed.
  • wtf/text/StringVector.h: Removed.
  • wtf/text/SymbolImpl.h:
  • wtf/text/UniquedStringImpl.h:
  • wtf/text/WTFString.h:

(WTF::String::adopt):
(WTF::String::assertCaged const): Deleted.
(WTF::String::releaseAssertCaged const): Deleted.

4:54 PM Changeset in webkit [231336] by Ross Kirsling
  • 2 edits in trunk/Tools

[WinCairo] Test archive must use Python zipfile, just like build product.
https://bugs.webkit.org/show_bug.cgi?id=185265

Reviewed by Per Arne Vollan.

  • BuildSlaveSupport/test-result-archive:

(archive_test_results):
Copy over Win32-oriented archiving logic from built-product-archive.

4:51 PM Changeset in webkit [231335] by Brent Fulgham
  • 4 edits in trunk/Source/WebCore

Widgets should hold a WeakPtr to their parents
https://bugs.webkit.org/show_bug.cgi?id=185239
<rdar://problem/39741250>

Reviewed by Zalan Bujtas.

  • platform/ScrollView.h:

(WebCore::ScrollView::weakPtrFactory): Added.

  • platform/Widget.cpp:

(WebCore::Widget::init): Don't perform an unnecessary assignment.
(WebCore::Widget::setParent): Grab a WeakPtr to the parent ScrollView.

  • platform/Widget.h:

(WebCore::Widget::parent const): Change type to a WeakPtr.

4:43 PM Changeset in webkit [231334] by rniwa@webkit.org
  • 2 edits
    1 copy in trunk/LayoutTests

Revert the unitended changes in r231329.

  • http/tests/media/video-play-stall.html: Replaced with LayoutTests/http/tests/media/video-play-stall.html.
  • platform/mac/TestExpectations:
4:34 PM Changeset in webkit [231333] by Yusuke Suzuki
  • 15 edits in trunk/Source/WebCore

Use pointer instead of std::optional<T&>
https://bugs.webkit.org/show_bug.cgi?id=185186

Reviewed by Alex Christensen.

std::optional<T&> is not accepted in C++17 spec.
In this patch, we replace it with T*, which is well-aligned to
WebKit's convention.

  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::iceServersFromConfiguration):
(WebCore::RTCPeerConnection::initializeConfiguration):
(WebCore::RTCPeerConnection::setConfiguration):

  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::parseSystemColor):

  • css/parser/CSSParser.h:
  • dom/DatasetDOMStringMap.cpp:

(WebCore::DatasetDOMStringMap::item const):
(WebCore::DatasetDOMStringMap::namedItem const):
(WebCore:: const): Deleted.

  • dom/DatasetDOMStringMap.h:
  • dom/Element.cpp:

(WebCore::Element::insertAdjacentHTML):

  • dom/Element.h:
  • html/canvas/CanvasStyle.cpp:

(WebCore::parseColor):

  • inspector/DOMEditor.cpp:
  • platform/network/curl/CurlFormDataStream.cpp:

(WebCore::CurlFormDataStream::getPostData):
(): Deleted.

  • platform/network/curl/CurlFormDataStream.h:
  • platform/network/curl/CurlRequest.cpp:

(WebCore::CurlRequest::setupPOST):

  • testing/MockCDMFactory.cpp:

(WebCore::MockCDMFactory::keysForSessionWithID const):
(WebCore::MockCDMInstance::updateLicense):
(WebCore:: const): Deleted.

  • testing/MockCDMFactory.h:
4:21 PM Changeset in webkit [231332] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix 32-bit profile offset for change in bytecode
length of the get_by_id and get_array_length opcodes.

  • llint/LowLevelInterpreter32_64.asm:
4:18 PM Changeset in webkit [231331] by Chris Dumez
  • 24 edits
    2 adds in trunk

Stop using an iframe's id as fallback if its name attribute is not set
https://bugs.webkit.org/show_bug.cgi?id=11388

Reviewed by Geoff Garen.

Source/WebCore:

WebKit had logic to use an iframe's id as fallback name when its name
content attribute is not set. This behavior was not standard and did not
match other browsers:

Gecko / Trident never behaved this way. Blink was aligned with us until
they started to match the specification in:

This WebKit quirk was causing some Web-compatibility issues because it
would affect the behavior of Window's name property getter when trying
to look up an iframe by id. Because of Window's named property getter
behavior [1], we would return the frame's contentWindow instead of the
iframe element itself.

[1] https://html.spec.whatwg.org/multipage/window-object.html#named-access-on-the-window-object

Test: fast/dom/Window/named-getter-frame-id.html

  • html/HTMLFrameElementBase.cpp:

(WebCore::HTMLFrameElementBase::openURL):
(WebCore::HTMLFrameElementBase::parseAttribute):
(WebCore::HTMLFrameElementBase::didFinishInsertingNode):

  • html/HTMLFrameElementBase.h:

LayoutTests:

  • fast/dom/Window/named-getter-frame-id-expected.txt: Added.
  • fast/dom/Window/named-getter-frame-id.html: Added.

Add layout test coverage.

  • fast/dom/Geolocation/srcdoc-getCurrentPosition-expected.txt:
  • fast/dom/Geolocation/srcdoc-watchPosition-expected.txt:
  • fast/dom/HTMLAnchorElement/anchor-in-noscroll-iframe-crash.html:
  • fast/dom/Window/window-special-properties-expected.txt:
  • fast/frames/iframe-no-name-expected.txt:
  • fast/frames/iframe-no-name.html:
  • fast/layers/prevent-hit-test-during-layout.html:
  • fast/xmlhttprequest/xmlhttprequest-no-file-access-expected.txt:
  • http/tests/security/clipboard/copy-paste-html-cross-origin-iframe-across-origin.html:
  • http/tests/security/contentSecurityPolicy/iframe-blank-url-programmatically-add-external-script-expected.txt:
  • http/tests/security/cross-origin-reified-window-property-access.html:
  • http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-non-recent-user-interaction-and-try-access-from-right-frame-expected.txt:
  • http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-non-recent-user-interaction-but-try-access-from-wrong-frame-expected.txt:
  • http/tests/webrtc/filtering-ice-candidate-same-origin-frame.html:
  • http/wpt/beacon/keepalive-after-navigation-expected.txt:
  • http/wpt/cache-storage/cache-remove-twice.html:

Update some layout tests that relied on our old (non-standard) behavior.

3:10 PM Changeset in webkit [231330] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore

[iOS] Internal text and audio tracks not in fullscreen menu
https://bugs.webkit.org/show_bug.cgi?id=185268
<rdar://problem/38673440>

Reviewed by Jer Noble.

  • platform/cocoa/PlaybackSessionModelMediaElement.mm:

(WebCore::PlaybackSessionModelMediaElement::setMediaElement): 'addtrack' and 'removetrack'
events are fired at the track lists, not the media element.

2:34 PM Changeset in webkit [231329] by rniwa@webkit.org
  • 12 edits
    2 adds in trunk

Using image map inside a shadow tree results hits a release assert in DocumentOrderedMap::add
https://bugs.webkit.org/show_bug.cgi?id=185238

Reviewed by Antti Koivisto.

Source/WebCore:

The bug was caused by DocumentOrderedMap for the image elements with usemap being stored in Document
even if those image elements were in a shadow tree. Fixed the bug by moving the map to TreeScope.

Test: fast/images/imagemap-in-nested-shadow-tree.html

fast/images/imagemap-in-shadow-tree.html

  • dom/Document.cpp:

(WebCore::Document::addImageElementByUsemap): Moved to TreeScope.
(WebCore::Document::removeImageElementByUsemap): Ditto.
(WebCore::Document::imageElementByUsemap const): Ditto.

  • dom/Document.h:
  • dom/TreeScope.cpp:

(WebCore::TreeScope::destroyTreeScopeData): Clear m_imagesByUsemap as well as m_elementsByName.
(WebCore::TreeScope::getImageMap const): Removed the code to parse usemap. RenderImage::imageMap()
which used to call this function with the raw value of the usemap content attribute now calls it
via HTMLImageElement::associatedMapElement(), which uses the parsed usemap.
(WebCore::TreeScope::addImageElementByUsemap): Moved from Document.
(WebCore::TreeScope::removeImageElementByUsemap): Ditto.
(WebCore::TreeScope::imageElementByUsemap const): Ditto.

  • dom/TreeScope.h:
  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::parseAttribute):
(WebCore::HTMLImageElement::insertedIntoAncestor): This image element can be associated with a map element
if it's connected to a document.
(WebCore::HTMLImageElement::removedFromAncestor):
(WebCore::HTMLImageElement::associatedMapElement const):

  • html/HTMLImageElement.h:
  • html/HTMLMapElement.cpp:

(WebCore::HTMLMapElement::imageElement):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::imageMap const):

LayoutTests:

  • fast/images/imagemap-in-nested-shadow-tree-expected.txt: Added.
  • fast/images/imagemap-in-nested-shadow-tree.html: Added.
  • fast/images/imagemap-in-shadow-tree-expected.txt: Added.
  • fast/images/imagemap-in-shadow-tree.html: Added.
2:27 PM Changeset in webkit [231328] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

cleanup modules usage for the Test262-Runner
https://bugs.webkit.org/show_bug.cgi?id=185263

Patch by Leo Balter <Leo Balter> on 2018-05-03
Reviewed by Michael Saboff.

  • Scripts/test262-runner:
  • Scripts/test262/Runner.pm:

(processCLI):

2:08 PM Changeset in webkit [231327] by commit-queue@webkit.org
  • 4 edits in trunk/Source

[WebGL] Add runtime flag for enabling ASTC support in WebGL
https://bugs.webkit.org/show_bug.cgi?id=184840

Patch by Justin Fan <Justin Fan> on 2018-05-03
Reviewed by Myles C. Maxfield.

Added runtime flag for ASTC support in WebGL, to turn on/off when extension is implemented.

Source/WebCore:

  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setWebGLCompressedTextureASTCSupportEnabled):
(WebCore::RuntimeEnabledFeatures::webGLCompressedTextureASTCSupportEnabled const):

Source/WebKit:

  • Shared/WebPreferences.yaml:
1:55 PM Changeset in webkit [231326] by Keith Rollin
  • 2 edits in trunk/Source/WebKit

Unreviewed build fix after <https://trac.webkit.org/changeset/231282>.

  • NetworkProcess/NetworkActivityTracker.h:
1:52 PM Changeset in webkit [231325] by commit-queue@webkit.org
  • 6 edits in trunk

Remove [NoInterfaceObject] from DOMRectList
https://bugs.webkit.org/show_bug.cgi?id=185255

Patch by Chris Nardi <cnardi@chromium.org> on 2018-05-03
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Update Geometry IDL test from upstream and update expectations.

  • web-platform-tests/css/geometry/interfaces-expected.txt:
  • web-platform-tests/css/geometry/interfaces.worker-expected.txt:
  • web-platform-tests/interfaces/geometry.idl:

Source/WebCore:

In https://github.com/w3c/fxtf-drafts/issues/233, [NoInterfaceObject] was removed
from DOMRectList. Remove it from our implementation to match the spec, as well as
Chrome and Firefox.

Updated web platform tests IDL test for the Geometry spec.

  • dom/DOMRectList.idl:
1:39 PM Changeset in webkit [231324] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore/PAL

[iOS] Provide audio route information when invoking AirPlay picker
https://bugs.webkit.org/show_bug.cgi?id=185199
<rdar://problem/39853103>

Another attempt at an unreviewed build fix.

  • pal/spi/mac/AVFoundationSPI.h:
1:27 PM Changeset in webkit [231323] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

test262/Runner.pm: minor fixes
https://bugs.webkit.org/show_bug.cgi?id=185250

Patch by Valerie R Young <valerie@bocoup.com> on 2018-05-03
Reviewed by Michael Saboff.

Add comments, change output and fix bug: unintended interpolation
of filename when running jsc.

  • Scripts/test262/Runner.pm:

(processCLI):
(main):
(runTest):

1:16 PM Changeset in webkit [231322] by Wenson Hsieh
  • 5 edits in trunk/Source

Ads in NYTimes app are shifted downwards by the scroll view's top content inset
https://bugs.webkit.org/show_bug.cgi?id=185251
<rdar://problem/39062357>

Reviewed by Tim Horton.

Source/WebKit:

The NYTimes app embeds advertisements in each article's WKWebView by adding views in the WKScrollView's view
hierarchy. These views are positioned using the bounding client rects of elements in the DOM (via Element
::getBoundingClientRect). Prior to r229641, WebKit would report bounding client rects inset by the content
insets of WKScrollView, which means that if a top content inset X is specified on the scroll view, an element
that is flush against the top of the viewport will have a bounding client rect top of -X (when it should really
be 0).

To account for this, NYTimes adds the scroll view content insets back to the bounding client rect when
determining the position of each advertisement which, after r229641, causes these views to be shifted downwards
by an amount equal to the scroll view content inset top.

This new behavior does not affect Safari, since Safari uses SPI to explicitly set obscured insets. As such, we
address this by gating the scroll view content inset fix with a linked-on-or-after check.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _computedObscuredInset]):

  • UIProcess/Cocoa/VersionChecks.h:

Source/WTF:

Add a new DYLD_IOS_VERSION macro definition for previous or non-internal SDKs.

  • wtf/spi/darwin/dyldSPI.h:
12:59 PM Changeset in webkit [231321] by Chris Dumez
  • 10 edits
    1 add in trunk

Load hangs if the WebProcess fails to launch
https://bugs.webkit.org/show_bug.cgi?id=185225
<rdar://problem/38249058>

Reviewed by Geoff Garen.

Source/WebKit:

When a process fails to launch, ChildProcessProxy::didFinishLaunching() gets called with an
invalid connection identifier. While NetworkProcessProxy::didFinishLaunching() properly deals with
this situation, WebProcessProxy::didFinishLaunching() does not. As a result, we do not attempt to
relaunch the process, we do not notify the client and WebPageProxy::m_isValid stays true.

This patch thus updates WebProcessProxy::didFinishLaunching() to check if the connection identifier
is valid and treats it as a crash. As a result, the WebPageProxies properly reset their state and
the client gets notified of the crash so that it can attempt to reload.

  • UIProcess/API/Cocoa/WKProcessPool.mm:

(-[WKProcessPool _makeNextWebProcessLaunchFailForTesting]):

  • UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
  • UIProcess/Launcher/ProcessLauncher.h:
  • UIProcess/Launcher/mac/ProcessLauncherMac.mm:

(WebKit::ProcessLauncher::launchProcess):
Add SPI to make the next WebProcess launch fail, for the purpose of API testing.

  • UIProcess/WebProcessPool.h:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::getLaunchOptions):
(WebKit::WebProcessProxy::didClose):
(WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch):
(WebKit::WebProcessProxy::didFinishLaunching):

  • UIProcess/WebProcessProxy.h:

Tools:

Add API test coverage.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm: Added.

(-[CrashOnStartNavigationDelegate _webView:webContentProcessDidTerminateWithReason:]):
(-[CrashOnStartNavigationDelegate webView:didFinishNavigation:]):
(-[CrashRecoveryScriptMessageHandler userContentController:didReceiveScriptMessage:]):
(TEST):

12:42 PM Changeset in webkit [231320] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark media/controls/pip-placeholder-without-video-controls.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=170620

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
12:17 PM Changeset in webkit [231319] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

REGRESSION(iOS 11.3): Crashes in TimerBase::~TimerBase() in Tencent x5gamehelper
https://bugs.webkit.org/show_bug.cgi?id=185073
<rdar://problem/39821223>

Reviewed by Alexey Proskuryakov.

The following changes were made:

  • Make sure SocketStream callbacks are always scheduled on the right runloop: WebThreadRunLoop() on WebKitLegacy iOS, loaderRunLoop() on Windows and main runloop otherwise.
  • When the SocketStream callbacks are called, unconditionally call callOnMainThreadAndWait() before calling methods on the SocketStream client. Previously, this code path was specific to Windows but there is no reason to have platform-specific code here. callOnMainThreadAndWait() calls the function right away if we're already on the main thread, which will be the case on other platform than Windows.
  • platform/network/cf/SocketStreamHandleImplCFNet.cpp:

(WebCore::callbacksRunLoop):
(WebCore::callbacksRunLoopMode):
(WebCore::SocketStreamHandleImpl::scheduleStreams):
(WebCore::SocketStreamHandleImpl::pacExecutionCallback):
(WebCore::SocketStreamHandleImpl::executePACFileURL):
(WebCore::SocketStreamHandleImpl::removePACRunLoopSource):
(WebCore::SocketStreamHandleImpl::readStreamCallback):
(WebCore::SocketStreamHandleImpl::writeStreamCallback):
(WebCore::SocketStreamHandleImpl::platformClose):

11:39 AM Changeset in webkit [231318] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC] Enable multiple layout roots for incremental layout.
https://bugs.webkit.org/show_bug.cgi?id=185185

Reviewed by Antti Koivisto.

With certain type of style changes, we can stop the box invalidation at the formatting context boundary.
When multiple boxes need updating in different formatting contexts, instead of marking the parent containing block chain all
the way up to a common ancestor, we could just work with a list of layout entry points per layout frame.

  • layout/FormattingState.h:
  • layout/LayoutContext.cpp:

(WebCore::Layout::LayoutContext::updateLayout):
(WebCore::Layout::LayoutContext::addLayoutEntryPoint):

  • layout/LayoutContext.h:
11:39 AM Changeset in webkit [231317] by msaboff@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

WebContent crash loading page on seas.upenn.edu @ JavaScriptCore: vmEntryToJavaScript
https://bugs.webkit.org/show_bug.cgi?id=185231

Reviewed by Saam Barati.

We weren't clearing the scratch register cache when switching back and forth between
allowing scratch register usage. We disallow scratch register usage when we are in
code that will freely allocate and use any register. Such usage can change the
contents of scratch registers. For ARM64, where we cache the contents of scratch
registers to reuse some or all of the contained values, we need to invalidate these
caches. We do this when re-enabling scratch register usage, that is when we transition
from disallow to allow scratch register usage.

Added a new Air regression test.

  • assembler/AllowMacroScratchRegisterUsage.h:

(JSC::AllowMacroScratchRegisterUsage::AllowMacroScratchRegisterUsage):

  • assembler/AllowMacroScratchRegisterUsageIf.h:

(JSC::AllowMacroScratchRegisterUsageIf::AllowMacroScratchRegisterUsageIf):

  • assembler/DisallowMacroScratchRegisterUsage.h:

(JSC::DisallowMacroScratchRegisterUsage::~DisallowMacroScratchRegisterUsage):

  • b3/air/testair.cpp:
11:18 AM Changeset in webkit [231316] by keith_miller@apple.com
  • 18 edits
    2 deletes in trunk/Source/JavaScriptCore

Remove the prototype caching for get_by_id in the LLInt
https://bugs.webkit.org/show_bug.cgi?id=185226

Reviewed by Michael Saboff.

There is no evidence that this is actually a speedup and we keep
getting bugs with it. At this point it seems like we should just
remove this code.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • bytecode/BytecodeDumper.cpp:

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

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

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

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finalizeLLIntInlineCaches):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::llintGetByIdWatchpointMap): Deleted.

  • bytecode/GetByIdStatus.cpp:

(JSC::GetByIdStatus::computeFromLLInt):

  • bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.cpp: Removed.
  • bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.h: Removed.
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitGetById):

  • dfg/DFGByteCodeParser.cpp:

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

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • jit/JIT.cpp:

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

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):
(JSC::LLInt::setupGetByIdPrototypeCache): Deleted.

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/Options.h:
11:13 AM Changeset in webkit [231315] by Chris Dumez
  • 2 edits in trunk/LayoutTests

REGRESSION: Layout Test http/tests/security/location-cross-origin.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=185259

Unreviewed, stop relying on a setImeout(100) and epect the frame navigation to have completed. Instead,
use a setInterval() to poll until the cross-origin frame has navigated.

  • http/tests/security/location-cross-origin.html:
10:51 AM Changeset in webkit [231314] by jmarcell@apple.com
  • 2 edits in tags/Safari-606.1.16/Source/WTF

Revert r230930. rdar://problem/39945965

10:19 AM Changeset in webkit [231313] by don.olmstead@sony.com
  • 3 edits in trunk/Tools

[WinCairo] Add JSC test bots
https://bugs.webkit.org/show_bug.cgi?id=185234

Reviewed by Per Arne Vollan.

  • BuildSlaveSupport/build.webkit.org-config/config.json:
  • BuildSlaveSupport/build.webkit.org-config/steps.py:

(RunJavaScriptCoreTests.start):

10:15 AM Changeset in webkit [231312] by Alan Bujtas
  • 11 edits
    4 copies in trunk/Source/WebCore

[LFC] Box invalidation logic should go to dedicated classes.
https://bugs.webkit.org/show_bug.cgi?id=185249

Reviewed by Antti Koivisto.

Each formatting context can initiate a different type of invalidation when
style attribute changes in a box.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • layout/FormattingState.cpp:

(WebCore::Layout::FormattingState::FormattingState):

  • layout/FormattingState.h:

(WebCore::Layout::FormattingState::isBlockFormattingState const):
(WebCore::Layout::FormattingState::isInlineFormattingState const):

  • layout/LayoutContext.cpp:

(WebCore::Layout::LayoutContext::styleChanged):
(WebCore::Layout::LayoutContext::markNeedsUpdate):

  • layout/LayoutContext.h:
  • layout/blockformatting/BlockFormattingState.cpp:

(WebCore::Layout::BlockFormattingState::BlockFormattingState):

  • layout/blockformatting/BlockFormattingState.h:
  • layout/blockformatting/BlockInvalidation.cpp: Copied from Source/WebCore/layout/blockformatting/BlockFormattingState.cpp.

(WebCore::Layout::BlockInvalidation::invalidate):

  • layout/blockformatting/BlockInvalidation.h: Copied from Source/WebCore/layout/inlineformatting/InlineFormattingState.h.
  • layout/inlineformatting/InlineFormattingState.cpp:

(WebCore::Layout::InlineFormattingState::InlineFormattingState):

  • layout/inlineformatting/InlineFormattingState.h:
  • layout/inlineformatting/InlineInvalidation.cpp: Copied from Source/WebCore/layout/inlineformatting/InlineFormattingState.cpp.

(WebCore::Layout::InlineInvalidation::invalidate):

  • layout/inlineformatting/InlineInvalidation.h: Copied from Source/WebCore/layout/blockformatting/BlockFormattingState.h.
10:08 AM Changeset in webkit [231311] by Michael Catanzaro
  • 4 edits in trunk

WebKit should send fake macOS user agent to docs.google.com
https://bugs.webkit.org/show_bug.cgi?id=185165

Reviewed by Carlos Garcia Campos.

Source/WebCore:

  • platform/UserAgentQuirks.cpp:

(WebCore::urlRequiresMacintoshPlatform):
(WebCore::urlRequiresLinuxDesktopPlatform):

Tools:

  • TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:

(TestWebKitAPI::TEST):

9:58 AM Changeset in webkit [231310] by Ryan Haddad
  • 8 edits
    1 delete in trunk

Unreviewed, rolling out r231197.

The test added with this change crashes on the 32-bit JSC bot.

Reverted changeset:

"Correctly detect string overflow when using the 'Function'
constructor"
https://bugs.webkit.org/show_bug.cgi?id=184883
https://trac.webkit.org/changeset/231197

9:52 AM Changeset in webkit [231309] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

test262/Runner.pm: performance improvements
https://bugs.webkit.org/show_bug.cgi?id=185202

Patch by Valerie R Young <valerie@bocoup.com> on 2018-05-03
Reviewed by Michael Saboff.

Batch the tests by the number of processes, and give each process
a file to save results to to avoid threading. Do not parallelize
when running small sets of tests.

  • Scripts/test262/Runner.pm:

(processCLI):
(main):
(processFile):
(processResult):

9:37 AM Changeset in webkit [231308] by commit-queue@webkit.org
  • 21 edits in trunk/Source

Unreviewed, rolling out r231223 and r231288.
https://bugs.webkit.org/show_bug.cgi?id=185256

The change in r231223 breaks internal builds, and r231288 is a
dependent change. (Requested by ryanhaddad on #webkit).

Reverted changesets:

"Use default std::optional if it is provided"
https://bugs.webkit.org/show_bug.cgi?id=185159
https://trac.webkit.org/changeset/231223

"Use pointer instead of
std::optional<std::reference_wrapper<>>"
https://bugs.webkit.org/show_bug.cgi?id=185186
https://trac.webkit.org/changeset/231288

9:31 AM Changeset in webkit [231307] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

An error message is written to stderr when the WebContent process is blocking WindowServer access.
https://bugs.webkit.org/show_bug.cgi?id=184701

Reviewed by Brent Fulgham.

Calling 'setApplicationIsDaemon(true)' instead of 'CGSSetDenyWindowServerConnections(true)' to disable
access to the WindowServer in the WebContent process, will remove this error message. After this change,
the url of the WebContent process is still showing up in Activity Monitor, which previously was a
problem when calling 'setApplicationIsDaemon(true)'.

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeProcess):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeProcess):

9:01 AM Changeset in webkit [231306] by Ryan Haddad
  • 14 edits in trunk

Unreviewed, rolling out r231253.

The API test added with this change is crashing on the bots.

Reverted changeset:

"Web Inspector: opt out of process swap on navigation if a Web
Inspector frontend is connected"
https://bugs.webkit.org/show_bug.cgi?id=184861
https://trac.webkit.org/changeset/231253

8:48 AM WebKitGTK/Gardening/Calendar edited by magomez@igalia.com
(diff)
8:43 AM Changeset in webkit [231305] by magomez@igalia.com
  • 3 edits
    1 add
    1 delete in trunk/LayoutTests

Unreviewed GTK+ gardening after r231300.

  • platform/gtk/TestExpectations:
  • platform/gtk/compositing/layer-creation/overlap-animation-expected.txt: Removed.
  • platform/gtk/editing/selection/select-all-004-expected.png:
  • platform/gtk/editing/selection/select-all-004-expected.txt: Added.
8:08 AM Changeset in webkit [231304] by youenn@apple.com
  • 3 edits
    2 adds in trunk

A MediaStream being played should allow removing some of its tracks
https://bugs.webkit.org/show_bug.cgi?id=185233

Reviewed by Eric Carlson.

Source/WebCore:

Update the tracks out of the for loop.
Test: fast/mediastream/change-tracks-media-stream-being-played.html

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::updateTracksOfType):

LayoutTests:

  • fast/mediastream/change-tracks-media-stream-being-played-expected.txt: Added.
  • fast/mediastream/change-tracks-media-stream-being-played.html: Added.
7:22 AM Changeset in webkit [231303] by jmarcell@apple.com
  • 2 edits in tags/Safari-606.1.16/Source/WebKit

Cherry-pick r231295. rdar://problem/39928458

AX: Missing kAXSWebAccessibilityEventsEnabledNotification causes a crash
https://bugs.webkit.org/show_bug.cgi?id=185237

Reviewed by Dan Bernstein.

When libAccessibility.dylib is missing, the compiler would optimize out the global
notification and lead to a crash. Fixed it by using the isNullFunction check instead,
since we are sure the global notification would be there when the corresponding function
is available.

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

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

6:46 AM Changeset in webkit [231302] by Brent Fulgham
  • 3 edits in trunk/Source/WebKit

Re-eneable Network Extension support in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=185236
<rdar://problem/39883004>

Reviewed by Eric Carlson.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • WebProcess/com.apple.WebProcess.sb.in:
4:58 AM Changeset in webkit [231301] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Disable usage of fused multiply-add instructions for JSC with compiler flag
https://bugs.webkit.org/show_bug.cgi?id=184909

Patch by Dominik Infuehr <dinfuehr@igalia.com> on 2018-05-03
Reviewed by Yusuke Suzuki.

Adds -ffp-contract as compiler flag for building JSC. This ensures that functions
like parseInt() do not return slightly different results depending on whether the
compiler was able to use fused multiply-add instructions or not.

  • CMakeLists.txt:
3:17 AM Changeset in webkit [231300] by magomez@igalia.com
  • 3 edits in trunk/Source/WebCore

WebCore::TextureMapperLayer object used after freed
https://bugs.webkit.org/show_bug.cgi?id=184729

Reviewed by Michael Catanzaro.

Replace the raw pointers with WeakPtr for effectTarget, maskLayer and replicaLayer
inside TextureMapperLayer.

  • platform/graphics/texmap/TextureMapperLayer.cpp:

(WebCore::TextureMapperLayer::~TextureMapperLayer):
(WebCore::TextureMapperLayer::setMaskLayer):
(WebCore::TextureMapperLayer::setReplicaLayer):

  • platform/graphics/texmap/TextureMapperLayer.h:
1:50 AM Changeset in webkit [231299] by timothy_horton@apple.com
  • 4 edits in trunk/Source/WebKit

REGRESSION (r231014): Entitlements are not applied to XPC services on macOS
https://bugs.webkit.org/show_bug.cgi?id=185241

Reviewed by Dan Bernstein.

  • Configurations/BaseXPCService.xcconfig:
  • Configurations/WebContentService.Development.xcconfig:
  • Configurations/WebContentService.xcconfig:
1:45 AM Changeset in webkit [231298] by Carlos Garcia Campos
  • 4 edits in trunk

REGRESSION(r222772): [GTK][WPE] WebProcess from WebKitGtk+ 2.19.9x SIGSEVs in WebKit::WebProcess::ensureNetworkProcessConnection() at Source/WebKit/WebProcess/WebProcess.cpp:1127
https://bugs.webkit.org/show_bug.cgi?id=183348

Reviewed by Michael Catanzaro.

Source/WebKit:

When connection doesn't exit in case of sync message failure, always exit in case of failing to send
GetNetworkProcessConnection or GetStorageProcessConnection messages. This can happen when the WebView is created
and destroyed quickly.

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::ensureNetworkProcessConnection):
(WebKit::WebProcess::ensureWebToStorageProcessConnection):

Tools:

Add a test case to reproduce the crash.

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:

(testWebViewCloseQuickly):
(beforeAll):

12:23 AM Changeset in webkit [231297] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[Curl] Add OpenSSL/LibreSSL multi-threading support
https://bugs.webkit.org/show_bug.cgi?id=185138

The older OpenSSL manual says the locking_function and threadid_function should
be set when use it in multi-threading environment. This applies to LibreSSL also.
https://www.openssl.org/docs/man1.0.2/crypto/threads.html

For unix and other similar os, the default threadId_function implementation is
good enough. We'll set custom callback only for Windows OS.

Note it's not required for OpenSSL 1.1.0 and after.
https://www.openssl.org/blog/blog/2017/02/21/threads/

Patch by Basuke Suzuki <Basuke Suzuki> on 2018-05-03
Reviewed by Per Arne Vollan.

  • platform/network/curl/CurlSSLHandle.cpp:

(WebCore::CurlSSLHandle::CurlSSLHandle):
(WebCore::CurlSSLHandle::ThreadSupport::ThreadSupport):
(WebCore::CurlSSLHandle::ThreadSupport::lockingCallback):
(WebCore::CurlSSLHandle::ThreadSupport::threadIdCallback):

  • platform/network/curl/CurlSSLHandle.h:

(WebCore::CurlSSLHandle::ThreadSupport::setup):
(WebCore::CurlSSLHandle::ThreadSupport::singleton):
(WebCore::CurlSSLHandle::ThreadSupport::lock):
(WebCore::CurlSSLHandle::ThreadSupport::unlock):

12:06 AM Changeset in webkit [231296] by Dewei Zhu
  • 5 edits in trunk/Websites/perf.webkit.org

Create analysis task should sync analysis task status after creation.
https://bugs.webkit.org/show_bug.cgi?id=185222

Reviewed by Ryosuke Niwa.

  • public/v3/models/analysis-task.js:

(AnalysisTask.async.create): Fetch newly-created analysis task right about its creation.
(AnalysisTask):

  • tools/js/measurement-set-analyzer.js:

(MeasurementSetAnalyzer.prototype.async._analyzeMeasurementSet): Adjust as 'AnalysisTask.create' now
returns an anlysis task instance.
(MeasurementSetAnalyzer):

  • unit-tests/analysis-task-tests.js: Added a unit test for this change.

(async):

  • unit-tests/measurement-set-analyzer-tests.js: Update unit tests accordingly.

Fix a typo in one previous unit test.
(async):

May 2, 2018:

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

AX: Missing kAXSWebAccessibilityEventsEnabledNotification causes a crash
https://bugs.webkit.org/show_bug.cgi?id=185237

Reviewed by Dan Bernstein.

When libAccessibility.dylib is missing, the compiler would optimize out the global
notification and lead to a crash. Fixed it by using the isNullFunction check instead,
since we are sure the global notification would be there when the corresponding function
is available.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):

8:40 PM Changeset in webkit [231294] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

Remove superfluous check for a null attribute value check in Element::removeAttributeInternal
https://bugs.webkit.org/show_bug.cgi?id=185227

Reviewed by Chris Dumez.

Removed the check. The attribute value string can never be null.

  • dom/Element.cpp:

(WebCore::Element::removeAttributeInternal):

8:19 PM Changeset in webkit [231293] by Alan Bujtas
  • 12 edits in trunk/Source/WebCore

[LFC] Implement LayoutContext::createDisplayBox
https://bugs.webkit.org/show_bug.cgi?id=185158

Reviewed by Antti Koivisto.

Now compute*() functions take both the const layout and the corresponding non-const display boxes.
Display boxes are owned by the LayoutContext and they don't form a tree structure (only implicitly through the layout tree).
(This might need to change in the future if we decide to arrange them in some sort of painting order)

  • layout/FloatingContext.cpp:

(WebCore::Layout::FloatingContext::computePosition):

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

(WebCore::Layout::FormattingContext::computeStaticPosition const):
(WebCore::Layout::FormattingContext::computeInFlowPositionedPosition const):
(WebCore::Layout::FormattingContext::computeOutOfFlowPosition const):
(WebCore::Layout::FormattingContext::computeWidth const):
(WebCore::Layout::FormattingContext::computeHeight const):
(WebCore::Layout::FormattingContext::computeOutOfFlowWidth const):
(WebCore::Layout::FormattingContext::computeFloatingWidth const):
(WebCore::Layout::FormattingContext::computeOutOfFlowHeight const):
(WebCore::Layout::FormattingContext::computeFloatingHeight const):

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

(WebCore::Layout::LayoutContext::createDisplayBox):

  • layout/LayoutContext.h:

(WebCore::Layout::LayoutContext::displayBoxForLayoutBox const):

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::layout const):
(WebCore::Layout::BlockFormattingContext::computeStaticPosition const):
(WebCore::Layout::BlockFormattingContext::computeInFlowWidth const):
(WebCore::Layout::BlockFormattingContext::computeInFlowHeight const):

  • layout/blockformatting/BlockFormattingContext.h:
  • layout/displaytree/DisplayBox.h:

(WebCore::Display::Box::parent const): Deleted.
(WebCore::Display::Box::nextSibling const): Deleted.
(WebCore::Display::Box::previousSibling const): Deleted.
(WebCore::Display::Box::firstChild const): Deleted.
(WebCore::Display::Box::lastChild const): Deleted.
(WebCore::Display::Box::setParent): Deleted.
(WebCore::Display::Box::setNextSibling): Deleted.
(WebCore::Display::Box::setPreviousSibling): Deleted.
(WebCore::Display::Box::setFirstChild): Deleted.
(WebCore::Display::Box::setLastChild): Deleted.
(): Deleted.

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computeInFlowWidth const):
(WebCore::Layout::InlineFormattingContext::computeInFlowHeight const):

  • layout/inlineformatting/InlineFormattingContext.h:
6:17 PM Changeset in webkit [231292] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Hiding then showing an <object> of type image makes the underlaying image disappear
https://bugs.webkit.org/show_bug.cgi?id=185216
<rdar://problem/39055630>

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2018-05-02
Reviewed by Youenn Fablet.

Source/WebCore:

Ensure the HTMLPlugInImageElement updates the RenderImageResource of its
RenderImage with the CachedImage of its ImageLoader when the RenderImage
is recreated.

Test: fast/images/object-image-hide-show.html

  • html/HTMLPlugInImageElement.cpp:

(WebCore::HTMLPlugInImageElement::didAttachRenderers):
This is very similar to what we do in HTMLImageElement::didAttachRenderers().

LayoutTests:

  • fast/images/object-image-hide-show-expected.html: Added.
  • fast/images/object-image-hide-show.html: Added.
6:08 PM Changeset in webkit [231291] by Brent Fulgham
  • 6 edits
    2 adds in trunk

Use RetainPtr for form input type
https://bugs.webkit.org/show_bug.cgi?id=185210
<rdar://problem/39734040>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Refactor our HTMLInputElement class to store its InputType member as a RefPtr.

Test: fast/forms/access-key-mutation-2.html.

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::HTMLInputElement):
(WebCore::HTMLInputElement::didAddUserAgentShadowRoot):
(WebCore::HTMLInputElement::accessKeyAction):
(WebCore::HTMLInputElement::parseAttribute):
(WebCore::HTMLInputElement::appendFormData):

  • html/HTMLInputElement.h:
  • html/InputType.cpp:

(WebCore::createInputType):
(WebCore::InputType::create):
(WebCore::InputType::createText):

  • html/InputType.h:

LayoutTests:

  • fast/forms/access-key-mutation-2-expected.txt: Added.
  • fast/forms/access-key-mutation-2.html: Added.
6:03 PM Changeset in webkit [231290] by Yusuke Suzuki
  • 5 edits in trunk/Source/JavaScriptCore

Unreviewed, fix build failure in ARM, ARMv7 and MIPS
https://bugs.webkit.org/show_bug.cgi?id=185192

compareDouble relies on MacroAssembler::invert function.

  • assembler/MacroAssembler.h:

(JSC::MacroAssembler::compareDouble):

  • assembler/MacroAssemblerARM.h:

(JSC::MacroAssemblerARM::compareDouble): Deleted.

  • assembler/MacroAssemblerARMv7.h:

(JSC::MacroAssemblerARMv7::compareDouble): Deleted.

  • assembler/MacroAssemblerMIPS.h:

(JSC::MacroAssemblerMIPS::compareDouble): Deleted.

5:53 PM Changeset in webkit [231289] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Add MacroAssembler::and16 and store16
https://bugs.webkit.org/show_bug.cgi?id=185188

Reviewed by Mark Lam.

r231129 requires and16(ImplicitAddress, RegisterID) and store16(RegisterID, ImplicitAddress) implementations.
This patch adds these methods for ARM.

  • assembler/MacroAssemblerARM.h:

(JSC::MacroAssemblerARM::and16):
(JSC::MacroAssemblerARM::store16):

5:50 PM Changeset in webkit [231288] by Yusuke Suzuki
  • 15 edits in trunk/Source/WebCore

Use pointer instead of std::optional<std::reference_wrapper<>>
https://bugs.webkit.org/show_bug.cgi?id=185186

Reviewed by Alex Christensen.

std::optional<T&> is not accepted in C++17 spec. So we replaced it
with std::optional<std::reference_wrapper<T>>.

In this patch, we replace it with T*, which is well-aligned to
WebKit's convention.

  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::iceServersFromConfiguration):
(WebCore::RTCPeerConnection::initializeConfiguration):
(WebCore::RTCPeerConnection::setConfiguration):

  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::parseSystemColor):

  • css/parser/CSSParser.h:
  • dom/DatasetDOMStringMap.cpp:

(WebCore::DatasetDOMStringMap::item const):
(WebCore::DatasetDOMStringMap::namedItem const):

  • dom/DatasetDOMStringMap.h:
  • dom/Element.cpp:

(WebCore::Element::insertAdjacentHTML):

  • dom/Element.h:
  • html/canvas/CanvasStyle.cpp:

(WebCore::parseColor):

  • inspector/DOMEditor.cpp:
  • platform/network/curl/CurlFormDataStream.cpp:

(WebCore::CurlFormDataStream::getPostData):

  • platform/network/curl/CurlFormDataStream.h:
  • platform/network/curl/CurlRequest.cpp:

(WebCore::CurlRequest::setupPOST):

  • testing/MockCDMFactory.cpp:

(WebCore::MockCDMFactory::keysForSessionWithID const):
(WebCore::MockCDMInstance::updateLicense):

  • testing/MockCDMFactory.h:
5:49 PM Changeset in webkit [231287] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Skip transitions/opacity-transition-zindex.html.
https://bugs.webkit.org/show_bug.cgi?id=184947

Unreviewed test gardening.

  • TestExpectations: Remove old expectation that is no longer applicable.
  • platform/mac-wk2/TestExpectations:
5:48 PM Changeset in webkit [231286] by Yusuke Suzuki
  • 4 edits in trunk/Source/JavaScriptCore

[DFG] Unify compare related code in 32bit and 64bit
https://bugs.webkit.org/show_bug.cgi?id=185189

Reviewed by Mark Lam.

This patch unifies some part of compare related code in 32bit and 64bit
to reduce the size of 32bit specific DFG code.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileInt32Compare):
(JSC::DFG::SpeculativeJIT::compileDoubleCompare):
(JSC::DFG::SpeculativeJIT::compileObjectEquality):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compileObjectEquality): Deleted.
(JSC::DFG::SpeculativeJIT::compileInt32Compare): Deleted.
(JSC::DFG::SpeculativeJIT::compileDoubleCompare): Deleted.

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compileObjectEquality): Deleted.
(JSC::DFG::SpeculativeJIT::compileInt32Compare): Deleted.
(JSC::DFG::SpeculativeJIT::compileDoubleCompare): Deleted.

5:46 PM Changeset in webkit [231285] by Yusuke Suzuki
  • 9 edits in trunk/Source/JavaScriptCore

[JSC] Add compareDouble and compareFloat for ARM64, X86, and X86_64
https://bugs.webkit.org/show_bug.cgi?id=185192

Reviewed by Mark Lam.

Now Object.is starts using compareDouble. So we would like to have
efficient implementation for compareDouble and compareFloat for
major architectures, ARM64, X86, and X86_64.

This patch adds compareDouble and compareFloat implementations for
these architectures. And generic implementation is moved to each
architecture's MacroAssembler implementation.

We also add tests for them in testmasm. To implement this test
easily, we also add loadFloat(TrustedImmPtr, FPRegisterID) for the
major architectures.

  • assembler/MacroAssembler.h:

(JSC::MacroAssembler::compareDouble): Deleted.
(JSC::MacroAssembler::compareFloat): Deleted.

  • assembler/MacroAssemblerARM.h:

(JSC::MacroAssemblerARM::compareDouble):

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::compareDouble):
(JSC::MacroAssemblerARM64::compareFloat):
(JSC::MacroAssemblerARM64::loadFloat):
(JSC::MacroAssemblerARM64::floatingPointCompare):

  • assembler/MacroAssemblerARMv7.h:

(JSC::MacroAssemblerARMv7::compareDouble):

  • assembler/MacroAssemblerMIPS.h:

(JSC::MacroAssemblerMIPS::compareDouble):

  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::loadFloat):
(JSC::MacroAssemblerX86Common::compareDouble):
(JSC::MacroAssemblerX86Common::compareFloat):
(JSC::MacroAssemblerX86Common::floatingPointCompare):

  • assembler/X86Assembler.h:

(JSC::X86Assembler::movss_mr):
(JSC::X86Assembler::movss_rm):

  • assembler/testmasm.cpp:

(JSC::floatOperands):
(JSC::testCompareFloat):
(JSC::run):

5:42 PM Changeset in webkit [231284] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix 32bit DFG code
https://bugs.webkit.org/show_bug.cgi?id=185065

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileSameValue):

5:37 PM Changeset in webkit [231283] by fpizlo@apple.com
  • 3 edits
    1 add in trunk

JSC should know how to cache custom getter accesses on the prototype chain
https://bugs.webkit.org/show_bug.cgi?id=185213

Reviewed by Keith Miller.

JSTests:

  • microbenchmarks/get-custom-getter.js: Added.

(test):

Source/JavaScriptCore:

This was a simple fix after the work I did for bug 185174. >4x speed-up on the new get-custom-getter.js test.

  • jit/Repatch.cpp:

(JSC::tryCacheGetByID):

5:31 PM Changeset in webkit [231282] by Keith Rollin
  • 32 edits
    1 copy
    2 adds in trunk/Source

Add facility for tracking times and results of page and resource loading
https://bugs.webkit.org/show_bug.cgi?id=184838
<rdar://problem/36548974>

Reviewed by Brent Fulgham.

Source/WebCore:

Update FrameProgressTracker to send the necessary page load start/stop
signals so that we can track the entire page load at a network level.
Add an empty override of the pure virtual
LoaderStrategy::pageLoadCompleted method.

No new tests. There is no testable effect from these changes. On
Cocoa, measurable changes take place in another (non-WebKit) process.
On non-Cocoa systems, this facility is currently disabled.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::FrameProgressTracker::progressCompleted):

  • loader/LoaderStrategy.h:

Source/WebKit:

Add NetworkActivityTracker. The idea behind this facility is to create
and destroy them around networking activity that we want to track for
the purpose of measuring overall network health. They can be created
around the loading of pages or individual resources, and can be
arranged in a parent/child hierarchy to indicate what pages the
resources are part of. The NetworkActivity tracker tracks load times
and results. On Cocoa, it can be integrated with CFNetwork in order to
associate WebKit activity with low-level networking activity.

  • CMakeLists.txt:
  • Configurations/WebKit.xcconfig:
  • NetworkProcess/NetworkActivityTracker.cpp: Copied from Source/WebKit/NetworkProcess/NetworkLoadParameters.h.

(WebKit::NetworkActivityTracker::NetworkActivityTracker):
(WebKit::NetworkActivityTracker::~NetworkActivityTracker):
(WebKit::NetworkActivityTracker::setParent):
(WebKit::NetworkActivityTracker::start):
(WebKit::NetworkActivityTracker::complete):

  • NetworkProcess/NetworkActivityTracker.h: Added.

(WebKit::NetworkActivityTracker::getPlatformObject):

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::didClose):
(WebKit::NetworkConnectionToWebProcess::pageLoadCompleted):
(WebKit::networkActivityTrackingEnabled):
(WebKit::NetworkConnectionToWebProcess::startTrackingResourceLoad):
(WebKit::NetworkConnectionToWebProcess::stopTrackingResourceLoad):
(WebKit::NetworkConnectionToWebProcess::stopAllNetworkActivityTracking):
(WebKit::NetworkConnectionToWebProcess::stopAllNetworkActivityTrackingForPage):
(WebKit::NetworkConnectionToWebProcess::findRootNetworkActivity):
(WebKit::NetworkConnectionToWebProcess::findNetworkActivityTracker):

  • NetworkProcess/NetworkConnectionToWebProcess.h:

(WebKit::NetworkConnectionToWebProcess::ResourceNetworkActivityTracker::ResourceNetworkActivityTracker):

  • NetworkProcess/NetworkConnectionToWebProcess.messages.in:
  • NetworkProcess/NetworkDataTask.cpp:

(WebKit::NetworkDataTask::create):

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

(WebKit::NetworkProcess::initializeNetworkProcess):

  • NetworkProcess/NetworkProcess.h:

(WebKit::NetworkProcess::trackNetworkActivity const):

  • NetworkProcess/NetworkProcessCreationParameters.cpp:

(WebKit::NetworkProcessCreationParameters::encode const):
(WebKit::NetworkProcessCreationParameters::decode):

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

(WebKit::NetworkResourceLoader::start):
(WebKit::NetworkResourceLoader::cleanup):
(WebKit::NetworkResourceLoader::abort):
(WebKit::NetworkResourceLoader::didFinishLoading):
(WebKit::NetworkResourceLoader::didFailLoading):
(WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
(WebKit::NetworkResourceLoader::continueProcessingCachedEntryAfterDidReceiveResponse):

  • NetworkProcess/NetworkResourceLoader.h:
  • NetworkProcess/cocoa/NetworkActivityTrackerCocoa.mm: Added.

(WebKit::NetworkActivityTracker::NetworkActivityTracker):
(WebKit::NetworkActivityTracker::~NetworkActivityTracker):
(WebKit::NetworkActivityTracker::setParent):
(WebKit::NetworkActivityTracker::start):
(WebKit::NetworkActivityTracker::complete):

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):

  • UIProcess/API/APIProcessPoolConfiguration.cpp:

(API::ProcessPoolConfiguration::copy):

  • UIProcess/API/APIProcessPoolConfiguration.h:
  • UIProcess/API/C/WKContextConfigurationRef.cpp:

(WKContextConfigurationTrackNetworkActivity):
(WKContextConfigurationSetTrackNetworkActivity):

  • UIProcess/API/C/WKContextConfigurationRef.h:
  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:

(-[_WKProcessPoolConfiguration trackNetworkActivity]):
(-[_WKProcessPoolConfiguration setTrackNetworkActivity:]):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureNetworkProcess):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::pageLoadCompleted):

  • WebProcess/Network/WebLoaderStrategy.h:

Source/WebKitLegacy:

Add an empty override of the pure virtual
LoaderStrategy::pageLoadCompleted method.

  • WebCoreSupport/WebResourceLoadScheduler.cpp:

(WebResourceLoadScheduler::pageLoadCompleted):

  • WebCoreSupport/WebResourceLoadScheduler.h:
5:28 PM Changeset in webkit [231281] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

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

cpp_lib_optional should be used after including <optional>
since it is defined in <optional> (Requested by yusukesuzuki
on #webkit).

Reverted changeset:

"Follow-up build fix for r231223"
https://bugs.webkit.org/show_bug.cgi?id=185159
https://trac.webkit.org/changeset/231251

4:10 PM Changeset in webkit [231280] by jmarcell@apple.com
  • 7 edits in trunk/Source

Versioning.

4:08 PM Changeset in webkit [231279] by jmarcell@apple.com
  • 1 copy in tags/Safari-605.2.8.0.1

Tag Safari-605.2.8.0.1.

4:08 PM Changeset in webkit [231278] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore/PAL

[iOS] Provide audio route information when invoking AirPlay picker
https://bugs.webkit.org/show_bug.cgi?id=185199
<rdar://problem/39853103>

Unreviewed, another attempted build fix.

  • pal/spi/mac/AVFoundationSPI.h:
4:00 PM Changeset in webkit [231277] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebKit

Open audio/video sandbox services for minimal simulator
https://bugs.webkit.org/show_bug.cgi?id=185217
<rdar://problem/39918909>

Reviewed by Per Arne Vollan.

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/com.apple.WebProcess.sb.in:
3:55 PM Changeset in webkit [231276] by commit-queue@webkit.org
  • 5 edits in trunk

Can't copy and paste URLs that have no title into Mail (macOS)
https://bugs.webkit.org/show_bug.cgi?id=185205
<rdar://problem/36352406>

Patch by Aditya Keerthi <Aditya Keerthi> on 2018-05-02
Reviewed by Tim Horton.

Source/WebCore:

The pasteboardURL generated has an empty title for URLs without titles. Currently, the pasteboardURL.title is being saved to the pasteboard.

To fix the error, we check whether the title is empty and instead save the lastPathComponent to the pasteboard. This matches current behavior as the fallback title.

Augmented WebKitLegacy.ContextMenuCanCopyURL test

  • platform/mac/PasteboardMac.mm:

(WebCore::writeURLForTypes):

Tools:

Added test to verify behavior when copying and pasting a URL without a title.

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

(TestWebKitAPI::TEST):

3:55 PM Changeset in webkit [231275] by jmarcell@apple.com
  • 31 edits in branches/safari-605.2.8.0-branch/Source

Cherry-pick r231242. rdar://problem/39860939

[iOS] Provide audio route information when invoking AirPlay picker
https://bugs.webkit.org/show_bug.cgi?id=185199
<rdar://problem/39853103>

Reviewed by Jer Noble.

Source/WebCore:

No new tests, this requires a specific hardware setup.

  • dom/Document.cpp: (WebCore::Document::showPlaybackTargetPicker): Pass route sharing policy and routing context UID.
  • dom/Document.h:
  • html/MediaElementSession.cpp: (WebCore::MediaElementSession::showPlaybackTargetPicker): Ditto.
  • loader/EmptyClients.h:
  • page/ChromeClient.h:
  • page/Page.cpp: (WebCore::Page::showPlaybackTargetPicker): Ditto.
  • page/Page.h:
  • platform/audio/AudioSession.cpp: (WebCore::AudioSession::routeSharingPolicy const): Empty implementation for non-iOS ports. (WebCore::routingContextUID const): Ditto.
  • platform/audio/AudioSession.h:
  • platform/audio/ios/AudioSessionIOS.mm: (WebCore::AudioSession::routeSharingPolicy const): Return the route sharing policy. (WebCore::AudioSession::routingContextUID const): Return the route context UID.

Source/WebCore/PAL:

  • pal/spi/mac/AVFoundationSPI.h: Add additional AVAudioSession SPI.

Source/WebKit:

  • Scripts/webkit/messages.py:
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::showPlaybackTargetPicker): Pass route sharing policy and routing context UID.
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _showPlaybackTargetPicker:fromRect:routeSharingPolicy:routingContextUID:]): Take same. (-[WKContentView _showPlaybackTargetPicker:fromRect:]): Deleted.
  • UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::showPlaybackTargetPicker): Pass route sharing policy and routing context UID.
  • UIProcess/ios/forms/WKAirPlayRoutePicker.h:
  • UIProcess/ios/forms/WKAirPlayRoutePicker.mm: (-[WKAirPlayRoutePicker showFromView:routeSharingPolicy:routingContextUID:]): Take same. (-[WKAirPlayRoutePicker showFromView:]): Deleted.
  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm: (WebKit::WebChromeClient::showPlaybackTargetPicker):

Source/WebKitLegacy/ios:

  • WebCoreSupport/WebChromeClientIOS.h:
  • WebCoreSupport/WebChromeClientIOS.mm: (WebChromeClientIOS::showPlaybackTargetPicker): Pass route sharing policy and routing context UID.

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

3:50 PM Changeset in webkit [231274] by youenn@apple.com
  • 2 edits in trunk/LayoutTests/imported/w3c

Rebase imported/w3c/web-platform-tests/service-workers/service-worker/fetch-request-redirect.https.html expectation
https://bugs.webkit.org/show_bug.cgi?id=185221

Unreviewed.

  • web-platform-tests/service-workers/service-worker/fetch-request-redirect.https-expected.txt:
3:45 PM Changeset in webkit [231273] by jmarcell@apple.com
  • 7 edits in branches/safari-605.2.8.1-branch/Source

Versioning.

3:43 PM Changeset in webkit [231272] by jmarcell@apple.com
  • 7 edits in branches/safari-605.2.8.0-branch/Source

Versioning.

3:22 PM Changeset in webkit [231271] by dbates@webkit.org
  • 2 edits in trunk/Source/WebKit

Cleanup NetworkResourceLoader::didReceiveResponse()
https://bugs.webkit.org/show_bug.cgi?id=185209

Reviewed by Chris Dumez.

Use early returns to make the control flow easier to read and reason about. Disregarding a
From-Origin violation, NetworkResourceLoader::didReceiveResponse() only returns NetworkLoadClient::ShouldContinueDidReceiveResponse::No
when the load is for a main resource and hence it must wait for the embedding client to allow
the load before continuing with it. With regards to a From-Origin violation, the network
process schedules to fail the load in a subsequent turn of the event loop before returning
NetworkLoadClient::ShouldContinueDidReceiveResponse::No. It return NetworkLoadClient::ShouldContinueDidReceiveResponse::No
solely to tell the NetworkLoadClient to defer assuming the load is allowed (because we will
fail it on the next turn of the event loop).

Additionally, remove all logging about the return value as we no longer have a need for
such logging.

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::didReceiveResponse):

3:18 PM Changeset in webkit [231270] by jmarcell@apple.com
  • 1 copy in branches/safari-605.2.8.1-branch

New branch.

3:17 PM Changeset in webkit [231269] by jmarcell@apple.com
  • 1 copy in branches/safari-605.2.8.0-branch

New tag.

3:11 PM Changeset in webkit [231268] by Ross Kirsling
  • 2 edits in trunk/LayoutTests

[WinCairo] Unreviewed gardening. Add missing Skip for http/wpt.

  • platform/wincairo/TestExpectations:
2:42 PM Changeset in webkit [231267] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

REGRESSION(r225868): Release assert when removing an SVGUseElement from Document::m_svgUseElements
https://bugs.webkit.org/show_bug.cgi?id=182188
<rdar://problem/36689240>

Reviewed by Antti Koivisto.

Fixed the crash by removing up the release assert.

The crash is likely caused by re-entrancy to Document::resolveStyle during SVGUseElement::updateShadowTree.
Because Document::resolveStyle invokes updateShadowTree on SVG use elements in Document::m_svgUseElements
without clearing the map, the nested call to resolveStyle ends up calling updateShadowTree() for all elements
in m_svgUseElements and removing them all from the map. When the stack frame eventually comes back to the outer
invocation of Document::resolveStyle, updateShadowTree gets invoked for the second time on SVG use elements
whose shadow tree had already been updated within the inner invocation to updateShadowTree, and release-asserts.

There is an alternative fix: avoid calling updateShadowTree on a svg element when shadowTreeNeedsUpdate returns
true on the element in resolveStyle. However, removing the release assert is a sure way to fix the crash so
this patch opts for that fix instead especially since we don't have any reproducible test case for this crash.

This release assertion was added in r225868 as a cautious measure to catch any use-after-frees of SVGUseElement's
since m_svgUseElements stored raw pointes to SVG use elements but this crash is not an indicative of any UAF,
and there is no evidence that r225868 has led to new UAFs even after five months.

No new tests. I couldn't find a way to trigger a nested style update inside SVGUseElement::updateShadowTree.

  • dom/Document.cpp:

(WebCore::Document::removeSVGUseElement):

2:38 PM Changeset in webkit [231266] by commit-queue@webkit.org
  • 7 edits in trunk

getCharNumAtPosition should take DOMPointInit as argument
https://bugs.webkit.org/show_bug.cgi?id=184695

Patch by Dirk Schulze <dschulze@chromium.org> on 2018-05-02
Reviewed by Antti Koivisto.

Source/WebCore:

Extend existing tests for getCharNumAtPosition.

  • svg/SVGTextContentElement.cpp:

(WebCore::SVGTextContentElement::getCharNumAtPosition):

  • svg/SVGTextContentElement.h:
  • svg/SVGTextContentElement.idl: Use DOMPointInit argument.

LayoutTests:

  • svg/text/lengthAdjust-text-metrics.html: Run tests with dictionary.
2:38 PM Changeset in webkit [231265] by youenn@apple.com
  • 6 edits in trunk/Source/ThirdParty/libwebrtc

Disable VCP for iOS until it is fully working
https://bugs.webkit.org/show_bug.cgi?id=185201
<rdar://problem/39773857>

Reviewed by Eric Carlson.

Disable VCP for iOS unconditionally.
Add check to getkVTVideoEncoderSpecification_Usage to not set this property if not defined as it is optional soft linked.
Replace use of VTSessionSetProperty by CompressionSessionSetProperty as the latter is a macro
that works for both VT and VCP.

  • Source/webrtc/sdk/WebKit/EncoderUtilities.h:
  • Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.h:
  • Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm:

(-[RTCVideoEncoderH264 resetCompressionSessionWithPixelFormat:]):
(-[RTCVideoEncoderH264 configureCompressionSession]):
(-[RTCVideoEncoderH264 setEncoderBitrateBps:]):
(-[RTCVideoEncoderH264 frameWasEncoded:flags:sampleBuffer:codecSpecificInfo:width:height:renderTimeMs:timestamp:rotation:]):

  • Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/helpers.cc:
  • Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/helpers.h:
2:17 PM Changeset in webkit [231264] by commit-queue@webkit.org
  • 13 edits in trunk/Source

Add WKWebsiteDataStorePrivate._proxyConfiguration SPI
https://bugs.webkit.org/show_bug.cgi?id=185179

Patch by Alex Christensen <achristensen@webkit.org> on 2018-05-02
Reviewed by Andy Estes.

Source/WebCore/PAL:

  • pal/spi/cf/CFNetworkSPI.h:

Source/WebKit:

  • NetworkProcess/NetworkSessionCreationParameters.h:

(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::applySniffingPoliciesAndBindRequestToInferfaceIfNeeded):

  • NetworkProcess/cocoa/NetworkSessionCocoa.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):

  • Shared/WebsiteDataStoreParameters.cpp:

(WebKit::WebsiteDataStoreParameters::privateSessionParameters):

  • Shared/cf/ArgumentCodersCF.cpp:

(IPC::encode):
(IPC::decode):

  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore _setProxyConfiguration:]):
(-[WKWebsiteDataStore _proxyConfiguration]):

  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::parameters):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

(WebKit::WebsiteDataStore::setProxyConfiguration):
(WebKit::WebsiteDataStore::proxyConfiguration):

2:13 PM Changeset in webkit [231263] by youenn@apple.com
  • 12 edits in trunk

Use NetworkLoadChecker for navigation loads
https://bugs.webkit.org/show_bug.cgi?id=184892
<rdar://problem/39652686>

Reviewed by Chris Dumez.

Source/WebCore:

Sanitize headers according response tainting.
If tainting is basic, it means same origin load in which case we only filter Cookie related headers.
If tainting is Opaque, we filter all uncommon headers.
If tainting is CORS, we filter all uncommon headers except the one explicitely allowed by CORS headers.
Covered by updated test.

  • platform/network/ResourceResponseBase.cpp:

(WebCore::ResourceResponseBase::sanitizeHTTPHeaderFieldsAccordingToTainting):
(WebCore::ResourceResponseBase::sanitizeHTTPHeaderFields):

  • platform/network/ResourceResponseBase.h:

Source/WebKit:

Compute whether a response is same origin in no-cors case.
This allows providing more precise filtering.
In case of navigate loads, set the tainting to basic which will make filtering to the minimum.

Pass the sourceOrigin for navigation loads as well.
Enable to restrict HTTP response access for navigation load.

Content Blockers are disabled for now in NetworkLoadChecker for navigation loads.
They should be reenabled as a follow-up.

Add a specific case to allow any redirection to about:// URLs.
While this does not conform with the spec, this keeps the existing WebKit behavior.

  • NetworkProcess/NetworkLoadChecker.cpp:

(WebKit::NetworkLoadChecker::NetworkLoadChecker):
(WebKit::NetworkLoadChecker::validateResponse):
(WebKit::NetworkLoadChecker::continueCheckingRequest):
(WebKit::NetworkLoadChecker::doesNotNeedCORSCheck const):

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::sanitizeResponseIfPossible):

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
(WebKit::WebLoaderStrategy::isDoingLoadingSecurityChecks const):
We only do security checks if this runtime flag is on.

  • WebProcess/Network/WebLoaderStrategy.h:

LayoutTests:

Updated header-filtering.https.html to expect full headers except cookie-related for same origin loads.
Updated expected.txt files accordingly.

  • http/wpt/service-workers/header-filtering.https-expected.txt:
  • http/wpt/service-workers/header-filtering.https.html:
  • platform/mac/http/tests/webarchive/test-preload-resources-expected.txt:
2:11 PM Changeset in webkit [231262] by jmarcell@apple.com
  • 2 edits in tags/Safari-606.1.16/Source/WebKit

Cherry-pick r231257. rdar://problem/39916202

Make EncryptedMediaAPIEnabled an experimental feature
https://bugs.webkit.org/show_bug.cgi?id=185212

Reviewed by Eric Carlson.

  • Shared/WebPreferences.yaml:

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

2:01 PM Changeset in webkit [231261] by mitz@apple.com
  • 9 copies
    1 add in releases/Apple/Safari Technology Preview 55

Added a tag for Safari Technology Preview release 55.

1:44 PM Changeset in webkit [231260] by jmarcell@apple.com
  • 31 edits in branches/safari-605-branch/Source

Cherry-pick r231242. rdar://problem/39860939

[iOS] Provide audio route information when invoking AirPlay picker
https://bugs.webkit.org/show_bug.cgi?id=185199
<rdar://problem/39853103>

Reviewed by Jer Noble.

Source/WebCore:

No new tests, this requires a specific hardware setup.

  • dom/Document.cpp: (WebCore::Document::showPlaybackTargetPicker): Pass route sharing policy and routing context UID.
  • dom/Document.h:
  • html/MediaElementSession.cpp: (WebCore::MediaElementSession::showPlaybackTargetPicker): Ditto.
  • loader/EmptyClients.h:
  • page/ChromeClient.h:
  • page/Page.cpp: (WebCore::Page::showPlaybackTargetPicker): Ditto.
  • page/Page.h:
  • platform/audio/AudioSession.cpp: (WebCore::AudioSession::routeSharingPolicy const): Empty implementation for non-iOS ports. (WebCore::routingContextUID const): Ditto.
  • platform/audio/AudioSession.h:
  • platform/audio/ios/AudioSessionIOS.mm: (WebCore::AudioSession::routeSharingPolicy const): Return the route sharing policy. (WebCore::AudioSession::routingContextUID const): Return the route context UID.

Source/WebCore/PAL:

  • pal/spi/mac/AVFoundationSPI.h: Add additional AVAudioSession SPI.

Source/WebKit:

  • Scripts/webkit/messages.py:
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::showPlaybackTargetPicker): Pass route sharing policy and routing context UID.
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _showPlaybackTargetPicker:fromRect:routeSharingPolicy:routingContextUID:]): Take same. (-[WKContentView _showPlaybackTargetPicker:fromRect:]): Deleted.
  • UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::showPlaybackTargetPicker): Pass route sharing policy and routing context UID.
  • UIProcess/ios/forms/WKAirPlayRoutePicker.h:
  • UIProcess/ios/forms/WKAirPlayRoutePicker.mm: (-[WKAirPlayRoutePicker showFromView:routeSharingPolicy:routingContextUID:]): Take same. (-[WKAirPlayRoutePicker showFromView:]): Deleted.
  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm: (WebKit::WebChromeClient::showPlaybackTargetPicker):

Source/WebKitLegacy/ios:

  • WebCoreSupport/WebChromeClientIOS.h:
  • WebCoreSupport/WebChromeClientIOS.mm: (WebChromeClientIOS::showPlaybackTargetPicker): Pass route sharing policy and routing context UID.

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

1:34 PM Changeset in webkit [231259] by mmaxfield@apple.com
  • 13 edits
    3 adds in trunk

Collection fragment identifiers don't use PostScript names
https://bugs.webkit.org/show_bug.cgi?id=184624
Source/WebCore:

<rdar://problem/39432089>

Reviewed by Simon Fraser.

In a previous version of the CSS Fonts spec, there was text saying that items in font collections
should be 1-indexed (so the first item would be MyFonts.ttc#1). However, this is unfortunate because
inserting an item into the middle of a collection would throw off all content that uses the file.
Instead, the spec has since changed to use PostScript names (so the content instead would say
MyFonts.ttc#MyFont-Regular).

Test: fast/text/font-collection.html

  • css/CSSFontFaceSource.cpp:

(WebCore::CSSFontFaceSource::load):

  • loader/cache/CachedFont.cpp:

(WebCore::CachedFont::calculateItemInCollection const):
(WebCore::CachedFont::ensureCustomFontData):
(WebCore::CachedFont::createCustomFontData):
(WebCore::CachedFont::calculateIndex const): Deleted.

  • loader/cache/CachedFont.h:
  • platform/graphics/mac/FontCustomPlatformData.cpp:

(WebCore::createFontCustomPlatformData):

  • platform/graphics/mac/FontCustomPlatformData.h:

LayoutTests:

Reviewed by Simon Fraser.

  • fast/text/font-collection-expected.html:
  • fast/text/font-collection.html:
  • fast/text/resources/collection.ttc: I generated this font collection by hand. The "Ahemerator" font inside it is missing the

"A" glyph.

1:26 PM Changeset in webkit [231258] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore/PAL

[iOS] Provide audio route information when invoking AirPlay picker
https://bugs.webkit.org/show_bug.cgi?id=185199
<rdar://problem/39853103>

Unreviewed build fix.

  • pal/spi/mac/AVFoundationSPI.h:
1:22 PM Changeset in webkit [231257] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebKit

Make EncryptedMediaAPIEnabled an experimental feature
https://bugs.webkit.org/show_bug.cgi?id=185212

Reviewed by Eric Carlson.

  • Shared/WebPreferences.yaml:
1:07 PM Changeset in webkit [231256] by clopez@igalia.com
  • 2 edits in trunk/Tools

[GTK] Generate a JSC bundle on the 64 and 32 bit release bots and upload it to webkitgtk.org (follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=184699

Unreviewed follow-up fix after r231230.

  • Scripts/generate-jsc-bundle:

(generate_wrapper_script): Quote the arguments passed to jsc.

12:53 PM Changeset in webkit [231255] by youenn@apple.com
  • 3 edits in trunk/LayoutTests

Layout Test http/wpt/service-workers/header-filtering.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=184469
<rdar://problem/39428226>

Reviewed by Chris Dumez.

Ensure that the message posted for the loading of the initial iframe is actually received before doing further tests.

  • http/wpt/service-workers/header-filtering.https.html:
  • platform/mac-wk2/TestExpectations:
12:29 PM Changeset in webkit [231254] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

Adjust sandbox profile in simulator mode.
https://bugs.webkit.org/show_bug.cgi?id=185172
<rdar://problem/39876860>

Reviewed by Brent Fulgham.

Fix some sandbox violations.

  • WebProcess/com.apple.WebProcess.sb.in:
12:17 PM Changeset in webkit [231253] by BJ Burg
  • 14 edits in trunk

Web Inspector: opt out of process swap on navigation if a Web Inspector frontend is connected
https://bugs.webkit.org/show_bug.cgi?id=184861
<rdar://problem/39153768>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Notify the client of the current connection count whenever a frontend connects or disconnects.

Covered by new API test.

  • inspector/InspectorClient.h:

(WebCore::InspectorClient::frontendCountChanged):

  • inspector/InspectorController.cpp:

(WebCore::InspectorController::connectFrontend):
(WebCore::InspectorController::disconnectFrontend):
(WebCore::InspectorController::disconnectAllFrontends):

  • inspector/InspectorController.h:

Source/WebKit:

We need to track how many frontends are attached to the web page (both local and remote).
InspectorController propagates this out to WebKit via InspectorClient. This is then
kept in UIProcess as a member of WebPageProxy. When making a decision whether to use a
new process for a navigation, return early with "no" if any frontends are open for the
page being navigated.

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::didChangeInspectorFrontendCount):
(WebKit::WebPageProxy::inspectorFrontendCount const):

  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::processForNavigation):

  • WebProcess/WebCoreSupport/WebInspectorClient.cpp:

(WebKit::WebInspectorClient::frontendCountChanged):

  • WebProcess/WebCoreSupport/WebInspectorClient.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::inspectorFrontendCountChanged):

  • WebProcess/WebPage/WebPage.h:

Tools:

Add a new test that checks whether a new process is used for navigation when
an Inspector is shown. Also check that the behavior reverts to normal after
the Inspector has been closed.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
12:08 PM Changeset in webkit [231252] by commit-queue@webkit.org
  • 4 edits in trunk

test262/Runner.pm: save summary to file
https://bugs.webkit.org/show_bug.cgi?id=185200

Patch by Valerie R Young <valerie@bocoup.com> on 2018-05-02
Reviewed by Michael Saboff.

.:

  • .gitignore:

Tools:

  • Scripts/test262/Runner.pm:

(processCLI):
(main):
(summarizeResults):

11:54 AM Changeset in webkit [231251] by Jonathan Bedard
  • 2 edits in trunk/Source/WTF

Follow-up build fix for r231223
https://bugs.webkit.org/show_bug.cgi?id=185159
<rdar://problem/39891074>

Unreviewed build fix.

We should be consistent about when we include <optional> vs define our own.

  • wtf/Optional.h:
11:51 AM Changeset in webkit [231250] by fpizlo@apple.com
  • 8 edits in trunk/Source/JavaScriptCore

JSC should be able to cache custom setter calls on the prototype chain
https://bugs.webkit.org/show_bug.cgi?id=185174

Reviewed by Saam Barati.

We broke custom-setter-on-the-prototype-chain caching when we fixed a bug involving the conditionSet.isEmpty()
condition being used to determine if we have an alternateBase. The fix in r222671 incorrectly tried to add
impossible-to-validate conditions to the conditionSet by calling generateConditionsForPrototypePropertyHit() instead
of generateConditionsForPrototypePropertyHitCustom(). The problem is that the former function will always fail for
custom accessors because it won't find the custom property in the structure.

The fix is to add a virtual hasAlternateBase() function and use that instead of conditionSet.isEmpty().

This is a 4x speed-up on assign-custom-setter.js.

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::hasAlternateBase const):
(JSC::AccessCase::alternateBase const):
(JSC::AccessCase::generateImpl):

  • bytecode/AccessCase.h:

(JSC::AccessCase::alternateBase const): Deleted.

  • bytecode/GetterSetterAccessCase.cpp:

(JSC::GetterSetterAccessCase::hasAlternateBase const):
(JSC::GetterSetterAccessCase::alternateBase const):

  • bytecode/GetterSetterAccessCase.h:
  • bytecode/ObjectPropertyConditionSet.cpp:

(JSC::generateConditionsForPrototypePropertyHitCustom):

  • bytecode/ObjectPropertyConditionSet.h:
  • jit/Repatch.cpp:

(JSC::tryCacheGetByID):
(JSC::tryCachePutByID):

11:44 AM Changeset in webkit [231249] by clopez@igalia.com
  • 2 edits in trunk/Source/WebCore

[GStreamer] Remove unneeded include of gstgldisplay_wayland.h after r228866 and r229022
https://bugs.webkit.org/show_bug.cgi?id=185207

Reviewed by Michael Catanzaro.

Remove unneeded include of gstgldisplay_wayland.h

No new tests, no change in behaviour.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
11:39 AM Changeset in webkit [231248] by Chris Dumez
  • 3 edits
    2 adds in trunk

document.open() event listener removal is not immediate
https://bugs.webkit.org/show_bug.cgi?id=185191

Reviewed by Darin Adler.

Source/WebCore:

We need to make sure we set the 'wasremoved' flag on RegisteredEventListeners
whenever they get removed from the EventListenerMap. We were doing so correctly
in EventListenerMap:remove() but not EventListenerMap::clear(). This patch
updates clear() accordingly.

The reason we need to set this flag is that RegisteredEventListeners is RefCounted
and EventTarget::fireEventListeners() may be currently running and calling
each listener one by one, holding a reference to all listener of a given event.

Test: fast/dom/Document/document-open-removes-all-listeners.html

  • dom/EventListenerMap.cpp:

(WebCore::EventListenerMap::clear):

LayoutTests:

Add layout test coverage.

  • fast/dom/Document/document-open-removes-all-listeners-expected.txt: Added.
  • fast/dom/Document/document-open-removes-all-listeners.html: Added.
11:37 AM Changeset in webkit [231247] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebKit

Adopt -destinationWindowToExitFullScreenForWindow:
https://bugs.webkit.org/show_bug.cgi?id=185204
<rdar://problem/22486621>

Reviewed by Eric Carlson.

  • UIProcess/mac/WKFullScreenWindowController.mm:

(-[WKFullScreenWindowController destinationWindowToExitFullScreenForWindow:]):

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

Disable Media capture rules in sandbox for simulator.
https://bugs.webkit.org/show_bug.cgi?id=185206
<rdar://problem/39910015>

Reviewed by Eric Carlson.

These rules are not relevant in this case.

  • WebProcess/com.apple.WebProcess.sb.in:
11:18 AM Changeset in webkit [231245] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

Use WeakPtr in GridCell
https://bugs.webkit.org/show_bug.cgi?id=185180
<rdar://problem/39432165>

Reviewed by Antti Koivisto.

Since GridCell does not own the renderers, it should
construct weak pointers.

Unable to create a reliably reproducible test case.

  • rendering/Grid.cpp:

(WebCore::Grid::insert):
(WebCore::GridIterator::nextGridItem):

  • rendering/Grid.h:
  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::firstLineBaseline const):

11:05 AM Changeset in webkit [231244] by jmarcell@apple.com
  • 4 edits in tags/Safari-606.1.16/Source/WebCore

Cherry-pick r231241. rdar://problem/39908855

Draw SystemPreview badge to specification on iOS
https://bugs.webkit.org/show_bug.cgi?id=185203
<rdar://problem/39908855>

Reviewed by Tim Horton.

Use CoreImage to render a badge with a blurred background,
at particular sizes.

This will be tested internally while we're getting artwork
from WebKitAdditions.

  • Configurations/WebCore.xcconfig: Link against CoreImage.
  • rendering/RenderThemeIOS.h:
  • rendering/RenderThemeIOS.mm: (WebCore::RenderThemeIOS::paintSystemPreviewBadge): New function in the iOS platform RenderTheme that draws the system preview.

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

10:52 AM Changeset in webkit [231243] by jmarcell@apple.com
  • 1 copy in tags/Safari-606.1.16

Tag Safari-606.1.16.

10:51 AM Changeset in webkit [231242] by eric.carlson@apple.com
  • 31 edits in trunk/Source

[iOS] Provide audio route information when invoking AirPlay picker
https://bugs.webkit.org/show_bug.cgi?id=185199
<rdar://problem/39853103>

Reviewed by Jer Noble.

Source/WebCore:

No new tests, this requires a specific hardware setup.

  • dom/Document.cpp:

(WebCore::Document::showPlaybackTargetPicker): Pass route sharing policy and routing context UID.

  • dom/Document.h:
  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::showPlaybackTargetPicker): Ditto.

  • loader/EmptyClients.h:
  • page/ChromeClient.h:
  • page/Page.cpp:

(WebCore::Page::showPlaybackTargetPicker): Ditto.

  • page/Page.h:
  • platform/audio/AudioSession.cpp:

(WebCore::AudioSession::routeSharingPolicy const): Empty implementation for non-iOS ports.
(WebCore::routingContextUID const): Ditto.

  • platform/audio/AudioSession.h:
  • platform/audio/ios/AudioSessionIOS.mm:

(WebCore::AudioSession::routeSharingPolicy const): Return the route sharing policy.
(WebCore::AudioSession::routingContextUID const): Return the route context UID.

Source/WebCore/PAL:

  • pal/spi/mac/AVFoundationSPI.h: Add additional AVAudioSession SPI.

Source/WebKit:

  • Scripts/webkit/messages.py:
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::showPlaybackTargetPicker): Pass route sharing policy and routing context UID.

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

(-[WKContentView _showPlaybackTargetPicker:fromRect:routeSharingPolicy:routingContextUID:]): Take same.
(-[WKContentView _showPlaybackTargetPicker:fromRect:]): Deleted.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::showPlaybackTargetPicker): Pass route sharing policy and routing context UID.

  • UIProcess/ios/forms/WKAirPlayRoutePicker.h:
  • UIProcess/ios/forms/WKAirPlayRoutePicker.mm:

(-[WKAirPlayRoutePicker showFromView:routeSharingPolicy:routingContextUID:]): Take same.
(-[WKAirPlayRoutePicker showFromView:]): Deleted.

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:

(WebKit::WebChromeClient::showPlaybackTargetPicker):

Source/WebKitLegacy/ios:

  • WebCoreSupport/WebChromeClientIOS.h:
  • WebCoreSupport/WebChromeClientIOS.mm:

(WebChromeClientIOS::showPlaybackTargetPicker): Pass route sharing policy and routing context UID.

10:36 AM Changeset in webkit [231241] by dino@apple.com
  • 4 edits in trunk/Source/WebCore

Draw SystemPreview badge to specification on iOS
https://bugs.webkit.org/show_bug.cgi?id=185203
<rdar://problem/39908855>

Reviewed by Tim Horton.

Use CoreImage to render a badge with a blurred background,
at particular sizes.

This will be tested internally while we're getting artwork
from WebKitAdditions.

  • Configurations/WebCore.xcconfig: Link against CoreImage.
  • rendering/RenderThemeIOS.h:
  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::paintSystemPreviewBadge): New function
in the iOS platform RenderTheme that draws the system preview.

10:19 AM Changeset in webkit [231240] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[MIPS] Implement and16 and store16 for MacroAssemblerMIPS
https://bugs.webkit.org/show_bug.cgi?id=185195

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

This implements the given function for MIPS, such that it builds again.

  • assembler/MacroAssemblerMIPS.h:

(JSC::MacroAssemblerMIPS::and16):
(JSC::MacroAssemblerMIPS::store16):

10:14 AM Changeset in webkit [231239] by jer.noble@apple.com
  • 4 edits in trunk/Source/WebKit

Get the WebKit.framework bundle by asking for WKWebView
https://bugs.webkit.org/show_bug.cgi?id=185175

Reviewed by Tim Horton.

  • NetworkProcess/mac/NetworkProcessMac.mm:

(WebKit::NetworkProcess::initializeSandbox):

  • Shared/mac/ChildProcessMac.mm:

(WebKit::ChildProcess::initializeSandbox):

  • StorageProcess/mac/StorageProcessMac.mm:

(WebKit::StorageProcess::initializeSandbox):

10:05 AM Changeset in webkit [231238] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Expose "$262.agent.monotonicNow()" for use in testing Atomic operation timeouts
https://bugs.webkit.org/show_bug.cgi?id=185043

Patch by Rick Waldron <waldron.rick@gmail.com> on 2018-05-02
Reviewed by Filip Pizlo.

  • jsc.cpp:

(GlobalObject::finishCreation):
(functionDollarAgentMonotonicNow):

9:49 AM Changeset in webkit [231237] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[ARM] Implement and16 and store16 for MacroAssemblerARMv7
https://bugs.webkit.org/show_bug.cgi?id=185196

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

This implements and16 and store16 for MacroAssemblerARMv7 such that JSC builds again.

  • assembler/MacroAssemblerARMv7.h:

(JSC::MacroAssemblerARMv7::and16):
(JSC::MacroAssemblerARMv7::store16):

9:49 AM Changeset in webkit [231236] by Brent Fulgham
  • 6 edits
    2 adds in trunk

Source/WebCore:
Prevent Debug ASSERT when changing forms
https://bugs.webkit.org/show_bug.cgi?id=185173
<rdar://problem/39738669>

Reviewed by Ryosuke Niwa.

Form submission could trigger a debug assertion during validation when
a form is changed during an input submission. Fix this by cleaning up
the event handling logic and make it more consistent with modern WebKit
coding style.

Test: fast/forms/form-submission-crash-3.html

  • html/HTMLButtonElement.cpp:

(WebCore::HTMLButtonElement::defaultEventHandler): Make sure layout runs before
attempting to perform event handling.

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::reportValidity): Ditto.
(WebCore::HTMLFormElement::validateInteractively): Remove call to perform layout here,
since we expect this to happen earlier in the layout pass. Add an assertion that the
tree is not dirty.

  • html/ImageInputType.cpp:

(WebCore::ImageInputType::handleDOMActivateEvent): Make sure layout runs before
attempting to perform event handling.

  • html/SubmitInputType.cpp:

(WebCore::SubmitInputType::handleDOMActivateEvent): Ditto.

LayoutTests:
Prevent assertion when changing forms
https://bugs.webkit.org/show_bug.cgi?id=185173
<rdar://problem/39738669>

Reviewed by Ryosuke Niwa.

  • fast/forms/form-submission-crash-3-expected.txt: Added.
  • fast/forms/form-submission-crash-3.html: Added.
9:42 AM Changeset in webkit [231235] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

Cannot gather srflx or relay ICE candidates on IPv6 network (ICE agent hangs?)
https://bugs.webkit.org/show_bug.cgi?id=181009
<rdar://problem/36144555>

Reviewed by Eric Carlson.

On iOS/IPv6 networks, STUN servers name resolution returns a zero IPv6 IP address.
No error is raised which leads to sending STUN requests with that IP address.
Once the request times out, the ICE candidate gathering finishes with host candidates only.

This patch makes WebRTC DNS resolver to send only IPv4 resolved addresses.
STUN is used for NAT traversal which is for IPv4 addresses.
Not sending IPv6 addresses allows terminating ICE candidate gathering sooner.

Manually tested on iOS with IPv4/IPv6 and IPv6 networks.

  • NetworkProcess/webrtc/NetworkRTCResolverCocoa.cpp:

(WebKit::resolvedName):

9:41 AM Changeset in webkit [231234] by youenn@apple.com
  • 4 edits
    2 adds in trunk

CacheStorage::Engine should keep a list of initialization callback
https://bugs.webkit.org/show_bug.cgi?id=185184
<rdar://problem/38875651>

Reviewed by Antti Koivisto.

Source/WebKit:

Keep each initialize callback in a Vector so as to compute the salt only once.
Call all callbacks then in a loop.

  • NetworkProcess/cache/CacheStorageEngine.cpp:

(WebKit::CacheStorage::Engine::~Engine):
(WebKit::CacheStorage::Engine::initialize):

  • NetworkProcess/cache/CacheStorageEngine.h:

LayoutTests:

  • http/wpt/cache-storage/a-cache-open.https-expected.txt: Added.
  • http/wpt/cache-storage/a-cache-open.https.html: Added.
9:13 AM Changeset in webkit [231233] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed; address review comments made before landing r231231.

  • platform/ios/WebVideoFullscreenControllerAVKit.mm:

(VideoFullscreenControllerContext::volume const):

8:51 AM Changeset in webkit [231232] by jer.noble@apple.com
  • 2 edits in trunk/Source/WTF

Enable HAVE_AVKIT for the MINIMAL_SIMULATOR
https://bugs.webkit.org/show_bug.cgi?id=185183

Reviewed by Daniel Bates.

  • wtf/Platform.h:
8:50 AM Changeset in webkit [231231] by jer.noble@apple.com
  • 16 edits in trunk/Source

Pipe volume through PlaybackSessionManager/Proxy.
https://bugs.webkit.org/show_bug.cgi?id=185182

Reviewed by Eric Carlson.

Source/WebCore:

Add support for the volume property to PlaybackSessionModel, and all its clients.

  • platform/cocoa/PlaybackSessionModel.h:

(WebCore::PlaybackSessionModelClient::volumeChanged):

  • platform/cocoa/PlaybackSessionModelMediaElement.h:
  • platform/cocoa/PlaybackSessionModelMediaElement.mm:

(WebCore::PlaybackSessionModelMediaElement::updateForEventName):
(WebCore::PlaybackSessionModelMediaElement::setVolume):
(WebCore::PlaybackSessionModelMediaElement::volume const):

  • platform/ios/PlaybackSessionInterfaceAVKit.h:
  • platform/ios/PlaybackSessionInterfaceAVKit.mm:

(WebCore::PlaybackSessionInterfaceAVKit::volumeChanged):

  • platform/ios/WebAVPlayerController.h:
  • platform/ios/WebAVPlayerController.mm:

(-[WebAVPlayerController volume]):
(-[WebAVPlayerController setVolume:]):
(-[WebAVPlayerController volumeChanged:]):
(-[WebAVPlayerController resetMediaState]):

  • platform/ios/WebVideoFullscreenControllerAVKit.mm:

(VideoFullscreenControllerContext::volumeChanged):
(VideoFullscreenControllerContext::volume const):
(VideoFullscreenControllerContext::setVolume):

Source/WebKit:

  • UIProcess/Cocoa/PlaybackSessionManagerProxy.h:
  • UIProcess/Cocoa/PlaybackSessionManagerProxy.messages.in:
  • UIProcess/Cocoa/PlaybackSessionManagerProxy.mm:

(WebKit::PlaybackSessionModelContext::setVolume):
(WebKit::PlaybackSessionModelContext::volumeChanged):
(WebKit::PlaybackSessionManagerProxy::volumeChanged):
(WebKit::PlaybackSessionManagerProxy::setVolume):

  • WebProcess/cocoa/PlaybackSessionManager.h:
  • WebProcess/cocoa/PlaybackSessionManager.messages.in:
  • WebProcess/cocoa/PlaybackSessionManager.mm:

(WebKit::PlaybackSessionInterfaceContext::volumeChanged):
(WebKit::PlaybackSessionManager::volumeChanged):
(WebKit::PlaybackSessionManager::setVolume):

5:00 AM Changeset in webkit [231230] by clopez@igalia.com
  • 5 edits
    1 add in trunk/Tools

[GTK] Generate a JSC bundle on the 64 and 32 bit release bots and upload it to webkitgtk.org
https://bugs.webkit.org/show_bug.cgi?id=184699

Reviewed by Gustavo Noronha Silva.

This adds a new step for the GTK 64-bit release build bot and the
GTK 32-bit release build&test bot.

This step will be run as one of the lasts ones (after the product
is built) and will execute the script generate-jsc-bundle.
This script will take care of creating a JSC bundle and uploading
it to a server defined on a configuration file that has to be
deployed on the bots with the required server data and credentials
for this upload.

In this case, the built products should then be accessible at
<https://webkitgtk.org/jsc-built-products>. But the implementation
is not tied to any specific server. All the details about where
to upload the file is done in configuration file that is kept
private on each bot outside of the WebKit source tree.

The script also supports generating a JSC bundle locally and not
uploading it anywhere. This is the default mode of running.
The remote upload will only be activated if a --remote-config-file
parameter is passed (which is done from the buildbot config)

  • BuildSlaveSupport/build.webkit.org-config/config.json:
  • BuildSlaveSupport/build.webkit.org-config/factories.py:

(BuildFactory):
(BuildFactory.init):
(TestFactory):
(TestFactory.init):
(BuildAndGenerateJSCBundleFactory):
(BuildAndNonLayoutTestAndGenerateJSCBundleFactory):

  • BuildSlaveSupport/build.webkit.org-config/steps.py:

(GenerateJSCBundle):

  • BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
  • Scripts/generate-jsc-bundle: Added.

(ldd_get_libs_and_interpreter):
(generate_readme):
(generate_wrapper_script):
(copy_and_remove_rpath):
(createJSCBundle):
(sha256sum):
(uploadJSCBundle):
(main):

4:21 AM Changeset in webkit [231229] by rmorisset@apple.com
  • 4 edits
    1 add in trunk

emitCodeToGetArgumentsArrayLength should not crash on PhantomNewArrayWithSpread
https://bugs.webkit.org/show_bug.cgi?id=183172

Reviewed by Filip Pizlo.

JSTests:

  • stress/length-of-new-array-with-spread.js: Added.

(foo):
(bar):
(baz):

Source/JavaScriptCore:

DFGArgumentsEliminationPhase.cpp currently believes that allocations of NewArrayWithSpread can be deleted if they are only used by GetArrayLength,
but when it then calls emitCodeToGetArgumentsArrayLength, the latter has no idea what to do with GetArrayLength.

I fix the problem by teaching emitCodeToGetArgumentsArrayLength how to deal with GetArrayLength.
Because this requires emitting an Add that can overflow and thus exit, we also tell DFGArgumentsEliminationPhase to give up on eliminating
a NewArrayWithSpread when it is used by a GetArrayLength that is not allowed to exit.

  • dfg/DFGArgumentsEliminationPhase.cpp:
  • dfg/DFGArgumentsUtilities.cpp:

(JSC::DFG::emitCodeToGetArgumentsArrayLength):

4:06 AM Changeset in webkit [231228] by Ms2ger@igalia.com
  • 3 edits in trunk/LayoutTests

Update document-create-touch.html expectations for r231114
https://bugs.webkit.org/show_bug.cgi?id=185193

Unreviewed test gardening.

  • fast/events/touch/document-create-touch-expected.txt:
  • fast/events/touch/document-create-touch.html:
3:51 AM WebKitGTK/Gardening/Calendar edited by Ms2ger@igalia.com
(diff)
3:06 AM Changeset in webkit [231227] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, stackPointer signature is different from declaration
https://bugs.webkit.org/show_bug.cgi?id=184790

  • runtime/MachineContext.h:

(JSC::MachineContext::stackPointer):

Note: See TracTimeline for information about the timeline view.