Timeline
Jul 9, 2019:
- 11:33 PM Changeset in webkit [247295] by
-
- 7 edits2 adds in trunk
AX: HTML datalist accessibility is not exposed by WebKit
https://bugs.webkit.org/show_bug.cgi?id=196998
<rdar://problem/49962521>
Patch by Andres Gonzalez <Andres Gonzalez> on 2019-07-09
Reviewed by Chris Fleizach.
Source/WebCore:
Input fields with datalist are exposed as having a listbox popup.
Test: accessibility/datalist.html
- accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::popupValue const):
(WebCore::AccessibilityObject::hasDatalist const):
- accessibility/AccessibilityObject.h:
LayoutTests:
- accessibility/datalist-expected.txt: Added.
- accessibility/datalist.html: Added.
- 11:02 PM Changeset in webkit [247294] by
-
- 8 edits in trunk
[WPE][GTK] GUniqueOutPtr::release should return a raw pointer
https://bugs.webkit.org/show_bug.cgi?id=199579
Reviewed by Carlos Garcia Campos.
Source/WebKit:
- NetworkProcess/glib/WebKitCachedResolver.cpp:
(webkitCachedResolverLookupByNameAsync):
(webkitCachedResolverLookupByNameWithFlagsAsync):
- UIProcess/API/glib/WebKitFaviconDatabase.cpp:
(processPendingIconsForPageURL):
(webkit_favicon_database_get_favicon):
- UIProcess/API/glib/WebKitUserContentFilterStore.cpp:
(webkit_user_content_filter_store_save_from_file):
Source/WTF:
GUniqueOutPtr::release should release to a raw pointer, rather than a GUniquePtr. If a
GUniquePtr is desired, it's trivial to construct one from the raw pointer, but all existing
callsites under Source/ would rather have a raw pointer. Currently they have to call
release().release() to get the raw pointer, which is annoying.
- wtf/glib/GUniquePtr.h:
(WTF::GUniqueOutPtr::release):
Tools:
- TestWebKitAPI/Tests/WTF/glib/GUniquePtr.cpp:
(TestWebKitAPI::TEST):
- 9:39 PM Changeset in webkit [247293] by
-
- 54 edits in trunk/Source/WebCore
Replace old, broken WebGPU IDL spec link with the new one in IDL comments.
Rubber-stamped by Myles C. Maxfield.
No test changes or change in behavior.
- Modules/webgpu/GPUBindGroupLayoutBinding.idl:
- Modules/webgpu/GPUBindGroupLayoutDescriptor.idl:
- Modules/webgpu/GPUBlendDescriptor.idl:
- Modules/webgpu/GPUBufferDescriptor.idl:
- Modules/webgpu/GPUBufferUsage.idl:
- Modules/webgpu/GPUCanvasContext.idl:
- Modules/webgpu/GPUColor.idl:
- Modules/webgpu/GPUColorStateDescriptor.idl:
- Modules/webgpu/GPUColorWriteBits.idl:
- Modules/webgpu/GPUCompareFunction.idl:
- Modules/webgpu/GPUDepthStencilStateDescriptor.idl:
- Modules/webgpu/GPUExtent3D.idl:
- Modules/webgpu/GPULoadOp.idl:
- Modules/webgpu/GPUOrigin3D.idl:
- Modules/webgpu/GPURequestAdapterOptions.idl:
- Modules/webgpu/GPUSamplerDescriptor.idl:
- Modules/webgpu/GPUShaderStageBit.idl:
- Modules/webgpu/GPUStoreOp.idl:
- Modules/webgpu/GPUTextureDescriptor.idl:
- Modules/webgpu/GPUTextureUsage.idl:
- Modules/webgpu/GPUVertexAttributeDescriptor.idl:
- Modules/webgpu/GPUVertexBufferDescriptor.idl:
- Modules/webgpu/GPUVertexInputDescriptor.idl:
- Modules/webgpu/WebGPU.idl:
- Modules/webgpu/WebGPUAdapter.idl:
- Modules/webgpu/WebGPUBindGroup.idl:
- Modules/webgpu/WebGPUBindGroupBinding.idl:
- Modules/webgpu/WebGPUBindGroupDescriptor.idl:
- Modules/webgpu/WebGPUBindGroupLayout.idl:
- Modules/webgpu/WebGPUBuffer.idl:
- Modules/webgpu/WebGPUBufferBinding.idl:
- Modules/webgpu/WebGPUCommandBuffer.idl:
- Modules/webgpu/WebGPUCommandEncoder.idl:
- Modules/webgpu/WebGPUComputePassEncoder.idl:
- Modules/webgpu/WebGPUComputePipeline.idl:
- Modules/webgpu/WebGPUComputePipelineDescriptor.idl:
- Modules/webgpu/WebGPUDevice.idl:
- Modules/webgpu/WebGPUPipelineDescriptorBase.idl:
- Modules/webgpu/WebGPUPipelineLayout.idl:
- Modules/webgpu/WebGPUPipelineLayoutDescriptor.idl:
- Modules/webgpu/WebGPUPipelineStageDescriptor.idl:
- Modules/webgpu/WebGPUProgrammablePassEncoder.idl:
- Modules/webgpu/WebGPUQueue.idl:
- Modules/webgpu/WebGPURenderPassDescriptor.idl:
- Modules/webgpu/WebGPURenderPassEncoder.idl:
- Modules/webgpu/WebGPURenderPipeline.idl:
- Modules/webgpu/WebGPURenderPipelineDescriptor.idl:
- Modules/webgpu/WebGPUSampler.idl:
- Modules/webgpu/WebGPUShaderModule.idl:
- Modules/webgpu/WebGPUShaderModuleDescriptor.idl:
- Modules/webgpu/WebGPUSwapChain.idl:
- Modules/webgpu/WebGPUTexture.idl:
- Modules/webgpu/WebGPUTextureView.idl:
- 9:19 PM Changeset in webkit [247292] by
-
- 3 edits in trunk/Source/WebCore
Stop using GenericTaskQueue from multiple threads
https://bugs.webkit.org/show_bug.cgi?id=199652
Reviewed by Geoffrey Garen.
WebCoreAVFLoaderDelegate was calling GenericTaskQueue::enqueueTask() from a background thread,
which is not safe because the implementation of enqueueTask() calls makeWeakPtr() on the
GenericTaskQueue (a main thread object).
Update WebCoreAVFLoaderDelegate to use callOnMainThread() instead.
- platform/GenericTaskQueue.h:
Stop last template parameter which was used exclusively by WebCoreAVFLoaderDelegate to try and
make GenericTaskQueue thread-safe.
- platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(-[WebCoreAVFMovieObserver metadataLoaded]):
(-[WebCoreAVFMovieObserver didEnd:]):
(-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
(-[WebCoreAVFMovieObserver legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:]):
(-[WebCoreAVFMovieObserver outputSequenceWasFlushed:]):
(-[WebCoreAVFLoaderDelegate resourceLoader:shouldWaitForLoadingOfRequestedResource:]):
(-[WebCoreAVFLoaderDelegate resourceLoader:didCancelLoadingRequest:]):
- 6:52 PM Changeset in webkit [247291] by
-
- 4 edits in trunk/Source
Fixed elements appear in the middle of full page screenshots taken when scrolled
https://bugs.webkit.org/show_bug.cgi?id=199649
<rdar://problem/52476226>
Reviewed by Simon Fraser.
Source/WebCore:
- page/FrameView.h:
Expose a getter for the layout viewport override rect.
Source/WebKit:
- WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::computePagesForPrintingAndDrawToPDF):
Temporarily expand the layout viewport to the size of the snapshotting page,
so that fixed elements sit against the bounds of the page instead of
wherever you're currently scrolled to.
- 6:31 PM Changeset in webkit [247290] by
-
- 2 edits in trunk/Source/WebKit
[iOS WK2] Use Optional<> for two data members of WKWebView
https://bugs.webkit.org/show_bug.cgi?id=199637
Reviewed by Tim Horton.
Use Optional<CGSize> to replace _overridesViewLayoutSize/_viewLayoutSizeOverride
and _overridesMaximumUnobscuredSize/_maximumUnobscuredSizeOverride.
No behavior change.
- UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView activeViewLayoutSize:]):
(-[WKWebView _frameOrBoundsChanged]):
(activeMaximumUnobscuredSize):
(-[WKWebView _minimumLayoutSizeOverride]):
(-[WKWebView _setViewLayoutSizeOverride:]):
(-[WKWebView _maximumUnobscuredSizeOverride]):
(-[WKWebView _setMaximumUnobscuredSizeOverride:]):
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
(-[WKWebView _clearOverrideLayoutParameters]):
- 5:23 PM Changeset in webkit [247289] by
-
- 24 edits16 adds in trunk/LayoutTests
[WHLSL] Import another round of JS spec tests
https://bugs.webkit.org/show_bug.cgi?id=199647
Reviewed by Myles C. Maxfield.
This patch also removes the unneded <!-- webkit-test-runner [ experimental:WebGPUEnabled=true ] -->
comments in various tests.
- webgpu/bind-groups.html:
- webgpu/blit-commands.html:
- webgpu/map-read-buffers.html:
- webgpu/map-write-buffers.html:
- webgpu/msl-harness-test.html:
- webgpu/pipeline-layouts.html:
- webgpu/queue-creation.html:
- webgpu/render-command-encoding.html:
- webgpu/shader-modules.html:
- webgpu/textures-textureviews.html:
- webgpu/whlsl-array-spec-tests.html:
- webgpu/whlsl-bad-ander-expected.txt: Added.
- webgpu/whlsl-bad-ander.html: Added.
- webgpu/whlsl-bad-literals-expected.txt: Added.
- webgpu/whlsl-bad-literals.html: Added.
- webgpu/whlsl-bitwise-bool-ops.html:
- webgpu/whlsl-enum-spec-tests.html:
- webgpu/whlsl-equality.html:
- webgpu/whlsl-float-math-expected.txt: Added.
- webgpu/whlsl-float-math.html: Added.
- webgpu/whlsl-index-getter-setter-expected.txt: Added.
- webgpu/whlsl-index-getter-setter.html: Added.
- webgpu/whlsl-int-bit-math-expected.txt: Added.
- webgpu/whlsl-int-bit-math.html: Added.
- webgpu/whlsl-int-literal-compare.html:
- webgpu/whlsl-make-array-ref-spec-tests-expected.txt: Added.
- webgpu/whlsl-make-array-ref-spec-tests.html: Added.
- webgpu/whlsl-matrices-spec-tests.html:
- webgpu/whlsl-pointer-spec-tests-expected.txt: Added.
- webgpu/whlsl-pointer-spec-tests.html: Added.
- webgpu/whlsl-postfix-prefix-expected.txt: Added.
- webgpu/whlsl-postfix-prefix.html: Added.
- webgpu/whlsl-return-spec-tests.html:
- webgpu/whlsl-simple-getter-setter.html:
- webgpu/whlsl-simple-tests.html:
- webgpu/whlsl-simple-while-loop.html:
- webgpu/whlsl-test-harness-test.html:
- webgpu/whlsl-type-mismatch.html:
- webgpu/whlsl-uint-bitwise.html:
- 5:13 PM Changeset in webkit [247288] by
-
- 6 edits in trunk
Fix integer type encoding / decoding in WKRemoteObjectCoder
https://bugs.webkit.org/show_bug.cgi?id=199643
<rdar://problem/52732342>
Reviewed by Anders Carlsson.
Source/WebKit:
As per [1], q / Q match to long long / unsigned long long, not long / unsigned long.
[1] https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtTypeEncodings.html#//apple_ref/doc/uid/TP40008048-CH100
- Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(encodeInvocationArguments):
(decodeInvocationArguments):
Tools:
Update API test coverage.
- TestWebKitAPI/Tests/WebKitCocoa/RemoteObjectRegistry.h:
- TestWebKitAPI/Tests/WebKitCocoa/RemoteObjectRegistry.mm:
(TEST):
- TestWebKitAPI/Tests/WebKitCocoa/RemoteObjectRegistryPlugIn.mm:
(-[RemoteObjectRegistryPlugIn takeUnsignedLongLong:completionHandler:]):
(-[RemoteObjectRegistryPlugIn takeLongLong:completionHandler:]):
(-[RemoteObjectRegistryPlugIn takeUnsignedLong:completionHandler:]):
(-[RemoteObjectRegistryPlugIn takeLong:completionHandler:]):
- 5:05 PM Changeset in webkit [247287] by
-
- 1 copy in tags/Safari-608.1.34.0.2
Tag Safari-608.1.34.0.2.
- 4:54 PM Changeset in webkit [247286] by
-
- 7 edits in trunk
Add StringBuilder member function which allows makeString() style variadic argument construction
https://bugs.webkit.org/show_bug.cgi?id=198997
Reviewed by Darin Adler.
Source/WTF:
Adds new StringBuilder::flexibleAppend(...) member function which allows passing one or more
string-adaptable (in the sense that there is StringTypeAdapter specialization for the
type) parameters. This re-ususes the variadic template infrastructure in StringConcatenate.h
that is used for makeString(...) allowing for improvements in one to benefit the other.
The advantage of StringBuilder::flexibleAppend(...) over calling StringBuilder::append(...)
multiple times (beyond the code sharing with makeString(...) is that it can avoid unnecessary
additional re-allocations when the StringBuilder needs to expand it's capacity. It does this
by computing the complete required length for all the passed arguments and then ensuring enough
capacity is available. It also reduces the allocation overhead versus the anti-pattern of
builder.append(makeString(...)).
Ideally, this member function should eventually just be called StringBuilder::append(...), but
the current overload set for StringBuilder::append(...) makes this complicated due to overloads
that take two arguments such as StringBuilder::append(const UChar*, unsigned). Going forward, we
should rename or remove those overloads and move to a standard interface.
- wtf/posix/FileSystemPOSIX.cpp:
(WTF::FileSystemImpl::pathByAppendingComponents):
Adopt StringBuilder::flexibleAppend, using to combine the append of '/' and component.
- wtf/text/StringBuilder.cpp:
(WTF::StringBuilder::appendUninitialized):
(WTF::StringBuilder::appendUninitializedWithoutOverflowCheck):
Extract the part of appendUnitialized that doesn't do the overflow check
into it's own member function to allow callers that have already done the
overflow check to bypass it.
(WTF::StringBuilder::appendUninitializedWithoutOverflowCheckForUChar):
(WTF::StringBuilder::appendUninitializedWithoutOverflowCheckForLChar):
Added to allow template member function flexibleAppendFromAdapters to call
appendUninitializedWithoutOverflowCheck without moving it to the header.
- wtf/text/StringBuilder.h:
(WTF::StringBuilder::flexibleAppendFromAdapters):
(WTF::StringBuilder::flexibleAppend):
Modeled on tryMakeStringFromAdapters in StringConcatenate.h, these
eagerly compute the required length, expand the buffer and then use
the existing string type adaptor accumulation functions used by makeString.
- wtf/text/StringConcatenate.h:
(WTF::stringTypeAdapterAccumulator):
(WTF::tryMakeStringFromAdapters):
(WTF::makeStringAccumulator): Deleted.
Renames makeStringAccumulator to stringTypeAdapterAccumulator now that it is used
by more than just makeString.
Tools:
- TestWebKitAPI/Tests/WTF/StringBuilder.cpp:
Add basic test showing that StringBuilder::flexibleAppend can be used to
append one or more string adaptable types.
- 4:20 PM Changeset in webkit [247285] by
-
- 2 edits in trunk/LayoutTests
Unreviewed test gardening, address TestExpectations linter warning.
- TestExpectations: Delete entry for fast/content-observation since
the directory doesn't exist anymore.
- 4:05 PM Changeset in webkit [247284] by
-
- 1 edit14 adds in trunk/LayoutTests
[WHLSL] Add another group of WHLSL JS reference spec tests
https://bugs.webkit.org/show_bug.cgi?id=199642
Reviewed by Robin Morisset.
- webgpu/whlsl-array-spec-tests-expected.txt: Added.
- webgpu/whlsl-array-spec-tests.html: Added.
- webgpu/whlsl-enum-spec-tests-expected.txt: Added.
- webgpu/whlsl-enum-spec-tests.html: Added.
- webgpu/whlsl-equality-expected.txt: Added.
- webgpu/whlsl-equality.html: Added.
- webgpu/whlsl-matrices-spec-tests-expected.txt: Added.
- webgpu/whlsl-matrices-spec-tests.html: Added.
- webgpu/whlsl-return-spec-tests-expected.txt: Added.
- webgpu/whlsl-return-spec-tests.html: Added.
- webgpu/whlsl-simple-getter-setter-expected.txt: Added.
- webgpu/whlsl-simple-getter-setter.html: Added.
- webgpu/whlsl-simple-while-loop-expected.txt: Added.
- webgpu/whlsl-simple-while-loop.html: Added.
- 3:40 PM Changeset in webkit [247283] by
-
- 5 edits in trunk/Source
Cleanup uses of NetworkProcess::m_sessionByConnection
https://bugs.webkit.org/show_bug.cgi?id=199586
Reviewed by Alex Christensen.
Avoid double HashMap lookups and call add() instead of ensure() when appropriate.
- NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::networkSessionByConnection const):
(WebKit::NetworkProcess::webPageWasAdded):
(WebKit::NetworkProcess::webProcessWasDisconnected):
- 3:11 PM Changeset in webkit [247282] by
-
- 2 edits in trunk/Source/WebCore
Fix build after r247279
https://bugs.webkit.org/show_bug.cgi?id=199640
- WebCore.xcodeproj/project.pbxproj:
- 2:49 PM Changeset in webkit [247281] by
-
- 2 edits in trunk/Source/WebKit
WKObject's minimum object alignment needs to be larger
https://bugs.webkit.org/show_bug.cgi?id=199523
Patch by Saagar Jha <saagarjha@apple.com> on 2019-07-09
Reviewed by Alex Christensen.
WKObject's wrapped objects are currently constructed at addresses aligned to 8-byte boundaries, but some
classes have more stringent requirements. By querying std::aligned_storage for the alignment of an object
larger than anything we can construct, we should be able to satisfy alignment for any of WebKit's types.
- Shared/Cocoa/APIObject.mm: Use std::aligned_storage in conjunction with alignof to determine
minimumObjectAlignment, instead of hardcoding 8.
- 2:45 PM Changeset in webkit [247280] by
-
- 2 edits in trunk/Source/WebKit
Don't strip out spaces for personalized Autocorrections
https://bugs.webkit.org/show_bug.cgi?id=199476
<rdar://problem/50782015>
Reviewed by Dean Jackson.
When inserting 'autocorrections' that are really predictive
text suggestions based on personal data, we would remove the space
before the suggestion, resulting in incorrect input.
To fix, do not remove a space when the autocorrected text and the text it is
replacing do not have any length.
- WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::applyAutocorrectionInternal):
- 2:30 PM Changeset in webkit [247279] by
-
- 3 edits2 moves in trunk/Source/WebCore
Move AutofillElements.{h,cpp} from editing/ios to editing/cocoa since they're used on macOS
https://bugs.webkit.org/show_bug.cgi?id=199640
Reviewed by Chris Dumez.
- SourcesCocoa.txt:
- WebCore.xcodeproj/project.pbxproj:
- editing/cocoa/AutofillElements.cpp: Copied from Source/WebCore/editing/ios/AutofillElements.cpp.
- editing/cocoa/AutofillElements.h: Copied from Source/WebCore/editing/ios/AutofillElements.h.
- editing/ios/AutofillElements.cpp: Removed.
- editing/ios/AutofillElements.h: Removed.
- 2:07 PM Changeset in webkit [247278] by
-
- 14 edits in trunk/Source
Web Inspector: Canvas: replace WTF::Vector with std::initializer_list in CallTracer to avoid dynamic allocations
https://bugs.webkit.org/show_bug.cgi?id=199611
Reviewed by Joseph Pecoraro.
Source/WebCore:
The number of arguments for each member function is known at build time, so there's no need
to dynamically allocate aWTF::Vectorwhen capturing the arguments. One downside to using
astd::initializer_listis that we can no longer "flatten"WTF::Variantarguments into
aRecordCanvasActionVariant, but this is acceptable becauseWTF::Variantsupports having
yet anotherWTF::Variantas one of it's types, which theInspectorCanvascan then figure
out when it finally gets the data. The same applies tonullptr/Optionalchecks as well.
- bindings/scripts/CodeGeneratorJS.pm:
(GenerateAttributeSetterBodyDefinition):
(GenerateImplementationFunctionCall):
(GenerateCallTracer):
(GenerateCallTracerParameter): Deleted.
- bindings/scripts/test/JS/JSTestCallTracer.cpp:
- bindings/js/CallTracerTypes.h:
- bindings/js/CallTracer.h:
- bindings/js/CallTracer.cpp:
(WebCore::CallTracer::recordCanvasAction):
- inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::recordCanvasAction):
- inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::recordCanvasActionImpl):
- inspector/agents/InspectorCanvasAgent.h:
- inspector/agents/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::recordCanvasAction):
- inspector/InspectorCanvas.h:
- inspector/InspectorCanvas.cpp:
(WebCore::InspectorCanvas::recordAction):
(WebCore::InspectorCanvas::buildAction):
Drive-by: handle the situation where a parameter is an array of deduplicated strings, which
would otherwise be treated as an array of numbers.
Source/WebInspectorUI:
- UserInterface/Models/Recording.js:
(WI.Recording.prototype.async swizzle):
Drive-by: handle the situation where a parameter is an array of deduplicated strings, which
would otherwise be treated as an array of numbers.
- 2:01 PM Changeset in webkit [247277] by
-
- 2 edits in trunk/Source/WebKit
Unreviewed, rolling out r247230.
Caused storage/domstorage/localstorage/private-browsing-
affects-storage.html to crash with an assertion.
Reverted changeset:
"Cleanup uses of NetworkProcess::m_sessionByConnection"
https://bugs.webkit.org/show_bug.cgi?id=199586
https://trac.webkit.org/changeset/247230
- 1:44 PM Changeset in webkit [247276] by
-
- 3 edits4 adds in trunk
XHR CORS requests logged twice in the server
https://bugs.webkit.org/show_bug.cgi?id=199492
<rdar://problem/52757558>
Reviewed by Chris Dumez.
Source/WebKit:
Disable speculative loading for XHR and fetch.
These speculative requests might have specific headers that are no longer relevant
when reloading the page. This might then confuse servers.
- NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::makeStoreDecision):
(WebKit::NetworkCache::canRequestUseSpeculativeRevalidation):
(WebKit::NetworkCache::Cache::retrieve):
LayoutTests:
- http/wpt/fetch/disable-speculative-load-for-xhr-and-fetch-loads-expected.txt: Added.
- http/wpt/fetch/disable-speculative-load-for-xhr-and-fetch-loads.html: Added.
- http/wpt/fetch/resources/fetch-xhr-load.py: Added.
(main):
- http/wpt/fetch/resources/xhr-and-fetch.html: Added.
- 1:41 PM Changeset in webkit [247275] by
-
- 1 edit3 adds in trunk/Source/WebInspectorUI
Web Inspector: Add another Protocol Version (iOS 13.0)
https://bugs.webkit.org/show_bug.cgi?id=199631
<rdar://problem/47538193>
Reviewed by Devin Rousso.
- UserInterface/Protocol/Legacy/13.0/InspectorBackendCommands.js: Added.
- Versions/Inspector-iOS-13.0.json: Added.
- 1:28 PM Changeset in webkit [247274] by
-
- 2 edits in trunk/Source/WebKit
Fix validation of method signature in decodeInvocation()
https://bugs.webkit.org/show_bug.cgi?id=199629
<rdar://problem/52731659>
Reviewed by Dan Bernstein.
The decoder was mistakenly assigning remoteMethodSignature to localMethodSignature
before comparing remoteMethodSignature and localMethodSignature, thus making the
check useless.
- Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(decodeInvocation):
- 1:03 PM Changeset in webkit [247273] by
-
- 6 edits in trunk/Source/WebCore
Fix non thread-safe use of WeakPtr in DisplayRefreshMonitorMac::displayLinkFired()
https://bugs.webkit.org/show_bug.cgi?id=199626
Reviewed by Ryosuke Niwa.
Fix non thread-safe use of WeakPtr in DisplayRefreshMonitorMac::displayLinkFired().
DisplayRefreshMonitorMac gets constructed / destroyed on the main thread, it is
not thread-safe to call makeWeakPtr() on a DisplayRefreshMonitorMac object like it
was done before.
To address the issue, mark the object as ThreadSafeRefCounted and ref the object
in the lambda instead.
- platform/graphics/DisplayRefreshMonitor.h:
(WebCore::DisplayRefreshMonitor::stop):
- platform/graphics/DisplayRefreshMonitorManager.cpp:
(WebCore::DisplayRefreshMonitorManager::unregisterClient):
- platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
(WebCore::DisplayRefreshMonitorMac::~DisplayRefreshMonitorMac):
(WebCore::DisplayRefreshMonitorMac::stop):
(WebCore::DisplayRefreshMonitorMac::displayLinkFired):
- platform/graphics/mac/DisplayRefreshMonitorMac.h:
- 12:56 PM Changeset in webkit [247272] by
-
- 2 edits in trunk/Source/WebKit
Revert conditional WebPageProxy check to grant universal file read sandbox upon correct sandbox creation
https://bugs.webkit.org/show_bug.cgi?id=199622
<rdar://problem/52357508>
Reviewed by Alex Christensen.
On iOS, the sandbox extension to '/' will usually fail, thus the universal file read sandbox is not granted.
This makes WebPageProxy cancel some file:// loads to the application own container.
As a short term fix, go back to previous behavior.
Covered by testing broken app identified in rdar://problem/52357508.
- UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
- 12:38 PM Changeset in webkit [247271] by
-
- 3 edits3 deletes in trunk/LayoutTests
Remove rel=subresource tests
https://bugs.webkit.org/show_bug.cgi?id=199616
Patch by Rob Buis <rbuis@igalia.com> on 2019-07-09
Reviewed by Ryosuke Niwa.
Remove rel=subresource references by deleting or using rel=prefetch
instead.
- TestExpectations:
- fast/dom/HTMLLinkElement/cachedresource-types.html:
- http/tests/misc/link-rel-prefetch-and-subresource.html: Removed.
- webarchive/test-link-rel-subresource-beforeload-expected.webarchive: Removed.
- webarchive/test-link-rel-subresource-beforeload.html: Removed.
- 12:25 PM Changeset in webkit [247270] by
-
- 17 edits in trunk
Only allow fetching and removing session credentials from WebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=199385
<rdar://problem/52622080>
Reviewed by Alex Christensen.
Source/WebCore:
Fetch and remove only session credentials from NSURLCredentialStorage.
Modified existing API tests: WKWebsiteDataStore.FetchPersistentCredentials
- platform/network/CredentialStorage.cpp:
(WebCore::CredentialStorage::originsWithCredentials const):
(WebCore::CredentialStorage::originsWithSessionCredentials):
(WebCore::CredentialStorage::removeSessionCredentialsWithOrigins):
(WebCore::CredentialStorage::clearSessionCredentials):
(WebCore::CredentialStorage::clearPermanentCredentialsForProtectionSpace):
- platform/network/CredentialStorage.h:
- platform/network/mac/CredentialStorageMac.mm:
(WebCore::CredentialStorage::originsWithSessionCredentials):
(WebCore::CredentialStorage::removeSessionCredentialsWithOrigins):
(WebCore::CredentialStorage::clearSessionCredentials):
(WebCore::CredentialStorage::clearPermanentCredentialsForProtectionSpace):
(WebCore::CredentialStorage::originsWithPersistentCredentials): Deleted.
Source/WebKit:
Stop sending an extra message to network process for fetching or removing persistent credentials.
Also introduce a new SPI for clearing persistent credentials created in test.
- NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::clearPermanentCredentialsForProtectionSpace):
(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
(WebKit::NetworkProcess::deleteWebsiteDataForRegistrableDomains):
(WebKit::NetworkProcess::originsWithPersistentCredentials): Deleted.
(WebKit::NetworkProcess::removeCredentialsWithOrigins): Deleted.
- NetworkProcess/NetworkProcess.h:
- NetworkProcess/NetworkProcess.messages.in:
- NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::originsWithPersistentCredentials): Deleted.
(WebKit::NetworkProcess::removeCredentialsWithOrigins): Deleted.
- UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _clearPermanentCredentialsForProtectionSpace:completionHandler:]):
- UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
- UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::clearPermanentCredentialsForProtectionSpace):
- UIProcess/WebProcessPool.h:
- UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::fetchDataAndApply):
(WebKit::computeWebProcessAccessTypeForDataRemoval):
(WebKit::WebsiteDataStore::removeData):
Tools:
removeDataOfTypes will no longer remove persistent credentials. We should clear persistent credentials using
the new SPI after each test that creates persistent credentials, otherwise the later tests may use credentials
left by previous tests and didReceiveAuthenticationChallenge will not be invoked.
- TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:
(TEST):
- TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm:
(TestWebKitAPI::TEST):
- 12:15 PM Changeset in webkit [247269] by
-
- 4 edits in trunk
When parsing an IPv4 address, wait until after deciding it is indeed an IPv4 address before reporting syntax violations
https://bugs.webkit.org/show_bug.cgi?id=199628
Reviewed by Brady Eidson.
Source/WTF:
Otherwise, we sometimes report syntax violations on things that are not IPv4 addresses and don't have syntax violations.
I added a unit test with one such URL that used to cause an assertion.
- wtf/URLParser.cpp:
(WTF::URLParser::parseIPv4Host):
Tools:
- TestWebKitAPI/Tests/WTF/URLParser.cpp:
(TestWebKitAPI::TEST_F):
- 12:13 PM Changeset in webkit [247268] by
-
- 4 edits in trunk
Remove invalid assertion in URLParser::domainToASCII
https://bugs.webkit.org/show_bug.cgi?id=199624
Reviewed by Brady Eidson.
Source/WTF:
When a non-ASCII domain's punycode encoding is longer than 63 characters,
the URL is supposed to fail to parse, according to https://www.unicode.org/reports/tr46/#ToASCII
We and all other browsers do this. When uidna_nameToASCII tries to punycode encode such a domain,
it can return a number larger than 63. In this case, processingDetails.errors is UIDNA_ERROR_LABEL_TOO_LONG
and we fail to parse as desired and uidna_nameToASCII did not write out of bounds, so it was just the assertion
that was wrong. I added some unit tests that would have hit the assertion and verify that we fail at the correct length.
- wtf/URLParser.cpp:
(WTF::URLParser::domainToASCII):
Tools:
- TestWebKitAPI/Tests/WTF/URLParser.cpp:
(TestWebKitAPI::TEST_F):
- 12:12 PM Changeset in webkit [247267] by
-
- 4 edits in trunk
URLParser should reserialize IPv6 addresses that end with a colon
https://bugs.webkit.org/show_bug.cgi?id=199627
Reviewed by Brady Eidson.
Source/WTF:
When an IPv6 address ends in a colon, the colon should be removed which means the
serialized output is different than the input, which the URLParser calls a syntax violation.
This matches the URL specification, and I added a unit test that used to assert.
- wtf/URLParser.cpp:
(WTF::URLParser::parseIPv6Host):
Tools:
- TestWebKitAPI/Tests/WTF/URLParser.cpp:
(TestWebKitAPI::TEST_F):
- 11:55 AM Changeset in webkit [247266] by
-
- 2 edits in trunk/Source/WebCore
Null check HistoryItems given to loadDifferentDocumentItem
https://bugs.webkit.org/show_bug.cgi?id=199596
<rdar://problem/49884391>
Reviewed by Ryosuke Niwa.
- loader/FrameLoader.cpp:
(WebCore::FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad):
Under some rare and mysterious conditions we can have a null provisionalItem when loading from the cache.
- 11:43 AM Changeset in webkit [247265] by
-
- 5 edits2 adds in trunk
[Pointer Events] Scroll indicators should not show for scrollable content with touch-action: none
https://bugs.webkit.org/show_bug.cgi?id=199618
Reviewed by Simon Fraser.
Source/WebKit:
Even though we correctly didn't scroll when "touch-action: none" was specified on an element, we would only apply
scrolling constraints after the panning gesture was recognized and the backing UIScrollView would show its scroll
indicators. While this is correct when only "pan-x" or "pan-y" is specified, we should not show the scroll indicators
at all for "touch-action: none" since no scrolling should happen.
To do this, we add a new method to the WKTouchActionGestureRecognizerDelegate protocol to indicate whether a given
gesture recognizer may pan content in the WKWebView. If the gesture recognizer is the top-level scroll view or one
created within the page to back "overflow: scroll" content or an iframe, we correctly make that gesture recognizer
fail to recognize if neither "pan-x" nor "pan-y" is specified for this touch identifier.
- UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView gestureRecognizerMayPanWebView:]):
- UIProcess/ios/WKTouchActionGestureRecognizer.h:
- UIProcess/ios/WKTouchActionGestureRecognizer.mm:
(-[WKTouchActionGestureRecognizer canPreventGestureRecognizer:]):
LayoutTests:
Add a new test that swipes "overflow: scroll" content which would show scroll indicators without scrolling
prior to this patch.
- pointerevents/ios/touch-action-none-no-scroll-indicators-expected.html: Added.
- pointerevents/ios/touch-action-none-no-scroll-indicators.html: Added.
- 11:41 AM Changeset in webkit [247264] by
-
- 2 edits in trunk/Source/WebKit
Validate reply block signature in [WKRemoteObjectRegistry _invokeMethod]
https://bugs.webkit.org/show_bug.cgi?id=199584
<rdar://problem/46268249>
Reviewed by Geoffrey Garen.
Validate reply block signature in [WKRemoteObjectRegistry _invokeMethod] for robustness.
- Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
(validateReplyBlockSignature):
(-[_WKRemoteObjectRegistry _invokeMethod:]):
- 11:27 AM Changeset in webkit [247263] by
-
- 2 edits in trunk/Source/WebKit
UserData::decode should return false when decoding an unrecognized type
https://bugs.webkit.org/show_bug.cgi?id=199598
<rdar://52735138>
Reviewed by Ryosuke Niwa.
- Shared/UserData.cpp:
(WebKit::UserData::decode):
- 11:26 AM Changeset in webkit [247262] by
-
- 2 edits in trunk/Source/WebCore
Fix LOG_DISABLED and TREE_DEBUGGING enabled build.
https://bugs.webkit.org/show_bug.cgi?id=199623
<rdar://problem/52837648>
Reviewed by Simon Fraser.
- rendering/RenderLayerCompositor.cpp:
- 10:46 AM Changeset in webkit [247261] by
-
- 14 edits2 adds in branches/safari-608.1.34.0-branch
Cherry-pick r247180. rdar://problem/51597945
[iOS] Crash in WebKit::WebPage::positionInformation via Range::startPosition
https://bugs.webkit.org/show_bug.cgi?id=199503
Reviewed by Wenson Hsieh.
Source/WebCore:
- editing/Editor.cpp: (WebCore::Editor::compositionRange const): Added a FIXME.
Source/WebKit:
The crash was caused because focusedElementPositionInformation asssumes Editor::compositionRange is not null
whenever Editor::hasComposition returns true, which is not necessary the case when Editor::m_compositionNode
contains no text (data is of length 0).
Fixed the crash by adding an early return for when Editor::compositionRange returns nullptr.
- WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::focusedElementPositionInformation):
Tools:
Added UIScriptController.ensurePositionInformationIsUpToDateAt using the existing WKWebView SPI:
_requestActivatedElementAtPosition
- DumpRenderTree/ios/UIScriptControllerIOS.mm: (WTR::UIScriptController::ensurePositionInformationIsUpToDateAt):
- DumpRenderTree/mac/UIScriptControllerMac.mm: (WTR::UIScriptController::ensurePositionInformationIsUpToDateAt):
- TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
- TestRunnerShared/UIScriptContext/UIScriptController.cpp: (WTR::UIScriptController::ensurePositionInformationIsUpToDateAt):
- TestRunnerShared/UIScriptContext/UIScriptController.h:
- WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::UIScriptController::ensurePositionInformationIsUpToDateAt):
- WebKitTestRunner/ios/UIScriptControllerMac.mm: (WTR::UIScriptController::ensurePositionInformationIsUpToDateAt):
LayoutTests:
Added a regression test for the crash.
- editing/input/delete-text-in-composition-expected.txt: Added.
- editing/input/delete-text-in-composition.html: Added.
- resources/ui-helper.js: (window.UIHelper.ensurePositionInformationUpdateForElement): Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247180 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 10:44 AM Changeset in webkit [247260] by
-
- 7 edits in branches/safari-608.1.34.0-branch/Source
Versioning.
- 9:52 AM Changeset in webkit [247259] by
-
- 2 edits in trunk/LayoutTests
[GStreamer] HLS media test gardening
https://bugs.webkit.org/show_bug.cgi?id=199620
Unreviewed gardening commit.
- platform/gtk/TestExpectations:
- 9:14 AM Changeset in webkit [247258] by
-
- 3 edits in trunk/Tools
[ews-build] Do not run unix commands for windows in PrintConfiguration
https://bugs.webkit.org/show_bug.cgi?id=199605
Reviewed by Jonathan Bedard.
- BuildSlaveSupport/ews-build/steps.py:
- 8:29 AM Changeset in webkit [247257] by
-
- 5 edits in trunk/Source/WebCore
[LFC][IFC] Remove InlineItem references from inline runs.
https://bugs.webkit.org/show_bug.cgi?id=199608
<rdar://problem/52812775>
Reviewed by Antti Koivisto.
Constructing the inline runs is where we stop using InlineItems in the process of processing the inline content.
InlineItems are redundant in the context of Display::Runs.
It also enables us to create temporary InlineItems to process split content.
- layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
(WebCore::Layout::InlineFormattingContext::LineLayout::createDisplayRuns const):
- layout/inlineformatting/InlineFormattingContextQuirks.cpp:
(WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing):
- layout/inlineformatting/InlineLine.cpp:
(WebCore::Layout::Line::Content::Run::Run):
(WebCore::Layout::Line::isVisuallyEmpty const):
(WebCore::Layout::Line::close):
(WebCore::Layout::Line::removeTrailingTrimmableContent):
(WebCore::Layout::Line::trailingTrimmableWidth const):
(WebCore::Layout::Line::appendNonBreakableSpace):
(WebCore::Layout::Line::appendTextContent):
(WebCore::Layout::Line::appendNonReplacedInlineBox):
(WebCore::Layout::Line::appendHardLineBreak):
- layout/inlineformatting/InlineLine.h:
(WebCore::Layout::Line::Content::Run::layoutBox const):
(WebCore::Layout::Line::Content::Run::logicalRect const):
(WebCore::Layout::Line::Content::Run::textContext const):
(WebCore::Layout::Line::Content::Run::type const):
(WebCore::Layout::Line::Content::Run::isText const):
(WebCore::Layout::Line::Content::Run::isBox const):
(WebCore::Layout::Line::Content::Run::isLineBreak const):
(WebCore::Layout::Line::Content::Run::isContainerStart const):
(WebCore::Layout::Line::Content::Run::isContainerEnd const):
(WebCore::Layout::Line::Content::Run::adjustLogicalTop):
(WebCore::Layout::Line::Content::Run::moveVertically):
(WebCore::Layout::Line::Content::Run::moveHorizontally):
(WebCore::Layout::Line::Content::Run::setTextIsCollapsed):
- 8:21 AM Changeset in webkit [247256] by
-
- 7 edits2 adds in trunk
REGRESSION(r244906): Crash in WebCore::positionOffsetValue
https://bugs.webkit.org/show_bug.cgi?id=199613
<rdar://problem/51518172>
Reviewed by Zalan Bujtas.
Source/WebCore:
Test: fast/css/getComputedStyle/sticky-scroll-container-crash.html
- css/CSSComputedStyleDeclaration.cpp:
(WebCore::positionOffsetValue):
- rendering/RenderBox.cpp:
(WebCore::RenderBox::enclosingScrollportBox const): Deleted.
The client trivally hits nullptr when this is called for element without overflow scroll parent.
Fix by removing the whole function and using shared enclosingClippingBoxForStickyPosition instead.
It does the same ancestor walk more efficiently via layer tree.
- rendering/RenderBox.h:
- rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::enclosingClippingBoxForStickyPosition const):
Factor into function.
(WebCore::RenderBoxModelObject::computeStickyPositionConstraints const):
- rendering/RenderBoxModelObject.h:
LayoutTests:
- fast/css/getComputedStyle/sticky-scroll-container-crash-expected.txt: Added.
- fast/css/getComputedStyle/sticky-scroll-container-crash.html: Added.
- 3:03 AM Changeset in webkit [247255] by
-
- 9 edits1 delete in trunk
Support writing-mode and direction for scrollIntoViewOptions.
https://bugs.webkit.org/show_bug.cgi?id=161611
Patch by Cathie Chen <cathiechen> on 2019-07-09
Reviewed by Frédéric Wang and Simon Fraser.
LayoutTests/imported/w3c:
- web-platform-tests/css/cssom-view/scrollIntoView-horizontal-tb-writing-mode-and-rtl-direction-expected.txt:
- web-platform-tests/css/cssom-view/scrollIntoView-vertical-lr-writing-mode-and-rtl-direction-expected.txt:
- web-platform-tests/css/cssom-view/scrollIntoView-vertical-lr-writing-mode-expected.txt:
- web-platform-tests/css/cssom-view/scrollIntoView-vertical-rl-writing-mode-expected.txt:
Source/WebCore:
To determine which physical side to align we need to transform ScrollIntoViewOptions to scrollAlignment.
We'll translate the inline and block direction separately. The writing-mode will affect the block scrollAlignment.
While both writing-mode and CSS direction will affect the inline scrollAlignment. The argument for scrollRectToVisible
should be physical, so if !isHorizontalWritingMode(), we need to switch alignX and alignY.
For direction: rtl and writing-mode: horizontal-tb box, WebKit puts the scrollbar on the left side. The visible rect
starts from the right side of the scroll bar, so localExposeRect should also start from the right side of
scroll bar.
- dom/Element.cpp:
(WebCore::toScrollAlignmentForInlineDirection):
(WebCore::toScrollAlignmentForBlockDirection):
(WebCore::Element::scrollIntoView):
(WebCore::toScrollAlignment): Deleted.
- rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollRectToVisible):
LayoutTests:
- platform/ios-simulator-wk2/imported/w3c/web-platform-tests/css/cssom-view/scrollIntoView-horizontal-tb-writing-mode-and-rtl-direction-expected.txt: Removed.
Jul 8, 2019:
- 10:32 PM Changeset in webkit [247254] by
-
- 8 edits8 adds in trunk
[WHLSL Import 23 new JS reference spec tests
https://bugs.webkit.org/show_bug.cgi?id=199604
Reviewed by Myles C. Maxfield.
Source/WebCore:
This patch imports a bunch of JS reference spec tests on our way to
completing https://bugs.webkit.org/show_bug.cgi?id=199595
It also fixes the recursion checker phase. That phase had two bugs:
- We'd assert after visiting the function declaration that it was
still in the set. However, it will not be in the set when we actually
detect recursion.
- We would not visit the arguments to a call, so if they contained other
calls which were recursive, we would not detect such recursive calls.
Tests: webgpu/whlsl-int-literal-compare.html
webgpu/whlsl-simple-tests.html
webgpu/whlsl-type-mismatch.html
webgpu/whlsl-uint-bitwise.html
- Modules/webgpu/WHLSL/WHLSLRecursionChecker.cpp:
LayoutTests:
This moves some stuff down into whlsl-test-harness which are needed by
all tests. This also adds a new checkFail that ensures the program never
runs (e.g, it has a compile error).
- webgpu/js/whlsl-test-harness.js:
(async.checkFail):
(const.webGPUPromiseTest):
- webgpu/whlsl-bitwise-bool-ops-expected.txt:
- webgpu/whlsl-bitwise-bool-ops.html:
- webgpu/whlsl-int-literal-compare-expected.txt: Added.
- webgpu/whlsl-int-literal-compare.html: Added.
- webgpu/whlsl-simple-tests-expected.txt: Added.
- webgpu/whlsl-simple-tests.html: Added.
- webgpu/whlsl-type-mismatch-expected.txt: Added.
- webgpu/whlsl-type-mismatch.html: Added.
- webgpu/whlsl-uint-bitwise-expected.txt: Added.
- webgpu/whlsl-uint-bitwise.html: Added.
- 8:30 PM Changeset in webkit [247253] by
-
- 3 edits in trunk/Source/WebInspectorUI
Web Inspector: Debugger: special breakpoints and event targets should be sorted into separate "areas"
https://bugs.webkit.org/show_bug.cgi?id=199554
Reviewed by Joseph Pecoraro.
Move the special All Requests breakpoint down to be right above all other URL breakpoints.
Move thewindowobject tree element below other DOM node tree elements.
- UserInterface/Views/DebuggerSidebarPanel.js:
(WI.DebuggerSidebarPanel.prototype._addTreeElement):
- UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel.prototype._insertDebuggerTreeElement):
- 8:16 PM Changeset in webkit [247252] by
-
- 3 edits4 adds in trunk/Source/WebInspectorUI
Web Inspector: DOM Debugger: there should be different icons for each type of DOM breakpoint
https://bugs.webkit.org/show_bug.cgi?id=199552
Reviewed by Joseph Pecoraro.
[S] for Subtree Modified
[A] for Attribute Modified
[R] for Node Removed
- UserInterface/Views/DOMBreakpointTreeElement.js:
(WI.DOMBreakpointTreeElement):
- UserInterface/Views/DOMBreakpointTreeElement.css: Added.
(.breakpoint.dom.breakpoint-for-subtree-modified:not(.breakpoint-paused-icon) .icon):
(.breakpoint.dom.breakpoint-for-attribute-modified:not(.breakpoint-paused-icon) .icon):
(.breakpoint.dom.breakpoint-for-node-removed:not(.breakpoint-paused-icon) .icon):
- UserInterface/Main.html:
- UserInterface/Images/DOMBreakpointAttributeModified.svg: Added.
- UserInterface/Images/DOMBreakpointNodeRemoved.svg: Added.
- UserInterface/Images/DOMBreakpointSubtreeModified.svg: Added.
- 8:10 PM Changeset in webkit [247251] by
-
- 2 edits in trunk/LayoutTests
[iOS 13] paste-does-not-fire-promises-while-sanitizing-web-content.html times out when run with multiple iterations
https://bugs.webkit.org/show_bug.cgi?id=199597
Reviewed by Tim Horton.
Make this test more robust to work around bugs in iOS 13 that currently prevent some single tap gestures from
being recognized, due to conflicts with double tap gesture recognizers.
- Make both the subframe and editable element taller, so that they're easier to hit.
- Tap twice when attempting to trigger a paste, in hopes that at least one of the taps will be recognized as a
single click.
- Make several event listeners one-shot, to prevent the double tap gesture from triggering paste twice.
- editing/pasteboard/paste-does-not-fire-promises-while-sanitizing-web-content.html:
- 8:06 PM Changeset in webkit [247250] by
-
- 11 edits in trunk/Source/WebKit
Speculative fix for crashes under LocalStorageDatabaseTracker::databasePath()
https://bugs.webkit.org/show_bug.cgi?id=199599
<rdar://problem/31169686>
Reviewed by Ryosuke Niwa.
Speculative fix for crashes under LocalStorageDatabaseTracker::databasePath():
- Add new localStorageDirectory() getter to LocalStorageDatabaseTracker which calls isolatedCopy() on m_localStorageDirectory before returning it. Use it everywhere instead of m_localStorageDirectory since it is not safe to use the same String from various threads like it was done.
- Move localStorageDirectory when constructing the LocalStorageDatabaseTracker instead of copying it.
- Make sure that LocalStorageDatabaseTracker and StorageManager are both constructed and destroyed on the main thread.
- NetworkProcess/NetworkSession.cpp:
(WebKit::NetworkSession::NetworkSession):
- NetworkProcess/NetworkSession.h:
- NetworkProcess/WebStorage/LocalStorageDatabaseTracker.cpp:
(WebKit::LocalStorageDatabaseTracker::create):
(WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker):
(WebKit::LocalStorageDatabaseTracker::localStorageDirectory const):
(WebKit::LocalStorageDatabaseTracker::~LocalStorageDatabaseTracker):
(WebKit::LocalStorageDatabaseTracker::deleteAllDatabases):
(WebKit::LocalStorageDatabaseTracker::origins const):
(WebKit::LocalStorageDatabaseTracker::databasePath const):
- NetworkProcess/WebStorage/LocalStorageDatabaseTracker.h:
- NetworkProcess/WebStorage/StorageManager.cpp:
(WebKit::StorageManager::create):
(WebKit::StorageManager::StorageManager):
(WebKit::StorageManager::~StorageManager):
- NetworkProcess/WebStorage/StorageManager.h:
- NetworkProcess/WebStorage/ios/LocalStorageDatabaseTrackerIOS.mm:
(WebKit::LocalStorageDatabaseTracker::platformMaybeExcludeFromBackup const):
- NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
- NetworkProcess/curl/NetworkSessionCurl.cpp:
(WebKit::NetworkSessionCurl::NetworkSessionCurl):
- NetworkProcess/soup/NetworkSessionSoup.cpp:
(WebKit::NetworkSessionSoup::NetworkSessionSoup):
- 7:22 PM Changeset in webkit [247249] by
-
- 2 edits in trunk/Source/WebInspectorUI
Uncaught Exception: Unexpected enum value: CPU
https://bugs.webkit.org/show_bug.cgi?id=199564
Reviewed by Joseph Pecoraro.
- UserInterface/Controllers/TimelineManager.js:
(WI.TimelineManager.prototype._updateAutoCaptureInstruments):
Filter the list of auto-capture instruments based on what's actually supported, instead of
directly using the saved list from theWI.Setting.
- 7:19 PM Changeset in webkit [247248] by
-
- 2 edits in trunk/Source/WebInspectorUI
Enabling the Layers tab hides the paint flashing button
https://bugs.webkit.org/show_bug.cgi?id=199549
Reviewed by Joseph Pecoraro.
Still show the Compositing Borders and Paint Flashing navigation items in the Elements tab
even when the Layers tab is enabled (just like the Layers details sidebar).
- UserInterface/Views/DOMTreeContentView.js:
(WI.DOMTreeContentView.prototype.get navigationItems):
(WI.DOMTreeContentView.prototype._updateCompositingBordersButtonToMatchPageSettings):
- 7:18 PM Changeset in webkit [247247] by
-
- 10 edits in trunk
Enable Intl.PluralRules and Intl.NumberFormatToParts by default
https://bugs.webkit.org/show_bug.cgi?id=199288
Reviewed by Yusuke Suzuki.
Source/JavaScriptCore:
These features have been around for a while. We should turn them on by default.
- runtime/IntlNumberFormatPrototype.cpp:
(JSC::IntlNumberFormatPrototype::finishCreation):
- runtime/IntlObject.cpp:
(JSC::IntlObject::finishCreation): Deleted.
- runtime/IntlObject.h:
- runtime/Options.h:
LayoutTests:
Remove runtime flag from testing.
- js/intl-numberformat-format-to-parts.html:
- js/intl-pluralrules.html:
- js/script-tests/intl-numberformat-format-to-parts.js:
- js/script-tests/intl-pluralrules.js:
- 6:24 PM Changeset in webkit [247246] by
-
- 4 edits in trunk/Source/WebCore
YouTube embedding iframes in WebView sometimes go blank when the video starts playing
https://bugs.webkit.org/show_bug.cgi?id=199600
rdar://problem/47806012
Reviewed by Tim Horton.
With some combinations of nested iframes that are being resized from empty, and toggling into
compositing mode, we'd fail to update compositing in the iframe's enclosing document, so never
host the iframes's layers.
Fix by moving some widget-resize-related code into RenderLayerCompositor::widgetDidChangeSize(),
and adding code to schedule a compositing update.
I was unable to come up with a layout test for this.
- rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::widgetDidChangeSize):
- rendering/RenderLayerCompositor.h:
- rendering/RenderWidget.cpp:
(WebCore::RenderWidget::setWidgetGeometry):
- 6:07 PM Changeset in webkit [247245] by
-
- 3 edits in trunk/Source/WebKitLegacy/win
[WinCairo] ASSERTION FAILED: info.bmBitsPixel == 32 in createCairoContextWithHDC
https://bugs.webkit.org/show_bug.cgi?id=198323
Reviewed by Per Arne Vollan.
WebView::paint binds m_backingStoreBitmap to a DC by using
SelectObject. WebView::paint can be called recursively, but
m_backingStoreBitmap can't be bound to multiple DCs at the same
time. Then, SelectObject was failing in such case.
Call WebCore::Page::updateRendering before binding
m_backingStoreBitmap instead of after it.
Reverted r202744 change which won't be needed since this change.
- WebView.cpp:
(WebView::scrollBackingStore): Removed r202744's change.
(WebView::updateBackingStore): Removed m_page->updateRendering().
(WebView::paint): Do m_page->updateRendering() before binding m_backingStoreBitmap.
- WebView.h: Removed unused WebView::isPainting.
- 6:03 PM Changeset in webkit [247244] by
-
- 2 edits in trunk/Tools
JSTestGlobalObject.cpp of bindings-generation-tests is failing for Windows Python
https://bugs.webkit.org/show_bug.cgi?id=199487
Reviewed by Ross Kirsling.
In Windows Python, preprocessor.pm is using cl.exe. cl.exe was
failing to open testglobalscope_constructors_file which was
created by using tempfile.mkstemp() because it keeps the file
open. Use tempfile.mkdtemp() to create temporary files in the
temporary directory instead of tempfile.mkstemp().
- Scripts/webkitpy/bindings/main.py:
(BindingsTests.run_tests):
(BindingsTests.main):
(BindingsTests.close_and_remove): Deleted.
- 5:53 PM Changeset in webkit [247243] by
-
- 5 edits in trunk/Source
Use WeakHashSet for WebUserContentControllerProxy::m_processes
https://bugs.webkit.org/show_bug.cgi?id=199591
<rdar://problem/52798721>
Reviewed by Youenn Fablet.
Source/WebKit:
Use WeakHashSet for WebUserContentControllerProxy::m_processses for safety. In theory, a WebProcessProxy could
stay in the map if we failed to call WebProcessProxy::shutDown() before destroying it.
- UIProcess/UserContent/WebUserContentControllerProxy.cpp:
(WebKit::WebUserContentControllerProxy::~WebUserContentControllerProxy):
(WebKit::WebUserContentControllerProxy::addProcess):
(WebKit::WebUserContentControllerProxy::removeProcess):
(WebKit::WebUserContentControllerProxy::addUserContentWorldUse):
(WebKit::WebUserContentControllerProxy::removeUserContentWorldUses):
(WebKit::WebUserContentControllerProxy::addUserScript):
(WebKit::WebUserContentControllerProxy::removeUserScript):
(WebKit::WebUserContentControllerProxy::removeAllUserScripts):
(WebKit::WebUserContentControllerProxy::addUserStyleSheet):
(WebKit::WebUserContentControllerProxy::removeUserStyleSheet):
(WebKit::WebUserContentControllerProxy::removeAllUserStyleSheets):
(WebKit::WebUserContentControllerProxy::addUserScriptMessageHandler):
(WebKit::WebUserContentControllerProxy::removeUserMessageHandlerForName):
(WebKit::WebUserContentControllerProxy::removeAllUserMessageHandlers):
(WebKit::WebUserContentControllerProxy::addContentRuleList):
(WebKit::WebUserContentControllerProxy::removeContentRuleList):
(WebKit::WebUserContentControllerProxy::removeAllContentRuleLists):
- UIProcess/UserContent/WebUserContentControllerProxy.h:
(WebKit::WebUserContentControllerProxy::addNetworkProcess):
(WebKit::WebUserContentControllerProxy::removeNetworkProcess):
Source/WTF:
Update WeakHashSet::add() to return an AddResult type, similarly to our other containers.
- wtf/WeakHashSet.h:
(WTF::WeakHashSet::add):
- 5:35 PM Changeset in webkit [247242] by
-
- 2 edits in trunk/Tools
[ews-build] Add KillOldProcesses step before running API or Layout tests
https://bugs.webkit.org/show_bug.cgi?id=199592
Reviewed by Jonathan Bedard.
- BuildSlaveSupport/ews-build/factories.py:
- 5:27 PM Changeset in webkit [247241] by
-
- 2 edits in trunk/Source/WebInspectorUI
Web Inspector: REGRESSION: Elements: pasting in the Styles sidebar adds a text node to the DOM tree
https://bugs.webkit.org/show_bug.cgi?id=199588
Reviewed by Joseph Pecoraro.
- UserInterface/Base/Main.js:
(WI._paste):
Bail ifevent.defaultPrevented, as that means that something else has handled (and likely
overrode) this event.
- 5:03 PM Changeset in webkit [247240] by
-
- 4 edits in trunk/Source/WebInspectorUI
Web Inspector: the "x" in the Exception icon overlaps the border
https://bugs.webkit.org/show_bug.cgi?id=199553
Reviewed by Joseph Pecoraro.
- UserInterface/Images/Exception.svg:
- UserInterface/Images/Function.svg:
- UserInterface/Images/TailDeletedFunction.svg:
- 4:56 PM Changeset in webkit [247239] by
-
- 2 edits in trunk/Source/WebCore
Make Document::postTask() safe to call from a background thread
https://bugs.webkit.org/show_bug.cgi?id=199585
Reviewed by Alex Christensen.
Make Document::postTask() safe to call from a background thread by not calling makeWeakPtr() on the Document.
Calling makeWeakPtr() on a document from a background thread is not safe since Document is a main thread
object. Instead, capture Document::identifier() in the lambda and lookup the document from its identifier
once we're on the main thread.
- dom/Document.cpp:
(WebCore::Document::postTask):
- 4:51 PM Changeset in webkit [247238] by
-
- 3 edits in trunk/Source/WebCore
Hop explicitly to the main thread after generating a frame in ScreenDisplayCaptureSourceMac
https://bugs.webkit.org/show_bug.cgi?id=199581
Reviewed by Eric Carlson.
Instead of locking and setting the current frame from a background thread, hop to the main thread.
This also makes sure the weakThis check is done in the main thread.
Manually tested.
- platform/mediastream/mac/ScreenDisplayCaptureSourceMac.h:
(WebCore::ScreenDisplayCaptureSourceMac::DisplaySurface::DisplaySurface):
- platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:
(WebCore::ScreenDisplayCaptureSourceMac::createDisplayStream):
(WebCore::ScreenDisplayCaptureSourceMac::generateFrame):
(WebCore::ScreenDisplayCaptureSourceMac::newFrame):
(WebCore::ScreenDisplayCaptureSourceMac::frameAvailable): Deleted.
- 4:49 PM Changeset in webkit [247237] by
-
- 5 edits1 add in trunk/Source/WebInspectorUI
Web Inspector: Debugger: there should be a different icon for URL breakpoints
https://bugs.webkit.org/show_bug.cgi?id=199550
Reviewed by Joseph Pecoraro.
Use the same (down|up) arrow icon for the Network Tab and the Network timeline.
- UserInterface/Views/URLBreakpointTreeElement.js:
(WI.URLBreakpointTreeElement):
- UserInterface/Views/URLBreakpointTreeElement.css:
(.breakpoint.url:not(.breakpoint-paused-icon) .icon): Added.
- UserInterface/Views/DebuggerSidebarPanel.js:
(WI.DebuggerSidebarPanel.prototype._addBreakpoint):
- UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint):
- UserInterface/Images/URLBreakpoint.svg: Added.
- 4:35 PM Changeset in webkit [247236] by
-
- 1 copy in tags/Safari-607.3.9
Tag Safari-607.3.9.
- 4:34 PM Changeset in webkit [247235] by
-
- 3 edits in trunk/Source/WebInspectorUI
Web Inspector: Timelines: CPU: the Duration string isn't localized
https://bugs.webkit.org/show_bug.cgi?id=199582
<rdar://problem/51698165>
Reviewed by Joseph Pecoraro.
- UserInterface/Views/CPUTimelineView.js:
(WI.CPUTimelineView.prototype._layoutEnergyChart):
- Localizations/en.lproj/localizedStrings.js:
- 4:31 PM Changeset in webkit [247234] by
-
- 1 copy in tags/Safari-608.1.34.0.1
Tag Safari-608.1.34.0.1.
- 4:08 PM Changeset in webkit [247233] by
-
- 6 edits2 adds in trunk
[iOS] Support select all in non-editable element
https://bugs.webkit.org/show_bug.cgi?id=199257
<rdar://problem/52553667>
Reviewed by Wenson Hsieh.
Source/WebKit:
Unless we are populating the callout bar always advertise that WebKit can perform Select All
when building with USE(UIKIT_KEYBOARD_ADDITIONS). This way you can press Command + A to select
all text even in a non-editable element just like you can on Mac.
- UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView canPerformActionForWebView:withSender:]):
LayoutTests:
Add a test to ensure that we can perform Select All even when a non-editable element is focused.
Also disallow testing of Command + A until we fix <https://bugs.webkit.org/show_bug.cgi?id=199475>.
Otherwise, the test fast/events/ios/key-events-comprehensive/key-events-meta.html fails since
Command + A now triggers page selection even in a non-editable (the purpose of this change)
and hence Command + C also triggers the copy command. The triggering of these commands causes
the test to fail the Command + A and Command + C sub-tests since no keypress event is dispatched
for the key that triggered these key commands. This is expected, but Command + A should not have
triggered selection as key-tester.js calls preventDefault() from a keypress handler. That's
the bug. See <https://bugs.webkit.org/show_bug.cgi?id=199475> for more details.
- editing/selection/ios/select-all-non-editable-text-using-keyboard-expected.txt: Added.
- editing/selection/ios/select-all-non-editable-text-using-keyboard.html: Added.
- fast/events/ios/key-events-comprehensive/key-events-meta-expected.txt: Updated result.
- fast/events/ios/resources/key-tester.js: Disallow Command + A until we fix <https://bugs.webkit.org/show_bug.cgi?id=199475>.
- platform/ios/TestExpectations: Skip the test until the fix for <rdar://problem/48322899>
has shipped.
- 4:07 PM Changeset in webkit [247232] by
-
- 4 edits in trunk
Command + . generates Escape with key identifier Period, should be Escape
https://bugs.webkit.org/show_bug.cgi?id=199393
<rdar://problem/52498001>
Reviewed by Wenson Hsieh.
Source/WebCore:
Remap the key code for Command + . before we compute the Windows virtual key code.
Otherwise, the Windows virtual key code reveals the pre-mapped key code.
- platform/ios/WebEvent.mm:
(-[WebEvent initWithKeyEventType:timeStamp:characters:charactersIgnoringModifiers:modifiers:isRepeating:withFlags:withInputManagerHint:keyCode:isTabKey:]):
LayoutTests:
Update test result.
- fast/events/ios/key-events-comprehensive/key-events-meta-expected.txt:
- 3:59 PM Changeset in webkit [247231] by
-
- 2 edits in trunk/Source/WebCore
Prevent null dereferencing in SubresourceLoader::init's lambda
https://bugs.webkit.org/show_bug.cgi?id=199580
Reviewed by Ryosuke Niwa.
Crash logs indicate that sometimes m_documentLoader is null.
This is similar to https://bugs.webkit.org/show_bug.cgi?id=187360
- loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::init):
- 3:28 PM Changeset in webkit [247230] by
-
- 2 edits in trunk/Source/WebKit
Cleanup uses of NetworkProcess::m_sessionByConnection
https://bugs.webkit.org/show_bug.cgi?id=199586
Reviewed by Alex Christensen.
Avoid double HashMap lookups and call add() instead of ensure() when appropriate.
- NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::networkSessionByConnection const):
(WebKit::NetworkProcess::webPageWasAdded):
(WebKit::NetworkProcess::webProcessWasDisconnected):
- 1:51 PM Changeset in webkit [247229] by
-
- 33 edits in trunk/LayoutTests
[GTK] Some media fragment tests are flaky
https://bugs.webkit.org/show_bug.cgi?id=132248
Reviewed by Eric Carlson.
These tests look like they're flakey due to a small stop time. I'm
surmising that based on the bot's load, we step over the 0.5 mark
often. When I run this locally, despite running the fragment tests
100 times, I saw no timeouts.
I have seen crashes in the flakiness dashboard, but I would prefer
for these to have separate bugs so that we can squash them rather
than allowing them to linger. Having them expected to crash means
we have no crash logs to investigate.
Updated the baselines in the LayoutTests/ directory to reflect the
new stop time delta.
- media/media-fragments/media-fragments.js:
(pause): Increase stop delta, on simulator builds the stddev
crossed the 0.5s mark, and I suspect on GTK builds, our bots being
heavily loaded cause the majority of timeouts.
- platform/gtk/TestExpectations: Remove expectations.
- 12:57 PM Changeset in webkit [247228] by
-
- 3 edits in trunk/Tools
test-webkitpy: Explicitly use Python 2.7 lldb library
https://bugs.webkit.org/show_bug.cgi?id=199578
<rdar://problem/51853557>
Reviewed by Aakash Jain.
- Scripts/webkitpy/common/system/systemhost.py:
(SystemHost.path_to_lldb_python_directory): Explicitly use Python 2.7 lldb libary.
- Scripts/webkitpy/test/main.py:
(_supports_building_and_running_lldb_tests): Run lldb tests on Catalina again.
- 12:54 PM Changeset in webkit [247227] by
-
- 2 edits in trunk/Source/WebKit
WKWebView fails to render when another view uses CoreImage filters
https://bugs.webkit.org/show_bug.cgi?id=199488
<rdar://problem/52695825>
Reviewed by Dean Jackson.
- UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::layerHostingModeDidChange):
Update m_layerHostingMode when it changes, even if we can't message
the Web Content process. This ensures that the next time we launch
a Web Content process, WebPageCreationParameters will have the correct
layer hosting mode, and is the usual pattern for such things.
- 12:12 PM Changeset in webkit [247226] by
-
- 23 edits18 copies12 moves120 adds in trunk
Add test expectations and baselines for Catalina
https://bugs.webkit.org/show_bug.cgi?id=199328
Reviewed by Jonathan Bedard.
Tools:
- Scripts/webkitpy/port/mac.py:
(MacPort): Increment current version to 10.15 so that baseline search paths are correctly constructed for High Sierra.
LayoutTests:
- platfrom/mac/*: Adding Catalina test expectations and baselines.
- platform/mac-mojave/*: Migrating Mojave baselines from platform/mac directory.
- 12:09 PM Changeset in webkit [247225] by
-
- 5 edits in trunk
Implement MappedFileData for Windows
https://bugs.webkit.org/show_bug.cgi?id=198269
Reviewed by Darin Adler.
Source/WTF:
Original patch by Fujii Hironori.
Add Windows implementations for MappedFileData constructor and destructor.
- wtf/FileSystem.cpp:
- wtf/FileSystem.h:
- wtf/win/FileSystemWin.cpp:
Tools:
- TestWebKitAPI/PlatformWin.cmake:
- 12:08 PM Changeset in webkit [247224] by
-
- 1 edit in branches/safari-607-branch/Source/JavaScriptCore/runtime/RegExpInlines.h
Unreviewed build fix. rdar://problem/51349045
- 12:03 PM Changeset in webkit [247223] by
-
- 7 edits2 adds in trunk
[iPadOS] Viewport pops while loading sohu.com, xinhuanet.com, and various other websites
https://bugs.webkit.org/show_bug.cgi?id=199575
<rdar://problem/51842220>
Reviewed by Simon Fraser.
Source/WebKit:
Currently, the shrink-to-fit-content heuristic added to scale desktop sites fit within the viewport on iPadOS
only runs during two intervals: after document load, and after page load. On very script-heavy websites, this
may cause a visible jump, as rendering may commence well before the document is finished parsing.
To mitigate this, we move the first opportunity for the shrink-to-fit heuristic from after document, to right
after the page transition has completed (before we unfreeze the layer tree).
- WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
- WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didCompletePageTransition):
(WebKit::WebPage::didFinishDocumentLoad): Deleted.
Remove this didFinishDocumentLoad hook, which was only used to schedule the shrink-to-fit timer.
- WebProcess/WebPage/WebPage.h:
- WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::immediatelyShrinkToFitContent):
m_mainFrame might be null after page transition completes, so we need to ensure immediatelyShrinkToFitContent is
robust in this scenario.
LayoutTests:
Adjusts an existing layout test, and introduces a new test to verify that the shrink-to-fit heuristic is given a
chance to run before document load. See WebKit ChangeLog for more details.
- fast/viewport/ios/shrink-to-fit-content-before-document-load-expected.txt: Added.
- fast/viewport/ios/shrink-to-fit-content-before-document-load.html: Added.
- fast/viewport/ios/shrink-to-fit-content-temporary-overflow.html:
Tweak this layout test to add the temporarily overflowing element after document load.
- 11:59 AM Changeset in webkit [247222] by
-
- 5 edits2 adds in trunk
Unable to paste from Notes into Excel 365 spreadsheet
https://bugs.webkit.org/show_bug.cgi?id=199565
<rdar://problem/43615497>
Reviewed by Chris Dumez.
Source/WebCore:
When pasting into Microsoft Excel 365, the copied data is all inserted into a single cell, even when copying a
table. To understand why this happens, we first need to understand how Excel's logic for handling paste works.
When tapping on the "Paste" button, Excel performs and expects the following:
- Before triggering programmatic paste, move focus into a hidden contenteditable area specifically intended to
capture pasted content.
- Run a promise that resolves immediately; the promise callback restores focus to the originally focused
element prior to (1).
- Invoke programmatic paste using
document.execCommand("Paste"). - The callback scheduled in step (2) then runs, restoring focus to the main editable element representing a
table cell.
However, what ends up happening is this:
Steps (1)-(3): same as before.
- We (WebKit) create a temporary Page for the purposes of sanitizing copied web content before exposing it to
the paste handler. This involves creating and loading a document; when this is finished, we call into
Document::finishedParsing which flushes the microtask queue.
- This causes us to immediately run the microtask enqueued in step (2), which restores focus to the previously
focused element (importantly, this is not the element that was focused in step (1)).
- The paste commences, and inserts the sanitized fragment into the originally focused element rather than the
content editable area intended to capture pasted content.
Excel's script then gets confused, and does not end up using their special paste logic to handle the paste. The
pasted content is instead just inserted as plain text in a cell. To address this, we simply prevent document
load in the Page for web content sanitization from triggering a microtask checkpoint; this allows any scheduled
main thread microtasks to be deferred until the next turn of the runloop.
Test: editing/pasteboard/paste-does-not-fire-promises-while-sanitizing-web-content.html
- dom/Document.cpp:
(WebCore::Document::finishedParsing):
Don't immediately dispatch microtasks when we finish document parsing, in the case where the page is intended
only for web content sanitization, since this may end up executing script in the original document. As explained
above, this causes compatibility issues when pasting in Excel.
- editing/markup.cpp:
(WebCore::createPageForSanitizingWebContent):
When creating a page for sanitizing web content, mark it as such.
- page/Page.h:
Add a new flag to indicate that a Page is only intended for sanitizing web content.
(WebCore::Page::setIsForSanitizingWebContent):
(WebCore::Page::isForSanitizingWebContent const):
LayoutTests:
Add a test to verify that promises scheduled right before a programmatic paste resolve in the middle of the
paste, while creating a document for web content sanitization. See WebCore ChangeLog for more details.
- editing/pasteboard/paste-does-not-fire-promises-while-sanitizing-web-content-expected.txt: Added.
- editing/pasteboard/paste-does-not-fire-promises-while-sanitizing-web-content.html: Added.
- 11:55 AM Changeset in webkit [247221] by
-
- 4 edits in branches/safari-607-branch/Source/WebCore
Cherry-pick r246808. rdar://problem/52505041
Add didBecomePrototype() calls to global context prototypes
https://bugs.webkit.org/show_bug.cgi?id=199202
Reviewed by Mark Lam.
This fixes some crashes related to asserting that all prototypes
have been marked as such in JSC from
https://trac.webkit.org/changeset/246801. It's ok to call
didBecomePrototype here as we setting up the world state right now
so we won't be having a bad time.
We don't automatically call didBecomePrototype() for
setPrototypeWithoutTransition because existing objects may already
have this structure so it seems more reasonable to be explicit
there.
- bindings/js/JSWindowProxy.cpp: (WebCore::JSWindowProxy::setWindow):
- bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::initScript):
- worklets/WorkletScriptController.cpp: (WebCore::WorkletScriptController::initScriptWithSubclass):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246808 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 11:44 AM Changeset in webkit [247220] by
-
- 2 edits in trunk/Source/WebCore
Remove unused #include "ImageBufferData.h"
https://bugs.webkit.org/show_bug.cgi?id=199574
Reviewed by Michael Catanzaro.
- html/canvas/ImageBitmapRenderingContext.h:
- 11:38 AM Changeset in webkit [247219] by
-
- 11 edits in trunk/Source/WebCore
Fix thread safety issue in Database::scheduleTransactionCallback()
https://bugs.webkit.org/show_bug.cgi?id=199557
Reviewed by Alex Christensen.
I am working on adding threading assertions to WeakPtr and found a potentially
unsafe call to makeWeakPtr() on a Document from Database::scheduleTransactionCallback()
via Document::postTask(), on a background database thread. Document is a main thread
object and we should therefore not be interacting with it from a background thread.
For clarity, this patch also switches the webdatabase code to use Document instead
of ScriptExecution as type since it is only exposed to Window contexts, not workers.
- Modules/webdatabase/Database.cpp:
(WebCore::Database::Database):
(WebCore::Database::~Database):
(WebCore::Database::runTransaction):
(WebCore::Database::scheduleTransactionCallback):
(WebCore::Database::logErrorMessage):
(WebCore::Database::securityOrigin):
(WebCore::Database::didExceedQuota):
- Modules/webdatabase/Database.h:
(WebCore::Database::document):
- Modules/webdatabase/DatabaseContext.cpp:
(WebCore::DatabaseContext::DatabaseContext):
- Modules/webdatabase/DatabaseContext.h:
- Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::databaseContext):
(WebCore::logOpenDatabaseError):
(WebCore::DatabaseManager::openDatabaseBackend):
(WebCore::DatabaseManager::tryToOpenDatabaseBackend):
(WebCore::DatabaseManager::openDatabase):
(WebCore::DatabaseManager::hasOpenDatabases):
(WebCore::DatabaseManager::stopDatabases):
(WebCore::DatabaseManager::logErrorMessage):
- Modules/webdatabase/DatabaseManager.h:
- Modules/webdatabase/SQLStatement.cpp:
(WebCore::SQLStatement::SQLStatement):
- Modules/webdatabase/SQLTransaction.cpp:
(WebCore::SQLTransaction::SQLTransaction):
- inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didOpenDatabase):
- inspector/agents/InspectorDatabaseAgent.cpp:
(WebCore::InspectorDatabaseAgent::executeSQL):
- 11:26 AM Changeset in webkit [247218] by
-
- 15 edits in trunk/Source
Add threading assertion to WTF::CompletionHandler
https://bugs.webkit.org/show_bug.cgi?id=199516
Reviewed by Alex Christensen.
Source/WebCore:
Update some MessagePort-related code to use WTF::Function instead of WTF::CompletionHandler
since the callback is always called on the main thread, even when it was created on a
worker thread. Ideally, this code would be refactored so that the callback gets called on
the worker thread directly.
- dom/messageports/MessagePortChannel.cpp:
(WebCore::MessagePortChannel::checkRemotePortForActivity):
- dom/messageports/MessagePortChannel.h:
- dom/messageports/MessagePortChannelProvider.h:
- dom/messageports/MessagePortChannelProviderImpl.cpp:
(WebCore::MessagePortChannelProviderImpl::checkRemotePortForActivity):
- dom/messageports/MessagePortChannelProviderImpl.h:
- dom/messageports/MessagePortChannelRegistry.cpp:
(WebCore::MessagePortChannelRegistry::checkRemotePortForActivity):
- dom/messageports/MessagePortChannelRegistry.h:
Source/WebKit:
Update some MessagePort-related code to use WTF::Function instead of WTF::CompletionHandler
since the callback is always called on the main thread, even when it was created on a
worker thread. Ideally, this code would be refactored so that the callback gets called on
the worker thread directly.
- UIProcess/UIMessagePortChannelProvider.cpp:
(WebKit::UIMessagePortChannelProvider::checkRemotePortForActivity):
- UIProcess/UIMessagePortChannelProvider.h:
- WebProcess/WebCoreSupport/WebMessagePortChannelProvider.cpp:
(WebKit::WebMessagePortChannelProvider::checkRemotePortForActivity):
- WebProcess/WebCoreSupport/WebMessagePortChannelProvider.h:
Source/WTF:
Add threading assertion to WTF::CompletionHandler to try and catch common cases
of unsafe usage (completion handler constructed on one thread but called on
another).
- wtf/CompletionHandler.h:
(WTF::CompletionHandler<Out):
- 11:25 AM WebKitGTK/2.24.x edited by
- (diff)
- 11:19 AM Changeset in webkit [247217] by
-
- 4 edits in branches/safari-608.1.34.0-branch/Source/WebKit
Cherry-pick r247192. rdar://problem/52563665
AX: CrashTracer: com.apple.WebKit.WebContent at WebKit: WebKit::WebSpeechSynthesisClient::speak
https://bugs.webkit.org/show_bug.cgi?id=199435
Reviewed by Ryosuke Niwa.
Ensure we don't access null observers in speech callbacks.
- WebProcess/WebCoreSupport/WebSpeechSynthesisClient.cpp: (WebKit::WebSpeechSynthesisClient::voiceList): (WebKit::WebSpeechSynthesisClient::speak): (WebKit::WebSpeechSynthesisClient::pause): (WebKit::WebSpeechSynthesisClient::resume):
- WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::speakingErrorOccurred): (WebKit::WebPage::boundaryEventOccurred): (WebKit::WebPage::voicesDidChange):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 11:17 AM Changeset in webkit [247216] by
-
- 7 edits in branches/safari-608.1.34.0-branch/Source
Versioning.
- 11:16 AM Changeset in webkit [247215] by
-
- 4 edits1 add in trunk
REGRESSION(r243197): [GStreamer] Web process hangs when scrolling twitter timeline which contains HLS videos
https://bugs.webkit.org/show_bug.cgi?id=197558
Reviewed by Xabier Rodriguez-Calvar.
Source/WebCore:
Not covered, I have a test locally that would probably trigger the
deadlock if the network requests took a realistic amount of time,
but from a local webserver the window of time to hit this deadlock
is too narrow.
- platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webkit_web_src_init): Make the websrc start asynchronously, this
allows the main thread to be free to complete resource loader
setup.
(webKitWebSrcCreate): Calling start() from the create() vfunc is a
recipe for deadlock, since BaseSrc holds the streaming lock during
seeks, and then calls create(). In these cases, we do not want to
notify async-completion, since we've already completed from the
necessarily preceeding start() vfunc, and calling it again would
require the stream-lock and deadlock us.
(webKitWebSrcStart): Refactor to use webKitWebSrcMakeRequest, but
ensuring that we do perform an async-complete notification.
(webKitWebSrcMakeRequest): What Start() used to be, but now can be
toggled when to notify of async-completion. Start() no longer
blocks, since the return value of initiating a resource loader is
of no interest to the callers.
(webKitWebSrcCloseSession): Similarly to Start(), we do not need
to wait for the completion of cancelled net requests.
Tools:
On shutdown we can easily deadlock the web process if we don't
ensure all network operations are completed before comitting state
changes. In HLS, make sure the network operations are cancelled,
and also prevent hlsdemux's retry logic from scuppering our
efforts.
- gstreamer/jhbuild.modules: Include the patch.
- gstreamer/patches/gst-plugins-bad-do-not-retry-downloads-during-shutdown.patch: Added.
- 11:14 AM Changeset in webkit [247214] by
-
- 1 copy in branches/safari-608.1.34.0-branch
New branch.
- 11:14 AM Changeset in webkit [247213] by
-
- 5 edits in trunk
Unable to play videos on xfinity.com/stream on macOS Catalina
https://bugs.webkit.org/show_bug.cgi?id=199576
<rdar://problem/50101264>
Reviewed by Alex Christensen.
Source/WebCore:
Enable invalidate Fetch signal quirk for all sites as the blacklist is getting too large and
we are finding too much breakage too late in the release cycle.
- Modules/fetch/FetchRequest.cpp:
(WebCore::processInvalidSignal):
- page/Quirks.cpp:
(WebCore::Quirks::shouldIgnoreInvalidSignal const):
LayoutTests:
Rebaseline existing test.
- http/wpt/fetch/request-abort-expected.txt:
- 11:00 AM Changeset in webkit [247212] by
-
- 6 edits4 adds in trunk
[Pointer Events] "touch-action: none" does not prevent double-tap-to-zoom
https://bugs.webkit.org/show_bug.cgi?id=199571
<rdar://problem/51715002>
Reviewed by Wenson Hsieh.
Source/WebKit:
We add a new WKTouchActionGestureRecognizerDelegate method to check whether a gesture recognizer may lead to
zooming the page as a result of double-tapping, which can be caused by two different gesture recognizers
managed by WKContentViewInteraction. If that delegate method returns true and we have "touch-action: none"
set for this touch, we cause those gesture recognizers to fail and prevent double-tap-to-zoom behavior.
- UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView gestureRecognizerMayDoubleTapToZoomWebView:]):
- UIProcess/ios/WKTouchActionGestureRecognizer.h:
- UIProcess/ios/WKTouchActionGestureRecognizer.mm:
(-[WKTouchActionGestureRecognizer canPreventGestureRecognizer:]):
LayoutTests:
Add two new tests that check that setting "touch-action: none" on an element does not allow double-tap-to-zoom
and that "touch-action: manipulation" allows it.
- pointerevents/ios/touch-action-manipulation-double-tap-to-zoom-expected.txt: Added.
- pointerevents/ios/touch-action-manipulation-double-tap-to-zoom.html: Added.
- pointerevents/ios/touch-action-none-double-tap-to-zoom-expected.txt: Added.
- pointerevents/ios/touch-action-none-double-tap-to-zoom.html: Added.
- pointerevents/utils.js:
(const.ui.new.UIController.prototype.doubleTapToZoom):
- 10:46 AM Changeset in webkit [247211] by
-
- 8 edits in trunk/Source/WebCore
MediaStreamTrackPrivate should always call readyStateChanged on the main thread
https://bugs.webkit.org/show_bug.cgi?id=199538
<rdar://problem/52709106>
Reviewed by Eric Carlson.
MediaStreamTrackPrivate is sometimes calling readyStateChanged in a
background thread inside its audioSamplesAvailable method.
Instead of doing that, we hop to the main thread to call readyStateChanged.
Once the call is made in the main thread, MediaStreamTrackPrivate will
send the audio samples to its observers.
To make mock audio source closer to real capture audio sources,
audioSamplesAvailable is called on a background thread.
RealtimeMediaSource is updated to always be destroyed in the main
run loop since it is WebKit2 only.
Covered by existing tests and making sure the mock audio source calls
the audioSamplesAvailable method on a background thread.
- platform/mediastream/MediaStreamTrackPrivate.cpp:
(WebCore::MediaStreamTrackPrivate::videoSampleAvailable):
(WebCore::MediaStreamTrackPrivate::audioSamplesAvailable):
- platform/mediastream/MediaStreamTrackPrivate.h:
- platform/mediastream/RealtimeMediaSource.cpp:
(WebCore::RealtimeMediaSource::scheduleDeferredTask):
scheduleDeferredTask may be called from a background thread.
It is thus safer to ref the source instead of creating a weak pointer.
- platform/mediastream/RealtimeMediaSource.h:
- platform/mediastream/mac/MockRealtimeAudioSourceMac.mm:
(WebCore::MockRealtimeAudioSourceMac::MockRealtimeAudioSourceMac):
(WebCore::MockRealtimeAudioSourceMac::emitSampleBuffers):
(WebCore::MockRealtimeAudioSourceMac::reconfigure):
(WebCore::MockRealtimeAudioSourceMac::render):
(WebCore::MockRealtimeAudioSourceMac::settingsDidChange):
- platform/mock/MockRealtimeAudioSource.cpp:
(WebCore::MockRealtimeAudioSource::MockRealtimeAudioSource):
(WebCore::MockRealtimeAudioSource::tick):
- platform/mock/MockRealtimeAudioSource.h:
- 9:51 AM Changeset in webkit [247210] by
-
- 2 edits in trunk/Source/WebKit
[iOS] WebContent processes should not globally allow mach lookup to the AX server.
https://bugs.webkit.org/show_bug.cgi?id=199386
<rdar://problem/52487468>
Reviewed by Chris Fleizach.
Instead, a mach extension for this service should be issued to the WebContent process. This has already been implemented.
- Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
- 9:40 AM Changeset in webkit [247209] by
-
- 2 edits in trunk/Source/WebKit
REGRESSION(r246671): [WPE][GTK] Crash in NetworkProcess since the DNS cache landed
https://bugs.webkit.org/show_bug.cgi?id=199572
Reviewed by Michael Catanzaro.
The GError coming from the wrapped resolver shouldn't be freed,
but passed onto the caller.
- NetworkProcess/glib/WebKitCachedResolver.cpp:
(webkitCachedResolverLookupByNameAsync):
(webkitCachedResolverLookupByNameWithFlagsAsync):
- 9:25 AM Changeset in webkit [247208] by
-
- 3 edits in trunk/Source/WebCore
Register a MediaStreamTrack as media producer only if it is a capture track
https://bugs.webkit.org/show_bug.cgi?id=199566
Reviewed by Eric Carlson.
MediaStreamTrack registration as a media producer is only useful for capture tracks.
Otherwise, the audio/video playing state is computed through HTMLMediaElement.
Do not register MediaStreamTrack as a media producer if it is not a capture track.
Set the muted state of the track before registering it as an audio
producer. Otherwise, it might create unnecessary small change of playing state.
Covered by existing tests.
- Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::MediaStreamTrack):
(WebCore::MediaStreamTrack::~MediaStreamTrack):
- Modules/mediastream/MediaStreamTrack.h:
- 4:47 AM Changeset in webkit [247207] by
-
- 3 edits in trunk/LayoutTests
[GStreamer] media/video-volume.html broken after switching from cubic to linear scaling
https://bugs.webkit.org/show_bug.cgi?id=199505
Reviewed by Xabier Rodriguez-Calvar.
PulseAudio has a conversion process from volume's in
double-precision to uint32_t volumes. Depending on the environment
can introduce rounding errors. Be more lenient in our comparison
code.
- media/video-volume-expected.txt: Update baseline
- media/video-volume.html: Compare volume values within a
reasonable tolerance.
- 4:26 AM Changeset in webkit [247206] by
-
- 3 edits in trunk/Source/WebKit
[Pointer Events] touch-action should affect the behavior of pinch-to-zoom to show tabs in Safari
https://bugs.webkit.org/show_bug.cgi?id=199560
<rdar://problem/52742265>
Reviewed by Dean Jackson.
There are other UIPinchGestureRecognizer objects that may lead to pinch-to-zoom behavior, for instance pinching
out to show open tabs in Safari on iOS. We add a new WKUIDelegatePrivate method that will allow Safari to indicate
that a UIPinchGestureRecognizer considered for prevention would lead to pinch-to-zoom behavior.
- UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
- UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView gestureRecognizerMayPinchToZoomWebView:]):
- 4:22 AM Changeset in webkit [247205] by
-
- 20 edits1 copy in trunk
[Pointer Events] Enable only on the most recent version of the supported iOS family
https://bugs.webkit.org/show_bug.cgi?id=199562
<rdar://problem/52766511>
Reviewed by Dean Jackson.
Source/JavaScriptCore:
- Configurations/FeatureDefines.xcconfig:
Source/WebCore:
- Configurations/FeatureDefines.xcconfig:
Source/WebCore/PAL:
- Configurations/FeatureDefines.xcconfig:
Source/WebKit:
- Configurations/FeatureDefines.xcconfig:
- UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView cancelPointersForGestureRecognizer:]):
(-[WKContentView activeTouchIdentifierForGestureRecognizer:]):
(-[WKContentView touchActionActiveTouches]):
- UIProcess/ios/WKSyntheticTapGestureRecognizer.m:
(-[WKSyntheticTapGestureRecognizer touchesEnded:withEvent:]):
- UIProcess/ios/WKTouchActionGestureRecognizer.h:
- UIProcess/ios/WKTouchActionGestureRecognizer.mm:
(-[WKTouchActionGestureRecognizer canPreventGestureRecognizer:]):
Source/WebKitLegacy/mac:
- Configurations/FeatureDefines.xcconfig:
Source/WTF:
We really don't need HAVE_UI_WEB_TOUCH_EVENTS_GESTURE_RECOGNIZER_WITH_ACTIVE_TOUCHES_BY_ID since the UIKit SPI
that was added in iOS 13 that it's checking for is really required for all parts of the implementation of Pointer
Events, including dispatch of the "pointercancel" event and support for the "touch-action" CSS property.
- wtf/Platform.h:
Tools:
- TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
LayoutTests:
- js/dom/navigator-maxtouchpoints-expected.txt: Since ENABLE_POINTER_EVENTS is now disabled by default, navigator.maxTouchPoints
is "undefined" in thed default case.
- platform/mac/js/dom/navigator-maxtouchpoints-expected.txt: But 0 on macOS.
- 3:08 AM Changeset in webkit [247204] by
-
- 2 edits in trunk/Source/WebCore
[GStreamer] The CREATE_TRACK macro is messed up
https://bugs.webkit.org/show_bug.cgi?id=199356
Reviewed by Xabier Rodriguez-Calvar.
- platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::updateTracks): Fix the
CREATE_TRACK macro for !VIDEO_TRACK builds.
- 1:17 AM Changeset in webkit [247203] by
-
- 2 edits in trunk/Source/WebKit
[GTK] ViewGestureController constructor leaves m_direction uninitialized
https://bugs.webkit.org/show_bug.cgi?id=199532
Reviewed by Carlos Garcia Campos.
This is harmless because it should never be read until after it's initialized, but still not
robust. Fix it by assuming Back as the default value until the first swipe begins.
- UIProcess/ViewGestureController.h:
Jul 7, 2019:
- 10:07 PM Changeset in webkit [247202] by
-
- 5 edits in branches/safari-607-branch/Source/JavaScriptCore
Cherry-pick r246801. rdar://problem/52505041
Structure::create should call didBecomePrototype()
https://bugs.webkit.org/show_bug.cgi?id=196315
Reviewed by Filip Pizlo.
Structure::create should also assert that the indexing type makes sense
for the prototype being used.
- runtime/JSObject.h:
- runtime/Structure.cpp: (JSC::Structure::isValidPrototype): (JSC::Structure::changePrototypeTransition):
- runtime/Structure.h: (JSC::Structure::create): Deleted.
- runtime/StructureInlines.h: (JSC::Structure::create): (JSC::Structure::setPrototypeWithoutTransition):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246801 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 10:03 PM Changeset in webkit [247201] by
-
- 7 edits in branches/safari-607-branch/Source
Versioning.
- 7:52 AM Changeset in webkit [247200] by
-
- 7 edits4 adds in trunk
[ContentChangeObserver] Difficult to control videos on iqiyi.com as the actions are mouse hover
https://bugs.webkit.org/show_bug.cgi?id=199542
<rdar://problem/51886813>
Reviewed by Simon Fraser.
Source/WebCore:
Decouple isVisuallyHidden and isConsideredVisible. Just because an element is not visually hidden (1px wide content)
it is not necessarily qualified to be visible in the context of hover heuristic (e.g. iqiyi.com brings up a 1px wide
clickable element when hovering over the scrubber. This element is clearly not designed to be actionable.)
Tests: fast/events/touch/ios/content-observation/tap-on-1px-height-content.html
fast/events/touch/ios/content-observation/tap-on-1px-width-content.html
- dom/Node.cpp:
(WebCore::Node::defaultEventHandler):
- page/ios/ContentChangeObserver.cpp:
(WebCore::ContentChangeObserver::isVisuallyHidden):
(WebCore::ContentChangeObserver::isConsideredVisible):
(WebCore::ContentChangeObserver::didAddTransition):
(WebCore::ContentChangeObserver::didFinishTransition):
(WebCore::ContentChangeObserver::willDestroyRenderer):
(WebCore::ContentChangeObserver::StyleChangeScope::StyleChangeScope):
(WebCore::ContentChangeObserver::StyleChangeScope::~StyleChangeScope):
(WebCore::ContentChangeObserver::isConsideredHidden): Deleted.
- page/ios/ContentChangeObserver.h:
Source/WebKit:
- WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::handleSyntheticClick):
LayoutTests:
- fast/events/touch/ios/content-observation/tap-on-1px-height-content-expected.txt: Added.
- fast/events/touch/ios/content-observation/tap-on-1px-height-content.html: Added.
- fast/events/touch/ios/content-observation/tap-on-1px-width-content-expected.txt: Added.
- fast/events/touch/ios/content-observation/tap-on-1px-width-content.html: Added.
- 6:49 AM Changeset in webkit [247199] by
-
- 3 edits in trunk/Source/WebCore
[LFC][IFC] Introduce splitPosition to LineLayout
https://bugs.webkit.org/show_bug.cgi?id=199558
<rdar://problem/52737649>
Reviewed by Antti Koivisto.
This is in preparation for breaking runs at line end.
- layout/inlineformatting/InlineFormattingContext.h:
- layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
(WebCore::Layout::InlineFormattingContext::LineLayout::LineInput::LineInput):
(WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const):
(WebCore::Layout::InlineFormattingContext::LineLayout::layout const):
(WebCore::Layout::InlineFormattingContext::LineLayout::computedIntrinsicWidth const):
- 6:47 AM Changeset in webkit [247198] by
-
- 6 edits in trunk/Source/WebCore
[LFC] Fix formatting context root for inflow positioned inline containers
https://bugs.webkit.org/show_bug.cgi?id=199551
<rdar://problem/52728868>
Reviewed by Antti Koivisto.
Relatively positioned (inflow) inline container lives in the formatting context where its parent lives unless
the parent establishes a formatting context. This is slightly different from the usual behavior which is containing block driven.
div id=outer style="position: absolute">><div id=inner><span style="position: relative">content</span></div></div>
While the relatively positioned inline container (span) is placed relative to its containing block "outer", it lives in the inline formatting context established by "inner".
- layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const):
- layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::formattingContextRoot const):
- layout/layouttree/LayoutBox.h:
- layout/layouttree/LayoutInlineContainer.cpp:
(WebCore::Layout::InlineContainer::formattingContextRoot const):
- layout/layouttree/LayoutInlineContainer.h:
- 1:12 AM Changeset in webkit [247197] by
-
- 5 edits2 adds in trunk/Source/WebKit
[Pointer Events] Use a gesture recognizer to prevent pinch-to-zoom behavior
https://bugs.webkit.org/show_bug.cgi?id=199543
Reviewed by Dean Jackson.
We used to set the "enabled" property on the main UIScrollView's UIPinchGestureRecognizer to disable pinch-to-zoom
behavior based on the "touch-action" CSS property. This was sub-optimal since this gesture recognizer can be publicly
accessible by third-party developers, but also because it set state instead of a run-time solution.
We now introduce a new WKTouchActionGestureRecognizer dedicated to preventing clearly identified gesture recognizers
from being recognized to disable some built-in behavior. As a new touch starts, we record the computed touch-action
property for the given touch identifier on the WKTouchActionGestureRecognizer, then WKTouchActionGestureRecognizer
determines, by implementing -[canPreventGestureRecognizer:], whether the possibly-prevented gesture recognizer
is known to lead to a pinch-to-zoom behavior and whether it contains a touch that should prevent it.
To support the WKTouchActionGestureRecognizer, WKContentViewInteraction implements the new WKTouchActionGestureRecognizerDelegate
protocol to indicate whether the possibly-prevented gesture recognizer is the main UIScrollView's UIPinchGestureRecognizer.
No new test since this changes the implementation of existing behavior.
- SourcesCocoa.txt:
- UIProcess/ios/WKContentViewInteraction.h:
- UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
(-[WKContentView cleanupInteraction]):
(-[WKContentView _removeDefaultGestureRecognizers]):
(-[WKContentView _addDefaultGestureRecognizers]):
(-[WKContentView _handleTouchActionsForTouchEvent:]):
(-[WKContentView gestureRecognizerMayPinchToZoomWebView:]):
(-[WKContentView touchActionActiveTouches]):
- UIProcess/ios/WKTouchActionGestureRecognizer.h: Added.
- UIProcess/ios/WKTouchActionGestureRecognizer.mm: Added.
(-[WKTouchActionGestureRecognizer initWithTouchActionDelegate:]):
(-[WKTouchActionGestureRecognizer setTouchActions:forTouchIdentifier:]):
(-[WKTouchActionGestureRecognizer clearTouchActionsForTouchIdentifier:]):
(-[WKTouchActionGestureRecognizer touchesBegan:withEvent:]):
(-[WKTouchActionGestureRecognizer touchesMoved:withEvent:]):
(-[WKTouchActionGestureRecognizer touchesEnded:withEvent:]):
(-[WKTouchActionGestureRecognizer touchesCancelled:withEvent:]):
(-[WKTouchActionGestureRecognizer _updateState]):
(-[WKTouchActionGestureRecognizer canBePreventedByGestureRecognizer:]):
(-[WKTouchActionGestureRecognizer canPreventGestureRecognizer:]):
- WebKit.xcodeproj/project.pbxproj:
Jul 6, 2019:
- 7:09 PM Changeset in webkit [247196] by
-
- 2 edits in trunk/Source/WebInspectorUI
Web Inspector: Styles: unbalanced quotes and parenthesis aren't displayed as property closed after editing values
https://bugs.webkit.org/show_bug.cgi?id=199090
<rdar://problem/51965431>
Reviewed by Devin Rousso.
}gets added by WI.tokenizeCSSValue (called by SpreadsheetStyleProperty.prototype._renderValue)
when it encounters unbalanced quotes. Fix unbalanced quotes by re-rendering the value from the model,
not the DOM content.
- UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit):
For consistency, render property name from the model as well.
- 5:20 PM Changeset in webkit [247195] by
-
- 5 edits in trunk
Long hang when loading a cnn.com page on iOS
https://bugs.webkit.org/show_bug.cgi?id=199556
Reviewed by Zalan Bujtas.
Source/WebCore:
Loading https://edition.cnn.com/travel/article/brussels-airlines-flight-to-nowhere/index.html in the iOS 13 sim
results in a long hang under OverlapMapContainer::append(). We were creating pathological clipping scopes with
thousands of entries, because OverlapMapContainer::mergeClippingScopesRecursive() had a logic error where
it added 'sourceScope' to the child instead of 'sourceChildScope'. Add a new assertion to detect that case.
I wasn't able to create a testcase that caused a hang, but a number of existing tests would have
hit the assertion.
- rendering/LayerOverlapMap.cpp:
(WebCore::OverlapMapContainer::ClippingScope::addChild):
(WebCore::OverlapMapContainer::mergeClippingScopesRecursive):
- rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::flushPendingLayerChanges): Drive-by fix: m_overflowControlsHostLayer is null on iOS, so use rootGraphicsLayer().
Tools:
Add code to load a page by default in MobileMiniBrowser so it's easy to hack it
to load a test page of your choice.
- MobileMiniBrowser/MobileMiniBrowserFramework/WebViewController.m:
(-[WebViewController viewDidLoad]):
- 6:34 AM Changeset in webkit [247194] by
-
- 5 edits1 add in trunk
switch(String) needs to check for exceptions when resolving the string
https://bugs.webkit.org/show_bug.cgi?id=199541
Reviewed by Mark Lam.
JSTests:
New tests.
- stress/switch-string-oom.js: Added.
(test):
(testLowerTiers):
(testFTL):
Source/JavaScriptCore:
Added exception checks for resolved Strings in switch processing for all tiers.
- dfg/DFGOperations.cpp:
- jit/JITOperations.cpp:
- llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
- 4:03 AM Changeset in webkit [247193] by
-
- 78 edits64 adds in trunk/LayoutTests
Import css/cssom-view testcases from WPT.
https://bugs.webkit.org/show_bug.cgi?id=199509
Patch by Cathie Chen <cathiechen> on 2019-07-06
Reviewed by Frédéric Wang.
LayoutTests/imported/w3c:
- resources/import-expectations.json:
- web-platform-tests/css/cssom-view/CaretPosition-001.html:
- web-platform-tests/css/cssom-view/DOMRectList.html:
- web-platform-tests/css/cssom-view/GetBoundingRect.html:
- web-platform-tests/css/cssom-view/HTMLBody-ScrollArea_quirksmode.html:
- web-platform-tests/css/cssom-view/MediaQueryList-001.html:
- web-platform-tests/css/cssom-view/MediaQueryList-with-empty-string.html:
- web-platform-tests/css/cssom-view/Screen-pixelDepth-Screen-colorDepth001.html:
- web-platform-tests/css/cssom-view/cssom-getBoundingClientRect-001.html:
- web-platform-tests/css/cssom-view/cssom-getBoundingClientRect-002.html:
- web-platform-tests/css/cssom-view/cssom-getBoxQuads-001.html:
- web-platform-tests/css/cssom-view/cssom-getClientRects-002.html:
- web-platform-tests/css/cssom-view/cssom-getClientRects.html:
- web-platform-tests/css/cssom-view/cssom-view-img-attributes-001.html:
- web-platform-tests/css/cssom-view/cssom-view-window-screen-interface.html:
- web-platform-tests/css/cssom-view/dom-element-scroll.html:
- web-platform-tests/css/cssom-view/elementFromPoint-001.html:
- web-platform-tests/css/cssom-view/elementFromPoint-002.html:
- web-platform-tests/css/cssom-view/elementFromPoint-003.html:
- web-platform-tests/css/cssom-view/elementFromPoint-dynamic-anon-box.html:
- web-platform-tests/css/cssom-view/elementFromPoint-mixed-font-sizes.html:
- web-platform-tests/css/cssom-view/elementFromPoint-parameters.html:
- web-platform-tests/css/cssom-view/elementFromPoint-subpixel-expected.txt: Added.
- web-platform-tests/css/cssom-view/elementFromPoint-subpixel.html: Added.
- web-platform-tests/css/cssom-view/elementFromPoint.html:
- web-platform-tests/css/cssom-view/elementFromPosition.html:
- web-platform-tests/css/cssom-view/elementScroll-002.html:
- web-platform-tests/css/cssom-view/elementScroll.html:
- web-platform-tests/css/cssom-view/elementsFromPoint-iframes.html:
- web-platform-tests/css/cssom-view/elementsFromPoint-inline-htb-ltr-expected.txt: Added.
- web-platform-tests/css/cssom-view/elementsFromPoint-inline-htb-ltr.html: Added.
- web-platform-tests/css/cssom-view/elementsFromPoint-inline-htb-rtl-expected.txt: Added.
- web-platform-tests/css/cssom-view/elementsFromPoint-inline-htb-rtl.html: Added.
- web-platform-tests/css/cssom-view/elementsFromPoint-inline-vlr-ltr-expected.txt: Added.
- web-platform-tests/css/cssom-view/elementsFromPoint-inline-vlr-ltr.html: Added.
- web-platform-tests/css/cssom-view/elementsFromPoint-inline-vlr-rtl-expected.txt: Added.
- web-platform-tests/css/cssom-view/elementsFromPoint-inline-vlr-rtl.html: Added.
- web-platform-tests/css/cssom-view/elementsFromPoint-inline-vrl-ltr-expected.txt: Added.
- web-platform-tests/css/cssom-view/elementsFromPoint-inline-vrl-ltr.html: Added.
- web-platform-tests/css/cssom-view/elementsFromPoint-inline-vrl-rtl-expected.txt: Added.
- web-platform-tests/css/cssom-view/elementsFromPoint-inline-vrl-rtl.html: Added.
- web-platform-tests/css/cssom-view/elementsFromPoint-invalid-cases.html:
- web-platform-tests/css/cssom-view/elementsFromPoint-shadowroot.html:
- web-platform-tests/css/cssom-view/elementsFromPoint-simple.html:
- web-platform-tests/css/cssom-view/elementsFromPoint-svg-text.html:
- web-platform-tests/css/cssom-view/elementsFromPoint-svg.html:
- web-platform-tests/css/cssom-view/elementsFromPoint-table.html:
- web-platform-tests/css/cssom-view/elementsFromPoint.html:
- web-platform-tests/css/cssom-view/getClientRects-br-htb-ltr-expected.txt: Added.
- web-platform-tests/css/cssom-view/getClientRects-br-htb-ltr.html: Added.
- web-platform-tests/css/cssom-view/getClientRects-br-htb-rtl-expected.txt: Added.
- web-platform-tests/css/cssom-view/getClientRects-br-htb-rtl.html: Added.
- web-platform-tests/css/cssom-view/getClientRects-br-vlr-ltr-expected.txt: Added.
- web-platform-tests/css/cssom-view/getClientRects-br-vlr-ltr.html: Added.
- web-platform-tests/css/cssom-view/getClientRects-br-vlr-rtl-expected.txt: Added.
- web-platform-tests/css/cssom-view/getClientRects-br-vlr-rtl.html: Added.
- web-platform-tests/css/cssom-view/getClientRects-br-vrl-ltr-expected.txt: Added.
- web-platform-tests/css/cssom-view/getClientRects-br-vrl-ltr.html: Added.
- web-platform-tests/css/cssom-view/getClientRects-br-vrl-rtl-expected.txt: Added.
- web-platform-tests/css/cssom-view/getClientRects-br-vrl-rtl.html: Added.
- web-platform-tests/css/cssom-view/getClientRects-inline-expected.html: Added.
- web-platform-tests/css/cssom-view/getClientRects-inline.html: Added.
- web-platform-tests/css/cssom-view/historical.html:
- web-platform-tests/css/cssom-view/htmlelement-offset-width-001.html:
- web-platform-tests/css/cssom-view/inheritance-expected.txt: Added.
- web-platform-tests/css/cssom-view/inheritance.html: Added.
- web-platform-tests/css/cssom-view/interfaces.html:
- web-platform-tests/css/cssom-view/long_scroll_composited-expected.html: Added.
- web-platform-tests/css/cssom-view/long_scroll_composited.html: Added.
- web-platform-tests/css/cssom-view/matchMedia-display-none-iframe-expected.txt: Added.
- web-platform-tests/css/cssom-view/matchMedia-display-none-iframe.html: Added.
- web-platform-tests/css/cssom-view/matchMedia.xht:
- web-platform-tests/css/cssom-view/matchMediaAddListener.html:
- web-platform-tests/css/cssom-view/mouseEvent.html:
- web-platform-tests/css/cssom-view/negativeMargins.html:
- web-platform-tests/css/cssom-view/offsetParent_element_test.html:
- web-platform-tests/css/cssom-view/offsetTopLeft-empty-inline-expected.txt: Added.
- web-platform-tests/css/cssom-view/offsetTopLeft-empty-inline-offset-expected.txt: Added.
- web-platform-tests/css/cssom-view/offsetTopLeft-empty-inline-offset.html: Added.
- web-platform-tests/css/cssom-view/offsetTopLeft-empty-inline.html: Added.
- web-platform-tests/css/cssom-view/offsetTopLeft-inline-expected.html: Added.
- web-platform-tests/css/cssom-view/offsetTopLeft-inline.html: Added.
- web-platform-tests/css/cssom-view/offsetTopLeft-leading-space-inline-expected.txt: Added.
- web-platform-tests/css/cssom-view/offsetTopLeft-leading-space-inline.html: Added.
- web-platform-tests/css/cssom-view/offsetTopLeft-trailing-space-inline-expected.txt: Added.
- web-platform-tests/css/cssom-view/offsetTopLeft-trailing-space-inline.html: Added.
- web-platform-tests/css/cssom-view/offsetTopLeftInScrollableParent.html:
- web-platform-tests/css/cssom-view/outer-svg-expected.txt: Added.
- web-platform-tests/css/cssom-view/outer-svg.html: Added.
- web-platform-tests/css/cssom-view/resize-event-on-initial-layout-expected.txt: Added.
- web-platform-tests/css/cssom-view/resize-event-on-initial-layout.html: Added.
- web-platform-tests/css/cssom-view/screenLeftTop-expected.txt: Added.
- web-platform-tests/css/cssom-view/screenLeftTop.html: Added.
- web-platform-tests/css/cssom-view/scroll-behavior-default-css.html:
- web-platform-tests/css/cssom-view/scroll-behavior-element.html:
- web-platform-tests/css/cssom-view/scroll-behavior-main-frame-root.html:
- web-platform-tests/css/cssom-view/scroll-behavior-main-frame-window.html:
- web-platform-tests/css/cssom-view/scroll-behavior-scrollintoview-nested.html:
- web-platform-tests/css/cssom-view/scroll-behavior-smooth-positions.html:
- web-platform-tests/css/cssom-view/scroll-behavior-smooth.html:
- web-platform-tests/css/cssom-view/scroll-behavior-subframe-root.html:
- web-platform-tests/css/cssom-view/scroll-behavior-subframe-window.html:
- web-platform-tests/css/cssom-view/scroll-no-layout-box.html:
- web-platform-tests/css/cssom-view/scrollIntoView-horizontal-tb-writing-mode-and-rtl-direction-expected.txt: Added.
- web-platform-tests/css/cssom-view/scrollIntoView-horizontal-tb-writing-mode-and-rtl-direction.html: Added.
- web-platform-tests/css/cssom-view/scrollIntoView-horizontal-tb-writing-mode-expected.txt: Added.
- web-platform-tests/css/cssom-view/scrollIntoView-horizontal-tb-writing-mode.html: Added.
- web-platform-tests/css/cssom-view/scrollIntoView-scrollMargin.html:
- web-platform-tests/css/cssom-view/scrollIntoView-scrollPadding.html:
- web-platform-tests/css/cssom-view/scrollIntoView-shadow.html:
- web-platform-tests/css/cssom-view/scrollIntoView-smooth.html:
- web-platform-tests/css/cssom-view/scrollIntoView-svg-shape-expected.txt: Added.
- web-platform-tests/css/cssom-view/scrollIntoView-svg-shape.html: Added.
- web-platform-tests/css/cssom-view/scrollIntoView-vertical-lr-writing-mode-and-rtl-direction-expected.txt: Added.
- web-platform-tests/css/cssom-view/scrollIntoView-vertical-lr-writing-mode-and-rtl-direction.html: Added.
- web-platform-tests/css/cssom-view/scrollIntoView-vertical-lr-writing-mode-expected.txt: Added.
- web-platform-tests/css/cssom-view/scrollIntoView-vertical-lr-writing-mode.html: Added.
- web-platform-tests/css/cssom-view/scrollIntoView-vertical-rl-writing-mode-expected.txt:
- web-platform-tests/css/cssom-view/scrollIntoView-vertical-rl-writing-mode.html:
- web-platform-tests/css/cssom-view/scrollWidthHeight.xht:
- web-platform-tests/css/cssom-view/scrollWidthHeightWhenNotScrollable.xht:
- web-platform-tests/css/cssom-view/scrolling-no-browsing-context.html:
- web-platform-tests/css/cssom-view/scrolling-quirks-vs-nonquirks.html:
- web-platform-tests/css/cssom-view/scrollingElement.html:
- web-platform-tests/css/cssom-view/scrollintoview.html:
- web-platform-tests/css/cssom-view/table-client-props.html:
- web-platform-tests/css/cssom-view/table-offset-props.html:
- web-platform-tests/css/cssom-view/table-scroll-props.html:
- web-platform-tests/css/cssom-view/ttwf-js-cssomview-getclientrects-length.html:
- web-platform-tests/css/cssom-view/w3c-import.log:
- web-platform-tests/css/cssom-view/window-screen-height-immutable.html:
- web-platform-tests/css/cssom-view/window-screen-height.html:
- web-platform-tests/css/cssom-view/window-screen-width-immutable.html:
- web-platform-tests/css/cssom-view/window-screen-width.html:
LayoutTests:
- TestExpectations:
- platform/ios-simulator-wk2/imported/w3c/web-platform-tests/css/cssom-view/offsetTopLeft-empty-inline-expected.txt: Added.
- platform/ios-simulator-wk2/imported/w3c/web-platform-tests/css/cssom-view/offsetTopLeft-leading-space-inline-expected.txt: Added.
- platform/ios-simulator-wk2/imported/w3c/web-platform-tests/css/cssom-view/scrollIntoView-horizontal-tb-writing-mode-and-rtl-direction-expected.txt: Added.
- tests-options.json:
- 1:14 AM Changeset in webkit [247192] by
-
- 4 edits in trunk/Source/WebKit
AX: CrashTracer: com.apple.WebKit.WebContent at WebKit: WebKit::WebSpeechSynthesisClient::speak
https://bugs.webkit.org/show_bug.cgi?id=199435
Reviewed by Ryosuke Niwa.
Ensure we don't access null observers in speech callbacks.
- WebProcess/WebCoreSupport/WebSpeechSynthesisClient.cpp:
(WebKit::WebSpeechSynthesisClient::voiceList):
(WebKit::WebSpeechSynthesisClient::speak):
(WebKit::WebSpeechSynthesisClient::pause):
(WebKit::WebSpeechSynthesisClient::resume):
- WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::speakingErrorOccurred):
(WebKit::WebPage::boundaryEventOccurred):
(WebKit::WebPage::voicesDidChange):