⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Timeline



Sep 14, 2018:

6:20 PM Changeset in webkit [236030] by Matt Lewis
  • 9 edits in trunk/Source/WebKit

Unreviewed, rolling out r236020.

This caused an api failure on High Sierra

Reverted changeset:

"Refactoring related to Safe Browsing"
https://bugs.webkit.org/show_bug.cgi?id=189631
https://trac.webkit.org/changeset/236020

5:46 PM Changeset in webkit [236029] by Basuke Suzuki
  • 10 edits in trunk/Source

[Curl] Bug fix on some inaccurate values in NetworkLoadMetrics.
https://bugs.webkit.org/show_bug.cgi?id=189530

Reviewed by Alex Christensen.

Curl port uses the start time libcurl provided. But there's a lug between main thread and Curl thread.
Record the start time of request instead of libcurl's start timing and use it to measure the metrics.
Source/WebCore:

Also respondEnd was not correctly recorded and fixed.

No new tests because it cannot be measured from DRT.

  • platform/network/ResourceHandleInternal.h:
  • platform/network/curl/CurlContext.cpp:

(WebCore::CurlHandle::getNetworkLoadMetrics):

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

(WebCore::CurlRequest::start):
(WebCore::CurlRequest::setupTransfer):
(WebCore::CurlRequest::didCompleteTransfer):
(WebCore::CurlRequest::updateNetworkLoadMetrics):

  • platform/network/curl/CurlRequest.h:

(WebCore::CurlRequest::setStartTime):

  • platform/network/curl/ResourceHandleCurl.cpp:

(WebCore::ResourceHandle::start):
(WebCore::ResourceHandle::restartRequestWithCredential):
(WebCore::ResourceHandle::platformLoadResourceSynchronously):
(WebCore::ResourceHandle::willSendRequest):
(WebCore::ResourceHandle::continueAfterWillSendRequest):

Source/WebKit:

  • NetworkProcess/curl/NetworkDataTaskCurl.cpp:

(WebKit::NetworkDataTaskCurl::NetworkDataTaskCurl):
(WebKit::NetworkDataTaskCurl::willPerformHTTPRedirection):
(WebKit::NetworkDataTaskCurl::restartWithCredential):

  • NetworkProcess/curl/NetworkDataTaskCurl.h:
5:39 PM Changeset in webkit [236028] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Source View doesn't scroll to show line when breakpoint is hit inside of <script> in HTML resource
https://bugs.webkit.org/show_bug.cgi?id=189638
<rdar://problem/43359278>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2018-09-14
Reviewed by Matt Baker.

Pausing in Document resources on page load have special considerations where we
may not receive their full content immediately, so we may synthesize inline script
content for the resource until we have full content. Unfortunately, when we get
full content and update the TextEditor we were losing the revealed position and
other editor information. This change specifically targets those cases, by
re-applying editor state when updating such a resource from partial to full content.

  • UserInterface/Views/SourceCodeTextEditor.js:

(WI.SourceCodeTextEditor.prototype._contentAvailable):
Signal to the editor that when updating the content it should carry
over editor state. Only do this if we had partial content before.

  • UserInterface/Views/TextEditor.js:

(WI.TextEditor):
(WI.TextEditor.prototype.set repeatReveal):
Provide a way to signal we should restore state when update the content.

(WI.TextEditor.set string.update):
(WI.TextEditor.prototype.set string):
When repeatReveal was enabled, restore editor state such as the
revealed location and text selection.

5:33 PM Changeset in webkit [236027] by Megan Gardner
  • 4 edits
    6 adds in trunk/LayoutTests

Additional tests for conic gradients
https://bugs.webkit.org/show_bug.cgi?id=189566

Reviewed by Simon Fraser.

Adding tests that actually test the gradient nature of gradients.
This is done by using an svg filter to consolidate the sections
of the gradient to sections we can actuall test the color of. Also,
the seams are clipped out, to reduce noise. Since gradients are
highly noise prone, this is the best way to check and make sure
that gradients are functional without sevear noise issues.

  • TestExpectations:
  • fast/gradients/conic-gradient-alpha-expected.html: Added.
  • fast/gradients/conic-gradient-alpha.html: Added.
  • fast/gradients/conic-gradient-expected.html: Added.
  • fast/gradients/conic-gradient-extended-stops-expected.html: Added.
  • fast/gradients/conic-gradient-extended-stops.html: Added.
  • fast/gradients/conic-gradient.html: Added.
  • platform/ios-12/TestExpectations:
  • platform/mac/TestExpectations:
5:22 PM Changeset in webkit [236026] by dino@apple.com
  • 2 edits in trunk/Tools

Add Justin Michaud.

  • Scripts/webkitpy/common/config/contributors.json:
5:05 PM Changeset in webkit [236025] by Justin Fan
  • 8 edits in trunk

WebGL 2 conformance: rgb-format-support.html
https://bugs.webkit.org/show_bug.cgi?id=189610
<rdar://problem/44403343>

Reviewed by Dean Jackson.

Source/WebCore:

Implementing getInternalformatParameter (emulating on macOS) and updating
renderbufferStorage{Multisample} for WebGL 2 conformance.

Test: webgl/2.0.0/conformance2/rendering/rgb-format-support.html enabled.

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::isRenderableInternalformat):
(WebCore::WebGL2RenderingContext::getInternalformatParameter):
(WebCore::WebGL2RenderingContext::renderbufferStorageMultisample):
(WebCore::WebGL2RenderingContext::renderbufferStorage):
(WebCore::WebGL2RenderingContext::baseInternalFormatFromInternalFormat):
(WebCore::WebGL2RenderingContext::isIntegerFormat):

  • platform/graphics/GraphicsContext3D.h:
  • platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:

(WebCore::GraphicsContext3D::getInternalformativ):
(WebCore::GraphicsContext3D::renderbufferStorageMultisample):

LayoutTests:

Enabled rgb-format-support.html, and updated expectation for gl-teximage.html.

  • TestExpectations:
  • platform/mac/TestExpectations:
  • webgl/2.0.0/conformance2/rendering/rgb-format-support-expected.txt:
4:55 PM Changeset in webkit [236024] by commit-queue@webkit.org
  • 5 edits
    25 adds in trunk

Add support for spreadMethod=reflect and repeat on SVG gradients (for CoreGraphics platforms)
https://bugs.webkit.org/show_bug.cgi?id=5968

Source/WebCore:

Add support for spreadMethod=repeat and reflect. Also, the opacity of a gradient is now
the result of multiplying stop-opacity with the opacity of the color.

Patch by Justin Michaud <Justin Michaud> on 2018-09-14
Reviewed by Simon Fraser.

Tests: svg/gradients/spreadMethod-expected.svg

svg/gradients/spreadMethod.svg
svg/gradients/spreadMethodAlpha-expected.svg
svg/gradients/spreadMethodAlpha.svg
svg/gradients/spreadMethodClose0-expected-mismatch.svg
svg/gradients/spreadMethodClose0.svg
svg/gradients/spreadMethodClose1-expected-mismatch.svg
svg/gradients/spreadMethodClose1.svg
svg/gradients/spreadMethodClose2-expected.svg
svg/gradients/spreadMethodClose2.svg
svg/gradients/spreadMethodDiagonal-expected.svg
svg/gradients/spreadMethodDiagonal.svg
svg/gradients/spreadMethodDiagonal2-expected.svg
svg/gradients/spreadMethodDiagonal2.svg
svg/gradients/spreadMethodDuplicateStop-expected.svg
svg/gradients/spreadMethodDuplicateStop.svg
svg/gradients/spreadMethodReversed-expected.svg
svg/gradients/spreadMethodReversed.svg
svg/gradients/stopAlpha-expected.svg
svg/gradients/stopAlpha.svg

  • platform/graphics/cg/GradientCG.cpp:

(WebCore::Gradient::paint):

  • svg/SVGStopElement.cpp:

(WebCore::SVGStopElement::stopColorIncludingOpacity const):

LayoutTests:

Add new svg tests for linear gradients with spreadMethod, and alpha values specified in
both stop-opacity and color.

Patch by Justin Michaud <Justin Michaud> on 2018-09-14
Reviewed by Simon Fraser.

  • platform/mac/svg/W3C-SVG-1.1/pservers-grad-10-b-expected.png:
  • svg/gradients/spreadMethod-expected.svg: Added.
  • svg/gradients/spreadMethod.svg: Added.
  • svg/gradients/spreadMethodAlpha-expected.svg: Added.
  • svg/gradients/spreadMethodAlpha.svg: Added.
  • svg/gradients/spreadMethodClose0-expected-mismatch.svg: Added.
  • svg/gradients/spreadMethodClose0.svg: Added.
  • svg/gradients/spreadMethodClose1-expected-mismatch.svg: Added.
  • svg/gradients/spreadMethodClose1.svg: Added.
  • svg/gradients/spreadMethodClose2-expected.svg: Added.
  • svg/gradients/spreadMethodClose2.svg: Added.
  • svg/gradients/spreadMethodDiagonal-expected.svg: Added.
  • svg/gradients/spreadMethodDiagonal.svg: Added.
  • svg/gradients/spreadMethodDiagonal2-expected.svg: Added.
  • svg/gradients/spreadMethodDiagonal2.svg: Added.
  • svg/gradients/spreadMethodDuplicateStop-expected.svg: Added.
  • svg/gradients/spreadMethodDuplicateStop.svg: Added.
  • svg/gradients/spreadMethodReversed-expected.svg: Added.
  • svg/gradients/spreadMethodReversed.svg: Added.
  • svg/gradients/stopAlpha-expected.svg: Added.
  • svg/gradients/stopAlpha.svg: Added.
4:54 PM Changeset in webkit [236023] by Ross Kirsling
  • 3 edits in trunk/LayoutTests

[WinCairo] Unreviewed test gardening.

4:47 PM Changeset in webkit [236022] by sbarati@apple.com
  • 3 edits
    1 add in trunk

Don't dump OSRAvailabilityData in Graph::dump because a stale Availability may point to a Node that is already freed
https://bugs.webkit.org/show_bug.cgi?id=189628
<rdar://problem/39481690>

Reviewed by Mark Lam.

JSTests:

  • stress/verbose-failure-dont-graph-dump-availability-already-freed.js: Added.

(foo):

Source/JavaScriptCore:

An Availability may point to a Node. And that Node may be removed from
the graph, e.g, it's freed and its memory is no longer owned by Graph.
This patch makes it so we no longer dump this metadata by default. If
this metadata is interesting to you, you'll need to go in and change
Graph::dump to dump the needed metadata.

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::dump):

4:15 PM Changeset in webkit [236021] by commit-queue@webkit.org
  • 9 edits in trunk/LayoutTests

Add stability to tests for web API statistics
https://bugs.webkit.org/show_bug.cgi?id=189560
<rdar://problem/44396413>

Patch by Woodrow Wang <woodrow_wang@apple.com> on 2018-09-14
Reviewed by Chris Dumez.

