Timeline



Feb 6, 2017:

10:45 PM Changeset in webkit [211775] by Carlos Garcia Campos
  • 6 edits
    2 adds in trunk

Overlay scrolling with iframe-s broken
https://bugs.webkit.org/show_bug.cgi?id=165056

Reviewed by Antonio Gomes.

Source/WebCore:

Mouse press events for overlay scrollbars are ignored if there's a subframe under the scrollbar. This doesn't
happen with normal scrollbars, because the subframe is not really under the scrollbar, so events are always
correctly passed to the scrollbar. With overlay scrollbars, the hit test detects the scrollbar, but events are
always passed first to the subframe. Scrollbars are correctly updated on hover though, because
handleMouseMoveEvent checks the presence of scrollbars before checking for subframes and move events are
actually passed to both, the scrollbar and the subframe. Overlay scrollbars should always take precedence over
subframes to handle mouse press events, so we should check first if mouse is over a scrollbar and never pass the
event to a subframe in that case. Another problem is that the cursor is not updated either when the overlay
scrollbar is hovered and there's a subframe. This is because in handleMouseMoveEvent we pass the event to both
the scrollbar and subframe but we never update the cursor when a suframe was found. So, here again we need to make
an exception for scrollbars and upate the cursor when mouse is over the scrollbar even if a subframe was found.

Test: fast/scrolling/scroll-animator-overlay-scrollbars-clicked.html

  • page/EventHandler.cpp:

(WebCore::EventHandler::handleMousePressEvent): Move the scrollbar check before the subframe check.
(WebCore::EventHandler::handleMouseMoveEvent): Update the cursor when hovering a scrollbar even if a subframe
was found.
(WebCore::EventHandler::updateLastScrollbarUnderMouse): Use an enum instead of a boolean for setLast parameter.

  • page/EventHandler.h:

LayoutTests:

Add a new test to check that clicking on an overlay scrollbar works even it's over a subframe.

  • fast/scrolling/scroll-animator-overlay-scrollbars-clicked-expected.txt: Added.
  • fast/scrolling/scroll-animator-overlay-scrollbars-clicked.html: Added.
  • platform/ios-simulator/TestExpectations:
  • platform/mac-wk1/TestExpectations:
10:34 PM Changeset in webkit [211774] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[GTK] jhbuild fails: mesa-11.0.6.tar.xz: 404 Not Found
https://bugs.webkit.org/show_bug.cgi?id=167916

Patch by Fujii Hironori <Fujii Hironori> on 2017-02-06
Reviewed by Carlos Garcia Campos.

URL of mesa-11.0.6.tar.xz has been moved.

  • gtk/jhbuild.modules: Fix the module path.
10:12 PM Changeset in webkit [211773] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

[Soup] Long resources loaded by custom protocols sometimes never finish loading
https://bugs.webkit.org/show_bug.cgi?id=167890

Reviewed by Michael Catanzaro.

It's another bug that has appeared in WebKitSoupRequestInputStream after moving the custom protocols handling to
the main thread. The problem is that webkitSoupRequestInputStreamPendingReadAsyncComplete invalidates
pendingAsyncRead after calling webkitSoupRequestInputStreamReadAsyncResultComplete, but in some cases
webkitSoupRequestInputStreamReadAsyncResultComplete completes the task in the same run loop iteration. In that
case webkitSoupRequestInputStreamReadAsync is called again creating a new AsyncReadData that is destroyed right
after webkitSoupRequestInputStreamReadAsyncResultComplete returns.

  • WebProcess/soup/WebKitSoupRequestInputStream.cpp:

(AsyncReadData::AsyncReadData): Use an rvalue reference for the task.
(webkitSoupRequestInputStreamPendingReadAsyncComplete): Use WTFMove to ensure pendingAsyncRead is cleared before
webkitSoupRequestInputStreamReadAsyncResultComplete is called, and continue processing pending requests if there
are new ones after webkitSoupRequestInputStreamReadAsyncResultComplete.
(webkitSoupRequestInputStreamReadAsync): Use WTFMove to transfer the task to AsyncReadData.
(webkitSoupRequestInputStreamDidFailWithError): Use WTFMove to ensure pendingAsyncRead is cleared.

8:47 PM Changeset in webkit [211772] by Chris Dumez
  • 5 edits in trunk

Symbols exposed on cross-origin Window / Location objects should be configurable
https://bugs.webkit.org/show_bug.cgi?id=167920

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline web platform test now that more checks are passing.

  • web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-expected.txt:

Source/WebCore:

Symbols exposed on cross-origin Window / Location objects should be configurable:

Firefox behaves as per specification.

No new tests, rebaselined existing test.

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess):

  • bindings/js/JSLocationCustom.cpp:

(WebCore::JSLocation::getOwnPropertySlotDelegate):

8:27 PM Changeset in webkit [211771] by commit-queue@webkit.org
  • 11 edits
    1 copy
    1 add in trunk/Source

Web Inspector: Do not use RunLoop when dispatching inspector GC event
https://bugs.webkit.org/show_bug.cgi?id=167683
<rdar://problem/30167791>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-02-06
Reviewed by Brian Burg.

Source/JavaScriptCore:

Move the RunLoop deferred implementation to WebCore. It is not needed
for JSContext inspection, and in JSContext inspection we are not
guarenteed a RunLoop to defer to.

  • inspector/agents/InspectorHeapAgent.h:
  • inspector/agents/InspectorHeapAgent.cpp:

(Inspector::InspectorHeapAgent::InspectorHeapAgent):
(Inspector::InspectorHeapAgent::~InspectorHeapAgent):
(Inspector::InspectorHeapAgent::disable):
(Inspector::InspectorHeapAgent::didGarbageCollect):
(Inspector::SendGarbageCollectionEventsTask::SendGarbageCollectionEventsTask): Deleted.
(Inspector::SendGarbageCollectionEventsTask::addGarbageCollection): Deleted.
(Inspector::SendGarbageCollectionEventsTask::reset): Deleted.
(Inspector::SendGarbageCollectionEventsTask::timerFired): Deleted.

(Inspector::InspectorHeapAgent::dispatchGarbageCollectedEvent):
Make a virtual method so that WebCore implementations of this agent can choose
to dispatch this event asynchronously.

  • inspector/agents/InspectorScriptProfilerAgent.cpp:

Remove unnecessary RunLoop include.

Source/WebCore:

Covered by existing tests.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • inspector/InspectorAllInOne.cpp:

Add new file.

  • inspector/PageHeapAgent.cpp:

(WebCore::PageHeapAgent::PageHeapAgent):
(WebCore::PageHeapAgent::enable):
(WebCore::PageHeapAgent::disable):

  • inspector/PageHeapAgent.h:

Extend WebHeapAgent.

  • inspector/WorkerInspectorController.cpp:

(WebCore::WorkerInspectorController::WorkerInspectorController):
Use WebHeapAgent.

  • inspector/WebHeapAgent.cpp: Added.

(WebCore::SendGarbageCollectionEventsTask::SendGarbageCollectionEventsTask):
(WebCore::SendGarbageCollectionEventsTask::addGarbageCollection):
(WebCore::SendGarbageCollectionEventsTask::reset):
(WebCore::SendGarbageCollectionEventsTask::timerFired):
(WebCore::WebHeapAgent::WebHeapAgent):
(WebCore::WebHeapAgent::~WebHeapAgent):
(WebCore::WebHeapAgent::disable):
(WebCore::WebHeapAgent::dispatchGarbageCollectedEvent):
(WebCore::WebHeapAgent::dispatchGarbageCollectionEventsAfterDelay):

  • inspector/WebHeapAgent.h:

Move the defered event dispatch from InspectorHeapAgent here where a RunLoop is guarenteed.

8:23 PM Changeset in webkit [211770] by mitz@apple.com
  • 4 edits in trunk/Source/WebKit2

[iOS] -[WKWebView becomeFirstResponder] and -[WKWebView resignFirstResponder] don’t get called when non-programmatic first responder changes happen
https://bugs.webkit.org/show_bug.cgi?id=167898

Reviewed by Tim Horton.

Made WKContentView’s -becomeFirstResponder and -resignFirstResponder forward to the
WKWebView, giving subclasses an opportunity to override these methods. Changed the WKWebView
implementations to call back into WKContentView methods that actually do the work.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView becomeFirstResponder]): If the current content view is a WKContentView, call

-becomeFirstResponderForWebView. Added a check that the content view has a superview to
get the right behavior when this is called during the transition from not having to having
a custom content view.

(-[WKWebView canBecomeFirstResponder]): If the current content view is a WKContentView, call

-canBecomeFirstResponderForWebView.

(-[WKWebView resignFirstResponder]): If the current content view is a WKContentView, call

-resignFirstResponderForWebView.

(-[WKWebView _setHasCustomContentView:loadedMIMEType:]): If the new content view is a

WKContentView, use -canBecomeFirstResponderForWebView.

  • UIProcess/ios/WKContentViewInteraction.h: Added _becomingFirstResponder ivar.
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView canBecomeFirstResponder]): Return _becomingFirstResponder. Normally this is

NO, so code that hit-tests then walks up the view hierarchy to select a first responder
will continue to the WKWebView. But we need to return YES around the call to super’s
-becomeFirstResponder in -becomeFirstResponderForWebView.

(-[WKContentView canBecomeFirstResponderForWebView]): Moved the old

-becomeFirstResponderForWebView implementation here.

(-[WKContentView becomeFirstResponder]): Forward to the WKWebView.
(-[WKContentView becomeFirstResponderForWebView]): Moved the old -becomeFirstResponder

implementation here, setting _becomingFirstResponder to YES around the call to super.

(-[WKContentView resignFirstResponder]): Forward to the WKWebView.
(-[WKContentView resignFirstResponderForWebView]): Moved the old -resignFirstResponder

implementation here.

8:19 PM Changeset in webkit [211769] by commit-queue@webkit.org
  • 4 edits in trunk/Tools

Static Analyzer: Address some leaks in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=167897

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-02-06
Reviewed by Alexey Proskuryakov.

  • MiniBrowser/mac/BrowserWindowController.m:

(-[BrowserWindowController sharingService:transitionImageForShareItem:contentRect:]):

  • MiniBrowser/mac/ExtensionManagerWindowController.m:

(-[ExtensionManagerWindowController add:]):
(-[ExtensionManagerWindowController remove:]):

  • MiniBrowser/mac/SettingsController.m:

(-[SettingsController _populateMenu]):
(-[SettingsController togglePerWindowWebProcessesDisabled:]):
Address obvious leaks caught by the static analyzer.

6:40 PM Changeset in webkit [211768] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

ExtendedColor leaks seen on leaks bot
https://bugs.webkit.org/show_bug.cgi?id=167912

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-02-06
Reviewed by Alexey Proskuryakov.

  • platform/graphics/Color.cpp:

(WebCore::Color::operator=):
Before overwriting m_colorData, we must deref the extended color inside it.

6:19 PM Changeset in webkit [211767] by Simon Fraser
  • 2 edits in trunk/Source/WebKit2

Remove assertion in WebViewImpl::performKeyEquivalent()

Reviewed by Wenson Hsieh.

The assertion ASSERT(event == [NSApp currentEvent]) fires when using certain key combinations
in MiniBrowser's location field (e.g. Option-Shift-Arrow to select). The assertion is not correct,
so remove it.

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::performKeyEquivalent):

6:19 PM Changeset in webkit [211766] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Re-land r210095 (avoid a tile revalidation on scale change)
https://bugs.webkit.org/show_bug.cgi?id=167866

Reviewed by Tim Horton.

r210095 was rolled out in r211230 but now that all TileControllers unparent
offscreen tiles, we can roll it back it.

Also add more Tiling logging.

  • platform/graphics/ca/TileGrid.cpp:

(WebCore::validationPolicyAsString):
(WebCore::TileGrid::setScale):
(WebCore::TileGrid::prepopulateRect):
(WebCore::TileGrid::revalidateTiles):
(WebCore::TileGrid::ensureTilesForRect):

6:14 PM Changeset in webkit [211765] by mmaxfield@apple.com
  • 9 edits in trunk

Migrate ComplexTextController to use platform-independent types
https://bugs.webkit.org/show_bug.cgi?id=167833

Reviewed by Brent Fulgham.

Source/WebCore:

ComplexTextController will eventually be used on all ports to perform complex text layout.
This is a mechanical patch which migrates the shared parts of ComplexTextController away from
using CoreGraphics and CoreFoundation types in favor of WebCore/platform types. Eventually,
ComplexTextController will get moved to PAL but there is a layering violation (TextLayout) to
fix first.

No new tests because there is no behavior change.

  • platform/graphics/GlyphBuffer.h:

(WebCore::GlyphBufferAdvance::GlyphBufferAdvance):

  • platform/graphics/mac/ComplexTextController.cpp:

(WebCore::ComplexTextController::offsetForPosition):
(WebCore::advanceByCombiningCharacterSequence):
(WebCore::ComplexTextController::ComplexTextRun::indexAt):
(WebCore::ComplexTextController::ComplexTextRun::setIsNonMonotonic):
(WebCore::ComplexTextController::advance):
(WebCore::ComplexTextController::adjustGlyphsAndAdvances):

  • platform/graphics/mac/ComplexTextController.h:

(WebCore::ComplexTextController::ComplexTextRun::create):
(WebCore::ComplexTextController::ComplexTextRun::stringLength):
(WebCore::ComplexTextController::ComplexTextRun::indexBegin):
(WebCore::ComplexTextController::ComplexTextRun::indexEnd):
(WebCore::ComplexTextController::ComplexTextRun::endOffsetAt):
(WebCore::ComplexTextController::ComplexTextRun::glyphs):
(WebCore::ComplexTextController::ComplexTextRun::growInitialAdvanceHorizontally):
(WebCore::ComplexTextController::ComplexTextRun::initialAdvance):
(WebCore::ComplexTextController::ComplexTextRun::baseAdvances):
(WebCore::ComplexTextController::ComplexTextRun::glyphOrigins):
(WebCore::ComplexTextController::glyphOrigin):
(WebCore::ComplexTextController::ComplexTextRun::createForTesting): Deleted.

  • platform/graphics/mac/ComplexTextControllerCoreText.mm:

(SOFT_LINK):
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):

Tools:

Migrate tests away from platform-dependent types.

  • TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp:

(TestWebKitAPI::TEST_F):

LayoutTests:

Rebaseline tiny rounding result.

  • platform/mac/fast/text/complex-text-opacity-expected.txt:
6:08 PM Changeset in webkit [211764] by Simon Fraser
  • 2 edits in trunk/Source/WebKit2

[iOS WK2] Keep the tiled scrolling indicator on-screen when pinching
https://bugs.webkit.org/show_bug.cgi?id=167915

Reviewed by Tim Horton.

Clamp the location to the larger of the location of .unobscuredContentRect() and 0,0.

  • UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:

(WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):

5:48 PM Changeset in webkit [211763] by Brent Fulgham
  • 6 edits in trunk

Correct File Path Handling in SecurityOrigin and FileSystem
https://bugs.webkit.org/show_bug.cgi?id=167894
<rdar://problem/30380080>

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Roll out the URL decoding being done in the FileSystem class (added in Bug 167894), and instead ensure that
SecurityOrigin properly handles file URLs, and only passes valid file strings to the FileSystem interface.

Tested by FileSystemTests and SecurityOriginTests in TestWebKitAPI.

  • page/SecurityOrigin.cpp:

(WebCore::SecurityOrigin::SecurityOrigin): Initialize m_filePath using the url's fileSystemPath, not
the %-encoded 'path' property.
(WebCore::SecurityOrigin::canDisplay): Pass the 'fileSystemPath' to 'filesHaveSameVolume', rather than
the %-encoded 'path' property.

  • page/SecurityOrigin.h:
  • platform/FileSystem.cpp:

(WebCore::filesHaveSameVolume): Do not use 'decodeURLEscapeSequences' in 'filesHaveSameVolume'.

Tools:

  • TestWebKitAPI/Tests/WebCore/FileSystem.cpp: Don't encode the temporary files,

and perform same-volume checks using filesystem-compatible paths.

  • TestWebKitAPI/Tests/WebCore/SecurityOrigin.cpp: Create SecurityOrigins from

filesystem paths, and perform validation of same-volume checks.
(TestWebKitAPI::SecurityOriginTest::tempFilePath): Added.
(TestWebKitAPI::SecurityOriginTest::spaceContainingFilePath): Added.
(TestWebKitAPI::SecurityOriginTest::bangContainingFilePath): Added.
(TestWebKitAPI::SecurityOriginTest::quoteContainingFilePath): Added.

5:39 PM Changeset in webkit [211762] by aestes@apple.com
  • 4 edits
    1 copy in trunk/Source/WebCore

[Cocoa] Split FileSystemMac.mm into Mac and Cocoa parts
https://bugs.webkit.org/show_bug.cgi?id=167908

Reviewed by Sam Weinig.

Kept the Mac-only functions in FileSystemMac.mm and moved the rest into FileSystemCocoa.mm.

  • PlatformMac.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/cocoa/FileSystemCocoa.mm: Copied from Source/WebCore/platform/mac/FileSystemMac.mm.
  • platform/mac/FileSystemMac.mm:

(-[WebFileManagerDelegate fileManager:shouldProceedAfterError:movingItemAtURL:toURL:]): Moved to FileSystemCocoa.mm.
(WebCore::homeDirectoryPath): Ditto.
(WebCore::openTemporaryFile): Ditto.
(WebCore::moveFile): Ditto.
(WebCore::getVolumeFreeSpace): Ditto.

5:33 PM Changeset in webkit [211761] by eric.carlson@apple.com
  • 5 edits in trunk/Source/WebCore

[MediaStream Mac] Remove some unused code
https://bugs.webkit.org/show_bug.cgi?id=167913

Reviewed by Jer Noble.

No new tests, no functional change.

  • platform/mediastream/CaptureDeviceManager.h:

(WebCore::CaptureSessionInfo::~CaptureSessionInfo): Deleted.
(WebCore::CaptureSessionInfo::supportsVideoSize): Deleted.
(WebCore::CaptureSessionInfo::bestSessionPresetForVideoDimensions): Deleted.

  • platform/mediastream/mac/AVCaptureDeviceManager.h:
  • platform/mediastream/mac/AVCaptureDeviceManager.mm:

(WebCore::AVCaptureDeviceManager::refreshCaptureDeviceList):
(WebCore::AVCaptureSessionInfo::AVCaptureSessionInfo): Deleted.
(WebCore::AVCaptureSessionInfo::supportsVideoSize): Deleted.
(WebCore::AVCaptureSessionInfo::bestSessionPresetForVideoDimensions): Deleted.

  • platform/mediastream/mac/AVMediaCaptureSource.mm:

(WebCore::AVMediaCaptureSource::AVMediaCaptureSource):

5:20 PM Changeset in webkit [211760] by Simon Fraser
  • 2 edits in trunk/Source/WebKit2

Tiled scrolling indicator gets doubled up on navigation
https://bugs.webkit.org/show_bug.cgi?id=167909

Reviewed by Tim Horton.

TiledCoreAnimationDrawingArea::updateDebugInfoLayer() would parent a new m_debugInfoLayer
in m_hostingLayer without removing the old one, causing the old tiled scrolling indicator layer
hierarchy to get left in the layer tree.

Also a couple of nullptr/0 -> nil.

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
(WebKit::TiledCoreAnimationDrawingArea::updateDebugInfoLayer):

4:29 PM Changeset in webkit [211759] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-603.1.25

Tag Safari-603.1.25.

4:25 PM Changeset in webkit [211758] by commit-queue@webkit.org
  • 10 edits
    2 adds in trunk

Allow some schemes to opt-out of CORS
https://bugs.webkit.org/show_bug.cgi?id=167795

Patch by Youenn Fablet <youennf@gmail.com> on 2017-02-06
Reviewed by Alex Christensen.

Source/WebCore:

Test: http/tests/security/bypassing-cors-checks-for-extension-urls.html

Adding the possibility to opt out of CORS for DocumentThreadableLoader clients (fetch and XHR).
This is made specific to the case of user extension URLs for pages running user scripts.
Introducing a boolean flag in Page for that purpose.
Introducing a helper routine in SchemeRegistry to centralize the various user script extension schemes.

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::DocumentThreadableLoader):

  • page/Frame.cpp:

(WebCore::Frame::injectUserScripts):

  • page/Page.h:

(WebCore::Page::setAsRunningUserScripts):
(WebCore::Page::isRunningUserScripts):

  • platform/SchemeRegistry.cpp:

(WebCore::SchemeRegistry::isUserExtensionScheme):

  • platform/SchemeRegistry.h:
  • testing/Internals.cpp:

(WebCore::Internals::setAsRunningUserScripts):

  • testing/Internals.h:
  • testing/Internals.idl:

LayoutTests:

  • http/tests/security/bypassing-cors-checks-for-extension-urls-expected.txt: Added.
  • http/tests/security/bypassing-cors-checks-for-extension-urls.html: Added.
3:56 PM Changeset in webkit [211757] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit2

More build fixes after r211751
https://bugs.webkit.org/show_bug.cgi?id=166998

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
(WebKit::NetworkDataTaskSoup::authenticate):
(WebKit::NetworkDataTaskSoup::continueAuthenticate):
(WebKit::NetworkDataTaskSoup::continueHTTPRedirection):
Use the correct partition for credentials.

3:50 PM Changeset in webkit [211756] by Chris Dumez
  • 11 edits in trunk

Align OwnPropertyKeys? with the HTML specification for cross-origin Window / Location objects
https://bugs.webkit.org/show_bug.cgi?id=167647
<rdar://problem/30339489>

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Rebaseline web platform test now that more checks are passing.

  • web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-expected.txt:

Source/WebCore:

Align OwnPropertyKeys? with the HTML specification for cross-origin Window / Location objects:

In particular, the following changes were made:

  • Location:
    • We now return the following symbols as well: @@toStringTag, @@hasInstance, @@isConcatSpreadable as per [2].
  • Window:
    • We now return the following symbols as well: @@toStringTag, @@hasInstance, @@isConcatSpreadable as per [2].
    • We now return the indices of the child browsing contexts as per [1].
    • We now return the names of the child browsing contexts as per [3].

No new tests, updated / rebaselined existing tests.

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
Index properties should be configurable as per:

(WebCore::inScope):
(WebCore::addScopedChildrenNames):
(WebCore::addCrossOriginPropertyNames):
(WebCore::addScopedChildrenIndexes):
(WebCore::addCrossOriginOwnPropertyNames):
(WebCore::JSDOMWindow::getOwnPropertyNames):

  • bindings/js/JSLocationCustom.cpp:

(WebCore::addCrossOriginPropertyNames):
(WebCore::addCrossOriginOwnPropertyNames):
(WebCore::JSLocation::getOwnPropertyNames):

LayoutTests:

Extend test coverage for OwnPropertyKeys? for cross-origin Window / Location objects.

  • http/tests/security/cross-frame-access-enumeration-expected.txt:
  • http/tests/security/cross-frame-access-enumeration.html:
  • http/tests/security/resources/cross-frame-iframe-for-enumeration-test.html:
  • js/dom/getOwnPropertyDescriptor-expected.txt:
  • js/resources/getOwnPropertyDescriptor.js:
3:47 PM Changeset in webkit [211755] by yoav@yoav.ws
  • 10 edits in trunk

http/tests/preload/dynamic_removing_preload.html fails to test what it should
https://bugs.webkit.org/show_bug.cgi?id=167792

Reviewed by Ryosuke Niwa.

Source/WebCore:

Cancel the link preload resource load when the link element is removed from the DOM.

No new tests, but unskipping an existing test: http/tests/preload/dynamic_removing_preload.html

  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::removedFrom): Call m_linkLoader.cancelLoad().

  • loader/LinkLoader.cpp:

(WebCore::LinkLoader::cancelLoad): Clear m_preloadResourceClient.

  • loader/LinkLoader.h:
  • loader/LinkPreloadResourceClients.h:

(WebCore::LinkPreloadResourceClient::clearResource): Call m_resource->cancelLoad().

  • loader/SubresourceLoader.cpp:

(WebCore::LinkPreloadResourceClient::didFinishLoading): Change ASSERT to exempt cancelled loads.

LayoutTests:

  • TestExpectations: Unskip dynamic_removing_preload.html
  • http/tests/preload/dynamic_removing_preload-expected.txt:
  • http/tests/preload/dynamic_removing_preload.html: Switch test to use ResourceTiming.
3:47 PM Changeset in webkit [211754] by achristensen@apple.com
  • 5 edits in trunk/Source

More build fixes after r211751
https://bugs.webkit.org/show_bug.cgi?id=166998

Source/WebCore:

  • platform/network/soup/ResourceHandleSoup.cpp:

(WebCore::applyAuthenticationToRequest):

  • platform/network/soup/SocketStreamHandleImplSoup.cpp:

(WebCore::SocketStreamHandleImpl::create):

Source/WebKit/win:

  • WebDownloadCFNet.cpp:

(WebDownload::didReceiveAuthenticationChallenge):

3:27 PM Changeset in webkit [211753] by achristensen@apple.com
  • 5 edits in trunk/Source/WebCore

Fix non-cocoa builds after r211751.
https://bugs.webkit.org/show_bug.cgi?id=166998

  • platform/network/cf/ResourceHandleCFNet.cpp:

(WebCore::ResourceHandle::createCFURLConnection):
(WebCore::ResourceHandle::willSendRequest):
(WebCore::ResourceHandle::tryHandlePasswordBasedAuthentication):
(WebCore::ResourceHandle::receivedCredential):

  • platform/network/curl/ResourceHandleCurl.cpp:

(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
(WebCore::ResourceHandle::receivedCredential):

  • platform/network/curl/ResourceHandleManager.cpp:

(WebCore::ResourceHandleManager::applyAuthenticationToRequest):

  • platform/network/soup/ResourceHandleSoup.cpp:

(WebCore::applyAuthenticationToRequest):
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
(WebCore::ResourceHandle::receivedCredential):

3:02 PM Changeset in webkit [211752] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebKit2

Update sandbox to allow CoreMedia to perform custom media loading.
https://bugs.webkit.org/show_bug.cgi?id=167700

Reviewed by Alexey Proskuryakov.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2:45 PM Changeset in webkit [211751] by achristensen@apple.com
  • 25 edits
    14 adds in trunk

credentials should be partitioned by main document domain
https://bugs.webkit.org/show_bug.cgi?id=166998
Source/WebCore:

rdar://problem/22901123

Reviewed by Brady Eidson.

Covered by http/tests/security/credentials-iframes.html
Also added http/tests/security/credentials-from-different-domains.html to verify existing behavior without iframes.

  • Modules/websockets/WebSocketChannel.cpp:

(WebCore::WebSocketChannel::connect):

  • dom/Document.h:
  • page/SecurityOrigin.cpp:

(WebCore::SecurityOrigin::domainForCachePartition):
Return emptyString instead of a null String because it is used as a key in a HashMap, and hashing null strings dereferences null.

  • page/SocketProvider.cpp:

(WebCore::SocketProvider::createSocketStreamHandle):

  • page/SocketProvider.h:
  • platform/network/CredentialStorage.cpp:

(WebCore::CredentialStorage::set):
(WebCore::CredentialStorage::get):
(WebCore::CredentialStorage::remove):

  • platform/network/CredentialStorage.h:

Partition credentials.

  • platform/network/ResourceHandleInternal.h:

(WebCore::ResourceHandleInternal::ResourceHandleInternal):

  • platform/network/cf/SocketStreamHandleImpl.h:

(WebCore::SocketStreamHandleImpl::create):

  • platform/network/cf/SocketStreamHandleImplCFNet.cpp:

(WebCore::SocketStreamHandleImpl::SocketStreamHandleImpl):
(WebCore::SocketStreamHandleImpl::getStoredCONNECTProxyCredentials):

  • platform/network/curl/SocketStreamHandleImpl.h:

(WebCore::SocketStreamHandleImpl::create):

  • platform/network/mac/ResourceHandleMac.mm:

(WebCore::ResourceHandle::createNSURLConnection):
(WebCore::ResourceHandle::willSendRequest):
(WebCore::ResourceHandle::tryHandlePasswordBasedAuthentication):
(WebCore::ResourceHandle::receivedCredential):

  • platform/network/soup/SocketStreamHandleImpl.h:

Source/WebKit/mac:

rdar://problem/22901123

Reviewed by Brady Eidson.

  • Misc/WebDownload.mm:
  • Plugins/WebBaseNetscapePluginView.mm:

(WebKit::getAuthenticationInfo):
Don't use partitioned credentials for WebKit1 plugins or downloads.
Downloads should be authenticated before becoming a download anyways.

Source/WebKit2:

rdar://problem/22901123

Reviewed by Brady Eidson.

  • NetworkProcess/NetworkDataTask.cpp:

(WebKit::NetworkDataTask::NetworkDataTask):

  • NetworkProcess/NetworkDataTask.h:

(WebKit::NetworkDataTask::partition):

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
(WebKit::NetworkDataTaskCocoa::tryPasswordBasedAuthentication):

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):

  • WebProcess/Network/WebSocketProvider.cpp:

(WebKit::WebSocketProvider::createSocketStreamHandle):

  • WebProcess/Network/WebSocketProvider.h:
  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::getAuthenticationInfo):

LayoutTests:

<rdar://problem/22901123>

Reviewed by Brady Eidson.

  • http/tests/security/credentials-from-different-domains-expected.txt: Added.
  • http/tests/security/credentials-from-different-domains.html: Added.
  • http/tests/security/credentials-iframes-expected.txt: Added.
  • http/tests/security/credentials-iframes.html: Added.
  • http/tests/security/resources/cors-basic-auth.php: Added.
  • http/tests/security/resources/credentials-from-different-domains-continued-1.html: Added.
  • http/tests/security/resources/credentials-from-different-domains-continued-2.html: Added.
  • http/tests/security/resources/credentials-iframes-continued.html: Added.
  • http/tests/security/resources/credentials-iframes-different-domain.html: Added.
  • http/tests/security/resources/credentials-iframes-same-domain.html: Added.
  • platform/mac-wk1/http: Added.
  • platform/mac-wk1/http/security: Added.
  • platform/mac-wk1/http/security/credentials-iframes-expected.txt: Added.

DumpRenderTree prints out the entire URL of the authentication challenge.
WebKitTestRunner only prints out the host and port.
Both results show the fact that no credentials were sent on the second request.

2:33 PM Changeset in webkit [211750] by Simon Fraser
  • 8 edits in trunk

Safari pages are blank sometimes (missing tiles)
https://bugs.webkit.org/show_bug.cgi?id=167904

Reviewed by Tim Horton.

Source/WebCore:

After r211683 we failed to udpate the "inWindow" flag on the page tiled layer, because
usingTiledBacking() on GraphicsLayer confusingly was false for the page tiled layer.

Fix by removing usingTiledBacking() entirely, and checking for tiledBacking(),
looking at the layer type when necessary.

Tested by tiled-drawing/tiled-backing-in-window.html

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::GraphicsLayer):
(WebCore::GraphicsLayer::setIsInWindowIncludingDescendants): This is the bug fix.
(WebCore::GraphicsLayer::getDebugBorderInfo):
(WebCore::GraphicsLayer::dumpProperties):

  • platform/graphics/GraphicsLayer.h:

(WebCore::GraphicsLayer::usingTiledBacking): Deleted.

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::recursiveCommitChanges):
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::changeLayerTypeTo):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::willDestroyLayer):
(WebCore::RenderLayerBacking::compositingLayerType):

  • rendering/RenderLayerCompositor.cpp: A bit more logging.

(WebCore::RenderLayerCompositor::setIsInWindow):
(WebCore::RenderLayerCompositor::attachRootLayer):

LayoutTests:

New result; this test detected the bug.

  • tiled-drawing/tiled-backing-in-window-expected.txt:
2:20 PM Changeset in webkit [211749] by achristensen@apple.com
  • 1 edit
    1 delete in trunk/Source/ThirdParty/libwebrtc

[WebRTC] Remove unneeded build directory accidentally checked in with libwebrtc source.

Reviewed by Youenn Fablet.

  • third_party/usrsctp/build: Removed.
1:58 PM Changeset in webkit [211748] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Change the CSS animation timer a to be little more than 60fps to ensure we hit that frame rate
https://bugs.webkit.org/show_bug.cgi?id=167825

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-02-06
Reviewed by Simon Fraser.

The system timer fires little bit slower than 60fps. This might cause the
frame to be missed and hence it can lower the frame rate significantly. The
rAF timer was set to 15ms for the same reason. So set the repeated CSS
animation timer also to 15ms.

  • page/animation/CSSAnimationController.cpp:
1:49 PM Changeset in webkit [211747] by andersca@apple.com
  • 12 edits
    1 add in trunk/Source/WebKit2

Crash child processes if they receive an invalid message
https://bugs.webkit.org/show_bug.cgi?id=167900

Reviewed by Dan Bernstein.

Previously, some processes would try to gracefully exit, others would just drop messages leading to weird bugs.
Instead, set app-specific crash information to the message that failed to be decoded, and then crash.

  • DatabaseProcess/DatabaseProcess.cpp:

(WebKit::DatabaseProcess::didReceiveInvalidMessage): Deleted.

  • DatabaseProcess/DatabaseProcess.h:
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::didReceiveInvalidMessage): Deleted.

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

(WebKit::PluginProcess::didReceiveInvalidMessage): Deleted.

  • PluginProcess/PluginProcess.h:
  • Shared/ChildProcess.h:
  • Shared/Cocoa/ChildProcessCocoa.mm: Added.

(WebKit::ChildProcess::didReceiveInvalidMessage):

  • WebKit2.xcodeproj/project.pbxproj:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::didReceiveInvalidMessage): Deleted.

  • WebProcess/WebProcess.h:
1:49 PM Changeset in webkit [211746] by jer.noble@apple.com
  • 14 edits
    10 adds in trunk

Playback stalls when a SourceBuffer append causes frame eviction
https://bugs.webkit.org/show_bug.cgi?id=167834

Reviewed by Eric Carlson.

PerformanceTests:

Add an in-page performance test measuring the amount of time required
to append a large amount of media data to a SourceBuffer, and then to
completely remove that data 30s at a time.

Add a microbenchmark for MediaTime which measures the amount of time
required to create a 1M entry std::map and traverse the map 1M times.

  • Media/MSERemoveCodedFrames.html: Added.
  • Media/media-source-loader.js:

(MediaSourceLoader.prototype.get duration):

  • MediaTime/Configurations/Base.xcconfig: Added.
  • MediaTime/Configurations/DebugRelease.xcconfig: Added.
  • MediaTime/Makefile: Added.
  • MediaTime/MediaTime.xcodeproj/project.pbxproj: Added.
  • MediaTime/main.cpp: Added.

(performTest):
(test):
(main):

  • Skipped:

Source/WebCore:

Test: PerformanceTests/Media/MSERemoveCodedFrames.html

Optimize searching through SampleMap by presentationTime.

Many of the methods exposed by PresentationOrderSampleMap used the bare std::equal_range,
lower_bound, or upper_bound methods. Unlike those methods exposed on std::map, the bare
search methods perform a linear O(n) search, rather than a the binary O(log(n)) search used
by std::map. Rewrite those methods using the bare methods in terms of the std::map search
methods.

Drive-by fix: rename findSampleOnOrAfterPresentationTime to
findSampleStartingOnOrAfterPresentationTime to make the behavior of the method more
explicit.

  • Modules/mediasource/SampleMap.cpp:

(WebCore::PresentationOrderSampleMap::findSampleContainingPresentationTime):
(WebCore::PresentationOrderSampleMap::findSampleStartingOnOrAfterPresentationTime):
(WebCore::PresentationOrderSampleMap::reverseFindSampleBeforePresentationTime):
(WebCore::DecodeOrderSampleMap::findSyncSampleAfterPresentationTime):
(WebCore::PresentationOrderSampleMap::findSamplesBetweenPresentationTimes):
(WebCore::PresentationOrderSampleMap::findSamplesWithinPresentationRange):
(WebCore::PresentationOrderSampleMap::findSampleOnOrAfterPresentationTime): Deleted.

  • Modules/mediasource/SampleMap.h:

(WebCore::PresentationOrderSampleMap::begin):
(WebCore::PresentationOrderSampleMap::end):
(WebCore::PresentationOrderSampleMap::rbegin):
(WebCore::PresentationOrderSampleMap::rend):
(WebCore::DecodeOrderSampleMap::begin):
(WebCore::DecodeOrderSampleMap::end):
(WebCore::DecodeOrderSampleMap::rbegin):
(WebCore::DecodeOrderSampleMap::rend):
(WebCore::SampleMap::SampleMap):
(WebCore::SampleMap::sizeInBytes):
(WebCore::SampleMap::decodeOrder):
(WebCore::SampleMap::presentationOrder):

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::removeSamplesFromTrackBuffer):
(WebCore::SourceBuffer::removeCodedFrames):
(WebCore::SourceBuffer::reenqueueMediaForTime):

  • WebCore.xcodeproj/project.pbxproj:

Source/WTF:

Optimize the MediaTime class; specifically the compare() method. The class only
needs 6 bits to store the TimeFlags, so make that a uint8_t rather than uint32_t.
The implementation is slightly simpler if the TimeScale is unsigned, so make that
a uint32_t rather than int32_t. Inline the comparison operators. Optimize the equality
comparison by bitwise-and'ing the flags together and masking the result. Optimize for
common comparison scenarios (equal timeScales, equal timeValues(), etc.). Attempt the
mathematically simpler simpler method for comparing ratios, and only fall back to the
complex method if the results of multiplying the timeScale by the timeValue overflows.

  • wtf/MediaTime.cpp:

(WTF::greatestCommonDivisor):
(WTF::leastCommonMultiple):
(WTF::signum):
(WTF::MediaTime::MediaTime):
(WTF::MediaTime::createWithFloat):
(WTF::MediaTime::createWithDouble):
(WTF::MediaTime::operator+):
(WTF::MediaTime::operator-):
(WTF::MediaTime::operator!):
(WTF::MediaTime::operator bool):
(WTF::MediaTime::compare):
(WTF::MediaTime::setTimeScale):
(WTF::abs):
(WTF::MediaTime::operator<): Deleted.
(WTF::MediaTime::operator>): Deleted.
(WTF::MediaTime::operator!=): Deleted.
(WTF::MediaTime::operator==): Deleted.
(WTF::MediaTime::operator>=): Deleted.
(WTF::MediaTime::operator<=): Deleted.

  • wtf/MediaTime.h:

Tools:

Add new correctness tests for the Webcore::SampleMap class. Add additional subtests
for the WTF::MediaTime class.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/MediaTime.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebCore/SampleMap.cpp: Added.

(WTF::operator<<):
(TestWebKitAPI::TestSample::create):
(TestWebKitAPI::TestSample::TestSample):
(TestWebKitAPI::TEST_F):

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

Skip media/audio-dealloc-crash.html on ios-simulator.

Unreviewed test gardening.

  • platform/ios-simulator/TestExpectations:
12:18 PM Changeset in webkit [211744] by Chris Dumez
  • 8 edits
    3 deletes in trunk/Source/WebKit2

[WK2] Drop legacy WKBundlePageDiagnosticLoggingClient API
https://bugs.webkit.org/show_bug.cgi?id=167883
<rdar://problem/30376695>

Reviewed by Sam Weinig.

Drop legacy WKBundlePageDiagnosticLoggingClient API as I am not aware of any remaining client.
All clients have now switched to the equivalent UIProcess-side API.

  • WebKit2.xcodeproj/project.pbxproj:
  • WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:

(WKBundlePageSetDiagnosticLoggingClient): Deleted.

  • WebProcess/InjectedBundle/API/c/WKBundlePage.h:
  • WebProcess/InjectedBundle/API/c/WKBundlePageDiagnosticLoggingClient.h: Removed.
  • WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp: Removed.
  • WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.h: Removed.
  • WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:

(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::close):
(WebKit::WebPage::initializeInjectedBundleDiagnosticLoggingClient): Deleted.

  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::injectedBundleUIClient):
(WebKit::WebPage::injectedBundleDiagnosticLoggingClient): Deleted.

12:06 PM Changeset in webkit [211743] by sbarati@apple.com
  • 3 edits in trunk/PerformanceTests

Make ARES-6 work from the CLI again
https://bugs.webkit.org/show_bug.cgi?id=167895

Reviewed by Michael Saboff.

  • ARES-6/driver.js:

(Driver.prototype.readyTrigger):
(Driver.prototype.disableTrigger):

  • ARES-6/stats.js:

(Stats.prototype.toString.span.span):
(Stats.prototype.toString.return.span):
(Stats.prototype.toString):

11:46 AM Changeset in webkit [211742] by Ryan Haddad
  • 2 edits in trunk/Tools

Change capitalization in platform name after r211735.

Unreviewed dashboard fix.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:

(WebKitBuildbot):

11:21 AM Changeset in webkit [211741] by commit-queue@webkit.org
  • 30 edits
    3 moves in trunk/Source

Rename AnimationController to CSSAnimationController
https://bugs.webkit.org/show_bug.cgi?id=167829

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-02-06
Reviewed by Simon Fraser.

Source/WebCore:

AnimationController is a very generic name. The current function of this
class is CSS animation.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::computeRenderStyleForProperty):

  • dom/Document.cpp:
  • history/CachedFrame.cpp:
  • page/Frame.cpp:

(WebCore::Frame::Frame):

  • page/Frame.h:

(WebCore::Frame::animation):

  • page/FrameView.cpp:
  • page/Page.cpp:
  • page/animation/AnimationBase.cpp:
  • page/animation/CSSAnimationController.cpp: Renamed from Source/WebCore/page/animation/AnimationController.cpp.

(WebCore::AnimationPrivateUpdateBlock::AnimationPrivateUpdateBlock):
(WebCore::AnimationPrivateUpdateBlock::~AnimationPrivateUpdateBlock):
(WebCore::CSSAnimationControllerPrivate::CSSAnimationControllerPrivate):
(WebCore::CSSAnimationControllerPrivate::~CSSAnimationControllerPrivate):
(WebCore::CSSAnimationControllerPrivate::ensureCompositeAnimation):
(WebCore::CSSAnimationControllerPrivate::clear):
(WebCore::CSSAnimationControllerPrivate::updateAnimations):
(WebCore::CSSAnimationControllerPrivate::updateAnimationTimerForRenderer):
(WebCore::CSSAnimationControllerPrivate::updateAnimationTimer):
(WebCore::CSSAnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
(WebCore::CSSAnimationControllerPrivate::fireEventsAndUpdateStyle):
(WebCore::CSSAnimationControllerPrivate::startUpdateStyleIfNeededDispatcher):
(WebCore::CSSAnimationControllerPrivate::addEventToDispatch):
(WebCore::CSSAnimationControllerPrivate::addElementChangeToDispatch):
(WebCore::CSSAnimationControllerPrivate::animationFrameCallbackFired):
(WebCore::CSSAnimationControllerPrivate::animationTimerFired):
(WebCore::CSSAnimationControllerPrivate::isRunningAnimationOnRenderer):
(WebCore::CSSAnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer):
(WebCore::CSSAnimationControllerPrivate::suspendAnimations):
(WebCore::CSSAnimationControllerPrivate::resumeAnimations):
(WebCore::CSSAnimationControllerPrivate::animationsAreSuspendedForDocument):
(WebCore::CSSAnimationControllerPrivate::detachFromDocument):
(WebCore::CSSAnimationControllerPrivate::suspendAnimationsForDocument):
(WebCore::CSSAnimationControllerPrivate::resumeAnimationsForDocument):
(WebCore::CSSAnimationControllerPrivate::startAnimationsIfNotSuspended):
(WebCore::CSSAnimationControllerPrivate::setAllowsNewAnimationsWhileSuspended):
(WebCore::CSSAnimationControllerPrivate::pauseAnimationAtTime):
(WebCore::CSSAnimationControllerPrivate::pauseTransitionAtTime):
(WebCore::CSSAnimationControllerPrivate::beginAnimationUpdateTime):
(WebCore::CSSAnimationControllerPrivate::beginAnimationUpdate):
(WebCore::CSSAnimationControllerPrivate::endAnimationUpdate):
(WebCore::CSSAnimationControllerPrivate::receivedStartTimeResponse):
(WebCore::CSSAnimationControllerPrivate::getAnimatedStyleForRenderer):
(WebCore::CSSAnimationControllerPrivate::computeExtentOfAnimation):
(WebCore::CSSAnimationControllerPrivate::numberOfActiveAnimations):
(WebCore::CSSAnimationControllerPrivate::addToAnimationsWaitingForStyle):
(WebCore::CSSAnimationControllerPrivate::removeFromAnimationsWaitingForStyle):
(WebCore::CSSAnimationControllerPrivate::styleAvailable):
(WebCore::CSSAnimationControllerPrivate::addToAnimationsWaitingForStartTimeResponse):
(WebCore::CSSAnimationControllerPrivate::removeFromAnimationsWaitingForStartTimeResponse):
(WebCore::CSSAnimationControllerPrivate::startTimeResponse):
(WebCore::CSSAnimationControllerPrivate::animationWillBeRemoved):
(WebCore::CSSAnimationControllerPrivate::addToAnimationsDependentOnScroll):
(WebCore::CSSAnimationControllerPrivate::removeFromAnimationsDependentOnScroll):
(WebCore::CSSAnimationControllerPrivate::scrollWasUpdated):
(WebCore::CSSAnimationController::CSSAnimationController):
(WebCore::CSSAnimationController::~CSSAnimationController):
(WebCore::CSSAnimationController::cancelAnimations):
(WebCore::CSSAnimationController::updateAnimations):
(WebCore::CSSAnimationController::getAnimatedStyleForRenderer):
(WebCore::CSSAnimationController::computeExtentOfAnimation):
(WebCore::CSSAnimationController::notifyAnimationStarted):
(WebCore::CSSAnimationController::pauseAnimationAtTime):
(WebCore::CSSAnimationController::numberOfActiveAnimations):
(WebCore::CSSAnimationController::pauseTransitionAtTime):
(WebCore::CSSAnimationController::isRunningAnimationOnRenderer):
(WebCore::CSSAnimationController::isRunningAcceleratedAnimationOnRenderer):
(WebCore::CSSAnimationController::isSuspended):
(WebCore::CSSAnimationController::suspendAnimations):
(WebCore::CSSAnimationController::resumeAnimations):
(WebCore::CSSAnimationController::allowsNewAnimationsWhileSuspended):
(WebCore::CSSAnimationController::setAllowsNewAnimationsWhileSuspended):
(WebCore::CSSAnimationController::serviceAnimations):
(WebCore::CSSAnimationController::animationsAreSuspendedForDocument):
(WebCore::CSSAnimationController::detachFromDocument):
(WebCore::CSSAnimationController::suspendAnimationsForDocument):
(WebCore::CSSAnimationController::resumeAnimationsForDocument):
(WebCore::CSSAnimationController::startAnimationsIfNotSuspended):
(WebCore::CSSAnimationController::beginAnimationUpdate):
(WebCore::CSSAnimationController::endAnimationUpdate):
(WebCore::CSSAnimationController::supportsAcceleratedAnimationOfProperty):
(WebCore::CSSAnimationController::wantsScrollUpdates):
(WebCore::CSSAnimationController::scrollWasUpdated):
(WebCore::CSSAnimationController::hasAnimations):

  • page/animation/CSSAnimationController.h: Renamed from Source/WebCore/page/animation/AnimationController.h.

(WebCore::AnimationUpdateBlock::AnimationUpdateBlock):
(WebCore::AnimationUpdateBlock::~AnimationUpdateBlock):

  • page/animation/CSSAnimationControllerPrivate.h: Renamed from Source/WebCore/page/animation/AnimationControllerPrivate.h.

(WebCore::CSSAnimationControllerPrivate::hasAnimations):
(WebCore::CSSAnimationControllerPrivate::isSuspended):
(WebCore::CSSAnimationControllerPrivate::setBeginAnimationUpdateTime):
(WebCore::CSSAnimationControllerPrivate::allowsNewAnimationsWhileSuspended):
(WebCore::CSSAnimationControllerPrivate::wantsScrollUpdates):
(WebCore::CSSAnimationControllerPrivate::scrollPosition):

  • page/animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimationWrapperMap::singleton):

  • page/animation/CompositeAnimation.cpp:

(WebCore::CompositeAnimation::CompositeAnimation):

  • page/animation/CompositeAnimation.h:

(WebCore::CompositeAnimation::create):
(WebCore::CompositeAnimation::animationController):

  • page/animation/ImplicitAnimation.cpp:
  • page/animation/KeyframeAnimation.cpp:
  • page/ios/FrameIOS.mm:
  • platform/graphics/GraphicsLayer.h:
  • rendering/RenderElement.h:
  • rendering/RenderLayer.cpp:
  • rendering/RenderLayerBacking.cpp:
  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::requiresCompositingForAnimation):

  • rendering/RenderObject.cpp:
  • rendering/RenderObject.h:

(WebCore::RenderObject::animation):

  • testing/Internals.cpp:

Source/WebKit/mac:

  • WebView/WebFrame.mm:
  • WebView/WebView.mm:

Source/WebKit/win:

  • WebFrame.cpp:
11:16 AM Changeset in webkit [211740] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Static Analyzer: JSContext.mm: Incorrect decrement of the reference count of an object
https://bugs.webkit.org/show_bug.cgi?id=167848

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-02-06
Reviewed by Saam Barati.

Source/JavaScriptCore/API/JSContext.mm:87:5: warning: Incorrect decrement of the reference count of an object that is not owned at this point by the caller

[self.exceptionHandler release];

1 warning generated.

  • API/JSContext.mm:

(-[JSContext dealloc]):
Use the ivar in dealloc instead of going through the getter.

11:13 AM Changeset in webkit [211739] by Jon Davis
  • 3 edits
    2 adds in trunk/Websites/webkit.org

Add a survey to learn how people use WebKit Nightly builds
https://bugs.webkit.org/show_bug.cgi?id=167748

Reviewed by Joseph Pecoraro.

  • wp-content/themes/webkit/functions.php:
  • wp-content/themes/webkit/nightly-start.php:
  • wp-content/themes/webkit/nightly-survey.php: Added.
  • wp-content/themes/webkit/survey.json: Added.
11:06 AM Changeset in webkit [211738] by Alan Bujtas
  • 11 edits in trunk/Source/WebCore

Simple line layout: Use simplified text measuring when possible.
https://bugs.webkit.org/show_bug.cgi?id=167843
<rdar://problem/30364907>

Reviewed by Antti Koivisto.

This patch adds a simplified version of text width measuring.
Certain type of text runs (no spacing etc) only require a subset of what we
currently do in FontCascade::width().

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::widthForSimpleText):

  • platform/graphics/FontCascade.h:
  • platform/graphics/WidthCache.h:

(WebCore::WidthCache::add):
(WebCore::WidthCache::addSlowCase):

  • platform/graphics/WidthIterator.cpp:

(WebCore::WidthIterator::advanceInternal):

  • rendering/RenderText.cpp:

(WebCore::RenderText::styleDidChange):
(WebCore::RenderText::setRenderedText):
(WebCore::RenderText::computeCanUseSimplifiedTextMeasuring):

  • rendering/RenderText.h:

(WebCore::RenderText::canUseSimplifiedTextMeasuring):

  • rendering/SimpleLineLayoutFlowContents.cpp:

(WebCore::SimpleLineLayout::initializeSegments):

  • rendering/SimpleLineLayoutFlowContents.h:
  • rendering/SimpleLineLayoutTextFragmentIterator.cpp:

(WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragmentIterator):
(WebCore::SimpleLineLayout::TextFragmentIterator::textWidth):

  • rendering/SimpleLineLayoutTextFragmentIterator.h:
10:59 AM Changeset in webkit [211737] by matthew_hanson@apple.com
  • 4 edits in branches/safari-603-branch/Source

Merge r211666. rdar://problem/30167791

10:55 AM Changeset in webkit [211736] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit2

Null check the WebKit::RemoteObjectProxy object before calling it
https://bugs.webkit.org/show_bug.cgi?id=167891
rdar://problem/30229358

Reviewed by Tim Horton.

If a _WKRemoteObjectRegistry invocation reply block outlives its underlying WebKit::RemoteObjectProxy object,
we'll crash trying to send an unused reply to it. Work around this crash by adding a null check before calling
sendUnusedReply.

While this fixes the crash it will lead to leaks in the process that holds on to the reply block. A more long term fix
would be to manage the reply block checkers and call sendUnusedReply when invalidating the _WKRemoteObjectRegistry.

  • Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:

(-[_WKRemoteObjectRegistry _invokeMethod:]):

10:38 AM Changeset in webkit [211735] by ap@apple.com
  • 5 edits in trunk/Tools

Move the Leaks bot to Sierra
https://bugs.webkit.org/show_bug.cgi?id=167886

Reviewed by Daniel Bates.

  • BuildSlaveSupport/build.webkit.org-config/config.json:
  • BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:
  • BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksViewer.js:

(LeaksViewer._displayURLPrompt):

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:

(WebKitBuildbot):

10:35 AM WebKitGTK/2.14.x edited by Michael Catanzaro
(diff)
10:00 AM Changeset in webkit [211734] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

[Soup] Deadlock in NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=167876

Reviewed by Michael Catanzaro.

WebKitSoupRequestInputStream uses a read lock. What is happening is that webkitSoupRequestInputStreamAddData
takes the lock, and it calls webkitSoupRequestInputStreamPendingReadAsyncComplete with the lock help. That
causes webkitSoupRequestInputStreamReadAsync to be called again to read the next chunk, but in the same run loop
operation. We don't really need the read lock because both webkitSoupRequestInputStreamAddData and
webkitSoupRequestInputStreamReadAsync shoudl always be called from the main thread.

  • WebProcess/soup/WebKitSoupRequestInputStream.cpp:

(webkitSoupRequestInputStreamReadAsync): Remove the read lock and assert if called from a secondary thread.
(webkitSoupRequestInputStreamAddData): Ditto.

9:49 AM Changeset in webkit [211733] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

Resource usage overlay should ignore mouse events outside bounds by default
https://bugs.webkit.org/show_bug.cgi?id=167874

Reviewed by Andreas Kling.

It's overriding the default causing that the first click after the overlay is shown is always handled by the
overlay even when clicked outside bounds. It should only be set false while dragging.

  • page/ResourceUsageOverlay.cpp:

(WebCore::ResourceUsageOverlay::initialize):

9:47 AM Changeset in webkit [211732] by Chris Dumez
  • 5 edits
    2 deletes in trunk/LayoutTests/imported/w3c

Re-sync html/browsers/origin/cross-origin-objects tests
https://bugs.webkit.org/show_bug.cgi?id=167881

Reviewed by Youenn Fablet.

Re-sync html/browsers/origin/cross-origin-objects tests from upstream a052787d.

  • web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-exceptions-expected.txt: Removed.
  • web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-exceptions.html: Removed.
  • web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-expected.txt:
  • web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects.html:
  • web-platform-tests/html/browsers/origin/cross-origin-objects/frame.html:
  • web-platform-tests/html/browsers/origin/cross-origin-objects/w3c-import.log:
9:36 AM Changeset in webkit [211731] by Ryan Haddad
  • 2 edits in trunk/PerformanceTests

Skip ARES-6 on performance bots
https://bugs.webkit.org/show_bug.cgi?id=167863

Unreviewed test gardening.

ES6SampleBench was renamed to ARES-6, so this should be updated in PerformanceTests/Skipped as well.

  • Skipped:
9:35 AM Changeset in webkit [211730] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

CrashTracer: com.apple.WebKit.WebContent at WebCore: WebCore::Node::invalidateStyle
https://bugs.webkit.org/show_bug.cgi?id=167878
rdar://problem/30251840

Reviewed by Andreas Kling.

Speculative fix.

We are trying to invalidate a null node from ~PostResolutionCallbackDisabler. Looks like the only way
this could happen is if HTMLFrameOwnerElement::scheduleinvalidateStyleAndLayerComposition is called
with null 'this'. There is one place where this might happen.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::attachRootLayer): Add null check.

9:28 AM Changeset in webkit [211729] by Ryan Haddad
  • 11 edits
    2 deletes in trunk

Unreviewed, rolling out r211722.

This change introduced a LayoutTest failure on mac-wk2.

Reverted changeset:

"[Modern Media Controls] Improve handling of <video> with only
audio tracks"
https://bugs.webkit.org/show_bug.cgi?id=167836
http://trac.webkit.org/changeset/211722

9:22 AM Changeset in webkit [211728] by eric.carlson@apple.com
  • 19 edits
    2 adds in trunk/Source/WebCore

[MediaStream Mac] Stop using AVSampleBufferAudioRenderer
https://bugs.webkit.org/show_bug.cgi?id=167821

Reviewed by Jer Noble.

  • WebCore.xcodeproj/project.pbxproj: Add new files.
  • platform/audio/mac/AudioSampleDataSource.cpp:

(WebCore::AudioSampleDataSource::pullSamplesInternal): Don't assume the first timestamp from the
render proc after a pause is zero.

Stop using an audio renderer for each audio track. No audio renderers means we don't need to use
an AVSampleBufferRenderSynchronizer.

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

(-[WebAVSampleBufferStatusChangeListener invalidate]): No more audio renderers.
(-[WebAVSampleBufferStatusChangeListener observeValueForKeyPath:ofObject:change:context:]): Ditto.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC): Ditto.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::~MediaPlayerPrivateMediaStreamAVFObjC): Pause

audio tracks explicitly.

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::audioSourceProvider): Remove the existing code,

