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

Timeline



Aug 4, 2018:

3:57 PM Changeset in webkit [234581] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

Make WebCore::Timer more space-efficient
https://bugs.webkit.org/show_bug.cgi?id=187455

Reviewed by Brent Fulgham.

Steal a bit from m_heapIndex for m_wasDeleted to eliminate padding in Timer.
This reduces the size of Document, which has 8 Timers, from 3360 to 3296 bytes (saving 64 bytes).

  • platform/Timer.cpp:

(WebCore::TimerBase::TimerBase):

  • platform/Timer.h:
1:07 PM Changeset in webkit [234580] by ddkilzer@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

REGRESSION (r208953): TemplateObjectDescriptor constructor calculates m_hash on use-after-move variable
<https://webkit.org/b/188331>

Reviewed by Yusuke Suzuki.

  • runtime/TemplateObjectDescriptor.h:

(JSC::TemplateObjectDescriptor::TemplateObjectDescriptor):
Use m_rawstrings instead of rawStrings to calculate hash.

10:38 AM Changeset in webkit [234579] by Simon Fraser
  • 1 edit in trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

Sort the WebCore project file

2:02 AM Changeset in webkit [234578] by rniwa@webkit.org
  • 6 edits
    2 adds in trunk

Properties set on window.customElements can disappear due to GC
https://bugs.webkit.org/show_bug.cgi?id=172575
<rdar://problem/32440668>

Reviewed by Saam Barati.

Source/WebCore:

Fixed the bug that JS wrapper of CustomElementsRegistry can erroneously get collected during GC
by keeping it alive as long as the global object is alive.

Test: fast/custom-elements/custom-element-registry-wrapper-should-stay-alive.html

  • dom/CustomElementRegistry.cpp:

(WebCore::CustomElementRegistry::create):
(WebCore::CustomElementRegistry::CustomElementRegistry):

  • dom/CustomElementRegistry.h:

(WebCore::CustomElementRegistry): Make this inherited from ContextDestructionObserver.

  • dom/CustomElementRegistry.idl: Set GenerateIsReachable=ImplScriptExecutionContext in IDL. This will

make CustomElementRegistry reachable from the global object.

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::ensureCustomElementRegistry):

LayoutTests:

Added a regression test.

  • fast/custom-elements/custom-element-registry-wrapper-should-stay-alive-expected.txt: Added.
  • fast/custom-elements/custom-element-registry-wrapper-should-stay-alive.html: Added.

Aug 3, 2018:

11:35 PM Changeset in webkit [234577] by rniwa@webkit.org
  • 7 edits in trunk

innerHTML should not synchronously create a custom element
https://bugs.webkit.org/show_bug.cgi?id=188327
<rdar://problem/42923114>

Reviewed by Daniel Bates.

LayoutTests/imported/w3c:

Rebaselined the test now that all test cases are passing.

  • web-platform-tests/custom-elements/connected-callbacks-html-fragment-parsing-expected.txt:

Source/WebCore:

Fixed the bug that the fragment parsing algorithm was synchronously constructing a custom element instead of
enqueuing an element to upgrade.

The fragment parsing algorithm creates an element for a token with *will execute script* flag set to false:
https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token
which results in creating an element with synchronous custom elements flag *not* set:
https://dom.spec.whatwg.org/#concept-create-element

When synchronous custom elements flag is false, we're supposed to create an element and enqueue a custom element
upgrade reaction. createHTMLElementOrFindCustomElementInterface was missing this last logic.