Using js-test added some data to the font loading collection, which made the tests dependent on
js-test.js. Thus, if any changes were made to js-test.js the tests for web API statistics would
fail. This patch removes the dependency on js-test. Also, this patch speeds up each test
significantly by bypassing the timer in ResourceLoadObserver for recording the statistics.

  • http/tests/webAPIStatistics/canvas-read-and-write-data-collection-expected.txt:
  • http/tests/webAPIStatistics/canvas-read-and-write-data-collection.html:
  • http/tests/webAPIStatistics/font-load-data-collection-expected.txt:
  • http/tests/webAPIStatistics/font-load-data-collection.html:
  • http/tests/webAPIStatistics/navigator-functions-accessed-data-collection-expected.txt:
  • http/tests/webAPIStatistics/navigator-functions-accessed-data-collection.html:
  • http/tests/webAPIStatistics/screen-functions-accessed-data-collection-expected.txt:
  • http/tests/webAPIStatistics/screen-functions-accessed-data-collection.html:
3:09 PM Changeset in webkit [236020] by commit-queue@webkit.org
  • 9 edits in trunk/Source/WebKit

Refactoring related to Safe Browsing
https://bugs.webkit.org/show_bug.cgi?id=189631

Patch by Alex Christensen <achristensen@webkit.org> on 2018-09-14
Reviewed by Tim Horton.

Make SafeBrowsingResult RefCounted.
Move logic from an unnamed lambda to WebPageProxy::receivedNavigationPolicyDecision.

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::beginSafeBrowsingCheck):
(WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame): Deleted.
(WebKit::WebPageProxy::addPlatformLoadParameters): Deleted.
(WebKit::WebPageProxy::createSandboxExtensionsIfNeeded): Deleted.
(WebKit::WebPageProxy::startDrag): Deleted.
(WebKit::WebPageProxy::setPromisedDataForImage): Deleted.
(WebKit::WebPageProxy::setDragCaretRect): Deleted.
(WebKit::WebPageProxy::platformRegisterAttachment): Deleted.
(WebKit::WebPageProxy::platformCloneAttachment): Deleted.

  • UIProcess/SafeBrowsingResult.h:

(WebKit::SafeBrowsingResult::create):

  • UIProcess/WebFramePolicyListenerProxy.cpp:

(WebKit::WebFramePolicyListenerProxy::didReceiveSafeBrowsingResults):

  • UIProcess/WebFramePolicyListenerProxy.h:
  • UIProcess/WebFrameProxy.cpp:

(WebKit::WebFrameProxy::setUpPolicyListenerProxy):

  • UIProcess/WebFrameProxy.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):

  • UIProcess/WebPageProxy.h:
2:59 PM Changeset in webkit [236019] by ggaren@apple.com
  • 2 edits in trunk/Source/WebKit

Clarify the configuration used by WKUIDelegate's createWebViewWithConfiguration
https://bugs.webkit.org/show_bug.cgi?id=189634

Reviewed by Tim Horton.

  • UIProcess/API/Cocoa/WKUIDelegate.h:
2:00 PM Changeset in webkit [236018] by mark.lam@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Refactor some ForInContext code for better encapsulation.
https://bugs.webkit.org/show_bug.cgi?id=189626
<rdar://problem/44466415>

Reviewed by Keith Miller.

  1. Add a ForInContext::m_type field to store the context type. This does not increase the class size, but eliminates the need for a virtual call to get the type.

Note: we still need a virtual destructor because we'll be mingling
IndexedForInContexts and StructureForInContexts in the BytecodeGenerator::m_forInContextStack.

  1. Add ForInContext::isIndexedForInContext() and ForInContext::isStructureForInContext() convenience methods.
  1. Add ForInContext::asIndexedForInContext() and ForInContext::asStructureForInContext() to do the casting to the subclass types. This ensures that we'll properly assert that the casting is legal.
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitGetByVal):
(JSC::BytecodeGenerator::popIndexedForInScope):
(JSC::BytecodeGenerator::popStructureForInScope):

  • bytecompiler/BytecodeGenerator.h:

(JSC::ForInContext::type const):
(JSC::ForInContext::isIndexedForInContext const):
(JSC::ForInContext::isStructureForInContext const):
(JSC::ForInContext::asIndexedForInContext):
(JSC::ForInContext::asStructureForInContext):
(JSC::ForInContext::ForInContext):
(JSC::StructureForInContext::StructureForInContext):
(JSC::IndexedForInContext::IndexedForInContext):
(JSC::ForInContext::~ForInContext): Deleted.

1:36 PM Changeset in webkit [236017] by Ryan Haddad
  • 2 edits in trunk/Source/WebCore

Unreviewed, attempt to fix the iOSMac build after r236015.

  • platform/graphics/cv/PixelBufferResizer.mm:

(WebCore::PixelBufferResizer::PixelBufferResizer):

12:49 PM Changeset in webkit [236016] by Simon Fraser
  • 34 edits in trunk/Source

Make GraphicsLayers ref-counted, so their tree can persist when disconnected from RenderLayerBackings
https://bugs.webkit.org/show_bug.cgi?id=189521

Reviewed by Tim Horton.
Source/WebCore:

Make GraphicsLayer be RefCounted<GraphicsLayer>. GraphicsLayers own their children, via a Vector<Ref<GraphicsLayer>>.

RenderLayerBacking and other holders of GraphicsLayers use RefPtr<GraphicsLayer>.

All the other changes are just to adapt to the new ownership patterns.

I verified that no GraphicsLayers were leaked or abandoned after this change.

No behavior change.

  • page/PageOverlayController.cpp:

(WebCore::PageOverlayController::layerWithDocumentOverlays):
(WebCore::PageOverlayController::layerWithViewOverlays):
(WebCore::PageOverlayController::installPageOverlay):
(WebCore::PageOverlayController::uninstallPageOverlay):
(WebCore::PageOverlayController::setPageOverlayNeedsDisplay):
(WebCore::PageOverlayController::didChangeViewSize):
(WebCore::PageOverlayController::didChangeDocumentSize):
(WebCore::PageOverlayController::didChangeSettings):
(WebCore::PageOverlayController::paintContents):
(WebCore::PageOverlayController::didChangeOverlayFrame):
(WebCore::PageOverlayController::didChangeOverlayBackgroundColor):

  • page/PageOverlayController.h:
  • page/mac/ServicesOverlayController.h:

(WebCore::ServicesOverlayController::Highlight::layer const):

  • page/mac/ServicesOverlayController.mm:

(WebCore::ServicesOverlayController::Highlight::Highlight):
(WebCore::ServicesOverlayController::Highlight::invalidate):
(WebCore::ServicesOverlayController::Highlight::fadeIn):
(WebCore::ServicesOverlayController::Highlight::fadeOut):
(WebCore::ServicesOverlayController::Highlight::didFinishFadeOutAnimation):
(WebCore::ServicesOverlayController::determineActiveHighlight):

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::GraphicsLayer):
(WebCore::GraphicsLayer::willBeDestroyed):
(WebCore::GraphicsLayer::setChildren):
(WebCore::GraphicsLayer::addChild):
(WebCore::GraphicsLayer::addChildAtIndex):
(WebCore::GraphicsLayer::addChildBelow):
(WebCore::GraphicsLayer::addChildAbove):
(WebCore::GraphicsLayer::replaceChild):
(WebCore::GraphicsLayer::removeAllChildren):
(WebCore::GraphicsLayer::removeFromParent):
(WebCore::GraphicsLayer::setMaskLayer):
(WebCore::GraphicsLayer::noteDeviceOrPageScaleFactorChangedIncludingDescendants):
(WebCore::GraphicsLayer::distributeOpacity):
(WebCore::GraphicsLayer::traverse):
(WebCore::dumpChildren):

  • platform/graphics/GraphicsLayer.h:

(WebCore::GraphicsLayer::children const):
(WebCore::GraphicsLayer::children):
(WebCore::GraphicsLayer::maskLayer const):
(WebCore::GraphicsLayer::replicaLayer const):
(WebCore::GraphicsLayer::beingDestroyed const):
(WebCore::GraphicsLayer:: const): Deleted.

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

(WebCore::GraphicsLayer::create):
(WebCore::GraphicsLayerCA::setChildren):
(WebCore::GraphicsLayerCA::addChild):
(WebCore::GraphicsLayerCA::addChildAtIndex):
(WebCore::GraphicsLayerCA::addChildBelow):
(WebCore::GraphicsLayerCA::addChildAbove):
(WebCore::GraphicsLayerCA::replaceChild):
(WebCore::GraphicsLayerCA::setMaskLayer):
(WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush const):
(WebCore::GraphicsLayerCA::recursiveCommitChanges):
(WebCore::GraphicsLayerCA::updateSublayerList):
(WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):

  • platform/graphics/ca/GraphicsLayerCA.h:
  • platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:

(WebCore::GraphicsLayer::create):
(WebCore::GraphicsLayerTextureMapper::setChildren):
(WebCore::GraphicsLayerTextureMapper::addChild):
(WebCore::GraphicsLayerTextureMapper::addChildAtIndex):
(WebCore::GraphicsLayerTextureMapper::addChildAbove):
(WebCore::GraphicsLayerTextureMapper::addChildBelow):
(WebCore::GraphicsLayerTextureMapper::replaceChild):
(WebCore::GraphicsLayerTextureMapper::setMaskLayer):
(WebCore::GraphicsLayerTextureMapper::updateBackingStoreIncludingSubLayers):

  • platform/graphics/texmap/GraphicsLayerTextureMapper.h:
  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::GraphicsLayer::create):
(WebCore::CoordinatedGraphicsLayer::setShouldUpdateVisibleRect):
(WebCore::CoordinatedGraphicsLayer::addChild):
(WebCore::CoordinatedGraphicsLayer::addChildAtIndex):
(WebCore::CoordinatedGraphicsLayer::addChildAbove):
(WebCore::CoordinatedGraphicsLayer::addChildBelow):
(WebCore::CoordinatedGraphicsLayer::replaceChild):
(WebCore::CoordinatedGraphicsLayer::setMaskLayer):
(WebCore::CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers):
(WebCore::CoordinatedGraphicsLayer::updateContentBuffersIncludingSubLayers):
(WebCore::CoordinatedGraphicsLayer::setCoordinatorIncludingSubLayersIfNeeded):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
  • platform/graphics/win/GraphicsLayerDirect2D.cpp:

(WebCore::GraphicsLayer::create):
(WebCore::GraphicsLayerDirect2D::GraphicsLayerDirect2D): Deleted.
(WebCore::GraphicsLayerDirect2D::initialize): Deleted.
(WebCore::GraphicsLayerDirect2D::~GraphicsLayerDirect2D): Deleted.
(WebCore::GraphicsLayerDirect2D::setNeedsDisplay): Deleted.
(WebCore::GraphicsLayerDirect2D::setNeedsDisplayInRect): Deleted.

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::createGraphicsLayer):
(WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
(WebCore::RenderLayerBacking::updateConfiguration):
(WebCore::RenderLayerBacking::updateInternalHierarchy):
(WebCore::RenderLayerBacking::updateMaskingLayer):
(WebCore::RenderLayerBacking::updateChildClippingStrategy):
(WebCore::RenderLayerBacking::updateScrollingLayers):

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

(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
(WebCore::RenderLayerCompositor::setCompositingParent):
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
(WebCore::RenderLayerCompositor::parentFrameContentLayers):
(WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForHeader):
(WebCore::RenderLayerCompositor::updateLayerForFooter):
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
(WebCore::RenderLayerCompositor::ensureRootLayer):
(WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):

  • rendering/RenderLayerCompositor.h:

Source/WebKit:

Make GraphicsLayer be RefCounted<GraphicsLayer>. GraphicsLayers own their children, via a Vector<Ref<GraphicsLayer>>.

RenderLayerBacking and other holders of GraphicsLayers use RefPtr<GraphicsLayer>.

Added some helper functions to null out a RefPtr<GraphicsLayer> after removing from the tree,
clearing the client. GraphicsLayer.m_client becomes a pointer, so it can be set to point to a singleton
empty client when a GraphicsLayer gets detached from its owner. More explicit layer unparenting,
and removed some unnecessary parent checks, and redundant unparenting.

Other changes are just to adapt to the new ownership patterns.

I verified that no GraphicsLayers were leaked or abandoned after this change.

  • WebProcess/WebCoreSupport/WebInspectorClient.cpp:

(WebKit::WebInspectorClient::~WebInspectorClient):
(WebKit::WebInspectorClient::showPaintRect):
(WebKit::WebInspectorClient::animationEndedForLayer):

  • WebProcess/WebCoreSupport/WebInspectorClient.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm:

(WebKit::RemoteLayerTreeContext::createGraphicsLayer):

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:

(WebKit::RemoteLayerTreeDrawingArea::updateRootLayers):
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):

12:01 PM Changeset in webkit [236015] by eric.carlson@apple.com
  • 50 edits
    1 copy
    2 adds in trunk

Support arbitrary video resolution in getUserMedia API
https://bugs.webkit.org/show_bug.cgi?id=178109
<rdar://problem/35083128>

Reviewed by Youenn Fablet.

Source/WebCore:

Support arbitrary video resolutions by configuring the camera to capture at the closest
larger size it supports and scaling/cropping frames as necessary.

No new tests, existing tests updated.

  • Modules/mediastream/CanvasCaptureMediaStreamTrack.h:
  • Modules/webaudio/MediaStreamAudioSource.cpp:

(WebCore::MediaStreamAudioSource::capabilities): Make non-const, it wasn't helpful.
(WebCore::MediaStreamAudioSource::settings): Ditto.
(WebCore::MediaStreamAudioSource::capabilities const): Deleted.
(WebCore::MediaStreamAudioSource::settings const): Deleted.

  • Modules/webaudio/MediaStreamAudioSource.h:
  • SourcesCocoa.txt: Add PixelBufferResizer.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • platform/cocoa/CoreVideoSoftLink.h:
  • platform/cocoa/VideoToolboxSoftLink.cpp:
  • platform/cocoa/VideoToolboxSoftLink.h:
  • platform/graphics/cv/PixelBufferResizer.h: Added.

(WebCore::PixelBufferResizer::canResizeTo):

  • platform/graphics/cv/PixelBufferResizer.mm: Added.

(WebCore::PixelBufferResizer::PixelBufferResizer):
(WebCore::PixelBufferResizer::resize):

  • platform/mediastream/RealtimeIncomingAudioSource.cpp:

(WebCore::RealtimeIncomingAudioSource::capabilities): Make non-const, it wasn't helpful.
(WebCore::RealtimeIncomingAudioSource::settings): Ditto.
(WebCore::RealtimeIncomingAudioSource::capabilities const): Deleted.
(WebCore::RealtimeIncomingAudioSource::settings const): Deleted.

  • platform/mediastream/RealtimeIncomingAudioSource.h:
  • platform/mediastream/RealtimeIncomingVideoSource.cpp:

(WebCore::RealtimeIncomingVideoSource::capabilities): Make non-const, it wasn't helpful.
(WebCore::RealtimeIncomingVideoSource::settings): Ditto.
(WebCore::RealtimeIncomingVideoSource::capabilities const): Deleted.
(WebCore::RealtimeIncomingVideoSource::settings const): Deleted.

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

(WebCore::RealtimeMediaSource::supportsConstraint):
(WebCore::RealtimeMediaSource::supportsConstraint const): Deleted.

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

(WebCore::RealtimeVideoSource::presets):
(WebCore::RealtimeVideoSource::setSupportedPresets):
(WebCore::standardVideoSizes):
(WebCore::RealtimeVideoSource::updateCapabilities): Make non-const, it wasn't helpful.
(WebCore::presetSupportsFrameRate):
(WebCore::RealtimeVideoSource::supportsCaptureSize):
(WebCore::RealtimeVideoSource::shouldUsePreset):
(WebCore::RealtimeVideoSource::bestSupportedSizeAndFrameRate):
(WebCore::RealtimeVideoSource::setSizeAndFrameRate):
(WebCore::RealtimeVideoSource::addSupportedCapabilities const): Deleted.

  • platform/mediastream/RealtimeVideoSource.h:

(WebCore::VideoPresetData::encode const):
(WebCore::VideoPresetData::decode):
(WebCore::VideoPreset::create):
(WebCore::VideoPreset::VideoPreset):
(WebCore::RealtimeVideoSource::prefersPreset):
(WebCore::RealtimeVideoSource::canResizeVideoFrames const):
(WebCore::RealtimeVideoSource::setDefaultSize):
(WebCore::RealtimeVideoSource::observedFrameRate const):
(WebCore::VideoPreset::encode const): Deleted.
(WebCore::VideoPreset::decode): Deleted.

  • platform/mediastream/mac/AVVideoCaptureSource.h:

(WebCore::AVVideoCaptureSource::videoPresets): Deleted.

  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoPreset::create):
(WebCore::AVVideoPreset::AVVideoPreset):
(WebCore::AVVideoCaptureSource::AVVideoCaptureSource):
(WebCore::AVVideoCaptureSource::settings):
(WebCore::AVVideoCaptureSource::capabilities): Make non-const, it wasn't helpful.
(WebCore::AVVideoCaptureSource::setFrameRate):
(WebCore::AVVideoCaptureSource::prefersPreset):
(WebCore::AVVideoCaptureSource::setSizeAndFrameRateWithPreset):
(WebCore::AVVideoCaptureSource::frameDurationForFrameRate):
(WebCore::AVVideoCaptureSource::setupCaptureSession):
(WebCore::AVVideoCaptureSource::processNewFrame):
(WebCore::AVVideoCaptureSource::captureOutputDidOutputSampleBufferFromConnection):
(WebCore::AVVideoCaptureSource::isFrameRateSupported):
(WebCore::AVVideoCaptureSource::generatePresets):
(WebCore::updateSizeMinMax): Deleted.
(WebCore::updateAspectRatioMinMax): Deleted.
(WebCore::AVVideoCaptureSource::settings const): Deleted.
(WebCore::AVVideoCaptureSource::capabilities const): Deleted.
(WebCore::AVVideoCaptureSource::sizeForPreset): Deleted.
(WebCore::AVVideoCaptureSource::setPreset): Deleted.
(WebCore::AVVideoCaptureSource::setSizeAndFrameRate): Deleted.
(WebCore::AVVideoCaptureSource::bestSessionPresetForVideoDimensions): Deleted.
(WebCore::AVVideoCaptureSource::supportsSizeAndFrameRate): Deleted.

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioCaptureSource::capabilities): Make non-const, it wasn't helpful.
(WebCore::CoreAudioCaptureSource::settings): Ditto.
(WebCore::CoreAudioCaptureSource::capabilities const): Deleted.
(WebCore::CoreAudioCaptureSource::settings const): Deleted.

  • platform/mediastream/mac/CoreAudioCaptureSource.h:
  • platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp:

(WebCore::DisplayCaptureSourceCocoa::capabilities): Make non-const, it wasn't helpful.
(WebCore::DisplayCaptureSourceCocoa::settings): Ditto.
(WebCore::DisplayCaptureSourceCocoa::capabilities const): Deleted.
(WebCore::DisplayCaptureSourceCocoa::settings const): Deleted.

  • platform/mediastream/mac/DisplayCaptureSourceCocoa.h:
  • platform/mediastream/mac/MockRealtimeVideoSourceMac.h:
  • platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:

(WebCore::MockRealtimeVideoSourceMac::CMSampleBufferFromPixelBuffer):
(WebCore::MockRealtimeVideoSourceMac::updateSampleBuffer):
(WebCore::MockRealtimeVideoSourceMac::setSizeAndFrameRateWithPreset):

  • platform/mock/MockMediaDevice.h:

(WebCore::MockCameraProperties::decode):

  • platform/mock/MockRealtimeAudioSource.cpp:

(WebCore::MockRealtimeAudioSource::settings): Make non-const, it wasn't helpful.
(WebCore::MockRealtimeAudioSource::capabilities): Ditto.
(WebCore::MockRealtimeAudioSource::settings const): Deleted.
(WebCore::MockRealtimeAudioSource::capabilities const): Deleted.

  • platform/mock/MockRealtimeAudioSource.h:
  • platform/mock/MockRealtimeMediaSourceCenter.cpp:

(WebCore::defaultDevices): Change video device presets to trigger resize code more often.

  • platform/mock/MockRealtimeVideoSource.cpp:

(WebCore::MockRealtimeVideoSource::MockRealtimeVideoSource):
(WebCore::MockRealtimeVideoSource::generatePresets):
(WebCore::MockRealtimeVideoSource::capabilities): Make non-const, it wasn't helpful.
(WebCore::MockRealtimeVideoSource::settings): Ditto.
(WebCore::MockRealtimeVideoSource::capabilities const): Deleted.
(WebCore::MockRealtimeVideoSource::settings const): Deleted.

  • platform/mock/MockRealtimeVideoSource.h:

Source/WebCore/PAL:

  • pal/cf/CoreMediaSoftLink.cpp:
  • pal/cf/CoreMediaSoftLink.h:

Source/WebKit:

  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

LayoutTests:

  • fast/mediastream/MediaStreamTrack-getCapabilities-expected.txt:
  • fast/mediastream/apply-constraints-advanced-expected.txt:
  • fast/mediastream/apply-constraints-advanced.html:
  • fast/mediastream/apply-constraints-video.html:
11:47 AM Changeset in webkit [236014] by Ryan Haddad
  • 2 edits in trunk/Tools

bots should pass --clobber-old-results to run-webkit-tests
https://bugs.webkit.org/show_bug.cgi?id=189623

Reviewed by Aakash Jain.

In order to ensure that bots to not produce confusing results due to transient execptions,
or run out of space if they continually hit an exception, old layout test results should be clobbered.

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

(RunWebKitTests):

11:33 AM Changeset in webkit [236013] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Bug 189541 - Build error in FontDescriptionKey::computeHash when compiling FontTaggedSettings and FontCascadeFonts together
https://bugs.webkit.org/show_bug.cgi?id=189541

Patch by Frederic Wang <fwang@igalia.com> on 2018-09-14
Reviewed by Alex Christensen.

