timothy_horton@apple.com [Mon, 12 Jun 2017 22:28:25 +0000 (22:28 +0000)]
[iOS] Cmd-C doesn't copy text from WKWebView
https://bugs.webkit.org/show_bug.cgi?id=173277
<rdar://problem/
32396742>
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKWebView.mm:
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _lookupForWebView:]):
(-[WKContentView _shareForWebView:]):
(-[WKContentView _addShortcutForWebView:]):
(-[WKContentView _promptForReplaceForWebView:]):
(-[WKContentView _transliterateChineseForWebView:]):
(-[WKContentView _reanalyzeForWebView:]):
(-[WKContentView replaceForWebView:]):
(-[WKContentView canPerformAction:withSender:]):
(-[WKContentView copyForWebView:]):
(-[WKContentView cutForWebView:]):
(-[WKContentView pasteForWebView:]):
(-[WKContentView selectForWebView:]):
(-[WKContentView selectAllForWebView:]):
(-[WKContentView toggleBoldfaceForWebView:]):
(-[WKContentView toggleItalicsForWebView:]):
(-[WKContentView toggleUnderlineForWebView:]):
(-[WKContentView _showTextStyleOptionsForWebView:]):
(-[WKContentView _defineForWebView:]):
(-[WKContentView _arrowKeyForWebView:]):
(-[WKContentView _lookup:]): Deleted.
(-[WKContentView _share:]): Deleted.
(-[WKContentView _addShortcut:]): Deleted.
(-[WKContentView _promptForReplace:]): Deleted.
(-[WKContentView _transliterateChinese:]): Deleted.
(-[WKContentView _reanalyze:]): Deleted.
(-[WKContentView replace:]): Deleted.
(-[WKContentView copy:]): Deleted.
(-[WKContentView cut:]): Deleted.
(-[WKContentView paste:]): Deleted.
(-[WKContentView select:]): Deleted.
(-[WKContentView selectAll:]): Deleted.
(-[WKContentView toggleBoldface:]): Deleted.
(-[WKContentView toggleItalics:]): Deleted.
(-[WKContentView toggleUnderline:]): Deleted.
(-[WKContentView _showTextStyleOptions:]): Deleted.
(-[WKContentView _define:]): Deleted.
(-[WKContentView _arrowKey:]): Deleted.
Similar to what r211897 did for canPerformAction, and other patches
have done for other selectors, forward methods for standard editing
commands from WKContentView up to WKWebView, and back down to WKContentView.
This is necessary because these are not treated as normal
responder-chain-respecting methods, so they do not bubble up the view tree.
In 211897, WKContentView (who is usually first responder and thus receives
the actions) stopped claiming to be able to perform these actions, depending
on this non-existent bubbling behavior to keep them working.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tests/WebKit2Cocoa/WKContentViewEditingActions.mm:
Add a test ensuring that -copy on WKContentView will cause text to be copied.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218144
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Mon, 12 Jun 2017 22:09:56 +0000 (22:09 +0000)]
[Curl] Use SynchronousLoaderClient for platformLoadResourceSynchronously on WinCairo
https://bugs.webkit.org/show_bug.cgi?id=173195
Patch by Basuke Suzuki <Basuke.Suzuki@sony.com> on 2017-06-12
Reviewed by Alex Christensen.
* PlatformWinCairo.cmake:
* platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::platformLoadResourceSynchronously):
* platform/network/curl/SynchronousLoaderClientCurl.cpp: Added.
(WebCore::SynchronousLoaderClient::didReceiveAuthenticationChallenge):
(WebCore::SynchronousLoaderClient::platformBadResponseError):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218142
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
sbarati@apple.com [Mon, 12 Jun 2017 22:07:18 +0000 (22:07 +0000)]
Update test262 test expectation since r218082 makes new tests pass.
* test262.yaml:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218141
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
eric.carlson@apple.com [Mon, 12 Jun 2017 21:56:55 +0000 (21:56 +0000)]
[MediaStream iOS] If a capturing tab is muted while it is in the background, it can not be unmuted
https://bugs.webkit.org/show_bug.cgi?id=173268
<rdar://problem/
32259809>
Reviewed by Jer Noble.
No new tests, tested manually.
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::startProducingData): Mute the private stream if page capture is muted.
(WebCore::MediaStream::mediaState): Set new interrupted state.
* dom/Document.cpp:
(WebCore::Document::notifyMediaCaptureOfVisibilityChanged): Don't track "muted for visibility"
state, let the source center deal with it.
* dom/Document.h:
* page/MediaProducer.h: Add bits for interrupted audio and video capture.
* platform/mediastream/RealtimeMediaSource.cpp:
(WebCore::RealtimeMediaSource::RealtimeMediaSource): Drive-by fix: delete m_suppressNotifications,
it isn't used.
(WebCore::RealtimeMediaSource::setInterrupted): New. Mute capture when an interruption begins,
and unmute when it ends in an unmuted page.
(WebCore::RealtimeMediaSource::setMuted): Do not unmute if interrupted.
(WebCore::RealtimeMediaSource::settingsDidChange): Don't check m_suppressNotifications, it is
never set.
* platform/mediastream/RealtimeMediaSource.h:
* platform/mediastream/RealtimeMediaSourceCenter.cpp:
(WebCore::RealtimeMediaSourceCenter::setVideoCapturePageState): Renamed from
setVideoCaptureMutedForPageVisibility.
(WebCore::RealtimeMediaSourceCenter::setVideoCaptureMutedForPageVisibility): Deleted.
* platform/mediastream/RealtimeMediaSourceCenter.h:
* platform/mediastream/mac/AVMediaCaptureSource.h:
* platform/mediastream/mac/AVMediaCaptureSource.mm:
(WebCore::AVMediaCaptureSource::stopProducingData): Clear m_interruption because the session
has been deleted, so we will never get an "end interruption" notification.
(WebCore::AVMediaCaptureSource::captureSessionIsRunningDidChange): Don't return early if
the muted state needs to be updated.
(WebCore::AVMediaCaptureSource::captureSessionEndInterruption): Return early if the session
has been cleared.
(WebCore::AVMediaCaptureSource::interrupted): New.
* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSourceFactory::setVideoCapturePageState): Renamed from
setVideoCaptureMutedForPageVisibility.
(WebCore::AVVideoCaptureSourceFactory::setVideoCaptureMutedForPageVisibility): Deleted.
* platform/mock/MockRealtimeVideoSource.cpp:
(WebCore::MockRealtimeVideoSourceFactory::setVideoCapturePageState): Ditto.
(WebCore::MockRealtimeVideoSourceFactory::setVideoCaptureMutedForPageVisibility): Deleted.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218140
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jbedard@apple.com [Mon, 12 Jun 2017 21:35:25 +0000 (21:35 +0000)]
Garden tests for on-device testing
Unreviewed test gardening.
The tests gardened here have not been investigated. https://bugs.webkit.org/show_bug.cgi?id=173275
tracks the investigation of the tests marked as failing, crashing or skipped because they timeout
when running layout tests on-device in this revision.
* platform/ios-device/TestExpectations: Initial gardening of expectations for on-device testing.
* platform/ios-simulator-wk2/TestExpectations: Moved simulator specific expectations from platfrom/ios-wk2.
* platform/ios-simulator/TestExpectations: Moved simulator specific expectations from platfrom/ios.
* platform/ios-simulator/compositing: Removed.
* platform/ios-wk2/TestExpectations: Moved simulator specific expectation to platform/ios-simulator-wk2.
* platform/ios/TestExpectations: Moved simulator specific expectation to platform/ios.
* platform/ios/compositing/iframes/compositing-for-scrollable-iframe-expected.txt: Copied from
LayoutTests/platform/ios-simulator/compositing/iframes/compositing-for-scrollable-iframe-expected.txt.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218139
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cdumez@apple.com [Mon, 12 Jun 2017 21:31:59 +0000 (21:31 +0000)]
Null dereference under WebProcessPool::pageRemovedFromProcess()
https://bugs.webkit.org/show_bug.cgi?id=173271
<rdar://problem/
32038814>
Reviewed by Ryosuke Niwa.
Null-check networkProcess() before dereferencing it in WebProcessPool::pageRemovedFromProcess().
This is the only place in this class where we failed to null check before dereferencing
networkProcess(). To my knowledge, there is no guarantee there is a network process.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::pageRemovedFromProcess):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218138
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
sbarati@apple.com [Mon, 12 Jun 2017 21:01:52 +0000 (21:01 +0000)]
We should not claim that SpecEmpty is filtered out of cell checks on 64 bit platforms
https://bugs.webkit.org/show_bug.cgi?id=172957
<rdar://problem/
32602704>
Reviewed by Filip Pizlo.
JSTests:
* stress/spec-empty-flows-through-cell-checks.js: Added.
(A):
(B):
(i.catch):
Source/JavaScriptCore:
Consider this program:
```
block#1:
n: GetClosureVar(..., |this|) // this will load empty JSValue()
SetLocal(Cell:@n, locFoo) // Cell check succeeds because JSValue() looks like a cell
Branch(#2, #3)
Block#3:
x: GetLocal(locFoo)
y: CheckNotEmpty(@x)
```
If we claim that a cell check filters out the empty value, we will
incorrectly eliminate the CheckNotEmpty node @y. This patch fixes AI,
FTLLowerDFGToB3, and DFGSpeculativeJIT to no longer make this claim.
On 64 bit platforms:
- Cell use kind *now allows* the empty value to pass through.
- CellOrOther use kind *now allows* for the empty value to pass through
- NotCell use kind *no longer allows* the empty value to pass through.
* assembler/CPU.h:
(JSC::isARMv7IDIVSupported):
(JSC::isARM64):
(JSC::isX86):
(JSC::isX86_64):
(JSC::is64Bit):
(JSC::is32Bit):
(JSC::isMIPS):
Make these functions constexpr so we can use them in static variable assignment.
* bytecode/SpeculatedType.h:
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileValueToInt32):
(JSC::DFG::SpeculativeJIT::compileDoubleRep):
(JSC::DFG::SpeculativeJIT::compileLogicalNotStringOrOther):
(JSC::DFG::SpeculativeJIT::emitStringOrOtherBranch):
(JSC::DFG::SpeculativeJIT::speculateCell):
(JSC::DFG::SpeculativeJIT::speculateCellOrOther):
(JSC::DFG::SpeculativeJIT::speculateObjectOrOther):
(JSC::DFG::SpeculativeJIT::speculateString):
(JSC::DFG::SpeculativeJIT::speculateStringOrOther):
(JSC::DFG::SpeculativeJIT::speculateSymbol):
(JSC::DFG::SpeculativeJIT::speculateNotCell):
* dfg/DFGSpeculativeJIT32_64.cpp:
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::fillSpeculateCell):
(JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
(JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
* dfg/DFGUseKind.h:
(JSC::DFG::typeFilterFor):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileDoubleRep):
(JSC::FTL::DFG::LowerDFGToB3::numberOrNotCellToInt32):
(JSC::FTL::DFG::LowerDFGToB3::compareEqObjectOrOtherToObject):
(JSC::FTL::DFG::LowerDFGToB3::boolify):
(JSC::FTL::DFG::LowerDFGToB3::equalNullOrUndefined):
(JSC::FTL::DFG::LowerDFGToB3::lowCell):
(JSC::FTL::DFG::LowerDFGToB3::lowNotCell):
(JSC::FTL::DFG::LowerDFGToB3::isCellOrMisc):
(JSC::FTL::DFG::LowerDFGToB3::isNotCellOrMisc):
(JSC::FTL::DFG::LowerDFGToB3::isNotCell):
(JSC::FTL::DFG::LowerDFGToB3::isCell):
(JSC::FTL::DFG::LowerDFGToB3::speculateCellOrOther):
(JSC::FTL::DFG::LowerDFGToB3::speculateObjectOrOther):
(JSC::FTL::DFG::LowerDFGToB3::speculateString):
(JSC::FTL::DFG::LowerDFGToB3::speculateStringOrOther):
(JSC::FTL::DFG::LowerDFGToB3::speculateSymbol):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218137
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jiewen_tan@apple.com [Mon, 12 Jun 2017 20:27:00 +0000 (20:27 +0000)]
[WebCrypto] Remove experimental feature flag of SubtleCrypto
https://bugs.webkit.org/show_bug.cgi?id=173197
<rdar://problem/
32688148>
Reviewed by Brent Fulgham.
Source/WebCore:
The SubtleCrypto implementation is no longer experimental and is ready for production use. We are therefore removing the runtime flag.
No tests.
* page/Crypto.idl:
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setSubtleCryptoEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::subtleCryptoEnabled): Deleted.
Source/WebKit/mac:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences subtleCryptoEnabled]): Deleted.
(-[WebPreferences setSubtleCryptoEnabled:]): Deleted.
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):
Source/WebKit2:
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetSubtleCryptoEnabled): Deleted.
(WKPreferencesGetSubtleCryptoEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
Tools:
* DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures):
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::beginTesting):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setSubtleCryptoEnabled): Deleted.
* WebKitTestRunner/InjectedBundle/TestRunner.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218129
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
wenson_hsieh@apple.com [Mon, 12 Jun 2017 20:05:07 +0000 (20:05 +0000)]
[iOS DnD] Allow the injected bundle to add client data when writing an image to the pasteboard
https://bugs.webkit.org/show_bug.cgi?id=173238
<rdar://problem/
31943370>
Reviewed by Ryosuke Niwa and Tim Horton.
Source/WebCore:
Add clientTypes and clientData to PasteboardImage, and call out to the injected bundle using
getClientPasteboardDataForRange when writing a PasteboardImage. When generating item providers for dragging in
the UI process in PlatformPasteboard, add any available client data as representations to the initialization
list used to set the WebItemProviderPasteboard.
Test: DataInteraction.InjectedBundleImageElementData
* editing/ios/EditorIOS.mm:
(WebCore::Editor::writeImageToPasteboard):
* platform/Pasteboard.h:
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::writeObjectRepresentations):
Source/WebKit2:
Send PasteboardImage.clientTypes and PasteboardImage.clientData over IPC.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::encodeClientTypesAndData):
(IPC::decodeClientTypesAndData):
Factor out common logic used to encode and decode client types and data into static helpers.
(IPC::ArgumentCoder<PasteboardWebContent>::encode):
(IPC::ArgumentCoder<PasteboardWebContent>::decode):
(IPC::ArgumentCoder<PasteboardImage>::encode):
(IPC::ArgumentCoder<PasteboardImage>::decode):
Tools:
Add a new unit test to verify that data inserted by the injected bundle when beginning a drag on an image
element is plumbed across to the UI delegate. Also refactors injected bundle unit tests to use the new version
of adjustedDataInteractionItemProvidersForItemProvider: that takes representing objects and additional data.
* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/ios/DataInteractionSimulator.h:
* TestWebKitAPI/ios/DataInteractionSimulator.mm:
(-[DataInteractionSimulator _webView:adjustedDataInteractionItemProvidersForItemProvider:representingObjects:additionalData:]):
(-[DataInteractionSimulator _webView:adjustedDataInteractionItemProviders:]): Deleted.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218128
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
graouts@webkit.org [Mon, 12 Jun 2017 19:52:05 +0000 (19:52 +0000)]
Add tests for the SkipForwardButton class
https://bugs.webkit.org/show_bug.cgi?id=173214
Reviewed by Jon Lee.
* media/modern-media-controls/skip-forward-button/skip-forward-button-expected.txt: Added.
* media/modern-media-controls/skip-forward-button/skip-forward-button.html: Added.
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218127
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Mon, 12 Jun 2017 19:50:39 +0000 (19:50 +0000)]
[WebIDL] Re-implement GetOwnPropertySlot[ByIndex] generation to more closely follow WebIDL
https://bugs.webkit.org/show_bug.cgi?id=173229
Patch by Sam Weinig <sam@webkit.org> on 2017-06-12
Reviewed by Chris Dumez.
LayoutTests/imported/w3c:
* web-platform-tests/html/semantics/forms/the-form-element/form-nameditem-expected.txt:
Update results for more passing tests.
Source/WebCore:
* WebCore.xcodeproj/project.pbxproj:
* CMakeLists.txt:
* bindings/js/JSBindingsAllInOne.cpp:
Remove JSHTMLFrameSetElementCustom.cpp which is no longer needed.
* bindings/js/JSDOMAbstractOperations.h:
(WebCore::isVisibleNamedProperty):
Add OverrideBuiltins enum as requested by a previous review (and I forgot address) and adopt it
in isVisibleNamedProperty, switch to VMInquiry as we use elsewhere and add a missing FIXME.
(WebCore::accessVisibleNamedProperty):
Add variation of isVisibleNamedProperty that takes a functor and returns either the value the
functor returns, or std::nullopt. This allows getOwnPropertySlot to avoid doing two lookups for
property, once in the named property visibility algorithm and again when it needs the value.
* bindings/js/JSDOMWindowBase.cpp:
* bindings/js/JSDOMWindowBase.h:
* bindings/js/JSDOMWindowShell.cpp:
* bindings/js/JSDOMWindowShell.h:
Standardize toJS functions to match generated code (have one that takes a reference, and does the
cast, and one that takes a pointer, does a null check and calls the one that takes a reference).
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::getOwnPropertySlot):.
Update to use the implementation namedItem (which is also used by the generated getOwnPropertySlotByIndex)
and match the updated bindings rules. This cannot yet be generated due to the odd case of the 'open'
property requiring custom treatment. I tried removing this, but it cause tests to fail in a way that indicated
that accessing the lexical global object in the open implementation was not working correctly.
* bindings/js/JSHTMLFrameSetElementCustom.cpp: Removed.
Now generated.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateIndexedGetter):
Add description from the spec and change to return the computed values rather than
print them to the output array. This will be useful for some clients going forward,
who only want the attributes.
(GenerateNamedGetter):
Add description from the spec and change to return the computed values rather than
print them to the output array. This will be useful for some clients going forward,
who only want the attributes. Also greatly simplifies things as [CustomNamedGetter]s
are no longer needed/supported and the exception / null value checks are performed
elsewhere.
(GenerateNamedGetterLambda):
This generates a lambda functor for use in accessVisibleNamedProperty(...). It
handles calling the named getter implementation, and transforming the result into
an one that can be reasoned about by accessVisibleNamedProperty, specifically,
converting it from using IDL's notion of nullability to std::optional.
(GenerateGetOwnPropertySlot):
(GenerateGetOwnPropertySlotByIndex):
Add spec annotations and use helper functions.
(GenerateGetOwnPropertyNames):
Add FIXME about supporting non-contiguous indices (should that ever come up)
and use JSObject explicitly, rather than base, to get the default getOwnPropertyNames
implementation.
(GeneratePut):
Use JSObject explicitly, rather than base, to get the default put implementation.
(GeneratePutByIndex):
Use JSObject explicitly, rather than base, to get the default putByIndex implementation.
(GenerateDefineOwnProperty):
Use JSObject explicitly, rather than base, to get the default getOwnPropertySlot/defineOwnProperty
implementations.
(GenerateDeletePropertyCommon):
Adopt new OverrideBuiltins enum.
(GenerateDeletePropertyDefinition):
Use JSObject explicitly, rather than base, to get the default deleteProperty implementation.
(GenerateDeletePropertyByIndexDefinition):
Use JSObject explicitly, rather than base, to get the default deletePropertyByIndex implementation.
(InstanceOverridesGetOwnPropertySlot):
Remove [CustomNamedGetter] use.
(GenerateHeader):
Remove [CustomNamedGetter] use and merge InstanceOverridesGetOwnPropertySlotByIndex into
InstanceOverridesGetOwnPropertySlot. Specifying either [CustomGetOwnPropertySlot] or
[CustomGetOwnPropertySlotByIndex] will now declare both hooks.
(GenerateImplementation):
Rename GenerateGetOwnPropertySlotBody/GenerateGetOwnPropertySlotByIndexBody to remove the 'Body',
and predicate their generation purely on InstanceOverridesGetOwnPropertySlot as noted for the
reasons above.
(GenerateGetOwnPropertySlotBody): Deleted.
(GenerateGetOwnPropertySlotBodyByIndex): Deleted.
(InstanceOverridesGetOwnPropertySlotByIndex): Deleted.
* bindings/scripts/IDLAttributes.json:
Remove [CustomNamedGetter].
* dom/ExceptionOr.h:
(WebCore::ExceptionOr<ReturnType>::returnValue):
Add a function to peek at the return value
* html/HTMLDocument.h:
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::clear):
(WebCore::HTMLDocument::captureEvents):
(WebCore::HTMLDocument::releaseEvents):
Move clear up to be with the other obsolete no-op functions. Add spec annotations
to clear up any confusion about why they are no-ops.
(WebCore::HTMLDocument::namedItem):
Add implementation of namedItem based on the one that was in JSDOMHTMLDocumentCustom.cpp.
(WebCore::HTMLDocument::supportedPropertyNames):
Add stub version of supportedPropertyNames with the algorithm we need to implement.
I don't want to change behavior in this patch, and since we have not enumerated the
properties of document in the past, I left this unimplemented for now.
* html/HTMLDocument.idl:
Remove [CustomNamedGetter] and add named getter.
* html/HTMLFrameSetElement.h:
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::namedItem):
Add named getter based on the implementation in JSHTMLFrameSetElementCustom.cpp.
(WebCore::HTMLFrameSetElement::supportedPropertyNames):
As noted above, I don't want to change behavior with this change, so I have left this unimplemented
for now. However, we may not want to implement it at all, as this named getter is not specified and
at least Firefox does not support it.
* html/HTMLFrameSetElement.idl:
Remove [CustomNamedGetter] and add named getter.
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
* bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
* bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
* bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
* bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
* bindings/scripts/test/JS/JSTestNode.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
Update test results.
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Removed.
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h: Removed.
* bindings/scripts/test/TestCustomNamedGetter.idl: Removed.
Remove test of [CustomNamedGetter] which no longer exists.
LayoutTests:
* fast/dom/HTMLDocument/document-special-properties-expected.txt:
Update results. Named properties on HTMLDocument no longer override own properties, they
only override properties from the prototype chain (as per the WebIDL specification for
OverrideBuiltins). These results now also match Firefox.
* js/dom/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps-4.html:
* js/dom/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps-5.html:
* js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-4.html:
* js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-5-short.html:
* js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-5.html:
Update tests to use a property on the prototype, rather than the instance, to test
overriding the [GetOwnProperty] hook. This is needed now that HTMLDocument correctly
follows the OverrideBuiltins rules as explained above.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218126
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
wenson_hsieh@apple.com [Mon, 12 Jun 2017 19:34:37 +0000 (19:34 +0000)]
WebItemProviderPasteboard should call its completion block immediately after a synchronous load
https://bugs.webkit.org/show_bug.cgi?id=173225
<rdar://problem/
32713144>
Reviewed by Tim Horton.
Source/WebCore:
Ensures that a completion block passed to doAfterLoadingProvidedContentIntoFileURLs:synchronousTimeout: will be
invoked immediately, if a synchronous timeout is specified and loading finishes before the synchronous timeout
is reached. To do this, we first factor out the completion logic into a new block. If the synchronous timeout
exists and dispatch_group_wait returns 0 (indicating that the dispatch group finished without hitting the
wait timeout) we simply invoke the block and return early; otherwise, we will register the completion block
using dispatch_group_notify.
Test: DataInteractionTests.WebItemProviderPasteboardLoading
* platform/ios/WebItemProviderPasteboard.mm:
(-[WebItemProviderPasteboard doAfterLoadingProvidedContentIntoFileURLs:synchronousTimeout:]):
Tools:
Adds a new unit test to verify whether the completion block is called synchronously or asynchronously, in both
cases where the synchronous timeout is very large, and the synchronous timeout is not used (0).
* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
(TestWebKitAPI::TEST):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218125
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
wenson_hsieh@apple.com [Mon, 12 Jun 2017 19:19:38 +0000 (19:19 +0000)]
[iOS DnD] Introduce hooks to override targeted drag previews when lifting and cancelling
https://bugs.webkit.org/show_bug.cgi?id=173240
<rdar://problem/
31943370>
Reviewed by Ryosuke Niwa and Tim Horton.
Adds two new delegate hooks: _webView:previewForLiftingItem:session: and
_webView:previewForCancellingItem:withDefault:.
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218124
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jbedard@apple.com [Mon, 12 Jun 2017 19:07:07 +0000 (19:07 +0000)]
Return correct process names for iOS on-device testing
https://bugs.webkit.org/show_bug.cgi?id=173263
Reviewed by Alex Christensen.
When running tests on iOS devices, process names do not end with '.Development'
as they do on Mac and iOS simulator.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::webProcessName): Return correct process name without '.Development'
for iOS on-device testing.
(WTR::TestController::networkProcessName): Ditto.
(WTR::TestController::databaseProcessName): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218123
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
sbarati@apple.com [Mon, 12 Jun 2017 19:00:23 +0000 (19:00 +0000)]
Unreviewed. Unmark test as flaky after fix in r217944. The test should now pass.
* platform/mac/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218122
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cdumez@apple.com [Mon, 12 Jun 2017 18:55:32 +0000 (18:55 +0000)]
Regression(r217867): Legacy SessionHistoryEntryData format should not change
https://bugs.webkit.org/show_bug.cgi?id=173267
<rdar://problem/
32701257>
Reviewed by Simon Fraser.
Source/WebKit2:
Revert changes to Legacy SessionHistoryEntryData format that were made in r217867,
as this apparently breaks compatiblity.
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::encodeFrameStateNode):
(WebKit::decodeBackForwardTreeNode):
Tools:
Restrict test to stop covering saving / restore of scrollRestoration via the legacy
SessionHistoryEntryData. Maintain coverage for the default value of scrollRestoration
though as this covers the crash that r217867 was fixing.
* TestWebKitAPI/Tests/WebKit2/RestoreSessionState.cpp:
(TestWebKitAPI::createSessionStateData):
(TestWebKitAPI::TEST):
(TestWebKitAPI::createSessionStateDataContainingScrollRestoration): Deleted.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218121
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Mon, 12 Jun 2017 18:45:38 +0000 (18:45 +0000)]
WebAVPlayerController minTime and maxTime should be calculated properties to provide correct values when streaming.
https://bugs.webkit.org/show_bug.cgi?id=173193
rdar://problem/
32684807
Patch by Jeremy Jones <jeremyj@apple.com> on 2017-06-12
Reviewed by Jer Noble.
No new tests because no affect on the DOM. This only affects properties consumed to AVKit.
-minTime and -maxTime should be calculated properties so they supply the exptected values to AVKit while streaming.
* platform/ios/WebAVPlayerController.h:
* platform/ios/WebAVPlayerController.mm:
(-[WebAVPlayerController maxTime]):
(+[WebAVPlayerController keyPathsForValuesAffectingMaxTime]):
(-[WebAVPlayerController minTime]):
(+[WebAVPlayerController keyPathsForValuesAffectingMinTime]):
(-[WebAVPlayerController resetMediaState]):
* platform/ios/WebPlaybackSessionInterfaceAVKit.mm:
(WebCore::WebPlaybackSessionInterfaceAVKit::durationChanged):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218114
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
utatane.tea@gmail.com [Mon, 12 Jun 2017 18:42:47 +0000 (18:42 +0000)]
Unreviewed, suppress invalid register alloation validation assertion in 32 bit
https://bugs.webkit.org/show_bug.cgi?id=172421
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileArrayIndexOf):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218113
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
gskachkov@gmail.com [Mon, 12 Jun 2017 18:23:59 +0000 (18:23 +0000)]
We incorrectly allow escaped characters in keyword tokens
https://bugs.webkit.org/show_bug.cgi?id=171310
Reviewed by Yusuke Suzuki.
JSTests:
* stress/destructuring-assignment-syntax.js:
* stress/error-messages-for-in-operator-should-not-crash.js:
(catch):
* stress/reserved-word-with-escape.js:
(testSyntaxError.String.raw.v):
(String.raw.SyntaxError.Cannot.use.the.keyword.string_appeared_here.as.a.name):
(testSyntaxError.String.raw.a):
* JSTests/ChakraCore/test/Basics/IdsWithEscapes.baseline-jsc:
Source/JavaScriptCore:
According spec it is not allow to use escaped characters in
keywords. https://tc39.github.io/ecma262/#sec-reserved-words
Current patch implements this requirements.
* parser/Lexer.cpp:
(JSC::Lexer<CharacterType>::parseIdentifierSlowCase):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::printUnexpectedTokenText):
* parser/ParserTokens.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218111
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jlewis3@apple.com [Mon, 12 Jun 2017 17:40:04 +0000 (17:40 +0000)]
Updated test expectations for fast/mediastream/getUserMedia-webaudio.html.
https://bugs.webkit.org/show_bug.cgi?id=170960
Unreviewed test gardening.
* platform/mac-wk2/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218110
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Mon, 12 Jun 2017 17:38:42 +0000 (17:38 +0000)]
[WK2][macOS] Alow iokit-get-properties for additional media features
https://bugs.webkit.org/show_bug.cgi?id=173082
<rdar://problem/
32597547>
Reviewed by Alex Christensen.
* WebProcess/com.apple.WebProcess.sb.in:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218109
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cdumez@apple.com [Mon, 12 Jun 2017 17:28:39 +0000 (17:28 +0000)]
Call _sqlite3_purgeEligiblePagerCacheMemory() on memory pressure only if sqlite is initialized
https://bugs.webkit.org/show_bug.cgi?id=173264
Reviewed by Ryosuke Niwa.
Call _sqlite3_purgeEligiblePagerCacheMemory() on memory pressure only if sqlite is initialized.
Otherwise, not only is it no needed, it is also potentially unsafe.
* page/MemoryRelease.cpp:
(WebCore::registerSQLiteMemoryPressureHandler):
* page/MemoryRelease.h:
* page/cocoa/MemoryReleaseCocoa.mm:
(WebCore::platformReleaseMemory):
(WebCore::registerSQLiteMemoryPressureHandler):
* platform/sql/SQLiteDatabase.cpp:
(WebCore::initializeSQLiteIfNecessary):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218108
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Mon, 12 Jun 2017 17:19:22 +0000 (17:19 +0000)]
Add API::IconDatabaseClient
https://bugs.webkit.org/show_bug.cgi?id=173145
Reviewed by Alex Christensen.
It will be used by GTK+ port instead of the C API.
* UIProcess/API/APIIconDatabaseClient.h:
(API::IconDatabaseClient::~IconDatabaseClient):
(API::IconDatabaseClient::didChangeIconForPageURL):
(API::IconDatabaseClient::didRemoveAllIcons):
(API::IconDatabaseClient::iconDataReadyForPageURL):
* UIProcess/API/C/WKIconDatabase.cpp:
(WKIconDatabaseSetIconDatabaseClient):
* UIProcess/WebIconDatabase.cpp:
(WebKit::WebIconDatabase::WebIconDatabase):
(WebKit::WebIconDatabase::setClient):
(WebKit::WebIconDatabase::didChangeIconForPageURL):
(WebKit::WebIconDatabase::didRemoveAllIcons):
(WebKit::WebIconDatabase::notifyIconDataReadyForPageURL):
* UIProcess/WebIconDatabase.h:
* UIProcess/WebIconDatabaseClient.cpp:
(WebKit::WebIconDatabaseClient::WebIconDatabaseClient):
(WebKit::WebIconDatabaseClient::didChangeIconForPageURL):
(WebKit::WebIconDatabaseClient::didRemoveAllIcons):
(WebKit::WebIconDatabaseClient::iconDataReadyForPageURL):
* UIProcess/WebIconDatabaseClient.h:
* WebKit2.xcodeproj/project.pbxproj:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218107
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Mon, 12 Jun 2017 17:10:54 +0000 (17:10 +0000)]
[GTK] Stop dismissing menus attached to the web view for every injected event
https://bugs.webkit.org/show_bug.cgi?id=172708
Reviewed by Alex Christensen.
Source/WebKit2:
To actually simulate a right-click event we should also send the button release after the press, and let the page
handle the events in addition to sending the event to the context menu controller, like we do with normal
events. So, this is mostly the same as a real right-click event but without actually showing the menu.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::contextMenuAtPointInWindow):
Tools:
It's a workaround we added in r184015 that has worked so far for the context menu, but doesn't really work now
that we also attach popup menus to the web view. We really need to be able to show a popup menu, and then send
events while the menu is open.
* WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
(WTR::EventSendingController::contextClick): Use WKBundlePageCopyContextMenuAtPointInWindow() also in GTK+ port.
* WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:
(WTR::EventSenderProxy::dispatchEvent): Stop calling PlatformWebView::dismissAllPopupMenus().
LayoutTests:
* editing/selection/5354455-1.html: No need to click on editable area to focus it, contextClick already focuses
it, we even have another test to ensure it. Those fast clicks were causing a double click in GTK+ port which
selected the whole line. We don't need to dismiss the context menu either, because contextClick() doesn't really
show the menu.
* fast/events/context-activated-by-key-event.html: Dismiss the context menu every time we show it.
* fast/events/mouse-click-events.html: Dimiss the context menu when testing right click events.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218106
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryanhaddad@apple.com [Mon, 12 Jun 2017 17:02:52 +0000 (17:02 +0000)]
Mark fast/mediastream/getUserMedia-webaudio.html as flaky on mac-wk2.
https://bugs.webkit.org/show_bug.cgi?id=170960
Unreviewed test gardening.
* platform/mac-wk2/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218105
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jlewis3@apple.com [Mon, 12 Jun 2017 16:01:19 +0000 (16:01 +0000)]
Marked imported/w3c/web-platform-tests/html/browsers/windows/browsing-context.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=172255
Unreviewed test gardening.
* platform/mac/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218104
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
csaavedra@igalia.com [Mon, 12 Jun 2017 15:48:43 +0000 (15:48 +0000)]
transforms/hittest-translated-content-off-to-infinity-and-back.html is passing
Ureviewed gardening.
* platform/wpe/TestExpectations: This started passing lately, remove.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218103
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Mon, 12 Jun 2017 15:27:30 +0000 (15:27 +0000)]
[CoordinatedGraphics] Behavior change of DrawingAreaImpl after r217779
https://bugs.webkit.org/show_bug.cgi?id=173153
Patch by Daewoong Jang <daewoong.jang@navercorp.com> on 2017-06-12
Reviewed by Carlos Garcia Campos.
* WebProcess/WebPage/AcceleratedDrawingArea.cpp:
(WebKit::AcceleratedDrawingArea::mainFrameContentSizeChanged):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218102
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
csaavedra@igalia.com [Mon, 12 Jun 2017 15:19:56 +0000 (15:19 +0000)]
[WPE][GTK] Rebaseline js/dom/global-constructors-attributes.html
Unreviewed gardening.
Needs to be updated in WPE due to enabling ENCRYPTED_MEDIA. GTK+
port was skipping this but it just needs an updated expectations.
* platform/gtk/TestExpectations: Unskip.
* platform/gtk/js/dom/global-constructors-attributes-expected.txt:
* platform/wpe/js/dom/global-constructors-attributes-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218101
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zandobersek@gmail.com [Mon, 12 Jun 2017 14:56:36 +0000 (14:56 +0000)]
[GCrypt] Use utility functions in CryptoKeyEC, CryptoKeyRSA
https://bugs.webkit.org/show_bug.cgi?id=173253
Reviewed by Michael Catanzaro.
Use the utility functions from the GCryptUtilities.h header instead
of writing the same code in both CryptoKeyEC and CryptoKeyRSA
implementations. The switches are straightforward, the only difference
is that the GCryptUtilities functions return a std::optional<> object,
meaning we have to address possibly invalid return value.
The mpiData() function is overloaded, making it possible to pass to it
either a gcry_sexp_t or gcry_mpi_t object. Additionally, mpiLength()
function is added, overloading again for gcry_sexp_t and gcry_mpi_t.
This function is used from mpiData() as well as in CryptoKeyRSA when
retrieving the RSA modulus length.
No new tests -- no changes in behavior.
* crypto/gcrypt/CryptoKeyECGCrypt.cpp:
(WebCore::CryptoKeyEC::platformExportRaw):
(WebCore::CryptoKeyEC::platformAddFieldElements):
(WebCore::extractMPIData): Deleted.
* crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
(WebCore::getRSAModulusLength):
(WebCore::getRSAKeyParameter):
(WebCore::CryptoKeyRSA::exportData):
(WebCore::getParameterMPIData): Deleted.
* crypto/gcrypt/GCryptUtilities.h:
(WebCore::mpiLength):
(WebCore::mpiData):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218100
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
utatane.tea@gmail.com [Mon, 12 Jun 2017 13:27:56 +0000 (13:27 +0000)]
Unreviewed, add branch64(Cond, BaseIndex, RegisterID) for ARM64
https://bugs.webkit.org/show_bug.cgi?id=172421
* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::branch64):
(JSC::MacroAssemblerARM64::branchPtr):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218099
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Mon, 12 Jun 2017 12:58:50 +0000 (12:58 +0000)]
[GTK] Prefer to use private WebKitWebView API over WebKitWebViewBase
https://bugs.webkit.org/show_bug.cgi?id=173254
Reviewed by Žan Doberšek.
WebKitWebViewBase is specific to the GTK+ API, but WebKitWebView should be present in any glib-based API. Add
webkitWebViewCreatePage() and webkitWebViewGetPage() and use them when possible instead of the WebKitWebViewBase
ones.
* UIProcess/API/gtk/WebKitAutomationSession.cpp:
* UIProcess/API/gtk/WebKitContextMenuClient.cpp:
(attachContextMenuClientToView):
* UIProcess/API/gtk/WebKitFindController.cpp:
(getPage):
(webkitFindControllerDispose):
(webkitFindControllerConstructed):
(webKitFindControllerPerform):
(webkit_find_controller_search_finish):
* UIProcess/API/gtk/WebKitFormClient.cpp:
(attachFormClientToView):
* UIProcess/API/gtk/WebKitLoaderClient.cpp:
(attachLoaderClientToView):
* UIProcess/API/gtk/WebKitPolicyClient.cpp:
(attachPolicyClientToView):
* UIProcess/API/gtk/WebKitPrintOperation.cpp:
(drawPagesForPrintingCompleted):
(webkitPrintOperationPrintPagesForFrame):
(webkit_print_operation_run_dialog):
(webkit_print_operation_print):
* UIProcess/API/gtk/WebKitUIClient.cpp:
(attachUIClientToView):
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkitWebContextCreatePageForWebView):
(webkitWebContextWebViewDestroyed):
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewCreatePage):
(webkitWebViewGetPage):
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218098
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Mon, 12 Jun 2017 12:54:52 +0000 (12:54 +0000)]
[GTK] getPage() in WebKitWebView should return a reference instead of a pointer
https://bugs.webkit.org/show_bug.cgi?id=173251
Reviewed by Žan Doberšek.
The WebPageProxy is created on WebKitWebView construction, so getPage() can only return nullptr if it's called
during construction. And that can only happen when construct properties are set. It's better to check that the
view has been constructed only in these particular cases and make getPage() return a reference.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewCreateJavaScriptDialog):
(allowModalDialogsChanged): Settings signals are only connected after the page has been created, so we don't
need to check page is available here.
(zoomTextOnlyChanged):
(userAgentChanged):
(webkitWebViewIsConstructed): Helper method to check if the view has been constructed.
(webkitWebViewUpdateSettings): Return early if view hasn't been constructed.
(webkitWebViewDisconnectSettingsSignalHandlers): Ditto.
(webkitWebViewConstructed):
(webkitWebViewDispose):
(webkitWebViewCreateNewPage):
(webkitWebViewSelectionDidChange):
(webkit_web_view_try_close):
(webkit_web_view_load_uri):
(webkit_web_view_load_html):
(webkit_web_view_load_alternate_html):
(webkit_web_view_load_plain_text):
(webkit_web_view_load_bytes):
(webkit_web_view_load_request):
(webkit_web_view_get_page_id):
(webkit_web_view_reload):
(webkit_web_view_reload_bypass_cache):
(webkit_web_view_stop_loading):
(webkit_web_view_is_playing_audio):
(webkit_web_view_go_back):
(webkit_web_view_can_go_back):
(webkit_web_view_go_forward):
(webkit_web_view_can_go_forward):
(webkit_web_view_get_custom_charset):
(webkit_web_view_set_custom_charset):
(webkit_web_view_get_estimated_load_progress):
(webkit_web_view_go_to_back_forward_list_item):
(webkit_web_view_set_zoom_level):
(webkit_web_view_get_zoom_level):
(webkit_web_view_can_execute_editing_command):
(webkit_web_view_execute_editing_command):
(webkit_web_view_execute_editing_command_with_argument):
(webkit_web_view_run_javascript):
(resourcesStreamReadCallback):
(webkit_web_view_get_inspector):
(webkit_web_view_can_show_mime_type):
(webkit_web_view_save):
(webkit_web_view_save_to_file):
(webkit_web_view_download_uri):
(webkit_web_view_get_tls_info):
(webkit_web_view_get_snapshot):
(webkit_web_view_set_background_color):
(webkit_web_view_get_background_color):
(webkit_web_view_is_editable):
(webkit_web_view_set_editable):
(webkit_web_view_get_editor_state):
(webkit_web_view_get_session_state):
(webkit_web_view_restore_session_state):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218097
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Mon, 12 Jun 2017 12:50:39 +0000 (12:50 +0000)]
[GTK] Move WebKit GType macros to WTF
https://bugs.webkit.org/show_bug.cgi?id=173249
Reviewed by Žan Doberšek.
Source/WebKit2:
Moving to a common place where they could be shared by all ports using a glib-based API.
* UIProcess/API/gtk/WebKitPrivate.h:
Source/WTF:
They can be used by glib-based ports and eventually by JavaScriptCore glib bindings too.
* wtf/glib/WTFGType.h: Copied from Source/WebKit2/UIProcess/API/gtk/WebKitPrivate.h.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218096
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Mon, 12 Jun 2017 12:23:49 +0000 (12:23 +0000)]
Mark fast/mediastream/getUserMedia-grant-persistency3.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=173257
Unreviewed gardening.
Patch by Charlie Turner <cturner@igalia.com> on 2017-06-12
* platform/gtk/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218095
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Mon, 12 Jun 2017 12:17:00 +0000 (12:17 +0000)]
Unreviewed, rolling out r218093.
https://bugs.webkit.org/show_bug.cgi?id=173259
Break builds (Requested by yusukesuzuki on #webkit).
Reverted changeset:
"Unreviewed, build fix for ARM64"
https://bugs.webkit.org/show_bug.cgi?id=172421
http://trac.webkit.org/changeset/218093
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218094
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
utatane.tea@gmail.com [Mon, 12 Jun 2017 11:51:58 +0000 (11:51 +0000)]
Unreviewed, build fix for ARM64
https://bugs.webkit.org/show_bug.cgi?id=172421
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileArrayIndexOf):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218093
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
magomez@igalia.com [Mon, 12 Jun 2017 09:40:35 +0000 (09:40 +0000)]
[GTK][WPE] Enable GStreamer GL on development builds
https://bugs.webkit.org/show_bug.cgi?id=173248
Enable GStreamer GL for GTK and WPE.
Reviewed by Carlos Garcia Campos.
* Scripts/webkitperl/FeatureList.pm:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218092
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Mon, 12 Jun 2017 08:14:32 +0000 (08:14 +0000)]
Unreviewed. Fix GTK+ test /webkit2/WebKitWebView/notification after r216641.
Notifications are no longer cleared on page navigation.
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp:
(testWebViewNotification):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218091
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Mon, 12 Jun 2017 06:54:04 +0000 (06:54 +0000)]
Unreviewed. Fix GTK+ test /webkit2/WebKitAutomationSession/request-session after r217831.
DBus interface and object path names were updated in r217831.
* TestWebKitAPI/Tests/WebKit2Gtk/TestAutomationSession.cpp:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218090
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Mon, 12 Jun 2017 06:05:05 +0000 (06:05 +0000)]
[GTK] Remove WKInspectorClientGtk
https://bugs.webkit.org/show_bug.cgi?id=173142
Reviewed by Michael Catanzaro.
It's only used internally in GTk+ API, we can simplify it by using a C++ client instead.
* PlatformGTK.cmake:
* UIProcess/API/C/gtk/WKInspectorClientGtk.cpp: Removed.
* UIProcess/API/C/gtk/WKInspectorClientGtk.h: Removed.
* UIProcess/API/gtk/WebKitPrivate.h:
* UIProcess/API/gtk/WebKitWebInspector.cpp:
(_WebKitWebInspectorPrivate::~_WebKitWebInspectorPrivate):
(webkitWebInspectorCreate):
* UIProcess/WebInspectorProxy.cpp:
* UIProcess/WebInspectorProxy.h:
* UIProcess/gtk/WebInspectorClientGtk.cpp: Removed.
* UIProcess/gtk/WebInspectorProxyClient.h: Renamed from Source/WebKit2/UIProcess/gtk/WebInspectorClientGtk.h.
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::setClient):
(WebKit::WebInspectorProxy::createInspectorWindow):
(WebKit::WebInspectorProxy::platformDidClose):
(WebKit::WebInspectorProxy::platformBringToFront):
(WebKit::WebInspectorProxy::platformInspectedURLChanged):
(WebKit::WebInspectorProxy::platformAttach):
(WebKit::WebInspectorProxy::platformDetach):
(WebKit::WebInspectorProxy::platformSetAttachedWindowHeight):
(WebKit::WebInspectorProxy::platformSetAttachedWindowWidth):
(WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218089
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mmaxfield@apple.com [Mon, 12 Jun 2017 05:03:53 +0000 (05:03 +0000)]
[iOS 11] fast/text/international/system-language/arabic-glyph-cache-fill-combine.html hardcodes the system UI Arabic font
https://bugs.webkit.org/show_bug.cgi?id=173244
<rdar://problem/
32659595>
Reviewed by Ryosuke Niwa.
iOS 11 changed this font, so we shouldn't hardcode it. Instead,
we can simply change this to an -expected-mismatch.html test to
specifically test against the ".notdef" glyph.
* fast/text/international/system-language/arabic-glyph-cache-fill-combine-expected-mismatch.html: Renamed from LayoutTests/fast/text/international/system-language/arabic-glyph-cache-fill-combine-expected.html.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218086
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mmaxfield@apple.com [Mon, 12 Jun 2017 05:02:38 +0000 (05:02 +0000)]
fast/text/variations/getComputedStyle.html does not need to be asynchronous
https://bugs.webkit.org/show_bug.cgi?id=173246
<rdar://problem/
31393842>
Reviewed by Sam Weinig.
I dont know why I made it asynchronous in the first place.
* fast/text/variations/getComputedStyle.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218085
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
utatane.tea@gmail.com [Mon, 12 Jun 2017 03:58:23 +0000 (03:58 +0000)]
[DFG] Add ArrayIndexOf intrinsic
https://bugs.webkit.org/show_bug.cgi?id=172421
Reviewed by Saam Barati.
JSTests:
* stress/array-indexof-array-prototype-change.js: Added.
(shouldBe):
(indexOfInt32):
* stress/array-indexof-have-a-bad-time-getter.js: Added.
(shouldBe):
(indexOfInt32):
* stress/array-indexof-have-a-bad-time.js: Added.
(shouldBe):
(indexOfInt32):
* stress/array-indexof-hole-with-prototype.js: Added.
(shouldBe):
(indexOf):
* stress/array-indexof-hole.js: Added.
(shouldBe):
(indexOf):
* stress/array-indexof-index.js: Added.
(shouldBe):
(indexOfInt32):
(indexOfDouble):
(indexOfString):
(indexOfObject):
(indexOfValue):
* stress/array-indexof-negative-index.js: Added.
(shouldBe):
(indexOfInt32):
(indexOfDouble):
(indexOfString):
(indexOfObject):
(indexOfValue):
* stress/array-indexof-non-int32-start-index.js: Added.
(shouldBe):
(indexOf):
(object.valueOf):
* stress/array-indexof-object-prototype-change.js: Added.
(shouldBe):
(indexOfInt32):
* stress/array-indexof-object.js: Added.
(shouldBe):
(indexOf):
* stress/array-indexof-original-array.js: Added.
(shouldBe):
(indexOfInt32):
* stress/array-indexof-string.js: Added.
(shouldBe):
(indexOf):
* stress/array-indexof-structure-change-convert.js: Added.
(shouldBe):
(indexOf):
* stress/array-indexof-structure-change.js: Added.
(shouldBe):
(indexOf):
* stress/array-indexof.js: Added.
(shouldBe):
(indexOf):
Source/JavaScriptCore:
This patch introduces ArrayIndexOfInstrinsic for DFG and FTL optimizations.
We emit array check and go fast path if the array is Array::Int32, Array::Double
or Array::Continugous. In addition, for Array::Int32 and Array::Double case,
we have inlined fast paths.
With updated ARES-6 Babylon,
Before
firstIteration: 45.76 +- 3.87 ms
averageWorstCase: 24.41 +- 2.17 ms
steadyState: 8.01 +- 0.22 ms
After
firstIteration: 45.64 +- 4.23 ms
averageWorstCase: 23.03 +- 3.34 ms
steadyState: 7.33 +- 0.34 ms
In SixSpeed.
baseline patched
map-set-lookup.es5 734.4701+-10.4383 ^ 102.0968+-2.6357 ^ definitely 7.1939x faster
map-set.es5 41.1396+-1.0558 ^ 33.1916+-0.7986 ^ definitely 1.2395x faster
map-set-object.es5 62.8317+-1.2518 ^ 45.6944+-0.8369 ^ definitely 1.3750x faster
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNode.h:
(JSC::DFG::Node::hasArrayMode):
* dfg/DFGNodeType.h:
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileArrayIndexOf):
(JSC::DFG::SpeculativeJIT::speculateObject):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
(JSC::DFG::SpeculativeJIT::speculateInt32):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileArrayIndexOf):
* jit/JITOperations.h:
* runtime/ArrayPrototype.cpp:
(JSC::ArrayPrototype::finishCreation):
* runtime/Intrinsic.cpp:
(JSC::intrinsicName):
* runtime/Intrinsic.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218084
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rniwa@webkit.org [Mon, 12 Jun 2017 03:46:47 +0000 (03:46 +0000)]
didMoveToNewDocument doesn't get called on an Attr inside a shadow tree
https://bugs.webkit.org/show_bug.cgi?id=173133
Reviewed by Antti Koivisto.
Source/WebCore:
The bug was caused by moveShadowTreeToNewDocument never calling didMoveToNewDocument on Attr nodes.
Fixed the bug by using the same traversal code as moveTreeToNewScope in moveShadowTreeToNewDocument
by extracting the traversal code as a templatized traverseSubtreeToUpdateTreeScope.
Also removed the code to increment the DOM tree version in moveTreeToNewScope. This code was there
to invalidate the HTML collection caches which used to clear the cache whenever the DOM tree version
changed before r122621 (five years ago! by me). Since we now eagerly invalidate each node list and
HTML collection's caches via NodeListsNodeData::adoptTreeScope and NodeListsNodeData::adoptDocument.
Test: fast/dom/adopt-attr-with-shadow-tree.html
* dom/Node.cpp:
(WebCore::moveNodeToNewDocument): Assert that the node had been adopted to a new document.
(WebCore::traverseSubtreeToUpdateTreeScope): Extracted from moveTreeToNewScope.
(WebCore::moveShadowTreeToNewDocument): Use traverseSubtreeToUpdateTreeScope to adopt each node
to the new document.
(WebCore::Node::moveTreeToNewScope): See above.
* testing/Internals.cpp:
(WebCore::Internals::referencingNodeCount): Added. Used in the newly added regression test.
* testing/Internals.h:
* testing/Internals.idl:
LayoutTests:
Added a regression test for moving a shadow tree with an Attr node across a document.
The test hits an assertion in a debug build and fails in a release build without the fix.
* fast/dom/adopt-attr-with-shadow-tree-expected.txt: Added.
* fast/dom/adopt-attr-with-shadow-tree.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218083
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
keith_miller@apple.com [Mon, 12 Jun 2017 02:40:43 +0000 (02:40 +0000)]
TypedArray constructor with string shouldn't throw
https://bugs.webkit.org/show_bug.cgi?id=173181
Reviewed by JF Bastien.
JSTests:
We should be coercing primitive arguments to numbers in the various
TypedArray constructors.
* stress/typedarray-constructor.js:
Source/JavaScriptCore:
We should be coercing primitive arguments to numbers in the various
TypedArray constructors.
* runtime/JSGenericTypedArrayViewConstructorInlines.h:
(JSC::constructGenericTypedArrayViewWithArguments):
LayoutTests:
Update tests to allow null buffers.
* fast/canvas/webgl/array-unit-tests-expected.txt:
* fast/canvas/webgl/array-unit-tests.html:
* fast/canvas/webgl/webgl-array-invalid-ranges-expected.txt:
* fast/canvas/webgl/webgl-array-invalid-ranges.html:
* webgl/1.0.2/resources/webgl_test_files/conformance/typedarrays/array-unit-tests.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218082
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mitz@apple.com [Mon, 12 Jun 2017 01:57:30 +0000 (01:57 +0000)]
[Mac] Unaligned pointers in static CMBufferCallbacks structs defined in WebCoreDecompressionSession.mm
https://bugs.webkit.org/show_bug.cgi?id=173245
Reviewed by Sam Weinig.
* platform/graphics/cocoa/WebCoreDecompressionSession.mm:
(WebCore::WebCoreDecompressionSession::enqueueSample): Prepend 4 bytes of padding to the
structs so that the pointers are properly aligned.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218081
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
utatane.tea@gmail.com [Mon, 12 Jun 2017 00:47:18 +0000 (00:47 +0000)]
[WTF] Make ThreadMessage portable
https://bugs.webkit.org/show_bug.cgi?id=172073
Reviewed by Keith Miller.
Source/JavaScriptCore:
* runtime/MachineContext.h:
(JSC::MachineContext::stackPointer):
* tools/CodeProfiling.cpp:
(JSC::profilingTimer):
Source/WTF:
Recently, we change ThreadMessage semantics: message handler
can be executed in the sender thread.
This allows ThreadMessage to be implemented in a portable way.
This patch implements ThreadMessage for all the platforms.
We use platform-independent Thread APIs, suspend(), resume(),
and getRegisters().
* wtf/PlatformRegisters.h:
(WTF::registersFromUContext):
* wtf/ThreadMessage.cpp:
(WTF::sendMessageScoped):
(WTF::ThreadMessageData::ThreadMessageData): Deleted.
(): Deleted.
(WTF::initializeThreadMessages): Deleted.
(WTF::sendMessageUsingSignal): Deleted.
(WTF::sendMessageUsingMach): Deleted.
(WTF::deliverMessagesUsingMach): Deleted.
* wtf/ThreadMessage.h:
* wtf/Threading.cpp:
(WTF::initializeThreading):
* wtf/Threading.h:
(WTF::Thread::threadMessages): Deleted.
* wtf/ThreadingPthreads.cpp:
(WTF::Thread::signalHandlerSuspendResume):
(WTF::threadStateMetadata):
(WTF::Thread::getRegisters):
* wtf/threads/Signals.cpp:
(WTF::handleSignalsWithMach):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218080
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
graouts@webkit.org [Sun, 11 Jun 2017 21:54:34 +0000 (21:54 +0000)]
Rebaseline media/modern-media-controls/scrubber
https://bugs.webkit.org/show_bug.cgi?id=173212
Reviewed by Jon Lee.
Remove a media/modern-media-controls/scrubber test that is no longer relevant now that there is no standalone scrubber class.
* media/modern-media-controls/scrubber/scrubber-expected.txt: Removed.
* media/modern-media-controls/scrubber/scrubber.html: Removed.
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218079
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
graouts@webkit.org [Sun, 11 Jun 2017 21:53:13 +0000 (21:53 +0000)]
Enable media/modern-media-controls/scheduler
https://bugs.webkit.org/show_bug.cgi?id=173211
Reviewed by Jon Lee.
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218078
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
graouts@webkit.org [Sun, 11 Jun 2017 21:51:55 +0000 (21:51 +0000)]
Rebaseline media/modern-media-controls/rewind-button
https://bugs.webkit.org/show_bug.cgi?id=173210
Reviewed by Jon Lee.
Use SVG assets.
* media/modern-media-controls/rewind-button/rewind-button-expected.txt:
* media/modern-media-controls/rewind-button/rewind-button.html:
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218077
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
graouts@webkit.org [Sun, 11 Jun 2017 21:49:49 +0000 (21:49 +0000)]
Rebaseline media/modern-media-controls/play-pause-button
https://bugs.webkit.org/show_bug.cgi?id=173209
Reviewed by Jon Lee.
Use SVG assets.
* media/modern-media-controls/play-pause-button/play-pause-button-expected.txt:
* media/modern-media-controls/play-pause-button/play-pause-button.html:
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218076
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
graouts@webkit.org [Sun, 11 Jun 2017 21:48:16 +0000 (21:48 +0000)]
Rebaseline media/modern-media-controls/placard
https://bugs.webkit.org/show_bug.cgi?id=173208
Reviewed by Jon Lee.
IconButton is now simply Button.
* media/modern-media-controls/placard/placard-expected.txt:
* media/modern-media-controls/placard/placard.html:
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218075
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
graouts@webkit.org [Sun, 11 Jun 2017 21:46:55 +0000 (21:46 +0000)]
Enable media/modern-media-controls/pip-placard tests
https://bugs.webkit.org/show_bug.cgi?id=173207
Reviewed by Jon Lee.
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218074
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
graouts@webkit.org [Sun, 11 Jun 2017 21:45:38 +0000 (21:45 +0000)]
Rebaseline media/modern-media-controls/pip-button.
https://bugs.webkit.org/show_bug.cgi?id=173206
Reviewed by Jon Lee.
Use SVG assets.
* media/modern-media-controls/pip-button/pip-button-expected.txt:
* media/modern-media-controls/pip-button/pip-button.html:
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218073
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
graouts@webkit.org [Sun, 11 Jun 2017 21:43:54 +0000 (21:43 +0000)]
Rebaseline media/modern-media-controls/mute-button
https://bugs.webkit.org/show_bug.cgi?id=173205
Reviewed by Jon Lee.
We now use SVG assets, so let the test reflect that.
* media/modern-media-controls/mute-button/mute-button-expected.txt:
* media/modern-media-controls/mute-button/mute-button.html:
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218072
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
graouts@webkit.org [Sun, 11 Jun 2017 21:40:31 +0000 (21:40 +0000)]
Remove media/modern-media-controls/macos-media-controls
https://bugs.webkit.org/show_bug.cgi?id=173204
Reviewed by Jon Lee.
There no longer is a MacOSMediaControls class and this test no longer makes sense.
* media/modern-media-controls/macos-media-controls/macos-media-controls-expected.txt: Removed.
* media/modern-media-controls/macos-media-controls/macos-media-controls.html: Removed.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218071
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
utatane.tea@gmail.com [Sun, 11 Jun 2017 17:02:25 +0000 (17:02 +0000)]
[JSC] Shrink Structure size
https://bugs.webkit.org/show_bug.cgi?id=173239
Reviewed by Mark Lam.
We find that the size of our Structure is slightly enlarged due to paddings.
By changing the order of members, we can reduce the size from 120 to 112.
This is good because 120 and 112 are categorized into different size classes.
For 120, we allocate 128 bytes. And for 112, we allocate 112 bytes.
We now save 16 bytes per Structure for free.
* runtime/ConcurrentJSLock.h:
* runtime/Structure.cpp:
(JSC::Structure::Structure):
* runtime/Structure.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218070
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
utatane.tea@gmail.com [Sun, 11 Jun 2017 16:59:23 +0000 (16:59 +0000)]
[WTF] Drop unnecessary includes in Threading.h
https://bugs.webkit.org/show_bug.cgi?id=173167
Reviewed by Darin Adler.
Threading.h includes bunch of headers. But some of them are not necessary.
This patch cleans up it a bit.
* wtf/Assertions.cpp:
* wtf/LocklessBag.h:
* wtf/Threading.h:
* wtf/ThreadingPrimitives.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218069
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
timothy_horton@apple.com [Sun, 11 Jun 2017 16:03:41 +0000 (16:03 +0000)]
REGRESSION (r217870): Null deref under PageOverlayController::uninstallPageOverlay using find in page
https://bugs.webkit.org/show_bug.cgi?id=173196
<rdar://problem/
32686871>
Reviewed by Simon Fraser.
Source/WebCore:
* page/TextIndicator.cpp:
(WebCore::initializeIndicator):
* page/TextIndicator.h:
The change in r217870 had an expected but not thought-through side-effect
that you cannot create a TextIndicator for far-off-screen elements. This
is a problem for find-in-page, which uses TextIndicator to paint the yellow
highlight before scrolling it into view.
Bring back TextIndicatorOptionDoNotClipToVisibleRect and revert to it for
find in page, since it needs different behavior than something like
drag and drop, which always operates on content near the visible viewport.
Source/WebKit2:
* WebProcess/WebPage/ios/FindControllerIOS.mm:
(WebKit::FindController::updateFindIndicator):
The reason this caused a crash instead of just a missing indicator
is that FindControllerIOS would early return after uninstalling
the old overlay, before installing a new one, and leave m_isShowingFindIndicator
set to true. Instead, reset it (and m_findIndicatorOverlay, which
we would never re-use but might as well be freed immediately).
This likely already crashed in other less reproducible cases where a
TextIndicator was not created for a find match, so clean it up.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218068
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
annulen@yandex.ru [Sun, 11 Jun 2017 10:12:14 +0000 (10:12 +0000)]
Unreviewed, attempt to fix JSC tests on Win after r217771
* jsc.cpp:
(currentWorkingDirectory): buffer is not NULL-terminated
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218067
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
utatane.tea@gmail.com [Sun, 11 Jun 2017 08:33:38 +0000 (08:33 +0000)]
[WTF] Add RegisteredSymbolImpl
https://bugs.webkit.org/show_bug.cgi?id=173230
Reviewed by Mark Lam.
Source/JavaScriptCore:
* runtime/SymbolConstructor.cpp:
(JSC::symbolConstructorKeyFor):
Source/WTF:
Most symbols are not registered in SymbolRegistry. However, we currently always
allocate a pointer member to point to a SymbolRegistry, and this pointer is always null.
SymbolImpl is immutable, and it will never be registered with a SymbolRegistry
after it is created. Hence, this member is wasteful.
Instead, we add a new derived class RegisteredSymbolImpl, which will set a flag in
SymbolImpl to indicate that it is registered with a SymbolRegistry. The only way to
create a RegisteredSymbolImpl is via a factory method provided by the SymbolRegistry.
The factory method will pass the SymbolRegistry this pointer to the RegisteredSymbolImpl's
constructor for initializing the RegisteredSymbolImpl's m_symbolRegistry field.
By doing so,
1. We do not need to set m_symbolRegistry after creating a Symbol. It is clean.
2. We reduce the size of SymbolImpls that do not need to be registered.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::~StringImpl):
* wtf/text/StringImpl.h:
* wtf/text/SymbolImpl.cpp:
(WTF::SymbolImpl::create):
(WTF::RegisteredSymbolImpl::create):
* wtf/text/SymbolImpl.h:
(WTF::SymbolImpl::hashForSymbol):
(WTF::SymbolImpl::isRegistered):
(WTF::SymbolImpl::SymbolImpl):
(WTF::RegisteredSymbolImpl::symbolRegistry):
(WTF::RegisteredSymbolImpl::clearSymbolRegistry):
(WTF::RegisteredSymbolImpl::RegisteredSymbolImpl):
(WTF::SymbolImpl::symbolRegistry):
* wtf/text/SymbolRegistry.cpp:
(WTF::SymbolRegistry::~SymbolRegistry):
(WTF::SymbolRegistry::symbolForKey):
(WTF::SymbolRegistry::keyForSymbol):
(WTF::SymbolRegistry::remove):
* wtf/text/SymbolRegistry.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218066
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
utatane.tea@gmail.com [Sun, 11 Jun 2017 07:53:23 +0000 (07:53 +0000)]
Unreviewed, update test results part 3
https://bugs.webkit.org/show_bug.cgi?id=173227
* microbenchmarks/regexp-prototype-search-observable-side-effects.js:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218065
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Sun, 11 Jun 2017 06:30:12 +0000 (06:30 +0000)]
[GTK] Remove WKFullScreenClientGtk
https://bugs.webkit.org/show_bug.cgi?id=173140
Reviewed by Michael Catanzaro.
It's only used internally in the GTK+ API. Implementation is a lot simpler without using it, we can simply use
either WebKitWebView or WebKitWebViewBase from PageClient directly.
* PlatformGTK.cmake:
* UIProcess/API/C/gtk/WKFullScreenClientGtk.cpp: Removed.
* UIProcess/API/C/gtk/WKFullScreenClientGtk.h: Removed.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::isFullScreen):
(WebKit::PageClientImpl::enterFullScreen):
(WebKit::PageClientImpl::exitFullScreen):
* UIProcess/API/gtk/WebKitFullscreenClient.cpp: Removed.
* UIProcess/API/gtk/WebKitFullscreenClient.h: Removed.
* UIProcess/API/gtk/WebKitPrivate.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewConstructed):
(webkitWebViewEnterFullScreen):
(webkitWebViewExitFullScreen):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseEnterFullScreen):
(webkitWebViewBaseExitFullScreen):
(webkitWebViewBaseIsFullScreen):
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
* UIProcess/gtk/WebFullScreenClientGtk.cpp: Removed.
* UIProcess/gtk/WebFullScreenClientGtk.h: Removed.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218064
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Sun, 11 Jun 2017 06:28:02 +0000 (06:28 +0000)]
[GTK] Handle page download request in WebKitWebView directly
https://bugs.webkit.org/show_bug.cgi?id=173137
Reviewed by Žan Doberšek.
We don't need to pass through WebKitWebViewBase, since the base doesn't have an implementation.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::handleDownloadRequest):
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewConstructed):
(webkitWebViewHandleDownloadRequest):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseSetDownloadRequestHandler): Deleted.
(webkitWebViewBaseHandleDownloadRequest): Deleted.
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218063
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Sun, 11 Jun 2017 06:25:45 +0000 (06:25 +0000)]
[GTK] Use a lambda in webkit_cookie_manager_get_accept_policy instead of toGenericCallbackFunction
https://bugs.webkit.org/show_bug.cgi?id=173134
Reviewed by Žan Doberšek.
It's simpler and easier to read.
* UIProcess/API/gtk/WebKitCookieManager.cpp:
(webkit_cookie_manager_get_accept_policy):
(webkitCookieManagerGetAcceptPolicyCallback): Deleted.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218062
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
graouts@webkit.org [Sun, 11 Jun 2017 02:16:17 +0000 (02:16 +0000)]
Rebaseline media/modern-media-controls/layout-node
https://bugs.webkit.org/show_bug.cgi?id=173203
Reviewed by Jon Lee.
The "visible" property no longer sets "display: initial" when true, but rather removes the "display" property altogether.
* media/modern-media-controls/layout-node/visible-expected.txt:
* media/modern-media-controls/layout-node/visible.html:
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218061
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
graouts@webkit.org [Sun, 11 Jun 2017 02:14:18 +0000 (02:14 +0000)]
Enable media/modern-media-controls/layout-item
https://bugs.webkit.org/show_bug.cgi?id=173202
Reviewed by Jon Lee.
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218060
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
graouts@webkit.org [Sun, 11 Jun 2017 02:12:25 +0000 (02:12 +0000)]
Rebaseline media/modern-media-controls/invalid-placard
https://bugs.webkit.org/show_bug.cgi?id=173201
Reviewed by Jon Lee.
The only required change was to update IconButton to Button since IconButton has been folded in its superclass Button.
* media/modern-media-controls/invalid-placard/invalid-placard-constrained-metrics-expected.txt:
* media/modern-media-controls/invalid-placard/invalid-placard-constrained-metrics.html:
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218059
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
graouts@webkit.org [Sun, 11 Jun 2017 02:10:26 +0000 (02:10 +0000)]
Rebaseline media/modern-media-controls/icon-service
https://bugs.webkit.org/show_bug.cgi?id=173200
Reviewed by Jon Lee.
The method we were testing has changed name and the pause icon is no longer a good
test since it doesn't have a fullscreen variant, so we use the AirPlay icon instead.
* media/modern-media-controls/icon-service/icon-service-expected.txt:
* media/modern-media-controls/icon-service/icon-service.html:
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218058
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mitz@apple.com [Sun, 11 Jun 2017 01:37:09 +0000 (01:37 +0000)]
Reverted r218056 because it made the IDE reindex constantly.
PerformanceTests:
* MediaTime/Configurations/DebugRelease.xcconfig:
Source/bmalloc:
* Configurations/DebugRelease.xcconfig:
Source/JavaScriptCore:
* Configurations/DebugRelease.xcconfig:
Source/ThirdParty/ANGLE:
* Configurations/DebugRelease.xcconfig:
Source/ThirdParty/libwebrtc:
* Configurations/DebugRelease.xcconfig:
Source/WebCore:
* Configurations/DebugRelease.xcconfig:
Source/WebCore/PAL:
* Configurations/DebugRelease.xcconfig:
Source/WebInspectorUI:
* Configurations/DebugRelease.xcconfig:
Source/WebKit/mac:
* Configurations/DebugRelease.xcconfig:
Source/WebKit2:
* Configurations/DebugRelease.xcconfig:
Source/WTF:
* Configurations/DebugRelease.xcconfig:
Tools:
* ContentExtensionTester/Configurations/DebugRelease.xcconfig:
* DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
* ImageDiff/cg/Configurations/DebugRelease.xcconfig:
* MiniBrowser/Configurations/DebugRelease.xcconfig:
* MobileMiniBrowser/Configurations/DebugRelease.xcconfig:
* TestWebKitAPI/Configurations/DebugRelease.xcconfig:
* WebEditingTester/Configurations/DebugRelease.xcconfig:
* WebKitTestRunner/Configurations/DebugRelease.xcconfig:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218057
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mitz@apple.com [Sat, 10 Jun 2017 20:32:57 +0000 (20:32 +0000)]
[Xcode] With Xcode 9 developer beta, everything rebuilds when switching between command-line and IDE
https://bugs.webkit.org/show_bug.cgi?id=173223
Reviewed by Sam Weinig.
The rebuilds were happening due to a difference in the compiler options that the IDE and
xcodebuild were specifying. Only the IDE was passing the -index-store-path option. To make
xcodebuild pass that option, too, set CLANG_INDEX_STORE_ENABLE to YES if it is unset, and
specify an appropriate path in CLANG_INDEX_STORE_PATH.
PerformanceTests:
* MediaTime/Configurations/DebugRelease.xcconfig:
Source/bmalloc:
* Configurations/DebugRelease.xcconfig:
Source/JavaScriptCore:
* Configurations/DebugRelease.xcconfig:
Source/ThirdParty/ANGLE:
* Configurations/DebugRelease.xcconfig:
Source/ThirdParty/libwebrtc:
* Configurations/DebugRelease.xcconfig:
Source/WebCore:
* Configurations/DebugRelease.xcconfig:
Source/WebCore/PAL:
* Configurations/DebugRelease.xcconfig:
Source/WebInspectorUI:
* Configurations/DebugRelease.xcconfig:
Source/WebKit/mac:
* Configurations/DebugRelease.xcconfig:
Source/WebKit2:
* Configurations/DebugRelease.xcconfig:
Source/WTF:
* Configurations/DebugRelease.xcconfig:
Tools:
* ContentExtensionTester/Configurations/DebugRelease.xcconfig:
* DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
* ImageDiff/cg/Configurations/DebugRelease.xcconfig:
* MiniBrowser/Configurations/DebugRelease.xcconfig:
* MobileMiniBrowser/Configurations/DebugRelease.xcconfig:
* TestWebKitAPI/Configurations/DebugRelease.xcconfig:
* WebEditingTester/Configurations/DebugRelease.xcconfig:
* WebKitTestRunner/Configurations/DebugRelease.xcconfig:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218056
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jbedard@apple.com [Sat, 10 Jun 2017 19:51:13 +0000 (19:51 +0000)]
webkitpy: Reduce polling in ServerProcess
https://bugs.webkit.org/show_bug.cgi?id=173116
Reviewed by Ryosuke Niwa.
We should be smarter about polling. We do not need to poll every time a line is read from
stdout and stderr since lines are usually read from cached data. We should only poll
when extracting that cached data from stdout and stderr.
* Scripts/webkitpy/port/driver.py:
(Driver._read_block): Rely on output of the ServerProcess to detect a crash or a timeout
and on ServerProcess to poll the process if not data is available in stdout and stderr.
* Scripts/webkitpy/port/driver_unittest.py:
(DriverTest.test_read_block_crashed_process): Test that the Driver will handle a crashing
ServerProcess.
* Scripts/webkitpy/port/server_process.py:
(ServerProcess._read): Allow for data to be read from _output even if the process has
crashed. Only poll the process if data needs to be extracted from stdout or stderr.
* Scripts/webkitpy/port/server_process_mock.py:
(MockServerProcess): Add number_of_times_polled.
(MockServerProcess.poll): Increment number_of_times_polled.
(MockServerProcess.has_crashed): Poll before returning crash state.
(MockServerProcess.read_stdout_line): MockServerProcess should return None if it has crashed,
just like a ServerProcess would.
(MockServerProcess.read_stdout): Ditto.
* Scripts/webkitpy/port/server_process_unittest.py:
(TestServerProcess.test_basic): Use stdin.readline() instead of time.sleep() to prevent the
process from ending before stdout and stderr are read. This is the reason this test was flakey.
(TestServerProcess):
(TestServerProcess.test_process_crashing): Test that when a process crashes, data can be read until
the processes is polled.
(TestServerProcess.test_process_crashing_no_data): Test that when a process which has not output any
data to stdout and stderr crashes, ServerProcess._read(...) polls the process to detect the crash.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218055
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
utatane.tea@gmail.com [Sat, 10 Jun 2017 19:20:47 +0000 (19:20 +0000)]
Unreviewed, update test results part 2
https://bugs.webkit.org/show_bug.cgi?id=173227
* test262.yaml:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218054
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
utatane.tea@gmail.com [Sat, 10 Jun 2017 18:35:16 +0000 (18:35 +0000)]
Unreviewed, update test results
https://bugs.webkit.org/show_bug.cgi?id=173227
* microbenchmarks/string-prototype-search-observable-side-effects.js:
* test262.yaml:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218053
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mitz@apple.com [Sat, 10 Jun 2017 18:33:08 +0000 (18:33 +0000)]
[macOS] REGRESSION: Link drag images blend into the background in Sierra and earlier
https://bugs.webkit.org/show_bug.cgi?id=172933
<rdar://problem/
32580649>
Reviewed by Tim Horton.
* platform/mac/DragImageMac.mm:
(WebCore::createDragImageForLink): When targeting macOS Sierra and earlier, give the link
drag image a drop shadow that resembles the one that macOS High Sierra applies to drag
image layers.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218052
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
utatane.tea@gmail.com [Sat, 10 Jun 2017 18:01:40 +0000 (18:01 +0000)]
[JSC] Update RegExp.prototype.[@@search]] implementation according to the latest spec
https://bugs.webkit.org/show_bug.cgi?id=173227
Reviewed by Mark Lam.
JSTests:
Update the test.
* es6/Proxy_internal_get_calls_RegExp.prototype[Symbol.search].js:
Source/JavaScriptCore:
The latest spec introduces slight change to RegExp.prototype.[@@search].
This patch applies this change. Basically, this change is done in the slow path of
the RegExp.prototype[@@search].
https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search
* builtins/RegExpPrototype.js:
(search):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218051
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
aestes@apple.com [Sat, 10 Jun 2017 07:25:11 +0000 (07:25 +0000)]
[QuickLook] PreviewLoader needs to check if its ResourceLoader has reached the terminal state before calling didReceiveResponse() and friends
https://bugs.webkit.org/show_bug.cgi?id=173190
<rdar://problem/
31360659>
Reviewed by Brady Eidson.
Source/WebCore:
WebPreviewLoader's SubresourceLoader can reach a terminal state while data is loading from
QLPreviewConverter (the user can cancel, for instance). We can't call functions like
didReceiveResponse() in this state, because the loader no longer points to a CachedResource,
leading to null pointer dereferences.
Fix this in WebPreviewLoader by checking if the SubresourceLoader is in a terminal state
before calling didReceiveResponse(), didReceiveData(), didFinishLoading(), and didFail().
Fixes web process crashes in the QuickLook.CancelNavigationAfterResponse API test.
* loader/ios/PreviewLoader.mm:
(-[WebPreviewLoader _sendDidReceiveResponseIfNecessary]):
(-[WebPreviewLoader connection:didReceiveData:lengthReceived:]):
(-[WebPreviewLoader connectionDidFinishLoading:]):
(-[WebPreviewLoader connection:didFailWithError:]):
Tools:
Added a release assert that tries to create a proper test failure if the web process crashes.
* TestWebKitAPI/Tests/WebKit2Cocoa/QuickLook.mm:
(-[QuickLookDecidePolicyDelegate _webViewWebProcessDidCrash:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218050
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
drousso@apple.com [Sat, 10 Jun 2017 07:13:22 +0000 (07:13 +0000)]
Web Inspector: REGRESSION(r217749): Event listeners are removed even if they haven't been added
https://bugs.webkit.org/show_bug.cgi?id=173185
Reviewed by Joseph Pecoraro.
* UserInterface/Views/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel):
(WebInspector.ResourceDetailsSidebarPanel.prototype.set resource):
(WebInspector.ResourceDetailsSidebarPanel.prototype._applyResourceEventListeners):
Maintain a member variable flag such that event listeners are only removed if it is true.
It is only set to true once the event listeners are added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218049
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cdumez@apple.com [Sat, 10 Jun 2017 05:24:39 +0000 (05:24 +0000)]
Use WTF::Function instead of std::function in indexeddb code
https://bugs.webkit.org/show_bug.cgi?id=173198
Reviewed by Sam Weinig.
Use WTF::Function instead of std::function in indexeddb code to avoid copying.
* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::getAllDatabaseNames):
* Modules/indexeddb/IDBFactory.h:
* Modules/indexeddb/client/IDBConnectionProxy.cpp:
(WebCore::IDBClient::IDBConnectionProxy::getAllDatabaseNames):
* Modules/indexeddb/client/IDBConnectionProxy.h:
* Modules/indexeddb/client/IDBConnectionToServer.cpp:
(WebCore::IDBClient::IDBConnectionToServer::getAllDatabaseNames):
* Modules/indexeddb/client/IDBConnectionToServer.h:
* Modules/indexeddb/client/TransactionOperation.h:
(WebCore::IDBClient::TransactionOperation::doComplete):
* Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesModifiedSince):
(WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesForOrigins):
* Modules/indexeddb/server/IDBServer.h:
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::storeCallbackOrFireError):
(WebCore::IDBServer::UniqueIDBDatabase::createObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::deleteObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::renameObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::clearObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::createIndex):
(WebCore::IDBServer::UniqueIDBDatabase::deleteIndex):
(WebCore::IDBServer::UniqueIDBDatabase::renameIndex):
(WebCore::IDBServer::UniqueIDBDatabase::putOrAdd):
(WebCore::IDBServer::UniqueIDBDatabase::getRecord):
(WebCore::IDBServer::UniqueIDBDatabase::getAllRecords):
(WebCore::IDBServer::UniqueIDBDatabase::getCount):
(WebCore::IDBServer::UniqueIDBDatabase::deleteRecord):
(WebCore::IDBServer::UniqueIDBDatabase::openCursor):
(WebCore::IDBServer::UniqueIDBDatabase::iterateCursor):
(WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::abortTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::activateTransactionInBackingStore):
* Modules/indexeddb/server/UniqueIDBDatabase.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218048
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mitz@apple.com [Sat, 10 Jun 2017 05:19:32 +0000 (05:19 +0000)]
Tried to fix the build when targrting macOS 10.12 using the macOS 10.13 developer beta SDK.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesLastModifiedTime):
(WebCore::MediaPlayerPrivateAVFoundationObjC::liveUpdateInterval):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218047
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rniwa@webkit.org [Sat, 10 Jun 2017 05:11:27 +0000 (05:11 +0000)]
Crash inside WebKit::PluginView::getAuthenticationInfo
https://bugs.webkit.org/show_bug.cgi?id=173083
<rdar://problem/
32513144>
Address Darin's review comment.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::getAuthenticationInfo):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218046
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
yoav@yoav.ws [Sat, 10 Jun 2017 05:11:15 +0000 (05:11 +0000)]
[preload] Fix builds with ENABLE_VIDEO_TRACK set to false
https://bugs.webkit.org/show_bug.cgi?id=173221
Reviewed by Chris Dumez.
https://bugs.webkit.org/show_bug.cgi?id=173047 introduced a build error for builds with video track support disabled.
This fixes that build issue.
No new tests since there's no functional change.
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::as):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218045
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rniwa@webkit.org [Sat, 10 Jun 2017 05:08:59 +0000 (05:08 +0000)]
IsInShadowTreeFlag does not get updated for a non-container node
https://bugs.webkit.org/show_bug.cgi?id=173084
Address Darin's review comment.
* dom/ContainerNodeAlgorithms.cpp:
(WebCore::notifyNodeInsertedIntoDocument):
(WebCore::notifyNodeInsertedIntoTree):
(WebCore::notifyNodeRemovedFromDocument):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218044
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mitz@apple.com [Sat, 10 Jun 2017 04:38:54 +0000 (04:38 +0000)]
Fixed building with the macOS 10.13 Apple Internal SDK when targeting macOS 10.12.
* platform/spi/mac/AVFoundationSPI.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218043
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
drousso@apple.com [Sat, 10 Jun 2017 04:35:11 +0000 (04:35 +0000)]
Web Inspector: REGRESSION(r217258): Misspelled variable names
https://bugs.webkit.org/show_bug.cgi?id=173189
Reviewed by Joseph Pecoraro.
* UserInterface/Base/Main.js:
(WebInspector.tabContentViewClassForRepresentedObject):
* UserInterface/Views/ResourceIcons.css:
(.large :matches(.resource-icon.resource-type-stylesheet, .stylesheet-icon) .icon):
(.large .resource-icon.resource-type-stylesheet .icon): Deleted.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218042
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
beidson@apple.com [Sat, 10 Jun 2017 04:32:19 +0000 (04:32 +0000)]
Crash when IndexedDB's getAll is used inside a Web Worker.
https://bugs.webkit.org/show_bug.cgi?id=172434
Reviewed by Andy Estes.
Source/WebCore:
Test: storage/indexeddb/modern/worker-getall.html
* Modules/indexeddb/IDBGetAllResult.cpp:
(WebCore::IDBGetAllResult::IDBGetAllResult): Add an isolated-copying constructor.
(WebCore::IDBGetAllResult::isolatedCopy):
* Modules/indexeddb/IDBGetAllResult.h:
* Modules/indexeddb/shared/IDBResultData.cpp:
(WebCore::IDBResultData::isolatedCopy): Actually copy the IDBGetAllResult.
LayoutTests:
* storage/indexeddb/modern/resources/worker-getall.js: Added.
* storage/indexeddb/modern/worker-getall-expected.txt: Added.
* storage/indexeddb/modern/worker-getall.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218041
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cdumez@apple.com [Sat, 10 Jun 2017 04:30:11 +0000 (04:30 +0000)]
Unreviewed attempt to fix Mac build after r218039.
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::loadDataURL):
* platform/network/DataURLDecoder.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218040
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cdumez@apple.com [Sat, 10 Jun 2017 04:07:22 +0000 (04:07 +0000)]
Use WTF::Function instead of std::function in DataURLDecoder
https://bugs.webkit.org/show_bug.cgi?id=173194
Reviewed by Sam Weinig.
Use WTF::Function instead of std::function in DataURLDecoder to avoid copying.
* platform/network/DataURLDecoder.cpp:
(WebCore::DataURLDecoder::DecodeTask::DecodeTask):
(WebCore::DataURLDecoder::createDecodeTask):
* platform/network/DataURLDecoder.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218039
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Sat, 10 Jun 2017 02:51:05 +0000 (02:51 +0000)]
Image should clear its ImageObserver* when CachedImage releases the last reference to its RefCounted<ImageObserver>
https://bugs.webkit.org/show_bug.cgi?id=173077
Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-06-09
Reviewed by Simon Fraser.
Before dereferencing ImageObserver, CachedImage::clearImage() should check
whether it is the only object that holds a reference to this ImageObserver.
And if this is true, m_image have to clear its raw pointer to the deleted
ImageObserver by calling m_image->setImageObserver(nullptr).
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::setBodyDataFrom):
(WebCore::CachedImage::CachedImageObserver::CachedImageObserver):
(WebCore::CachedImage::clearImage):
* loader/cache/CachedImage.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218038
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
dbates@webkit.org [Sat, 10 Jun 2017 02:11:30 +0000 (02:11 +0000)]
Attempt to fix layout test failures following <https://trac.webkit.org/changeset/218028/webkit>
(https://bugs.webkit.org/show_bug.cgi?id=158121)
<rdar://problem/
26012994>
For now, if we do not have a frame then consider the document a secure context. One way this can happen
is the page accesses a frame that was removed from the document as demonstrated by the test:
fast/dom/Window/property-access-on-cached-window-after-frame-removed.html. Treating a frameless
document as a secure context also matches Blink's implementation:
<https://chromium.googlesource.com/chromium/src/+/
fc202b2b1174f5732f7b9e63a6c46fd01ac2be02/third_party/WebKit/Source/core/dom/Document.cpp#4079>.
* dom/Document.cpp:
(WebCore::Document::isSecureContext):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218037
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryanhaddad@apple.com [Sat, 10 Jun 2017 00:37:06 +0000 (00:37 +0000)]
Unreviewed, rolling out r218003.
This change caused assertion failures in existing LayoutTests.
Reverted changeset:
"Image should clear its ImageObserver* when CachedImage
releases the last reference to its RefCounted<ImageObserver>"
https://bugs.webkit.org/show_bug.cgi?id=173077
http://trac.webkit.org/changeset/218003
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218031
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jiewen_tan@apple.com [Sat, 10 Jun 2017 00:08:28 +0000 (00:08 +0000)]
[WebCrypto] Remove unsupported CryptoAlgorithmIdentifier
https://bugs.webkit.org/show_bug.cgi?id=173128
<rdar://problem/
32666826>
Reviewed by Brent Fulgham.
This patch remove AES_CMAC, DH and CONCAT as they are not implemented and not recommended
by the spec. Hence there is no plan to support them in short term.
No change of behaviour.
* bindings/js/JSCryptoAlgorithmDictionary.cpp:
(WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForSign):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey):
* bindings/js/JSSubtleCryptoCustom.cpp:
(WebCore::normalizeCryptoAlgorithmParameters):
(WebCore::supportExportKeyThrow):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::write):
(WebCore::CloneDeserializer::read):
* crypto/CryptoAlgorithmIdentifier.h:
* crypto/keys/CryptoKeyAES.cpp:
(WebCore::CryptoKeyAES::isValidAESAlgorithm):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218030
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryanhaddad@apple.com [Sat, 10 Jun 2017 00:00:25 +0000 (00:00 +0000)]
Mark fast/mediastream/getUserMedia-grant-persistency3.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=173188
Unreviewed test gardening.
* platform/mac-wk2/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218029
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
dbates@webkit.org [Fri, 9 Jun 2017 23:56:46 +0000 (23:56 +0000)]
Implement W3C Secure Contexts Draft Specification
https://bugs.webkit.org/show_bug.cgi?id=158121
<rdar://problem/
26012994>
Reviewed by Alex Christensen.
Part 2
Implements the Secure Contexts spec., <https://w3c.github.io/webappsec-secure-contexts/> (Editor's
Draft, 17 November 2016) except for the allow-secure-context sandbox flag and restrictions on window.opener
as the former is at risk of being dropped from the specification and the latter is being discussed in
<https://github.com/w3c/webappsec-secure-contexts/issues/42>. We are not making use of the Secure
Contexts functionality at the moment. We will make use of it in a subsequent commit.
* dom/Document.cpp:
(WebCore::Document::isSecureContext): Added,
* dom/Document.h:
* dom/ScriptExecutionContext.h:
(WebCore::ScriptExecutionContext::isSecureContext): Deleted; moved to class SecurityContext.
* dom/SecurityContext.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::isSecureContext): Added.
* page/DOMWindow.h:
* page/SecurityOrigin.cpp:
(WebCore::isLoopbackIPAddress): Convenience function to determine whether the host portion
of the specified URL is a valid loopback address.
(WebCore::shouldTreatAsPotentionallyTrustworthy): Implements the "Is origin potentially trustworthy?"
algorithm from the Secure Context specification.
(WebCore::SecurityOrigin::SecurityOrigin): Compute whether this origin is potentially trustworthy.
Also, use C++ brace initialization syntax in member initialization list.
* page/SecurityOrigin.h:
(WebCore::SecurityOrigin::isPotentionallyTrustworthy): Added.
* page/WindowOrWorkerGlobalScope.idl: Expose attribute isSecureContext. Fix style nit; remove
period from a comment that is not meant to be a complete sentence.
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::isSecureContext): Added.
* workers/WorkerGlobalScope.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218028
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
dbates@webkit.org [Fri, 9 Jun 2017 23:38:05 +0000 (23:38 +0000)]
Implement W3C Secure Contexts Draft Specification
https://bugs.webkit.org/show_bug.cgi?id=158121
<rdar://problem/
26012994>
Reviewed by Chris Dumez.
Part 1
Teach the bindings code generator to generate a runtime check for an interface, attribute or
function annotated with the extended attribute [SecureContext]. For now, the runtime check
(ScriptExecutionContext::isSecureContext()) always returns true. We will flesh out the
implementation of this runtime check in a subsequent commit.
* bindings/scripts/CodeGeneratorJS.pm:
(NeedsRuntimeCheck):
(GenerateRuntimeEnableConditionalString):
Generate a runtime check for an interface, attribute, or function that is annotated with
the extended attribute [SecureContext].
* bindings/scripts/IDLAttributes.json: Update JSON now that we support SecureContext.
* bindings/scripts/preprocess-idls.pl:
(GenerateConstructorAttributes): Add the SecureContext extended attribute to a constructor,
if applicable.
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
(WebCore::JSTestGenerateIsReachablePrototype::finishCreation):
(WebCore::IDLAttribute<JSTestGenerateIsReachable>::cast):
(WebCore::jsTestGenerateIsReachableASecretAttributeGetter):
(WebCore::jsTestGenerateIsReachableASecretAttribute):
* bindings/scripts/test/JS/JSTestGlobalObject.cpp:
(WebCore::JSTestGlobalObject::finishCreation):
(WebCore::jsTestGlobalObjectInstanceFunctionCalculateSecretResultBody):
(WebCore::jsTestGlobalObjectInstanceFunctionCalculateSecretResult):
(WebCore::jsTestGlobalObjectInstanceFunctionGetSecretBooleanBody):
(WebCore::jsTestGlobalObjectInstanceFunctionGetSecretBoolean):
(WebCore::jsTestGlobalObjectInstanceFunctionTestFeatureGetSecretBooleanBody):
(WebCore::jsTestGlobalObjectInstanceFunctionTestFeatureGetSecretBoolean):
* bindings/scripts/test/JS/JSTestNode.cpp:
(WebCore::JSTestNodePrototype::finishCreation):
(WebCore::jsTestNodePrototypeFunctionCalculateSecretResultBody):
(WebCore::jsTestNodePrototypeFunctionCalculateSecretResult):
(WebCore::jsTestNodePrototypeFunctionGetSecretBooleanBody):
(WebCore::jsTestNodePrototypeFunctionGetSecretBoolean):
(WebCore::jsTestNodePrototypeFunctionTestFeatureGetSecretBooleanBody):
(WebCore::jsTestNodePrototypeFunctionTestFeatureGetSecretBoolean):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjPrototype::finishCreation):
(WebCore::jsTestObjPrototypeFunctionCalculateSecretResultBody):
(WebCore::jsTestObjPrototypeFunctionCalculateSecretResult):
(WebCore::jsTestObjPrototypeFunctionGetSecretBooleanBody):
(WebCore::jsTestObjPrototypeFunctionGetSecretBoolean):
(WebCore::jsTestObjPrototypeFunctionTestFeatureGetSecretBooleanBody):
(WebCore::jsTestObjPrototypeFunctionTestFeatureGetSecretBoolean):
Update expected results.
* bindings/scripts/test/TestGenerateIsReachable.idl:
* bindings/scripts/test/TestGlobalObject.idl:
* bindings/scripts/test/TestNode.idl:
* bindings/scripts/test/TestObj.idl:
Add test cases.
* dom/ScriptExecutionContext.h:
(WebCore::ScriptExecutionContext::isSecureContext): Added. For now, always returns true.
We will implement this function in a subsequent commit.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218027
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
dbates@webkit.org [Fri, 9 Jun 2017 23:13:41 +0000 (23:13 +0000)]
CSP: Apply img-src directive to favicon loads
https://bugs.webkit.org/show_bug.cgi?id=172733
Remove CONSOLE MESSAGE line from expected result that I inadvertently left in from an earlier iteration
of the test that did not call testRunner.queueReload(). Calling testRunner.queueReload() clears out
any emitted console messages. The dump of the resource load callbacks is sufficient to ensure that
the favicon was blocked as expected.
* http/tests/security/contentSecurityPolicy/block-favicon-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218026
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Fri, 9 Jun 2017 22:45:00 +0000 (22:45 +0000)]
REGRESSION: LayoutTest js/intl-datetimeformat.html is failing
https://bugs.webkit.org/show_bug.cgi?id=172720
Patch by Andy VanWagoner <thetalecrafter@gmail.com> on 2017-06-09
Reviewed by Darin Adler.
Reenable DateTimeFormat tests, allowing for some variation in the
formatting of time zone names.
* js/intl-datetimeformat-expected.txt:
* js/script-tests/intl-datetimeformat.js:
* platform/mac/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218025
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cdumez@apple.com [Fri, 9 Jun 2017 22:38:40 +0000 (22:38 +0000)]
Use WTF::Function instead of std::function in NetworkProcess code
https://bugs.webkit.org/show_bug.cgi?id=173182
Reviewed by Alex Christensen.
Use WTF::Function instead of std::function in NetworkProcess code to avoid
unnecessary copying.
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/cache/NetworkCacheIOChannel.h:
* NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
(WebKit::NetworkCache::IOChannel::read):
(WebKit::NetworkCache::IOChannel::write):
* NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
(WebKit::NetworkCache::IOChannel::read):
(WebKit::NetworkCache::IOChannel::readSyncInThread):
(WebKit::NetworkCache::IOChannel::write):
* NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
* NetworkProcess/cache/NetworkCacheStatistics.h:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::clearNSURLCache):
(WebKit::NetworkProcess::clearDiskCache):
* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::clearDiskCache):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218024
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
timothy_horton@apple.com [Fri, 9 Jun 2017 22:35:01 +0000 (22:35 +0000)]
REGRESSION (r213584): WeChat app can not switch to next text field
https://bugs.webkit.org/show_bug.cgi?id=173183
<rdar://problem/
32323478>
Reviewed by Wenson Hsieh.
* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/InputViewUpdateDeferrer.mm:
(WebKit::InputViewUpdateDeferrer::~InputViewUpdateDeferrer):
It turns out that _endIgnoringReloadInputViews doesn't actually perform
the update if there was one ignored. It does, however, return whether
there was a change ignored, and we can force an update.
This remains untestable without sizable additional API test infrastructure
for the same reasons as the original patch.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218023
268f45cc-cd09-0410-ab3c-
d52691b4dbfc