Also fixed a bug that Element::enqueueToUpgrade would hit a debug assertion when a custom element which has been
enqueued to upgrade is enqueued to upgrade for the second time. In this case, we need to put the element into the
current element queue (https://html.spec.whatwg.org/multipage/custom-elements.html#current-element-queue) again.

While the specification simply enqueues another upgrade reaction and bails out immediately in the first step of
the upgrade, WebKit's implementation simply avoids this redundancy in the first place:
https://html.spec.whatwg.org/multipage/custom-elements.html#concept-upgrade-an-element

Existing tests such as imported/w3c/web-platform-tests/custom-elements/reactions/Document.html exercises this
code path after the fragment parsing algorithm fix.

Tests: imported/w3c/web-platform-tests/custom-elements/connected-callbacks-html-fragment-parsing.html

  • dom/CustomElementReactionQueue.cpp:

(WebCore::CustomElementReactionQueueItem::type const): Added for an assertion.
(WebCore::CustomElementReactionQueue::enqueueElementUpgrade): Enqueue this element to the current element queue
by calling ensureCurrentQueue and avoid inserting a redundant upgrade reaction.

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

(WebCore::Element::enqueueToUpgrade): Handle the case when a custom element is enqueued to upgrade for the second
time while it had been waiting in some element queue. In this case, the reaction queue for this element has
already been created and we simply need to put this element back into the current element queue (i.e. this element
now belongs to both element queues).

  • html/parser/HTMLConstructionSite.cpp:

(WebCore::findCustomElementInterface): Extracted out of createHTMLElementOrFindCustomElementInterface.
(WebCore::HTMLConstructionSite::createHTMLElementOrFindCustomElementInterface): Fixed the bug that the HTML parser
was synchronously constructing a custom element even for the fragment parsing algorithm.

11:27 PM Changeset in webkit [234576] by sbarati@apple.com
  • 3 edits
    1 add in trunk/Source/JavaScriptCore

Give the jsc shell the JIT entitlement
https://bugs.webkit.org/show_bug.cgi?id=188324
<rdar://problem/42885806>

Reviewed by Dan Bernstein.

This should help us in ensuring the system jsc is able to JIT.

  • Configurations/JSC.xcconfig:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • allow-jit-macOS.entitlements: Added.
7:04 PM Changeset in webkit [234575] by bshafiei@apple.com
  • 1 copy in tags/Safari-606.1.36

Tag Safari-606.1.36.

7:03 PM Changeset in webkit [234574] by bshafiei@apple.com
  • 1 delete in tags/Safari-606.1.36

Delete tag

7:01 PM Changeset in webkit [234573] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Tools

Cherry-pick r234547. rdar://problem/42902608

Unreviewed gardening; r234534 changed the policy for what audio session is set when a
media element is paused. Updating the test to reflect the new policy.

  • TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm: (TestWebKitAPI::TEST):

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

7:01 PM Changeset in webkit [234572] by bshafiei@apple.com
  • 13 edits
    3 adds in branches/safari-606-branch

Cherry-pick r234534. rdar://problem/42902608

Control center controls disappear when pausing, locking device.
https://bugs.webkit.org/show_bug.cgi?id=188282
<rdar://problem/42497809>

Reviewed by Eric Carlson.

Source/WebCore:

Test: platform/mac/media/audio-session-category-video-paused.html

MediaRemote will set any app whose audio session category changes from MediaPlayback to
Ambient as not eligable for being the "now playing" app. Previously, due to the ordering of
events, we never moved from MediaPlayback to Ambient when pausing <video>, even though that
was the intention. Now that that bug is fixed, it exposed this new issue with MediaRemote.

To solve the new issue, make our audio session category policy more explicit: once we are in
MediaPlayback category, we will remain so as long as the media element in queston stays
loaded, has played, and is never interrupted by the system.

Make MediaSessionManagerCocoa a proper subclass of PlatformMediaSessionManager, and make
MediaSessionManageriOS and -Mac subclasses of the -Cocoa class. Add a new
m_hasPlayedSinceLastInterruption ivar to PlatformMediaSession, set when the state() changes
to Playing, and cleared during an interruption. Check this flag when deciding what audio
sessino category to set in MediaSessionManagerCocoa.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/audio/PlatformMediaSession.cpp: (WebCore::PlatformMediaSession::setState):
  • platform/audio/PlatformMediaSession.h: (WebCore::PlatformMediaSession::hasPlayedSinceLastInterruption const): (WebCore::PlatformMediaSession::clearHasPlayedSinceLastInterruption):
  • platform/audio/PlatformMediaSessionManager.cpp: (WebCore::PlatformMediaSessionManager::updateSessionState): Deleted.
  • platform/audio/PlatformMediaSessionManager.h: (WebCore::PlatformMediaSessionManager::audioHardwareListener): (WebCore::PlatformMediaSessionManager::updateSessionState):
  • platform/audio/cocoa/MediaSessionManagerCocoa.cpp: (MediaSessionManagerCocoa::updateSessionState): (MediaSessionManagerCocoa::beginInterruption): (PlatformMediaSessionManager::updateSessionState): Deleted.
  • platform/audio/cocoa/MediaSessionManagerCocoa.h: Added.
  • platform/audio/ios/MediaSessionManagerIOS.h:
  • platform/audio/ios/MediaSessionManagerIOS.mm: (WebCore::MediaSessionManageriOS::MediaSessionManageriOS):
  • platform/audio/mac/MediaSessionManagerMac.h:
  • platform/audio/mac/MediaSessionManagerMac.mm: (WebCore::MediaSessionManagerMac::MediaSessionManagerMac):

LayoutTests:

  • platform/mac/media/audio-session-category-video-paused-expected.txt: Added.
  • platform/mac/media/audio-session-category-video-paused.html: Added.
  • platform/ios/TestExpectations:

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

6:33 PM Changeset in webkit [234571] by bshafiei@apple.com
  • 1 copy in tags/Safari-606.1.36

Tag Safari-606.1.36.

6:24 PM Changeset in webkit [234570] by bshafiei@apple.com
  • 1 delete in tags/Safari-606.1.36

Delete tag

6:09 PM Changeset in webkit [234569] by commit-queue@webkit.org
  • 23 edits
    5 adds in trunk

We should cache the compiled sandbox profile in a data vault
https://bugs.webkit.org/show_bug.cgi?id=184991

Patch by Ben Richards <benton_richards@apple.com> on 2018-08-03
Reviewed by Ryosuke Niwa.

Source/WebCore:

Added functionality to FileHandle so that it can lock a file while open.
Added a function to FileSystem to delete non empty directories.

  • platform/FileHandle.cpp:

(WebCore::FileHandle::FileHandle):
(WebCore::FileHandle::open):
(WebCore::FileHandle::close):

  • platform/FileHandle.h:
  • platform/FileSystem.h:
  • platform/cocoa/FileSystemCocoa.mm:

(WebCore::FileSystem::deleteNonEmptyDirectory):

Source/WebKit:

This patch changes a few things (note: data vaults and sandbox entitlements are only used in internal builds):
(1) Instead of compiling a sandbox every time a process is launched, processes now look for a cached sandbox

in a process specific data vault on macOS platforms. (ChildProcessMac.mm)

(2) If a valid cached sandbox is not found, a process will create the data vault (or ensure that it exists),

compile a sandbox, and cache it.

(3) In order to create process specific data vaults, each process now has their own <process name>-OSX-sandbox.entitlements

file which contains an entitlement with a process specific "storage class" which ensures that each process
can only ever access its own data vault. (See the article on confluence "Data Vaults and Restricted Files" for more info)

(4) The sandbox entitlements file for the Network, WebContent and Plugin services are loaded dynamically

through Scripts/<process name>-process-entitlements.sh which is triggered in a new build phase for each service.
The Storage process sandbox entitlements are loaded directly in Configurations/StorageService.xcconfig.
The reason that the sandbox entitlements are applied dynamically is so that these sandbox entitlements
are only applied when WK_USE_RESTRICTED_ENTITLEMENTS is YES. This means that open source builds will still work.

  • Configurations/Network-OSX-sandbox.entitlements: Added.
  • Configurations/Plugin-OSX-sandbox.entitlements: Added.
  • Configurations/Storage-OSX-sandbox.entitlements: Added.
  • Configurations/StorageService.xcconfig:
  • Configurations/WebContent-OSX-sandbox.entitlements: Added.
  • Configurations/WebKit.xcconfig:
  • NetworkProcess/NetworkProcess.h:
  • PluginProcess/PluginProcess.h:
  • Scripts/process-network-entitlements.sh: Added.
  • Scripts/process-plugin-entitlements.sh: Added.
  • Scripts/process-webcontent-entitlements.sh:
  • Shared/ChildProcess.h:
  • Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:

(WebKit::XPCServiceInitializer):

  • Shared/SandboxInitializationParameters.h:

(WebKit::SandboxInitializationParameters::setOverrideSandboxProfilePath):
(WebKit::SandboxInitializationParameters::overrideSandboxProfilePath const):
(WebKit::SandboxInitializationParameters::setSandboxProfile):
(WebKit::SandboxInitializationParameters::sandboxProfile const):
(): Deleted.

  • Shared/mac/ChildProcessMac.mm:

(WebKit::SandboxProfileDeleter::operator()):
(WebKit::SandboxParametersDeleter::operator()):
(WebKit::SandboxInfo::SandboxInfo):
(WebKit::fileContents):
(WebKit::processStorageClass):
(WebKit::setAndSerializeSandboxParameters):
(WebKit::getUserCacheDirectory):
(WebKit::sandboxDataVaultParentDirectory):
(WebKit::sandboxDirectory):
(WebKit::sandboxFilePath):
(WebKit::ensureSandboxCacheDirectory):
(WebKit::writeSandboxDataToCacheFile):
(WebKit::compileAndCacheSandboxProfile):
(WebKit::tryApplyCachedSandbox):
(WebKit::webKit2Bundle):
(WebKit::sandboxProfilePath):
(WebKit::compileAndApplySandboxSlowCase):
(WebKit::applySandbox):
(WebKit::initializeSandboxParameters):
(WebKit::ChildProcess::initializeSandbox):

  • Shared/mac/SandboxInitialiationParametersMac.mm:

(WebKit::SandboxInitializationParameters::SandboxInitializationParameters):

  • StorageProcess/StorageProcess.h:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebProcess.h:

Source/WTF:

Added trace points for sandbox initialization and exposed functions needed for sandbox caching

  • wtf/SystemTracing.h:
  • wtf/spi/darwin/SandboxSPI.h:

Tools:

Added trace points for sandbox initialization

  • Tracing/SystemTracePoints.plist:
6:06 PM Changeset in webkit [234568] by bshafiei@apple.com
  • 13 edits
    3 deletes in branches/safari-606-branch

Revert r234534. rdar://problem/42902608

6:06 PM Changeset in webkit [234567] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Tools

Revert r234547. rdar://problem/42902608

5:11 PM Changeset in webkit [234566] by commit-queue@webkit.org
  • 24 edits in trunk

WebGL 2 conformance: vertex_arrays/vertex_array_object.html
https://bugs.webkit.org/show_bug.cgi?id=188291
<rdar://problem/42792709>

Source/WebCore:

Patch by Justin Fan <Justin Fan> on 2018-08-03
Reviewed by Dean Jackson.

Get https://www.khronos.org/registry/webgl/conformance-suites/2.0.0/conformance2/vertex_arrays/vertex-array-object.html
working on Mac OS and iOS, and check in the new test expectations.

Existing test: webgl/2.0.0/conformance2/vertex_arrays/vertex-array-object.html

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::initializeVertexArrayObjects):
(WebCore::WebGL2RenderingContext::deleteVertexArray):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::deleteObject):

  • html/canvas/WebGLVertexArrayObject.cpp:

(WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject):

  • platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:

(WebCore::GraphicsContext3D::checkVaryingsPacking const):
(WebCore::GraphicsContext3D::createVertexArray):
(WebCore::GraphicsContext3D::deleteVertexArray):
(WebCore::GraphicsContext3D::isVertexArray):
(WebCore::GraphicsContext3D::bindVertexArray):

LayoutTests:

Get https://www.khronos.org/registry/webgl/conformance-suites/2.0.0/conformance2/vertex_arrays/vertex-array-object.html
working on Mac OS and iOS, and check in the new test expectations.

Patch by Justin Fan <Justin Fan> on 2018-08-03
Reviewed by Dean Jackson.

The following FAILed before this patch but are now expecting PASSes.

  • 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/const-array-init-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/frag-depth-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/loops-with-side-effects-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/no-attribute-vertex-shader-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/short-circuiting-in-loop-condition-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/tricky-loop-conditions-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:
4:59 PM Changeset in webkit [234565] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Skip imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.html.
https://bugs.webkit.org/show_bug.cgi?id=187269

Unreviewed test gardening.

4:25 PM Changeset in webkit [234564] by commit-queue@webkit.org
  • 62 edits
    2 deletes in trunk/Source/WebCore

Remove WebGPUObject
https://bugs.webkit.org/show_bug.cgi?id=188114

Patch by Sam Weinig <sam@webkit.org> on 2018-08-03
Reviewed by Darin Adler.

This removes the unecessary WebGPUObject base class and updates the classes
that were inheriting from it to instead inherit directly from RefCounted. This
shrinks the size of all the classes that were inheriting from it, as they no
longer store a RefPtr<WebGPURenderingContext> member, which is unused. Most
of the classes also shrink because they can be devirtualized.

This also updates most of the create functions and constructors for the classes
that were inheriting from WebGPUObject to no longer require the WebGPURenderingContext
to be passed in.

  • For WebGPUBuffer, WebGPUCommandQueue, WebGPUComputeCommandEncoder, WebGPUComputePipelineState,

WebGPUDepthStencilState, WebGPUDrawable, WebGPUFunction, WebGPULibrary, WebGPURenderCommandEncoder,
WebGPURenderPassDepthAttachmentDescriptor, WebGPURenderPipelineColorAttachmentDescriptor,
WebGPURenderPipelineState, and WebGPUTexture the WebGPURenderingContext and any other additional
parameters needed for initialization were replaced with the underlying type (e.g. WebGPUBuffer
now gets passed a GPUBuffer).

  • WebGPUCommandBuffer is passed a GPUCommandQueue, since it needs to construct the underlying

GPUCommandBuffer itself so it can pass in the completion handler.

  • For WebGPUDepthStencilDescriptor, WebGPURenderPassAttachmentDescriptor,

WebGPURenderPassColorAttachmentDescriptor, WebGPURenderPassDescriptor and WebGPURenderPipelineDescriptor
the create and constructor functions are empty.

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

Remove WebGPUObject.h/cpp

  • html/canvas/WebGPUBuffer.cpp:

(WebCore::WebGPUBuffer::WebGPUBuffer):

  • html/canvas/WebGPUBuffer.h:
  • html/canvas/WebGPUBuffer.idl:

Switch from inheriting from WebGPUObject to directly inheriting from
RefCounted<WebGPUBuffer>. Since this de-virtualizes it, also add
ImplementationLacksVTable to the IDL file. Also update create
and constructor to take a GPUBuffer directly, rather than the context.

  • html/canvas/WebGPUCommandBuffer.cpp:

(WebCore::WebGPUCommandBuffer::create):
(WebCore::WebGPUCommandBuffer::WebGPUCommandBuffer):
Update create and constructor to no longer require a context, as it would
now be unused, as it no longer inherits from WebGPUObject nor needs to hold
onto the context for any reason.

(WebCore::WebGPUCommandBuffer::createRenderCommandEncoderWithDescriptor):
Update to call the new WebGPURenderCommandEncoder::create, which no longer
requires a context.

(WebCore::WebGPUCommandBuffer::createComputeCommandEncoder):
Update to call the new WebGPUComputeCommandEncoder::create, which no longer
requires a context.

  • html/canvas/WebGPUCommandBuffer.h:
  • html/canvas/WebGPUCommandBuffer.idl:

Switch from inheriting from GPUObject to directly inheriting from
RefCounted<WebGPUCommandBuffer>. Since this de-virtualizes it, also add
ImplementationLacksVTable to the IDL file. Also update create and constructor
to no longer take a context, and just take a GPUCommandQueue. We can't directly
pass a GPUCommandBuffer as WebGPUCommandBuffer needs to pass in a completion handler
on construction of the underlying GPUCommandBuffer.

  • html/canvas/WebGPUCommandQueue.cpp:

(WebCore::WebGPUCommandQueue::WebGPUCommandQueue):
(WebCore::WebGPUCommandQueue::createCommandBuffer):
Update to call the new WebGPUCommandBuffer::create, which no longer
requires a context.

  • html/canvas/WebGPUCommandQueue.h:
  • html/canvas/WebGPUCommandQueue.idl:

Switch from inheriting from GPUObject to directly inheriting from
RefCounted<WebGPUCommandQueue>. Since this de-virtualizes it, also add
ImplementationLacksVTable to the IDL file. Also update create and
constructor to take a GPUCommandQueue directly.

  • html/canvas/WebGPUComputeCommandEncoder.cpp:

(WebCore::WebGPUComputeCommandEncoder::create):
(WebCore::WebGPUComputeCommandEncoder::WebGPUComputeCommandEncoder):

  • html/canvas/WebGPUComputeCommandEncoder.h:
  • html/canvas/WebGPUComputeCommandEncoder.idl:

Switch from inheriting from GPUObject to directly inheriting from
RefCounted<WebGPUComputeCommandEncoder>. Since this de-virtualizes it,
also add ImplementationLacksVTable to the IDL file. Also update create and
constructor to take a GPUComputeCommandEncoder directly

  • html/canvas/WebGPUComputePipelineState.cpp:

(WebCore::WebGPUComputePipelineState::WebGPUComputePipelineState):

  • html/canvas/WebGPUComputePipelineState.h:
  • html/canvas/WebGPUComputePipelineState.idl:

Switch from inheriting from WebGPUObject to directly inheriting from
RefCounted<WebGPUComputePipelineState>. Since this de-virtualizes it, also add
ImplementationLacksVTable to the IDL file. Also update create and
constructor to take a GPUComputePipelineState directly.

  • html/canvas/WebGPUDepthStencilDescriptor.cpp:

Remove unneeded include of include "WebGPURenderingContext.h".

  • html/canvas/WebGPUDepthStencilDescriptor.h:
  • html/canvas/WebGPUDepthStencilDescriptor.idl:

Switch from inheriting from WebGPUObject to directly inheriting from
RefCounted<WebGPUDepthStencilDescriptor>. Since this de-virtualizes it, also add
ImplementationLacksVTable to the IDL file.

  • html/canvas/WebGPUDepthStencilState.cpp:

(WebCore::WebGPUDepthStencilState::WebGPUDepthStencilState):

  • html/canvas/WebGPUDepthStencilState.h:
  • html/canvas/WebGPUDepthStencilState.idl:

Switch from inheriting from WebGPUObject to directly inheriting from
RefCounted<WebGPUDepthStencilState>. Since this de-virtualizes it, also add
ImplementationLacksVTable to the IDL file. Also update create and
constructor to take a GPUDepthStencilState directly.

  • html/canvas/WebGPUDrawable.cpp:

(WebCore::WebGPUDrawable::WebGPUDrawable):

  • html/canvas/WebGPUDrawable.h:
  • html/canvas/WebGPUDrawable.idl:

Switch from inheriting from WebGPUObject to directly inheriting from
RefCounted<WebGPUDrawable>. Since this de-virtualizes it, also add
ImplementationLacksVTable to the IDL file. Also update create and
constructor to take a GPUDrawable directly.

  • html/canvas/WebGPUFunction.cpp:

(WebCore::WebGPUFunction::create):
(WebCore::WebGPUFunction::WebGPUFunction):

  • html/canvas/WebGPUFunction.h:
  • html/canvas/WebGPUFunction.idl:

Switch from inheriting from GPUObject to directly inheriting from
RefCounted<WebGPUFunction>. Since this de-virtualizes it, also add
ImplementationLacksVTable to the IDL file. Also update create and
constructor to take a GPUFunction directly.

  • html/canvas/WebGPULibrary.cpp:

(WebCore::WebGPULibrary::WebGPULibrary):
(WebCore::WebGPULibrary::functionWithName const):
Update for new WebGPUFunction::create, which no longer requires a
context.

  • html/canvas/WebGPULibrary.h:
  • html/canvas/WebGPULibrary.idl:

Switch from inheriting from WebGPUObject to directly inheriting from
RefCounted<WebGPULibrary>. Since this de-virtualizes it, also add
ImplementationLacksVTable to the IDL file. Also update create and
constructor to take a GPULibrary directly, rather than the context.
Unlike the other create functions that take their underlying type, this
one also continues to need the sourceCode String to be passed, as that
is not available from the underlying GPULibrary and must be stored
seperately.

  • html/canvas/WebGPUObject.cpp: Removed.
  • html/canvas/WebGPUObject.h: Removed.

Deleted.

  • html/canvas/WebGPURenderCommandEncoder.cpp:

(WebCore::WebGPURenderCommandEncoder::create):
(WebCore::WebGPURenderCommandEncoder::WebGPURenderCommandEncoder):

  • html/canvas/WebGPURenderCommandEncoder.h:
  • html/canvas/WebGPURenderCommandEncoder.idl:

Switch from inheriting from GPUObject to directly inheriting from
RefCounted<WebGPURenderCommandEncoder>. Since this de-virtualizes it, also add
ImplementationLacksVTable to the IDL file. Also update create and
constructor to take a GPURenderCommandEncoder directly.

  • html/canvas/WebGPURenderPassAttachmentDescriptor.cpp:

(WebCore::WebGPURenderPassAttachmentDescriptor::WebGPURenderPassAttachmentDescriptor):

  • html/canvas/WebGPURenderPassAttachmentDescriptor.h:

Switch from inheriting from GPUObject to directly inheriting from
RefCounted<WebGPURenderPassAttachmentDescriptor>. Also update create and
constructor to no longer take a context, as it is now not used. This remains virtual
as it is inherited from by WebGPURenderPassColorAttachmentDescriptor and WebGPURenderPassDepthAttachmentDescriptor.

  • html/canvas/WebGPURenderPassColorAttachmentDescriptor.cpp:

(WebCore::WebGPURenderPassColorAttachmentDescriptor::create):
(WebCore::WebGPURenderPassColorAttachmentDescriptor::WebGPURenderPassColorAttachmentDescriptor):

  • html/canvas/WebGPURenderPassColorAttachmentDescriptor.h:

Update create and constructor to no longer take a context, as it is now not used. Declare final
as this is not inherited by anything.

  • html/canvas/WebGPURenderPassDepthAttachmentDescriptor.cpp:

(WebCore::WebGPURenderPassDepthAttachmentDescriptor::create):
(WebCore::WebGPURenderPassDepthAttachmentDescriptor::WebGPURenderPassDepthAttachmentDescriptor):

  • html/canvas/WebGPURenderPassDepthAttachmentDescriptor.h:

Update create and constructor to no longer take a context, as it is now not used. Declare final
as this is not inherited by anything.

  • html/canvas/WebGPURenderPassDescriptor.cpp:

(WebCore::WebGPURenderPassDescriptor::depthAttachment):
Update for new WebGPURenderPassDepthAttachmentDescriptor::create function which no longer requires
a context.

Semi-interesting note: This function was previously calling "*context()" to pass a WebGPURenderingContext&
to WebGPURenderPassDepthAttachmentDescriptor::create. However, "context()" was always returning null, as
the constructor of WebGPURenderPassDescriptor was not initializing the WebGPUObject with a WebGPURenderingContext.
Now, one might think that this would cause a null-deref, but, because it was being assigned into a
WebGPURenderingContext&, no dereference happens right away (it essentially just passes a pointer) and since
the function it is being passed to does not use it, it never actually gets dereferenced.

(WebCore::WebGPURenderPassDescriptor::colorAttachments):
Update for new WebGPURenderPassColorAttachmentDescriptor::create function which no longer requires
a context.

  • html/canvas/WebGPURenderPassDescriptor.h:
  • html/canvas/WebGPURenderPassDescriptor.idl:

Switch from inheriting from GPUObject to directly inheriting from
RefCounted<WebGPURenderPassDescriptor>. Since this de-virtualizes it, also add
ImplementationLacksVTable to the IDL file.

  • html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.cpp:

(WebCore::WebGPURenderPipelineColorAttachmentDescriptor::create):
(WebCore::WebGPURenderPipelineColorAttachmentDescriptor::WebGPURenderPipelineColorAttachmentDescriptor):

  • html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.h:
  • html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.idl:

Switch from inheriting from GPUObject to directly inheriting from
RefCounted<WebGPURenderPipelineColorAttachmentDescriptor>. Since this de-virtualizes it, also add
ImplementationLacksVTable to the IDL file. Also update create and constructor to
no longer take a context, as it is now not used.

  • html/canvas/WebGPURenderPipelineDescriptor.cpp:

(WebCore::WebGPURenderPipelineDescriptor::colorAttachments):
Update for new WebGPURenderPipelineColorAttachmentDescriptor::create which no longer requires
a context.

  • html/canvas/WebGPURenderPipelineDescriptor.h:
  • html/canvas/WebGPURenderPipelineDescriptor.idl:

Switch from inheriting from GPUObject to directly inheriting from
RefCounted<WebGPURenderPipelineDescriptor>. Since this de-virtualizes it, also add
ImplementationLacksVTable to the IDL file.

  • html/canvas/WebGPURenderPipelineState.cpp:

(WebCore::WebGPURenderPipelineState::WebGPURenderPipelineState):

  • html/canvas/WebGPURenderPipelineState.h:
  • html/canvas/WebGPURenderPipelineState.idl:

Switch from inheriting from GPUObject to directly inheriting from
RefCounted<WebGPURenderPipelineState>. Since this de-virtualizes it, also add
ImplementationLacksVTable to the IDL file. Also update create and
constructor to take a GPURenderPipelineState directly.

  • html/canvas/WebGPURenderingContext.cpp:

(WebCore::WebGPURenderingContext::createLibrary):
(WebCore::WebGPURenderingContext::createRenderPipelineState):
(WebCore::WebGPURenderingContext::createDepthStencilState):
(WebCore::WebGPURenderingContext::createComputePipelineState):
(WebCore::WebGPURenderingContext::createCommandQueue):
(WebCore::WebGPURenderingContext::nextDrawable):
(WebCore::WebGPURenderingContext::createBuffer):
(WebCore::WebGPURenderingContext::createTexture):
Update for new create functions which require the caller to pass
the underlying type.

  • html/canvas/WebGPUTexture.cpp:

(WebCore::WebGPUTexture::createFromDrawableTexture):
Renamed to create.

(WebCore::WebGPUTexture::create): Deleted
All callers now pass a GPUTexture directly.

  • html/canvas/WebGPUTexture.h:
  • html/canvas/WebGPUTexture.idl:

Switch from inheriting from GPUObject to directly inheriting from
RefCounted<WebGPUTexture>. Since this de-virtualizes it, also add
ImplementationLacksVTable to the IDL file.

  • html/canvas/WebGPUTextureDescriptor.h:
  • html/canvas/WebGPUTextureDescriptor.idl:

Switch from inheriting from GPUObject to directly inheriting from
RefCounted<WebGPUTextureDescriptor>. Since this de-virtualizes it, also add
ImplementationLacksVTable to the IDL file.

4:13 PM Changeset in webkit [234563] by commit-queue@webkit.org
  • 39 edits in trunk/Source

Fix spelling of "overridden"
https://bugs.webkit.org/show_bug.cgi?id=188315

Patch by Alex Christensen <achristensen@webkit.org> on 2018-08-03
Reviewed by Darin Adler.

Source/JavaScriptCore:

  • API/JSExport.h:
  • inspector/InjectedScriptSource.js:

Source/ThirdParty/ANGLE:

  • src/libANGLE/renderer/ProgramImpl.h:

Source/ThirdParty/libwebrtc:

  • Source/webrtc/p2p/client/basicportallocator.h:

Source/WebCore:

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper accessibilityLabel]):
(-[WebAccessibilityObjectWrapper accessibilityValue]):

  • contentextensions/ContentExtensionsBackend.h:
  • editing/EditingStyle.cpp:

(WebCore::EditingStyle::removeStyleFromRulesAndContext):

  • inspector/CommandLineAPIModuleSource.js:
  • platform/ScrollView.h:
  • platform/ScrollableArea.h:
  • platform/mediasession/MediaSessionInterruptionProvider.h:
  • rendering/RenderFragmentedFlow.cpp:

(WebCore::RenderFragmentedFlow::adjustedPositionRelativeToOffsetParent const):

  • rendering/RenderLayer.h:
  • rendering/RenderListBox.h:
  • rendering/svg/RenderSVGResourceClipper.cpp:

(WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):

  • svg/SVGElement.cpp:

(WebCore::SVGElement::localCoordinateSpaceTransform const):

  • svg/SVGLengthContext.cpp:

(WebCore::SVGLengthContext::SVGLengthContext):
(WebCore::SVGLengthContext::convertValueToUserUnits const):
(WebCore::SVGLengthContext::determineViewport const):

  • svg/SVGLengthContext.h:

Source/WebInspectorUI:

  • UserInterface/Views/ContentBrowserTabContentView.js:

(WI.ContentBrowserTabContentView.prototype.treeElementForRepresentedObject):

  • UserInterface/Views/GeneralTreeElement.js:

(WI.GeneralTreeElement.prototype.ondetach):

  • UserInterface/Views/NavigationBar.js:

(WI.NavigationBar.prototype.get sizesToFit):

  • UserInterface/Views/NavigationSidebarPanel.js:

(WI.NavigationSidebarPanel.prototype.shouldFilterPopulate):

  • UserInterface/Views/TextEditor.js:

(WI.TextEditor.prototype.canBeFormatted):

  • UserInterface/Views/TreeElement.js:

(WI.TreeElement.prototype.onpopulate):

Source/WebKit:

  • Platform/IPC/mac/ConnectionMac.mm:

(IPC::Connection::receiveSourceEventHandler):

  • Shared/WebPreferencesStore.cpp:

(WebKit::WebPreferencesStore::encode const):
(WebKit::WebPreferencesStore::decode):
(WebKit::valueForKey):
(WebKit::setValueForKey):
(WebKit::WebPreferencesStore::setStringValueForKey):
(WebKit::WebPreferencesStore::getStringValueForKey const):
(WebKit::WebPreferencesStore::setBoolValueForKey):
(WebKit::WebPreferencesStore::getBoolValueForKey const):
(WebKit::WebPreferencesStore::setUInt32ValueForKey):
(WebKit::WebPreferencesStore::getUInt32ValueForKey const):
(WebKit::WebPreferencesStore::setDoubleValueForKey):
(WebKit::WebPreferencesStore::getDoubleValueForKey const):
(WebKit::WebPreferencesStore::setOverrideDefaultsStringValueForKey):
(WebKit::WebPreferencesStore::setOverrideDefaultsBoolValueForKey):
(WebKit::WebPreferencesStore::setOverrideDefaultsUInt32ValueForKey):
(WebKit::WebPreferencesStore::setOverrideDefaultsDoubleValueForKey):

  • Shared/WebPreferencesStore.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView dragInteraction:previewForLiftingItem:session:]):
(-[WKContentView dragInteraction:previewForCancellingItem:withDefault:]):

  • UIProcess/ios/WKScrollView.mm:

(-[WKScrollView _systemContentInset]):

Source/WebKitLegacy/mac:

  • Misc/WebKitVersionChecks.mm:

(setWebKitLinkTimeVersion):
(WebKitLinkTimeVersion):

  • Plugins/WebBaseNetscapePluginView.mm:

(-[WebBaseNetscapePluginView handleMouseMoved:]):

  • WebCoreSupport/PopupMenuMac.mm:

(PopupMenuMac::populate):

4:10 PM Changeset in webkit [234562] by Kocsen Chung
  • 1 copy in tags/Safari-606.1.36

Tag Safari-606.1.36.

4:01 PM Changeset in webkit [234561] by david_fenton@apple.com
  • 4 edits in trunk

Unreviewed, rolling out r234517.

Caused API test failures on iOS

Reverted changeset:

"[Cocoa] setCookie API fails to set session cookies for
defaultDataStore if processPool created but not used"
https://bugs.webkit.org/show_bug.cgi?id=188209
https://trac.webkit.org/changeset/234517

3:50 PM Changeset in webkit [234560] by commit-queue@webkit.org
  • 16 edits
    1 copy in trunk

Add configuration for automatic process pre-warming
https://bugs.webkit.org/show_bug.cgi?id=187108

Patch by Ben Richards <benton_richards@apple.com> on 2018-08-03
Reviewed by Ryosuke Niwa.

Source/WebKit:

Added configurations to allow setting the maximum number of processes that should be automatically prewarmed.

  • UIProcess/API/APIProcessPoolConfiguration.cpp:

(API::ProcessPoolConfiguration::copy):

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