FontDescriptionKey::computeHash() from In FontCache.h requires implicit instantiation of the
FontTaggedSettings::hash() template function. This instantiation may happen before
FontTaggedSettings::hash() is actually fully specialized in FontTaggedSettings.cpp. To avoid
compiler errors when FontCache.h and FontTaggedSettings.cpp are in the same translation unit,
we declare full specialization of the hash() functions in FontTaggedSettings.h.

No new tests, behavior unchanged.

  • platform/graphics/FontCache.h: Explicitly include FontTaggedSettings to avoid possible future breakage.
  • platform/graphics/FontTaggedSettings.h: Declare full specialization of FontTaggedSettings::hash().
11:28 AM Changeset in webkit [236012] by Basuke Suzuki
  • 3 edits in trunk/Source/WebKit

[Curl][WebKit] Bug fix for continuously retrying with empty credentials.
https://bugs.webkit.org/show_bug.cgi?id=189601

Reviewed by Alex Christensen.

Added stop condition for empty credentials passed by client.

  • NetworkProcess/curl/NetworkDataTaskCurl.cpp:

(WebKit::NetworkDataTaskCurl::curlDidReceiveResponse):
(WebKit::NetworkDataTaskCurl::invokeDidReceiveResponse):
(WebKit::NetworkDataTaskCurl::tryHttpAuthentication):
(WebKit::NetworkDataTaskCurl::tryProxyAuthentication):

  • NetworkProcess/curl/NetworkDataTaskCurl.h:
11:17 AM Changeset in webkit [236011] by Ryan Haddad
  • 8 edits
    1 copy
    1 move
    1 add in trunk/Source

Unreviewed, rolling out r235990.

Introduced TestWebKitAPI.NowPlayingTest timeouts on iOS

Reverted changeset:

"Enable USE_MEDIAREMOTE on iOS"
https://bugs.webkit.org/show_bug.cgi?id=189096
https://trac.webkit.org/changeset/235990

10:03 AM Changeset in webkit [236010] by jer.noble@apple.com
  • 7 edits in trunk/Source

Turn SourceBufferChangeTypeEnabled on by default
https://bugs.webkit.org/show_bug.cgi?id=189527

Reviewed by Eric Carlson.

Source/WebCore:

  • page/Settings.yaml:

Source/WebKit:

  • Shared/WebPreferences.yaml:
  • UIProcess/API/C/WKPreferencesRefPrivate.h:

Source/WebKitLegacy/mac:

  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):

9:50 AM Changeset in webkit [236009] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit

Unreviewed, speculative WPE build fix after r236004
https://bugs.webkit.org/show_bug.cgi?id=189545

  • UIProcess/API/wpe/WebKitScriptDialog.h:
9:44 AM Changeset in webkit [236008] by webkit@devinrousso.com
  • 19 edits
    2 adds in trunk

Web Inspector: Record actions performed on ImageBitmapRenderingContext
https://bugs.webkit.org/show_bug.cgi?id=181341

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

  • inspector/protocol/Recording.json:
  • inspector/scripts/codegen/generator.py:

Source/WebCore:

Test: inspector/canvas/recording-bitmaprenderer.html

  • html/canvas/ImageBitmapRenderingContext.idl:
  • inspector/InspectorCanvas.cpp:

(WebCore::shouldSnapshotBitmapRendererAction):
(WebCore::InspectorCanvas::recordAction):

  • inspector/agents/InspectorCanvasAgent.cpp:

(WebCore::InspectorCanvasAgent::didFinishRecordingCanvasFrame):

  • page/PageConsoleClient.cpp:

(canvasRenderingContext):

Source/WebInspectorUI:

  • UserInterface/Models/Recording.js:

(WI.Recording.fromPayload):
(WI.Recording.prototype.createContext):

  • UserInterface/Models/RecordingAction.js:

(WI.RecordingAction._prototypeForType):
(WI.RecordingAction.prototype.getImageParameters):

  • UserInterface/Views/RecordingActionTreeElement.js:

(WI.RecordingActionTreeElement._classNameForAction.classNameForActionName):

  • UserInterface/Views/RecordingContentView.js:

(WI.RecordingContentView):
(WI.RecordingContentView.prototype.get navigationItems):
(WI.RecordingContentView.prototype.updateActionIndex):
(WI.RecordingContentView.prototype.shown):
(WI.RecordingContentView.prototype.hidden):
(WI.RecordingContentView.prototype._generateContentFromSnapshot): Renamed.
(WI.RecordingContentView.prototype._updateImageGrid):
(WI.RecordingContentView.prototype._generateContentCanvasWebGL): Deleted.

  • UserInterface/Views/CanvasContentView.js:

(WI.CanvasContentView):

LayoutTests:

  • inspector/canvas/recording-2d-expected.txt:
  • inspector/canvas/recording-bitmaprenderer-expected.txt: Added.
  • inspector/canvas/recording-bitmaprenderer.html: Added.
  • inspector/canvas/recording-webgl-expected.txt:
  • inspector/canvas/recording-webgl-snapshots-expected.txt:
  • inspector/canvas/resources/recording-utilities.js:

Simplify the test output to avoid unrelated failures, such as if line numbers change.
Also remove non-human-readable text, as it makes it more difficult for those unfamiliar with
the test to determine if any differences are acceptable.

9:38 AM Changeset in webkit [236007] by ddkilzer@apple.com
  • 7 edits in trunk/Source/WebCore

REGRESSION (r235954): Fix build failure on watchOS
<https://webkit.org/b/189605>

Reviewed by Geoffrey Garen.

Remove using WebCore::IndexedDB::KeyType; from
Source/WebCore/Modules/indexeddb/IDBKey.h and fix all the
resulting build failures.

  • Modules/indexeddb/IDBKey.cpp:

(WebCore::IDBKey::IDBKey):
(WebCore::IDBKey::isValid const):
(WebCore::IDBKey::compare const):

  • Modules/indexeddb/IDBKey.h:

(WebCore::IDBKey::createNumber):
(WebCore::IDBKey::createDate):
(WebCore::IDBKey::type const):
(WebCore::IDBKey::array const):
(WebCore::IDBKey::string const):
(WebCore::IDBKey::date const):
(WebCore::IDBKey::number const):
(WebCore::IDBKey::binary const):
(WebCore::IDBKey::compareTypes):
(WebCore::IDBKey::IDBKey):

  • Modules/indexeddb/IDBKeyData.cpp:

(WebCore::IDBKeyData::IDBKeyData):
(WebCore::IDBKeyData::maybeCreateIDBKey const):
(WebCore::IDBKeyData::isolatedCopy):
(WebCore::IDBKeyData::encode const):
(WebCore::IDBKeyData::decode):
(WebCore::IDBKeyData::compare const):
(WebCore::IDBKeyData::loggingString const):
(WebCore::IDBKeyData::setArrayValue):
(WebCore::IDBKeyData::setBinaryValue):
(WebCore::IDBKeyData::setStringValue):
(WebCore::IDBKeyData::setDateValue):
(WebCore::IDBKeyData::setNumberValue):
(WebCore::IDBKeyData::isValid const):
(WebCore::IDBKeyData::operator== const):

  • Modules/indexeddb/IDBKeyData.h:

(WebCore::IDBKeyData::IDBKeyData):
(WebCore::IDBKeyData::minimum):
(WebCore::IDBKeyData::maximum):
(WebCore::IDBKeyData::type const):
(WebCore::IDBKeyData::hash const):
(WebCore::IDBKeyData::string const):
(WebCore::IDBKeyData::date const):
(WebCore::IDBKeyData::number const):
(WebCore::IDBKeyData::binary const):
(WebCore::IDBKeyData::array const):
(WebCore::IDBKeyData::encode const):
(WebCore::IDBKeyData::decode):

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetIndexRecordForOneKey):

  • bindings/js/IDBBindingUtilities.cpp:

(WebCore::toJS):

8:37 AM Changeset in webkit [236006] by calvaris@igalia.com
  • 5 edits in trunk/Source/WebCore

[EME] Add support the waitingforkey event
https://bugs.webkit.org/show_bug.cgi?id=189616

Reviewed by Philippe Normand.

Crossplatform support to fire the waitingforkey event from the
player to the element. The element implements the W3C specified
algorithm.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaPlayerWaitingForKey):
(WebCore::HTMLMediaElement::attemptToResumePlaybackIfNecessary):

  • html/HTMLMediaElement.h:
  • platform/graphics/MediaPlayer.cpp:

(WebCore::MediaPlayer::waitingForKey):

  • platform/graphics/MediaPlayer.h:

(WebCore::MediaPlayerClient::mediaPlayerWaitingForKey):

8:16 AM Changeset in webkit [236005] by commit-queue@webkit.org
  • 8 edits
    13 copies
    1 add
    1 delete in trunk/Source

builtins directory causes name conflict on Python 3
https://bugs.webkit.org/show_bug.cgi?id=189552

Patch by Mike Gorse <mgorse@suse.com> on 2018-09-14
Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

  • CMakeLists.txt: builtins -> wkbuiltins.
  • DerivedSources.make: builtins -> wkbuiltins.
  • Scripts/generate-js-builtins.py: import wkbuiltins, rather than builtins.
  • Scripts/wkbuiltins/init.py: Renamed from Source/JavaScriptCore/Scripts/builtins/init.py.
  • Scripts/wkbuiltins/builtins_generate_combined_header.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_combined_header.py.
  • Scripts/wkbuiltins/builtins_generate_internals_wrapper_implementation.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_internals_wrapper_implementation.py.
  • Scripts/wkbuiltins/builtins_generate_separate_header.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_header.py.
  • Scripts/wkbuiltins/builtins_generate_separate_implementation.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_implementation.py.
  • Scripts/wkbuiltins/builtins_generate_wrapper_header.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_wrapper_header.py.
  • Scripts/wkbuiltins/builtins_generate_wrapper_implementation.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_wrapper_implementation.py.
  • Scripts/wkbuiltins/builtins_generator.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generator.py.
  • Scripts/wkbuiltins/builtins_model.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_model.py.
  • Scripts/wkbuiltins/builtins_templates.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_templates.py.
  • Scripts/wkbuiltins/wkbuiltins.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins.py.
  • JavaScriptCore.xcodeproj/project.pbxproj: Update for the renaming.

Source/WebCore:

No new tests (No behavior change).

  • CMakeLists.txt: builtins -> wkbuiltins.
  • DerivedSources.make: builtins -> wkbuiltins.
4:01 AM Changeset in webkit [236004] by Carlos Garcia Campos
  • 11 edits
    4 adds in trunk/Source

[GTK] Make script dialogs modal to the current web view only
https://bugs.webkit.org/show_bug.cgi?id=189545

Reviewed by Michael Catanzaro.

Source/WebCore/platform/gtk/po:

  • POTFILES.in:

Source/WebKit:

Change the default implementation of script dialogs to use an embedded window, like the HTTP auth dialog,
instead of a GtkMessageDialog. This patch adds a base class WebKitWebViewDialog shared by
WebKitAuthenticationDialog and the new WebKitScriptDialogImpl.

  • SourcesGTK.txt: Add new files to compilation.
  • UIProcess/API/glib/WebKitScriptDialogPrivate.h:
  • UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:

(webkitAuthenticationDialogInitialize): Do not use a frame and use a better styled title.
(webkit_authentication_dialog_class_init): Remove implementation of vfuncs that are now implemented by the
parent.

  • UIProcess/API/gtk/WebKitAuthenticationDialog.h:
  • UIProcess/API/gtk/WebKitScriptDialogGtk.cpp:

(webkitScriptDialogAccept): Use WebKitScriptDialogImpl API.
(webkitScriptDialogDismiss): Ditto.
(webkitScriptDialogSetUserInput): Ditto.

  • UIProcess/API/gtk/WebKitScriptDialogImpl.cpp: Added.

(webkitScriptDialogImplClose):
(webkitScriptDialogImplKeyPressEvent):
(webkitScriptDialogImplMap):
(webkitScriptDialogImplConstructed):
(webkitScriptDialogImplDispose):
(webkit_script_dialog_impl_class_init):
(webkitScriptDialogImplAddButton):
(webkitScriptDialogImplNew):
(webkitScriptDialogImplCancel):
(webkitScriptDialogImplConfirm):
(webkitScriptDialogImplSetEntryText):

  • UIProcess/API/gtk/WebKitScriptDialogImpl.h: Added.
  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewChildIsInternalWidget): Rename authenticationDialog as just dialog.
(webkitWebViewBaseAddDialog): Ditto.
(webkitWebViewBaseContainerRemove): Ditto.
(webkitWebViewBaseContainerForall): Ditto.
(webkitWebViewBaseConstructed): Ditto.
(webkitWebViewBaseSizeAllocate): Ditto.
(webkitWebViewBaseKeyPressEvent): Ditto.
(webkitWebViewBaseHandleMouseEvent): Ditto.
(webkitWebViewBaseButtonPressEvent): Ditto.
(webkitWebViewBaseButtonReleaseEvent): Ditto.
(webkitWebViewBaseHandleWheelEvent): Ditto.
(webkitWebViewBaseScrollEvent): Ditto.
(webkitWebViewBaseMotionNotifyEvent): Ditto.
(webkitWebViewBaseCrossingNotifyEvent): Ditto.
(webkitWebViewBaseTouchEvent): Ditto.
(webkitWebViewBaseFocus): Ditto.
(webkitWebViewBaseDestroy): Ditto.

  • UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
  • UIProcess/API/gtk/WebKitWebViewDialog.cpp: Added.

(webkitWebViewDialogDraw):
(webkitWebViewDialogSizeAllocate):
(webkitWebViewDialogConstructed):
(webkit_web_view_dialog_class_init):

  • UIProcess/API/gtk/WebKitWebViewDialog.h: Added.
  • UIProcess/API/gtk/WebKitWebViewGtk.cpp:

(webkitWebViewAuthenticate):
(webkitWebViewScriptDialog):

12:20 AM Changeset in webkit [236003] by Ms2ger@igalia.com
  • 3 edits
    29 deletes in trunk/LayoutTests

Remove some obsolete XHR tests
https://bugs.webkit.org/show_bug.cgi?id=189581

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

These tests were removed upstream, but stuck around in WebKit.

  • web-platform-tests/xhr/OWNERS: Removed.
  • web-platform-tests/xhr/abort-during-open-expected.txt: Removed.
  • web-platform-tests/xhr/abort-during-open.htm: Removed.
  • web-platform-tests/xhr/abort-during-open.js: Removed.
  • web-platform-tests/xhr/abort-during-open.worker-expected.txt: Removed.
  • web-platform-tests/xhr/abort-during-open.worker.html: Removed.
  • web-platform-tests/xhr/abort-during-open.worker.js: Removed.
  • web-platform-tests/xhr/getallresponseheaders-cl-expected.txt: Removed.
  • web-platform-tests/xhr/getallresponseheaders-cl.htm: Removed.
  • web-platform-tests/xhr/interfaces-expected.txt: Removed.
  • web-platform-tests/xhr/interfaces.html: Removed.
  • web-platform-tests/xhr/open-url-bogus-expected.txt: Removed.
  • web-platform-tests/xhr/open-url-bogus.htm: Removed.
  • web-platform-tests/xhr/overridemimetype-done-state-expected.txt: Removed.
  • web-platform-tests/xhr/overridemimetype-done-state.htm: Removed.
  • web-platform-tests/xhr/readme.txt: Removed.
  • web-platform-tests/xhr/responsetype-expected.txt: Removed.
  • web-platform-tests/xhr/responsetype.html: Removed.
  • web-platform-tests/xhr/send-non-same-origin.sub-expected.txt: Removed.
  • web-platform-tests/xhr/send-non-same-origin.sub.htm: Removed.
  • web-platform-tests/xhr/send-send-expected.txt: Removed.
  • web-platform-tests/xhr/send-send.htm: Removed.
  • web-platform-tests/xhr/send-send.js: Removed.
  • web-platform-tests/xhr/send-send.worker-expected.txt: Removed.
  • web-platform-tests/xhr/send-send.worker.html: Removed.
  • web-platform-tests/xhr/send-send.worker.js: Removed.
  • web-platform-tests/xhr/send-usp-expected.txt: Removed.
  • web-platform-tests/xhr/send-usp.html: Removed.
  • web-platform-tests/xhr/send-usp.js: Removed.

LayoutTests:

Sep 13, 2018:

10:56 PM Changeset in webkit [236002] by rniwa@webkit.org
  • 20 edits
    2 adds in trunk

Capturing event listeners are called during bubbling phase for shadow hosts
https://bugs.webkit.org/show_bug.cgi?id=174288
LayoutTests/imported/w3c:

Reviewed by Darin Adler.

  • web-platform-tests/dom/events/Event-dispatch-handlers-changed-expected.txt: Rebaselined. This test's

expectation is now wrong because event listner 3 is added after the event listener list is cloned for
capturing event listeners but before cloned for bubbling event listeners. As a result, event listener 3
is now invoked. It used to be not called because both bubbling and capturing event listeners are called
after cloning the event listner list once, which didn't have event listener 3.

  • web-platform-tests/dom/events/EventTarget-dispatchEvent-expected.txt: Rebaselined. This test expects

event listener 2, which is bubbling, to be called between two capturing event listeners 1 and 3, which
is no longer true after this patch.

Source/WebCore:

<rdar://problem/33530455>

Reviewed by Darin Adler.

Implemented the new behavior proposed in https://github.com/whatwg/dom/pull/686 [1] to fix the problem
that capturing event listeners on a shadow host is invoked during bubbling phase when an event is
dispatched within its shadow tree.

To see why this is a problem, suppose we fire a composed event at span#target in the following DOM tree:

section#hostParent

+ div#host -- ShadowRoot

  • p#parent
    • span#target

Then capturing and bubbling event listeners on #target, #parent, #host, and #hostParent are invoked in
the following order in WebKit & Chrome right now:

  1. #hostParent, capturing, eventPhase: CAPTURING_PHASE
  2. #parent, capturing, eventPhase: CAPTURING_PHASE
  3. #target, capturing, eventPhase: AT_TARGET
  4. #target, non-capturing, eventPhase: AT_TARGET
  5. #parent, non-capturing, eventPhase: BUBBLING_PHASE
  6. #host, capturing, eventPhase: AT_TARGET
  7. #host, non-capturing, eventPhase: AT_TARGET
  8. #hostParent, non-capturing, eventPhase: BUBBLING_PHASE

This is counter-intuitive because capturing event listeners on #host isn't invoked until bubblign phase
started. A more natural ordering would be:

  1. #hostParent, capturing, eventPhase: CAPTURING_PHASE
  2. #host, capturing, eventPhase: AT_TARGET
  3. #parent, capturing, eventPhase: CAPTURING_PHASE
  4. #target, capturing, eventPhase: AT_TARGET
  5. #target, non-capturing, eventPhase: AT_TARGET
  6. #parent, non-capturing, eventPhase: BUBBLING_PHASE
  7. #host, non-capturing, eventPhase: AT_TARGET
  8. #hostParent, non-capturing, eventPhase: BUBBLING_PHASE

This also happens to be the order by which Gecko's current shadow DOM implementation invoke event listners.
This patch implements this new behavior using the spec-change proposed in [1]. Note that this patch also
impacts the invocation order of event listeners when there is no shadow tree. Namely, before this patch,
event listeners on the event's target is invoked in the registration order. After this patch, all capturing
event listeners are invoked before bubbling event listeners are invoked.

To implement this behavior, this patch introduces EventTarget::EventInvokePhase indicating whether we're
in the capturing phase or bubbling phase to EventTarget::fireEventListeners. We can't use Event's eventPhase
enum because that's set to Event::Phase::AT_TARGET when we're at a shadow host.

Test: fast/shadow-dom/capturing-and-bubbling-event-listeners-across-shadow-trees.html

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

(MediaControllerSupport.prototype.enable): Use capturing event listeners so that we can update the states of
media controls before author scripts recieve the event.
(MediaControllerSupport.prototype.disable): Ditto.

  • dom/EventContext.cpp:

(WebCore::EventContext::handleLocalEvents const):
(WebCore::MouseOrFocusEventContext::handleLocalEvents const):
(WebCore::TouchEventContext::handleLocalEvents const):

  • dom/EventContext.h:
  • dom/EventDispatcher.cpp:

(WebCore::dispatchEventInDOM): Invoke capturing event listners even when target and current target are same.
This happens when the current target is a shadow host and event's target is in its shadow tree. Also merged
the special code path for the event's target with the code in the bubbling phase.

  • dom/EventPath.cpp:

(WebCore::WindowEventContext::handleLocalEvents const):

  • dom/EventTarget.cpp:

(WebCore::EventTarget::dispatchEvent): Invoke capturing and bubbling event listeners in the order.
(WebCore::EventTarget::fireEventListeners):
(WebCore::EventTarget::innerInvokeEventListeners): Renamed from fireEventListeners to match the spec. Use
EventInvokePhase to filter out event listeners so that we can invoke capturing event listners before bubbling
event listeners even when eventPhase is Event::Phase::AT_TARGET.

  • dom/EventTarget.h:
  • dom/Node.cpp:

(WebCore::Node::handleLocalEvents):

  • dom/Node.h:
  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::handleLocalEvents):

  • html/HTMLFormElement.h:
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::dispatchEvent):

LayoutTests:

Reviewed by Darin Adler.

Added a W3C style testharness.js test and rebaselined two tests. See below for rationals of rebaselines.

  • fast/shadow-dom/capturing-and-bubbling-event-listeners-across-shadow-trees-expected.txt: Added.
  • fast/shadow-dom/capturing-and-bubbling-event-listeners-across-shadow-trees.html: Added.
  • media/media-load-event-expected.txt: Rebaselined. The logging of oncanplaythrough event is now happening

before canplaythrough() is called because the logging is done by waitForEvent which uses a capturing event
listener whereas canplaythrough is called by a event handler, which is non-capturing.

  • platform/ios-11/imported/w3c/web-platform-tests/dom/events/EventTarget-dispatchEvent-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/dom/events/EventTarget-dispatchEvent-expected.txt:
7:19 PM Changeset in webkit [236001] by Justin Fan
  • 34 edits in trunk/LayoutTests

Update webkit-webgl-test-harness.js for more details on WebGL 2 conformance tests part 4
https://bugs.webkit.org/show_bug.cgi?id=189609

Unreviewed small change for only the few webgl 2 tests' harness; completely passing
tests now only report the PASS line, to avoid discrepancies between e.g. feature ability
of different graphics cards causing diffs to fail.

  • webgl/2.0.0/conformance2/glsl3/array-as-return-value-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/array-assign-constructor-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/array-assign-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/array-complex-indexing-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/array-element-increment-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/array-equality-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/array-in-complex-expression-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/bool-type-cast-bug-uint-ivec-uvec-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/compare-structs-containing-arrays-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/compound-assignment-type-combination-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/const-array-init-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/forbidden-operators-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/frag-depth-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/invalid-default-precision-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/invalid-invariant-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/loops-with-side-effects-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/misplaced-version-directive-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/no-attribute-vertex-shader-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/sampler-no-precision-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/sequence-operator-returns-non-constant-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/shader-with-1025-character-define-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/shader-with-1025-character-identifier.frag-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/short-circuiting-in-loop-condition-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/texture-offset-out-of-range-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/texture-offset-uniform-texture-coordinate-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/tricky-loop-conditions-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/uniform-block-layout-match-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/uniform-block-layouts-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/vector-dynamic-indexing-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/vector-dynamic-indexing-nv-driver-bug-expected.txt:
  • webgl/2.0.0/conformance2/renderbuffers/framebuffer-test-expected.txt:
  • webgl/2.0.0/conformance2/vertex_arrays/vertex-array-object-expected.txt:
  • webgl/2.0.0/resources/webkit-webgl-test-harness.js:

(window.webglTestHarness.notifyFinished):

6:37 PM Changeset in webkit [236000] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Layout Test imported/w3c/web-platform-tests/streams/piping/error-propagation-backward.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=188070

Unreviewed test gardening.

  • platform/ios/TestExpectations: Mark test as flaky.
  • platform/mac-wk1/TestExpectations: Ditto.
5:25 PM Changeset in webkit [235999] by Megan Gardner
  • 6 edits
    2 adds in trunk

Fix color stop blending in conic gradients for stops past 1
https://bugs.webkit.org/show_bug.cgi?id=189532
<rdar://problem/44158221>

Reviewed by Simon Fraser.

Source/WebCore:

Calculation was wrong, fixed it, and wrote a test that failed
without the change, and passes with it.

Test: fast/gradients/conic-repeating-last-stop.html

  • css/CSSGradientValue.cpp:

(WebCore::ConicGradientAdapter::normalizeStopsAndEndpointsOutsideRange):

LayoutTests:

Tests that last stop in the gradient is correct.

  • fast/gradients/conic-repeating-last-stop-expected.html: Added.
  • fast/gradients/conic-repeating-last-stop.html: Added.
  • platform/ios-12/TestExpectations:
  • platform/mac/TestExpectations:
5:08 PM Changeset in webkit [235998] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Dark Mode: bezier curve editor should be updated
https://bugs.webkit.org/show_bug.cgi?id=187657

Patch by Jamal Nasser <jamaln@mail.com> on 2018-09-13
Reviewed by Matt Baker.

  • UserInterface/Views/DarkMode.css:

(@media (prefers-dark-interface)):
(.bezier-editor > .bezier-preview-timing):
(.bezier-editor > .bezier-container .bezier-curve):
(.bezier-editor > .bezier-container .linear-curve):
(.bezier-editor > .bezier-preview):
(.bezier-editor > .bezier-preview > div):
(.bezier-editor > .bezier-container .control-handle):
(.bezier-editor > .bezier-container .control-line):

5:03 PM Changeset in webkit [235997] by Matt Baker
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: Timelines: clicking a row in Script > Events grid triggers Location popover when column is hidden
https://bugs.webkit.org/show_bug.cgi?id=189603
<rdar://problem/44431403>

Reviewed by Joseph Pecoraro.

TimelineDataGrid controls showing/hiding the call frame popover, with subclasses
overriding callFramePopoverAnchorElement to position it. This patch adds
another overridable base class method, shouldShowCallFramePopover, which subclasses
can use to block the popover when the Location column is hidden.

  • UserInterface/Views/DataGrid.js:

(WI.DataGrid.prototype.layout):
(WI.DataGrid.prototype._positionResizerElements):
(WI.DataGrid.prototype._isColumnVisible): Deleted.

  • UserInterface/Views/LayoutTimelineDataGrid.js:

(WI.LayoutTimelineDataGrid.prototype.shouldShowCallFramePopover):
(WI.LayoutTimelineDataGrid):

  • UserInterface/Views/ScriptTimelineDataGrid.js:

(WI.ScriptTimelineDataGrid.prototype.shouldShowCallFramePopover):
(WI.ScriptTimelineDataGrid):

  • UserInterface/Views/TimelineDataGrid.js:

(WI.TimelineDataGrid.prototype.shouldShowCallFramePopover):
(WI.TimelineDataGrid.prototype._dataGridSelectedNodeChanged):

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

Web Inspector: Opening inspector with a selected element might immediately scroll that element off screen in the DOM Tree outline
https://bugs.webkit.org/show_bug.cgi?id=189569
<rdar://problem/44397098>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2018-09-13
Reviewed by Devin Rousso.

  • UserInterface/Views/DOMTreeContentView.js:

(WI.DOMTreeContentView.prototype.layout):
Re-select the selected DOM node in the DOM Tree when the view resizes.
Typically this can happen if the sidebar opens/closes/resizes, in which
case we will want the selected DOM node to stay in view even if the DOM
tree starts wrapping earlier content.

3:50 PM Changeset in webkit [235995] by Ryan Haddad
  • 47 edits
    3 copies
    1 add
    1 delete in trunk

Unreviewed, rolling out r235954.

Breaks the watchOS build.

Reverted changeset:

"Move IndexedDB to Network Process"
https://bugs.webkit.org/show_bug.cgi?id=189415
https://trac.webkit.org/changeset/235954

3:38 PM Changeset in webkit [235994] by Chris Dumez
  • 13 edits
    3 adds in trunk

Regression(PSON): setting window.opener to null allows process swapping in cases that are not web-compatible
https://bugs.webkit.org/show_bug.cgi?id=189590
<rdar://problem/44422725>

Reviewed by Geoffrey Garen.

Source/WebCore:

Set a flag on the navigation action to indicate if the page was opened via window.open() without 'noopener'.

Test: http/tests/navigation/window-open-cross-origin-then-navigated-back-same-origin.html

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadURL):

  • loader/NavigationAction.h:

(WebCore::NavigationAction::openedViaWindowOpenWithOpener const):
(WebCore::NavigationAction::setOpenedViaWindowOpenWithOpener):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::createWindow):

  • page/Page.h:

(WebCore::Page::openedViaWindowOpenWithOpener const):
(WebCore::Page::setOpenedViaWindowOpenWithOpener):

Source/WebKit:

If script calls window.open() without 'noopener' and the newly navigated window gets navigated cross-site,
we are currently unable to process-swap because the opener has a WindowProxy handle to this new Window and
may interact with it (which we currently do not support cross-process). We were dealing with this by not
process-swapping if window.opener is not null. This works most of the time but is not sufficient because the
opener may get nulled out, while the opener still has a valid WindowProxy handle to its openee.

Therefore, we now also check for a flag indicating if the frame was opened via window.open() without
'nooopener'. We still need to check if the browsing context has an opener for browsing context created
via <a target="_blank"> for example (the opener does not have a handle to the new window but the openee
has access to its opener).

  • Shared/NavigationActionData.cpp:

(WebKit::NavigationActionData::encode const):
(WebKit::NavigationActionData::decode):

  • Shared/NavigationActionData.h:
  • UIProcess/API/APINavigation.h:

(API::Navigation::openedViaWindowOpenWithOpener const):
(API::Navigation::setOpenedViaWindowOpenWithOpener):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::decidePolicyForNavigationAction):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::processForNavigationInternal):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

LayoutTests:

Add layout test coverage.

  • http/tests/navigation/resources/navigate-helper.html: Added.
  • http/tests/navigation/window-open-cross-origin-then-navigated-back-same-origin-expected.txt: Added.
  • http/tests/navigation/window-open-cross-origin-then-navigated-back-same-origin.html: Added.
3:33 PM Changeset in webkit [235993] by dino@apple.com
  • 9 edits in trunk/Source/WebKit

Generate warnings for Preferences files
https://bugs.webkit.org/show_bug.cgi?id=189573

Reviewed by Sam Weinig.

Generate the "DO NOT EDIT" warnings, rather than have
them in the template (which was confusing).

While here, simplify some of the templating generation code
to avoid duplication.

  • Scripts/GeneratePreferences.rb:
  • Scripts/PreferencesTemplates/WebPageUpdatePreferences.cpp.erb:
  • Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb:
  • Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb:
  • Scripts/PreferencesTemplates/WebPreferencesInternalDebugFeatures.cpp.erb:
  • Scripts/PreferencesTemplates/WebPreferencesKeys.cpp.erb:
  • Scripts/PreferencesTemplates/WebPreferencesKeys.h.erb:
  • Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb:
3:32 PM Changeset in webkit [235992] by Keith Rollin
  • 2 edits in trunk/Source/WebKit

WebPageProxy::reportPageLoadResult can crash on some code paths
https://bugs.webkit.org/show_bug.cgi?id=189568

Reviewed by Chris Dumez.

WebPageProxy::reportPageLoadResult (which is called from
WebPageProxy::didFinishLoadForFrame) can sometimes crash when
accessing m_pageLoadStart (a std::optional) in its unloaded state.
Normally, m_pageLoadStart is initialized in
WebPageProxy::didStartProvisionalLoadForFrame, which one would expect
would be called before WebPageProxy::didFinishLoadForFrame. But that
turns out to not always be the case. It's not apparent under what
conditions didStartProvisionalLoadForFrame will not be called, but
it's happening in the wild, leading to crashes now that std::optional
asserts in release builds on bad accesses (see
https://bugs.webkit.org/show_bug.cgi?id=189568).

Fix this by checking m_pageLoadState on entry to reportPageLoadResult.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::reportPageLoadResult):

3:28 PM Changeset in webkit [235991] by dino@apple.com
  • 1 edit in trunk/LayoutTests/webanimations/accelerated-transition-interrupted-on-composited-element.html

Header parsing for experimental and internal debug features
https://bugs.webkit.org/show_bug.cgi?id=189486
<rdar://problem/44320618>

Missed this test header.

  • webanimations/accelerated-transition-interrupted-on-composited-element.html:
3:19 PM Changeset in webkit [235990] by jer.noble@apple.com
  • 8 edits
    1 move
    2 deletes in trunk/Source

Enable USE_MEDIAREMOTE on iOS
https://bugs.webkit.org/show_bug.cgi?id=189096

Reviewed by Eric Carlson.

Source/WebCore:

Migrate to using MediaRemote.framework on iOS from MediaPlayer.framework. This unifies the
Now Playing implementation on iOS and Mac.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/audio/cocoa/MediaSessionManagerCocoa.cpp: Removed.
  • platform/audio/cocoa/MediaSessionManagerCocoa.h:
  • platform/audio/cocoa/MediaSessionManagerCocoa.mm: Renamed from Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm.

(PlatformMediaSessionManager::sharedManager):
(PlatformMediaSessionManager::sharedManagerIfExists):
(MediaSessionManagerCocoa::updateSessionState):
(MediaSessionManagerCocoa::beginInterruption):
(MediaSessionManagerCocoa::scheduleUpdateNowPlayingInfo):
(MediaSessionManagerCocoa::sessionWillBeginPlayback):
(MediaSessionManagerCocoa::sessionDidEndRemoteScrubbing):
(MediaSessionManagerCocoa::removeSession):
(MediaSessionManagerCocoa::sessionWillEndPlayback):
(MediaSessionManagerCocoa::clientCharacteristicsChanged):
(MediaSessionManagerCocoa::sessionCanProduceAudioChanged):
(MediaSessionManagerCocoa::nowPlayingEligibleSession):
(MediaSessionManagerCocoa::updateNowPlayingInfo):

  • platform/audio/ios/MediaSessionManagerIOS.h:

(): Deleted.

  • platform/audio/ios/MediaSessionManagerIOS.mm:

(WebCore::MediaSessionManageriOS::nowPlayingEligibleSession): Deleted.
(WebCore::MediaSessionManageriOS::updateNowPlayingInfo): Deleted.
(WebCore::MediaSessionManageriOS::sessionWillBeginPlayback): Deleted.
(WebCore::MediaSessionManageriOS::removeSession): Deleted.
(WebCore::MediaSessionManageriOS::sessionWillEndPlayback): Deleted.
(WebCore::MediaSessionManageriOS::clientCharacteristicsChanged): Deleted.

  • platform/audio/mac/MediaSessionManagerMac.h: Removed.

Source/WTF:

  • wtf/Platform.h:
2:49 PM Changeset in webkit [235989] by yusukesuzuki@slowstart.org
  • 10 edits
    1 move in trunk/Source/JavaScriptCore

[WebAssembly] Inline WasmContext accessor functions
https://bugs.webkit.org/show_bug.cgi?id=189416

Reviewed by Saam Barati.

WasmContext accessor functions are very small while it resides in the critical path of
JS to Wasm function call. This patch makes them inline to improve performance.
This change improves a small benchmark (calling JS to Wasm function 1e7 times) from 320ms to 270ms.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • interpreter/CallFrame.cpp:
  • jit/AssemblyHelpers.cpp:
  • wasm/WasmB3IRGenerator.cpp:
  • wasm/WasmContextInlines.h: Renamed from Source/JavaScriptCore/wasm/WasmContext.cpp.

(JSC::Wasm::Context::useFastTLS):
(JSC::Wasm::Context::load const):
(JSC::Wasm::Context::store):

  • wasm/WasmMemoryInformation.cpp:
  • wasm/WasmModuleParser.cpp: Include <wtf/SHA1.h> due to changes of unified source combinations.
  • wasm/js/JSToWasm.cpp:
  • wasm/js/WebAssemblyFunction.cpp:
1:52 PM Changeset in webkit [235988] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

ProcessSwap.BackWithoutSuspendedPage API test hits assertion under WebPageProxy::didCreateMainFrame()
https://bugs.webkit.org/show_bug.cgi?id=189599

Reviewed by Geoffrey Garen.

The code in WebPageProxy::reattachToWebProcess() was re-initializing m_mainFrame unconditionally in case
of a HistoryNavigation. The reason we need to initialize m_mainFrame in reattachToWebProcess() is if the
process we're reattaching to already has a WebPage (with a main frame), in which case
WebPageProxy::didCreateMainFrame() would not get called to initialize WebPageProxy::m_mainFrame.

The process we're reattaching to can be in such a state only if it comes from a SuspendedPageProxy (we
detached the WebProcessProxy from the WebPageProxy but kept the WebPage in the "suspended" WebProcess).
It is true that we're only reattaching to a SuspendedPageProxy's process in the event of history
navigations. However, it is not true that all history navigations will use a SuspendedPageProxy's process.
For example, no SuspendedPageProxy may be available for the history navigation because the history
was restored to a new view from disk, or because the WebBackForwardListItem no longer has a
SuspendedPageProxy (we currently only keep a single SuspendedPageProxy for the last HistoryItem).

Therefore, unconditionally initializating m_mainFrame in reattachToWebProcess() for history navigations
is incorrect and we should instead check if we're reattaching to a SuspendedPage's process.

Change is covered by ProcessSwap.BackWithoutSuspendedPage API test which is no longer crashes and
existing Back/Forward PSON API tests which are still passing.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::reattachToWebProcess):
(WebKit::WebPageProxy::continueNavigationInNewProcess):

  • UIProcess/WebPageProxy.h:
1:44 PM Changeset in webkit [235987] by Chris Dumez
  • 4 edits in trunk/Source/WebKit

Add release logging to help debug PSON issues
https://bugs.webkit.org/show_bug.cgi?id=189562

Reviewed by Ryosuke Niwa.

Add release logging to help debug issues related to process swap on navigation.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::decidePolicyForNavigationAction):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::processForNavigation):
(WebKit::WebProcessPool::processForNavigationInternal):

  • UIProcess/WebProcessPool.h:
1:11 PM Changeset in webkit [235986] by Fujii Hironori
  • 6 edits in trunk/Source/WebCore

Remove the workaround for friend class LazyNeverDestroyed<X> statements for MSVC
https://bugs.webkit.org/show_bug.cgi?id=189576

Reviewed by Alex Christensen.

Old MSVC can't compile "friend class LazyNeverDestroyed<X>"
statements, but "friend LazyNeverDestroyed<X>".

No new tests (No behavior change).

  • css/CSSInheritedValue.h: Removed the code for COMPILER(MSVC).

Removed 'class' keyword in "friend class LazyNeverDestroyed<X>"
statement.

  • css/CSSInitialValue.h: Ditto.
  • css/CSSPrimitiveValue.h: Ditto.
  • css/CSSRevertValue.h: Ditto.
  • css/CSSUnsetValue.h: Ditto.
12:44 PM Changeset in webkit [235985] by dino@apple.com
  • 3 edits in trunk/LayoutTests

https://bugs.webkit.org/show_bug.cgi?id=189594

Mark this test as failing on WK1.

  • platform/ios-wk1/TestExpectations:
  • platform/mac-wk1/TestExpectations:
12:18 PM Changeset in webkit [235984] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Add null check for drawing area in WebPage::didCompletePageTransition() after r235867
https://bugs.webkit.org/show_bug.cgi?id=189587

Reviewed by Geoffrey Garen.

Add null check for drawing area in WebPage::didCompletePageTransition() after r235867
as this is causing crashes on the bots.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didCompletePageTransition):

12:11 PM Changeset in webkit [235983] by dino@apple.com
  • 3 edits in trunk/LayoutTests

Header parsing for experimental and internal debug features
https://bugs.webkit.org/show_bug.cgi?id=189486
<rdar://problem/44320618>

Add feature headers to more tests.

  • fast/animation/css-animation-resuming-when-visible-with-style-change2.html:
  • legacy-animation-engine/animations/duplicate-keys-expected.html:
12:08 PM Changeset in webkit [235982] by Ms2ger@igalia.com
  • 2 edits in trunk/Source/WebCore

[GLib] Fix format string in KeyedEncoderGlib::beginObject().
https://bugs.webkit.org/show_bug.cgi?id=189585

Reviewed by Michael Catanzaro.

This appears to fix the following assertion locally:

GLib-CRITICAL : g_variant_builder_add_value: assertion '!GVSB(builder)->expected_type
g_variant_is_of_type (value, GVSB(builder)->expected_type)' failed

Covered by existing tests.

  • platform/glib/KeyedEncoderGlib.cpp:

(WebCore::KeyedEncoderGlib::beginObject):

11:07 AM Changeset in webkit [235981] by dbates@webkit.org
  • 1 edit
    2 copies
    1 move
    9 adds
    1 delete in trunk/Tools

Add Copy WebKit Permalink plugin for Sublime Text
https://bugs.webkit.org/show_bug.cgi?id=189589

Rubber-stamped by Joseph Pecoraro.

Port the Copy WebKit Permalink Automator service to a Sublime Text plugin. Once installed you can
use the plugin to copy to the Clipboard a trac.webkit.org hyperlink to the selected line in the
active document with or without blame annotations.

Once installed, you can Control-click (on Mac) or right-click (on Windows and Linux) on a line and
choose Copy WebKit Permalink or Copy WebKit Permalink to Blame from the context menu to copy to the
Clipboard a permanent hyperlink to the selected line without or with blame annotations, respectively.
On Mac you can also invoke the same functionality using the keyboard shortcuts Command + Shift + Control + C
and Command + Shift + Control + Option + C, respectively.

  • CopyPermalink/Sublime Text/CopyWebKitPermalink/Context.sublime-menu: Added.
  • CopyPermalink/Sublime Text/CopyWebKitPermalink/CopyWebKitPermalink.py: Added.
  • CopyPermalink/Sublime Text/CopyWebKitPermalink/Default (OSX).sublime-keymap: Added.
  • CopyPermalink/Sublime Text/INSTALL: Added.
  • CopyPermalink/Xcode/Copy WebKit Permalink.workflow/Contents/Info.plist: Renamed from Tools/CopyPermalink/Copy WebKit Permalink.workflow/Contents/Info.plist.
  • CopyPermalink/Xcode/Copy WebKit Permalink.workflow/Contents/document.wflow: Renamed from Tools/CopyPermalink/Copy WebKit Permalink.workflow/Contents/document.wflow.
  • CopyPermalink/Xcode/INSTALL: Renamed from Tools/CopyPermalink/README.
11:07 AM Changeset in webkit [235980] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Rebaseline imported/w3c/web-platform-tests/web-share/idlharness.https.html after r235925.

Unreviewed test gardening.

  • platform/mac-wk2/imported/w3c/web-platform-tests/web-share/idlharness.https-expected.txt:
10:20 AM Changeset in webkit [235979] by Ryan Haddad
  • 35 edits in trunk/Source

Unreviewed, rolling out r235953.

Caused layout test crashes under GuardMalloc.

Reverted changeset:

"Make GraphicsLayers ref-counted, so their tree can persist
when disconnected from RenderLayerBackings"
https://bugs.webkit.org/show_bug.cgi?id=189521
https://trac.webkit.org/changeset/235953

10:17 AM Changeset in webkit [235978] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

Remove a MSVC workaround in XPath::Step::NodeTest
https://bugs.webkit.org/show_bug.cgi?id=189578

Reviewed by Alex Christensen.

XPath::Step::NodeTest has a special code for MSVC bug workaround.
It has been introduced in 5 years ago in Bug 121082 Comment 19.

I think it is safe just to remove the workaround.