it was incorrect and not thread safe.

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::flushRenderers): No more audio renderers.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayer): No more render synchronizer.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::destroyLayer): Ditto.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::play): Start each audio track.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pause): Pause each audio track.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVolume): Pass the command to each audio track.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setMuted): Ditto.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::streamTime): No more render synchronizer.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::sampleBufferUpdated): Don't handle audio samples.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateTracks): Update for audio track class change. No
more render synchronizer.
(-[WebAVSampleBufferStatusChangeListener beginObservingRenderer:]): Deleted.
(-[WebAVSampleBufferStatusChangeListener stopObservingRenderer:]): Deleted.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueAudioSample): Deleted.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::requestNotificationWhenReadyForAudioData): Deleted.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::createAudioRenderer): Deleted.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::destroyAudioRenderer): Deleted.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::destroyAudioRenderers): Deleted.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::rendererStatusDidChange): Deleted.

  • platform/mediastream/AudioTrackPrivateMediaStream.h:
  • platform/mediastream/MediaStreamTrackPrivate.cpp:

(WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate): add/removeObserver takes a reference,
not a pointer.
(WebCore::MediaStreamTrackPrivate::~MediaStreamTrackPrivate): Ditto.
(WebCore::MediaStreamTrackPrivate::videoSampleAvailable): Renamed from sourceHasMoreMediaData.
(WebCore::MediaStreamTrackPrivate::sourceHasMoreMediaData): Deleted.

  • platform/mediastream/MediaStreamTrackPrivate.h:
  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::addObserver): Take a reference, not a pointer.
(WebCore::RealtimeMediaSource::removeObserver): Ditto.
(WebCore::RealtimeMediaSource::videoSampleAvailable): Renamed from mediaDataUpdated.
(WebCore::RealtimeMediaSource::audioSamplesAvailable): New.
(WebCore::RealtimeMediaSource::stop): Drive-by cleanup.
(WebCore::RealtimeMediaSource::requestStop): Ditto.
(WebCore::RealtimeMediaSource::mediaDataUpdated): Deleted.

  • platform/mediastream/RealtimeMediaSource.h:
  • platform/mediastream/mac/AVAudioCaptureSource.h:
  • platform/mediastream/mac/AVAudioCaptureSource.mm:

(WebCore::AVAudioCaptureSource::AVAudioCaptureSource):
(WebCore::AVAudioCaptureSource::addObserver):
(WebCore::AVAudioCaptureSource::shutdownCaptureSession):
(WebCore::AVAudioCaptureSource::captureOutputDidOutputSampleBufferFromConnection):
(WebCore::operator==): Deleted.
(WebCore::operator!=): Deleted.

  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoCaptureSource::processNewFrame): Call videoSampleAvailable, not mediaDataUpdated.

Render audio with a CoreAudio output unit.

  • platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp: Added.

(WebCore::AudioTrackPrivateMediaStreamCocoa::AudioTrackPrivateMediaStreamCocoa):
(WebCore::AudioTrackPrivateMediaStreamCocoa::~AudioTrackPrivateMediaStreamCocoa):
(WebCore::AudioTrackPrivateMediaStreamCocoa::playInternal):
(WebCore::AudioTrackPrivateMediaStreamCocoa::play):
(WebCore::AudioTrackPrivateMediaStreamCocoa::pause):
(WebCore::AudioTrackPrivateMediaStreamCocoa::setVolume):
(WebCore::AudioTrackPrivateMediaStreamCocoa::setupAudioUnit):
(WebCore::AudioTrackPrivateMediaStreamCocoa::audioSamplesAvailable):
(WebCore::AudioTrackPrivateMediaStreamCocoa::sourceStopped):
(WebCore::AudioTrackPrivateMediaStreamCocoa::render):
(WebCore::AudioTrackPrivateMediaStreamCocoa::inputProc):

  • platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.h: Added.
  • platform/mediastream/mac/MockRealtimeAudioSourceMac.h:
  • platform/mediastream/mac/MockRealtimeAudioSourceMac.mm:

(WebCore::alignTo16Bytes):
(WebCore::MockRealtimeAudioSourceMac::emitSampleBuffers):
(WebCore::MockRealtimeAudioSourceMac::reconfigure): Minor cleanup.
(WebCore::MockRealtimeAudioSourceMac::render): Ditto.

  • platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:

(WebCore::MockRealtimeVideoSourceMac::updateSampleBuffer): Call videoSampleAvailable, not mediaDataUpdated.

  • platform/mediastream/mac/WebAudioSourceProviderAVFObjC.h:
  • platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm:

(WebCore::WebAudioSourceProviderAVFObjC::~WebAudioSourceProviderAVFObjC):
(WebCore::WebAudioSourceProviderAVFObjC::provideInput): Use a mutex. Get rid of m_writeAheadCount,
it is always 0.
(WebCore::WebAudioSourceProviderAVFObjC::prepare): Use a lock.
(WebCore::WebAudioSourceProviderAVFObjC::unprepare): Ditto.
(WebCore::WebAudioSourceProviderAVFObjC::process): Ditto.

  • platform/mock/MockRealtimeAudioSource.h:

(WebCore::MockRealtimeAudioSource::renderInterval): Decrease the render interval.

9:17 AM WebKitGTK/2.14.x edited by Michael Catanzaro
(diff)
9:07 AM Changeset in webkit [211727] by matthew_hanson@apple.com
  • 11 edits
    2 adds in branches/safari-603-branch

Merge r211653. rdar://problem/29872943

8:54 AM Changeset in webkit [211726] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit2

Guard and unguard ports in a much less intrusive way
https://bugs.webkit.org/show_bug.cgi?id=167813

Reviewed by Sam Weinig.

Instead of adopting mach_port_construct/mach_port_destruct, just guard and unguard the ports where appropriate.

  • Platform/IPC/mac/ConnectionMac.mm:

(IPC::Connection::platformInitialize):
(IPC::Connection::open):

8:21 AM Changeset in webkit [211725] by Jonathan Bedard
  • 3 edits in trunk/Tools

Prevent app crash on launch during simctl install workaround
https://bugs.webkit.org/show_bug.cgi?id=167685

Reviewed by Daniel Bates.

  • Scripts/webkitpy/port/simulator_process.py:

(SimulatorProcess.init): Pass environment to install.

  • Scripts/webkitpy/xcode/simulator.py:

(Device.install_app): Accept environment, pass environment to launch.

8:19 AM Changeset in webkit [211724] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

[Modern Media Controls] Add a backdrop filter to the start button on macOS
https://bugs.webkit.org/show_bug.cgi?id=167879
<rdar://problem/30375174>

Patch by Antoine Quint <Antoine Quint> on 2017-02-06
Reviewed by Eric Carlson.

Source/WebCore:

Add a backdrop filter to the start button on macOS.

Test: media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-start-button-style.html

  • Modules/modern-media-controls/controls/macos-inline-media-controls.css:

(.media-controls.mac.inline > button.start > div):

LayoutTests:

Add a new test that checks that the expected backdrop filter is applied to the start button on macOS.

  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-start-button-style-expected.txt: Added.
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-start-button-style.html: Added.
8:16 AM Changeset in webkit [211723] by commit-queue@webkit.org
  • 22 edits
    4 copies
    10 adds in trunk

[Modern Media Controls] Bring fullscreen controls up to spec
https://bugs.webkit.org/show_bug.cgi?id=167875
<rdar://problem/29611222>

Patch by Antoine Quint <Antoine Quint> on 2017-02-06
Reviewed by Eric Carlson.

Source/WebCore:

We update the fullscreen PiP icon to have the correct size and add two new buttons
around the volume slider, "volume-down" to bring the volume to 0 and "volume-up"
to bring the volume to 1.

To accomodate the new volume buttons, we move the volume slider inside an additional
ButtonsContainer object, along with the two new buttons.

Tests: media/modern-media-controls/volume-down-support/volume-down-support.html

media/modern-media-controls/volume-up-support/volume-up-support.html

  • Modules/modern-media-controls/controls/icon-service.js:
  • Modules/modern-media-controls/controls/macos-fullscreen-media-controls.css:

(.media-controls.mac.fullscreen button.volume-down):
(.media-controls.mac.fullscreen button.volume-up):

  • Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js:
  • Modules/modern-media-controls/controls/volume-down-button.js: Added.

(VolumeDownButton):

  • Modules/modern-media-controls/controls/volume-slider.js:

(VolumeSlider):

  • Modules/modern-media-controls/controls/volume-up-button.js: Added.

(VolumeUpButton):

(MediaController.prototype._updateControlsIfNeeded):

  • Modules/modern-media-controls/media/volume-down-support.js: Added.

(VolumeDownSupport.prototype.get control):
(VolumeDownSupport.prototype.buttonWasPressed):
(VolumeDownSupport):

  • Modules/modern-media-controls/media/volume-up-support.js: Added.

(VolumeUpSupport.prototype.get control):
(VolumeUpSupport.prototype.buttonWasPressed):
(VolumeUpSupport):

  • WebCore.xcodeproj/project.pbxproj:

LayoutTests:

Rebaseline some existing tests due to the addition of the volume-down and volume-up
buttons as well as the width change of the PiP icon and add a couple of new tests to
check the behavior of the volume-down and volume-up buttons.

  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-volume-styles-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-volume-styles.html:
  • media/modern-media-controls/media-controller/media-controller-fullscreen-ltr.html:
  • media/modern-media-controls/volume-down-support/volume-down-support-expected.txt: Added.
  • media/modern-media-controls/volume-down-support/volume-down-support.html: Added.
  • media/modern-media-controls/volume-up-support/volume-up-support-expected.txt: Added.
  • media/modern-media-controls/volume-up-support/volume-up-support.html: Added.
  • platform/ios-simulator/TestExpectations:
8:09 AM WebKitGTK/2.14.x edited by Michael Catanzaro
(diff)
5:48 AM Changeset in webkit [211722] by commit-queue@webkit.org
  • 11 edits
    2 adds in trunk

[Modern Media Controls] Improve handling of <video> with only audio tracks
https://bugs.webkit.org/show_bug.cgi?id=167836
<rdar://problem/30255812>

Patch by Antoine Quint <Antoine Quint> on 2017-02-06
Reviewed by Dean Jackson.

Source/WebCore:

We now check for the availability of video tracks before considering a <video>
element is displaying an actual video file and turning auto-hide on. We also
check that we have video tracks before enabling the fullscreen button. This
brings the behavior of a <video> pointing to a resource with no video tracks
to be the same as an <audio> element.

Test: media/modern-media-controls/media-controller/media-controller-video-with-only-audio.html

  • Modules/modern-media-controls/media/controls-visibility-support.js:

(ControlsVisibilitySupport.prototype.get tracksToMonitor):
(ControlsVisibilitySupport.prototype._updateControls):
(ControlsVisibilitySupport):

  • Modules/modern-media-controls/media/fullscreen-support.js:

(FullscreenSupport.prototype.syncControl):
(FullscreenSupport):

LayoutTests:

Add a new test to check that a <video> with a resource that only has audio tracks
does not auto-hide nor show the fullscreen button. We also rebaseline a few existing
tests for this change of behavior.

  • fast/regions/inline-block-inside-anonymous-overflow-with-covered-controls-expected.html:
  • fast/regions/inline-block-inside-anonymous-overflow-with-covered-controls.html:
  • media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-on-expected.txt:
  • media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-on.html:
  • media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-toggle-expected.txt:
  • media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-toggle.html:
  • media/modern-media-controls/media-controller/media-controller-video-with-only-audio-expected.txt: Added.
  • media/modern-media-controls/media-controller/media-controller-video-with-only-audio.html: Added.
  • media/modern-media-controls/time-label/time-label-white-space-nowrap.html:
4:22 AM Changeset in webkit [211721] by magomez@igalia.com
  • 3 edits in trunk/Source/WebKit2

[GTK][EFL] Release unused UpdateAtlas when in memory pressure situation
https://bugs.webkit.org/show_bug.cgi?id=167872

Reviewed by Carlos Garcia Campos.

In a memory pressure situation, release all the unused UpdateAtlas as soon as possible, instead
of waiting 3 seconds before releasing them.

  • WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:

(WebKit::CompositingCoordinator::releaseInactiveAtlasesTimerFired):
(WebKit::CompositingCoordinator::releaseAtlases):

  • WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
3:15 AM Changeset in webkit [211720] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: sibling elements's disclosure triangles aren't vertically aligned in DOM tree outline in certain ports
https://bugs.webkit.org/show_bug.cgi?id=167568

Patch by Fujii Hironori <Fujii Hironori> on 2017-02-06
Reviewed by Brian Burg.

The triangle has 13px height and has float:left. If the line-height
is smaller than 13px, the sibling element's triangles aren't
vertically aligned.

  • UserInterface/Views/DOMTreeOutline.css:

(.tree-outline.dom li.parent): Set line-height 13px explicitly.

1:28 AM Changeset in webkit [211719] by achristensen@apple.com
  • 2 edits in trunk/Tools

Rebase API tests after r211638
https://bugs.webkit.org/show_bug.cgi?id=167779

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):
URLs with non-special schemes and characters like % in the host now fail to parse,
more like their special counterparts and according to spec.

12:51 AM Changeset in webkit [211718] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Fix WinCairo build after r211681
https://bugs.webkit.org/show_bug.cgi?id=167096

  • platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp:

Include some necessary GLES headers.

12:35 AM Changeset in webkit [211717] by Csaba Osztrogonác
  • 2 edits in trunk/Tools

Unreviewed trivial fix after r211697.
https://bugs.webkit.org/show_bug.cgi?id=167863

  • Scripts/run-javascriptcore-tests:

(runJSCStressTests): Renamed ES6SampleBench to ARES-6.

Feb 5, 2017:

10:23 PM Changeset in webkit [211716] by Wenson Hsieh
  • 3 edits in trunk/Source/WebCore

Data interaction fails in Safari splitscreen mode when dropping into a contenteditable
https://bugs.webkit.org/show_bug.cgi?id=167862
<rdar://problem/30368405>

Reviewed by Tim Horton.

Adds a counter to WebItemProviderPasteboard that can incremented, decremented, and queried by clients.

  • platform/ios/WebItemProviderPasteboard.h:
  • platform/ios/WebItemProviderPasteboard.mm:

(-[WebItemProviderPasteboard init]):
(-[WebItemProviderPasteboard hasPendingOperation]):
(-[WebItemProviderPasteboard incrementPendingOperationCount]):
(-[WebItemProviderPasteboard decrementPendingOperationCount]):

10:17 PM Changeset in webkit [211715] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/LayoutTests

Merge r211523. rdar://problem/29453068

10:17 PM Changeset in webkit [211714] by matthew_hanson@apple.com
  • 22 edits in branches/safari-603-branch/Source

Merge r211482. rdar://problem/29711409

10:17 PM Changeset in webkit [211713] by matthew_hanson@apple.com
  • 6 edits
    2 adds in branches/safari-603-branch

Merge r211504. rdar://problem/30301117

10:17 PM Changeset in webkit [211712] by matthew_hanson@apple.com
  • 3 edits
    2 adds in branches/safari-603-branch

Merge r211659. rdar://problem/28725791

10:17 PM Changeset in webkit [211711] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebCore

Merge r211676. rdar://problem/30229990

10:17 PM Changeset in webkit [211710] by matthew_hanson@apple.com
  • 13 edits in branches/safari-603-branch/Source

Merge r211569. rdar://problem/30229990

10:17 PM Changeset in webkit [211709] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebKit2

Merge r211565. rdar://problem/28896113

10:17 PM Changeset in webkit [211708] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebKit2

Merge r211628. rdar://problem/26685576

10:17 PM Changeset in webkit [211707] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebKit2

Merge r211626. rdar://problem/26685576

10:17 PM Changeset in webkit [211706] by matthew_hanson@apple.com
  • 14 edits
    1 copy
    2 moves
    1 add in branches/safari-603-branch/Source

Merge r211551. rdar://problem/26685576

10:17 PM Changeset in webkit [211705] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/JavaScriptCore

Merge r211630. rdar://problem/30318237

10:17 PM Changeset in webkit [211704] by matthew_hanson@apple.com
  • 7 edits in branches/safari-603-branch/Source/JavaScriptCore

Merge r211658. rdar://problem/29144126

9:51 PM Changeset in webkit [211703] by matthew_hanson@apple.com
  • 5 edits in branches/safari-603-branch

Merge r211446. rdar://problem/30273885

9:50 PM Changeset in webkit [211702] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebCore

Merge r211455. rdar://problem/30241193

9:25 PM Changeset in webkit [211701] by matthew_hanson@apple.com
  • 21 edits
    5 adds in branches/safari-603-branch

Merge r211656. rdar://problem/30102568

9:25 PM Changeset in webkit [211700] by matthew_hanson@apple.com
  • 15 edits
    2 moves
    2 adds
    1 delete in branches/safari-603-branch/LayoutTests

Merge r211616. rdar://problem/30060142

9:25 PM Changeset in webkit [211699] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebKit/win

Merge r211584. rdar://problem/29994156

9:25 PM Changeset in webkit [211698] by matthew_hanson@apple.com
  • 6 edits
    1 add in branches/safari-603-branch

Merge r211207. rdar://problem/30154036

8:56 PM Changeset in webkit [211697] by fpizlo@apple.com
  • 7 edits
    1 move
    3 adds
    1 delete in trunk/PerformanceTests

Change ES6SampleBench into ARES-6
https://bugs.webkit.org/show_bug.cgi?id=167863

Rubber stamped by Saam Barati.

This imports changes that Jonathan Davis (Jon Davis) made to ES6SampleBench to make it look
super awesome. Its now called ARES-6.

  • ARES-6: Copied from PerformanceTests/ES6SampleBench.
  • ARES-6/ARES-6.svg: Added.
  • ARES-6/driver.js:

(Driver):
(Driver.prototype.readyTrigger):
(Driver.prototype.disableTrigger):
(Driver.prototype.start):
(Driver.prototype._updateIterations):

  • ARES-6/glue.js:
  • ARES-6/index.html:
  • ARES-6/results.js:

(Results.prototype.reportRunning):
(Results.prototype.reportDone):

  • ARES-6/stats.js:

(Stats.prototype.toString.return.span):
(Stats.prototype.toString.span.span):
(Stats.prototype.toString): Deleted.

  • ARES-6/style.css: Removed.
  • ARES-6/styles.css: Added.

(html):
(body):
(header,):
(p a):
(p a:hover):
(.flip):
(header):
(h2,):
(p):
(.about h2):
(.logo):
(.start):
(.start.ready):
(.start.ready:hover):
(.start:after):
(.start.ready .testrun):
(.tests):
(.test):
(.overall h2,):
(.test .indicator):
(.test .indicator.running):
(@keyframes test-running):
(100%):
(.score):
(.score label):
(.score .value):
(.score .units):
(.score .margin):
(.overall):
(.overall .score):
(.overall .margin):
(.testing, .about):
(.testing):
(.about):
(#about:target):
(@media only screen and (max-width: 784px)):

  • ARES-6/swoop.svg: Added.
  • ES6SampleBench: Removed.
  • ES6SampleBench/Air: Removed.
  • ES6SampleBench/Air/README.md: Removed.
  • ES6SampleBench/Air/airjs-tests.yaml: Removed.
  • ES6SampleBench/Air/all.js: Removed.
  • ES6SampleBench/Air/allocate_stack.js: Removed.
  • ES6SampleBench/Air/arg.js: Removed.
  • ES6SampleBench/Air/basic_block.js: Removed.
  • ES6SampleBench/Air/benchmark.js: Removed.
  • ES6SampleBench/Air/code.js: Removed.
  • ES6SampleBench/Air/custom.js: Removed.
  • ES6SampleBench/Air/frequented_block.js: Removed.
  • ES6SampleBench/Air/insertion_set.js: Removed.
  • ES6SampleBench/Air/inst.js: Removed.
  • ES6SampleBench/Air/liveness.js: Removed.
  • ES6SampleBench/Air/make_dist.sh: Removed.
  • ES6SampleBench/Air/opcode.js: Removed.
  • ES6SampleBench/Air/payload-airjs-ACLj8C.js: Removed.
  • ES6SampleBench/Air/payload-gbemu-executeIteration.js: Removed.
  • ES6SampleBench/Air/payload-imaging-gaussian-blur-gaussianBlur.js: Removed.
  • ES6SampleBench/Air/payload-typescript-scanIdentifier.js: Removed.
  • ES6SampleBench/Air/reg.js: Removed.
  • ES6SampleBench/Air/stack_slot.js: Removed.
  • ES6SampleBench/Air/stress-test.js: Removed.
  • ES6SampleBench/Air/strip-hash.rb: Removed.
  • ES6SampleBench/Air/symbols.js: Removed.
  • ES6SampleBench/Air/test.html: Removed.
  • ES6SampleBench/Air/test.js: Removed.
  • ES6SampleBench/Air/tmp.js: Removed.
  • ES6SampleBench/Air/tmp_base.js: Removed.
  • ES6SampleBench/Air/util.js: Removed.
  • ES6SampleBench/Basic: Removed.
  • ES6SampleBench/Basic/ast.js: Removed.
  • ES6SampleBench/Basic/basic-tests.yaml: Removed.
  • ES6SampleBench/Basic/basic.js: Removed.
  • ES6SampleBench/Basic/benchmark.js: Removed.
  • ES6SampleBench/Basic/caseless_map.js: Removed.
  • ES6SampleBench/Basic/lexer.js: Removed.
  • ES6SampleBench/Basic/number.js: Removed.
  • ES6SampleBench/Basic/parser.js: Removed.
  • ES6SampleBench/Basic/random.js: Removed.
  • ES6SampleBench/Basic/state.js: Removed.
  • ES6SampleBench/Basic/stress-test.js: Removed.
  • ES6SampleBench/Basic/test.html: Removed.
  • ES6SampleBench/Basic/test.js: Removed.
  • ES6SampleBench/Basic/util.js: Removed.
  • ES6SampleBench/air_benchmark.js: Removed.
  • ES6SampleBench/basic_benchmark.js: Removed.
  • ES6SampleBench/cli.js: Removed.
  • ES6SampleBench/driver.js: Removed.
  • ES6SampleBench/glue.js: Removed.
  • ES6SampleBench/index.html: Removed.
  • ES6SampleBench/results.js: Removed.
  • ES6SampleBench/stats.js: Removed.
  • ES6SampleBench/style.css: Removed.
8:03 PM Changeset in webkit [211696] by matthew_hanson@apple.com
  • 5 edits
    2 adds in branches/safari-603-branch

Merge r211541. rdar://problem/30100286

8:03 PM Changeset in webkit [211695] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebKit2

Merge r211538. rdar://problem/30229620

8:03 PM Changeset in webkit [211694] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Tools

Merge r211526. rdar://problem/30301498

8:03 PM Changeset in webkit [211693] by matthew_hanson@apple.com
  • 3 edits in branches/safari-603-branch/Source/JavaScriptCore

Merge r211486. rdar://problem/30167791

8:03 PM Changeset in webkit [211692] by matthew_hanson@apple.com
  • 5 edits
    2 adds in branches/safari-603-branch

Merge r211471. rdar://problem/30270210

8:03 PM Changeset in webkit [211691] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/JavaScriptCore

Merge r211463. rdar://problem/30296879

8:03 PM Changeset in webkit [211690] by matthew_hanson@apple.com
  • 3 edits
    2 adds in branches/safari-603-branch

Merge r211433. rdar://problem/30091558

8:03 PM Changeset in webkit [211689] by matthew_hanson@apple.com
  • 4 edits in branches/safari-603-branch/LayoutTests

Merge r211302. rdar://problem/23601055

3:04 PM Changeset in webkit [211688] by Simon Fraser
  • 7 edits in trunk/Source

Remove unparentsOffscreenTiles logic in TileController
https://bugs.webkit.org/show_bug.cgi?id=167823

Reviewed by Tim Horton.
Source/WebCore:

Give all TileGrids the "unparents offscreen tiles" behavior. This was enabled for
only the page tiles in WK2 on Mac and iOS, but there's no reason to not use it for
tiled composited layers also.

Also use more modern C++ idioms in a few places.

  • platform/graphics/TiledBacking.h:
  • platform/graphics/ca/TileController.h:
  • platform/graphics/ca/TileGrid.cpp:

(WebCore::TileGrid::revalidateTiles):
(WebCore::TileGrid::ensureTilesForRect):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::RenderLayerBacking):

Source/WebKit2:

Drive-by fix: make sure we put the tiled scrolling indicator's layer back when switching tabs.

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::updateRootLayers):

12:55 PM Changeset in webkit [211687] by commit-queue@webkit.org
  • 7 edits
    3 adds in trunk

[Modern Media Controls] PiP button is not visible with a live broadcast video
https://bugs.webkit.org/show_bug.cgi?id=167794
<rdar://problem/30348790>

Patch by Antoine Quint <Antoine Quint> on 2017-02-05
Reviewed by Dean Jackson.

Source/WebCore:

We were only listening to the "loadedmetadata", "error", "webkitpresentationmodechanged"
and "webkitcurrentplaybacktargetiswirelesschanged" events to invalidate the enabled state
for the PiP button. We also need to check availability of video tracks, which we already
did for fullscreen, which is quite similar.

So we now listen to "addtrack", "removetrack" and "change" events on the media.videoTracks
property, which correctly invalidates the PiP button when the first video track becomes
available or the last video track is removed.

Since a couple of other MediaControllerSupport subclasses (FullscreenSupport and TracksSupport)
would also listen to those events on various track types, we add a new "tracksToMonitor"
property on MediaControllerSupport which subclasses can override to provide a list of tracks
that should listen to those events. This removes the need for dedicated construction and
destruction time in MediaControllerSupport subclasses that need to listen to events on
tracks rather than the media itself.

Test: http/tests/media/modern-media-controls/pip-support/pip-support-live-broadcast.html

  • Modules/modern-media-controls/media/fullscreen-support.js:

(FullscreenSupport):
(FullscreenSupport.prototype.get tracksToMonitor):
(FullscreenSupport.prototype.destroy): Deleted.

  • Modules/modern-media-controls/media/media-controller-support.js:

(MediaControllerSupport):
(MediaControllerSupport.prototype.destroy):
(MediaControllerSupport.prototype.get tracksToMonitor):

  • Modules/modern-media-controls/media/pip-support.js:

(PiPSupport.prototype.get tracksToMonitor):

  • Modules/modern-media-controls/media/tracks-support.js:

(TracksSupport):
(TracksSupport.prototype.get tracksToMonitor):
(TracksSupport.prototype.destroy): Deleted.

LayoutTests:

Add a new test to check that a live broadcast video shows the picture-in-picture button.

  • http/tests/media/modern-media-controls/pip-support/pip-support-live-broadcast-expected.txt: Added.
  • http/tests/media/modern-media-controls/pip-support/pip-support-live-broadcast.html: Added.
  • platform/mac/TestExpectations:
12:41 PM Changeset in webkit [211686] by Alan Bujtas
  • 1 edit
    1 add in trunk/PerformanceTests

Simple line layout: Add performance test with varying string and font-size to minimize width-cache hit.
https://bugs.webkit.org/show_bug.cgi?id=167859
<rdar://problem/30368070>

Reviewed by Antti Koivisto.

This is in preparation for webkit.org/b/167843.

  • Layout/simple-line-layout-with-varying-content.html: Added.
12:40 PM Changeset in webkit [211685] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

[Modern Media Controls] Time labels may wrap instead of displaying on a single line
https://bugs.webkit.org/show_bug.cgi?id=167835
<rdar://problem/30340534>

Patch by Antoine Quint <Antoine Quint> on 2017-02-05
Reviewed by Dean Jackson.

Source/WebCore:

No text in modern media controls is expected to wrap, so let's prevent any wrapping.

Test: media/modern-media-controls/time-label/time-label-white-space-nowrap.html

  • Modules/modern-media-controls/controls/media-controls.css:

(.media-controls):

LayoutTests:

New test that checks that time labels have "white-space: nowrap" applied.

  • media/modern-media-controls/time-label/time-label-white-space-nowrap-expected.txt: Added.
  • media/modern-media-controls/time-label/time-label-white-space-nowrap.html: Added.
11:26 AM Changeset in webkit [211684] by mark.lam@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

The VMInspector should use an RAII Locker.
https://bugs.webkit.org/show_bug.cgi?id=167854

Reviewed by Saam Barati.

Previously, VMInspector::lock() was returning an expected LockToken, and there's
no way to unlock it when we're done with it. This was not a problem before
because the VMInspector had only one client, the SigillCrashAnalyzer, that
expected the process to crash due to a SIGILL shortly thereafter.

However, the VMInspector is useful as a debugging tool that we can apply in other
debugging tasks. Fixing VMInspector::lock() to return an RAII locker will enable
other use cases. Plus it's just bad form to be able to lock something and never
be able to unlock it.

  • tools/SigillCrashAnalyzer.cpp:

(JSC::SigillCrashAnalyzer::analyze):

  • tools/VMInspector.cpp:
  • tools/VMInspector.h:
11:18 AM Changeset in webkit [211683] by Simon Fraser
  • 19 edits
    5 adds in trunk

Clean up how GraphicsLayer's "inWindow" state is set, and fix some issues with Page Overlays
https://bugs.webkit.org/show_bug.cgi?id=167850

Reviewed by Tim Horton.
Source/WebCore:

RenderLayerCompositor::setIsInWindowForLayerIncludingDescendants() walked the RenderLayer
tree to set the GraphicsLayer's "inWindow" state. This had the problem of skipping non-primary
GraphicsLayers. We also never did this work for page overlay layers.

Fix by giving GraphicsLayers a recursive function that sets the inWindow state, and call that
from RenderLayerCompositor::setIsInWindow() and PageOverlayController.

PageOverlayController also needs to implement tiledBackingUsageChanged so that tiled backings
created dynamically get the correct in-window state.

Page overlays also had some serious issues in MiniBrowser, in that they disappeared on reload,
and on hide/show web view. This was because the overlay root layers were re-parented, but
addChild() for each overlay's layer wasn't called. Clean up by replacing willAttachRootLayer() followed
by viewOverlayRootLayer()/documentOverlayRootLayer() with single calls that set up the layers,
update the inWindow state, and return the layer.

Make it possible to dump tile caches in page overlay tests.

Make showGraphicsLayers() always dump page overlay layers (source of much confusion).

Test: pageoverlay/overlay-remove-reinsert-view.html

  • page/PageOverlayController.cpp:

(WebCore::PageOverlayController::documentOverlayRootLayer):
(WebCore::PageOverlayController::viewOverlayRootLayer):
(WebCore::PageOverlayController::layerWithDocumentOverlays):
(WebCore::PageOverlayController::layerWithViewOverlays):
(WebCore::PageOverlayController::tiledBackingUsageChanged):
(WebCore::PageOverlayController::willAttachRootLayer): Deleted.

  • page/PageOverlayController.h:
  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::setIsInWindowIncludingDescendants):
(WebCore::dumpChildren):

  • platform/graphics/GraphicsLayer.h:
  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
(WebCore::RenderLayerCompositor::setIsInWindow):
(WebCore::RenderLayerCompositor::attachRootLayer):
(WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):
(WebCore::RenderLayerCompositor::setIsInWindowForLayerIncludingDescendants): Deleted.

  • rendering/RenderLayerCompositor.h:
  • testing/Internals.cpp:

(WebCore::toLayerTreeFlags):
(WebCore::Internals::layerTreeAsText):
(WebCore::Internals::pageOverlayLayerTreeAsText):

  • testing/Internals.h:
  • testing/Internals.idl:
  • testing/MockPageOverlayClient.cpp:

(WebCore::MockPageOverlayClient::layerTreeAsText):

  • testing/MockPageOverlayClient.h:

Tools:

  • DumpRenderTree/TestRunner.cpp:

(TestRunner::uiScriptDidComplete): Fix an assertion that fires for non-16-bit strings.

LayoutTests:

  • pageoverlay/overlay-large-document-expected.txt:
  • pageoverlay/overlay-large-document-scrolled-expected.txt:
  • pageoverlay/overlay-remove-reinsert-view-expected.txt: Added.
  • pageoverlay/overlay-remove-reinsert-view.html: Added.
  • platform/ios-simulator-wk2/pageoverlay/overlay-remove-reinsert-view-expected.txt: Added.
  • platform/mac-wk1/pageoverlay/overlay-remove-reinsert-view-expected.txt: Added.
  • tiled-drawing/tiled-backing-in-window-expected.txt:
10:01 AM Changeset in webkit [211682] by Alan Bujtas
  • 3 edits
    2 adds in trunk

Simple line layout: Use RenderText::canUseSimpleFontCodePath() only as a hint.
https://bugs.webkit.org/show_bug.cgi?id=167853
<rdar://problem/30367302>

Reviewed by Simon Fraser.

Source/WebCore:

Apparently RenderText::canUseSimpleFontCodePath() only checks if the string is qualified for
the simple font code path. However certain css properties could still force us to use the complex
path.
In most cases, we still do only one string traversal thanks to TextRun::setCharacterScanForCodePath().

Test: fast/text/simple-line-layout-simple-text-but-complex-font-path.html

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::canUseForFontAndText):

LayoutTests:

  • fast/text/simple-line-layout-simple-text-but-complex-font-path-expected.html: Added.
  • fast/text/simple-line-layout-simple-text-but-complex-font-path.html: Added.
9:22 AM Changeset in webkit [211681] by zandobersek@gmail.com
  • 7 edits
    2 adds in trunk/Source/WebCore

Move TextureMapper-specific logic out of GraphicsContext3DPrivate
https://bugs.webkit.org/show_bug.cgi?id=167096

Reviewed by Alex Christensen.

Move the TextureMapper-specific functionality in GraphicsContext3DPrivate into a
separate class. The new TextureMapperGC3DPlatformLayer class inherits from the
class that's aliased to the PlatformLayer type, like GraphicsContext3DPrivate did
before.

In GraphicsContext3D, the new m_texmapLayer member variable of the
std::unique_ptr<TextureMapperGC3DPlatformLayer> type is used for configurations
that enable TextureMapper, largely the same way the GraphicsContext3DPrivate
object was used before. The remaining code in GraphicsContext3DPrivate is left
unchanged to keep it working for other ports.

No new tests -- no change in behavior.

  • platform/TextureMapper.cmake:
  • platform/graphics/GraphicsContext3D.h:
  • platform/graphics/GraphicsContext3DPrivate.cpp:

(WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
(WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate): Deleted.
(WebCore::GraphicsContext3DPrivate::proxy): Deleted.
(WebCore::GraphicsContext3DPrivate::swapBuffersIfNeeded): Deleted.
(WebCore::GraphicsContext3DPrivate::paintToTextureMapper): Deleted.

  • platform/graphics/GraphicsContext3DPrivate.h:
  • platform/graphics/cairo/GraphicsContext3DCairo.cpp:

(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::GraphicsContext3D::~GraphicsContext3D):
(WebCore::GraphicsContext3D::makeContextCurrent):
(WebCore::GraphicsContext3D::platformGraphicsContext3D):
(WebCore::GraphicsContext3D::platformLayer):

  • platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:

(WebCore::GraphicsContext3D::createForCurrentGLContext):

  • platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp: Copied from Source/WebCore/platform/graphics/GraphicsContext3DPrivate.cpp.

(WebCore::TextureMapperGC3DPlatformLayer::TextureMapperGC3DPlatformLayer):
(WebCore::TextureMapperGC3DPlatformLayer::~TextureMapperGC3DPlatformLayer):
(WebCore::TextureMapperGC3DPlatformLayer::makeContextCurrent):
(WebCore::TextureMapperGC3DPlatformLayer::platformContext):
(WebCore::TextureMapperGC3DPlatformLayer::proxy):
(WebCore::TextureMapperGC3DPlatformLayer::swapBuffersIfNeeded):
(WebCore::TextureMapperGC3DPlatformLayer::paintToTextureMapper):

  • platform/graphics/texmap/TextureMapperGC3DPlatformLayer.h: Copied from Source/WebCore/platform/graphics/GraphicsContext3DPrivate.h.

(WebCore::TextureMapperGC3DPlatformLayer::renderStyle):

6:41 AM Changeset in webkit [211680] by Alan Bujtas
  • 3 edits
    2 adds in trunk

Simple line layout: Bail out from Simple Line Layout on surrogate pairs.
https://bugs.webkit.org/show_bug.cgi?id=167840
<rdar://problem/30364784>

Reviewed by Myles C. Maxfield.

Source/WebCore:

Surrogate pairs require special line breaking logic.

Test: fast/text/simple-line-layout-no-surrogate-pairs.html

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::canUseForCharacter):
(WebCore::SimpleLineLayout::canUseForText): Checking against special characters is faster than
checking against glyphs. Reverse their order.
(WebCore::SimpleLineLayout::printReason):

LayoutTests:

  • fast/text/simple-line-layout-no-surrogate-pairs-expected.html: Added.
  • fast/text/simple-line-layout-no-surrogate-pairs.html: Added.

Feb 4, 2017:

11:19 PM Changeset in webkit [211679] by Wenson Hsieh
  • 14 edits in trunk/Source/WebKit2

Data interaction on an image should make it stand out when presenting the action sheet
https://bugs.webkit.org/show_bug.cgi?id=167846
<rdar://problem/30363014>

Reviewed by Tim Horton.

Adds infrastructure to improve the behavior of data interaction for images. We make two changes to accomplish
this: first, add some plumbing to WebKit so the web process can tell the UI process when it is done handling a
request to start data interaction, so that the UI process is able to clean up UI-side state in the event that
the page prevented the default behavior.

Secondly, this patch tweaks the heuristic used to present action sheets as popovers. For image elements, if
there is sufficient space around the element, we will use the element rect as the target rect; otherwise, we
fall back to presenting the popover at the touch location.

  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::didHandleStartDataInteractionRequest):

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

(-[WKActionSheet presentSheet:]):

Added a presentation style parameter, used to specify whether or not WKActionSheet should present the popover
using the element rect as the target rect, or the touch location.

(-[WKActionSheet doneWithSheet]):
(-[WKActionSheet updateSheetPosition]):
(-[WKActionSheet presentSheet]): Deleted.

  • UIProcess/ios/WKActionSheetAssistant.mm:

(-[WKActionSheetAssistant presentationRectForIndicatedElement]):

Returns the (inflated) bounds of the element that is currently being indicated.

(-[WKActionSheetAssistant showImageSheet]):
(-[WKActionSheetAssistant _presentationStyleForImageAtElementRect:]):
(-[WKActionSheetAssistant showLinkSheet]):
(-[WKActionSheetAssistant showDataDetectorsSheet]):

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::didHandleStartDataInteractionRequest):

  • UIProcess/mac/PageClientImpl.h:
  • UIProcess/mac/PageClientImpl.mm:

Remove unnecessary function declarations and implementations.

(WebKit::PageClientImpl::didPerformDataInteractionControllerOperation): Deleted.
(WebKit::PageClientImpl::startDataInteractionWithImage): Deleted.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::requestStartDataInteraction):

Notify the UI process that the web process is done handling a data interaction request, specifying whether or
not the request was granted.

11:02 PM Changeset in webkit [211678] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Static Analyzer: Value stored to 'recordedMachineThreads' during its initialization is never read
https://bugs.webkit.org/show_bug.cgi?id=167845

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-02-04
Reviewed by Saam Barati.

Source/JavaScriptCore/heap/MachineStackMarker.cpp:151:14: warning: Value stored to 'recordedMachineThreads' during its initialization is never read

auto recordedMachineThreads = m_set.take(machineThreads);

~

  • heap/MachineStackMarker.cpp:

(JSC::ActiveMachineThreadsManager::remove):

10:23 PM Changeset in webkit [211677] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Static Analyzer: WebCoreNSURLExtras.mm: Potential leak of memory pointed to by 'allBytesBuffer'
https://bugs.webkit.org/show_bug.cgi?id=167849

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-02-04
Reviewed by Sam Weinig.

Source/WebCore/platform/mac/WebCoreNSURLExtras.mm:883:20: warning: Potential leak of memory pointed to by 'allBytesBuffer'

return nil;


  • platform/mac/WebCoreNSURLExtras.mm:

(WebCore::dataForURLComponentType):
Free the potentially malloc'd buffer before the early return.

6:20 PM Changeset in webkit [211676] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix mistake in comment added in r211569.

  • history/PageCache.cpp:

(WebCore::PageCache::removeAllItemsForPage):

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

Static Analyzer: Value stored to 'prev' is never read
https://bugs.webkit.org/show_bug.cgi?id=167844

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-02-04
Reviewed by Saam Barati.

Source/JavaScriptCore/runtime/JSMapIterator.h:60:13: warning: Value stored to 'prev' is never read

prev = bucket;

Source/JavaScriptCore/runtime/JSSetIterator.h:60:13: warning: Value stored to 'prev' is never read

prev = bucket;

  • runtime/JSMapIterator.h:

(JSC::JSMapIterator::advanceIter):

  • runtime/JSSetIterator.h:

(JSC::JSSetIterator::advanceIter):

1:46 PM Changeset in webkit [211674] by akling@apple.com
  • 3 edits in trunk/Tools

Plug some leaks in TestController and UIScriptContext.
<https://webkit.org/b/167839>

Reviewed by Alexey Proskuryakov.

Fix a couple of the leaks seen on the leaks bot.

  • TestRunnerShared/UIScriptContext/UIScriptContext.cpp:

(UIScriptContext::runUIScript):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::handleCheckOfUserMediaPermissionForOrigin):
(WTR::TestController::decidePolicyForUserMediaPermissionRequestIfPossible):

1:40 PM Changeset in webkit [211673] by yoav@yoav.ws
  • 2 edits in trunk/Source/WebCore

Fix memory issues related to preload eviction.
https://bugs.webkit.org/show_bug.cgi?id=167838

Reviewed by Andreas Kling.

This avoids removing resources from m_preloads during the iteration
by creating a second HashSetList containing the remaining link preloads.

No new tests but this will fix crashes on the leak bots.

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::clearPreloads):

11:34 AM Changeset in webkit [211672] by Michael Catanzaro
  • 2 edits in trunk/Source/WTF

[GTK] Fix huge ENABLE_RESOURCE_USAGE warning spam

Unreviewed. We shouldn't redefine ENABLE_RESOURCE_USAGE in Platform.h as
it's already defined in cmakeconfig.h.

  • wtf/Platform.h:
8:34 AM Changeset in webkit [211671] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Simple line layout: Skip 16bit specific checks on 8bit content.
https://bugs.webkit.org/show_bug.cgi?id=167831
<rdar://problem/30361948>

Reviewed by Antti Koivisto and Myles C. Maxfield.

Skip various checks on 8bit content.

Covered by existing tests.

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::canUseForCharacter):
(WebCore::SimpleLineLayout::canUseForText):
(WebCore::SimpleLineLayout::canUseForFontAndText):

5:46 AM Changeset in webkit [211670] by Yusuke Suzuki
  • 9 edits
    1 add in trunk

[JSC] Add operationToInt32SensibleSlow to optimize kraken pbkdf2 and sha256
https://bugs.webkit.org/show_bug.cgi?id=167736

Reviewed by Saam Barati.

JSTests:

  • stress/to-int32-sensible.js: Added.

(shouldBe):
(toInt32):
(test):

Source/JavaScriptCore:

Add a new function operationToInt32SensibleSlow. This function is only
called after x86 cvttss2si_rr is failed. This means that the
given double number never in range of int32 truncatable numbers.

As a result, exp in operationToInt32 always becomes >= 31. So
we can change the condition from exp < 32 to exp == 31.
This makes missingOne constant. And it leads significantly good
code generation.

The original operationToInt32 code.

170: 66 48 0f 7e c1 movq %xmm0,%rcx
175: 31 c0 xor %eax,%eax
177: 66 48 0f 7e c6 movq %xmm0,%rsi
17c: 48 c1 f9 34 sar $0x34,%rcx
180: 81 e1 ff 07 00 00 and $0x7ff,%ecx
186: 8d 91 01 fc ff ff lea -0x3ff(%rcx),%edx
18c: 83 fa 53 cmp $0x53,%edx
18f: 77 37 ja 1c8 <_ZN3JSC16operationToInt32Ed+0x58>
191: 83 fa 34 cmp $0x34,%edx
194: 7f 3a jg 1d0 <_ZN3JSC16operationToInt32Ed+0x60>
196: b9 34 00 00 00 mov $0x34,%ecx
19b: 66 48 0f 7e c7 movq %xmm0,%rdi
1a0: 29 d1 sub %edx,%ecx
1a2: 48 d3 ff sar %cl,%rdi
1a5: 83 fa 1f cmp $0x1f,%edx
1a8: 89 f8 mov %edi,%eax
1aa: 7f 12 jg 1be <_ZN3JSC16operationToInt32Ed+0x4e>
1ac: 89 d1 mov %edx,%ecx
1ae: b8 01 00 00 00 mov $0x1,%eax
1b3: d3 e0 shl %cl,%eax
1b5: 89 c2 mov %eax,%edx
1b7: 8d 40 ff lea -0x1(%rax),%eax
1ba: 21 f8 and %edi,%eax
1bc: 01 d0 add %edx,%eax
1be: 89 c2 mov %eax,%edx
1c0: f7 da neg %edx
1c2: 48 85 f6 test %rsi,%rsi
1c5: 0f 48 c2 cmovs %edx,%eax
1c8: f3 c3 repz retq
1ca: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1)
1d0: 66 48 0f 7e c0 movq %xmm0,%rax
1d5: 81 e9 33 04 00 00 sub $0x433,%ecx
1db: 48 d3 e0 shl %cl,%rax
1de: eb de jmp 1be <_ZN3JSC16operationToInt32Ed+0x4e>

The operationToInt32SensibleSlow code.

1e0: 66 48 0f 7e c1 movq %xmm0,%rcx
1e5: 66 48 0f 7e c2 movq %xmm0,%rdx
1ea: 48 c1 f9 34 sar $0x34,%rcx
1ee: 81 e1 ff 07 00 00 and $0x7ff,%ecx
1f4: 8d b1 01 fc ff ff lea -0x3ff(%rcx),%esi
1fa: 83 fe 34 cmp $0x34,%esi
1fd: 7e 21 jle 220 <_ZN3JSC28operationToInt32SensibleSlowEd+0x40>
1ff: 66 48 0f 7e c0 movq %xmm0,%rax
204: 81 e9 33 04 00 00 sub $0x433,%ecx
20a: 48 d3 e0 shl %cl,%rax
20d: 89 c1 mov %eax,%ecx
20f: f7 d9 neg %ecx
211: 48 85 d2 test %rdx,%rdx
214: 0f 48 c1 cmovs %ecx,%eax
217: c3 retq
218: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1)
21f: 00
220: 66 48 0f 7e c0 movq %xmm0,%rax
225: b9 34 00 00 00 mov $0x34,%ecx
22a: 29 f1 sub %esi,%ecx
22c: 48 d3 f8 sar %cl,%rax
22f: 89 c1 mov %eax,%ecx
231: 81 c9 00 00 00 80 or $0x80000000,%ecx
237: 83 fe 1f cmp $0x1f,%esi
23a: 0f 44 c1 cmove %ecx,%eax
23d: 89 c1 mov %eax,%ecx
23f: f7 d9 neg %ecx
241: 48 85 d2 test %rdx,%rdx
244: 0f 48 c1 cmovs %ecx,%eax
247: c3 retq
248: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1)
24f: 00

This improves kraken pbkdf2 by 10.8% and sha256 by 7.5%.

baseline patched

stanford-crypto-pbkdf2 153.195+-2.745 138.204+-2.513 definitely 1.1085x faster
stanford-crypto-sha256-iterative 49.047+-1.038 45.610+-1.235 definitely 1.0754x faster

<arithmetic> 101.121+-1.379 91.907+-1.500 definitely 1.1003x faster

  • assembler/CPU.h:

(JSC::hasSensibleDoubleToInt):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileValueToInt32):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::doubleToInt32):
(JSC::FTL::DFG::LowerDFGToB3::sensibleDoubleToInt32):

  • ftl/FTLOutput.cpp:

(JSC::FTL::Output::hasSensibleDoubleToInt): Deleted.

  • ftl/FTLOutput.h:
  • runtime/MathCommon.cpp:

(JSC::operationToInt32SensibleSlow):

  • runtime/MathCommon.h:
12:25 AM Changeset in webkit [211669] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

Unreviewed. Fix the key shortcut to enable resource usage overlay in GTK+.

The condition to check for CTRL and Shift modifiers is wrong, causing the overlay to be shown on Shit+G and
making it impossible to write a 'G'.

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseKeyPressEvent):

Feb 3, 2017:

10:03 PM Changeset in webkit [211668] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Simple line layout: Remove redundant codepath check.
https://bugs.webkit.org/show_bug.cgi?id=167827
<rdar://problem/30361850>

Reviewed by Myles C. Maxfield.

FontCascade::codePath() iterates through the entire text. It's rather wasteful to do twice.

No change in functionality.

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::canUseForFontAndText):
(WebCore::SimpleLineLayout::printReason):

9:53 PM Changeset in webkit [211667] by mmaxfield@apple.com
  • 3 edits
    2 adds in trunk

REGRESSION(r204858): Synthetic bold text in vertical writing mode is rotated away from original text
https://bugs.webkit.org/show_bug.cgi?id=167826
<rdar://problem/28193222>

Reviewed by Zalan Bujtas.

Source/WebCore:

When drawing vertical text, the rotation is not reset between successive paint calls. We implement
synthetic bold by drawing text twice, which means that the second draw call was getting rotated
twice. This was an oversight in r204858.

Test: fast/text/synthetic-bold-vertical-text.html

  • platform/graphics/cocoa/FontCascadeCocoa.mm:

(WebCore::showGlyphsWithAdvances):

LayoutTests:

  • fast/text/synthetic-bold-vertical-text-expected.html: Added.
  • fast/text/synthetic-bold-vertical-text.html: Added.
9:18 PM Changeset in webkit [211666] by Joseph Pecoraro
  • 5 edits in trunk/Source

Unreviewed rollout of r211486, r211629.

Original change is not ideal and is causing issues.

Source/JavaScriptCore:

  • inspector/agents/InspectorHeapAgent.cpp:

(Inspector::SendGarbageCollectionEventsTask::SendGarbageCollectionEventsTask):

  • runtime/InitializeThreading.cpp:

(JSC::initializeThreading):

Source/WebKit2:

  • Shared/WebKit2Initialize.cpp:

(WebKit::InitializeWebKit2):

7:23 PM Changeset in webkit [211665] by commit-queue@webkit.org
  • 33 edits in trunk/Source

Performance Timing: Convert WTF::MonotonicTime and WTF::Seconds
https://bugs.webkit.org/show_bug.cgi?id=167768

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-02-03
Reviewed by Geoffrey Garen.

Source/WebCore:

The public APIs still return double (DOMHighResTimeStamp), which
is milliseconds since a time origin:
https://w3c.github.io/hr-time/#dom-domhighrestimestamp

  • loader/LoadTiming.cpp:

(WebCore::LoadTiming::secondsSinceStartTime):
(WebCore::LoadTiming::monotonicTimeToPseudoWallTime):
(WebCore::LoadTiming::markStartTime):
(WebCore::LoadTiming::addRedirect):
(WebCore::LoadTiming::monotonicTimeToZeroBasedDocumentTime): Deleted.

  • loader/LoadTiming.h:

(WebCore::LoadTiming::markUnloadEventStart):
(WebCore::LoadTiming::markUnloadEventEnd):
(WebCore::LoadTiming::markRedirectStart):
(WebCore::LoadTiming::markRedirectEnd):
(WebCore::LoadTiming::markFetchStart):
(WebCore::LoadTiming::setResponseEnd):
(WebCore::LoadTiming::markLoadEventStart):
(WebCore::LoadTiming::markLoadEventEnd):
(WebCore::LoadTiming::startTime):
(WebCore::LoadTiming::unloadEventStart):
(WebCore::LoadTiming::unloadEventEnd):
(WebCore::LoadTiming::redirectStart):
(WebCore::LoadTiming::redirectEnd):
(WebCore::LoadTiming::fetchStart):
(WebCore::LoadTiming::responseEnd):
(WebCore::LoadTiming::loadEventStart):
(WebCore::LoadTiming::loadEventEnd):
(WebCore::LoadTiming::redirectCount):
(WebCore::LoadTiming::referenceMonotonicTime):
(WebCore::LoadTiming::referenceWallTime):
Use MonotonicTime and WallTime for timestamps and references.

  • dom/Document.cpp:

(WebCore::Document::setReadyState):
(WebCore::Document::finishedParsing):
(WebCore::Document::monotonicTimestamp):

  • dom/DocumentTiming.h:

(WebCore::DocumentTiming::DocumentTiming): Deleted.

  • dom/ScriptedAnimationController.cpp:

(WebCore::ScriptedAnimationController::serviceScriptedAnimations):

  • inspector/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::buildObjectForTiming):
(WebCore::InspectorNetworkAgent::didFinishLoading):

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::finishedLoading):
(WebCore::DocumentLoader::dataReceived):

  • loader/DocumentLoader.h:
  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::didFinishLoading):

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::requestResource):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::performance):
Use new types instead of raw doubles.

  • page/Performance.cpp:

(WebCore::Performance::Performance):
(WebCore::Performance::now):
(WebCore::Performance::reduceTimeResolution):
(WebCore::Performance::addResourceTiming):

  • page/Performance.h:

Do time arithmatic with WTF::Time classes.
This clarifies that we reduce our timestamps to 100us
resolution instead of the maximum 5us allowed by the spec.

  • page/PerformanceResourceTiming.cpp:

(WebCore::monotonicTimeToDOMHighResTimeStamp):
(WebCore::PerformanceResourceTiming::PerformanceResourceTiming):
(WebCore::PerformanceResourceTiming::networkLoadTimeToDOMHighResTimeStamp):

  • page/PerformanceResourceTiming.h:
  • page/PerformanceTiming.cpp:

(WebCore::PerformanceTiming::resourceLoadTimeRelativeToFetchStart):
(WebCore::PerformanceTiming::monotonicTimeToIntegerMilliseconds):
(WebCore::toIntegerMilliseconds): Deleted.

  • page/PerformanceTiming.h:

Do time arithmatic with WTF::Time classes.

  • workers/DedicatedWorkerGlobalScope.cpp:

(WebCore::DedicatedWorkerGlobalScope::create):
(WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope):

  • workers/DedicatedWorkerGlobalScope.h:
  • workers/DedicatedWorkerThread.cpp:

(WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
(WebCore::DedicatedWorkerThread::createWorkerGlobalScope):

  • workers/DedicatedWorkerThread.h:
  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::WorkerGlobalScope):

  • workers/WorkerGlobalScope.h:
  • workers/WorkerGlobalScopeProxy.h:
  • workers/WorkerMessagingProxy.cpp:

(WebCore::WorkerMessagingProxy::startWorkerGlobalScope):

  • workers/WorkerMessagingProxy.h:
  • workers/WorkerThread.cpp:

(WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
(WebCore::WorkerThread::WorkerThread):

  • workers/WorkerThread.h:

Pass time origin as MonotonicTime.

  • workers/Worker.cpp:

(WebCore::Worker::create):
(WebCore::Worker::notifyFinished):

  • workers/Worker.h:

Rename creation timestamp member. This matches Document's m_documentCreationTime.

Source/WTF:

  • wtf/Stopwatch.h:

(WTF::Stopwatch::elapsedTimeSince):
(WTF::Stopwatch::elapsedTimeSinceMonotonicTime): Deleted.

7:16 PM Changeset in webkit [211664] by achristensen@apple.com
  • 3 edits
    1 add in trunk/Source/ThirdParty/libwebrtc

[WebRTC] Add more files to libwebrtc build
https://bugs.webkit.org/show_bug.cgi?id=167824

Reviewed by Youenn Fablet.

  • Configurations/libwebrtc.xcconfig:
  • Configurations/usrsctp.xcconfig: Added.
  • libwebrtc.xcodeproj/project.pbxproj:
7:03 PM Changeset in webkit [211663] by commit-queue@webkit.org
  • 8 edits in trunk

WK1 mouse events are missing movementX and movementY for pointerlock.
https://bugs.webkit.org/show_bug.cgi?id=167775
rdar://problem/30343810

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-02-03
Reviewed by Alexey Proskuryakov.

Source/WebCore:

pointer-lock/mouse-event-delivery.html

Improve mouse-event-delivery.html test to mouse move and check for valid movementX and movementY.

  • platform/mac/PlatformEventFactoryMac.mm:

(WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder): WK1 plumb throuhg movementX and movementY

Tools:

Set kCGMouseEventDeltaX and kCGMouseEventDeltaY when synthesizing mouse move events.

  • DumpRenderTree/mac/EventSendingController.mm:

(-[EventSendingController mouseMoveToX:Y:]):

  • WebKitTestRunner/mac/EventSenderProxy.mm:

(WTR::EventSenderProxy::mouseMoveTo):

LayoutTests:

Enable pointer-lock/mouse-event-delivery.html for mac.

  • platform/mac/TestExpectations:
5:53 PM Changeset in webkit [211662] by Simon Fraser
  • 83 edits
    2 adds in trunk

Correctly set the "inWindow" flag for TileControllers that aren't the page tiles, and clarify "usingTiledBacking" logic
https://bugs.webkit.org/show_bug.cgi?id=167774

Reviewed by Tim Horton.
Source/WebCore:

RenderLayerBacking had some very confusing "usingTiledCacheLayer" uses.

Its member variable, m_usingTiledCacheLayer, really meant "m_isMainFrameLayerWithTiledBacking" so make it so.
It had a usingTiledBacking(), which returned the same thing, which this patch replaces with isMainFrameLayerWithTiledBacking().

The fact that usingTiledBacking() was only true for the page tiled layer tripped up
RenderLayerCompositor::setIsInWindowForLayerIncludingDescendants(), which would only ever call setIsInWindow()
on the page tiled layer. These changes fix that.

Also make a way for tests to unparent the web view via UIScriptController, and dump out the "in window"
status of TileBackings when dumping tile caches.

Test: tiled-drawing/tiled-backing-in-window.html

  • platform/graphics/TiledBacking.h:
  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::dumpAdditionalProperties):

  • platform/graphics/ca/TileController.h:
  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::RenderLayerBacking):
