Timeline
Dec 12, 2018:
- 11:13 PM Changeset in webkit [239153] by
-
- 34 edits6 adds in trunk
[JSC] Optimize Object.keys by caching own keys results in StructureRareData
https://bugs.webkit.org/show_bug.cgi?id=190047
Reviewed by Keith Miller.
JSTests:
- stress/object-keys-cached-zero.js: Added.
(shouldBe):
(test):
- stress/object-keys-changed-attribute.js: Added.
(shouldBe):
(test):
- stress/object-keys-changed-index.js: Added.
(shouldBe):
(test):
- stress/object-keys-changed.js: Added.
(shouldBe):
(test):
- stress/object-keys-indexed-non-cache.js: Added.
(shouldBe):
(test):
- stress/object-keys-overrides-get-property-names.js: Added.
(shouldBe):
(test):
(noInline):
Source/JavaScriptCore:
Object.keys is one of the most frequently used function in web-tooling-benchmarks (WTB).
Object.keys is dominant in lebab of WTB, and frequently called in babel and others.
Since our Structure knows the shape of JSObject, we can cache the result of Object.keys
in Structure (StructureRareData) as we cache JSPropertyNameEnumerator in StructureRareData.
This patch caches the result of Object.keys in StructureRareData. The cached array is created
as JSImmutableButterfly. And Object.keys creates CoW from this data. Currently, the lifetime
strategy of this JSImmutableButterfly is the same to cached JSPropertyNameEnumerator. It is
referenced from Structure, and collected when Structure is collected.
This improves several benchmarks in SixSpeed.
baseline patched
object-assign.es5 350.1710+-3.6303 226.0368+-4.7558 definitely 1.5492x faster
for-of-object.es6 269.1941+-3.3430 127.9317+-2.3875 definitely 2.1042x faster
And it improves WTB lebab by 11.8%.
Before: lebab: 6.10 runs/s
After: lebab: 6.82 runs/s
- dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
- dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
- dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
- dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):
- dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
- dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
- dfg/DFGNode.cpp:
(JSC::DFG::Node::convertToNewArrayBuffer):
- dfg/DFGNode.h:
- dfg/DFGNodeType.h:
- dfg/DFGOperations.cpp:
- dfg/DFGOperations.h:
- dfg/DFGPredictionPropagationPhase.cpp:
- dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
- dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileObjectKeys):
- dfg/DFGSpeculativeJIT.h:
- dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
- dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
- ftl/FTLAbstractHeapRepository.h:
- ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
- ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileObjectKeys):
- runtime/Intrinsic.cpp:
(JSC::intrinsicName):
- runtime/Intrinsic.h:
- runtime/JSImmutableButterfly.h:
(JSC::JSImmutableButterfly::createSentinel):
- runtime/ObjectConstructor.cpp:
(JSC::ownPropertyKeys):
- runtime/Structure.cpp:
(JSC::Structure::canCachePropertyNameEnumerator const):
- runtime/Structure.h:
- runtime/StructureInlines.h:
(JSC::Structure::setCachedOwnKeys):
(JSC::Structure::cachedOwnKeys const):
(JSC::Structure::canCacheOwnKeys const):
- runtime/StructureRareData.cpp:
(JSC::StructureRareData::visitChildren):
(JSC::StructureRareData::cachedPropertyNameEnumerator const): Deleted.
(JSC::StructureRareData::setCachedPropertyNameEnumerator): Deleted.
- runtime/StructureRareData.h:
- runtime/StructureRareDataInlines.h:
(JSC::StructureRareData::cachedPropertyNameEnumerator const):
(JSC::StructureRareData::setCachedPropertyNameEnumerator):
(JSC::StructureRareData::cachedOwnKeys const):
(JSC::StructureRareData::cachedOwnKeysConcurrently const):
(JSC::StructureRareData::setCachedOwnKeys):
(JSC::StructureRareData::previousID const): Deleted.
- runtime/VM.cpp:
(JSC::VM::VM):
- runtime/VM.h:
- 10:51 PM Changeset in webkit [239152] by
-
- 3 edits in trunk/Source/WebKitLegacy/win
[Win][Clang][WebKitLegacy] warning: expected a qualified name after 'typename' of COMEnumVariant and COMPropertyBag
https://bugs.webkit.org/show_bug.cgi?id=192617
Reviewed by Alex Christensen.
- COMEnumVariant.h:
(COMEnumVariant<ContainerType>::adopt): Removed 'typename' from non dependent names.
(COMEnumVariant<ContainerType>::createInstance): Ditto.
(COMEnumVariant<ContainerType>::Next): Prepend 'typename' for dependent names.
- COMPropertyBag.h:
(HashType>::createInstance): Removed 'typename' from non dependent names.
(HashType>::adopt): Ditto.
(HashType>::Read): Replaced dependent name 'HashMapType::const_iterator' with 'auto'.
(HashType>::GetPropertyInfo): Ditto.
- 10:44 PM Changeset in webkit [239151] by
-
- 65 edits in trunk
[Win][Clang][WebKitLegacy] WebFrame.cpp: warning: delete called on non-final 'WebFrame' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
https://bugs.webkit.org/show_bug.cgi?id=192618
Reviewed by Alex Christensen.
Source/WebCore:
No new tests, no behavior changes.
- platform/win/PopupMenuWin.h:
- platform/win/WCDataObject.cpp:
- platform/win/WCDataObject.h:
Source/WebKitLegacy/win:
Classes which implement COM interface usually doesn't need the
virtual destructor because it has Release() virtual method to
destruct itself.
Marked 'final' such classes to suppress clang-cl's compilation
warnings.
- COMEnumVariant.h:
- COMPropertyBag.h:
- DefaultDownloadDelegate.h:
- DefaultPolicyDelegate.h:
- MemoryStream.h:
- WebActionPropertyBag.h:
- WebApplicationCache.h:
- WebArchive.h:
- WebBackForwardList.h:
- WebCache.h:
- WebCoreStatistics.h:
- WebCoreSupport/WebEditorClient.cpp:
- WebCoreSupport/WebInspectorDelegate.h:
- WebDataSource.h:
- WebDatabaseManager.cpp:
- WebDatabaseManager.h:
- WebDownload.h:
- WebDropSource.h:
- WebElementPropertyBag.h:
- WebError.h:
- WebFrame.cpp:
- WebFrame.h:
- WebFramePolicyListener.h:
- WebGeolocationPolicyListener.h:
- WebGeolocationPosition.h:
- WebHTMLRepresentation.h:
- WebHistory.h:
- WebHistoryItem.h:
- WebInspector.h:
- WebJavaScriptCollector.h:
- WebKitClassFactory.h:
- WebKitMessageLoop.h:
- WebKitStatistics.h:
- WebMutableURLRequest.h:
- WebNavigationData.h:
- WebNotification.h:
- WebNotificationCenter.h:
- WebPreferences.h:
- WebResource.h:
- WebScriptWorld.h:
- WebSecurityOrigin.h:
- WebSerializedJSValue.h:
- WebTextRenderer.h:
- WebURLAuthenticationChallenge.h:
- WebURLAuthenticationChallengeSender.h:
- WebURLCredential.h:
- WebURLProtectionSpace.h:
- WebURLResponse.h:
- WebUserContentURLPattern.h:
- WebView.cpp:
- WebView.h:
- WebWorkersPrivate.h:
Tools:
- DumpRenderTree/win/DRTDataObject.cpp:
- DumpRenderTree/win/DRTDataObject.h:
- DumpRenderTree/win/DRTDesktopNotificationPresenter.h:
- DumpRenderTree/win/DRTDropSource.h:
- DumpRenderTree/win/EditingDelegate.h:
- DumpRenderTree/win/PolicyDelegate.h:
- DumpRenderTree/win/UIDelegate.h:
- 8:46 PM Changeset in webkit [239150] by
-
- 3 edits2 adds in trunk
REGRESSION (r238090): CAPCHA UI jumps to the wrong location
https://bugs.webkit.org/show_bug.cgi?id=192651
rdar://problem/46531919
Reviewed by Zalan Bujtas.
Source/WebCore:
When a RenderLayer becomes non-composited because of a style change, we need to set a dirty
bit to say that descendants need their geometry updated (because they now have to
compute their positions relative to a different ancestor). This wasn't happening
in the layerStyleChanged() code path.
In the code path that did do this correctly (in the computeCompositingRequirements() tree walk),
we can address a FIXME and only dirty direct children, not all descendants (that code was
written before the child-only dirty bit existed).
Test: compositing/geometry/update-child-geometry-on-compositing-change.html
- rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::layerStyleChanged):
LayoutTests:
Testcase that makes an intermediate layer non-composited (but still a RenderLayer).
- compositing/geometry/update-child-geometry-on-compositing-change-expected.html: Added.
- compositing/geometry/update-child-geometry-on-compositing-change.html: Added.
- 7:54 PM Changeset in webkit [239149] by
-
- 10 edits in trunk
Make TextInputController.legacyAttributedString take DOM nodes and offsets
https://bugs.webkit.org/show_bug.cgi?id=192653
Reviewed by Wenson Hsieh.
Source/WebCore:
No new tests since there should be no observable behavioral change other than
TextInputController API in DumpRenderTree.
- editing/cocoa/HTMLConverter.h:
- editing/cocoa/HTMLConverter.mm:
(WebCore::attributedStringFromSelection):
(WebCore::attributedStringBetweenStartAndEnd): Added.
Source/WebKitLegacy/mac:
- WebView/WebHTMLView.mm:
(-[WebHTMLView _legacyAttributedStringFrom:offset:to:offset:]):
Tools:
Updated TextInputController.legacyAttributedString to take DOM nodes and offsets instead of
a DOM Range object in preparation to add layout tests for HTMLConverter which crosses
shadow boundaries.
- DumpRenderTree/mac/TextInputControllerMac.m:
(+[TextInputController isSelectorExcludedFromWebScript:]): Updated the selector signature.
(+[TextInputController webScriptNameForSelector:]): Ditto.
(-[TextInputController legacyAttributedString:offset:to:offset:]): Made this function take
start node and offset then end node and offset pairs.
LayoutTests:
Updated the tests per API change.
- editing/mac/attributed-string/attribute-string-for-copy-with-color-filter.html:
- editing/mac/attributed-string/resources/dump-attributed-string.js:
(dumpAttributedString):
- 7:21 PM Changeset in webkit [239148] by
-
- 4 edits in trunk/Source/WebKit
[meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
https://bugs.webkit.org/show_bug.cgi?id=192449
<rdar://problem/46595508>
Reviewed by Darin Adler.
Part 5: Files in WebProcess folder.
- WebProcess/Cache/WebCacheStorageConnection.cpp:
- WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:
(mediaTimeToCurrentTime):
(-[WKAnimationDelegate initWithLayerID:layerTreeHost:]):
- WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
(-[WKAccessibilityWebPageObject accessibilityHitTest:]):
- 7:15 PM Changeset in webkit [239147] by
-
- 2 edits in trunk/Source/WebCore
Fix macOS builds after r239145.
- platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
- 6:35 PM Changeset in webkit [239146] by
-
- 4 edits4 adds in trunk
REGRESSION (r238357): Pins on Yelp map disappear
https://bugs.webkit.org/show_bug.cgi?id=192597
rdar://problem/46578285
Reviewed by Zalan Bujtas.
Source/WebCore:
RenderLayerCompositor::updateBackingAndHierarchy() had a bug where if a RenderLayer gained
a negative z-order child (triggering creation of a foreground layer), we'd fail to
call the "setChildren()" with the vector containing that foreground layer.
When updateBackingAndHierarchy() stops visiting descendants because none are composited,
it may still have to update the child list with the foreground layer, so make sure
the code handles this case.
Tests: compositing/z-order/add-negative-z-child.html
compositing/z-order/rebuild-sibling-of-layer-with-foreground-layer.html
- rendering/RenderLayer.cpp:
(WebCore::outputPaintOrderTreeRecursive):
- rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateBackingAndHierarchy):
LayoutTests:
Add tests that toggle negative z-index on a child, with and without sibling compositing layers.
- compositing/z-order/add-negative-z-child-expected.html: Added.
- compositing/z-order/add-negative-z-child.html: Added.
- compositing/z-order/rebuild-sibling-of-layer-with-foreground-layer-expected.html: Added.
- compositing/z-order/rebuild-sibling-of-layer-with-foreground-layer.html: Added.
- 6:34 PM Changeset in webkit [239145] by
-
- 15 edits2 copies5 adds in trunk
Implement non-timeslice mode encoding for MediaRecorder
https://bugs.webkit.org/show_bug.cgi?id=192069
<rdar://problem/46443290>
Patch by YUHAN WU <yuhan_wu@apple.com> on 2018-12-12
Reviewed by Eric Carlson.
Source/WebCore:
Implement the encoding for non-timeslice mode of MediaRecorder.
It only supports to record MP4 file through H264 and AAC encoding, we will need to support more MIME types and encoding methods.
Add a API in internals to allow testings to turn on the mock source.
Test: http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable.html
- Modules/mediarecorder/MediaRecorder.cpp:
(WebCore::MediaRecorder::create):
(WebCore::MediaRecorder::setCustomPrivateRecorderCreator):
(WebCore::MediaRecorder::getPrivateImpl):
(WebCore::MediaRecorder::MediaRecorder):
(WebCore::MediaRecorder::stopRecording):
(WebCore::MediaRecorder::stopRecordingInternal):
(WebCore::MediaRecorder::createRecordingDataBlob):
(WebCore::MediaRecorder::scheduleDeferredTask):
- Modules/mediarecorder/MediaRecorder.h:
- Modules/mediarecorder/MediaRecorder.idl:
- SourcesCocoa.txt:
- WebCore.xcodeproj/project.pbxproj:
- platform/mediarecorder/MediaRecorderPrivate.h:
(WebCore::MediaRecorderPrivate::stopRecording):
- platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp: Added.
(WebCore::MediaRecorderPrivateAVFImpl::create):
(WebCore::MediaRecorderPrivateAVFImpl::MediaRecorderPrivateAVFImpl):
(WebCore::MediaRecorderPrivateAVFImpl::sampleBufferUpdated):
(WebCore::MediaRecorderPrivateAVFImpl::audioSamplesAvailable):
(WebCore::MediaRecorderPrivateAVFImpl::stopRecording):
(WebCore::MediaRecorderPrivateAVFImpl::fetchData):
(WebCore::MediaRecorderPrivateAVFImpl::mimeType):
- platform/mediarecorder/MediaRecorderPrivateAVFImpl.h: Added.
- platform/mediarecorder/MediaRecorderPrivateMock.cpp:
(WebCore::MediaRecorderPrivateMock::fetchData):
(WebCore::MediaRecorderPrivateMock::mimeType):
- platform/mediarecorder/MediaRecorderPrivateMock.h:
- platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h: added.
- platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm: Added.
(WebCore::MediaRecorderPrivateWriter::clear):
(WebCore::MediaRecorderPrivateWriter::setupWriter):
(WebCore::MediaRecorderPrivateWriter::setVideoInput):
(WebCore::MediaRecorderPrivateWriter::setAudioInput):
(WebCore::copySampleBufferWithCurrentTimeStamp):
(WebCore::MediaRecorderPrivateWriter::appendVideoSampleBuffer):
(WebCore::MediaRecorderPrivateWriter::appendAudioSampleBuffer):
(WebCore::MediaRecorderPrivateWriter::stopRecording):
- testing/Internals.cpp:
(WebCore::createRecorderMockSource):
(WebCore::Internals::setCustomPrivateRecorderCreator):
- testing/Internals.h:
- testing/Internals.idl:
LayoutTests:
Create new tests for encoding of MediaRecorder. Check if the produced video and audio are correct.
Add code to turn on the mock source of MediaRecorder for the two old tests because the real source is enabled by default.
- http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable-expected.txt: Added.
- http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable.html: Added.
- http/wpt/mediarecorder/MediaRecorder-dataavailable.html:
- http/wpt/mediarecorder/MediaRecorder-mock-dataavailable.html:
- 6:28 PM Changeset in webkit [239144] by
-
- 2 edits in trunk/Source/WebKit
[MSVC] Unreviewed build fix for r239080.
- UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFailToSuspendAfterProcessSwap):
- 6:19 PM Changeset in webkit [239143] by
-
- 8 edits in trunk/Source/WebKit
[meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
https://bugs.webkit.org/show_bug.cgi?id=192449
<rdar://problem/46595508>
Reviewed by Darin Adler.
Part 4: Handling NetworkProcess folder.
- NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:
- NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp:
- NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
- NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
- NetworkProcess/ios/NetworkProcessIOS.mm:
- NetworkProcess/mac/NetworkProcessMac.mm:
- NetworkProcess/mac/RemoteNetworkingContext.mm:
- 6:09 PM Changeset in webkit [239142] by
-
- 21 edits4 adds in trunk
[DFG][FTL] Add NewSymbol
https://bugs.webkit.org/show_bug.cgi?id=192620
Reviewed by Saam Barati.
JSTests:
- microbenchmarks/symbol-creation.js: Added.
(test):
- stress/symbol-description-identity.js: Added.
(shouldBe):
(test):
- stress/symbol-identity.js: Added.
(shouldBe):
(test):
- stress/symbol-with-description-throw-error.js: Added.
(shouldBe):
(shouldThrow):
(test):
(object.toString):
Source/JavaScriptCore:
This patch introduces NewSymbol DFG node into DFG and FTL tiers. The main goal of this patch is not optimize
NewSymbol code faster. Rather than that, this patch intends to offer SpecSymbol type information into DFG's
data flow to optimize generated code in FTL backend.
We add NewSymbol DFG node, which may take an argument. If an argument is not given, NewSymbol is for
Symbol().
If an argument is given, ToString is emitted to this argument before passing it to NewSymbol. So NewSymbol node
itself does not perform any type checks. ToString performs effects, but NewSymbol doesn't have any side observable
effects. So we can decouple Symbol(description) call into NewSymbol(ToString(description)).
- dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
- dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleConstantInternalFunction):
- dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
- dfg/DFGClobbersExitState.cpp:
(JSC::DFG::clobbersExitState):
- dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
- dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
- dfg/DFGMayExit.cpp:
- dfg/DFGNodeType.h:
- dfg/DFGOperations.cpp:
- dfg/DFGOperations.h:
- dfg/DFGPredictionPropagationPhase.cpp:
- dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
- dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileNewSymbol):
- dfg/DFGSpeculativeJIT.h:
- dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
- dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
- dfg/DFGStoreBarrierInsertionPhase.cpp:
- ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
- ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileNewSymbol):
- 6:01 PM Changeset in webkit [239141] by
-
- 5 edits3 adds in trunk
[BigInt] Implement DFG/FTL typeof for BigInt
https://bugs.webkit.org/show_bug.cgi?id=192619
Reviewed by Keith Miller.
JSTests:
- stress/big-int-boolean-proven-type.js: Added.
(assert):
(bool):
- stress/big-int-type-of-proven-type-non-constant-including-symbol.js: Added.
(assert):
(typeOf):
(i.switch):
- stress/big-int-type-of-proven-type-non-constant.js: Added.
(assert):
(typeOf):
- stress/big-int-type-of.js:
(typeOf):
(func):
Source/JavaScriptCore:
This patch implements typeof for BigInt in DFG and FTL. Our DFG and FTL tiers now correctly consider about BigInt
in the code generated for typeof.
- ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::boolify): We add (SpecCell - SpecString) type filter for proven type since isString
check is already performed here.
(JSC::FTL::DFG::LowerDFGToB3::buildTypeOf): We use (SpecCell - SpecObject - SpecString) type filter for proven type
since String and Object are already checked here. If we know the proven type does not include Symbol type here, we
can omit the code for Symbol type.
- jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::emitTypeOf):
- 5:32 PM Changeset in webkit [239140] by
-
- 2 edits in trunk/Source/WebKit
[meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
https://bugs.webkit.org/show_bug.cgi?id=192449
<rdar://problem/46595508>
Reviewed by Tim Horton.
Fix iosmac build.
- UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _hoverGestureRecognizerChanged:]):
- 5:26 PM Changeset in webkit [239139] by
-
- 28 edits13 copies2 moves3 adds in trunk
[WebGPU] Vertex buffers and WebGPUInputState
https://bugs.webkit.org/show_bug.cgi?id=192611
Reviewed by Dean Jackson.
Source/WebCore:
Test: webgpu/vertex-buffer-triangle-strip.html
Basic implementation of vertex buffers with Metal shading language in WebGPU. In
WebGPURenderPipelineDescriptor, refactor to match updated shader stage structure and add
WebGPUInputStateDescriptor. Also implement WebGPURenderPassEncoder::setVertexBuffers.
Add symbols and files for WebGPUIndexFormat, WebGPUInputStateDescriptor, WebGPUInputStepMode,
WebGPUVertexAttributeDescriptor, WebGPUVertexFormat, WebGPUVertexInputDescriptor:
- CMakeLists.txt:
- DerivedSources.make:
- Sources.txt:
- WebCore.xcodeproj/project.pbxproj:
- bindings/js/WebCoreBuiltinNames.h:
Add and implement interfaces and dictionaries for WebGPUInputState:
- Modules/webgpu/WebGPUBuffer.cpp:
(WebCore::WebGPUBuffer::WebGPUBuffer):
- Modules/webgpu/WebGPUBuffer.h:
(WebCore::WebGPUBuffer::buffer const): Added getter for backing GPUBuffer.
- Modules/webgpu/WebGPUBufferDescriptor.h:
- Modules/webgpu/WebGPUBufferDescriptor.idl: Moving WebGPUBufferUsage out into its own IDL.
- Modules/webgpu/WebGPUDevice.h:
- Modules/webgpu/WebGPUIndexFormat.h: Added.
- Modules/webgpu/WebGPUIndexFormat.idl: Added.
- Modules/webgpu/WebGPUInputStateDescriptor.h: Added.
- Modules/webgpu/WebGPUInputStateDescriptor.idl: Added.
- Modules/webgpu/WebGPUInputStepMode.h: Added.
- Modules/webgpu/WebGPUInputStepMode.idl: Added.
- Modules/webgpu/WebGPUVertexAttributeDescriptor.h: Added.
- Modules/webgpu/WebGPUVertexAttributeDescriptor.idl: Added.
- Modules/webgpu/WebGPUVertexFormat.h: Added.
- Modules/webgpu/WebGPUVertexFormat.idl: Added.
- Modules/webgpu/WebGPUVertexInputDescriptor.h: Added.
- Modules/webgpu/WebGPUVertexInputDescriptor.idl: Added.
- platform/graphics/gpu/GPUInputStateDescriptor.h: Added.
- platform/graphics/gpu/GPURenderPassEncoder.h: Added.
- platform/graphics/gpu/GPURenderPipelineDescriptor.h: Added.
- platform/graphics/gpu/GPUVertexAttributeDescriptor.h: Added.
- platform/graphics/gpu/GPUVertexInputDescriptor.h: Added.
Refactor to support updated structure of pipeline descriptor in sketch IDL:
- Modules/webgpu/WebGPUDevice.cpp:
(WebCore::validateAndConvertPipelineStage):
(WebCore::WebGPUDevice::createRenderPipeline const):
- Modules/webgpu/WebGPUPipelineDescriptorBase.h:
- Modules/webgpu/WebGPUPipelineDescriptorBase.idl:
- Modules/webgpu/WebGPUPipelineStageDescriptor.h:
- Modules/webgpu/WebGPUPipelineStageDescriptor.idl:
- Modules/webgpu/WebGPURenderPipelineDescriptor.h:
- Modules/webgpu/WebGPURenderPipelineDescriptor.idl:
- Modules/webgpu/WebGPUShaderStage.*: Removed.
Add and implement setVertexBuffers:
- Modules/webgpu/WebGPURenderPassEncoder.cpp:
(WebCore::WebGPURenderPassEncoder::setVertexBuffers): Added.
- Modules/webgpu/WebGPURenderPassEncoder.h:
- Modules/webgpu/WebGPURenderPassEncoder.idl:
- platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
(WebCore::GPURenderPassEncoder::setVertexBuffers):
- platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
(WebCore::setInputStateForPipelineDescriptor):
(WebCore::GPURenderPipeline::create):
LayoutTests:
Added variation of simple-triangle-strip to use a vertex buffer. Refactored aforementioned
test to share code with new test.
- webgpu/js/basic-webgpu-functions.js:
(setUpPipelineDescriptor):
- webgpu/js/webgpu-functions.js: Added.
(async.getBasicDevice):
(createBasicContext):
(createBasicPipeline):
(beginBasicRenderPass):
- webgpu/render-pipelines-expected.txt:
- webgpu/render-pipelines.html:
- webgpu/simple-triangle-strip.html:
- webgpu/vertex-buffer-triangle-strip-expected.html: Added.
- webgpu/vertex-buffer-triangle-strip.html: Added.
- 5:23 PM Changeset in webkit [239138] by
-
- 2 edits1 move6 adds1 delete in trunk/LayoutTests
REGRESSION: [ MacOS iOS ] Layout Test http/wpt/resource-timing/rt-revalidate-requests.html is flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=191207
<rdar://problem/45818891>
Patch by Joseph Pecoraro <Joseph Pecoraro> on 2018-12-12
Reviewed by Devin Rousso.
Splitting this test up into separate tests eliminated flakiness
and timeouts for my system that would occasionally encounter them.
Remove expectation for the test now that splitting up eliminated flakiness so far.
- http/wpt/resource-timing/resources/rt-revalidate-utilities.sub.js
Common code for the split out tests.
- http/wpt/resource-timing/rt-revalidate-requests-1-expected.txt: Added.
- http/wpt/resource-timing/rt-revalidate-requests-1.html: Added.
- http/wpt/resource-timing/rt-revalidate-requests-2-expected.txt: Added.
- http/wpt/resource-timing/rt-revalidate-requests-2.html: Added.
- http/wpt/resource-timing/rt-revalidate-requests-3-expected.txt: Added.
- http/wpt/resource-timing/rt-revalidate-requests-3.html: Added.
- http/wpt/resource-timing/rt-revalidate-requests.html: Removed.
- http/wpt/resource-timing/rt-revalidate-requests-expected.txt: Removed.
Split out into separate tests.
- 5:19 PM Changeset in webkit [239137] by
-
- 5 edits in trunk/LayoutTests
[Mojave Release Wk2] Layout Test http/tests/cache/disk-cache/disk-cache-validation-attachment.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=190323
<rdar://problem/45056253>
Reviewed by Youenn Fablet.
- http/tests/cache/disk-cache/disk-cache-validation-attachment-expected.txt:
- http/tests/cache/disk-cache/disk-cache-validation-attachment.html:
Simplify test a bit to only test the header combinations it cares about.
- http/tests/cache/disk-cache/resources/cache-test.js:
(runTestsNow):
(runTests):
The flakiness was due to logic in CachedResourceLoader::determineRevalidationPolicy() which more aggressively
reuses cached resources (bypassing freshness checks) until the load event has fired. This means that the
test would give different results depending on whether or not the load event had a chance to fire before
we do the checks. To address the issue, update runTests() to wait for the load event if it has not yet
fired. This will likely address flakiness in other disk-cache tests as well.
- platform/mac-wk2/TestExpectations:
Unskip test that is no longer flaky.
- 5:13 PM Changeset in webkit [239136] by
-
- 7 edits2 adds in trunk
Recycling the m section should work if it was rejected remotely
https://bugs.webkit.org/show_bug.cgi?id=192636
Reviewed by Eric Carlson.
Source/ThirdParty/libwebrtc:
Changes merged from https://webrtc.googlesource.com/src.git/+/5c72e71e14cfa76a2d1b0979d6b918abe187c208
- Source/webrtc/pc/mediasession.cc:
- Source/webrtc/pc/mediasession.h:
- Source/webrtc/pc/mediasession_unittest.cc:
- Source/webrtc/pc/peerconnection.cc:
- Source/webrtc/pc/peerconnection_jsep_unittest.cc:
LayoutTests:
- webrtc/msection-recycling-expected.txt: Added.
- webrtc/msection-recycling.html: Added.
- 4:48 PM Changeset in webkit [239135] by
-
- 5 edits in trunk
REGRESSION (r237565): >20 Find in Page highlights in one tile results in a single giant highlight
https://bugs.webkit.org/show_bug.cgi?id=192642
<rdar://problem/46498246>
Reviewed by Geoffrey Garen.
Source/WebCore:
No new tests; adjusted an existing test instead.
- platform/graphics/PathUtilities.cpp:
(WebCore::PathUtilities::pathsWithShrinkWrappedRects):
Instead of uniting when we fail to shrink-wrap, just return the original rects.
This seems like a more reasonable default in most cases.
LayoutTests:
- fast/shrink-wrap/rect-shrink-wrap-expected.html:
- fast/shrink-wrap/rect-shrink-wrap.html:
Add a test case with >20 tiny rects.
- 4:41 PM Changeset in webkit [239134] by
-
- 12 edits in trunk
Implement safe browsing in WebKit on WatchOS
https://bugs.webkit.org/show_bug.cgi?id=192641
<rdar://problem/46376188>
Reviewed by Geoff Garen.
Source/WebKit:
WatchOS has a few special requirements:
- The margin size needs to be smaller and the title font smaller to fit on the screen.
- The exclamation point cannot be beside the title or it won't fit on the screen. I put it above the title.
- The application must be told when the safe browsing warning has been shown. I added a new delegate callback.
- The UIScrollView's contentSize must be set even before the details are shown to be able to scroll down to the buttons. This was already an issue on small WKWebViews on iOS, so this fixes both operating systems.
- Configurations/WebKit.xcconfig:
- UIProcess/API/APIUIClient.h:
(API::UIClient::didShowSafeBrowsingWarning):
- UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
- UIProcess/Cocoa/UIDelegate.h:
- UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::didShowSafeBrowsingWarning):
- UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
(fontOfSize):
(buttonSize):
(-[WKSafeBrowsingWarning addContent]):
(-[WKSafeBrowsingWarning showDetailsClicked]):
(-[WKSafeBrowsingWarning updateContentSize]):
(buttonWidth): Deleted.
- UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
Source/WTF:
- wtf/Platform.h:
WatchOS has safe browsing, too!
Tools:
- TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
(-[SafeBrowsingNavigationDelegate _webViewDidShowSafeBrowsingWarning:]):
(safeBrowsingView):
Add a test that the new delegate callback is called.
- 4:30 PM Changeset in webkit [239133] by
-
- 3 edits in trunk/Source/WebKit
Unreviewed, rolling out r239129 and r239131.
https://bugs.webkit.org/show_bug.cgi?id=192646
Casued macOS and iOS Debug testing to fail early (Requested by
Truitt on #webkit).
Reverted changesets:
"Unreviewed build fix for WinCairo Debug after r239080(?)."
https://trac.webkit.org/changeset/239129
"Unreviewed fix for Cocoa Debug test instability following
r239129."
https://trac.webkit.org/changeset/239131
- 3:57 PM Changeset in webkit [239132] by
-
- 9 edits in trunk/Source
HTTPS Upgrade: Figure out if/how to tell clients that the HTTPS upgrade happened
https://bugs.webkit.org/show_bug.cgi?id=192375
<rdar://problem/45851159>
Patch by Vivek Seth <v_seth@apple.com> on 2018-12-12
Reviewed by Chris Dumez.
Use simulated redirect to tell clients that HTTPS Upgrade happened.
Source/WebCore:
- platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::syntheticRedirectResponse):
- platform/network/ResourceResponseBase.h:
- platform/network/mac/WebCoreURLResponse.mm:
(WebCore::synthesizeRedirectResponseIfNecessary):
Source/WebKit:
- NetworkProcess/NetworkLoadChecker.cpp:
(WebKit::NetworkLoadChecker::NetworkLoadChecker):
(WebKit::NetworkLoadChecker::checkRedirection):
(WebKit::NetworkLoadChecker::accessControlErrorForValidationHandler):
(WebKit::NetworkLoadChecker::applyHTTPSUpgradeIfNeeded const):
(WebKit::NetworkLoadChecker::checkRequest):
(WebKit::NetworkLoadChecker::continueCheckingRequestOrDoSyntheticRedirect):
(WebKit::NetworkLoadChecker::checkCORSRequestWithPreflight):
(WebKit::NetworkLoadChecker::applyHTTPSUpgradeIfNeeded): Deleted.
- NetworkProcess/NetworkLoadChecker.h:
- NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::start):
- NetworkProcess/PingLoad.cpp:
- 3:42 PM Changeset in webkit [239131] by
-
- 3 edits in trunk/Source/WebKit
Unreviewed fix for Cocoa Debug test instability following r239129.
- UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFailToSuspendAfterProcessSwap): Deleted.
- UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::didFailToSuspendAfterProcessSwap):
Move the whole assertion to the declaration site.
- 2:04 PM Changeset in webkit [239130] by
-
- 7 edits in trunk/Source
Add a preference to enable / disable devicemotion and deviceorientation events
https://bugs.webkit.org/show_bug.cgi?id=192631
<rdar://problem/46646244>
Reviewed by Geoffrey Garen.
Add setting to toggle support for the deviceorientation / devicemotion events:
Source/WebCore:
- page/DOMWindow.cpp:
(WebCore::DOMWindow::addEventListener):
- page/Settings.yaml:
Source/WebKit:
- Shared/WebPreferences.yaml:
- UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _setDeviceOrientationEventEnabled:]):
(-[WKPreferences _deviceOrientationEventEnabled]):
- UIProcess/API/Cocoa/WKPreferencesPrivate.h:
- 1:44 PM Changeset in webkit [239129] by
-
- 3 edits in trunk/Source/WebKit
Unreviewed build fix for WinCairo Debug after r239080(?).
MSVC gives a redefinition error if noreturn is specified on the definition instead of the declaration.
- UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFailToSuspendAfterProcessSwap):
- UIProcess/WebPageProxy.h:
Move NO_RETURN_DUE_TO_ASSERT to the declaration site.
- 1:21 PM Changeset in webkit [239128] by
-
- 7 edits in trunk/Source/WebKit
[meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
https://bugs.webkit.org/show_bug.cgi?id=192449
<rdar://problem/46595508>
Reviewed by Darin Adler.
Part 2: UIProcess/Cocoa and UIProcess/ios folders.
- UIProcess/Cocoa/WebViewImpl.h:
- UIProcess/Cocoa/WebViewImpl.mm:
- UIProcess/ios/WKContentView.mm:
(-[WKContentView _commonInitializationWithProcessPool:configuration:]):
(-[WKContentView initWithFrame:processPool:configuration:webView:]):
(-[WKContentView dealloc]):
(-[WKContentView page]):
(-[WKContentView updateFixedClippingView:]):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
(-[WKContentView _updateForScreen:]):
(-[WKContentView _accessibilityRegisterUIProcessTokens]):
(-[WKContentView _createDrawingAreaProxy]):
(-[WKContentView _didCommitLayerTree:]):
(-[WKContentView _wk_pageCountForPrintFormatter:]):
- UIProcess/ios/WKContentViewInteraction.mm:
(-[WKFocusedElementInfo initWithAssistedNodeInformation:isUserInitiated:userObject:]):
(hasAssistedNode):
(-[WKContentView setupInteraction]):
(-[WKContentView positionInformation]):
(-[WKContentView _webTouchEventsRecognized:]):
(inflateQuad):
(-[WKContentView _updateTapHighlight]):
(-[WKContentView _showTapHighlight]):
(-[WKContentView _requiresKeyboardWhenFirstResponder]):
(-[WKContentView _displayFormNodeInputView]):
(-[WKContentView inputView]):
(-[WKContentView _actionForLongPressFromPositionInformation:]):
(-[WKContentView currentPositionInformation]):
(-[WKContentView doAfterPositionInformationUpdate:forRequest:]):
(-[WKContentView _currentPositionInformationIsValidForRequest:]):
(-[WKContentView _hasValidOutstandingPositionInformationRequest:]):
(-[WKContentView _currentPositionInformationIsApproximatelyValidForRequest:]):
(-[WKContentView gestureRecognizerShouldBegin:]):
(-[WKContentView hasSelectablePositionAtPoint:]):
(-[WKContentView pointIsNearMarkedText:]):
(-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
(-[WKContentView webSelectionRectsForSelectionRects:]):
(-[WKContentView _twoFingerSingleTapGestureRecognized:]):
(-[WKContentView _stylusSingleTapRecognized:]):
(-[WKContentView _singleTapCommited:]):
(-[WKContentView _attemptClickAtLocation:]):
(-[WKContentView _positionInformationDidChange:]):
(-[WKContentView requiresAccessoryView]):
(-[WKContentView supportedPasteboardTypesForCurrentSelection]):
(-[WKContentView _lookupForWebView:]):
(-[WKContentView _shareForWebView:]):
(-[WKContentView textStylingAtPosition:inDirection:]):
(-[WKContentView canPerformActionForWebView:withSender:]):
(-[WKContentView selectForWebView:]):
(-[WKContentView _accessibilityRetrieveRectsEnclosingSelectionOffset:withGranularity:]):
(-[WKContentView _accessibilityRetrieveRectsAtSelectionOffset:withText:completionHandler:]):
(toGestureType):
(toUIWKGestureType):
(toSelectionTouch):
(toUIWKSelectionTouch):
(toGestureRecognizerState):
(toUIGestureRecognizerState):
(toUIWKSelectionFlags):
(toWKTextGranularity):
(toWKSelectionDirection):
(selectionChangedWithGesture):
(selectionChangedWithTouch):
(-[WKContentView changeSelectionWithGestureAt:withGesture:withState:withFlags:]):
(-[WKContentView autocorrectionData]):
(-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
(-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
(-[WKContentView _updateAccessory]):
(-[WKContentView selectedTextRange]):
(-[WKContentView setMarkedText:selectedRange:]):
(coreWritingDirection):
(-[WKContentView closestPositionToPoint:]):
(-[WKContentView insertText:]):
(-[WKContentView textInputTraits]):
(-[WKContentView handleKeyWebEvent:]):
(-[WKContentView handleKeyWebEvent:withCompletionHandler:]):
(-[WKContentView isScrollableForKeyboardScrollViewAnimator:]):
(-[WKContentView keyboardScrollViewAnimator:distanceForIncrement:]):
(-[WKContentView assistedNodeInformation]):
(-[WKContentView assistedNodeSelectOptions]):
(isAssistableInputType):
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
(-[WKContentView _stopAssistingNode]):
(-[WKContentView updateCurrentAssistedNodeInformation:]):
(-[WKContentView presentViewControllerForCurrentAssistedNode]):
(-[WKContentView actionNameForFocusedFormControlView:]):
(-[WKContentView selectWordForReplacement]):
(-[WKContentView _updateChangedSelection:]):
(-[WKContentView _beginSuppressingSelectionAssistantForReason:]):
(-[WKContentView _stopSuppressingSelectionAssistantForReason:]):
(-[WKContentView _showPlaybackTargetPicker:fromRect:routeSharingPolicy:routingContextUID:]):
(-[WKContentView _showRunOpenPanel:resultListener:]):
(-[WKContentView _showShareSheet:completionHandler:]):
(-[WKContentView positionInformationForActionSheetAssistant:]):
(-[WKContentView updatePositionInformationForActionSheetAssistant:]):
(-[WKContentView _startDrag:item:]):
(-[WKContentView _didHandleAdditionalDragItemsRequest:]):
(-[WKContentView _didHandleStartDataInteractionRequest:]):
(dropOperationForWebCoreDragOperation):
(-[WKContentView dragDataForDropSession:dragDestinationAction:]):
(-[WKContentView _didConcludeEditDataInteraction:]):
(-[WKContentView _didPerformDragOperation:]):
(-[WKContentView _prepareToDragPromisedAttachment:]):
(-[WKContentView _itemsForBeginningOrAddingToSessionWithRegistrationList:stagedDragSource:]):
(-[WKContentView _autofillContext]):
(-[WKContentView _dragInteraction:itemsForAddingToSession:withTouchAtPoint:completion:]):
(-[WKContentView _dragInteraction:prepareForSession:completion:]):
(-[WKContentView dragInteraction:itemsForBeginningSession:]):
(-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
(-[WKContentView dragInteraction:session:didEndWithOperation:]):
(-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
(-[WKContentView dropInteraction:performDrop:]):
(-[WKContentView dropInteraction:sessionDidEnd:]):
(-[WKContentView allowsLanguageSelectionMenuForListViewController:]):
(-[WKContentView shouldDisplayInputContextViewForListViewController:]):
(-[WKContentView numericInputModeForListViewController:]):
(-[WKContentView textContentTypeForListViewController:]):
(-[WKContentView allowsDictationInputForListViewController:]):
(-[WKContentView _simulateLongPressActionAtLocation:]):
(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
(-[WKContentView _presentationRectsForPreviewItemController:]):
- UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
(WKFullScreenViewControllerPlaybackSessionModelClient::setInterface):
(WKFullScreenViewControllerVideoFullscreenModelClient::setInterface):
(WKFullScreenViewControllerVideoFullscreenModelClient::interface const):
(-[WKFullScreenViewController videoControlsManagerDidChange]):
(-[WKFullScreenViewController _manager]):
(-[WKFullScreenViewController _togglePiPAction:]):
- UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
(-[WKFullscreenAnimationController configureInitialAndFinalStatesForTransition:]):
(-[WKFullScreenWindowController isFullScreen]):
(-[WKFullScreenWindowController enterFullScreen]):
(-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController exitFullScreen]):
(-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController _completedExitFullScreen]):
(-[WKFullScreenWindowController webViewDidRemoveFromSuperviewWhileInFullscreen]):
(-[WKFullScreenWindowController _exitFullscreenImmediately]):
(-[WKFullScreenWindowController _manager]):
- 1:20 PM Changeset in webkit [239127] by
-
- 4 edits in trunk/Source/WebCore
Make HTMLConverter take two Positions in preparation to make it work with shadow DOM
https://bugs.webkit.org/show_bug.cgi?id=192613
Reviewed by Darin Adler.
This patch makes HTMLConverter store two Position's instead of a Range so that HTMLConverter can work with
a selection which spans across shadow boundaries in the future.
No new tests since there should be no observable behavioral change.
- editing/cocoa/EditorCocoa.mm:
(WebCore::Editor::writeSelectionToPasteboard): Uses the newly introduced writeSelectionToPasteboard.
(WebCore::Editor::writeSelection): Ditto.
- editing/cocoa/HTMLConverter.h:
- editing/cocoa/HTMLConverter.mm:
(HTMLConverter::HTMLConverter): Now takes two Position's.
(HTMLConverter::convert): Updated to work with Position's.
(HTMLConverter::_processText): Ditto.
(HTMLConverter::_traverseNode): Ditto.
(HTMLConverter::_traverseFooterNode): Ditto.
(HTMLConverterCaches::cacheAncestorsOfStartToBeConverted): Ditto.
(WebCore::attributedStringFromRange): Ditto.
(WebCore::attributedStringFromSelection): Added. For now, we first create a Range via toNormalizedRange
in order to preserve the exact behavior.
- 12:43 PM Changeset in webkit [239126] by
-
- 6 edits4 adds in tags/Safari-607.1.16.2
Cherry-pick r238946. rdar://problem/46364206
We should ignore minimumEffectiveDeviceWidth if the page specifies device-width in viewport meta-tag.
https://bugs.webkit.org/show_bug.cgi?id=192377
<rdar://problem/46364206>
Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2018-12-06
Reviewed by Tim Horton.
Source/WebCore:
If the page specifies width=device-width or initial-scale=1 in the viewport meta tag, we should use the
native device width and ignore the minimum effective device width in ViewportConfiguration. The patch
also introduces scalableNativeWebpageParameters() which uses the device width as default and also allows the page
to shrink-to-fit. If a page doesn't have viewport meta tag, or if the width argument isn't device-width
and the initial scale isn't 1, we will use scalableNativeWebpageParameters() as the default configuration.
Tests: fast/viewport/ios/ignore-minimum-device-width-for-page-with-viewport-device-width.html
fast/viewport/ios/use-minimum-device-width-for-page-without-viewport-meta.html
- page/ViewportConfiguration.cpp: (WebCore::ViewportConfiguration::updateDefaultConfiguration): pick the default configuration based on
the page's viewport arguments. Also, we will always fall back to scalableNativeWebpageParameters() if we
can ignore scaling constraints.
(WebCore::ViewportConfiguration::setViewportArguments): When page sends us new ViewportArguments, pick
up the correponsding default configuration before updating the configuration.
(WebCore::ViewportConfiguration::setCanIgnoreScalingConstraints): When m_canIgnoreScalingConstraints is
changed, try to pick up the correponsding default configuration.
(WebCore::ViewportConfiguration::scalableNativeWebpageParameters): Add a new default set of viewport Parameters
this is very close to nativeWebpageParameters() excpet that it allows shrink to fit and its minimum scale
is 0.25. We will use this Parameters for pages that doesn't have viewport meta tag; or the width is
not device-width and initial scale is not 1.
(WebCore::ViewportConfiguration::updateConfiguration): If the page's viewport argument doesn't override
the default width, use the m_minimumLayoutSize.width().
- page/ViewportConfiguration.h: (WebCore::ViewportConfiguration::shouldIgnoreMinimumEffectiveDeviceWidth const): A helper method to tell
if we should avoid using minimum effective device width.
(WebCore::ViewportConfiguration::canOverrideConfigurationParameters const): If we are using a default
configuration that is neither nativeWebpageParameters() nor scalableNativeWebpageParameters(), don't override
it.
(WebCore::ViewportConfiguration::minimumEffectiveDeviceWidth const): Add a helper method to return minimum
effective device width based on shouldIgnoreMinimumEffectiveDeviceWidth().
(WebCore::ViewportConfiguration::effectiveLayoutSizeScaleFactor const): Use minimumEffectiveDeviceWidth().
Source/WebKit:
Since we are using page's viewport arguments to decide the default viewport parameters and
whether we can use mininum effective device width, we should always call setViewportArguments()
regardless of shouldIgnoreMetaViewport settings.
- WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::viewportPropertiesDidChange): Always call setViewportArguments(). (WebKit::WebPage::didCommitLoad): Ditto.
LayoutTests:
- fast/viewport/ios/ignore-minimum-device-width-for-page-with-viewport-device-width-expected.txt: Added.
- fast/viewport/ios/ignore-minimum-device-width-for-page-with-viewport-device-width.html: Added.
- fast/viewport/ios/use-minimum-device-width-for-page-without-viewport-meta-expected.txt: Added.
- fast/viewport/ios/use-minimum-device-width-for-page-without-viewport-meta.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238946 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 12:43 PM Changeset in webkit [239125] by
-
- 9 edits6 adds in tags/Safari-607.1.16.2
Cherry-pick r238814. rdar://problem/46046013
[iOS] Do not handle key events that are key commands
https://bugs.webkit.org/show_bug.cgi?id=191608
<rdar://problem/46046013>
Reviewed by Ryosuke Niwa.
Source/WebKit:
A key down event may be associated with a key command. If it is then we want to execute the
key command instead of inserting or deleting text. We need to ask UIKit to handle the current
event as a key command to find out.
- UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _interpretKeyEvent:isCharEvent:]): Ask UIKit to handle the current event as a key command. If it handles it then we're done. Otherwise, do what we do now.
Source/WebKitLegacy/ios:
Add default implementation of -handleKeyCommandForCurrentEvent that returns NO - the current
event was not handled as a key command.
- DefaultDelegates/WebDefaultUIKitDelegate.m: (-[WebDefaultUIKitDelegate handleKeyCommandForCurrentEvent]):
- WebView/WebUIKitDelegate.h:
Source/WebKitLegacy/mac:
A key down event may be associated with a key command. If it is then we want to execute the
key command instead of inserting or deleting text. We need to ask UIKit to handle the current
event as a key command to find out.
- WebView/WebHTMLView.mm: (-[WebHTMLView _handleEditingKeyEvent:]):
LayoutTests:
Add tests to ensure that we process key commands correctly.
- fast/events/ios/key-command-italic-dispatches-keydown-expected.txt: Added.
- fast/events/ios/key-command-italic-dispatches-keydown.html: Added.
- fast/events/ios/key-command-italic-expected.txt: Added.
- fast/events/ios/key-command-italic.html: Added.
- fast/events/ios/type-digits-holding-control-key-expected.txt: Added.
- fast/events/ios/type-digits-holding-control-key.html: Added.
- platform/ios-wk1/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238814 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 11:15 AM Changeset in webkit [239124] by
-
- 30 edits in trunk/Source/WebKit
[meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
https://bugs.webkit.org/show_bug.cgi?id=192449
<rdar://problem/46595508>
Reviewed by Darin Adler.
Part 1: Files in Shared folder.
- Shared/API/c/WKRenderLayer.cpp:
(WKRenderLayerGetFrameContentsLayer):
- Shared/API/c/cf/WKErrorCF.cpp:
(WKErrorCreateWithCFError):
(WKErrorCopyCFError):
- Shared/API/c/cg/WKImageCG.cpp:
(WKImageCreateCGImage):
(WKImageCreateFromCGImage):
- Shared/API/c/mac/WKWebArchive.cpp:
(WKWebArchiveGetTypeID):
(WKWebArchiveCreate):
(WKWebArchiveCreateWithData):
(WKWebArchiveCreateFromRange):
(WKWebArchiveCopyMainResource):
(WKWebArchiveCopySubresources):
(WKWebArchiveCopySubframeArchives):
(WKWebArchiveCopyData):
- Shared/API/c/mac/WKWebArchiveResource.cpp:
(WKWebArchiveResourceGetTypeID):
(WKWebArchiveResourceCreate):
(WKWebArchiveResourceCopyData):
(WKWebArchiveResourceCopyURL):
(WKWebArchiveResourceCopyMIMEType):
(WKWebArchiveResourceCopyTextEncoding):
- Shared/ChildProcess.cpp:
- Shared/ContextMenuContextData.cpp:
- Shared/EditorState.cpp:
- Shared/Plugins/NPIdentifierData.cpp:
- Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
- Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
- Shared/SessionState.cpp:
- Shared/SessionTracker.cpp:
- Shared/ShareableBitmap.cpp:
- Shared/ShareableResource.cpp:
- Shared/VisibleContentRectUpdateInfo.cpp:
- Shared/WebBackForwardListItem.cpp:
- Shared/WebContextMenuItemData.cpp:
- Shared/WebCoreArgumentCoders.cpp:
- Shared/WebHitTestResultData.cpp:
- Shared/WebImage.cpp:
- Shared/WebMediaSessionMetadata.cpp:
- Shared/WebMemorySampler.cpp:
- Shared/WebMouseEvent.cpp:
- Shared/WebRenderObject.cpp:
- Shared/WebSQLiteDatabaseTracker.cpp:
- Shared/WebWheelEvent.cpp:
- Shared/cf/ArgumentCodersCF.cpp:
- Shared/ios/WebPlatformTouchPointIOS.cpp:
- 11:10 AM Changeset in webkit [239123] by
-
- 4 edits in trunk
Unreviewed, fix changelog entries for previous commit
- 11:02 AM Changeset in webkit [239122] by
-
- 24 edits3 adds2 deletes in trunk
Unreviewed manual rollout of r239100-r239102 and r239114
https://bugs.webkit.org/show_bug.cgi?id=192151
<rdar://problem/46655586>
.:
- Source/cmake/OptionsGTK.cmake:
Source/WebCore:
- css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::font):
- loader/cache/CachedFont.cpp:
(WebCore::CachedFont::platformDataFromCustomData):
- platform/FreeType.cmake:
- platform/graphics/FontPlatformData.h:
(WebCore::FontPlatformData::isFixedWidth const): Deleted.
- platform/graphics/cairo/FontCustomPlatformData.h:
- platform/graphics/freetype/FontCacheFreeType.cpp:
(WebCore::FontCache::systemFallbackForCharacters):
(WebCore::FontCache::createFontPlatformData):
(WebCore::getFontPropertiesFromPattern): Deleted.
(WebCore::defaultVariationValues): Deleted.
(WebCore::buildVariationSettings): Deleted.
- platform/graphics/freetype/FontCacheFreeType.h: Removed.
- platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
(WebCore::FontCustomPlatformData::FontCustomPlatformData):
(WebCore::FontCustomPlatformData::~FontCustomPlatformData):
(WebCore::FontCustomPlatformData::fontPlatformData):
(WebCore::FontCustomPlatformData::supportsFormat):
(WebCore::defaultFontconfigOptions): Deleted.
- platform/graphics/freetype/FontPlatformDataFreeType.cpp:
(WebCore::setCairoFontOptionsFromFontConfigPattern):
(WebCore::getDefaultFontconfigOptions):
(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::operator=):
(WebCore::FontPlatformData::harfBuzzFace const):
(WebCore::FontPlatformData::platformIsEqual const):
(WebCore::FontPlatformData::buildScaledFont):
(WebCore::FontPlatformData::fcPattern const): Deleted.
(WebCore::FontPlatformData::createOpenTypeMathHarfBuzzFont const): Deleted.
- platform/graphics/freetype/SimpleFontDataFreeType.cpp:
(WebCore::Font::platformCreateScaledFont const):
- platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
(WebCore::fontFeatures):
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
(WebCore::floatToHarfBuzzPosition): Deleted.
(WebCore::doubleToHarfBuzzPosition): Deleted.
(WebCore::harfBuzzFontFunctions): Deleted.
(WebCore::findScriptForVerticalGlyphSubstitution): Deleted.
- platform/graphics/harfbuzz/HarfBuzzFace.cpp: Added.
(WebCore::HarfBuzzFace::CacheEntry::CacheEntry):
(WebCore::HarfBuzzFace::CacheEntry::~CacheEntry):
(WebCore::HarfBuzzFace::cache):
(WebCore::HarfBuzzFace::HarfBuzzFace):
(WebCore::HarfBuzzFace::~HarfBuzzFace):
(WebCore::findScriptForVerticalGlyphSubstitution):
(WebCore::HarfBuzzFace::setScriptForVerticalGlyphSubstitution):
- platform/graphics/harfbuzz/HarfBuzzFace.h: Added.
(WebCore::HarfBuzzFace::CacheEntry::create):
(WebCore::HarfBuzzFace::CacheEntry::face):
(WebCore::HarfBuzzFace::CacheEntry::glyphCache):
- platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp: Added.
(WebCore::floatToHarfBuzzPosition):
(WebCore::doubleToHarfBuzzPosition):
(WebCore::CairoGetGlyphWidthAndExtents):
(WebCore::harfBuzzGetGlyph):
(WebCore::harfBuzzGetGlyphHorizontalAdvance):
(WebCore::harfBuzzGetGlyphHorizontalOrigin):
(WebCore::harfBuzzGetGlyphExtents):
(WebCore::harfBuzzCairoTextGetFontFuncs):
(WebCore::harfBuzzCairoGetTable):
(WebCore::HarfBuzzFace::createFace):
(WebCore::HarfBuzzFace::createFont):
- platform/graphics/harfbuzz/HbUniquePtr.h:
(WebCore::HbPtrDeleter<hb_face_t>::operator() const): Deleted.
- platform/graphics/opentype/OpenTypeMathData.cpp:
(WebCore::OpenTypeMathData::OpenTypeMathData):
- platform/graphics/win/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
- platform/graphics/win/FontCustomPlatformData.h:
- platform/graphics/win/FontCustomPlatformDataCairo.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
Tools:
- gtk/jhbuild.modules:
- gtk/patches/cairo-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch: Removed.
LayoutTests:
- platform/gtk/TestExpectations:
- platform/gtk/mathml/opentype/opentype-stretchy-expected.png:
- platform/gtk/mathml/opentype/opentype-stretchy-expected.txt:
- 10:52 AM Changeset in webkit [239121] by
-
- 6 edits in tags/Safari-607.1.16.2/Source
Cherry-pick r239088. rdar://problem/46615532
WebCore shouldn't have a Objective-C class named NSCursor
https://bugs.webkit.org/show_bug.cgi?id=192602
<rdar://problem/46615532>
Reviewed by Wenson Hsieh.
Source/WebCore:
- platform/ios/wak/WAKAppKitStubs.h:
- platform/ios/wak/WAKAppKitStubs.m: (+[NSCursor setHiddenUntilMouseMoves:]): Deleted. Get rid of the class. Also remove a comment that seems to have detached from wherever it's supposed to be.
Source/WebKitLegacy/mac:
- WebView/WebFrameView.mm: (-[WebFrameView keyDown:keyDown:]):
- WebView/WebHTMLView.mm: (-[WebHTMLView keyDown:]): (-[WebHTMLView performKeyEquivalent:]): Only use NSCursor on macOS.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239088 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 10:52 AM Changeset in webkit [239120] by
-
- 2 edits in tags/Safari-607.1.16.2/Source/JavaScriptCore
Cherry-pick r239055. rdar://problem/45615617
LinkBuffer::copyCompactAndLinkCode() needs to be aware of ENABLE(SEPARATED_WX_HEAP).
https://bugs.webkit.org/show_bug.cgi?id=192569
<rdar://problem/45615617>
Reviewed by Saam Barati.
- assembler/LinkBuffer.cpp: (JSC::LinkBuffer::copyCompactAndLinkCode):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239055 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 10:52 AM Changeset in webkit [239119] by
-
- 13 edits in tags/Safari-607.1.16.2
Cherry-pick r239046. rdar://problem/46500832
Add SPI to allow the client to set the user-agent at main frame level, from the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=192509
<rdar://problem/46500832>
Reviewed by Alex Christensen.
Source/WebCore:
- loader/DocumentLoader.h: (WebCore::DocumentLoader::setCustomUserAgent): (WebCore::DocumentLoader::customUserAgent const):
- loader/FrameLoader.cpp: (WebCore::FrameLoader::userAgent const):
Source/WebKit:
Add SPI to allow the client to set the user-agent at main frame level, from the UIProcess instead of doing
it at resource-level from the injected bundle.
The custom user-agent string can now be set on _WKWebsitePolicies during the
decidePolicyForNavigationAction for the main feame, and will impact this main resource load as well as its
future subresource loads.
- Shared/WebsitePoliciesData.cpp: (WebKit::WebsitePoliciesData::encode const): (WebKit::WebsitePoliciesData::decode): (WebKit::WebsitePoliciesData::applyToDocumentLoader):
- Shared/WebsitePoliciesData.h:
- UIProcess/API/APIWebsitePolicies.cpp: (API::WebsitePolicies::data):
- UIProcess/API/APIWebsitePolicies.h:
- UIProcess/API/Cocoa/_WKWebsitePolicies.h:
- UIProcess/API/Cocoa/_WKWebsitePolicies.mm: (-[_WKWebsitePolicies setCustomUserAgent:]): (-[_WKWebsitePolicies customUserAgent]):
- UIProcess/Cocoa/NavigationState.mm: (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
Tools:
Add API test coverage.
- TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm: (-[DataMappingSchemeHandler addMappingFromURLString:toData:]): (-[DataMappingSchemeHandler webView:startURLSchemeTask:]): (-[DataMappingSchemeHandler webView:stopURLSchemeTask:]): (-[CustomUserAgentDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]): (-[CustomUserAgentDelegate webView:didFinishNavigation:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239046 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 10:52 AM Changeset in webkit [239118] by
-
- 4 edits in tags/Safari-607.1.16.2/Source/JavaScriptCore
Cherry-pick r238997. rdar://problem/46312674
Align the metadata table on all platforms
https://bugs.webkit.org/show_bug.cgi?id=192050
<rdar://problem/46312674>
Reviewed by Mark Lam.
Although certain platforms don't require the metadata to be aligned,
values were being concurrently read and written to ValueProfiles,
which caused crashes since these operations are not atomic on unaligned
addresses.
- bytecode/Opcode.cpp: (JSC::metadataAlignment):
- bytecode/Opcode.h:
- bytecode/UnlinkedMetadataTableInlines.h: (JSC::UnlinkedMetadataTable::finalize):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238997 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 10:52 AM Changeset in webkit [239117] by
-
- 7 edits2 adds in tags/Safari-607.1.16.2
Cherry-pick r238828. rdar://problem/46353558
Regression(PSON) Google OAuth is broken in private sessions
https://bugs.webkit.org/show_bug.cgi?id=192337
<rdar://problem/46353558>
Reviewed by Alex Christensen.
Source/WebKit:
In WebPageProxy::swapToWebProcess(), we would call removeWebPage() on the old WebProcessProxy and then
addExistingWebPage() on the new WebProcessProxy, as you would expect in case of process swap.
The issue is that WebProcessProxy::removeWebPage() calls WebProcessPool::pageEndUsingWebsiteDataStore()
which would cause the session to get destroyed assuming this was the last page using it. We would
therefore lose session cookies after a process-swap in private session.
To address the issue, a parameter to WebProcessPool::pageEndUsingWebsiteDataStore() and
WebProcessPool::pageBeginUsingWebsiteDataStore() to control if we want to tell the WebProcessPool
about the page beginning / ending its use of the session. In the case of a process-swap, we make
sure the process pool is not notified.
- UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::reattachToWebProcess): (WebKit::WebPageProxy::swapToWebProcess): (WebKit::WebPageProxy::finishAttachingToWebProcess): (WebKit::WebPageProxy::close):
- UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::createWebPage): (WebKit::WebProcessProxy::addExistingWebPage): (WebKit::WebProcessProxy::removeWebPage):
- UIProcess/WebProcessProxy.h:
Tools:
Add API test coverage.
- TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
- TestWebKitAPI/Tests/WebKitCocoa/GetSessionCookie.html: Added.
- TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
- TestWebKitAPI/Tests/WebKitCocoa/SetSessionCookie.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238828 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 10:48 AM Changeset in webkit [239116] by
-
- 2 edits in trunk/Source/WebCore
Unreviewed attempt to fix Windows Cairo build after r239100.
- platform/graphics/win/FontCustomPlatformDataCairo.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
- 10:44 AM Changeset in webkit [239115] by
-
- 2 edits in trunk/Source/WebKit
Unreviewed build with with recent macOS SDKs.
- Platform/cocoa/WKCrashReporter.mm:
- 10:37 AM Changeset in webkit [239114] by
-
- 2 edits in trunk/Source/WebKit
Unreviewed attempt to fix GTK build after r239104.
- UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::performDragControllerAction):
- 10:25 AM Changeset in webkit [239113] by
-
- 7 edits in tags/Safari-607.1.16.2/Source
Versioning.
- 10:23 AM Changeset in webkit [239112] by
-
- 2 edits in trunk/Source/WebKit
Unreviewed attempt to fix build with older SDKs after r239110.
- Platform/cocoa/WKCrashReporter.mm:
- 10:21 AM Changeset in webkit [239111] by
-
- 1 copy in tags/Safari-607.1.16.2
New tag.
- 10:08 AM Changeset in webkit [239110] by
-
- 2 edits in trunk/Source/WebKit
Unreviewed, fix build with recent SDKs.
- Platform/cocoa/WKCrashReporter.mm:
- 9:52 AM Changeset in webkit [239109] by
-
- 7 edits in branches/safari-606-branch/Source
Versioning.
- 9:44 AM Changeset in webkit [239108] by
-
- 1 copy in tags/Safari-607.1.17
Tag Safari-607.1.17.
- 9:06 AM Changeset in webkit [239107] by
-
- 3 edits in trunk/Source/WebCore
[iOS] A few API tests are failing after r239086
https://bugs.webkit.org/show_bug.cgi?id=192608
Reviewed by Zalan Bujtas.
These test failures were caused by a missing Vector size check in
Pasteboard::readFilePathsbefore accessing
the first item. Fix this by adding a helper method on PasteboardItemInfo to grab the file path for the highest
fidelity pasteboard item (returning the null string if there are none), and use this in a few places that grab
the highest fidelity path using Vector::first().
While
Pasteboard::readRespectingUTIFidelitiesdoes have a bounds check before accessing the list of paths,
this patch still replaces it with a call topathForHighestFidelityItem(), so that the intent is more clear.
- platform/PasteboardItemInfo.h:
(WebCore::PasteboardItemInfo::pathForHighestFidelityItem const):
- platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::readRespectingUTIFidelities):
(WebCore::Pasteboard::readFilePaths):
- 9:05 AM Changeset in webkit [239106] by
-
- 2 edits in trunk/Source/WebKit
[iOS] Zero memory containing the password for PDF documents when a WKPDFView is deallocated
https://bugs.webkit.org/show_bug.cgi?id=192536
rdar://problem/41174451
Reviewed by Tim Horton.
- UIProcess/ios/WKPDFView.mm: Took out PLATFORM(IOSMAC) since
this class is not compiled on that platform at this time. Can always
add it back later.
(-[WKPDFView dealloc]): Zero out characters of _passwordForPrinting.
(-[WKPDFView pdfHostViewController:documentDidUnlockWithPassword:]):
Initialize _passwordForPrinting; use a CString instead of retaining
an NSString since we can zero that out easily.
(-[WKPDFView _ensureDocumentForPrinting]): Use _passwordForPrinting.
- 8:28 AM Changeset in webkit [239105] by
-
- 6 edits in trunk
Unreviewed, rolling out r239103.
https://bugs.webkit.org/show_bug.cgi?id=192627
It broke the built because it depends on another patch that
didn't land yet (Requested by KaL on #webkit).
Reverted changeset:
"[WPE] Add API to notify about frame displayed view backend
callback"
https://bugs.webkit.org/show_bug.cgi?id=192224
https://trac.webkit.org/changeset/239103
- 8:01 AM Changeset in webkit [239104] by
-
- 9 edits in trunk/Source/WebKit
Restore MESSAGE_CHECK_URL() security check on sourceURL in didPerformClientRedirect()
https://bugs.webkit.org/show_bug.cgi?id=191982
<rdar://problem/46258054>
Reviewed by Alex Christensen.
Have the WebPageProxy remember the local paths it previously visited so that the
MESSAGE_CHECK_URL() checks still work when process-swap on navigation is enabled.
Add back MESSAGE_CHECK_URL() on sourceURL in didPerformClientRedirect().
- UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::createSandboxExtensionsIfNeeded):
- UIProcess/RemoteWebInspectorProxy.cpp:
(WebKit::RemoteWebInspectorProxy::createFrontendPageAndWindow):
- UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::createFrontendPage):
- UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadRequestWithNavigation):
(WebKit::WebPageProxy::loadFile):
(WebKit::WebPageProxy::loadDataWithNavigation):
(WebKit::WebPageProxy::loadAlternateHTML):
(WebKit::WebPageProxy::reload):
(WebKit::WebPageProxy::didPerformClientRedirect):
(WebKit::WebPageProxy::backForwardGoToItem):
(WebKit::WebPageProxy::checkURLReceivedFromCurrentOrPreviousWebProcess):
(WebKit::WebPageProxy::addPreviouslyVisitedPath):
(WebKit::WebPageProxy::willAcquireUniversalFileReadSandboxExtension):
- UIProcess/WebPageProxy.h:
- UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::assumeReadAccessToBaseURL):
- UIProcess/WebProcessProxy.h:
- UIProcess/mac/WebPageProxyMac.mm:
- 2:59 AM Changeset in webkit [239103] by
-
- 6 edits in trunk
[WPE] Add API to notify about frame displayed view backend callback
https://bugs.webkit.org/show_bug.cgi?id=192224
Reviewed by Michael Catanzaro.
Source/WebKit:
Add API to add a callback to the view to be called when the view backend notifies that a frame has been
displayed.
- UIProcess/API/glib/WebKitWebView.cpp:
(FrameDisplayedCallback::FrameDisplayedCallback):
(FrameDisplayedCallback::~FrameDisplayedCallback):
(webkit_web_view_add_frame_displayed_callback):
(webkit_web_view_remove_frame_displayed_callback):
- UIProcess/API/wpe/WebKitWebView.h:
Tools:
Add a test case to check the new API.
- TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
(testWebViewFrameDisplayed):
(beforeAll):
- 1:54 AM Changeset in webkit [239102] by
-
- 2 edits in trunk/Source/WebCore
Unreviewed. Fix WPE build after r239101.
- platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp: Include <hb-ot.h>
- 1:19 AM Changeset in webkit [239101] by
-
- 11 edits3 deletes in trunk
[FreeType] Remove HarfBuzzFace
https://bugs.webkit.org/show_bug.cgi?id=192589
Reviewed by Michael Catanzaro.
Source/WebCore:
This was used to share the common implementation with the chromium port, but now that only freetype based ports
use it, it can be removed and use hb_ft_face_create_cached() instead. We don't need the glyph cache either,
since we are already caching glyphs in Font.
- platform/FreeType.cmake: Remove HarfBuzzFaceCairo.cpp and HarfBuzzFace.cpp.
- platform/graphics/FontPlatformData.h: Remove HarfBuzzFace member.
- platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp: Add missing include.
- platform/graphics/freetype/FontPlatformDataFreeType.cpp:
(WebCore::FontPlatformData::operator=): Remove m_harfBuzzFace handling.
(WebCore::FontPlatformData::createOpenTypeMathHarfBuzzFont const): New funtction to create a hb_font_t for
OpenType math.
- platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
(WebCore::floatToHarfBuzzPosition): Moved from HarfBuzzFaceCairo.cpp.
(WebCore::doubleToHarfBuzzPosition): Ditto.
(WebCore::harfBuzzFontFunctions): Also moved from HarfBuzzFaceCairo.cpp, but implement get_nominal/variation
functions when using HarfBuzz >= 1.2.3 and use Font::glyphForCharacter() to make it simpler.
(WebCore::fontFeatures): Moved from HarfBuzzFaceCairo.cpp.
(WebCore::findScriptForVerticalGlyphSubstitution): Moved from HarfBuzzFace.cpp.
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Create the HarfBuzz face and font here.
- platform/graphics/harfbuzz/HarfBuzzFace.cpp: Removed.
- platform/graphics/harfbuzz/HarfBuzzFace.h: Removed.
- platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp: Removed.
- platform/graphics/harfbuzz/HbUniquePtr.h:
(WebCore::HbPtrDeleter<hb_face_t>::operator() const): Add deleter for hb_face_t.
- platform/graphics/opentype/OpenTypeMathData.cpp:
(WebCore::OpenTypeMathData::OpenTypeMathData): Use FontPlatformData::createOpenTypeMathHarfBuzzFont().
LayoutTests:
Rebaseline test that now matches the firefox output.
- platform/gtk/mathml/opentype/opentype-stretchy-expected.png:
- platform/gtk/mathml/opentype/opentype-stretchy-expected.txt:
- 1:07 AM Changeset in webkit [239100] by
-
- 18 edits2 adds in trunk
[FreeType] Add initial implementation of variation fonts
https://bugs.webkit.org/show_bug.cgi?id=192151
Reviewed by Michael Catanzaro.
.:
Enable variation fonts in GTK+ port when required dependencies are available.
- Source/cmake/OptionsGTK.cmake:
Source/WebCore:
- css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::font): Remove platform ifdefs.
- loader/cache/CachedFont.cpp:
(WebCore::CachedFont::platformDataFromCustomData): Ditto.
- platform/graphics/FontPlatformData.h:
(WebCore::FontPlatformData::isFixedWidth const):
- platform/graphics/cairo/FontCustomPlatformData.h: Use RefPtr for cairo_font_face_t.
- platform/graphics/freetype/FontCacheFreeType.cpp:
(WebCore::getFontPropertiesFromPattern): Helper function to get several font properties from the fontconfig
pattern.
(WebCore::FontCache::systemFallbackForCharacters): Use getFontPropertiesFromPattern().
(WebCore::FontCache::createFontPlatformData): Pass FC_VARIABLE to the pattern and call buildVariationSettings()
before creating the FontPlatformData to set FC_FONT_VARIATIONS on the pattern.
(WebCore::defaultVariationValues): Parse font variations table.
(WebCore::buildVariationSettings): Build a font variations string from the settings that can be passed to cairo.
- platform/graphics/freetype/FontCacheFreeType.h: Added.
- platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
(WebCore::FontCustomPlatformData::FontCustomPlatformData): Use RefPtr and make freeTypeFaceKey global.
(WebCore::FontCustomPlatformData::~FontCustomPlatformData): Remove explicit destroy.
(WebCore::defaultFontconfigOptions): Moved here from FontCacheFreeType.
(WebCore::FontCustomPlatformData::fontPlatformData): Call buildVariationSettings() before creating the
FontPlatformData to set FC_FONT_VARIATIONS on the pattern.
(WebCore::FontCustomPlatformData::supportsFormat): Add variation formats.
- platform/graphics/freetype/FontPlatformDataFreeType.cpp:
(WebCore::setCairoFontOptionsFromFontConfigPattern): Call cairo_font_options_set_variations() with the
FC_FONT_VARIATIONS value from the pattern.
(WebCore::FontPlatformData::FontPlatformData): Use a single constructor that always receives a valid fontconfig
pattern.
(WebCore::FontPlatformData::fcPattern const): Return the fontconfig pattern.
(WebCore::FontPlatformData::platformIsEqual const): Update the condition now that m_pattern can't be nullptr.
(WebCore::FontPlatformData::buildScaledFont): Use m_pattern unconditionally.
- platform/graphics/freetype/SimpleFontDataFreeType.cpp:
(WebCore::Font::platformCreateScaledFont const): Update it to use the new FontPlatformData constructor.
- platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp:
(WebCore::HarfBuzzFace::createFont): Pass variations to HarfBuzz.
- platform/graphics/win/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
- platform/graphics/win/FontCustomPlatformData.h:
Tools:
Add cairo patch to avoid crashes.
- gtk/jhbuild.modules:
- gtk/patches/cairo-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch: Added.
LayoutTests:
Unskip variation fonts tests that are now passing in GTK+ port.
- platform/gtk/TestExpectations:
- 12:38 AM Changeset in webkit [239099] by
-
- 7 edits in trunk/Source/JavaScriptCore
[BigInt] Simplify boolean context evaluation by leveraging JSString::offsetOfLength() == JSBigInt::offsetOfLength()
https://bugs.webkit.org/show_bug.cgi?id=192615
Reviewed by Saam Barati.
JSString and JSBigInt have similar concept in terms of the implementation.
Both are immutable, JSCells, and have length information. m_length is located
just after JSCell header part, we can ensureJSString::offsetOfLength() == JSBigInt::offsetOfLength(),
and it allows us to optimize the boolean context evaluation.
This patch leverages the above information to reduce the code size for the boolean context evaluation.
- ftl/FTLAbstractHeapRepository.cpp:
(JSC::FTL::AbstractHeapRepository::AbstractHeapRepository):
- ftl/FTLAbstractHeapRepository.h:
- ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::boolify):
- jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::emitConvertValueToBoolean):
(JSC::AssemblyHelpers::branchIfValue):
- runtime/JSBigInt.cpp:
(JSC::JSBigInt::JSBigInt):
(JSC::JSBigInt::offsetOfLength): Deleted.
- runtime/JSBigInt.h:
Dec 11, 2018:
- 9:54 PM Changeset in webkit [239098] by
-
- 37 edits in trunk
Implement feature flag for CSS Typed OM
https://bugs.webkit.org/show_bug.cgi?id=192610
Reviewed by Ryosuke Niwa.
Source/JavaScriptCore:
- Configurations/FeatureDefines.xcconfig:
Source/WebCore:
- Configurations/FeatureDefines.xcconfig:
- bindings/js/JSTypedOMCSSStyleValueCustom.cpp:
- css/typedom/StylePropertyMapReadOnly.h:
- css/typedom/StylePropertyMapReadOnly.idl:
- css/typedom/TypedOMCSSImageValue.h:
- css/typedom/TypedOMCSSImageValue.idl:
- css/typedom/TypedOMCSSNumericValue.h:
- css/typedom/TypedOMCSSNumericValue.idl:
- css/typedom/TypedOMCSSStyleValue.h:
- css/typedom/TypedOMCSSStyleValue.idl:
- css/typedom/TypedOMCSSUnitValue.h:
- css/typedom/TypedOMCSSUnitValue.idl:
- css/typedom/TypedOMCSSUnparsedValue.h:
- css/typedom/TypedOMCSSUnparsedValue.idl:
- features.json:
- html/ImageBitmap.cpp:
- html/ImageBitmap.h:
- html/canvas/CanvasDrawImage.idl:
- html/canvas/CanvasFillStrokeStyles.idl:
- html/canvas/CanvasRenderingContext2DBase.cpp:
- html/canvas/CanvasRenderingContext2DBase.h:
- inspector/InspectorCanvas.cpp:
(WebCore::InspectorCanvas::buildAction):
- page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setCSSTypedOMEnabled):
(WebCore::RuntimeEnabledFeatures::cssTypedOMEnabled const):
- page/WindowOrWorkerGlobalScope.idl:
Source/WebCore/PAL:
- Configurations/FeatureDefines.xcconfig:
Source/WebKit:
- Configurations/FeatureDefines.xcconfig:
- Shared/WebPreferences.yaml:
- WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
Source/WebKitLegacy/mac:
- Configurations/FeatureDefines.xcconfig:
Tools:
- TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
- 9:18 PM Changeset in webkit [239097] by
-
- 2 edits in trunk/Source/WebKitLegacy
[Win][WebKitLegacy][Clang] WebKit.h warning: 'IWebEditingDelegate2::shouldInsertNode' hides overloaded virtual function [-Woverloaded-virtual]
https://bugs.webkit.org/show_bug.cgi?id=192581
Reviewed by Alex Christensen.
Conventionally, WebKit COM interface adds a new interface with
same name methods with the old interface. For example, both
IWebEditingDelegate and IWebEditingDelegate2 interfaces has
shouldInsertNode method.
This is a part of public API, can't be renamed.
- PlatformWin.cmake: Added -Wno-overloaded-virtual compiler option
for WebKitLegacy
- 7:58 PM Changeset in webkit [239096] by
-
- 4 edits2 adds in trunk
connectedCallback is invoked during the removal of the element inside another element's connectedCallback
https://bugs.webkit.org/show_bug.cgi?id=183586
<rdar://problem/38403504>
Reviewed by Frédéric Wang.
Source/WebCore:
Align WebKit's behavior with Chrome/Firefox with regards to https://github.com/w3c/webcomponents/issues/760
After much discussion, it's unclear that there is a clear path forward to fixing the oddness that
the presence of a custom element reaction changes the timing at which another reaction callback gets invoked.
So matching Chrome/Firefox behaviors in this case seems the path of the least resistance to interoperability.
Namely, this patch makes WebKit not insert a custom element to the appropriate element queue when the element
does not have a matching reaction callback. Put it another way, steps 3-5 in would be done before step 6 in:
https://html.spec.whatwg.org/multipage/custom-elements.html#enqueue-a-custom-element-callback-reaction
- Let definition be element's custom element definition.
- Let callback be the value of the entry in definition's lifecycle callbacks with key callbackName.
- If callback is null, then return
- If callbackName is "attributeChangedCallback", then:
- Let attributeName be the first element of args.
- If definition's observed attributes does not contain attributeName, then return.
- Add a new callback reaction to element's custom element reaction queue, with callback function callback and arguments args.
- Enqueue an element on the appropriate element queue given element.
Test: fast/custom-elements/enqueue-custom-element-callback-reactions-inside-another-callback.html
- dom/CustomElementReactionQueue.cpp:
(WebCore::CustomElementReactionQueue::enqueueElementUpgrade):
(WebCore::CustomElementReactionQueue::enqueueConnectedCallbackIfNeeded):
(WebCore::CustomElementReactionQueue::enqueueDisconnectedCallbackIfNeeded):
(WebCore::CustomElementReactionQueue::enqueueAdoptedCallbackIfNeeded):
(WebCore::CustomElementReactionQueue::enqueueAttributeChangedCallbackIfNeeded):
(WebCore::CustomElementReactionQueue::enqueuePostUpgradeReactions):
(WebCore::CustomElementReactionQueue::enqueueElementOnAppropriateElementQueue): Renamed from ensureCurrentQueue.
- dom/CustomElementReactionQueue.h:
LayoutTests:
Added a W3C style testharness test.
- fast/custom-elements/enqueue-custom-element-callback-reactions-inside-another-callback-expected.txt: Added.
- fast/custom-elements/enqueue-custom-element-callback-reactions-inside-another-callback.html: Added.
- 6:54 PM Changeset in webkit [239095] by
-
- 2 edits in trunk/Tools
Unreviewed, fix bad check in API test added in r239080.
- TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
- 6:24 PM WPE edited by
- Fix capitalization (diff)
- 5:40 PM Changeset in webkit [239094] by
-
- 29 edits9 copies3 adds in trunk
Source/WebCore:
[WebGPU] Implement WebGPUBuffer, and some nullibility consistency in WebGPU
https://bugs.webkit.org/show_bug.cgi?id=192516
Reviewed by Dean Jackson.
Test: webgpu/buffers.html
Enable basic creation of WebGPUBuffers, and fix nullability inconsitencies in WebGPU implementation.
Add necessary symbols and files for Web/GPUBuffer, Web/GPUBufferUsage, and Web/GPUBufferDescriptor:
- CMakeLists.txt:
- DerivedSources.make:
- Sources.txt:
- SourcesCocoa.txt:
- WebCore.xcodeproj/project.pbxproj:
- bindings/js/WebCoreBuiltinNames.h:
- Modules/webgpu/WebGPUBuffer.cpp: Added.
(WebCore::WebGPUBuffer::create):
(WebCore::WebGPUBuffer::WebGPUBuffer):
- Modules/webgpu/WebGPUBuffer.h: Added.
(WebCore::WebGPUBuffer::mapping const):
(WebCore::WebGPUBuffer::unmap): Unimplemented stub, for now, as Metal equivalent is unclear.
(WebCore::WebGPUBuffer::destroy): Unimplemented stub.
- Modules/webgpu/WebGPUBuffer.idl: Added.
- Modules/webgpu/WebGPUBufferDescriptor.h: Added.
- Modules/webgpu/WebGPUBufferDescriptor.idl: Added.
- Modules/webgpu/WebGPUDevice.cpp:
(WebCore::WebGPUDevice::createBuffer const): Added.
- platform/graphics/gpu/GPUBuffer.h:
(WebCore::GPUBuffer::platformBuffer const):
(WebCore::GPUBuffer::mapping const):
- platform/graphics/gpu/GPUBufferDescriptor.h: Added.
- platform/graphics/gpu/GPUDevice.cpp:
(WebCore::GPUDevice::createBuffer const): Added.
- platform/graphics/gpu/GPUDevice.h:
- platform/graphics/gpu/cocoa/GPUBufferMetal.mm: Added.
(WebCore::GPUBuffer::create): Attempt to create a page-aligned Gigacage to back the GPUBuffer's ArrayBuffer.
(WebCore::GPUBuffer::GPUBuffer):
(WebCore::GPUBuffer::~GPUBuffer): Dereference mapped ArrayBuffer first.
Small benign edits, most to make nullability more consistent in WebGPU classes:
- Modules/webgpu/WebGPUCommandBuffer.cpp:
(WebCore::WebGPUCommandBuffer::create):
(WebCore::WebGPUCommandBuffer::beginRenderPass):
- Modules/webgpu/WebGPUCommandBuffer.h:
- Modules/webgpu/WebGPUDevice.cpp:
(WebCore::WebGPUDevice::create):
(WebCore::WebGPUDevice::WebGPUDevice):
(WebCore::WebGPUDevice::createShaderModule const):
(WebCore::WebGPUDevice::createRenderPipeline const):
(WebCore::WebGPUDevice::createCommandBuffer const):
- Modules/webgpu/WebGPUDevice.h:
(WebCore::WebGPUDevice::device const):
- Modules/webgpu/WebGPUDevice.idl:
- Modules/webgpu/WebGPUQueue.cpp:
(WebCore::WebGPUQueue::create):
- Modules/webgpu/WebGPURenderPassEncoder.cpp:
(WebCore::WebGPURenderPassEncoder::create):
- Modules/webgpu/WebGPURenderPassEncoder.h:
- Modules/webgpu/WebGPUShaderModule.cpp:
(WebCore::WebGPUShaderModule::create):
(WebCore::WebGPUShaderModule::WebGPUShaderModule):
- Modules/webgpu/WebGPUShaderModule.h:
(WebCore::WebGPUShaderModule::module const):
- Modules/webgpu/WebGPUSwapChain.idl: Sync with IDL changes.
- Modules/webgpu/WebGPUTexture.cpp:
(WebCore::WebGPUTexture::create):
(WebCore::WebGPUTexture::createDefaultTextureView):
- Modules/webgpu/WebGPUTextureView.cpp:
(WebCore::WebGPUTextureView::create):
- Modules/webgpu/WebGPUTextureView.h:
- platform/graphics/gpu/cocoa/GPUQueueMetal.mm:
(WebCore::GPUQueue::create):
- platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
(WebCore::GPURenderPipeline::create):
- platform/graphics/gpu/cocoa/GPUShaderModuleMetal.mm:
(WebCore::GPUShaderModule::create):
- platform/graphics/gpu/cocoa/GPUSwapChainMetal.mm:
(WebCore::GPUSwapChain::setDevice):
- platform/graphics/gpu/cocoa/GPUTextureMetal.mm:
(WebCore::GPUTexture::GPUTexture):
LayoutTests:
[WebGPU] Implement WebGPUBuffer
https://bugs.webkit.org/show_bug.cgi?id=192516
Reviewed by Dean Jackson.
Basic test to create a WebGPUBuffer and ensure that its memory is valid.
- webgpu/buffers-expected.txt: Added.
- webgpu/buffers.html: Added.
- 5:34 PM Changeset in webkit [239093] by
-
- 4 edits in trunk/Source/WTF
[Win][Clang] Fix compilation warnings of WTF
https://bugs.webkit.org/show_bug.cgi?id=192583
Reviewed by Alex Christensen.
clang-cl reports the following warnings.
[92/206] Building CXX object Source\WTF\wtf\CMakeFiles\WTF.dir\StackBounds.cpp.obj
..\..\Source\WTF\wtf\StackBounds.cpp(163,48): warning: missing field 'AllocationBase' initializer [-Wmissing-field-initializers]
MEMORY_BASIC_INFORMATION stackOrigin = { 0 };
1 warning generated.
[160/206] Building CXX object Source\WTF\wtf\CMakeFiles\WTF.dir\win\RunLoopWin.cpp.obj
..\..\Source\WTF\wtf\win\RunLoopWin.cpp(34,54): warning: ISO C++11 does not allow conversion from string literal to 'const LPWSTR' (aka 'wchar_t *const') [-Wwritable-strings]
static const LPWSTR kRunLoopMessageWindowClassName = L"RunLoopMessageWindow";
..\..\Source\WTF\wtf\win\RunLoopWin.cpp(86,32): warning: missing field 'lpfnWndProc' initializer [-Wmissing-field-initializers]
WNDCLASS windowClass = { 0 };
2 warnings generated.
[175/206] Building CXX object Source\WTF\wtf\CMakeFiles\WTF.dir\DateMath.cpp.obj
..\..\Source\WTF\wtf\DateMath.cpp(125,20): warning: unused function 'getLocalTime' [-Wunused-function]
static inline void getLocalTime(const time_t* localTime, struct tm* localTM)
1 warning generated.
- wtf/DateMath.cpp:
(WTF::getLocalTime): Defined only if used.
- wtf/StackBounds.cpp:
(WTF::StackBounds::currentThreadStackBoundsInternal): Initialize stackOrigin with '{ }'.
- wtf/win/RunLoopWin.cpp: Change the type of kRunLoopMessageWindowClassName to LPCWSTR.
(WTF::RunLoop::registerRunLoopMessageWindowClass): Initialize windowClass with '{ }'.
- 5:15 PM Changeset in webkit [239092] by
-
- 26 edits in trunk
[Win][Clang] Fix warning -Wmissing-field-initializers
https://bugs.webkit.org/show_bug.cgi?id=192584
Reviewed by Yusuke Suzuki.
Initialize a struct with '{ }' instead of '= {0}'.
Source/WebCore:
No new tests, no behavior changes.
- platform/graphics/win/FontCacheWin.cpp:
(WebCore::FontCache::lastResortFallbackFont):
- platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
(WebCore::MediaPlayerPrivateFullscreenWindow::createWindow):
- platform/win/ClipboardUtilitiesWin.cpp:
(WebCore::setFileDescriptorData):
(WebCore::setFileContentData):
(WebCore::setUCharData):
(WebCore::setUtf8Data):
(WebCore::setCFData):
- platform/win/CursorWin.cpp:
(WebCore::createSharedCursor):
- platform/win/DefWndProcWindowClass.cpp:
(WebCore::registerClass):
- platform/win/DragImageWin.cpp:
(WebCore::createDragImageIconForCachedImageFilename):
- platform/win/PasteboardWin.cpp:
(WebCore::writeURL):
(WebCore::Pasteboard::writeString):
(WebCore::Pasteboard::writeRangeToDataObject):
(WebCore::Pasteboard::writePlainTextToDataObject):
(WebCore::writeFileToDataObject):
(WebCore::Pasteboard::writeMarkup):
- platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::show):
- platform/win/SSLKeyGeneratorWin.cpp:
(WebCore::WebCore::signedPublicKeyAndChallengeString):
Source/WebKit:
- UIProcess/Launcher/win/ProcessLauncherWin.cpp:
(WebKit::ProcessLauncher::launchProcess):
- UIProcess/win/WebPopupMenuProxyWin.cpp:
(WebKit::WebPopupMenuProxyWin::showPopupMenu):
- UIProcess/win/WebView.cpp:
(WebKit::WebView::initializeToolTipWindow):
(WebKit::WebView::setToolTip):
Source/WebKitLegacy/win:
- WebKitMessageLoop.cpp:
(WebKitMessageLoop::run):
- WebView.cpp:
(WebView::onMenuCommand):
(WebView::gesture):
(WebView::setShouldInvertColors):
(WebView::initializeToolTipWindow):
(WebView::setToolTip):
(WebView::fullScreenClientForceRepaint):
Tools:
- DumpRenderTree/win/DumpRenderTree.cpp:
(runTest):
- DumpRenderTree/win/EventSender.cpp:
(makeMsg):
(replaySavedEvents):
(beginDragWithFilesCallback):
- DumpRenderTree/win/PixelDumpSupportWin.cpp:
(createBitmapContextFromWebView):
- MiniBrowser/win/WebKitLegacyBrowserWindow.cpp:
(updateMenuItemForHistoryItem):
- MiniBrowser/win/WinMain.cpp:
(wWinMain):
- TestWebKitAPI/win/HostWindow.cpp:
(TestWebKitAPI::HostWindow::clientRect const):
(TestWebKitAPI::HostWindow::registerWindowClass):
- TestWebKitAPI/win/PlatformWebViewWin.cpp:
(TestWebKitAPI::PlatformWebView::registerWindowClass):
- WebKitTestRunner/win/PlatformWebViewWin.cpp:
(WTR::registerWindowClass):
(WTR::PlatformWebView::windowFrame):
(WTR::PlatformWebView::windowSnapshotImage):
- 4:18 PM Changeset in webkit [239091] by
-
- 2 edits in trunk/Source/WebCore
Globally namespaced objects shouldn't use framework-prefixed names
https://bugs.webkit.org/show_bug.cgi?id=192600
Reviewed by Eric Carlson.
Rename CMSampleBufferIs... -> isCMSampleBuffer...
- platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
(WebCore::isCMSampleBufferRandomAccess):
(WebCore::isCMSampleBufferNonDisplaying):
(WebCore::MediaSampleAVFObjC::flags const):
(WebCore::CMSampleBufferIsRandomAccess): Deleted.
(WebCore::CMSampleBufferIsNonDisplaying): Deleted.
- 2:34 PM Changeset in webkit [239090] by
-
- 3 edits2 adds in trunk
Don't attempt to compute animated values when there is no relevant animation
https://bugs.webkit.org/show_bug.cgi?id=192591
<rdar://problem/34336946>
Reviewed by Dean Jackson.
Source/WebCore:
Check if the property is supposed to be animated, or has animatable features, before
attempting to calculate the current animated value.
Test: svg/animations/avoid-calculating-for-non-animating-elements.html
- svg/SVGAnimateElementBase.cpp:
(WebCore::SVGAnimateElementBase::calculateAnimatedValue):
LayoutTests:
- svg/animations/avoid-calculating-for-non-animating-elements-expected.txt: Added.
- svg/animations/avoid-calculating-for-non-animating-elements.html: Added.
- 2:00 PM Changeset in webkit [239089] by
-
- 5 edits in trunk
Unreviewed, fix typos in console log from r239087.
Source/WebCore:
- page/DOMWindow.cpp:
(WebCore::DOMWindow::addEventListener):
LayoutTests:
- http/tests/events/device-orientation-motion-non-secure-context.html:
- platform/ios/http/tests/events/device-orientation-motion-non-secure-context-expected.txt:
- 1:54 PM Changeset in webkit [239088] by
-
- 6 edits in trunk/Source
WebCore shouldn't have a Objective-C class named NSCursor
https://bugs.webkit.org/show_bug.cgi?id=192602
<rdar://problem/46615532>
Reviewed by Wenson Hsieh.
Source/WebCore:
- platform/ios/wak/WAKAppKitStubs.h:
- platform/ios/wak/WAKAppKitStubs.m:
(+[NSCursor setHiddenUntilMouseMoves:]): Deleted.
Get rid of the class.
Also remove a comment that seems to have detached from wherever it's supposed to be.
Source/WebKitLegacy/mac:
- WebView/WebFrameView.mm:
(-[WebFrameView keyDown:keyDown:]):
- WebView/WebHTMLView.mm:
(-[WebHTMLView keyDown:]):
(-[WebHTMLView performKeyEquivalent:]):
Only use NSCursor on macOS.
- 1:49 PM Changeset in webkit [239087] by
-
- 7 edits7 adds in trunk
Restrict DeviceMotion / DeviceOrientation APIs to secure contexts
https://bugs.webkit.org/show_bug.cgi?id=192595
<rdar://problem/46382603>
Reviewed by Dean Jackson.
Source/WebCore:
Tests: http/tests/events/device-orientation-motion-non-secure-context.html
http/tests/events/device-orientation-motion-secure-context.html
- page/DOMWindow.cpp:
(WebCore::DOMWindow::addEventListener):
- page/SecurityOrigin.h:
(WebCore::SecurityOrigin::setIsPotentiallyTrustworthy):
- testing/Internals.cpp:
(WebCore::Internals::markContextAsInsecure):
(WebCore::Internals::postTask):
- testing/Internals.h:
- testing/Internals.idl:
LayoutTests:
Add layout test coverage. Note however that we currently do not have mock data providers
for these APIs.
- http/tests/events/device-orientation-motion-non-secure-context-expected.txt: Added.
- http/tests/events/device-orientation-motion-non-secure-context.html: Added.
- http/tests/events/device-orientation-motion-secure-context-expected.txt: Added.
- http/tests/events/device-orientation-motion-secure-context.html: Added.
- platform/ios/http/tests/events/device-orientation-motion-non-secure-context-expected.txt: Added.
- platform/ios/http/tests/events/device-orientation-motion-secure-context-expected.txt: Added.
- 1:13 PM Changeset in webkit [239086] by
-
- 7 edits in trunk/Source/WebCore
[iOS] Send the full list of file upload URLs and types in PasteboardItemInfo
https://bugs.webkit.org/show_bug.cgi?id=192598
Work towards <rdar://problem/35626913>
Reviewed by Tim Horton.
Refactors PasteboardItemInfo to contain lists of file URLs and corresponding pasteboard types, instead of just
a "preferred" file upload URL and type. See below for more details.
- platform/PasteboardItemInfo.h:
(WebCore::PasteboardItemInfo::pathForContentType const):
Add a helper method to find a file upload URL corresponding to a given type.
(WebCore::PasteboardItemInfo::encode const):
(WebCore::PasteboardItemInfo::decode):
Change
pathForFileUploadtopathsForFileUpload, andcontentTypeForFileUploadtocontentTypesForFileUpload.
- platform/ios/AbstractPasteboard.h:
- platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::readRespectingUTIFidelities):
Adjust this to take the file path for the highest fidelity representation in
pathsForContentType.
(WebCore::Pasteboard::readFilePaths):
- platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::informationForItemAtIndex):
- platform/ios/WebItemProviderPasteboard.h:
- platform/ios/WebItemProviderPasteboard.mm:
(-[NSItemProvider web_containsFileURLAndFileUploadContent]):
(-[NSItemProvider web_fileUploadContentTypes]):
Replace
web_containsFileUploadContentwithweb_fileUploadContentTypes, which returns the full list of file
upload content types (rather than just aBOOLindicating whether one or more of these types exist).
(-[WebItemProviderPasteboard fileUploadURLsAtIndex:fileTypes:]):
(-[WebItemProviderPasteboard numberOfFiles]):
(-[NSItemProvider web_containsFileUploadContent]): Deleted.
(-[WebItemProviderPasteboard preferredFileUploadURLAtIndex:fileType:]): Deleted.
Replaced with
-fileUploadURLsAtIndex:fileTypes:. This implementation currently just returns the highest
fidelity loaded type identifier, but this is wrong because it doesn't take into account inline data types that
shouldn't be represented as data for file uploads (for instance, it never makes sense to upload the internal
data serialization for anNSURLas a file on the web).
Instead, use existing logic in
web_fileUploadContentTypesto determine which file types can be treated as file
uploads, and return all of these file types that we've loaded.
- 1:12 PM Changeset in webkit [239085] by
-
- 4 edits1 copy1 add in branches/safari-606-branch
Cherry-pick r238877. rdar://problem/45997440
Don't report resource timing to parent frame for history items
https://bugs.webkit.org/show_bug.cgi?id=192273
<rdar://problem/45163764>
Reviewed by Youenn Fablet.
Source/WebCore:
We should not report history items to its parent frame as those are less
interested to its parent and might not be the first navigation in the iframes.
This change aligns the behavior when a cached document is not available for the
history item with the available case as we don't report resource timing for any
cached main document.
Test: http/tests/misc/resource-timing-navigation-in-restored-iframe-2.html
- loader/FrameLoader.cpp: (WebCore::FrameLoader::loadDifferentDocumentItem):
LayoutTests:
- http/tests/misc/resource-timing-navigation-in-restored-iframe-2-expected.txt: Added.
- http/tests/misc/resource-timing-navigation-in-restored-iframe-2.html: Copied from LayoutTests/http/tests/misc/resource-timing-navigation-in-restored-iframe.html.
- http/tests/misc/resource-timing-navigation-in-restored-iframe.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238877 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 1:12 PM Changeset in webkit [239084] by
-
- 3 edits in branches/safari-606-branch/Source/WebCore
Cherry-pick r238582. rdar://problem/46085283
Refactor duplicate code for calling into media controls
https://bugs.webkit.org/show_bug.cgi?id=192040
<rdar://problem/46278931>
Reviewed by Youenn Fablet.
No new tests, no functional change.
- html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::setupAndCallJS): (WebCore::HTMLMediaElement::updateCaptionContainer): (WebCore::HTMLMediaElement::configureTextTrackDisplay): (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript): (WebCore::HTMLMediaElement::setControllerJSProperty): (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot): (WebCore::HTMLMediaElement::updateMediaControlsAfterPresentationModeChange): (WebCore::HTMLMediaElement::getCurrentMediaControlsStatus):
- html/HTMLMediaElement.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238582 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 1:12 PM Changeset in webkit [239083] by
-
- 3 edits in branches/safari-606-branch/Source/WebCore
Cherry-pick r238232. rdar://problem/46085281
Modernize RTCPeerConnection handling of pendingActivity
https://bugs.webkit.org/show_bug.cgi?id=191661
Reviewed by Eric Carlson.
makePendingActivity is the modern way to handle set/unset of pending activity.
No change of behavior.
- Modules/mediastream/RTCPeerConnection.cpp: (WebCore::RTCPeerConnection::create): (WebCore::RTCPeerConnection::doStop):
- Modules/mediastream/RTCPeerConnection.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238232 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 1:12 PM Changeset in webkit [239082] by
-
- 1 edit in branches/safari-606-branch/Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/ulpfec_receiver_impl.cc
Apply patch. rdar://problem/46603462
- 12:25 PM Changeset in webkit [239081] by
-
- 4 edits in trunk/Source/WebCore
Resource Load Statistics: Use common implementation within NetworkStorageSession
https://bugs.webkit.org/show_bug.cgi?id=192592
Reviewed by Alex Christensen.
There's nothing within the resource load statistics implementation contained
in NetworkStorageSessionCFNet that was CF specific. All of the resource load
statistics methods are moved from that file to the root NetworkStorageSession
implementation.
- platform/network/NetworkStorageSession.cpp:
(WebCore::getPartitioningDomain):
(WebCore::NetworkStorageSession::shouldBlockThirdPartyCookies const):
(WebCore::NetworkStorageSession::shouldBlockCookies const):
(WebCore::NetworkStorageSession::maxAgeCacheCap):
(WebCore::NetworkStorageSession::setAgeCapForClientSideCookies):
(WebCore::NetworkStorageSession::setPrevalentDomainsToBlockCookiesFor):
(WebCore::NetworkStorageSession::removePrevalentDomains):
(WebCore::NetworkStorageSession::hasStorageAccess const):
(WebCore::NetworkStorageSession::getAllStorageAccessEntries const):
(WebCore::NetworkStorageSession::grantStorageAccess):
(WebCore::NetworkStorageSession::removeStorageAccessForFrame):
(WebCore::NetworkStorageSession::removeStorageAccessForAllFramesOnPage):
(WebCore::NetworkStorageSession::removeAllStorageAccess):
(WebCore::NetworkStorageSession::setCacheMaxAgeCapForPrevalentResources):
(WebCore::NetworkStorageSession::resetCacheMaxAgeCapForPrevalentResources):
- platform/network/NetworkStorageSession.h:
- platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::getPartitioningDomain): Deleted.
(WebCore::NetworkStorageSession::shouldBlockThirdPartyCookies const): Deleted.
(WebCore::NetworkStorageSession::shouldBlockCookies const): Deleted.
(WebCore::NetworkStorageSession::maxAgeCacheCap): Deleted.
(WebCore::NetworkStorageSession::setAgeCapForClientSideCookies): Deleted.
(WebCore::NetworkStorageSession::setPrevalentDomainsToBlockCookiesFor): Deleted.
(WebCore::NetworkStorageSession::removePrevalentDomains): Deleted.
(WebCore::NetworkStorageSession::hasStorageAccess const): Deleted.
(WebCore::NetworkStorageSession::getAllStorageAccessEntries const): Deleted.
(WebCore::NetworkStorageSession::grantStorageAccess): Deleted.
(WebCore::NetworkStorageSession::removeStorageAccessForFrame): Deleted.
(WebCore::NetworkStorageSession::removeStorageAccessForAllFramesOnPage): Deleted.
(WebCore::NetworkStorageSession::removeAllStorageAccess): Deleted.
(WebCore::NetworkStorageSession::setCacheMaxAgeCapForPrevalentResources): Deleted.
(WebCore::NetworkStorageSession::resetCacheMaxAgeCapForPrevalentResources): Deleted.
- 12:24 PM Changeset in webkit [239080] by
-
- 12 edits in trunk
PSON logic gets confused by concurrent decidePolicyForNavigationAction requests
https://bugs.webkit.org/show_bug.cgi?id=192482
<rdar://problem/46470145>
Reviewed by Antti Koivisto.
Source/WebKit:
It is possible to get 2 parallel decidePolicyForNavigationAction() requests from the
WebProcess when a new load is started before responding to the existing policy
decision. This would lead to several issues with regards to PSON:
- We would decide to swap for the first policy decision and tell the WebProcess to suspend. However, because the WebProcess issued a new decidePolicyForNavigationAction since for the same frame, the previous one is invalidated and the WebProcess would ignore our request to suspend.
- We would hit assertions later on because the navigation has been destroyed and yet we're getting a didStartProvisionalLoad for it.
- swapToWebProcess() was asynchronous so that it would wait for the destination SuspendedPage to finish suspending before asking it to unsuspend. This led to various problems because anything can happen in the UIProcess while we're waiting for the suspension (e.g. another load). Also, we may create the SuspendedPageProxy for the current page too late and start getting IPC from the previous process about the suspension load to about:blank.
To address these issues, the following design is now implemented:
- swapToWebProcess() is no longer asynchronous
- instead, WebProcessPool::processForNavigation() is now asynchronous. This is better because at this point we have not yet told the WebProcess about the policy decision. We already properly deal with the policy decision being made asynchronously. This also allows us to choose another process if the SuspendedPage we'd like to use failed to suspend.
- If the WebProcess receives a PolicyAction::Suspend but ignores it, have it send an IPC to the UIProcess so that the SuspendedPageProxy knows about it. We then destroy the SuspendedPageProxy and make sure it is not used.
- After the asynchronous process selection, if the navigation has been destroy, abort the process-swap to avoid hitting assertions later on due to doing a load for a destroyed navigation.
- UIProcess/SuspendedPageProxy.cpp:
(WebKit::SuspendedPageProxy::~SuspendedPageProxy):
Make sure m_whenReadyToConsume completion handler gets called if necessary if the
SuspendedPageProxy gets destroyed. We pass null so that the SuspendedPage is not
used.
(WebKit::SuspendedPageProxy::whenReadyToConsume):
Add whenReadyToConsume() utility method to get a completion handler called when
the SuspendedPageProxy is ready to be used. This basically means we have to wait
for the page to finish its about:blank suspension load. If the suspension fails
then we call the completion handler with null to indicate that the suspended
page is not usable.
(WebKit::SuspendedPageProxy::unsuspendAndConsume):
Rename unsuspend() to unsuspendAndConsume() and make it synchronous. This only gets
called after whenReadyToConsume()'s completion handler has been called and if we
do decide to use the SuspendedPageProxy. It tells the WebProcess to unsuspend and
removes the SuspendedPageProxy from the WebProcessPool.
(WebKit::SuspendedPageProxy::didFinishLoad):
rename m_finishedSuspendingHandler to m_whenReadyToConsume.
(WebKit::SuspendedPageProxy::didFailToSuspend):
Add new didFailToSuspend() that gets called when the WebProcess sends us an IPC telling
us it ignored our request to suspend. We then call m_whenReadyToConsume completion
handler with null and destroy the SuspendedPageProxy.
(WebKit::SuspendedPageProxy::didReceiveMessage):
- UIProcess/SuspendedPageProxy.h:
- UIProcess/WebNavigationState.h:
(WebKit::WebNavigationState::hasNavigation const):
Add utility function to query if a navigation is still valid.
- UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::swapToWebProcess):
Update method so that it is no longer asynchronous. Some of its code was also moved to
continueNavigationInNewProcess() for clarity.
(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
Deal with WebProcessPool::processForNavigation() now being asynchronous.
(WebKit::WebPageProxy::continueNavigationInNewProcess):
Update code now that swapToWebProcess() is no longer asynchronous. Some of the swapToWebProcess()
code was also moved here for clarity.
(WebKit::WebPageProxy::didFailToSuspendAfterProcessSwap):
- UIProcess/WebPageProxy.h:
- UIProcess/WebPageProxy.messages.in:
Add new DidFailToSuspendAfterProcessSwap IPC message.
- UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processForNavigation):
(WebKit::WebProcessPool::processForNavigationInternal):
- UIProcess/WebProcessPool.h:
Make asynchronous. If we decide to use a SuspendedPageProxy's process, then call
whenReadyToConsume() on it to wait for it to suspend. If the SuspendedPageProxy
fails to suspend use a new process instead.
- WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::didReceivePolicyDecision):
If we ignore the policy decision and the decision was "Suspend", send the DidFailToSuspendAfterProcessSwap
IPC to the UIProcess so that the SuspendedPageProxy knows about it.
Tools:
Add API test coverage.
- TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
- 11:27 AM Changeset in webkit [239079] by
-
- 2 edits in trunk/Source/WebCore
Web Inspector: overlay bounds rulers don't match element when page is scrolled
https://bugs.webkit.org/show_bug.cgi?id=192577
Reviewed by Joseph Pecoraro.
When drawing the highlight for a node, the canvas is translated based on the scroll position
of the node. This translation was not applied to the bounds calculations, which meant that
the bounds always drew where the node would have been if it wasn't scrolled.
- inspector/InspectorOverlayPage.js:
(Bounds.prototype.get minX):
(Bounds.prototype.get minY):
(Bounds.prototype.get maxX):
(Bounds.prototype.get maxY):
(Bounds.prototype.offset): Added.
(drawNodeHighlight):
Drive-by: draw bounds for every node being highlighted instead of just the first one.
Drive-by: switch the bounds color to be a semi-transparent red for more visibility/contrast.
- 11:21 AM Changeset in webkit [239078] by
-
- 38 edits in trunk
Introduce makeBlockPtr for lambdas
https://bugs.webkit.org/show_bug.cgi?id=192594
Reviewed by Alex Christensen.
Source/WebCore:
Adopted makeBlockPtr.
- platform/cocoa/FileMonitorCocoa.mm:
(WebCore::FileMonitor::FileMonitor):
- platform/graphics/avfoundation/objc/VideoFullscreenLayerManagerObjC.mm:
(WebCore::VideoFullscreenLayerManagerObjC::setVideoFullscreenLayer):
- platform/graphics/gpu/legacy/cocoa/GPULegacyCommandBufferMetal.mm:
(WebCore::GPULegacyCommandBuffer::GPULegacyCommandBuffer):
- platform/network/cocoa/WebCoreNSURLSession.mm:
(-[WebCoreNSURLSession addDelegateOperation:]):
(-[WebCoreNSURLSessionDataTask resource:receivedRedirect:request:completionHandler:]):
- platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
(-[WebCoreResourceHandleAsOperationQueueDelegate callFunctionOnMainThread:]):
Source/WebCore/PAL:
Adopted makeBlockPtr.
- pal/Logging.cpp:
(PAL::registerNotifyCallback):
Source/WebKit:
Adopted makeBlockPtr.
- NetworkProcess/Downloads/cocoa/WKDownloadProgress.mm:
(-[WKDownloadProgress initWithDownloadTask:download:URL:sandboxExtension:]):
- NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
(WebKit::NetworkCache::IOChannel::read):
(WebKit::NetworkCache::IOChannel::write):
- NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::clearDiskCache):
(WebKit::saveCookies):
- NetworkProcess/watchos/NetworkProximityAssertion.mm:
(WebKit::BluetoothProximityAssertion::suspend):
- UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setInputDelegate:]):
- UIProcess/API/mac/WKView.mm:
(-[WKView maybeInstallIconLoadingClient]):
- UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(WebKit::WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard):
(WebKit::WebPaymentCoordinatorProxy::platformOpenPaymentSetup):
- UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
(WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):
- UIProcess/Cocoa/AutomationSessionClient.mm:
(WebKit::AutomationSessionClient::requestNewPageWithOptions):
(WebKit::AutomationSessionClient::requestSwitchToPage):
(WebKit::AutomationSessionClient::requestHideWindowOfPage):
(WebKit::AutomationSessionClient::requestRestoreWindowOfPage):
(WebKit::AutomationSessionClient::requestMaximizeWindowOfPage):
- UIProcess/Cocoa/DownloadClient.mm:
(WebKit::DownloadClient::didReceiveAuthenticationChallenge):
(WebKit::DownloadClient::decideDestinationWithSuggestedFilename):
- UIProcess/Cocoa/IconLoadingDelegate.mm:
(WebKit::IconLoadingDelegate::IconLoadingClient::getLoadDecisionForIcon):
- UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationClient::decidePolicyForPluginLoad):
(WebKit::NavigationState::NavigationClient::webGLLoadPolicy const):
(WebKit::NavigationState::NavigationClient::resolveWebGLLoadPolicy const):
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationResponse):
(WebKit::NavigationState::NavigationClient::didReceiveAuthenticationChallenge):
- UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
(WebKit::UIDelegate::UIClient::createNewPage):
(WebKit::UIDelegate::UIClient::runJavaScriptAlert):
(WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
(WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
(WebKit::UIDelegate::UIClient::requestStorageAccessConfirm):
(WebKit::UIDelegate::UIClient::decidePolicyForGeolocationPermissionRequest):
(WebKit::UIDelegate::UIClient::runBeforeUnloadConfirmPanel):
(WebKit::UIDelegate::UIClient::exceededDatabaseQuota):
(WebKit::UIDelegate::UIClient::windowFrame):
(WebKit::UIDelegate::UIClient::toolbarsAreVisible):
(WebKit::UIDelegate::UIClient::decidePolicyForNotificationPermissionRequest):
(WebKit::UIDelegate::UIClient::runOpenPanel):
(WebKit::requestUserMediaAuthorizationForDevices):
(WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest):
(WebKit::UIDelegate::UIClient::checkUserMediaPermissionForOrigin):
(WebKit::UIDelegate::UIClient::reachedApplicationCacheOriginQuota):
(WebKit::UIDelegate::UIClient::requestPointerLock):
- UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
(-[WKSafeBrowsingWarning clickedOnLink:]):
- UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::beginSafeBrowsingCheck):
- UIProcess/WebAuthentication/Cocoa/HidConnection.mm:
(WebKit::HidConnection::send):
- UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:
(WebKit::LocalConnection::getUserConsent const):
(WebKit::LocalConnection::getAttestation const):
- UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:
(WebKit::MockHidConnection::send):
- UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::requestPasswordForQuickLookDocument):
- UIProcess/ios/WKGeolocationProviderIOS.mm:
(-[WKGeolocationProviderIOS geolocationAuthorizationGranted]):
- UIProcess/mac/ServicesController.mm:
(WebKit::hasCompatibleServicesForItems):
(WebKit::ServicesController::refreshExistingServices):
- WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(PageLoaderClient::didStartProvisionalLoadForFrame):
Source/WTF:
BlockPtr<...>::fromCallable is cumbersome because it requires repeating the callable's
signature as a class template argument. This patch introduces an overload of makeBlockPtr
that deduces the correct BlockPtr instantiation from a lambda's operator() signature.
- wtf/BlockPtr.h:
(WTF::makeBlockPtr):
Adopted makeBlockPtr.
- wtf/cocoa/WorkQueueCocoa.cpp:
(WTF::WorkQueue::dispatch):
(WTF::WorkQueue::dispatchAfter):
(WTF::WorkQueue::concurrentApply):
Tools:
Adopted makeBlockPtr and added API tests.
- DumpRenderTree/TestRunner.cpp:
(TestRunner::callUIScriptCallback):
- TestWebKitAPI/Tests/WTF/BlockPtr.mm:
(TestWebKitAPI::TEST):
- TestWebKitAPI/Tests/WebKitCocoa/DownloadProgress.mm:
(-[DownloadProgressTestRunner init]):
(-[DownloadProgressTestRunner subscribeAndWaitForProgress]):
- 11:10 AM Changeset in webkit [239077] by
-
- 2 edits in trunk/Tools
REGRESSION (r238764-238783): TestWTF.WTF.StringOperators is failing
https://bugs.webkit.org/show_bug.cgi?id=192361
<rdar://problem/46524903>
Reviewed by Alex Christensen.
Compile StringOperators.cpp with -O1 optimization level instead of -Os. This
fixes the failures for me locally.
- TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
- 10:45 AM Changeset in webkit [239076] by
-
- 2 edits in trunk/Source/WebKit
Fix an internal build failure after r239014
https://bugs.webkit.org/show_bug.cgi?id=192205
- UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
(fontOfSize):
There's a system that doesn't have safe browsing or UIFontTextStyleLargeTitle.
- 10:12 AM Changeset in webkit [239075] by
-
- 17 edits1 copy in branches/safari-606-branch
Cherry-pick r239062. rdar://problem/46603464
2018-12-10 Mark Lam <mark.lam@apple.com>
PropertyAttribute needs a CustomValue bit.
https://bugs.webkit.org/show_bug.cgi?id=191993
<rdar://problem/46264467>
Reviewed by Saam Barati.
JSTests:
- stress/regress-191993.js: Added.
Source/JavaScriptCore:
This is because GetByIdStatus needs to distinguish CustomValue properties from
other types, and its only means of doing so is via the property's attributes.
Previously, there's nothing in the property's attributes that can indicate that
the property is a CustomValue.
We fix this by doing the following:
- Added a PropertyAttribute::CustomValue bit.
- Added a PropertyAttribute::CustomAccessorOrValue convenience bit mask that is CustomAccessor | CustomValue.
- Since CustomGetterSetter properties are only set via JSObject::putDirectCustomAccessor(), we added a check in JSObject::putDirectCustomAccessor() to see if the attributes bits include PropertyAttribute::CustomAccessor. If not, then the property must be a CustomValue, and we'll add the PropertyAttribute::CustomValue bit to the attributes bits.
This ensures that the property attributes is sufficient to tell us if the
property contains a CustomGetterSetter.
- Updated all checks for PropertyAttribute::CustomAccessor to check for PropertyAttribute::CustomAccessorOrValue instead if their intent is to check for the presence of a CustomGetterSetter as opposed to checking specifically for one that is used as a CustomAccessor.
This includes all the Structure transition code that needs to capture the
attributes change when a CustomValue has been added.
- Filtered out the PropertyAttribute::CustomValue bit in PropertyDescriptor. The fact that we're using a CustomGetterSetter as a CustomValue should remain invisible to the descriptor. This is because the descriptor should describe a CustomValue no differently from a plain value.
- Added some asserts to ensure that property attributes are as expected, and to document some invariants.
- bytecode/GetByIdStatus.cpp: (JSC::GetByIdStatus::computeFromLLInt): (JSC::GetByIdStatus::computeForStubInfoWithoutExitSiteFeedback): (JSC::GetByIdStatus::computeFor):
- bytecode/InByIdStatus.cpp: (JSC::InByIdStatus::computeForStubInfoWithoutExitSiteFeedback):
- bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const):
- bytecode/PutByIdStatus.cpp: (JSC::PutByIdStatus::computeFor):
- runtime/JSFunction.cpp: (JSC::getCalculatedDisplayName):
- runtime/JSObject.cpp: (JSC::JSObject::putDirectCustomAccessor): (JSC::JSObject::putDirectNonIndexAccessor): (JSC::JSObject::putDirectIndexSlowOrBeyondVectorLength):
- runtime/JSObject.h: (JSC::JSObject::putDirectIndex): (JSC::JSObject::fillCustomGetterPropertySlot): (JSC::JSObject::putDirect):
- runtime/JSObjectInlines.h: (JSC::JSObject::putDirectInternal):
- runtime/PropertyDescriptor.cpp: (JSC::PropertyDescriptor::setDescriptor): (JSC::PropertyDescriptor::setCustomDescriptor): (JSC::PropertyDescriptor::setAccessorDescriptor):
- runtime/PropertySlot.h: (JSC::PropertySlot::setCustomGetterSetter):
Source/WebCore:
This patch revealed a bug in the CodeGenerator where a constructor property is
set with a ReadOnly attribute. This conflicts with the WebIDL link (see clause
12 in https://heycam.github.io/webidl/#interface-prototype-object) which states
that it should be [Writable]. The ReadOnly attribute is now removed.
On the WebCore side, this change is covered by existing tests.
- bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation):
- bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: (WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor):
- 9:39 AM Changeset in webkit [239074] by
-
- 2 edits in trunk/Source/WebKit
SimulatedInputDispatcher::transitionInputSourceToState() can reuse a moved-from completion handler
https://bugs.webkit.org/show_bug.cgi?id=191155
<rdar://problem/45745569>
Reviewed by Joseph Pecoraro.
- UIProcess/Automation/SimulatedInputDispatcher.cpp:
(WebKit::SimulatedInputDispatcher::transitionInputSourceToState):
Add an ASSERT to guard against unexpected inputs where >1 VirtualKey changes per state.
webkitdriver needs to be updated to not produce such states in this scenario, but this will
avoid a runtime crash caused by trying to call a moved-out completion handler a second time.
- 7:14 AM Changeset in webkit [239073] by
-
- 2 edits in trunk/Tools
Unreviewed, WPE build fix after r239028
The FLATPAK_USER_DIR env var is not set early enough, leading to:
Traceback (most recent call last):
File "/home/phil/WebKit/Tools/Scripts/webkit-flatpak", line 28, in <module>
sys.exit(WebkitFlatpak.load_from_args().run())
File "/home/phil/WebKit/Tools/flatpak/flatpakutils.py", line 761, in run
if not self.clean_args():
File "/home/phil/WebKit/Tools/flatpak/flatpakutils.py", line 574, in clean_args
_log.debug("Using flatpak user dir: %s" % os.environFLATPAK_USER_DIR)
File "/usr/lib/python2.7/UserDict.py", line 40, in getitem
raise KeyError(key)
KeyError: 'FLATPAK_USER_DIR'
- flatpak/flatpakutils.py:
(WebkitFlatpak.clean_args):
- 6:33 AM Changeset in webkit [239072] by
-
- 58 edits in trunk/Source/WebKit
Unreviewed, rolling out r239071.
https://bugs.webkit.org/show_bug.cgi?id=192588
Broke WPE build due to undefined references to toAPI() and
toImpl() inside the C API (Requested by magomez on #webkit).
Reverted changeset:
"[meta][WebKit] Remove using namespace WebCore and WebKit in
the global scope for unified source builds"
https://bugs.webkit.org/show_bug.cgi?id=192449
https://trac.webkit.org/changeset/239071