(WKContextSetMaximumNumberOfPrewarmedProcesses):

  • UIProcess/API/C/WKContextPrivate.h:
  • UIProcess/API/Cocoa/WKProcessPool.mm:

(-[WKProcessPool _setMaximumNumberOfPrewarmedProcesses:]):

  • UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:

(-[_WKProcessPoolConfiguration setMaximumPrewarmedProcessCount:]):
(-[_WKProcessPoolConfiguration maximumPrewarmedProcessCount]):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didFinishLoadForFrame): Moved call to notifyProcessPoolToPrewarm from didFirstVisuallyNonEmptyLayoutForFrame to here.
This is to try to ensure that frame loading and prewarming don't happen at the same time as this would be heavy for some devices.
(WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::setMaximumNumberOfProcesses): Condition changed so that calling setMaximumNumberOfProcesses after warmInitialProcess
doesn't result in a crash.
(WebKit::WebProcessPool::setMaximumNumberOfPrewarmedProcesses):
(WebKit::WebProcessPool::warmInitialProcess):
(WebKit::WebProcessPool::didReachGoodTimeToPrewarm):

  • UIProcess/WebProcessPool.h:

Tools:

Added new test case for setting maximum prewarmed process count and updated test case for process swap on navigation to set the maximum prewarmed process count to be 1 where relevant.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/InitialWarmedProcessUsed.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/SetMaximumPrewarmedProcessCount.mm:

(TEST):

2:35 PM Changeset in webkit [234559] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[ews-build] Add build step to Check Patch Relevance
https://bugs.webkit.org/show_bug.cgi?id=188295

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/steps.py:

(CheckPatchRelevance): Added step to check patch relevance.
(CheckPatchRelevance._patch_is_relevant): Checks if the patch is relevant.
(CheckPatchRelevance._get_patch): Retrieves the patch from buildbot.
(CheckPatchRelevance._addToLog): Add the log message.
(CheckPatchRelevance.start):

  • BuildSlaveSupport/ews-build/factories.py: Added CheckPatchRelevance step appropriately.
2:10 PM Changeset in webkit [234558] by Basuke Suzuki
  • 3 edits in trunk/LayoutTests

[LayoutTests][websocket] Return correct value even when cookie is not set.
https://bugs.webkit.org/show_bug.cgi?id=188317

Reviewed by Darin Adler.

ws://127.0.0.1:8880/websocket/tests/hybi/echo-cookie_wsh.py

This web socket script throw exception when cookie is not set. That is ended up with
immediate disconnection and causes timeout for failure tests which makes debugging hard.

  • http/tests/websocket/tests/hybi/echo-cookie_wsh.py:

(web_socket_transfer_data):

  • platform/wincairo/TestExpectations:
12:19 PM Changeset in webkit [234557] by Basuke Suzuki
  • 2 edits in trunk/LayoutTests

[Curl] Test gardening
https://bugs.webkit.org/show_bug.cgi?id=188316

Unreviewed test gardening.

Skip some flaky tests.
Add comments why we skip for some platform dependent reason.

  • platform/wincairo/TestExpectations:
12:07 PM Changeset in webkit [234556] by Kocsen Chung
  • 2 edits in branches/safari-606-branch/Tools

Cherry-pick r234547. rdar://problem/42902608

Unreviewed gardening; r234534 changed the policy for what audio session is set when a
media element is paused. Updating the test to reflect the new policy.

  • TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm: (TestWebKitAPI::TEST):

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

11:36 AM Changeset in webkit [234555] by Ms2ger@igalia.com
  • 2 edits in trunk/Source/WebDriver

Fix invalid optional access in WebDriver Session::createTopLevelBrowsingContext.
https://bugs.webkit.org/show_bug.cgi?id=188304

Reviewed by Brian Burg.

  • Session.cpp:

(WebDriver::Session::createTopLevelBrowsingContext): remove incorrect value() call.

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

[LFC][BFC] Special case the document renderer when computing the height and margin
https://bugs.webkit.org/show_bug.cgi?id=188313

Reviewed by Antti Koivisto.

The document renderer is certainly special and its geometry is likely to be computed as part of "10.6.6 Complicated cases" (spec is unclear) but probably not by
making the it a formatting root. Let's just special case it at contentHeightForFormattingContextRoot(), since having the document renderer as a context root has unwanted side effect.

  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::contentHeightForFormattingContextRoot):

  • layout/layouttree/LayoutBox.cpp:

(WebCore::Layout::Box::establishesBlockFormattingContext const):

10:57 AM Changeset in webkit [234553] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][BFC] Layout out-of-flow descendants only on the formatting context root.
https://bugs.webkit.org/show_bug.cgi?id=188312

Reviewed by Antti Koivisto.

Collect out-of-flow descendants on the formatting root container instead of the containing block and run layout on them on the root level. It's more efficient this way.

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::layout const):

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::TreeBuilder::createSubTree):

10:56 AM Changeset in webkit [234552] by achristensen@apple.com
  • 11 edits
    2 adds in trunk/Source/WebKit

Check with SafeBrowsing during navigation in WKWebView
https://bugs.webkit.org/show_bug.cgi?id=188133

Reviewed by Chris Dumez.

This turns WebFramePolicyListenerProxy into an object that now listens for the results
of two processes happening in parallel: the API::NavigationClient's decidePolicyForNavigation{Action, Response}
(which it was already waiting for) and, on platforms that support it, the SafariSafeBrowsing framework's check.
The first result is stored as it waits for the second result unless the first result is the API::NavigationClient
saying to cancel or convert the navigation to a download, in which cases we don't care what the safe browsing
framework results are because we won't show the URL in the browser.

Nothing is done with the safe browsing results yet.

  • UIProcess/Cocoa/SafeBrowsingResultCocoa.mm: Added.

(WebKit::SafeBrowsingResult::SafeBrowsingResult):

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::beginSafeBrowsingCheck):

  • UIProcess/SafeBrowsingResult.h: Added.

(WebKit::SafeBrowsingResult::provider const):
(WebKit::SafeBrowsingResult::isPhishing const):
(WebKit::SafeBrowsingResult::isMalware const):
(WebKit::SafeBrowsingResult::isUnwantedSoftware const):
(WebKit::SafeBrowsingResult::isKnownToBeUnsafe const):

  • UIProcess/WebFramePolicyListenerProxy.cpp:

(WebKit::WebFramePolicyListenerProxy::WebFramePolicyListenerProxy):
(WebKit::WebFramePolicyListenerProxy::didReceiveSafeBrowsingResults):
(WebKit::WebFramePolicyListenerProxy::use):
(WebKit::WebFramePolicyListenerProxy::download):
(WebKit::WebFramePolicyListenerProxy::ignore):

  • UIProcess/WebFramePolicyListenerProxy.h:

(WebKit::WebFramePolicyListenerProxy::create):

  • UIProcess/WebFrameProxy.cpp:

(WebKit::WebFrameProxy::setUpPolicyListenerProxy):

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

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

  • UIProcess/WebPageProxy.h:
  • WebKit.xcodeproj/project.pbxproj:
10:51 AM Changeset in webkit [234551] by Basuke Suzuki
  • 2 edits in trunk/LayoutTests

[LayoutTests][PHP] Fix old-style script which uses function name as a keyword.
https://bugs.webkit.org/show_bug.cgi?id=188289

Reviewed by Alex Christensen.

Function name should be passed as a string literal. In PHP, named function is
not the first class citizen.

  • http/tests/cookies/resources/echo-cookies.php:
10:51 AM Changeset in webkit [234550] by aestes@apple.com
  • 2 edits in trunk/Source/WebCore

ContentFilterUnblockHandler's constructors access moved-from variables
https://bugs.webkit.org/show_bug.cgi?id=188308
<rdar://problem/42882758>

Reviewed by Alex Christensen.

  • platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
10:48 AM Changeset in webkit [234549] by Basuke Suzuki
  • 2 edits in trunk/LayoutTests

[LayoutTests] Suppress PHP Error message by removing an execution time limit.
https://bugs.webkit.org/show_bug.cgi?id=188288

Reviewed by Alex Christensen.

Remove execution timeout.

  • http/tests/multipart/resources/multipart.php:
10:26 AM Changeset in webkit [234548] by Kocsen Chung
  • 13 edits
    3 adds in branches/safari-606-branch

Cherry-pick r234534. rdar://problem/42902608

Control center controls disappear when pausing, locking device.
https://bugs.webkit.org/show_bug.cgi?id=188282
<rdar://problem/42497809>

Reviewed by Eric Carlson.

Source/WebCore:

Test: platform/mac/media/audio-session-category-video-paused.html

MediaRemote will set any app whose audio session category changes from MediaPlayback to
Ambient as not eligable for being the "now playing" app. Previously, due to the ordering of
events, we never moved from MediaPlayback to Ambient when pausing <video>, even though that
was the intention. Now that that bug is fixed, it exposed this new issue with MediaRemote.

To solve the new issue, make our audio session category policy more explicit: once we are in
MediaPlayback category, we will remain so as long as the media element in queston stays
loaded, has played, and is never interrupted by the system.

Make MediaSessionManagerCocoa a proper subclass of PlatformMediaSessionManager, and make
MediaSessionManageriOS and -Mac subclasses of the -Cocoa class. Add a new
m_hasPlayedSinceLastInterruption ivar to PlatformMediaSession, set when the state() changes
to Playing, and cleared during an interruption. Check this flag when deciding what audio
sessino category to set in MediaSessionManagerCocoa.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/audio/PlatformMediaSession.cpp: (WebCore::PlatformMediaSession::setState):
  • platform/audio/PlatformMediaSession.h: (WebCore::PlatformMediaSession::hasPlayedSinceLastInterruption const): (WebCore::PlatformMediaSession::clearHasPlayedSinceLastInterruption):
  • platform/audio/PlatformMediaSessionManager.cpp: (WebCore::PlatformMediaSessionManager::updateSessionState): Deleted.
  • platform/audio/PlatformMediaSessionManager.h: (WebCore::PlatformMediaSessionManager::audioHardwareListener): (WebCore::PlatformMediaSessionManager::updateSessionState):
  • platform/audio/cocoa/MediaSessionManagerCocoa.cpp: (MediaSessionManagerCocoa::updateSessionState): (MediaSessionManagerCocoa::beginInterruption): (PlatformMediaSessionManager::updateSessionState): Deleted.
  • platform/audio/cocoa/MediaSessionManagerCocoa.h: Added.
  • platform/audio/ios/MediaSessionManagerIOS.h:
  • platform/audio/ios/MediaSessionManagerIOS.mm: (WebCore::MediaSessionManageriOS::MediaSessionManageriOS):
  • platform/audio/mac/MediaSessionManagerMac.h:
  • platform/audio/mac/MediaSessionManagerMac.mm: (WebCore::MediaSessionManagerMac::MediaSessionManagerMac):

LayoutTests:

  • platform/mac/media/audio-session-category-video-paused-expected.txt: Added.
  • platform/mac/media/audio-session-category-video-paused.html: Added.
  • platform/ios/TestExpectations:

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

10:06 AM Changeset in webkit [234547] by jer.noble@apple.com
  • 2 edits in trunk/Tools

Unreviewed gardening; r234534 changed the policy for what audio session is set when a
media element is paused. Updating the test to reflect the new policy.

  • TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm:

(TestWebKitAPI::TEST):

8:38 AM Changeset in webkit [234546] by Alan Bujtas
  • 4 edits in trunk

[LFC][Floating] Now that the document renderer belongs to "complicated cases", adjust viewport stretching.
https://bugs.webkit.org/show_bug.cgi?id=188306

Reviewed by Antti Koivisto.

Source/WebCore:

And add passing cases for floats.

  • layout/blockformatting/BlockFormattingContextGeometry.cpp:

(WebCore::Layout::initialContainingBlock):
(WebCore::Layout::isStretchedToInitialContainingBlock):
(WebCore::Layout::stretchHeightToInitialContainingBlock):
(WebCore::Layout::stretchWidthToInitialContainingBlock):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
(WebCore::Layout::isStretchedToViewport): Deleted.

Tools:

  • LayoutReloaded/misc/LFC-passing-tests.txt:
8:26 AM Changeset in webkit [234545] by Ryan Haddad
  • 11 edits
    2 deletes in trunk/Source/WebKit

Unreviewed, rolling out r234513.

14 API tests fail the assertions added in this change.

Reverted changeset:

"Check with SafeBrowsing during navigation in WKWebView"
https://bugs.webkit.org/show_bug.cgi?id=188133
https://trac.webkit.org/changeset/234513

7:21 AM Changeset in webkit [234544] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC] Do not check margin box while validating geometry.
https://bugs.webkit.org/show_bug.cgi?id=188297

Reviewed by Antti Koivisto.

The current RenderBox::marginBox implementation is not spec compliant. Ignore it for now.

  • layout/Verification.cpp:

(WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):

3:43 AM Changeset in webkit [234543] by Carlos Garcia Campos
  • 8 edits
    2 adds in trunk/Source/WebKit

[WPE] WebDriver: add support for action commands
https://bugs.webkit.org/show_bug.cgi?id=188301

Reviewed by Žan Doberšek.

WPE doesn't support action commands because the platform specific code for handling events is not implemented.

  • SourcesWPE.txt: Add new file to compilation.
  • UIProcess/API/glib/WebKitUIClient.cpp: Use the drawing area size as window size in WPE.
  • UIProcess/API/wpe/PageClientImpl.cpp:

(WebKit::PageClientImpl::viewBackend): Return the WPE backend of the view.

  • UIProcess/API/wpe/PageClientImpl.h:
  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::performMouseInteraction):
(WebKit::WebAutomationSession::performKeyboardInteractions):
(WebKit::WebAutomationSession::performInteractionSequence):
(WebKit::WebAutomationSession::cancelInteractionSequence):

  • UIProcess/Automation/wpe/WebAutomationSessionWPE.cpp: Added.

(WebKit::modifiersToEventState):
(WebKit::mouseButtonToWPEButton):
(WebKit::stateModifierForWPEButton):
(WebKit::doMouseEvent):
(WebKit::doMotionEvent):
(WebKit::WebAutomationSession::platformSimulateMouseInteraction):
(WebKit::doKeyStrokeEvent):
(WebKit::keyCodeForVirtualKey):
(WebKit::modifiersForKeyCode):
(WebKit::WebAutomationSession::platformSimulateKeyboardInteraction):
(WebKit::WebAutomationSession::platformSimulateKeySequence):

  • UIProcess/WebPageProxy.h:
  • UIProcess/wpe/WebPageProxyWPE.cpp:

(WebKit::WebPageProxy::viewBackend): Return the WPE backend.

3:07 AM Changeset in webkit [234542] by Carlos Garcia Campos
  • 4 edits in trunk/Tools