(WebCore::computePageTiledBackingCoverage):
(WebCore::RenderLayerBacking::adjustTiledBackingCoverage):
(WebCore::RenderLayerBacking::setTiledBackingHasMargins):
(WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
(WebCore::RenderLayerBacking::shouldClipCompositedBounds):
(WebCore::RenderLayerBacking::updateDescendantClippingLayer):
(WebCore::RenderLayerBacking::updateRootLayerConfiguration):
(WebCore::RenderLayerBacking::paintsIntoWindow):
(WebCore::computeTileCoverage): Deleted.

  • rendering/RenderLayerBacking.h:
  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
(WebCore::RenderLayerCompositor::rootFixedBackgroundsChanged):
(WebCore::RenderLayerCompositor::setIsInWindowForLayerIncludingDescendants):
(WebCore::RenderLayerCompositor::supportsFixedRootBackgroundCompositing):
(WebCore::RenderLayerCompositor::documentUsesTiledBacking):

Tools:

Implement UIScriptController removeViewFromWindow() and addViewToWindow(), and hook
up for Mac WK1 and WK2, and iOS WK2. It takes a callback because view state updates to the
web process are async, so the callback fires after the web process gets the new state.

  • DumpRenderTree/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::removeViewFromWindow):
(WTR::UIScriptController::addViewToWindow):

  • DumpRenderTree/mac/DumpRenderTree.mm:

(createWebViewAndOffscreenWindow):
(resetWebViewToConsistentStateBeforeTesting):

  • DumpRenderTree/mac/DumpRenderTreeMac.h:
  • DumpRenderTree/mac/UIScriptControllerMac.mm:

(WTR::UIScriptController::removeViewFromWindow):
(WTR::UIScriptController::addViewToWindow):

  • TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
  • TestRunnerShared/UIScriptContext/UIScriptController.cpp:

(WTR::UIScriptController::removeViewFromWindow):
(WTR::UIScriptController::addViewToWindow):

  • TestRunnerShared/UIScriptContext/UIScriptController.h:
  • WebKitTestRunner/PlatformWebView.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetStateToConsistentValues):

  • WebKitTestRunner/ios/PlatformWebViewIOS.mm:

(WTR::PlatformWebView::removeFromWindow):
(WTR::PlatformWebView::addToWindow):

  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::removeViewFromWindow):
(WTR::UIScriptController::addViewToWindow):

  • WebKitTestRunner/mac/PlatformWebViewMac.mm:

(WTR::PlatformWebView::removeFromWindow):
(WTR::PlatformWebView::addToWindow):

  • WebKitTestRunner/mac/UIScriptControllerMac.mm:

(WTR::UIScriptController::removeViewFromWindow):
(WTR::UIScriptController::addViewToWindow):

LayoutTests:

Rebase to include the "in window" output.

tiled-drawing/background-transparency-toggle.html was sensitive to the length of the output, so give the body
a fixed size.

  • compositing/tiling/offscreen-tiled-layer-expected.txt:
  • compositing/tiling/transform-origin-tiled-expected.txt:
  • platform/mac-wk1/compositing/tiling/offscreen-tiled-layer-expected.txt:
  • platform/mac-wk1/compositing/tiling/transform-origin-tiled-expected.txt:
  • platform/mac-wk2/compositing/tiling/rotated-tiled-clamped-expected.txt:
  • platform/mac-wk2/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt:
  • platform/mac-wk2/compositing/tiling/tile-cache-zoomed-expected.txt:
  • platform/mac-wk2/compositing/tiling/tiled-layer-resize-expected.txt:
  • platform/mac/compositing/tiling/rotated-tiled-clamped-expected.txt:
  • platform/mac/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt:
  • platform/mac/compositing/tiling/tiled-layer-resize-expected.txt:
  • tiled-drawing/background-transparency-toggle-expected.txt:
  • tiled-drawing/background-transparency-toggle.html:
  • tiled-drawing/scrolling/fast-scroll-div-latched-div-expected.txt:
  • tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler-expected.txt:
  • tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-expected.txt:
  • tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler-expected.txt:
  • tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt:
  • tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt:
  • tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-expected.txt:
  • tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt:
  • tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-expected.txt:
  • tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler-expected.txt:
  • tiled-drawing/scrolling/fast-scroll-select-latched-select-expected.txt:
  • tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler-expected.txt:
  • tiled-drawing/scrolling/fixed-background/fixed-background-no-image-expected.txt:
  • tiled-drawing/scrolling/fixed-background/fixed-body-background-body-layer-expected.txt:
  • tiled-drawing/scrolling/fixed-background/fixed-body-background-expected.txt:
  • tiled-drawing/scrolling/fixed-background/fixed-body-background-opacity-expected.txt:
  • tiled-drawing/scrolling/fixed-background/fixed-body-background-positioned-expected.txt:
  • tiled-drawing/scrolling/fixed-background/fixed-body-background-transformed-expected.txt:
  • tiled-drawing/scrolling/fixed-background/fixed-body-background-zoomed-expected.txt:
  • tiled-drawing/scrolling/fixed-background/fixed-html-background-expected.txt:
  • tiled-drawing/scrolling/fixed-background/fixed-non-propagated-body-background-expected.txt:
  • tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt:
  • tiled-drawing/simple-document-with-margin-tiles-expected.txt:
  • tiled-drawing/tile-coverage-after-scroll-expected.txt:
  • tiled-drawing/tile-coverage-after-scroll-speculative-expected.txt:
  • tiled-drawing/tile-coverage-scroll-to-bottom-expected.txt:
  • tiled-drawing/tile-coverage-slow-scrolling-expected.txt:
  • tiled-drawing/tile-coverage-speculative-expected.txt:
  • tiled-drawing/tile-coverage-view-exposed-rect-expected.txt:
  • tiled-drawing/tile-size-both-scrollable-expected.txt:
  • tiled-drawing/tile-size-horizontally-scrollable-expected.txt:
  • tiled-drawing/tile-size-slow-zoomed-expected.txt:
  • tiled-drawing/tile-size-unscrollable-expected.txt:
  • tiled-drawing/tile-size-vertically-scrollable-expected.txt:
  • tiled-drawing/tile-size-view-exposed-rect-expected.txt:
  • tiled-drawing/tiled-backing-in-window-expected.txt: Added.
  • tiled-drawing/tiled-backing-in-window.html: Added.
  • tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration-expected.txt:
  • tiled-drawing/tiled-drawing-zoom-expected.txt:
  • tiled-drawing/tiled-drawing-zoom-scrolled-expected.txt:
  • tiled-drawing/use-tiled-drawing-expected.txt:
  • tiled-drawing/visible-rect-content-inset-expected.txt:
5:42 PM Changeset in webkit [211661] by Alan Bujtas
  • 3 edits
    2 adds in trunk

Simple line layout: Bail out from Simple Line Layout when the primary font is insufficient.
https://bugs.webkit.org/show_bug.cgi?id=167820
Source/WebCore:

<rdar://problem/30359685>

Reviewed by Myles C. Maxfield.

Currently simple line layout requires the primary font to have all the glyps for the content.

Test: fast/text/simple-line-layout-do-not-support-unicode-range.html

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::canUseForText):
(WebCore::SimpleLineLayout::canUseForFontAndText):
(WebCore::SimpleLineLayout::printReason):

LayoutTests:

Reviewed by Myles C. Maxfield.

  • fast/text/simple-line-layout-do-not-support-unicode-range-expected.html: Added.
  • fast/text/simple-line-layout-do-not-support-unicode-range.html: Added.
5:39 PM Changeset in webkit [211660] by commit-queue@webkit.org
  • 2 edits
    17 adds in trunk/LayoutTests/imported/w3c

Import web-platform-tests/hr-time tests
https://bugs.webkit.org/show_bug.cgi?id=167819

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-02-03
Reviewed by Youenn Fablet.

We pass all of these tests upstream.

  • resources/ImportExpectations:
  • web-platform-tests/hr-time/OWNERS: Added.
  • web-platform-tests/hr-time/basic-expected.txt: Added.
  • web-platform-tests/hr-time/basic.html: Added.
  • web-platform-tests/hr-time/basic.worker-expected.txt: Added.
  • web-platform-tests/hr-time/basic.worker.html: Added.
  • web-platform-tests/hr-time/basic.worker.js: Added.
  • web-platform-tests/hr-time/idlharness-expected.txt: Added.
  • web-platform-tests/hr-time/idlharness.html: Added.
  • web-platform-tests/hr-time/monotonic-clock-expected.txt: Added.
  • web-platform-tests/hr-time/monotonic-clock.html: Added.
  • web-platform-tests/hr-time/resources/now_frame.html: Added.
  • web-platform-tests/hr-time/resources/w3c-import.log: Added.
  • web-platform-tests/hr-time/test_cross_frame_start-expected.txt: Added.
  • web-platform-tests/hr-time/test_cross_frame_start.html: Added.
  • web-platform-tests/hr-time/w3c-import.log: Added.
5:20 PM Changeset in webkit [211659] by jer.noble@apple.com
  • 3 edits
    2 adds in trunk

ASSERT in HTMLMediaElement::~HTMLMediaElement
https://bugs.webkit.org/show_bug.cgi?id=167818

Reviewed by Brent Fulgham.

Source/WebCore:

Test: media/audio-dealloc-crash.html

HTMLMediaElement's MediaElementSession can nominate the HTMLMediaElement itself
to become the playback controls session from inside the HTMLMediaElement destructor. Protect
against this by clearing out the session before calling updatePlaybackControlsManager().

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::~HTMLMediaElement):

LayoutTests:

  • media/audio-dealloc-crash-expected.txt: Added.
  • media/audio-dealloc-crash.html: Added.
5:17 PM Changeset in webkit [211658] by jfbastien@apple.com
  • 7 edits in trunk/Source/JavaScriptCore

OSR entry: delay outer-loop compilation when at inner-loop
https://bugs.webkit.org/show_bug.cgi?id=167149

Reviewed by Filip Pizlo.

r211224 and r211461 were reverted because they caused massive
kraken/ai-astar regressions. This patch instead does the
minimally-disruptive change to fix the original bug as described
below, but omits extra tuning and refactoring which I had
before. I'll commit tuning and refactoring separately, if this
sticks. This patch is therefore very minimal, and layers carefully
on top of the complex spaghetti-logic. The only change it makes is
that it uses triggers to indicate to outer loops that they should
compile, which fixes the immediate bug and seems roughly perf
neutral (maybe a small gain on kraken sometimes, other times a
small regression as would be expected from slightly compiling
later). As opposed to r211461 this patch doesn't unconditionally
unset the trigger because it prevents further DFG executions from
entering. It therefore makes the trigger a tri-state enum class:
don't trigger, compilation done, start compilation. Only "start
compilation" gets reset to "don't trigger". "Compilation done"
does not (unless there's a problem compiling, then it gets set
back to "don't trigger").

As of https://bugs.webkit.org/show_bug.cgi?id=155217 OSR
compilation can be kicked off for an entry into an outer-loop,
while executing an inner-loop. This is desirable because often the
codegen from an inner-entry isn't as good as the codegen from an
outer-entry, but execution from an inner-loop is often pretty hot
and likely to kick off compilation. This approach provided nice
speedups on Kraken because we'd select to enter to the outer-loop
very reliably, which reduces variability (the inner-loop was
selected roughly 1/5 times from my unscientific measurements).

When compilation starts we take a snapshot of the JSValues at the
current execution state using OSR's recovery mechanism. These
values are passed to the compiler and are used as way to perform
type profiling, and could be used to observe cell types as well as
to perform predictions such as through constant propagation.

It's therefore desired to enter from the outer-loop when we can,
but we need to be executing from that location to capture the
right JSValues, otherwise we're confusing the compiler and giving
it inaccurate JSValues which can lead it to predict the wrong
things, leading to suboptimal code or recompilation due to
misprediction, or in super-corner-cases a crash.

DFG tier-up was added here:
https://bugs.webkit.org/show_bug.cgi?id=112838

  • dfg/DFGJITCode.h:
  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::JITCompiler):

  • dfg/DFGOperations.cpp:
  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGToFTLForOSREntryDeferredCompilationCallback.cpp:

(JSC::DFG::ToFTLForOSREntryDeferredCompilationCallback::ToFTLForOSREntryDeferredCompilationCallback):
(JSC::DFG::Ref<ToFTLForOSREntryDeferredCompilationCallback>ToFTLForOSREntryDeferredCompilationCallback::create):
(JSC::DFG::ToFTLForOSREntryDeferredCompilationCallback::compilationDidBecomeReadyAsynchronously):
(JSC::DFG::ToFTLForOSREntryDeferredCompilationCallback::compilationDidComplete):

  • dfg/DFGToFTLForOSREntryDeferredCompilationCallback.h:
4:05 PM Changeset in webkit [211657] by ap@apple.com
  • 2 edits in trunk/Tools

Remove check for SkipSafariExecutableEntitlementChecks
https://bugs.webkit.org/show_bug.cgi?id=167762

Reviewed by Dan Bernstein.

Follow-up fix: don't break internal behavior.

  • Scripts/webkitdirs.pm:

(safariPath):
(executableHasEntitlements): Deleted.
(safariPathFromSafariBundle): Deleted.
(installedSafariPath): Deleted.

3:14 PM Changeset in webkit [211656] by dbates@webkit.org
  • 21 edits
    5 adds in trunk

[Mac][WK2] Add SPI to override the Content Security Policy of a page
https://bugs.webkit.org/show_bug.cgi?id=167810
<rdar://problem/30102568>

Reviewed by Anders Carlsson.

Source/WebCore:

  • dom/Document.cpp:

(WebCore::Document::initSecurityContext): Apply the embedding client's override Content Security
Policy to the document if one exists.

  • loader/FrameLoaderClient.h: Add function overrideContentSecurityPolicy() that a FrameLoaderClient

can override to provide a custom Content Security Policy for a document (defaults: null string - no policy).
As its name implies, the policy returned by overrideContentSecurityPolicy() will define the Content
Security Policy for the document, overriding any subsequently received Content Security Policy for
the document.

  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::copyStateFrom): Only copy policies from the specified ContentSecurityPolicy
object if our policy was not specified by the embedding client.
(WebCore::ContentSecurityPolicy::didReceiveHeader): Set ContentSecurityPolicy::m_hasAPIPolicy to true
when we receive an API policy from the embedding client (ContentSecurityPolicy::PolicyFrom::API). An
API policy must be defined before a policy received from a document. Do not process a received header
if we already have an API policy as the API policy overrides all other policies.

  • page/csp/ContentSecurityPolicy.h:

Source/WebKit2:

Add SPI to WKWebViewConfiguration so that an embedding client can define a custom Content Security
Policy that overrides the Content Security Policy of any page loaded in the web view.

  • Shared/WebPageCreationParameters.cpp:

(WebKit::WebPageCreationParameters::encode): Encode instance variable overrideContentSecurityPolicy.
(WebKit::WebPageCreationParameters::decode): Decode instance variable overrideContentSecurityPolicy.

  • Shared/WebPageCreationParameters.h:
  • UIProcess/API/APIPageConfiguration.cpp:

(API::PageConfiguration::copy): Copy instance variable overrideContentSecurityPolicy.

  • UIProcess/API/APIPageConfiguration.h:

(API::PageConfiguration::overrideContentSecurityPolicy): Added.
(API::PageConfiguration::setOverrideContentSecurityPolicy): Added.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]): Copy overrideContentSecurityPolicy set on the WKWebViewConfiguration
object to the API::PageConfiguration object if non-nil.

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration copyWithZone:]): Copy the instance variable overrideContentSecurityPolicy.
(-[WKWebViewConfiguration _overrideContentSecurityPolicy]): Added.
(-[WKWebViewConfiguration _setOverrideContentSecurityPolicy:]): Added.

  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Define SPI property _overrideContentSecurityPolicy.
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::WebPageProxy): Initialize m_overrideContentSecurityPolicy from the passed
page configuration.
(WebKit::WebPageProxy::creationParameters): Set WebPageCreationParameters::overrideContentSecurityPolicy
so that the WebPage object (in the WebProcess) will know the overridden Content Security Policy
to apply to the document.

  • UIProcess/WebPageProxy.h:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::overrideContentSecurityPolicy): Added. Returns the custom Content
Security Policy to apply to a new document.

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

(WebKit::WebPage::overrideContentSecurityPolicy): Added.

Tools:

Add tests to ensure that we do not regress -[WKWebView _setOverrideContentSecurityPolicy:].

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/OverrideContentSecurityPolicy.mm: Added.

(TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/page-with-csp-iframe.html: Added.
  • TestWebKitAPI/Tests/WebKit2Cocoa/page-with-csp.html: Added.
  • TestWebKitAPI/Tests/WebKit2Cocoa/page-without-csp-iframe.html: Added.
  • TestWebKitAPI/Tests/WebKit2Cocoa/page-without-csp.html: Added.
3:08 PM Changeset in webkit [211655] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit2

Revert toString behavior to what we had in the last version we shipped
https://bugs.webkit.org/show_bug.cgi?id=167814
rdar://problem/30344753

Reviewed by Tim Horton.

This is a speculative fix for a crash that we've seen on recent builds. It simply reverts the toString call back to
what we have in the last version of Safari we shipped.

  • WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:

(WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):

2:40 PM Changeset in webkit [211654] by Chris Dumez
  • 7 edits in trunk

Drop Mac App Store workaround for window.getComputedStyle()
https://bugs.webkit.org/show_bug.cgi?id=166891
<rdar://problem/28282452>

Reviewed by Sam Weinig.

Drop Mac App Store workaround for window.getComputedStyle() now that
<rdar://problem/28020681> has been fixed.

  • page/DOMWindow.cpp:
  • page/DOMWindow.h:
  • page/DOMWindow.idl:
  • platform/RuntimeApplicationChecks.h:
  • platform/RuntimeApplicationChecks.mm:

(WebCore::MacApplication::isAppStore): Deleted.

2:18 PM Changeset in webkit [211653] by Chris Dumez
  • 11 edits
    2 adds in trunk

Dismiss HTML form validation popover when pressing Escape key
https://bugs.webkit.org/show_bug.cgi?id=167716
<rdar://problem/29872943>

Reviewed by Simon Fraser.

Source/WebCore:

Dismiss any visible HTML form validation popover when pressing
the Escape key.

Test: fast/forms/validation-bubble-escape-key-dismiss.html

  • page/EventHandler.cpp:

(WebCore::EventHandler::keyEvent):

  • page/ValidationMessageClient.h:

Source/WebKit/mac:

Override ValidationMessageClient::hideAnyValidationMessage().

  • WebCoreSupport/WebValidationMessageClient.h:
  • WebCoreSupport/WebValidationMessageClient.mm:

(WebValidationMessageClient::hideAnyValidationMessage):

Source/WebKit2:

Override ValidationMessageClient::hideAnyValidationMessage().

  • WebProcess/WebCoreSupport/WebValidationMessageClient.cpp:

(WebKit::WebValidationMessageClient::hideAnyValidationMessage):

  • WebProcess/WebCoreSupport/WebValidationMessageClient.h:

LayoutTests:

Add layout test coverage.

  • fast/forms/validation-bubble-escape-key-dismiss-expected.txt: Added.
  • fast/forms/validation-bubble-escape-key-dismiss.html: Added.
  • platform/ios-simulator/TestExpectations:
2:01 PM Changeset in webkit [211652] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

Require keyboard focus for pointer lock.
https://bugs.webkit.org/show_bug.cgi?id=167750

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-02-03
Reviewed by Tim Horton.

When keyboard focus leaves the page, end pointer lock
Prevent pointer lock when the page doesn't have keyboard focus.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::dispatchActivityStateChange):
(WebKit::WebPageProxy::requestPointerLock):

1:59 PM Changeset in webkit [211651] by commit-queue@webkit.org
  • 2 edits in trunk/Source/bmalloc

Include cstdlib before using ::malloc and posix_memalign
https://bugs.webkit.org/show_bug.cgi?id=167800

Patch by Ting-Wei Lan <Ting-Wei Lan> on 2017-02-03
Reviewed by Geoffrey Garen.

  • bmalloc/DebugHeap.cpp:
1:56 PM Changeset in webkit [211650] by commit-queue@webkit.org
  • 8 edits in trunk

Pointer lock events should be delivered directly to the target element
https://bugs.webkit.org/show_bug.cgi?id=167134
rdar://problem/30268004

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-02-03
Reviewed by Dean Jackson.

Source/WebCore:

pointer-lock/mouse-event-delivery.html: Enabled for mac, added wheel event tests.

When pointer is locked on an element, route mouse events directly to the target element, instead of
doing the normal event disptach.

  • page/EventHandler.cpp:

(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::handleMouseDoubleClickEvent):
(WebCore::EventHandler::handleMouseMoveEvent):
(WebCore::EventHandler::handleMouseReleaseEvent):
(WebCore::EventHandler::handleMouseForceEvent):
(WebCore::EventHandler::handleWheelEvent):

  • page/PointerLockController.cpp:

(WebCore::PointerLockController::isLocked): Added.
(WebCore::PointerLockController::dispatchLockedWheelEvent): Added.

  • page/PointerLockController.h:

LayoutTests:

The pointer-lock/mouse-event-delivery.html test is modified to explicitly move the mouse pointer to a valid
location before sending mouse actions. Without this, the test infrastructure doesn't know that the pointer
is over the web view and doesn't deliver events.

The pointer-lock/mouse-event-delivery.html is also modified to explicitly wait for the delivery of the
wheel event before continuing with the test. This prevents flakeyness with the order the events are received.

Added code to test for wheel events.

  • platform/mac/TestExpectations: enabled test.
  • pointer-lock/mouse-event-delivery.html:
  • pointer-lock/mouse-event-delivery-expected.txt:
1:52 PM Changeset in webkit [211649] by yoav@yoav.ws
  • 13 edits
    2 adds in trunk

Avoid evicting link preload resources when parsing is done.
https://bugs.webkit.org/show_bug.cgi?id=167415

Reviewed by Ryosuke Niwa.

Source/WebCore:

Currently all preloads (speculative and link preload) are being cleared when the document has finished parsing.
When it comes to link preloads, it can result in resources being cleared before the page had a chance to use them. (e.g. resources
that are preloaded in order to be loaded through script after DOMContentLoaded)

This patch fixes that by marking link preload resources as such, so that they can be handled separately inside clearPreloads().
As this fix also exposed an issue with load cancelation with invalid hrefs (which tests were passing before due to the preloads
being cleared), said issue is also fixed by clearing previousely preloaded resources if an invalid link preload is later detected.

Test: http/tests/preload/not_evicting_preload_at_onload.html

  • dom/Document.cpp:

(WebCore::Document::finishedParsing): Only clear speculative preloads when parsing is finished.

  • loader/LinkLoader.cpp:

(WebCore::LinkLoader::preloadIfNeeded): Set request flag indicating link preload.
(WebCore::LinkLoader::loadLink): Clear previousely preloaded resource to cancel their load.

  • loader/LinkPreloadResourceClients.h:

(WebCore::LinkPreloadResourceClient::clearResource): Call cancelLoad() when the client is cleared.

  • loader/cache/CachedResource.h:

(WebCore::CachedResource::isLinkPreload):
(WebCore::CachedResource::setLinkPreload):

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::CachedResource): Initialize m_isLinkPreload with the request's value.

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::~CachedResourceLoader):
(WebCore::CachedResourceLoader::requestResource): Mirror the request link preload flag to the resource if it's fetched from cache.
(WebCore::CachedResourceLoader::clearPreloads): Add a "speculative only" mode, which doesn't clear link preloads.

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

(WebCore::CachedResourceRequest::CachedResourceRequest):

  • loader/cache/CachedResourceRequest.h:

(WebCore::CachedResourceRequest::isLinkPreload):
(WebCore::CachedResourceRequest::setIsLinkPreload):

LayoutTests:

  • http/tests/preload/dynamic_remove_preload_href.html: Test passed before for the wrong reasons. Cache-busting in order for it to genuinely pass.
  • http/tests/preload/not_delaying_window_onload_before_discovery.html: Test passed before for the wrong reasons. Cache-busting in order for it to genuinely pass.
  • http/tests/preload/not_evicting_preload_at_onload-expected.txt: Added.
  • http/tests/preload/not_evicting_preload_at_onload.html: Added.
  • platform/mac/TestExpectations: Skipping http/tests/preload/dynamic_removing_preload.html due to https://bugs.webkit.org/show_bug.cgi?id=167792
1:48 PM Changeset in webkit [211648] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit2

Stash away the ports - they will be nulled out before the cancel handlers are called
https://bugs.webkit.org/show_bug.cgi?id=167812

Reviewed by Geoffrey Garen.

  • Platform/IPC/mac/ConnectionMac.mm:

(IPC::Connection::open):

1:17 PM Changeset in webkit [211647] by Alan Bujtas
  • 3 edits
    2 adds in trunk

Simple line layout: Removing adjacent trailing whitespace runs should not crash.
https://bugs.webkit.org/show_bug.cgi?id=167803
<rdar://problem/30337368>

Reviewed by Antti Koivisto.

Source/WebCore:

In case of adjacent collapsed whitespace fragments, the length of these fragments (TextFragmentIterator::TextFragment)
do not necessarily equal the length of the final runs (SimpleLineLayout::Run).
This patch removes the dependency on the length and switches over to using the position information instead.

Test: fast/text/simple-line-layout-multiple-trailingwhitespace-crash.html

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::LineState::appendFragmentAndCreateRunIfNeeded):
(WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):

LayoutTests:

  • fast/text/simple-line-layout-multiple-trailingwhitespace-crash-expected.txt: Added.
  • fast/text/simple-line-layout-multiple-trailingwhitespace-crash.html: Added.
12:53 PM Changeset in webkit [211646] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

Correct memory leak in MediaConstraints
https://bugs.webkit.org/show_bug.cgi?id=167744
<rdar://problem/30331444>

Reviewed by Anders Carlsson.

ConstraintHolder returns a reference to an object created by operator new. When the
returned value is assigned or stored in Vector or other containers we leak memory.
Instead, this value should just be returned as a regular object so that the return
value optimization can make sure memory is properly (and efficiently) used.

Tested by existing mediastream tests.

  • platform/mediastream/MediaConstraints.h:

(WebCore::FlattenedConstraint::ConstraintHolder::create): Return by value.
(WebCore::FlattenedConstraint::ConstraintHolder::~ConstraintHolder): Don't attempt to
delete memory that was moved away.
(WebCore::FlattenedConstraint::ConstraintHolder::ConstraintHolder): Add Move constructor.

12:49 PM Changeset in webkit [211645] by Chris Dumez
  • 3 edits
    2 adds in trunk

Fix bad assertion under HTMLTreeBuilder::processStartTagForInBody()
https://bugs.webkit.org/show_bug.cgi?id=167799
<rdar://problem/30237241>

Reviewed by Brent Fulgham.

Source/WebCore:

Fix bad assertion under HTMLTreeBuilder::processStartTagForInBody() that was
expecting the root element to be an <html> element when parsing a <frameset>.
While this assertion is true in theory and as per the specification, it does
not hold in WebKit when parsing a DocumentFragment. This is because WebKit
has an optimization causing us to have a DocumentFragment as root element
when parsing a fragment. See the following constructor:
"HTMLTreeBuilder(HTMLDocumentParser&, DocumentFragment&, Element&, ParserContentPolicy, const HTMLParserOptions&)"

which has the following code:
"""
https://html.spec.whatwg.org/multipage/syntax.html#parsing-html-fragments
For efficiency, we skip step 5 ("Let root be a new html element with no attributes") and instead use the DocumentFragment as a root node.
m_tree.openElements().pushRootNode(HTMLStackItem::create(fragment));
"""

Update the assertion to expect a DocumentFragment as root element when parsing
a fragment, and keep expecting an <html> element otherwise.

Test: fast/parser/fragment-with-frameset-crash.html

  • html/parser/HTMLTreeBuilder.cpp:

(WebCore::HTMLTreeBuilder::processStartTagForInBody):

LayoutTests:

Add layout test coverage. This test passes in all major browsers but used to hit
the bad assertion in WebKit debug builds.

  • fast/parser/fragment-with-frameset-crash-expected.txt: Added.
  • fast/parser/fragment-with-frameset-crash.html: Added.
12:28 PM Changeset in webkit [211644] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit2