No new tests (No behavior change).

  • xml/XPathStep.h: Removed the MSVC workaround.
10:16 AM Changeset in webkit [235977] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

Remove a MSVC workaround in InspectorStyle::styleWithProperties
https://bugs.webkit.org/show_bug.cgi?id=189577

Reviewed by Alex Christensen.

No new tests (No behavior change).

  • inspector/InspectorStyleSheet.cpp:

(WebCore::InspectorStyle::styleWithProperties const): Use 'auto' for the type of 'status'.

10:02 AM Changeset in webkit [235976] by commit-queue@webkit.org
  • 7 edits in trunk/Source

Use a Variant instead of a union in CSSSelector
https://bugs.webkit.org/show_bug.cgi?id=188559

Patch by Alex Christensen <achristensen@webkit.org> on 2018-09-13
Reviewed by Antti Koivisto.

Source/WebCore:

No change in behavior. This just makes some of the existing problems more obvious and easy to fix.

I moved m_caseInsensitiveAttributeValueMatching to RareData because it's only used with RareData.
I only have m_isForPage when assertions are enabled because it's only used for an assertion.
The rest is pretty straightforward translating union syntax to Variant syntax.
I use RefPtr for now where I could use Ref because it's never null to make copying easier, but that's temporary.

  • css/CSSSelector.cpp:

(WebCore::CSSSelector::CSSSelector):
(WebCore::CSSSelector::createRareData):
(WebCore::CSSSelector::setAttribute):
(WebCore::CSSSelector::setArgument):
(WebCore::CSSSelector::setLangArgumentList):
(WebCore::CSSSelector::setSelectorList):
(WebCore::CSSSelector::setNth):
(WebCore::CSSSelector::matchNth const):
(WebCore::CSSSelector::nthA const):
(WebCore::CSSSelector::nthB const):
(WebCore::CSSSelector::RareData::RareData):

  • css/CSSSelector.h:

(WebCore::CSSSelector::argument const):
(WebCore::CSSSelector::langArgumentList const):
(WebCore::CSSSelector::selectorList const):
(WebCore::CSSSelector::attribute const):
(WebCore::CSSSelector::attributeCanonicalLocalName const):
(WebCore::CSSSelector::setValue):
(WebCore::CSSSelector::CSSSelector):
(WebCore::CSSSelector::~CSSSelector):
(WebCore::CSSSelector::tagQName const):
(WebCore::CSSSelector::tagLowercaseLocalName const):
(WebCore::CSSSelector::value const):
(WebCore::CSSSelector::serializingValue const):
(WebCore::CSSSelector::attributeValueMatchingIsCaseInsensitive const):
(WebCore::CSSSelector::RareData::create): Deleted.

  • css/parser/CSSParserImpl.cpp:

(WebCore::CSSParserImpl::parsePageSelector):

  • css/parser/CSSParserSelector.h:

Source/WTF:

  • wtf/Variant.h:

Add packing macros to make it so Variant-containing structures don't always have 7 bytes of padding per Variant.

9:43 AM Changeset in webkit [235975] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

[Win][Clang] error: type 'float' cannot be narrowed to 'LONG' (aka 'long') in initializer list in WheelEventWin.cpp
https://bugs.webkit.org/show_bug.cgi?id=189575

Reviewed by Alex Christensen.

No new tests (No behavior change).

  • platform/win/WheelEventWin.cpp:

(WebCore::PlatformWheelEvent::PlatformWheelEvent): Use flooredIntPoint to convert FloatPoint to POINT.

8:40 AM Changeset in webkit [235974] by Ms2ger@igalia.com
  • 2 edits
    1 delete in trunk/LayoutTests

[GTK] Enable media-source/interfaces.html.
https://bugs.webkit.org/show_bug.cgi?id=183613

Unreviewed test gardening.

The platform-neutral expectation applies to the GTK port as well.

  • platform/gtk/TestExpectations: Remove expectation.
  • platform/gtk/imported/w3c/web-platform-tests/media-source/interfaces-expected.txt: Removed.
8:31 AM Changeset in webkit [235973] by youenn@apple.com
  • 22 edits
    6 copies in trunk

Introduce RTCRtpSendParameters
https://bugs.webkit.org/show_bug.cgi?id=189563

Reviewed by Eric Carlson.

Source/WebCore:

Introduce RTCRtpSendParameters to match the WebRTC specification.
Split RTCRtpPrameters fields accordingly and update call sites.

Covered by updated test.

  • CMakeLists.txt:
  • DerivedSources.make:
  • Modules/mediastream/PeerConnectionBackend.h:
  • Modules/mediastream/RTCRtpCodingParameters.h: Added
  • Modules/mediastream/RTCRtpCodingParameters.idl: Added
  • Modules/mediastream/RTCRtpDecodingParameters.h: Added
  • Modules/mediastream/RTCRtpDecodingParameters.idl: Added
  • Modules/mediastream/RTCRtpEncodingParameters.h:
  • Modules/mediastream/RTCRtpEncodingParameters.idl:
  • Modules/mediastream/RTCRtpParameters.h:
  • Modules/mediastream/RTCRtpParameters.idl:
  • Modules/mediastream/RTCRtpReceiver.cpp:
  • Modules/mediastream/RTCRtpSendParameters.h: Added.

(WebCore::RTCRtpSendParameters::RTCRtpSendParameters):

  • Modules/mediastream/RTCRtpSendParameters.idl: Added.
  • Modules/mediastream/RTCRtpSender.cpp:

(WebCore::RTCRtpSender::getParameters):
(WebCore::RTCRtpSender::setParameters):

  • Modules/mediastream/RTCRtpSender.h:
  • Modules/mediastream/RTCRtpSender.idl:
  • Modules/mediastream/RTCRtpSenderBackend.h:
  • Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:

(WebCore::LibWebRTCRtpSenderBackend::getParameters const):
(WebCore::LibWebRTCRtpSenderBackend::setParameters):

  • Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h:
  • Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:

(WebCore::toRTCRtpParameters):
(WebCore::toRTCRtpSendParameters):
(WebCore::fromRTCRtpSendParameters):

  • Modules/mediastream/libwebrtc/LibWebRTCUtils.h:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:

LayoutTests:

  • webrtc/video-getParameters-expected.txt:
  • webrtc/video-getParameters.html:
6:39 AM Changeset in webkit [235972] by ddkilzer@apple.com
  • 7 edits
    4 moves in trunk/Source/JavaScriptCore

Move JavaScriptCore files to match Xcode project hierarchy
<https://webkit.org/b/189574>

Reviewed by Filip Pizlo.

  • API/JSAPIValueWrapper.cpp: Rename from Source/JavaScriptCore/runtime/JSAPIValueWrapper.cpp.
  • API/JSAPIValueWrapper.h: Rename from Source/JavaScriptCore/runtime/JSAPIValueWrapper.h.
  • CMakeLists.txt: Update for new path to

generateYarrUnicodePropertyTables.py, hasher.py and
JSAPIValueWrapper.h.

  • DerivedSources.make: Ditto. Add missing dependency on

hasher.py captured by CMakeLists.txt.

reference paths. Add hasher.py library to project.

  • Sources.txt: Update for new path to

JSAPIValueWrapper.cpp.

  • runtime/JSImmutableButterfly.h: Add missing includes

after changes to Sources.txt and regenerating unified
sources.

  • runtime/RuntimeType.h: Ditto.
  • yarr/generateYarrUnicodePropertyTables.py: Rename from Source/JavaScriptCore/Scripts/generateYarrUnicodePropertyTables.py.
  • yarr/hasher.py: Rename from Source/JavaScriptCore/Scripts/hasher.py.
2:14 AM Changeset in webkit [235971] by calvaris@igalia.com
  • 3 edits in trunk/Source/WebCore

[GStreamer][EME] decrypt-key-needed message renamed to drm-cdm-instance-needed
https://bugs.webkit.org/show_bug.cgi?id=189547

Reviewed by Philippe Normand.

decrypt-key-needed message renamed to drm-cdm-instance-needed.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::handleMessage): Apart from
renaming the message, removed the class prefix for
dispatchCDMInstance.

  • platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:

(webkitMediaCommonEncryptionDecryptTransformInPlace):

1:33 AM Changeset in webkit [235970] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

Unreviewed. Fix WebDriver tests after r235225.

Use wpt serve command to run the http server.

  • Scripts/webkitpy/webdriver_tests/webdriver_w3c_web_server.py:

(WebDriverW3CWebServer.init):
(WebDriverW3CWebServer.start):
(WebDriverW3CWebServer.stop):

1:24 AM Changeset in webkit [235969] by Carlos Garcia Campos
  • 14 edits in trunk

[GTK][WPE] Allow to run script dialogs asynchronously in the UI process
https://bugs.webkit.org/show_bug.cgi?id=189544

Reviewed by Michael Catanzaro.

Source/WebKit:

Script dialogs are sync in the WebProcess, but we don't need to block the UI process while they are running. Our
current API doesn't allow it, because it always expects the dialog to be closed in the signal handler. API
changes are backwards compatible.

  • UIProcess/API/glib/WebKitScriptDialog.cpp:

(webkitScriptDialogCreate): Added to heap allocate a WebKitScriptDialog.
(webkitScriptDialogIsRunning): Common implementation here, a script dialog is considered to be running if it has
a competion handler pending.
(webkit_script_dialog_ref): WebKitScriptDialog is now refcounted.
(webkit_script_dialog_unref): Ditto.
(webkit_script_dialog_close): New method to notify that we are done with the dialog.

  • UIProcess/API/glib/WebKitScriptDialogPrivate.h:

(_WebKitScriptDialog::_WebKitScriptDialog): Use a single constructor and keep the completion handler.

  • UIProcess/API/glib/WebKitUIClient.cpp: Do not call the completion handler, pass it to the web view.
  • UIProcess/API/glib/WebKitWebView.cpp:

(webkitWebViewDispose): Close the current script dialog if there's any.
(webkit_web_view_class_init): Document how to handle dialogs asynchronously.
(webkitWebViewRunJavaScriptAlert): Do not stack allocate the WebKitScriptDialog, create it with
webkitScriptDialogCreate() passing the completion handler.
(webkitWebViewRunJavaScriptConfirm): Ditto.
(webkitWebViewRunJavaScriptPrompt): Ditto.
(webkitWebViewRunJavaScriptBeforeUnloadConfirm): Ditto.

  • UIProcess/API/glib/WebKitWebViewPrivate.h:
  • UIProcess/API/gtk/WebKitScriptDialog.h:
  • UIProcess/API/gtk/WebKitScriptDialogGtk.cpp:

(scriptDialogResponseCallback): Hnadle the response callback.
(webkitScriptDialogRun): Do not use gtk_dialog_run(), connect to response signal and show the dialogs instead.

  • UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
  • UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
  • UIProcess/API/wpe/WebKitScriptDialogWPE.cpp:

Tools:

Add test cases for the new API.

  • TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp:

(testWebViewJavaScriptDialogs):

12:20 AM Changeset in webkit [235968] by Kocsen Chung
  • 7 edits in trunk/Source

Versioning.

Note: See TracTimeline for information about the timeline view.