[WPE] Use the new key mapper API from WPEBackend
https://bugs.webkit.org/show_bug.cgi?id=188216

Reviewed by Žan Doberšek.

  • WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:

(WTR::EventSenderProxy::keyDown): Use wpe_input_xkb_context_get_entries_for_key_code() to get the hardware key
code.

  • wpe/backends/WindowViewBackend.cpp:

(WPEToolingBackends::WindowViewBackend::WindowViewBackend):
(WPEToolingBackends::WindowViewBackend::handleKeyEvent):
(WPEToolingBackends::WindowViewBackend::modifiers const):

  • wpe/backends/WindowViewBackend.h:
2:38 AM Changeset in webkit [234541] by Carlos Garcia Campos
  • 8 edits in trunk

[WPE] Implement MouseEvent.buttons
https://bugs.webkit.org/show_bug.cgi?id=187998

Reviewed by Žan Doberšek.

Source/WebKit:

Pass buttons currently pressed to WebMouseEvent.

  • Shared/wpe/WebEventFactory.cpp:

(WebKit::pressedMouseButtons): Helper to get the pressed buttons mask for the WPE modifiers.
(WebKit::WebEventFactory::createWebMouseEvent): Use pressedMouseButtons().

  • UIProcess/API/wpe/PageClientImpl.cpp:

(WebKit::PageClientImpl::doneWithTouchEvent): Update the event modifiers.

Tools:

Pass modifiers to mouse events.

  • WebKitTestRunner/EventSenderProxy.h:
  • WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:

(WTR::senderButtonToWPEButton):
(WTR::modifierForButton):
(WTR::EventSenderProxy::mouseDown):
(WTR::EventSenderProxy::mouseUp):
(WTR::EventSenderProxy::mouseMoveTo):
(WTR::EventSenderProxy::mouseScrollBy):
(WTR::wkEventModifiersToWPE):
(WTR::wpeKeySymForKeyRef):
(WTR::EventSenderProxy::keyDown):
(WTR::EventSenderProxy::prepareAndDispatchTouchEvent):

  • wpe/backends/WindowViewBackend.cpp:

(WPEToolingBackends::WindowViewBackend::handleKeyEvent):
(WPEToolingBackends::WindowViewBackend::modifiers const):

  • wpe/backends/WindowViewBackend.h:
2:16 AM Changeset in webkit [234540] by Carlos Garcia Campos
  • 14 edits in trunk

[WPE] Use WPE key symbols and new API instead of xkbcommon and the key mapper
https://bugs.webkit.org/show_bug.cgi?id=188093

Reviewed by Žan Doberšek.

Source/WebCore:

Add helper functions to get key code, hardware key code, key identifier and windows key code from a WPE key symbol.

  • platform/PlatformKeyboardEvent.h:
  • platform/wpe/PlatformKeyboardEventWPE.cpp:

(WebCore::PlatformKeyboardEvent::keyValueForWPEKeyCode):
(WebCore::PlatformKeyboardEvent::keyCodeForHardwareKeyCode):
(WebCore::PlatformKeyboardEvent::keyIdentifierForWPEKeyCode):
(WebCore::PlatformKeyboardEvent::windowsKeyCodeForWPEKeyCode):
(WebCore::PlatformKeyboardEvent::singleCharacterString):

Source/WebKit:

  • Shared/WebEvent.h: Add WebKeyboardEvent constructor for WPE.
  • Shared/WebKeyboardEvent.cpp:

(WebKit::WebKeyboardEvent::WebKeyboardEvent): WebKeyboardEvent constructor for WPE.

  • Shared/wpe/WebEventFactory.cpp:

(WebKit::isWPEKeyCodeFromKeyPad): Helper tpo check if a key symbols is from key pad.
(WebKit::WebEventFactory::createWebKeyboardEvent): Use PlatformKeyboardEvent API to provide key code, hardware
key code, key identifier and windows key code to WebKeyboardEvent.

  • UIProcess/API/wpe/WPEView.cpp:

(WKWPE::m_backend): Use WPE key symbols.

Tools:

  • MiniBrowser/wpe/main.cpp: Use WPE key symbols.
  • WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:

(WTR::wpeKeySymForKeyRef): Use WPE key symbols and wpe_unicode_to_key_code().
(WTR::EventSenderProxy::keyDown): Do not set unicode char to the event since it was removed.

  • flatpak/org.webkit.WPE.yaml: Bump WPEBackend and WPEBackend-fdo versions.
  • wpe/backends/WindowViewBackend.cpp:

(WPEToolingBackends::WindowViewBackend::handleKeyEvent): Do not set unicode char to the event since it was removed.

  • wpe/jhbuild.modules: Bump WPEBackend and WPEBackend-fdo versions.
1:16 AM Changeset in webkit [234539] by rniwa@webkit.org
  • 10 edits
    1 add in trunk

Release assert when throwing exceptions in custom element reactions
https://bugs.webkit.org/show_bug.cgi?id=187805
<rdar://problem/42432714>

Reviewed by Saam Barati.

LayoutTests/imported/w3c:

Generated the expected result.

  • web-platform-tests/custom-elements/reactions/with-exceptions-expected.txt: Added.

Source/WebCore:

The release assertion was hit because we were not catching & re-throwing the exception thrown by DOM API
before trying to execute custom elements reactions in ~CustomElementReactionStack as specified here:
https://html.spec.whatwg.org/multipage/custom-elements.html#cereactions
Fixed the bug by capturing the exception and re-throwing the exception as specified.

Tests: imported/w3c/web-platform-tests/custom-elements/reactions/with-exceptions.html

  • bindings/js/JSMainThreadExecState.h:

(WebCore::JSMainThreadNullState::JSMainThreadNullState): Use the previous JS state.

  • bindings/scripts/CodeGeneratorJS.pm:

(GeneratePut): Pass in the exec state to CustomElementReactionStack.
(GeneratePutByIndex): Ditto.
(GenerateDefineOwnProperty): Ditto.
(GenerateDeletePropertyCommon): Ditto.
(GenerateAttributeSetterBodyDefinition): Ditto.
(GenerateOperationBodyDefinition): Ditto.

  • bindings/scripts/test/JS/JSTestCEReactions.cpp:

(WebCore::setJSTestCEReactionsAttributeWithCEReactionsSetter):
(WebCore::setJSTestCEReactionsReflectAttributeWithCEReactionsSetter):
(WebCore::jsTestCEReactionsPrototypeFunctionMethodWithCEReactionsBody):

  • bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:

(WebCore::setJSTestCEReactionsStringifierValueSetter):

  • dom/CustomElementReactionQueue.cpp:

(WebCore::CustomElementReactionQueue::ElementQueue::processQueue): Added. If there is a script running
in the stack (i.e. ExecState is not null), catch any exception before executing custom element reactions,
then re-throw the exception afterwards. ExecState is null when DOM API is invoked via Objective-C bindings
or when custom element reactions are executed in the backup queue (e.g. for editing operations).
(WebCore::CustomElementReactionStack::processQueue):
(WebCore::CustomElementReactionQueue::processBackupQueue):

  • dom/CustomElementReactionQueue.h:

(WebCore::CustomElementReactionStack::CustomElementReactionStack):
(WebCore::CustomElementReactionStack::~CustomElementReactionStack):

LayoutTests:

Unskipped the previously crashing test.

Note: See TracTimeline for information about the timeline view.