Inline createReceiveSource in its two call sites
https://bugs.webkit.org/show_bug.cgi?id=167809

Reviewed by Alex Christensen.

  • Platform/IPC/mac/ConnectionMac.mm:

(IPC::Connection::open):
(IPC::createReceiveSource): Deleted.

12:07 PM Changeset in webkit [211643] by Wenson Hsieh
  • 3 edits in trunk/Source/WebKit2

WKActionSheet should dismiss with animation when done with the sheet
https://bugs.webkit.org/show_bug.cgi?id=167804
<rdar://problem/30334861>

Reviewed by Tim Horton.

Currently, we do not dismiss the action menu when -doneWithSheet is invoked. While this is okay when the menu is
dismissed via tap (since it will be dismissed as default behavior by the popover controller) we need to manually
dismiss it if we are trying to programmatically dismiss the action sheet/menu.

  • UIProcess/ios/WKActionSheet.mm:

(-[WKActionSheet presentSheetFromRect:]):
(-[WKActionSheet doneWithSheet]):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView setupInteraction]):
(-[WKContentView resignFirstResponder]):

12:00 PM Changeset in webkit [211642] by sbarati@apple.com
  • 9 edits in trunk/Source/JavaScriptCore

When OSR entering to the baseline JIT from the LLInt for a ProgramCodeBlock we can skip compiling a lot of the program
https://bugs.webkit.org/show_bug.cgi?id=167725
<rdar://problem/30339082>

Reviewed by Michael Saboff.

We often want to baseline compile ProgramCode once we hit a loop in the LLInt.
However, some programs execute a non-trivial amount of code before the loop.
This code can never be executed again because ProgramCodeBlocks never run more
than once. We're wasting time and memory by compiling code that is unreachable
from the OSR entry destination. This patch fixes this by only compiling code
that is reachable from the OSR entry destination.

This is a speedup on Kraken/ai-astar for devices with limited CPUs (I've been
testing on devices with 2 CPUs). On ai-astar, we were spending 50-100ms compiling
a huge ProgramCodeBlock in the baseline JIT where the majority of the code
would never execute. If this compilation was kicked off on the main thread,
then we'd be stalled for a long time. If it were started on the baseline JITs
background compilation thread, we'd still waste 50-100ms in that thread, causing
all other baseline compilations to happen on the main thread.

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::executeProgram):

  • interpreter/Interpreter.h:
  • jit/JIT.cpp:

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

  • jit/JIT.h:

(JSC::JIT::compile):

  • jit/JITWorklist.cpp:

(JSC::JITWorklist::Plan::Plan):
(JSC::JITWorklist::Plan::compileNow):
(JSC::JITWorklist::compileLater):
(JSC::JITWorklist::compileNow):

  • jit/JITWorklist.h:
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::jitCompileAndSetHeuristics):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • runtime/Completion.cpp:

(JSC::evaluate):

11:53 AM Changeset in webkit [211641] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

[Modern Media Controls] Skip back button is visible with a live broadcast video
https://bugs.webkit.org/show_bug.cgi?id=167793

Patch by Antoine Quint <Antoine Quint> on 2017-02-03
Reviewed by Eric Carlson.

Source/WebCore:

We shouldn't be showing the skip back button when a live broadcast video is playing.
We now listen to the "durationchange" event to determine when we have an inifinite-duration
video and disable the skip button in that case.

Test: http/tests/media/modern-media-controls/skip-back-support/skip-back-support-live-broadcast.html

  • Modules/modern-media-controls/media/skip-back-support.js:

(SkipBackSupport.prototype.get mediaEvents):
(SkipBackSupport.prototype.syncControl):
(SkipBackSupport):

LayoutTests:

Add a new test to check that a live broadcast video doesn't show the skip back button.

  • http/tests/media/modern-media-controls/skip-back-support/skip-back-support-live-broadcast-expected.txt: Added.
  • http/tests/media/modern-media-controls/skip-back-support/skip-back-support-live-broadcast.html: Added.
11:08 AM Changeset in webkit [211640] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Add stroke-linecap property values to CSS autocompletion
https://bugs.webkit.org/show_bug.cgi?id=167778

Reviewed by Joseph Pecoraro.

  • UserInterface/Models/CSSKeywordCompletions.js:

Add autocompletion values for fill-rule and stroke-linecap.

10:45 AM Changeset in webkit [211639] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

Doc generation failure in WebKitSecurityOrigin
https://bugs.webkit.org/show_bug.cgi?id=167796

Patch by Olivier Blin <Olivier Blin> on 2017-02-03
Reviewed by Michael Catanzaro.

  • UIProcess/API/gtk/WebKitSecurityOrigin.cpp:

warning: Free-form return value description in webkit_security_origin_get_protocol. Use `Returns:' to avoid ambiguities.

9:44 AM Changeset in webkit [211638] by achristensen@apple.com
  • 7 edits in trunk

URLParser: implement forbidden host code points for non-special URLs
https://bugs.webkit.org/show_bug.cgi?id=167779

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/url/a-element-expected.txt:
  • web-platform-tests/url/a-element-xhtml-expected.txt:
  • web-platform-tests/url/url-constructor-expected.txt:
  • web-platform-tests/url/url-setters-expected.txt:

Source/WebCore:

Covered by newly passing web platform tests.

  • platform/URLParser.cpp:

(WebCore::isC0Control):
(WebCore::isForbiddenHostCodePoint):
(WebCore::URLParser::parseHostAndPort):
In non-special URL hosts such as customprotocol://strange%host
don't accept characters that are part of the URL grammar and would be forbidden
in a special URL host, like https://not[allowed
This was recently added to the spec in https://github.com/whatwg/url/issues/214

9:39 AM Changeset in webkit [211637] by pvollan@apple.com
  • 3 edits
    2 adds in trunk

The CSS property -webkit-text-stroke is not applied on captions.
https://bugs.webkit.org/show_bug.cgi?id=167687

Reviewed by Brent Fulgham.

Source/WebCore:

Add style to list of valid properties for cue.

Test: media/track/track-css-stroke-cues.html

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::isValidCueStyleProperty):

LayoutTests:

  • media/track/track-css-stroke-cues-expected.txt: Added.
  • media/track/track-css-stroke-cues.html: Added.
9:30 AM WebKitGTK/2.14.x edited by Michael Catanzaro
Remove last proposal, not ready for this yet (diff)
9:28 AM WebKitGTK/2.14.x edited by Michael Catanzaro
(diff)
9:21 AM Changeset in webkit [211636] by achristensen@apple.com
  • 6 edits in trunk

Align URL setters with spec for URLs that cannot be a base URL
https://bugs.webkit.org/show_bug.cgi?id=167783

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/url/url-setters-expected.txt:

Source/WebCore:

Setting things like credentials on mailto URLs doesn't make sense.
It's forbidden by the spec.

Covered by newly passing web platform tests.

  • html/URLUtils.h:

(WebCore::URLUtils<T>::setUsername):
(WebCore::URLUtils<T>::setPassword):
(WebCore::URLUtils<T>::setHost):
(WebCore::URLUtils<T>::setHostname):
(WebCore::URLUtils<T>::setPort):
(WebCore::URLUtils<T>::setPathname):

  • platform/URL.cpp:

(WebCore::URL::serialize):

  • platform/URL.h:

(WebCore::URL::cannotBeABaseURL):

9:21 AM Changeset in webkit [211635] by Konstantin Tokarev
  • 2 edits in trunk

[CMake] RelWithDebInfo builds are super broken at runtime
https://bugs.webkit.org/show_bug.cgi?id=163897

Reviewed by Michael Catanzaro.

  • Source/cmake/OptionsCommon.cmake: Apply -fno-strict-aliasing,

-fno-exceptions, and -fno-rtti flags to all configurations,
instead of only "Release".

9:11 AM Changeset in webkit [211634] by eric.carlson@apple.com
  • 2 edits
    4 adds in trunk/Source/WebCore

[Mac] Add classes to manage audio samples
https://bugs.webkit.org/show_bug.cgi?id=167739

Reviewed by Jer Noble.

No new tests, this code isn't used yet.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/audio/mac/AudioSampleBufferList.cpp: Added.

(WebCore::AudioSampleBufferList::create):
(WebCore::AudioSampleBufferList::AudioSampleBufferList):
(WebCore::AudioSampleBufferList::~AudioSampleBufferList):
(WebCore::AudioSampleBufferList::setSampleCount):
(WebCore::AudioSampleBufferList::applyGain):
(WebCore::AudioSampleBufferList::mixFrom):
(WebCore::AudioSampleBufferList::copyFrom):
(WebCore::AudioSampleBufferList::copyTo):
(WebCore::AudioSampleBufferList::reset):
(WebCore::AudioSampleBufferList::zero):
(WebCore::AudioSampleBufferList::zeroABL):
(WebCore::AudioSampleBufferList::convertInput):
(WebCore::AudioSampleBufferList::audioConverterCallback):
(WebCore::AudioSampleBufferList::configureBufferListForStream):

  • platform/audio/mac/AudioSampleBufferList.h: Added.

(WebCore::AudioSampleBufferList::streamDescription):
(WebCore::AudioSampleBufferList::bufferList):
(WebCore::AudioSampleBufferList::sampleCapacity):
(WebCore::AudioSampleBufferList::sampleCount):
(WebCore::AudioSampleBufferList::timestamp):
(WebCore::AudioSampleBufferList::hostTime):
(WebCore::AudioSampleBufferList::setTimes):
(WebCore::AudioSampleBufferList::audioBufferListSizeForStream):

  • platform/audio/mac/AudioSampleDataSource.cpp: Added.

(WebCore::AudioSampleDataSource::create):
(WebCore::AudioSampleDataSource::AudioSampleDataSource):
(WebCore::AudioSampleDataSource::~AudioSampleDataSource):
(WebCore::AudioSampleDataSource::setPaused):
(WebCore::AudioSampleDataSource::setupConverter):
(WebCore::AudioSampleDataSource::setInputFormat):
(WebCore::AudioSampleDataSource::setOutputFormat):
(WebCore::AudioSampleDataSource::hostTime):
(WebCore::AudioSampleDataSource::pushSamplesInternal):
(WebCore::AudioSampleDataSource::pushSamples):
(WebCore::AudioSampleDataSource::pullSamplesInternal):
(WebCore::AudioSampleDataSource::pullSamples):

  • platform/audio/mac/AudioSampleDataSource.h: Added.

(WebCore::AudioSampleDataSource::setVolume):
(WebCore::AudioSampleDataSource::volume):
(WebCore::AudioSampleDataSource::setMuted):
(WebCore::AudioSampleDataSource::muted):

6:21 AM Changeset in webkit [211633] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebCore

Unreviewed. Fix the buidl after r211631.

I added the OS(LINUX) ifdef to the wrong file by mistake.

  • page/ResourceUsageThread.h:
  • page/linux/ResourceUsageThreadLinux.cpp:
5:04 AM Changeset in webkit [211632] by Csaba Osztrogonác
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed typo fix after r211630.

  • CMakeLists.txt:
5:03 AM Changeset in webkit [211631] by Carlos Garcia Campos
  • 16 edits
    3 adds in trunk

[GTK] Add initial implementation of resource usage overlay
https://bugs.webkit.org/show_bug.cgi?id=167731

Reviewed by Michael Catanzaro.

.:

Enable RESOURCE_USAGE.

  • Source/cmake/OptionsGTK.cmake:

Source/JavaScriptCore:

Also expose nextFireTime() for GTK+ port.

  • heap/GCActivityCallback.cpp:

(JSC::GCActivityCallback::scheduleTimer):
(JSC::GCActivityCallback::cancelTimer):

  • heap/GCActivityCallback.h:

Source/WebCore:

Add an implementation of ResourceUsageOverlay and ResourceUsageThread for Linux systems.

  • PlatformGTK.cmake: Add new new files to compilation.
  • page/Page.cpp:

(WebCore::Page::setResourceUsageOverlayVisible): Do not create the page overlay if accelerated compositing is
not enabled.

  • page/ResourceUsageOverlay.h:
  • page/linux/ResourceUsageOverlayLinux.cpp: Added.

(WebCore::cpuUsageString):
(WebCore::formatByteNumber):
(WebCore::gcTimerString):
(WebCore::ResourceUsageOverlay::platformInitialize):
(WebCore::ResourceUsageOverlay::platformDestroy):

  • page/linux/ResourceUsageThreadLinux.cpp: Added.

(WebCore::cpuPeriod):
(WebCore::cpuUsage):
(WebCore::ResourceUsageThread::platformThreadBody):

Source/WebKit2:

Toggle the resource usage overlay visibility by pressing CTRL + Shift + G. Only available when building with
developer mode enabled.

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseKeyPressEvent):

Source/WTF:

Enable RESOURCE_USAGE for GTK+ port too.

  • wtf/Platform.h:

LayoutTests:

Unskip inpector tests depending on RESOURCE_USAGE.

  • platform/gtk/TestExpectations:
4:56 AM Changeset in webkit [211630] by Csaba Osztrogonác
  • 2 edits in trunk/Source/JavaScriptCore

[cmake] Unreviewed AArch64 buildfix after r211603.
https://bugs.webkit.org/show_bug.cgi?id=167714

  • CMakeLists.txt:
4:40 AM Changeset in webkit [211629] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

REGRESSION(r211486) [GTK] The MiniBrowser doesn't work anymore.
https://bugs.webkit.org/show_bug.cgi?id=167776

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2017-02-03
Reviewed by Yusuke Suzuki.

Since r211486 JSC::initializeThreading() also initializes the main run loop. It would be possible that RunLoop
need to know if it's the main one or not in its constructor, like the GLib impementation does, so we need to
ensure that WTF threading and MainThread are initialized before creating the main RunLoop. This is a quick fix
because the regression made impossible to load anything in a WebView, but I think we should review all the
initialize methods, what they do and how they are called in all the code.

  • Shared/WebKit2Initialize.cpp:

(WebKit::InitializeWebKit2): Call WTF::initializeThreading() and WTF::initializeMainThread() before
JSC::initializeThreading() and do not call RunLoop::initializeMainRunLoop() because it's already called by JSC.

4:21 AM WebKitGTK/2.14.x edited by Michael Catanzaro
(diff)
4:21 AM Changeset in webkit [211628] by Csaba Osztrogonác
  • 2 edits in trunk/Source/WebKit2

[Mac][cmake] One more unreviewed speculative buildfix after r211403.
https://bugs.webkit.org/show_bug.cgi?id=165478

  • UIProcess/API/Cocoa/WKWebView.mm: WebSQLiteDatabaseTrackerClient.h is an iOS specific

header in platform/ios directory which shouldn't and can't be included on non iOS build.

4:03 AM Changeset in webkit [211627] by eocanha@igalia.com
  • 3 edits in trunk/Source/WebCore

[GStreamer] Store preloaded media in webkit's cache
https://bugs.webkit.org/show_bug.cgi?id=119477

Reviewed by Xabier Rodriguez-Calvar.

Files cached on disk by MediaPlayerPrivateGStreamer are deleted only when the player is closed. If the
WebProcess crashed, they're just left there in the cache directory. This patch changes the location
of those temporary files to a proper temporary directory (/var/tmp, as those files aren't actually
reusable, so they don't belong to a cache directory, and /tmp is a bad place because it's RAM-based on
some distros), unlinks (deletes) them right after creation and also deletes any other stalled temporary
file on the old legacy cache directory.

There's no API in GstPlaybin to control the temporary file location, so we do it manually by locating
the GstDownloadBuffer element in the pipeline as soon as it's created, reconfiguring it with the right
temporary file path and deleting the file as soon as it's created.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): Stop listening to element-added.
(WebCore::MediaPlayerPrivateGStreamer::uriDecodeBinElementAddedCallback): Look for GstDownloadBuffer.
(WebCore::MediaPlayerPrivateGStreamer::downloadBufferFileCreatedCallback): Remove the file after creation.
(WebCore::MediaPlayerPrivateGStreamer::purgeOldDownloadFiles): Delete legacy files.
(WebCore::MediaPlayerPrivateGStreamer::sourceChanged): Listen to element-added signals on GstUriDecodeBin.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: New reference to GstDownloadBuffer.
3:53 AM Changeset in webkit [211626] by Csaba Osztrogonác
  • 2 edits in trunk/Source/WebKit2

[Mac][cmake] Unreviewed speculative buildfix after r211403.
https://bugs.webkit.org/show_bug.cgi?id=165478

  • UIProcess/API/Cocoa/WKWebView.mm: WebBackgroundTaskController.h is an iOS specific

header in platform/ios directory which shouldn't and can't be included on non iOS build.

3:12 AM Changeset in webkit [211625] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

WebContent crash when pasting into input fields at com.apple.WebCore: WebCore::ResourceRequestBase::url const + 9
https://bugs.webkit.org/show_bug.cgi?id=167787
rdar://problem/29168795

Reviewed by Andreas Kling.

No test, don't know how to get here.

  • page/animation/CSSPropertyAnimation.cpp:

(WebCore::crossfadeBlend): Null check.

2:23 AM Changeset in webkit [211624] by berto@igalia.com
  • 2 edits in trunk/Source/WebCore

JSDOMWindowBase.cpp doesn't build if the JIT is disabled
https://bugs.webkit.org/show_bug.cgi?id=167785

Reviewed by Carlos Garcia Campos.

r211403 moved GetCallerGlobalObjectFunctor from JSDOMBinding.cpp
to JSDOMWindowBase.cpp, but forgot to include bytecode/CodeBlock.h
in the latter file.

This breaks the build if the JIT is disabled because the headers
that would include ClodeBlock.h indirectly are guarded by
ENABLE(JIT).

  • bindings/js/JSDOMWindowBase.cpp:
1:05 AM Changeset in webkit [211623] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

LayoutTest media/modern-media-controls/tracks-panel/tracks-panel-hide-click-outside.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=165290

Unreviewed test gardening.

Patch by Antoine Quint <Antoine Quint> on 2017-02-03

  • platform/mac/TestExpectations:

Feb 2, 2017:

11:25 PM Changeset in webkit [211622] by akling@apple.com
  • 19 edits
    2 copies in trunk/Source

[Mac] In-process memory pressure monitor for WebContent processes AKA websam
<https://webkit.org/b/167491>
<rdar://problem/30116072>

Reviewed by Antti Koivisto.

Source/JavaScriptCore:

Remove the sloppy "max live heap size" mechanism from JSC in favor of the new
WebCore-side memory footprint monitor.

  • heap/Heap.cpp:

(JSC::Heap::updateAllocationLimits):
(JSC::Heap::didExceedMaxLiveSize): Deleted.

  • heap/Heap.h:

(JSC::Heap::setMaxLiveSize): Deleted.

Source/WebCore:

Add a new timer-based memory pressure monitor that checks the process memory
footprint every 30 seconds and reacts to changes by setting a MemoryUsagePolicy.

There are four MemoryUsagePolicy values:

  • Unrestricted (below 1GB)
  • Conservative (above 1GB)
  • Strict (above 2GB)
  • Panic (above 4GB, or 3GB if 32-bit)

For Strict and above, the old-style "isUnderMemoryPressure()" API will return true.

Transitioning to a higher policy will cause memory pressure handlers to run:

At Strict, we run the "non-critical" memory pressure handler, then carry on.

At Panic, we run the "critical" memory pressure handler. If that fails to recover
enough memory to bring us back below 4GB, we may kill the process:

A process is eligible to get killed for using too much memory if:

  • It's not visible on screen (i.e it's a background tab.)
  • It's not playing audio.
  • It has not performed a main frame navigation in the last hour.

Before killing the process, an exit-time callback will run. This patch installs such
a callback that prints out some time-of-death statistics about C++ and JavaScript memory
usage to hopefully help understand what was soaking up all the memory.

  • bindings/js/CommonVM.cpp:

(WebCore::commonVMSlow):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::setState):

  • page/MainFrame.cpp:

(WebCore::MainFrame::didCompleteLoad):

  • page/MainFrame.h:
  • page/MemoryRelease.cpp:

(WebCore::pageCount):
(WebCore::logMemoryStatisticsAtTimeOfDeath):
(WebCore::didExceedMemoryLimitAndFailedToRecover):
(WebCore::processIsEligibleForMemoryKill):

  • page/MemoryRelease.h:
  • page/ResourceUsageThread.h:
  • page/cocoa/ResourceUsageThreadCocoa.mm:

(WebCore::vmPageSize):

  • platform/MemoryPressureHandler.cpp:

(WebCore::MemoryPressureHandler::MemoryPressureHandler):
(WebCore::MemoryPressureHandler::setShouldUsePeriodicMemoryMonitor):
(WebCore::toString):
(WebCore::thresholdForPolicy):
(WebCore::policyForFootprint):
(WebCore::MemoryPressureHandler::measurementTimerFired):

  • platform/MemoryPressureHandler.h:

(WebCore::MemoryPressureHandler::setMemoryKillCallback):
(WebCore::MemoryPressureHandler::setProcessIsEligibleForMemoryKillCallback):
(WebCore::MemoryPressureHandler::isUnderMemoryPressure):

Source/WebKit2:

Enable the in-process memory monitor for WebContent processes on macOS 10.12+

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):

Source/WTF:

Add a WTF helper function for getting the current process's memory footprint.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/MemoryFootprint.cpp:

(WTF::memoryFootprint):

  • wtf/MemoryFootprint.h:
10:30 PM Changeset in webkit [211621] by achristensen@apple.com
  • 5 edits in trunk

URLParser: Fix parsing invalid IPv4 addresses with non-ASCII characters
https://bugs.webkit.org/show_bug.cgi?id=167773
<rdar://problem/30221102>

Reviewed by Ryosuke Niwa.

Source/WebCore:

If an invalid IPv4 address contains the first syntaxViolation (difference between input and canonicalized URL),
an iterator is used to calculate how far we have parsed in the input string to copy all the syntax-violation-free
characters into a Vector. If a URL contains only ASCII that doesn't contain anything percent-encoded in the host,
there is a fast path to parse ASCII hosts. All my existing invalid IPv4 tests followed this path.
If there is a non-ASCII character, we need to use an iterator to the original string instead of an iterator
to the string after converting the input string's host to ASCII.

Covered by a new API test which used to RELEASE_ASSERT.

  • platform/URLParser.cpp:

(WebCore::URLParser::parseIPv4Host):
(WebCore::URLParser::parseIPv6Host):
(WebCore::URLParser::parseHostAndPort):

  • platform/URLParser.h:

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):

10:25 PM WebKitGTK/2.14.x edited by Carlos Garcia Campos
(diff)
10:20 PM Changeset in webkit [211620] by achristensen@apple.com
  • 18 edits
    2 adds in trunk/LayoutTests/imported/w3c

Update URL web platform tests
https://bugs.webkit.org/show_bug.cgi?id=167777

Reviewed by Ryosuke Niwa.

  • web-platform-tests/url/a-element-expected.txt:
  • web-platform-tests/url/a-element-origin-expected.txt:
  • web-platform-tests/url/a-element-origin-xhtml-expected.txt:
  • web-platform-tests/url/a-element-origin-xhtml.xhtml:
  • web-platform-tests/url/a-element-origin.html:
  • web-platform-tests/url/a-element-xhtml-expected.txt:
  • web-platform-tests/url/a-element-xhtml.xhtml:
  • web-platform-tests/url/a-element.html:
  • web-platform-tests/url/setters_tests.json:
  • web-platform-tests/url/url-constructor-expected.txt:
  • web-platform-tests/url/url-origin-expected.txt:
  • web-platform-tests/url/url-setters-expected.txt:
  • web-platform-tests/url/urlencoded-parser-expected.txt: Added.
  • web-platform-tests/url/urlencoded-parser.html: Added.
  • web-platform-tests/url/urlsearchparams-constructor-expected.txt:
  • web-platform-tests/url/urlsearchparams-constructor.html:
  • web-platform-tests/url/urlsearchparams-sort-expected.txt:
  • web-platform-tests/url/urlsearchparams-sort.html:
  • web-platform-tests/url/urltestdata.json:
8:50 PM Changeset in webkit [211619] by bshafiei@apple.com
  • 6 edits in tags/Safari-604.1.5.3.1/Source

Versioning.

8:46 PM Changeset in webkit [211618] by bshafiei@apple.com
  • 1 copy in tags/Safari-604.1.5.3.1

New tag.

5:54 PM Changeset in webkit [211617] by matthew_hanson@apple.com
  • 5 edits in branches/safari-603-branch/Source

Versioning.

5:46 PM Changeset in webkit [211616] by ap@apple.com
  • 16 edits
    2 moves
    2 adds
    2 deletes in trunk/LayoutTests

Multiple HTTP tests fail with Apache 2.4.25
https://bugs.webkit.org/show_bug.cgi?id=167678
<rdar://problem/30060142>

Reviewed by Sam Weinig.

Newer versions of Apache have a security fix where they generate an internal server
error upon seeing an invalid HTTP header field. There is an opt-out configuration
option which didn't quite work in my testing, but regardless, we should only use
"nph-" CGIs for invalid responses. This is how Apache knows that it shouldn't
attempt to parse the response.

This also uncovered a test bug.

  • http/tests/cache/disk-cache/resources/cache-test.js: (generateTestURL):

Without escaping, we were getting a broken response in attachment tests:

Content-Disposition: attachment

filename: "f.txt"

Note how ";" turned into a newline.

  • http/tests/misc/non-utf8-header-name-expected.txt: Removed.
  • http/tests/misc/non-utf8-header-name.php: Removed.
  • http/tests/misc/nph-non-utf8-header-name-expected.txt: Copied from LayoutTests/http/tests/misc/non-utf8-header-name-expected.txt.
  • http/tests/misc/nph-non-utf8-header-name.pl: Copied from LayoutTests/http/tests/misc/non-utf8-header-name.php.
  • http/tests/preload/download_resources_from_invalid_headers.html:
  • http/tests/preload/resources/invalid_resources_from_header.php: Removed.
  • http/tests/preload/resources/nph-invalid_resources_from_header.pl: Copied from LayoutTests/http/tests/preload/resources/invalid_resources_from_header.php.
  • http/tests/security/contentSecurityPolicy/directive-parsing-01.html:
  • http/tests/security/contentSecurityPolicy/directive-parsing-02.html:
  • http/tests/security/contentSecurityPolicy/directive-parsing-03.html:
  • http/tests/security/contentSecurityPolicy/directive-parsing-04.html:
  • http/tests/security/contentSecurityPolicy/directive-parsing-05.html:
  • http/tests/security/contentSecurityPolicy/resources/echo-script-src.pl: Removed.
  • http/tests/security/contentSecurityPolicy/resources/multiple-iframe-test.js:
  • http/tests/security/contentSecurityPolicy/resources/nph-echo-script-src.pl: Copied from LayoutTests/http/tests/security/contentSecurityPolicy/resources/echo-script-src.pl.
  • http/tests/security/contentSecurityPolicy/script-loads-with-img-src.html:
  • http/tests/security/contentSecurityPolicy/script-src-none.html:
  • http/tests/security/contentSecurityPolicy/script-src-self-blocked-01.html:
  • http/tests/security/contentSecurityPolicy/script-src-self-blocked-02.html:
  • http/tests/security/contentSecurityPolicy/script-src-self-blocked-03.html:
  • http/tests/security/contentSecurityPolicy/script-src-self.html:
  • http/tests/security/contentSecurityPolicy/script-src-star-cross-scheme.html:

Changed scripts that are used to generate invalid responses to "nph-" ones.

5:36 PM Changeset in webkit [211615] by matthew_hanson@apple.com
  • 6 edits in branches/safari-604.1.5-branch/Source

Versioning.

5:15 PM Changeset in webkit [211614] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-604.1.5.3

Tag Safari-604.1.5.3.

5:01 PM Changeset in webkit [211613] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

CrashTracer: [USER] com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::URL::host const + 9
https://bugs.webkit.org/show_bug.cgi?id=167766
<rdar://problem/30132707>

Reviewed by Chris Dumez.

The mainframe's document pointer may be null when tearing down a page upon navigation to a page that is in the
page cache. If this triggers a GC sweep, we will attempt to reload touch bar media controls, which (as a part of
the media controller heuristic) checks the mainframe's document URL to see if quirks should be enabled. This
assumes that the mainframe's document exists, which is not a safe assumption if page navigation is occurring. As
such, we need a null check for the mainframe's document in needsPlaybackControlsManagerQuirk().

No test, as we were unable to reproduce this crash.

  • html/HTMLMediaElement.cpp:

(WebCore::needsPlaybackControlsManagerQuirk):

5:00 PM Changeset in webkit [211612] by Chris Dumez
  • 9 edits
    2 adds in trunk

Suspend SVG animations in hidden pages
https://bugs.webkit.org/show_bug.cgi?id=167763
<rdar://problem/29986313>

Reviewed by Simon Fraser.

Source/WebCore:

Suspend SVG animations in hidden pages to save power, similarly to what
we already do for another types of animations.

Test: svg/animations/animations-paused-page-non-visible.html

  • page/Page.cpp:

(WebCore::setSVGAnimationSuspended):
(WebCore::Page::setIsVisibleInternal):

  • svg/SVGDocumentExtensions.cpp:

(WebCore::SVGDocumentExtensions::pauseAnimations):
(WebCore::SVGDocumentExtensions::unpauseAnimations):

  • svg/SVGDocumentExtensions.h:

(WebCore::SVGDocumentExtensions::areAnimationsPaused):

  • testing/Internals.cpp:

(WebCore::Internals::areSVGAnimationsPaused):

  • testing/Internals.h:
  • testing/Internals.idl:

LayoutTests:

Add layout test coverage.

  • svg/animations/animations-paused-page-non-visible-expected.txt: Added.
  • svg/animations/animations-paused-page-non-visible.html: Added.
4:53 PM Changeset in webkit [211611] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-603.1.24

Tag Safari-603.1.24.

4:35 PM Changeset in webkit [211610] by Ryan Haddad
  • 2 edits
    4 deletes in trunk/Source/WebCore

Unreviewed, rolling out r211596 and r211605.
https://bugs.webkit.org/show_bug.cgi?id=167767

This change broke certain build configurations (Requested by
ryanhaddad on #webkit).

Reverted changesets:

"[Mac] Add classes to manage audio samples"
https://bugs.webkit.org/show_bug.cgi?id=167739
http://trac.webkit.org/changeset/211596

"Unreviewed speculative build fix."
http://trac.webkit.org/changeset/211605

Patch by Commit Queue <commit-queue@webkit.org> on 2017-02-02

4:26 PM Changeset in webkit [211609] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Add a SIGILL crash analyzer to make debugging SIGILLs easier.
https://bugs.webkit.org/show_bug.cgi?id=167714
<rdar://problem/30318237>

Not reviewed.

Build fix for CLOOP build.

  • tools/VMInspector.cpp:
4:22 PM Changeset in webkit [211608] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebInspectorUI

Web Inspector: can't jump from Search Tab result to see resource in other tabs (Resource, Debugger, Network)
https://bugs.webkit.org/show_bug.cgi?id=167072

Patch by Devin Rousso <Devin Rousso> on 2017-02-02
Reviewed by Timothy Hatcher.

  • UserInterface/Base/Main.js:

(WebInspector.tabContentViewForRepresentedObject):
(WebInspector.showRepresentedObject):
(WebInspector.showMainFrameDOMTree):
(WebInspector.showSourceCodeForFrame):
(WebInspector.showSourceCode):
(WebInspector.showSourceCodeLocation):
(WebInspector.showOriginalUnformattedSourceCodeLocation):
(WebInspector.showOriginalOrFormattedSourceCodeLocation):
(WebInspector.showOriginalOrFormattedSourceCodeTextRange):
(WebInspector.showResourceRequest):
Rework parameters to add optional options dictionary that can be used to indicate
additional functionality.

  • UserInterface/Views/TabBrowser.js:

(WebInspector.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
Ignore instances of SearchTabContentView as it can display content views for all types of
searchable data. Determined by a newly added optional options parameter.

  • UserInterface/Base/Utilities.js:

(Object.shallowMerge):
Merges the keys of two objects into a new one.

  • UserInterface/Views/ComputedStyleDetailsPanel.js:

(WebInspector.ComputedStyleDetailsPanel.prototype._goToRegionFlowArrowWasClicked):
(WebInspector.ComputedStyleDetailsPanel.prototype._goToContentFlowArrowWasClicked):

  • UserInterface/Views/SearchSidebarPanel.js:

(WebInspector.SearchSidebarPanel.prototype.performSearch.createTreeElementForMatchObject):
(WebInspector.SearchSidebarPanel.prototype.performSearch.resourceCallback):
(WebInspector.SearchSidebarPanel.prototype.performSearch.resourcesCallback):
(WebInspector.SearchSidebarPanel.prototype.performSearch.searchScripts.scriptCallback):
(WebInspector.SearchSidebarPanel.prototype.performSearch.searchScripts):
(WebInspector.SearchSidebarPanel.prototype.performSearch.domSearchResults):
(WebInspector.SearchSidebarPanel.prototype.performSearch.domCallback):
(WebInspector.SearchSidebarPanel.prototype.performSearch):
(WebInspector.SearchSidebarPanel.prototype._treeElementDoubleClick):

  • UserInterface/Views/TreeElement.js:

(WebInspector.TreeElement.treeElementDoubleClicked):
Add an event dispatch whenever a TreeElement is double clicked via the dblclick event.

4:15 PM Changeset in webkit [211607] by achristensen@apple.com
  • 2 edits in trunk

Build fix after r211602
https://bugs.webkit.org/show_bug.cgi?id=167758

  • Source/Makefile:

Don't build libwebrtc by default. It's not used yet anyway.

4:09 PM Changeset in webkit [211606] by ap@apple.com
  • 2 edits in trunk/Tools

Remove check for SkipSafariExecutableEntitlementChecks
https://bugs.webkit.org/show_bug.cgi?id=167762
rdar://problem/22480673

Reviewed by Dan Bernstein.

  • Scripts/webkitdirs.pm:

(safariPathFromSafariBundle):
(skipSafariExecutableEntitlementChecks): Deleted.

4:05 PM Changeset in webkit [211605] by Ryan Haddad
  • 2 edits in trunk/Source/WebCore

Unreviewed speculative build fix.

  • platform/audio/mac/AudioSampleDataSource.cpp:

(WebCore::AudioSampleDataSource::setupConverter):
(WebCore::AudioSampleDataSource::pushSamples):

3:39 PM Changeset in webkit [211604] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

Unreviewed, rolling out r211535, r211566, and r211568.
https://bugs.webkit.org/show_bug.cgi?id=167765

Causing timeouts? (Requested by andersca_ on #webkit).

Reverted changesets:

"IPC::Connection receive ports should be guarded"
https://bugs.webkit.org/show_bug.cgi?id=167704
http://trac.webkit.org/changeset/211535

"<rdar://problem/30323148> Webkit Nightly on 10.10 broken"
http://trac.webkit.org/changeset/211566

"<rdar://problem/30323148> Webkit Nightly on 10.10 broken"
http://trac.webkit.org/changeset/211568

3:32 PM Changeset in webkit [211603] by mark.lam@apple.com
  • 17 edits
    5 adds in trunk/Source

Add a SIGILL crash analyzer to make debugging SIGILLs easier.
https://bugs.webkit.org/show_bug.cgi?id=167714
<rdar://problem/30318237>

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

The current implementation is only for X86_64 and ARM64 on OS(DARWIN). The
analyzer is not enabled for all other ports.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • API/JSVirtualMachine.mm:
  • assembler/ARM64Assembler.h:

(JSC::ARM64Assembler::illegalInstruction):

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::illegalInstruction):

  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::illegalInstruction):

  • assembler/X86Assembler.h:

(JSC::X86Assembler::illegalInstruction):

  • heap/Heap.cpp:

(JSC::Heap::forEachCodeBlockIgnoringJITPlansImpl):

  • heap/Heap.h:
  • heap/HeapInlines.h:

(JSC::Heap::forEachCodeBlockIgnoringJITPlans):

  • runtime/Options.cpp:

(JSC::Options::isAvailable):
(JSC::recomputeDependentOptions):

  • runtime/Options.h:
  • runtime/VM.cpp:

(JSC::VM::VM):
(JSC::VM::~VM):

  • runtime/VM.h:
  • tools/SigillCrashAnalyzer.cpp: Added.

(JSC::SignalContext::SignalContext):
(JSC::SignalContext::dump):
(JSC::handleCrash):
(JSC::initializeCrashHandler):
(JSC::ensureSigillCrashAnalyzer):
(JSC::SigillCrashAnalyzer::analyze):
(JSC::SigillCrashAnalyzer::dumpCodeBlock):

  • tools/SigillCrashAnalyzer.h: Added.
  • tools/VMInspector.cpp: Added.

(JSC::VMInspector::instance):
(JSC::VMInspector::add):
(JSC::VMInspector::remove):
(JSC::ensureIsSafeToLock):

  • tools/VMInspector.h: Added.

(JSC::VMInspector::iterate):

Source/WTF:

  • wtf/StdLibExtras.h:
3:31 PM Changeset in webkit [211602] by achristensen@apple.com
  • 5 edits
    6 adds in trunk/Source

Build libwebrtc and dependencies with Xcode
https://bugs.webkit.org/show_bug.cgi?id=167758

Reviewed by Dean Jackson.

Source/ThirdParty/libwebrtc:

  • Configurations: Added.
  • Configurations/Base.xcconfig: Added.
  • Configurations/DebugRelease.xcconfig: Added.
  • Configurations/boringssl.xcconfig: Added.
  • Configurations/libwebrtc.xcconfig: Added.
  • Configurations/opus.xcconfig: Added.
  • libwebrtc.xcodeproj/project.pbxproj:

Source/WebCore:

  • WebCore.xcodeproj/project.pbxproj:
3:21 PM Changeset in webkit [211601] by Megan Gardner
  • 3 edits in trunk/Source/WebKit2

Don't attempt wide gammut on older OSes
https://bugs.webkit.org/show_bug.cgi?id=167754
<rdar://problem/29931587>

Reviewed by Tim Horton.

We need to guard our extended color checks the same way throughout the code, or we will attempt to set up
support for wide gamut partially, which causes crashes when using sharable bitmap.

  • WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:

(WebKit::convertImageToBitmap):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::getPositionInformation):

3:18 PM Changeset in webkit [211600] by Chris Dumez
  • 14 edits in trunk

{}.toString.call(crossOriginWindow) should return "[object Object]"
https://bugs.webkit.org/show_bug.cgi?id=167701
<rdar://problem/30330797>

Reviewed by Keith Miller.

LayoutTests/imported/w3c:

Rebaseline W3C test now that one more check is passing.

  • web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-expected.txt:

Source/JavaScriptCore:

Have JSProxy forward toStringName calls to its target so Window
can override it.

  • runtime/JSProxy.cpp:

(JSC::JSProxy::toStringName):

  • runtime/JSProxy.h:

Source/WebCore:

{}.toString.call() to should "[object Object] for cross origin
Window / Location objects. This new behavior is consistent with
Firefox and Chrome.

No new tests, rebaselined existing tests.

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::JSDOMWindow::toStringName):

  • bindings/js/JSLocationCustom.cpp:

(WebCore::JSLocation::toStringName):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):

  • bindings/scripts/IDLAttributes.txt:
  • page/DOMWindow.idl:
  • page/Location.idl:

LayoutTests:

Rebaselined existing test now that more checks are passing.

  • http/tests/security/symbols-cross-origin-expected.txt:
3:15 PM Changeset in webkit [211599] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark inspector/debugger/breakpoint-scope.html as flaky on macOS debug.
https://bugs.webkit.org/show_bug.cgi?id=164293

Unreviewed test gardening.

  • platform/mac/TestExpectations:
3:12 PM Changeset in webkit [211598] by enrica@apple.com
  • 2 edits in trunk/Source/WebKit2

WK2: cannot tap on candidate view with hardware keyboard.
https://bugs.webkit.org/show_bug.cgi?id=167761
rdar://problem/28775395

Reviewed by Tim Horton.

The candidate view is a subview of the view returned by
automaticallySelectedOverlay and it should be the unscaled view
instead of the WKContentView.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView automaticallySelectedOverlay]):

3:03 PM Changeset in webkit [211597] by Wenson Hsieh
  • 26 edits in trunk/Source

Drag images should be anchored to the mouse location
https://bugs.webkit.org/show_bug.cgi?id=167690
<rdar://problem/30295261>

Reviewed by Enrica Casucci.

Source/WebCore:

Adds logic to compute the mouse anchor point. This is a point in the unit square indicating where the drag
origin is relative to the bounds of the drag image. There is no behavior change, since this anchor point is not
used by any client yet; this patch only computes and vends this information from WebCore.

  • loader/EmptyClients.cpp:
  • page/DragClient.h:
  • page/DragController.cpp:

(WebCore::DragController::startDrag):
(WebCore::DragController::doImageDrag):
(WebCore::DragController::doSystemDrag):

  • page/DragController.h:
  • platform/DragImage.h:

Source/WebKit/mac:

Adds some plumbing for the anchor point in the WK1 client layer.

  • WebCoreSupport/WebDragClient.h:
  • WebCoreSupport/WebDragClient.mm:

(WebDragClient::startDrag):

Source/WebKit/win:

Adds some plumbing for the anchor point in the WK1 client layer.

  • WebCoreSupport/WebDragClient.cpp:

(WebDragClient::startDrag):

  • WebCoreSupport/WebDragClient.h:

Source/WebKit2:

Adds some plumbing for the mouse anchor point in the UI process. Additionally, refactors some unrelated code
for handling data interaction.

  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::startDataInteractionWithImage):

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/mac/PageClientImpl.h:
  • UIProcess/mac/PageClientImpl.mm:

(WebKit::PageClientImpl::startDataInteractionWithImage):

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::setDragImage):

  • WebProcess/WebCoreSupport/WebDragClient.cpp:

(WebKit::WebDragClient::startDrag):

  • WebProcess/WebCoreSupport/WebDragClient.h:
  • WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:

(WebKit::WebDragClient::startDrag):

3:01 PM Changeset in webkit [211596] by eric.carlson@apple.com
  • 2 edits
    4 adds in trunk/Source/WebCore

[Mac] Add classes to manage audio samples
https://bugs.webkit.org/show_bug.cgi?id=167739

Reviewed by Jer Noble.

No new tests, this code isn't used yet.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/audio/mac/AudioSampleBufferList.cpp: Added.

(WebCore::AudioSampleBufferList::create):
(WebCore::AudioSampleBufferList::AudioSampleBufferList):
(WebCore::AudioSampleBufferList::~AudioSampleBufferList):
(WebCore::AudioSampleBufferList::setSampleCount):
(WebCore::AudioSampleBufferList::applyGain):
(WebCore::AudioSampleBufferList::mixFrom):
(WebCore::AudioSampleBufferList::copyFrom):
(WebCore::AudioSampleBufferList::copyTo):
(WebCore::AudioSampleBufferList::reset):
(WebCore::AudioSampleBufferList::zero):
(WebCore::AudioSampleBufferList::zeroABL):
(WebCore::AudioSampleBufferList::convertInput):
(WebCore::AudioSampleBufferList::audioConverterCallback):
(WebCore::AudioSampleBufferList::configureBufferListForStream):

  • platform/audio/mac/AudioSampleBufferList.h: Added.

(WebCore::AudioSampleBufferList::streamDescription):
(WebCore::AudioSampleBufferList::bufferList):
(WebCore::AudioSampleBufferList::sampleCapacity):
(WebCore::AudioSampleBufferList::sampleCount):
(WebCore::AudioSampleBufferList::timestamp):
(WebCore::AudioSampleBufferList::hostTime):
(WebCore::AudioSampleBufferList::setTimes):
(WebCore::AudioSampleBufferList::audioBufferListSizeForStream):

  • platform/audio/mac/AudioSampleDataSource.cpp: Added.

(WebCore::AudioSampleDataSource::create):
(WebCore::AudioSampleDataSource::AudioSampleDataSource):
(WebCore::AudioSampleDataSource::~AudioSampleDataSource):
(WebCore::AudioSampleDataSource::setPaused):
(WebCore::AudioSampleDataSource::setupConverter):
(WebCore::AudioSampleDataSource::setInputFormat):
(WebCore::AudioSampleDataSource::setOutputFormat):
(WebCore::AudioSampleDataSource::hostTime):
(WebCore::AudioSampleDataSource::pushSamplesInternal):
(WebCore::AudioSampleDataSource::pushSamples):
(WebCore::AudioSampleDataSource::pullSamplesInternal):
(WebCore::AudioSampleDataSource::pullSamples):

  • platform/audio/mac/AudioSampleDataSource.h: Added.

(WebCore::AudioSampleDataSource::setVolume):
(WebCore::AudioSampleDataSource::volume):
(WebCore::AudioSampleDataSource::setMuted):
(WebCore::AudioSampleDataSource::muted):

2:45 PM Changeset in webkit [211595] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark workesr/bomb/html as flaky on macOS.
https://bugs.webkit.org/show_bug.cgi?id=167757

Unreviewed test gardening.

  • platform/mac/TestExpectations:
2:07 PM Changeset in webkit [211594] by Joseph Pecoraro
  • 37 edits
    4 copies
    13 adds in trunk

Support Performance API (performance.now(), UserTiming) in Workers
https://bugs.webkit.org/show_bug.cgi?id=167717

Reviewed by Ryosuke Niwa.

Source/WebCore:

Tests: performance-api/performance-mark-name.html

performance-api/performance-now-api.html
performance-api/performance-now-time-origin-in-worker.html
performance-api/user-timing-apis.html

  • CMakeLists.txt:
  • DerivedSources.make:

New files.

  • page/DOMWindow.idl:
  • page/GlobalPerformance.idl:
  • workers/WorkerGlobalScope.idl:

Add partial interface for performance attribute.

  • page/Performance.idl:
  • page/PerformanceEntry.idl:
  • page/PerformanceMark.idl:
  • page/PerformanceMeasure.idl:
  • page/PerformanceObserver.idl:
  • page/PerformanceObserverEntryList.idl:

Expose these to Workers.

  • page/Performance.cpp:

(WebCore::Performance::Performance):
(WebCore::Performance::contextDestroyed):

  • page/Performance.h:

Use the EventQueue variant that works with any ScriptExectionContext.

  • page/PerformanceObserver.cpp:

(WebCore::PerformanceObserver::PerformanceObserver):
Get the Performance base in a Worker context.

  • page/PerformanceUserTiming.cpp:

(WebCore::UserTiming::mark):
Only reject legacy special mark names in a Window, not a Worker.

(WebCore::UserTiming::findExistingMarkStartTime):
Simple implementation returns 0 as the start time in Workers. The spec
is currently imprecise here, but it does not have the unusual
PerformanceTiming behavior in a Window which is part of User Timing 1.

  • workers/Worker.cpp:

(WebCore::Worker::create):
(WebCore::Worker::notifyFinished):

  • workers/Worker.h:

Record the moment of Worker creation.

  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::WorkerGlobalScope):
(WebCore::WorkerGlobalScope::performance):

  • workers/WorkerGlobalScope.h:

Construct the Performance object with the moment of creation (timeOrigin).

  • workers/DedicatedWorkerGlobalScope.cpp:

(WebCore::DedicatedWorkerGlobalScope::create):
(WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope):

  • workers/DedicatedWorkerGlobalScope.h:
  • workers/DedicatedWorkerThread.cpp:

(WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
(WebCore::DedicatedWorkerThread::createWorkerGlobalScope):

  • workers/DedicatedWorkerThread.h:
  • workers/WorkerGlobalScopeProxy.h:
  • workers/WorkerMessagingProxy.cpp:

(WebCore::WorkerMessagingProxy::startWorkerGlobalScope):

  • workers/WorkerMessagingProxy.h:
  • workers/WorkerThread.cpp:

(WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
(WebCore::WorkerThread::WorkerThread):
(WebCore::WorkerThread::workerThread):

  • workers/WorkerThread.h:

Pass the moment of creation (timeOrigin) through to WorkerGlobalScope creation.

LayoutTests:

  • js/dom/global-constructors-attributes-dedicated-worker-expected.txt:

Updated now that Performance classes are in Workers.

  • performance-api/performance-now-api-expected.txt: Added.
  • performance-api/performance-now-api.html: Added.
  • performance-api/performance-now-time-origin-in-worker-expected.txt: Added.
  • performance-api/performance-now-time-origin-in-worker.html: Added.

New tests to cover performance.now.

  • performance-api/performance-mark-name-expected.txt: Added.
  • performance-api/performance-mark-name.html: Added.
  • performance-api/resources/mark-name.js: Added.
  • performance-api/resources/user-timing-api.js: Added.
  • performance-api/user-timing-apis-expected.txt: Added.
  • performance-api/user-timing-apis.html: Added.

New tests to cover user-timing and performance.mark behavior.

  • performance-api/performance-observer-api-expected.txt:
  • performance-api/performance-observer-api.html:
  • performance-api/performance-observer-basic-expected.txt:
  • performance-api/performance-observer-basic.html:
  • performance-api/performance-timeline-api-expected.txt:
  • performance-api/performance-timeline-api.html:
  • performance-api/resources/now-api.js: Added.
  • performance-api/resources/observer-api.js: Copied from LayoutTests/performance-api/performance-observer-api.html.
  • performance-api/resources/observer-basic.js: Copied from LayoutTests/performance-api/performance-observer-basic.html.
  • performance-api/resources/time-origin-in-worker.js: Added.
  • performance-api/resources/timeline-api.js: Copied from LayoutTests/performance-api/performance-timeline-api.html.

Update some of the existing tests to check in a Document and Worker.

  • imported/w3c/web-platform-tests/user-timing/test_user_timing_mark_and_measure_exception_when_invoke_with_timing_attributes-expected.txt:

Minor progression.

1:36 PM Changeset in webkit [211593] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark imported/w3c/web-platform-tests/shadow-dom/slotchange.html as flaky on macOS.
https://bugs.webkit.org/show_bug.cgi?id=167652

Unreviewed test gardening.

  • platform/mac/TestExpectations:
1:31 PM Changeset in webkit [211592] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

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

Caused mediastream crashes. (Requested by bfulgham_ on
#webkit).

Reverted changeset:

"Correct memory leak in MediaConstraints"
https://bugs.webkit.org/show_bug.cgi?id=167744
http://trac.webkit.org/changeset/211579

1:29 PM Changeset in webkit [211591] by Chris Dumez
  • 93 edits in trunk/Source

Rename Node::inDocument() to isConnected()
https://bugs.webkit.org/show_bug.cgi?id=167743

Reviewed by Sam Weinig.

Rename Node::inDocument() to isConnected() to match the DOM specification more closely:

Source/WebKit/mac:

  • DOM/DOMNode.mm:

(-[DOMNode isConnected]):

  • WebView/WebFrame.mm:

(-[WebFrame selectNSRange:onElement:]):

1:25 PM Changeset in webkit [211590] by graouts@webkit.org
  • 26 edits
    4 copies
    21 adds in trunk

[Modern Media Controls] Provide a compact mode for when the controls are small
https://bugs.webkit.org/show_bug.cgi?id=167746
<rdar://problem/29565842>

Reviewed by Dean Jackson.

Source/WebCore:

When the macOS inline media controls become too narrow to display both the volume and fullscreen
buttons in their right container (width < 242), we switch to a compact mode where the controls bar
is shorter and the buttons smaller.

To facilitate this, we provide a new subclass of MacOSInlineMediaControls called MacOSCompactInlineMediaControls
which changes some of the layout properties of the buttons to have shorter margins around buttons.

We also added a new "Compact" LayoutTrait and improved IconService to provide specific icons
for this mode for the buttons that can exist in compact mode.

To correctly implement the design, we needed to add a way to provide different margins around the
left and right edges of the container, so the "padding" property is now split between "leftMargin"
and "rightMargin", and to make property naming cleaner, the "margin" property which specifies the
space between each button in a container is now called "buttonMargin". We also set the default
values for those properties to be 24 (instead of 0) which are the most widely used values, requiring
less customization.

Tests: media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-buttons-styles.html

media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-constructor.html
media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-controls-bar-styles.html
media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-layout.html
media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-volume-styles.html
media/modern-media-controls/media-controller/media-controller-toggle-compact-mode.html

  • Modules/modern-media-controls/controls/buttons-container.js:

(ButtonsContainer.prototype.layout): Refactor the "margin" and "padding" properties into
"leftMargin", "rightMargin" and "buttonMargin".

  • Modules/modern-media-controls/controls/icon-button.js:

(IconButton.prototype._updateImage): Fix a small bug that would prevent the image source
change to occur after changing the "iconName" property should the previous and new icons
share the same metrics, which is the case for the "play" and "pause" icons in compact mode.

  • Modules/modern-media-controls/controls/icon-service.js: Add support for compact variants.

(const.iconService.new.IconService.prototype._fileNameAndPlatformForIconNameAndLayoutTraits):
(const.iconService.new.IconService):

  • Modules/modern-media-controls/controls/ios-inline-media-controls.js: Adopt new margin defaults.
  • Modules/modern-media-controls/controls/layout-item.js: Add the new "Compact" LayoutTrait.
  • Modules/modern-media-controls/controls/macos-compact-inline-media-controls.css: Added.

(.media-controls.mac.inline.compact > .controls-bar):
(.media-controls.mac.inline.compact button.play-pause):
(.media-controls.mac.inline.compact button.skip-back):
(.media-controls.mac.inline.compact .scrubber.slider):
(.media-controls.mac.inline.compact button.mute):
(.media-controls.mac.inline.compact button.fullscreen):
(.media-controls.mac.inline.compact .time-label,):
(.media-controls.mac.inline.compact .volume-slider-container):
(.media-controls.mac.inline.compact .volume.slider):
(.media-controls.mac.inline.compact .scrubber.slider > input::-webkit-slider-thumb):

  • Modules/modern-media-controls/controls/macos-compact-inline-media-controls.js: Added.

(MacOSCompactInlineMediaControls):

  • Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js: Adopt new margin defaults.

(MacOSFullscreenMediaControls.prototype.layout):

  • Modules/modern-media-controls/controls/macos-inline-media-controls.js: Adopt new margin defaults

and make the _leftContainer and _rightContainer properties public such that the MacOSCompactInlineMediaControls
subclass may customize them without accessing a private property.
(MacOSInlineMediaControls.prototype.layout):
(MacOSInlineMediaControls.prototype.showTracksPanel):

are below the 242px width threshold.
(MediaController.prototype.get layoutTraits):
(MediaController.prototype.handleEvent):
(MediaController.prototype._updateControlsIfNeeded):
(MediaController.prototype._shouldFadeBetweenControls):
(MediaController.prototype._updateControlsSize):
(MediaController.prototype._controlsWidth):
(MediaController.prototype._controlsClass):
(MediaController):

  • WebCore.xcodeproj/project.pbxproj: Add new files and perform some cleanup so that the

project accurately lists all the existing project files and remove some older ones.

LayoutTests:

Add some new tests for the compact mode and update some tests after the ButtonsContainer
"padding" and "margin" properties refactoring.

  • media/modern-media-controls/buttons-container/buttons-container-buttons-property.html:
  • media/modern-media-controls/buttons-container/buttons-container-constructor-expected.txt:
  • media/modern-media-controls/buttons-container/buttons-container-constructor.html:
  • media/modern-media-controls/buttons-container/buttons-container-layout.html:
  • media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-constructor-expected.txt:
  • media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-constructor.html:
  • media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-buttons-styles-expected.txt: Added.
  • media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-buttons-styles.html: Added.
  • media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-constructor-expected.txt: Added.
  • media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-constructor.html: Added.
  • media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-controls-bar-styles-expected.txt: Added.
  • media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-controls-bar-styles.html: Added.
  • media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-layout-expected.txt: Added.
  • media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-layout.html: Added.
  • media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-volume-styles-expected.txt: Added.
  • media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-volume-styles.html: Added.
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-right-container-margin-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-right-container-margin.html:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-constructor-expected.txt:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-constructor.html:
  • media/modern-media-controls/media-controller/media-controller-toggle-compact-mode-expected.txt: Added.
  • media/modern-media-controls/media-controller/media-controller-toggle-compact-mode.html: Added.
  • media/modern-media-controls/resources/media-controls-loader.js:
  • platform/ios-simulator/TestExpectations:
1:24 PM Changeset in webkit [211589] by commit-queue@webkit.org
  • 19 edits
    2 deletes in trunk/Source

Unreviewed, rolling out r211571 and r211582.
https://bugs.webkit.org/show_bug.cgi?id=167751

This change caused API test WebKit1.MemoryPressureHandler to
fail with an assertion. (Requested by ryanhaddad on #webkit).

Reverted changesets:

"[Mac] In-process memory pressure monitor for WebContent
processes."
https://bugs.webkit.org/show_bug.cgi?id=167491
http://trac.webkit.org/changeset/211571

"Unreviewed attempt to fix the Windows build after r211571."
http://trac.webkit.org/changeset/211582

1:05 PM Changeset in webkit [211588] by mitz@apple.com
  • 2 edits in trunk/Source/WebKit2

The Make Frameworks Symbolic Link build phase can end up creating a symlink inside the Frameworks subdirectory
https://bugs.webkit.org/show_bug.cgi?id=167745

Reviewed by Tim Horton.

  • WebKit2.xcodeproj/project.pbxproj: Pass the -h option to ln(1) so that it will replace, rather than follow, an existing symlink.
1:00 PM Changeset in webkit [211587] by jmarcell@apple.com
  • 6 edits in trunk/Source

Versioning.

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

Mark imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-details-element/toggleEvent.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=164041

Unreviewed test gardening.

12:45 PM Changeset in webkit [211585] by jmarcell@apple.com
  • 1 delete in tags/Safari-604.1.6

Deleting Tag.

12:42 PM Changeset in webkit [211584] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit/win

[Win][HiDPI] Scale factor is applied twice in accelerated compositing mode.
https://bugs.webkit.org/show_bug.cgi?id=167732

Reviewed by Brent Fulgham.

Backing layer should not be scaled when CACFLayerSetContentsScale is used for scaling.

  • WebView.cpp:

(WebView::setAcceleratedCompositing):

12:24 PM Changeset in webkit [211583] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Unreviewed ios-simulator test gardening.

  • platform/ios-simulator-wk2/TestExpectations:
  • platform/ios-simulator/TestExpectations:
12:22 PM Changeset in webkit [211582] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed attempt to fix the Windows build after r211571.

  • platform/MemoryPressureHandler.cpp:

(WebCore::thresholdForPolicy):
(WebCore::policyForFootprint):

12:21 PM Changeset in webkit [211581] by Simon Fraser
  • 3 edits in trunk/LayoutTests

Clean up css3/filters/backdrop/dynamic-with-clip-path.html

This test used a clip-path that was entirely outside the element, making it confusing.
Move the clipping circle to the center.

  • css3/filters/backdrop/dynamic-with-clip-path-expected.html:
  • css3/filters/backdrop/dynamic-with-clip-path.html:
11:34 AM Changeset in webkit [211580] by ddkilzer@apple.com
  • 2 edits in trunk

Make the Makefile great again after r211570, r211572

  • Makefile: Restore tabs and ending newline.
11:33 AM Changeset in webkit [211579] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

Correct memory leak in MediaConstraints
https://bugs.webkit.org/show_bug.cgi?id=167744
<rdar://problem/30331444>

Reviewed by Anders Carlsson.

ConstraintHolder returns a reference to an object created by operator new. When the
returned value is assigned or stored in Vector or other containers we leak memory.
Instead, this value should just be returned as a regular object so that the return
value optimization can make sure memory is properly (and efficiently) used.

  • platform/mediastream/MediaConstraints.h:

(WebCore::FlattenedConstraint::ConstraintHolder::create): Return by value.

11:20 AM Changeset in webkit [211578] by matthew_hanson@apple.com
  • 5 edits in branches/safari-604.1.5-branch

Merge r211502. rdar://problem/30319184

11:20 AM Changeset in webkit [211577] by matthew_hanson@apple.com
  • 3 edits
    2 adds in branches/safari-604.1.5-branch

Merge r211495. rdar://problem/30106362

11:20 AM Changeset in webkit [211576] by matthew_hanson@apple.com
  • 4 edits
    2 adds in branches/safari-604.1.5-branch

Merge r211339. rdar://problem/29601646

11:20 AM Changeset in webkit [211575] by matthew_hanson@apple.com
  • 12 edits in branches/safari-604.1.5-branch/Source

Merge r211438.

11:12 AM Changeset in webkit [211574] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking http/tests/inspector/worker/blob-script-with-cross-domain-imported-scripts.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=167607

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
10:55 AM Changeset in webkit [211573] by ddkilzer@apple.com
  • 29 edits
    1 copy in trunk/LayoutTests

Clean up accessibility & animations tests to stop calling testRunner.waitUntilDone() twice
<https://webkit.org/b/167598>

Reviewed by Alexey Proskuryakov.

  • accessibility/frame-disconnect-textmarker-cache-crash.html:
  • accessibility/loading-iframe-sends-notification.html:
  • accessibility/mac/combobox-activedescendant-notifications.html:
  • accessibility/mac/ordered-textmarker-crash.html:
  • accessibility/mac/stale-textmarker-crash.html:
  • accessibility/notification-listeners.html:
  • accessibility/scroll-to-global-point-iframe-nested.html:
  • accessibility/scroll-to-global-point-iframe.html:
  • accessibility/scroll-to-make-visible-iframe.html:
  • accessibility/svg-element-press.html:
  • Remove call to testRunner.waitUntilDone() since window.jsTestIsAsync is set to true, and thus waitUntilDone() is called from either js-test.js or js-test-post.js.
  • animations/animation-delay-changed.html:
  • animations/change-keyframes-name.html:
  • animations/font-variations/font-variation-settings-order.html:
  • animations/font-variations/font-variation-settings-unlike.html:
  • animations/font-variations/font-variation-settings.html:
  • animations/longhand-timing-function.html:
  • animations/transition-and-animation-3.html:
  • animations/unanimated-style.html:
  • Remove call to testRunner.waitUntilDone() since that's moved into animation-test-helpers.js.
  • animations/resources/animation-test-helpers.js:

(runAnimationTest): Call testRunner.waitUntilDone() when this
script resource is included instead of when runAnimationTest()
is called since runAnimationTest() expects it to be set anyway.

  • animations/animation-direction-reverse-fill-mode-hardware.html:
  • animations/animation-direction-reverse-fill-mode.html:
  • animations/animation-hit-test-transform.html:
  • animations/animation-hit-test.html:
  • animations/animation-internals-api-multiple-keyframes.html:
  • animations/animation-internals-api.html:
  • animations/change-transform-style-during-animation.html:
  • animations/keyframes-iteration-count-non-integer.html:
  • Remove call to testRunner.waitUntilDone() since that now happens when loading animation-test-helpers.js. These tests don't currently call runAnimationTest(), but they manage their own state by calling testRunner.notifyDone() themselves.
  • animations/crash-on-removing-animation.html:
  • animations/resources/crash-on-removing-animation-window.html: Copied from LayoutTests/animations/crash-on-removing-animation.html.
  • Split this test into a main resource and a window resource. Previously testRunner.waitUntilDone() was being called twice when js-test-post.js was loaded in the main window and then loaded a second time when the window was opened. The new resource file doesn't load either js-test-pre.js or js-test-post.js, avoiding the duplicate call.
10:42 AM Changeset in webkit [211572] by Jonathan Bedard
  • 1 edit
    1 add in trunk

Unreviewed build fix after r211570

  • Makefile: Placed back.
10:35 AM Changeset in webkit [211571] by akling@apple.com
  • 19 edits
    2 copies in trunk/Source

Source/JavaScriptCore:
[Mac] In-process memory pressure monitor for WebContent processes.
<https://webkit.org/b/167491>
<rdar://problem/30116072>

Reviewed by Antti Koivisto.

Remove the sloppy "max live heap size" mechanism from JSC in favor of the new
WebCore-side memory footprint monitor.

  • heap/Heap.cpp:

(JSC::Heap::updateAllocationLimits):
(JSC::Heap::didExceedMaxLiveSize): Deleted.

  • heap/Heap.h:

(JSC::Heap::setMaxLiveSize): Deleted.

Source/WebCore:
[Mac] In-process memory pressure monitor for WebContent processes AKA websam
<https://webkit.org/b/167491>
<rdar://problem/30116072>

Reviewed by Antti Koivisto.

Add a new timer-based memory pressure monitor that checks the process memory
footprint every 30 seconds and reacts to changes by setting a MemoryUsagePolicy.

There are four MemoryUsagePolicy values:

  • Unrestricted (below 1GB)
  • Conservative (above 1GB)
  • Strict (above 2GB)
  • Panic (above 4GB, or 3GB if 32-bit)

For Strict and above, the old-style "isUnderMemoryPressure()" API will return true.

Transitioning to a higher policy will cause memory pressure handlers to run:

At Strict, we run the "non-critical" memory pressure handler, then carry on.

At Panic, we run the "critical" memory pressure handler. If that fails to recover
enough memory to bring us back below 4GB, we may kill the process:

A process is eligible to get killed for using too much memory if:

  • It's not visible on screen (i.e it's a background tab.)
  • It's not playing audio.
  • It has not performed a main frame navigation in the last hour.

Before killing the process, an exit-time callback will run. This patch installs such
a callback that prints out some time-of-death statistics about C++ and JavaScript memory
usage to hopefully help understand what was soaking up all the memory.

  • bindings/js/CommonVM.cpp:

(WebCore::commonVMSlow):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::setState):

  • page/MainFrame.cpp:

(WebCore::MainFrame::didCompleteLoad):

  • page/MainFrame.h:
  • page/MemoryRelease.cpp:

(WebCore::pageCount):
(WebCore::logMemoryStatisticsAtTimeOfDeath):
(WebCore::didExceedMemoryLimitAndFailedToRecover):
(WebCore::processIsEligibleForMemoryKill):

  • page/MemoryRelease.h:
  • page/ResourceUsageThread.h:
  • page/cocoa/ResourceUsageThreadCocoa.mm:

(WebCore::vmPageSize):

  • platform/MemoryPressureHandler.cpp:

(WebCore::MemoryPressureHandler::MemoryPressureHandler):
(WebCore::MemoryPressureHandler::setShouldUsePeriodicMemoryMonitor):
(WebCore::toString):
(WebCore::thresholdForPolicy):
(WebCore::policyForFootprint):
(WebCore::MemoryPressureHandler::measurementTimerFired):

  • platform/MemoryPressureHandler.h:

(WebCore::MemoryPressureHandler::setMemoryKillCallback):
(WebCore::MemoryPressureHandler::setProcessIsEligibleForMemoryKillCallback):
(WebCore::MemoryPressureHandler::isUnderMemoryPressure):

Source/WebKit2:
[Mac] In-process memory pressure monitor for WebContent processes.
<https://webkit.org/b/167491>
<rdar://problem/30116072>

Reviewed by Antti Koivisto.

Enable the in-process memory monitor for WebContent processes on macOS 10.12+

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):

Source/WTF:
[Mac] In-process memory pressure monitor for WebContent processes.
<https://webkit.org/b/167491>
<rdar://problem/30116072>

Reviewed by Antti Koivisto.

Add a WTF helper function for getting the current process's memory footprint.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/MemoryFootprint.cpp:

(WTF::memoryFootprint):

  • wtf/MemoryFootprint.h:
10:33 AM Changeset in webkit [211570] by Jonathan Bedard
  • 2 edits
    1 delete in trunk

Undefined subroutine in svn-create-patch
https://bugs.webkit.org/show_bug.cgi?id=167742

Unreviewed build-fix after r211543.

  • Scripts/VCSUtils.pm: fixSVNPatchForAdditionWithHistory was not exported.
10:31 AM Changeset in webkit [211569] by Chris Dumez
  • 13 edits in trunk/Source

[Crash] com.apple.WebKit.WebContent at WebKit: WebKit::WebPage::fromCorePage()
https://bugs.webkit.org/show_bug.cgi?id=167738
<rdar://problem/30229990>

Reviewed by Andreas Kling.

Source/WebCore:

Upon destruction of a Page, we destroy the BackForwardClient, which is supposed
to keep track of HistoryItems associated to this particular page and remove them
from the PageCache. Given the crash trace, the issue seems to be that some
HistoryItems associated with the Page sometimes linger in the PageCache *after*
the Page has been destroyed, which leads to crashes later on when pruning the
PageCache.

In order to make the process more robust, this patch refactors the code so that
the Page is now in charge of removing all its associated HistoryItems from the
PageCache instead of relying on the BackForwardClient. Also, instead of having
the Page keep track of which HistoryItems are associated with it (which is
error prone), we now scan all PageCache entries instead to find which ones are
associated with the Page. While this is in theory slower, this is much safer
and in practice not an issue because the PageCache usually has 3-5 entries.

No new tests, could not reproduce.

  • history/CachedPage.cpp:

(WebCore::CachedPage::CachedPage):

  • history/CachedPage.h:

(WebCore::CachedPage::page):

  • history/PageCache.cpp:

(WebCore::PageCache::removeAllItemsForPage):

  • history/PageCache.h:
  • page/Page.cpp:

(WebCore::Page::~Page):

Source/WebKit/mac:

The BackForwardClient no longer needs to worry about removing HistoryItems
from the PageCache now that WebCore takes care of it.

  • History/BackForwardList.mm:

(BackForwardList::close):

Source/WebKit/win:

The BackForwardClient no longer needs to worry about removing HistoryItems
from the PageCache now that WebCore takes care of it.

  • BackForwardList.cpp:

(BackForwardList::close):

Source/WebKit2:

The BackForwardClient no longer needs to worry about removing HistoryItems
from the PageCache now that WebCore takes care of it.

  • WebProcess/WebPage/WebBackForwardListProxy.cpp:

(WebKit::WebBackForwardListProxy::addItemFromUIProcess):
(WebKit::WebBackForwardListProxy::addItem):
(WebKit::WebBackForwardListProxy::close):

  • WebProcess/WebPage/WebBackForwardListProxy.h:
9:52 AM Changeset in webkit [211568] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit2

<rdar://problem/30323148> Webkit Nightly on 10.10 broken

Follow-up fix.

  • Platform/IPC/mac/ConnectionMac.mm:

(IPC::Connection::open):

9:46 AM Changeset in webkit [211567] by calvaris@igalia.com
  • 2 edits in trunk/Tools

Unreviewed. Fix jhbuild dependencies build.

  • gtk/patches/gst-plugins-good-0004-qtdemux-add-context-for-a-preferred-protection.patch:

Patch updated.

9:39 AM Changeset in webkit [211566] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit2

<rdar://problem/30323148> Webkit Nightly on 10.10 broken

Try to fix the 10.10 build.

  • Platform/IPC/mac/ConnectionMac.mm:

(IPC::Connection::open):

9:37 AM Changeset in webkit [211565] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit2

Handle m_processLauncher being null in ChildProcessProxy::processIdentifier()
https://bugs.webkit.org/show_bug.cgi?id=167713
rdar://problem/28896113

Reviewed by Dan Bernstein.

This can happen if the process has been explicitly terminated.

  • UIProcess/ChildProcessProxy.h:

(WebKit::ChildProcessProxy::processIdentifier):

9:06 AM Changeset in webkit [211564] by Antti Koivisto
  • 3 edits
    2 adds in trunk

Column progression wrong after enabling pagination on RTL document
https://bugs.webkit.org/show_bug.cgi?id=167733
<rdar://problem/29012252>

Reviewed by Zalan Bujtas.

Source/WebCore:

Column progression depends on document direction but was not updated when direction changed.

Test: fast/multicol/pagination/pagination-dynamic-rtl.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::styleDidChange):

Update column styles if document direction changes.

LayoutTests:

  • fast/multicol/pagination/pagination-dynamic-rtl-expected.html: Added.
  • fast/multicol/pagination/pagination-dynamic-rtl.html: Added.
9:04 AM Changeset in webkit [211563] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking http/tests/contentextensions/block-everything-unless-domain.html as flaky on macOS.
https://bugs.webkit.org/show_bug.cgi?id=167653

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
8:54 AM Changeset in webkit [211562] by calvaris@igalia.com
  • 13 edits
    2 adds in trunk

[EME][GStreamer] Fixed decryptor selection
https://bugs.webkit.org/show_bug.cgi?id=167588

Reviewed by Žan Doberšek.

Source/WebCore:

GStreamer selected a decryptor automatically but we need to be
able to tell it which decryptor we want because one file can be
encrypted with more than one system and the one we want to use can
depend on what the user tells us.

Now when the demuxer is about to select the demuxer, it runs a
GstContext query with the events, which are forwarded through the
EME api to the application, which will answer the the
generateKeyRequest and then we can instruct the demuxer to select
the one we tell it, not the one that is selected automatically. If
the demuxer has already a preferred decryptor, the codepath will
be similar to the older one.

Something that is also fixed is the report of the keyneeded event,
which will contain all pssh boxes as requested by the spec.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::handleMessage): Intercept
the event and handle it.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
Initialize the CDM session.
(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
Unlock the protection condition just in case and set CDM to null.
(WebCore::extractEventsAndSystemsFromMessage): Access the events
and accepted key systems coming at the message from the demuxer.
(WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage):
Handle the protection event not as an element event but as a
context request. It also concatenates all the initdatas in case
there is more than one. The event is sent in the main thread and
the current one blocks until a timeout is hit or the
generateKeyRequest is called.
(WebCore::MediaPlayerPrivateGStreamerBase::handleProtectionEvent):
Check if the event was already handled and if not, run the need
key event.
(WebCore::MediaPlayerPrivateGStreamerBase::receivedGenerateKeyRequest):
Notify the that the query arrived so that we can unlock the
demuxer thread.
(WebCore::keySystemIdToUuid): Translates ids to uuids, meaning
the ones coming from JS to the ones coming from the media engine.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:

Attributes and methods.

  • platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:

(webkit_media_clear_key_decrypt_class_init):
(webKitMediaClearKeyDecryptorRequestDecryptionKey): Deleted.

  • platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.h:

Added the ui and uuid.

  • platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:

(webkitMediaCommonEncryptionDecryptSinkEventHandler): Do not rely
on the subclass, just forward the event to the pipeline inside a message.

  • platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h:

Remove unused function signature.

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

(WebCore::appendPipelineNeedContextMessageCallback): Renamed from
appendPipelineElementMessageCallback.
(WebCore::AppendPipeline::AppendPipeline): Connect to the
need-context message instead of the element one.
(WebCore::AppendPipeline::dispatchPendingDecryptionKey):
Dispatches the drm-cypher message if there is one pending.
(WebCore::AppendPipeline::dispatchDecryptionKey): Dispatches the
drm-cypher.
(WebCore::AppendPipeline::handleNeedContextSyncMessage): Handles
the need-context event instead of the element one.
(WebCore::AppendPipeline::connectDemuxerSrcPadToAppsinkFromAnyThread):
Dispatches the key to the pipeline if there's any pending.
(WebCore::appendPipelineElementMessageCallback): Deleted.
(WebCore::AppendPipeline::handleElementMessage): Deleted.

  • platform/graphics/gstreamer/mse/AppendPipeline.h: New methods

and attributes.

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

(WebCore::MediaPlayerPrivateGStreamerMSE::dispatchDecryptionKey):
Use the dispatchDecryptionKey method of the AppendPipeline.

Tools:

This patches are pending at https://bugzilla.gnome.org/show_bug.cgi?id=770107

  • gtk/jhbuild.modules: Added patches to gstreamer and

gst-plugins-good packages.

  • gtk/patches/gst-plugins-good-0004-qtdemux-add-context-for-a-preferred-protection.patch: Added.
  • gtk/patches/gstreamer-0001-protection-added-function-to-filter-system-ids.patch: Added.
8:30 AM Changeset in webkit [211561] by graouts@webkit.org
  • 2 edits in trunk/LayoutTests

LayoutTest media/modern-media-controls/buttons-container/buttons-container-buttons-property.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=167371

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
8:08 AM Changeset in webkit [211560] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Skip fast/visual-viewport/ios/bottom-bar-with-keyboard.html on ios-simulator.

Unreviewed test gardening.

  • platform/ios-simulator/TestExpectations:
8:04 AM Changeset in webkit [211559] by Ryan Haddad
  • 1 edit
    1 move
    2 adds in trunk/LayoutTests

Unreviewed, rolling out r211529.

This change caused the test to fail on macOS.

Reverted changeset:

"Clean up css3/filters/backdrop/backdrop-filter-with-clip-
path.html expected results."
http://trac.webkit.org/changeset/211529

6:59 AM Changeset in webkit [211558] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

LayoutTest media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=167372

Unreviewed test gardening.

Patch by Antoine Quint <Antoine Quint> on 2017-02-02

  • platform/mac-wk1/TestExpectations:
6:26 AM Changeset in webkit [211557] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

LayoutTest media/modern-media-controls/media-controller/media-controller-resize.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=164571

Unreviewed test gardening.

Patch by Antoine Quint <Antoine Quint> on 2017-02-02

  • platform/mac-wk1/TestExpectations:
6:22 AM Changeset in webkit [211556] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

LayoutTest media/modern-media-controls/rewind-button/rewind-button.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=167352

Unreviewed test gardening.

Patch by Antoine Quint <Antoine Quint> on 2017-02-02

  • platform/mac-wk1/TestExpectations:
2:38 AM Changeset in webkit [211555] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebCore

Removed unused EventHandler members
https://bugs.webkit.org/show_bug.cgi?id=167723

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-02-02
Reviewed by Yusuke Suzuki.

  • page/EventHandler.cpp:

(WebCore::EventHandler::clear):
(WebCore::EventHandler::handleWheelEvent):

  • page/EventHandler.h:

Remove unused members.

  • editing/FrameSelection.cpp:
  • html/HTMLTextAreaElement.cpp:
  • rendering/RenderObject.cpp:
  • rendering/RenderSlider.cpp:

Remove unnecessary includes.

2:31 AM Changeset in webkit [211554] by Yusuke Suzuki
  • 16 edits
    2 adds in trunk

Web Inspector: Upgrade Esprima to the latest one to support dynamic import
https://bugs.webkit.org/show_bug.cgi?id=167698

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

  • UserInterface/External/Esprima/esprima.js:

Update to Esprima@5307e30 (4.0.0-dev).

  • UserInterface/Models/ScriptSyntaxTree.js:

(WebInspector.ScriptSyntaxTree.prototype._gatherIdentifiersInDeclaration.gatherIdentifiers):
(WebInspector.ScriptSyntaxTree.prototype._gatherIdentifiersInDeclaration):
(WebInspector.ScriptSyntaxTree.prototype._recurse):
(WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
(WebInspector.ScriptSyntaxTree):

  • UserInterface/Workers/Formatter/ESTreeWalker.js:

(ESTreeWalker.prototype._walkChildren):
(ESTreeWalker):
Add new nodes, SpreadProperty, RestProperty, and Import.
SpreadProperty and RestProperty are the part of ES2018 rest and spread properties.
https://github.com/sebmarkbage/ecmascript-rest-spread
Import is dynamic import node. The syntax is similar to Super.
https://github.com/tc39/proposal-dynamic-import

  • UserInterface/Workers/Formatter/EsprimaFormatter.js:

(EsprimaFormatter.prototype._handleTokenAtNode):

LayoutTests:

  • inspector/formatting/formatting-javascript-expected.txt:
  • inspector/formatting/formatting-javascript.html:
  • inspector/formatting/resources/javascript-tests/import-expected.js: Added.

(async.load):

  • inspector/formatting/resources/javascript-tests/import.js: Added.

(async.load):

  • inspector/formatting/resources/javascript-tests/object-array-literal-expected.js:
  • inspector/formatting/resources/javascript-tests/object-array-literal.js:
  • inspector/formatting/resources/javascript-tests/variable-declaration-expected.js:
  • inspector/formatting/resources/javascript-tests/variable-declaration.js:
  • inspector/formatting/resources/utilities.js:

(TestPage.registerInitializer.):
(TestPage.registerInitializer):
Fix a bug which occurs when output is not expected one.

  • inspector/model/parse-script-syntax-tree-expected.txt:
  • inspector/model/parse-script-syntax-tree.html:
2:30 AM Changeset in webkit [211553] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Removed unused m_navigationStart from NavigatorGamepad
https://bugs.webkit.org/show_bug.cgi?id=167722

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-02-02
Reviewed by Yusuke Suzuki.

  • Modules/gamepad/NavigatorGamepad.cpp:

(WebCore::NavigatorGamepad::NavigatorGamepad):
(WebCore::NavigatorGamepad::from):

  • Modules/gamepad/NavigatorGamepad.h:

(WebCore::NavigatorGamepad::navigationStart): Deleted.

1:49 AM Changeset in webkit [211552] by commit-queue@webkit.org
  • 3 edits in trunk/Source/JavaScriptCore

Removed unused m_errorHandlingModeReentry from Interpreter
https://bugs.webkit.org/show_bug.cgi?id=167726

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-02-02
Reviewed by Yusuke Suzuki.

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::Interpreter):

  • interpreter/Interpreter.h:
12:33 AM Changeset in webkit [211551] by commit-queue@webkit.org
  • 14 edits
    3 copies
    1 add
    1 delete in trunk/Source

In iOS, we should take background assertion when accessing localstorage databases.
https://bugs.webkit.org/show_bug.cgi?id=165478

Source/WebCore:

Move WebSQLiteDatabaseTrackerClient from WebKitLegacy to WebCore so that it can be accessible from
WebKit1 and WebKit2. Previously, to avoid dependencies on UIKit, WebKitLegacy introduced several
global methods for UIKit to setup the start/end background task blocks on runtime (WebKitSetStartBackgroundTaskBlock,
WebKitSetInvalidWebBackgroundTaskIdentifier and WebKitSetEndBackgroundTaskBlock). Since we have to
move the background task handling to WebCore, to avoid adding WebCore dependencies on UIKit, this
patch introdues a new WebCore class WebBackgroundTaskController which holds the start/end background
task blocks. The existing WebKitSetStartBackgroundTaskBlock and WebKitSetEndBackgroundTaskBlock methods
in WebKit1 will use WebBackgroundTaskController to store the blocks set by UIKit.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2017-02-02
Reviewed by Brady Eidson.

No new test since this is code refactoring.

  • WebCore.xcodeproj/project.pbxproj: Add a new class WebBackgroundTaskController to the project. Also move

WebSQLiteDatabaseTrackerClient from WebKitLegacy to WebCore.

  • platform/ios/WebBackgroundTaskController.h: Use properties to hold the blocks for starting or ending background tasks.
  • platform/ios/WebBackgroundTaskController.mm:

(+[WebBackgroundTaskController sharedController]):
(-[WebBackgroundTaskController dealloc]):
(-[WebBackgroundTaskController startBackgroundTaskWithExpirationHandler:]): Start a background task with a expiration handler;

to start the background task, we will use backgroundTaskStartBlock set up by UIKit.

(-[WebBackgroundTaskController endBackgroundTaskWithIdentifier:]): Call backgroundTaskEndBlack to end a background task.

  • platform/ios/WebSQLiteDatabaseTrackerClient.h: Copied from Source/WebKit/ios/Storage/WebSQLiteDatabaseTrackerClient.h.
  • platform/ios/WebSQLiteDatabaseTrackerClient.mm: Copied from Source/WebKit/ios/Storage/WebSQLiteDatabaseTrackerClient.mm.

(WebCore::WebSQLiteDatabaseTrackerClient::sharedWebSQLiteDatabaseTrackerClient): Make WebSQLiteDatabaseTrackerClient a singleton.
(WebCore::WebSQLiteDatabaseTrackerClient::WebSQLiteDatabaseTrackerClient):
(WebCore::WebSQLiteDatabaseTrackerClient::~WebSQLiteDatabaseTrackerClient):
(WebCore::WebSQLiteDatabaseTrackerClient::willBeginFirstTransaction): Use a utility class WebDatabaseTransactionBackgroundTaskController

to schedule database transaction background task.

(WebCore::WebSQLiteDatabaseTrackerClient::didFinishLastTransaction): Use WebDatabaseTransactionBackgroundTaskController to stop

databas transaction background task.

(transactionBackgroundTaskIdentifierLock: Moved from Source/WebKit/mac/Storage/WebDatabaseManager.mm.
(setTransactionBackgroundTaskIdentifier): Ditto.
(getTransactionBackgroundTaskIdentifier): Ditto.
(+[WebDatabaseTransactionBackgroundTaskController startBackgroundTask]): Ditto.
(+[WebDatabaseTransactionBackgroundTaskController endBackgroundTask]): Ditto.

Source/WebKit:

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2017-02-02
Reviewed by Brady Eidson.

  • WebKit.xcodeproj/project.pbxproj: Moved WebSQLiteDatabaseTrackerClient to WebCore.

Source/WebKit/ios:

Move application background task handling code from WebKit to WebCore.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2017-02-02
Reviewed by Brady Eidson.

  • Misc/WebUIKitSupport.h: Remove several methods that only used internally for background

task handling. They are not needed in WebKit any more since background task handling
is moved to WebCore and wrapped in WebBackgroundTaskController class.

  • Misc/WebUIKitSupport.mm:

(WebKitSetInvalidWebBackgroundTaskIdentifier): Instead of storing the value in a static global

variable, save it in WebBackgroundTaskController.

(WebKitSetStartBackgroundTaskBlock): Ditto.
(WebKitSetEndBackgroundTaskBlock): Ditto.

Source/WebKit/mac:

Move database transaction background task handling code from WebDatabaseManager to
WebCore's WebSQLiteDatabaseTrackerClient.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2017-02-02
Reviewed by Brady Eidson.

  • Storage/WebDatabaseManager.mm:
  • Storage/WebDatabaseManagerInternal.h: Remove a category for background task handling.
  • WebCoreSupport/WebApplicationCache.mm:

(+[WebApplicationCache initializeWithBundleIdentifier:]): Use WebCore::WebSQLiteDatabaseTrackerClient.

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]): Ditto.

Source/WebKit2:

Just like in WebKit1, when initializing a WKWebView, initialize the database transaction
tracker client. Also, we should set up the start and end background task blocks here. In
WebKit1, this is done inside UIKit.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2017-02-02
Reviewed by Brady Eidson.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView _setUpSQLiteDatabaseTrackerClient]): Set up the start/end background task blocks

and database transaction tracker client.

Note: See TracTimeline for information about the timeline view.