hyatt@apple.com [Thu, 8 Dec 2016 21:54:21 +0000 (21:54 +0000)]
@supports fails combinations of conjuctions, disjunctions, and negations of simple conditions
https://bugs.webkit.org/show_bug.cgi?id=137566
<rdar://problem/
18600949>
Reviewed by Dean Jackson.
* TestExpectations:
Test passes now with new @supports parser.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209567
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt@apple.com [Thu, 8 Dec 2016 21:49:18 +0000 (21:49 +0000)]
[CSS Parser] Add strict checking for right parens to selector functions like :matches, :not etc.
https://bugs.webkit.org/show_bug.cgi?id=165624
Reviewed by Dean Jackson.
Source/WebCore:
Unskipped fast/selectors/invalid-functional-pseudo-class.html.
* css/parser/CSSSelectorParser.cpp:
(WebCore::CSSSelectorParser::consumePseudo):
Bail if we don't actually consume a right parenthesis.
LayoutTests:
* TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209566
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 8 Dec 2016 21:46:09 +0000 (21:46 +0000)]
Exit fullscreen on escape key down, not up.
https://bugs.webkit.org/show_bug.cgi?id=165618
rdar://problem/
29581688
This problem was introduced by https://bugs.webkit.org/show_bug.cgi?id=165416
The fix to only exit fullscreen on key down, not key up.
Patch by Jeremy Jones <jeremyj@apple.com> on 2016-12-08
Reviewed by Jer Noble.
* page/EventHandler.cpp:
(WebCore::EventHandler::keyEvent):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209565
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jiewen_tan@apple.com [Thu, 8 Dec 2016 21:42:53 +0000 (21:42 +0000)]
[WebCrypto] Replace webkitSubtle with subtle for all crypto/workers/subtle/ tests
https://bugs.webkit.org/show_bug.cgi?id=165540
Reviewed by Brent Fulgham.
* crypto/workers/subtle/aes-postMessage-worker.html:
* crypto/workers/subtle/hmac-postMessage-worker.html:
* crypto/workers/subtle/hrsa-postMessage-worker-expected.txt:
* crypto/workers/subtle/hrsa-postMessage-worker.html:
* crypto/workers/subtle/multiple-postMessage-worker.html:
* crypto/workers/subtle/resources/hrsa-postMessage-worker.js:
* crypto/workers/subtle/rsa-postMessage-worker.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209564
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryanhaddad@apple.com [Thu, 8 Dec 2016 21:42:24 +0000 (21:42 +0000)]
Rebaseline some css tests for ios-simulator.
Unreviewed test gardening.
* platform/ios-simulator/fast/css/font_property_normal-expected.txt:
* platform/ios-simulator/fast/css/image-set-unprefixed-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209563
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt@apple.com [Thu, 8 Dec 2016 21:25:59 +0000 (21:25 +0000)]
[CSS Parser] Unskip grid tests
https://bugs.webkit.org/show_bug.cgi?id=165623
Reviewed by Zalan Bujtas.
* TestExpectations:
* fast/css-grid-layout/grid-auto-flow-get-set-expected.txt:
* fast/css-grid-layout/grid-auto-flow-get-set.html:
* fast/css-grid-layout/grid-columns-rows-get-set-expected.txt:
* fast/css-grid-layout/grid-template-shorthand-get-set-expected.txt:
* fast/css-grid-layout/grid-template-shorthand-get-set.html:
* fast/css-grid-layout/non-grid-columns-rows-get-set-expected.txt:
* fast/css-grid-layout/resources/grid-columns-rows-get-set.js:
* fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209562
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zalan@apple.com [Thu, 8 Dec 2016 21:25:10 +0000 (21:25 +0000)]
Overlapping text at AppleSeed forum's footer.
https://bugs.webkit.org/show_bug.cgi?id=165613
Reviewed by Simon Fraser.
This is a test case for r207219.
* fast/text/float-with-sibling-text-overlaps-when-text-decoration-changes-expected.html: Added.
* fast/text/float-with-sibling-text-overlaps-when-text-decoration-changes.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209561
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jfbastien@apple.com [Thu, 8 Dec 2016 21:09:06 +0000 (21:09 +0000)]
WebAssembly JS API: wire up Instance imports
https://bugs.webkit.org/show_bug.cgi?id=165118
Reviewed by Saam Barati.
JSTests:
* wasm/js-api/test_Instance.js: add the test, disabled for now
Source/JavaScriptCore:
Change a bunch of the WebAssembly object model, and pipe the
necessary changes to be able to call JS imports from
WebAssembly. This will make it easier to call_indirect, and
unblock many other missing features.
As a follow-up I need to teach JSC::linkFor to live without a
CodeBlock: wasm doesn't have one and the IC patching is sad. We'll
switch on the callee (or its type?) and then use that as the owner
(because the callee is alive if the instance is alive, ditto
module, and module owns the CallLinkInfo).
* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* interpreter/CallFrame.h:
(JSC::ExecState::callee): give access to the callee as a JSCell
* jit/RegisterSet.cpp: dead code from previous WebAssembly implementation
* jsc.cpp:
(callWasmFunction):
(functionTestWasmModuleFunctions):
* runtime/JSCellInlines.h:
(JSC::ExecState::vm): check callee instead of jsCallee: wasm only has a JSCell and not a JSObject
* runtime/VM.cpp:
(JSC::VM::VM): store the "top" WebAssembly.Instance on entry to WebAssembly (and restore the previous one on exit)
* runtime/VM.h:
* testWasm.cpp:
(runWasmTests):
* wasm/JSWebAssembly.h:
* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::B3IRGenerator): pass unlinked calls around to shorten their lifetime: they're ony needed until the Plan is done
(JSC::Wasm::B3IRGenerator::addCall):
(JSC::Wasm::createJSToWasmWrapper):
(JSC::Wasm::parseAndCompile): also pass in the function index space, so that imports can be signature-checked along with internal functions
* wasm/WasmB3IRGenerator.h:
* wasm/WasmBinding.cpp: Added.
(JSC::Wasm::importStubGenerator): stubs from wasm to JS
* wasm/WasmBinding.h: Copied from Source/JavaScriptCore/wasm/WasmValidate.h.
* wasm/WasmCallingConvention.h:
(JSC::Wasm::CallingConvention::setupFrameInPrologue):
* wasm/WasmFormat.h: fix the object model
(JSC::Wasm::CallableFunction::CallableFunction):
* wasm/WasmFunctionParser.h: simplify some of the failure condition checks
(JSC::Wasm::FunctionParser<Context>::FunctionParser): need function index space, not just internal functions
(JSC::Wasm::FunctionParser<Context>::parseExpression):
* wasm/WasmModuleParser.cpp: early-create some of the structures which will be needed later
(JSC::Wasm::ModuleParser::parseImport):
(JSC::Wasm::ModuleParser::parseFunction):
(JSC::Wasm::ModuleParser::parseMemory):
(JSC::Wasm::ModuleParser::parseExport):
(JSC::Wasm::ModuleParser::parseCode):
* wasm/WasmModuleParser.h:
(JSC::Wasm::ModuleParser::functionIndexSpace):
(JSC::Wasm::ModuleParser::functionLocations):
* wasm/WasmParser.h:
(JSC::Wasm::Parser::consumeUTF8String):
* wasm/WasmPlan.cpp: pass around the wasm objects at the right time, reducing their lifetime and making it easier to pass them around when needed
(JSC::Wasm::Plan::run):
(JSC::Wasm::Plan::initializeCallees):
* wasm/WasmPlan.h:
(JSC::Wasm::Plan::exports):
(JSC::Wasm::Plan::internalFunctionCount):
(JSC::Wasm::Plan::jsToWasmEntryPointForFunction):
(JSC::Wasm::Plan::takeModuleInformation):
(JSC::Wasm::Plan::takeCallLinkInfos):
(JSC::Wasm::Plan::takeWasmToJSStubs):
(JSC::Wasm::Plan::takeFunctionIndexSpace):
* wasm/WasmValidate.cpp: check function index space instead of only internal functions
(JSC::Wasm::Validate::addCall):
(JSC::Wasm::validateFunction):
* wasm/WasmValidate.h:
* wasm/js/JSWebAssemblyCallee.cpp:
(JSC::JSWebAssemblyCallee::finishCreation):
* wasm/js/JSWebAssemblyCallee.h:
(JSC::JSWebAssemblyCallee::create):
(JSC::JSWebAssemblyCallee::jsToWasmEntryPoint):
* wasm/js/JSWebAssemblyInstance.cpp:
(JSC::JSWebAssemblyInstance::create):
(JSC::JSWebAssemblyInstance::JSWebAssemblyInstance):
(JSC::JSWebAssemblyInstance::visitChildren):
* wasm/js/JSWebAssemblyInstance.h: hold the import functions off the end of the Instance
(JSC::JSWebAssemblyInstance::importFunction):
(JSC::JSWebAssemblyInstance::importFunctions):
(JSC::JSWebAssemblyInstance::setImportFunction):
(JSC::JSWebAssemblyInstance::offsetOfImportFunctions):
(JSC::JSWebAssemblyInstance::offsetOfImportFunction):
(JSC::JSWebAssemblyInstance::allocationSize):
* wasm/js/JSWebAssemblyModule.cpp:
(JSC::JSWebAssemblyModule::create):
(JSC::JSWebAssemblyModule::JSWebAssemblyModule):
(JSC::JSWebAssemblyModule::visitChildren):
* wasm/js/JSWebAssemblyModule.h: hold the link call info, the import function stubs, and the function index space
(JSC::JSWebAssemblyModule::signatureForFunctionIndexSpace):
(JSC::JSWebAssemblyModule::importCount):
(JSC::JSWebAssemblyModule::calleeFromFunctionIndexSpace):
* wasm/js/WebAssemblyFunction.cpp:
(JSC::callWebAssemblyFunction): set top Instance on VM
* wasm/js/WebAssemblyFunction.h:
(JSC::WebAssemblyFunction::instance):
* wasm/js/WebAssemblyInstanceConstructor.cpp:
(JSC::constructJSWebAssemblyInstance): handle function imports
* wasm/js/WebAssemblyModuleConstructor.cpp:
(JSC::constructJSWebAssemblyModule): generate the stubs for import functions
* wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::link):
* wasm/js/WebAssemblyToJSCallee.cpp: Copied from Source/JavaScriptCore/wasm/js/JSWebAssemblyCallee.cpp.
(JSC::WebAssemblyToJSCallee::create): dummy JSCell singleton which lives on the VM, and is put as the callee in the import stub's frame to identified it when unwinding
(JSC::WebAssemblyToJSCallee::createStructure):
(JSC::WebAssemblyToJSCallee::WebAssemblyToJSCallee):
(JSC::WebAssemblyToJSCallee::finishCreation):
(JSC::WebAssemblyToJSCallee::destroy):
* wasm/js/WebAssemblyToJSCallee.h: Copied from Source/JavaScriptCore/wasm/WasmB3IRGenerator.h.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209560
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt@apple.com [Thu, 8 Dec 2016 20:57:59 +0000 (20:57 +0000)]
[CSS Parser] Unskip background parsing tests
https://bugs.webkit.org/show_bug.cgi?id=165619
Reviewed by Zalan Bujtas.
Source/WebCore:
Change background-position so that the origin being set is tracked
on a per-x/y basis instead of as a single boolean. The single boolean
caused lousy computed style dumping, since we would switch into verbose
mode for both x and y, even if only one of them had a pair set for it.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::createPositionListForLayer):
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertPositionComponent):
* rendering/style/FillLayer.cpp:
(WebCore::FillLayer::FillLayer):
(WebCore::FillLayer::operator=):
(WebCore::FillLayer::fillUnsetProperties):
* rendering/style/FillLayer.h:
(WebCore::FillLayer::isBackgroundXOriginSet):
(WebCore::FillLayer::isBackgroundYOriginSet):
(WebCore::FillLayer::setBackgroundXOrigin):
(WebCore::FillLayer::setBackgroundYOrigin):
(WebCore::FillLayer::clearXPosition):
(WebCore::FillLayer::clearYPosition):
(WebCore::FillLayer::isBackgroundOriginSet): Deleted.
LayoutTests:
* TestExpectations:
* fast/backgrounds/background-position-parsing-2-expected.txt:
* fast/backgrounds/background-position-parsing-2.html:
* fast/backgrounds/background-shorthand-after-set-backgroundSize-expected.txt:
* fast/backgrounds/background-shorthand-after-set-backgroundSize.html:
* fast/backgrounds/background-shorthand-with-backgroundSize-style-expected.txt:
* fast/backgrounds/background-shorthand-with-backgroundSize-style.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209559
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
achristensen@apple.com [Thu, 8 Dec 2016 20:52:35 +0000 (20:52 +0000)]
Add SPI for sending WebsiteSettings to WebProcess during navigation
https://bugs.webkit.org/show_bug.cgi?id=165517
<rdar://
29341068>
Source/WebKit2:
We add the ability for the navigation client to send settings to the WebProcess
based on the URL of the document being navigated to. This approach adds no new IPC
messages and allows the application to decide what settings to use during navigation
instead of declaratively before navigation. Right now there is only one setting,
whether to disable content blockers, but this infrastructure can be used for more settings.
Reviewed by Anders Carlsson.
* CMakeLists.txt:
* PlatformMac.cmake:
* Shared/API/APIObject.h:
* Shared/API/c/WKBase.h:
* Shared/WebsitePolicies.h: Added.
(WebKit::WebsitePolicies::encode):
(WebKit::WebsitePolicies::decode):
* UIProcess/API/APINavigationClient.h:
(API::NavigationClient::decidePolicyForNavigationAction):
(API::NavigationClient::decidePolicyForNavigationResponse):
* UIProcess/API/APIPolicyClient.h:
(API::PolicyClient::decidePolicyForNavigationAction):
(API::PolicyClient::decidePolicyForNewWindowAction):
(API::PolicyClient::decidePolicyForResponse):
* UIProcess/API/APIWebsitePolicies.cpp: Added.
(API::WebsitePolicies::create):
* UIProcess/API/APIWebsitePolicies.h: Added.
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKFramePolicyListener.cpp:
(WKFramePolicyListenerUse):
(WKFramePolicyListenerUseWithPolicies):
* UIProcess/API/C/WKFramePolicyListener.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPagePolicyClient):
* UIProcess/API/C/WKWebsitePolicies.cpp: Added.
(WKWebsitePoliciesGetTypeID):
(WKWebsitePoliciesCreate):
(WKWebsitePoliciesSetContentBlockersEnabled):
(WKWebsitePoliciesGetContentBlockersEnabled):
* UIProcess/API/C/WKWebsitePolicies.h: Added.
* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
* UIProcess/API/Cocoa/_WKWebsitePolicies.h: Added.
* UIProcess/API/Cocoa/_WKWebsitePolicies.mm: Added.
(-[_WKWebsitePolicies dealloc]):
(-[_WKWebsitePolicies init]):
(-[_WKWebsitePolicies setContentBlockersEnabled:]):
(-[_WKWebsitePolicies contentBlockersEnabled]):
(-[_WKWebsitePolicies description]):
(-[_WKWebsitePolicies _apiObject]):
* UIProcess/API/Cocoa/_WKWebsitePoliciesInternal.h: Added.
(WebKit::wrapper):
* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::reloadBrowsingContext):
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):
(WebKit::tryAppLink):
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationResponse):
* UIProcess/WebFormSubmissionListenerProxy.cpp:
(WebKit::WebFormSubmissionListenerProxy::continueSubmission):
* UIProcess/WebFrameListenerProxy.cpp:
(WebKit::WebFrameListenerProxy::receivedPolicyDecision):
* UIProcess/WebFrameListenerProxy.h:
* UIProcess/WebFramePolicyListenerProxy.cpp:
(WebKit::WebFramePolicyListenerProxy::use):
(WebKit::WebFramePolicyListenerProxy::download):
(WebKit::WebFramePolicyListenerProxy::ignore):
* UIProcess/WebFramePolicyListenerProxy.h:
(WebKit::WebFramePolicyListenerProxy::create):
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::receivedPolicyDecision):
* UIProcess/WebFrameProxy.h:
* UIProcess/WebInspectorProxy.cpp:
(WebKit::decidePolicyForNavigationAction):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::receivedPolicyDecision):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
Tools:
Reviewed by Anders Carlsson.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/contentBlockerCheck.html: Added.
* TestWebKitAPI/Tests/WebKit2Cocoa/WebsitePolicies.mm: Added.
(-[WebsitePoliciesDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
(-[WebsitePoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]):
(-[WebsitePoliciesDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(TEST):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209558
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
joepeck@webkit.org [Thu, 8 Dec 2016 20:23:41 +0000 (20:23 +0000)]
Web Inspector: Unable to delete breakpoint from worker script
https://bugs.webkit.org/show_bug.cgi?id=165578
Reviewed by Matt Baker.
Source/WebInspectorUI:
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype._removeBreakpoint):
Match setting breakpoints. If this is a "URL breakpoint", affect
all targets. If this is a "Script breakpoint", affect just the
single target containing that Script.
LayoutTests:
* inspector/worker/debugger-shared-breakpoint-expected.txt: Added.
* inspector/worker/debugger-shared-breakpoint.html: Added.
Ensure setting / removing a breakpoint affects all Workers that share
a resource with the same URL.
* inspector/worker/resources/worker-debugger-pause.js:
Add an echo command that will be useful to ensure Workers are not paused.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209557
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryanhaddad@apple.com [Thu, 8 Dec 2016 20:14:26 +0000 (20:14 +0000)]
Rebaseline fast/selectors/nth-last-child-bounds.html after r209548.
Unreviewed test gardening.
* fast/selectors/nth-child-bounds-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209556
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 8 Dec 2016 20:01:00 +0000 (20:01 +0000)]
pointer lock should exit when a js alert is shown
https://bugs.webkit.org/show_bug.cgi?id=165423
rdar://problem/
29430803
Patch by Jeremy Jones <jeremyj@apple.com> on 2016-12-08
Reviewed by Jer Noble.
Source/WebCore:
Test: pointer-lock/lock-lost-on-alert.html
* page/DOMWindow.cpp:
(WebCore::DOMWindow::alert):
(WebCore::DOMWindow::confirm):
(WebCore::DOMWindow::prompt):
LayoutTests:
* platform/mac/TestExpectations:
* pointer-lock/lock-lost-on-alert-expected.txt: Added.
* pointer-lock/lock-lost-on-alert.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209555
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
antti@apple.com [Thu, 8 Dec 2016 19:58:21 +0000 (19:58 +0000)]
Salt network cache hashes
https://bugs.webkit.org/show_bug.cgi?id=164924
Reviewed by Alex Christensen.
To enhance privacy make cache content unidentifiable from file names alone.
This is done by generating a unique persistent salt for each cache instance.
It is used when computing hashes used in file names.
The patch also replaces plain text partition directory names with salted hashes.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::makeCacheKey):
(WebKit::NetworkCache::makeCacheKey): Deleted.
* NetworkProcess/cache/NetworkCache.h:
Increment cache version.
* NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
(WebKit::NetworkCache::BlobStorage::BlobStorage):
(WebKit::NetworkCache::BlobStorage::add):
(WebKit::NetworkCache::BlobStorage::get):
Use salt for blob content hash.
* NetworkProcess/cache/NetworkCacheBlobStorage.h:
* NetworkProcess/cache/NetworkCacheData.cpp:
(WebKit::NetworkCache::computeSHA1):
For simplicity all SHA1s are now salted.
(WebKit::NetworkCache::makeSalt):
(WebKit::NetworkCache::readOrMakeSalt):
Read salt if it exists, generate and persist it otherwise.
* NetworkProcess/cache/NetworkCacheData.h:
* NetworkProcess/cache/NetworkCacheKey.cpp:
(WebKit::NetworkCache::Key::Key):
Remove the "No partition" string and just empty.
That was only needed to have a directory name of some sort.
(WebKit::NetworkCache::Key::computeHash):
Use salt for key hash.
(WebKit::NetworkCache::Key::computePartitionHash):
Separate hash for partition.
* NetworkProcess/cache/NetworkCacheKey.h:
* NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
(WebKit::NetworkCache::makeSubresourcesKey):
(WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::saveToDiskIfReady):
(WebKit::NetworkCache::SpeculativeLoadManager::retrieveSubresourcesEntry):
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::makeSaltFilePath):
(WebKit::NetworkCache::Storage::open):
Cache can't be opened if we can't read or persist a salt.
(WebKit::NetworkCache::traverseRecordsFiles):
(WebKit::NetworkCache::Storage::Storage):
(WebKit::NetworkCache::Storage::synchronize):
(WebKit::NetworkCache::Storage::recordDirectoryPathForKey):
Use the partition hash in the directory name instead of a plain text name.
(WebKit::NetworkCache::decodeRecordHeader):
(WebKit::NetworkCache::Storage::readRecord):
(WebKit::NetworkCache::Storage::encodeRecord):
(WebKit::NetworkCache::Storage::traverse):
(WebKit::NetworkCache::Storage::clear):
* NetworkProcess/cache/NetworkCacheStorage.h:
(WebKit::NetworkCache::Storage::salt):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209554
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mark.lam@apple.com [Thu, 8 Dec 2016 19:43:31 +0000 (19:43 +0000)]
Enable JSC restricted options by default in the jsc shell.
https://bugs.webkit.org/show_bug.cgi?id=165615
Reviewed by Keith Miller.
The jsc shell is only used for debugging and development testing. We should
allow it to use restricted options like JSC_useDollarVM even for release builds.
* jsc.cpp:
(jscmain):
* runtime/Options.cpp:
(JSC::Options::enableRestrictedOptions):
(JSC::Options::isAvailable):
(JSC::allowRestrictedOptions): Deleted.
* runtime/Options.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209553
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
weinig@apple.com [Thu, 8 Dec 2016 19:09:35 +0000 (19:09 +0000)]
[WebIDL] WebGLContextAttributes should be a dictionary
https://bugs.webkit.org/show_bug.cgi?id=165572
Reviewed by Dean Jackson.
Source/WebCore:
* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
Remove unused files.
* bindings/js/JSHTMLCanvasElementCustom.cpp:
(WebCore::JSHTMLCanvasElement::getContext):
(WebCore::attributesFor3DContext): Deleted.
Re-work getContext to use JSDOMConvert and use the WebGLContextAttributes dictionary.
* bindings/scripts/CodeGeneratorJS.pm:
(NativeToJSValueDOMConvertNeedsState):
(NativeToJSValueDOMConvertNeedsGlobalObject):
Add missing inclusion of dictionaries.
* html/HTMLCanvasElement.cpp:
(WebCore::maxActivePixelMemory):
(WebCore::HTMLCanvasElement::getContext):
(WebCore::HTMLCanvasElement::is2dType):
(WebCore::HTMLCanvasElement::getContext2d):
(WebCore::shouldEnableWebGL):
(WebCore::HTMLCanvasElement::is3dType):
(WebCore::HTMLCanvasElement::getContextWebGL):
* html/HTMLCanvasElement.h:
Refactor context creation of 2d and WebGL contexts into their own functions. Make the
WebGL one take a WebGLContextAttributes struct.
* html/HTMLCanvasElement.idl:
No functionality change. Make IDL match the latest spec.
* html/canvas/CanvasContextAttributes.cpp: Removed.
* html/canvas/CanvasContextAttributes.h: Removed.
Remove unneeded base class.
* html/canvas/WebGLContextAttributes.cpp: Removed.
* html/canvas/WebGLContextAttributes.h:
Instead of a class, we can use a type alias of GraphicsContext3D::Attributes for
WebGLContextAttributes.
* html/canvas/WebGLContextAttributes.idl:
Convert to a dictionary.
* html/canvas/WebGL2RenderingContext.cpp:
* html/canvas/WebGL2RenderingContext.h:
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::create):
(WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
(WebCore::WebGLRenderingContextBase::clearIfComposited):
(WebCore::WebGLRenderingContextBase::getContextAttributes):
(WebCore::WebGLRenderingContextBase::applyStencilTest):
* html/canvas/WebGLRenderingContextBase.h:
Update to WebGLContextAttributes by value, since it is a simple struct now. Update getContextAttributes
to return a std::optional<WebGLContextAttributes>.
* html/canvas/WebGLRenderingContextBase.idl:
Make getContextAttributes return a nullable WebGLContextAttributes, as per spec.
* platform/graphics/GraphicsContext3D.h:
Sort attributes into categories, one that match WebGLContextAttributes, and the remainder.
LayoutTests:
* fast/canvas/webgl/context-creation-attributes-expected.txt:
Update test results.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209549
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt@apple.com [Thu, 8 Dec 2016 18:57:34 +0000 (18:57 +0000)]
[CSS Parser] Unskip/remove more tests
https://bugs.webkit.org/show_bug.cgi?id=165611
Reviewed by Zalan Bujtas.
* TestExpectations:
* fast/css/parse-color-int-or-percent-crash.html:
* fast/css/string-quote-binary-expected.txt: Removed.
* fast/css/string-quote-binary.html: Removed.
* fast/masking/parsing-mask-expected.txt:
* fast/masking/parsing-mask.html:
* fast/selectors/nth-child-bounds.html:
* fast/selectors/nth-last-child-bounds-expected.txt:
* fast/selectors/nth-last-child-bounds.html:
* fast/text/text-combine-crash.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209548
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt@apple.com [Thu, 8 Dec 2016 18:37:23 +0000 (18:37 +0000)]
[CSS Parser] Unskip more tests
https://bugs.webkit.org/show_bug.cgi?id=165610
Reviewed by Zalan Bujtas.
* TestExpectations:
* fast/css/css-selector-text-expected.txt:
* fast/css/css-selector-text.html:
* fast/css/css-set-selector-text-expected.txt:
* fast/css/css-set-selector-text.html:
* fast/css/parsing-css-nth-child-expected.txt:
* fast/css/parsing-css-nth-child.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209547
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zalan@apple.com [Thu, 8 Dec 2016 18:20:01 +0000 (18:20 +0000)]
Do not create multicolumn context for certain type of renderers.
https://bugs.webkit.org/show_bug.cgi?id=135601
<rdar://problem/
27686300>
Reviewed by David Hyatt.
Source/WebCore:
Certain type of renderers including forms should not initialize multicolumn context for
their inner (shadow) content. It just does not makes sense and is inline with what other browsers do.
Test: fast/multicol/no-multicol-for-textareas.html
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::willCreateColumns):
(WebCore::RenderBlockFlow::requiresColumns):
* rendering/RenderBlockFlow.h:
LayoutTests:
* fast/multicol/no-multicol-for-textareas-expected.txt: Added.
* fast/multicol/no-multicol-for-textareas.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209546
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt@apple.com [Thu, 8 Dec 2016 18:19:14 +0000 (18:19 +0000)]
[CSS Parser] Unskip more tests
https://bugs.webkit.org/show_bug.cgi?id=165609
Reviewed by Zalan Bujtas.
A note on the parsing-css-attribute-* tests. These tests attempted to test namespaces, but
you really can't do that easily. A @namespace rule is only valid within the scope of its
stylesheet, and the test was assuming the namespace would apply outside of the stylesheet
scope.
The old parser would not properly reject prefixes that didn't point to any valid namespace,
and so it was possible to test prefixes. The new parser rejects these invalid prefixes, so just
remove the namespace component of these two tests.
* TestExpectations:
* fast/css/attr-parsing-expected.txt:
* fast/css/attr-parsing.html:
* fast/css/invalid-cursor-property-crash.html:
* fast/css/parsing-css-attribute-case-insensitive-value-1.html:
* fast/css/parsing-css-attribute-case-insensitive-value-2.html:
* fast/shadow-dom/slotted-pseudo-element-css-text-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209545
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cdumez@apple.com [Thu, 8 Dec 2016 18:06:44 +0000 (18:06 +0000)]
Unreviewed, rolling out r209489.
Likely caused large regressions on JetStream, Sunspider and
Speedometer
Reverted changeset:
"Add system trace points for JavaScript VM entry/exit"
https://bugs.webkit.org/show_bug.cgi?id=165550
http://trac.webkit.org/changeset/209489
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209544
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt@apple.com [Thu, 8 Dec 2016 18:02:29 +0000 (18:02 +0000)]
[CSS Parser] Unskip more tests
https://bugs.webkit.org/show_bug.cgi?id=165608
Reviewed by Zalan Bujtas.
* TestExpectations:
* fast/css/font-property-priority-expected.txt:
* fast/css/image-set-unprefixed.html:
* fast/css/parsing-text-emphasis-expected.txt:
* fast/css/parsing-text-emphasis.html:
* fast/css/uri-token-parsing-expected.txt:
* fast/css/uri-token-parsing.html:
* platform/mac/fast/css/font_property_normal-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209543
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
keith_miller@apple.com [Thu, 8 Dec 2016 17:59:52 +0000 (17:59 +0000)]
Move LEB tests to API tests
https://bugs.webkit.org/show_bug.cgi?id=165586
Reviewed by Saam Barati.
Source/JavaScriptCore:
Delete old stuff.
* testWasm.cpp:
(printUsageStatement):
(CommandLine::parseArguments):
(main):
(runLEBTests): Deleted.
Tools:
Move the tests from testWasm.cpp and make them functions
rather than macros.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/LEBDecoder.cpp: Added.
(TestWebKitAPI::testUnsignedLEBDecode):
(TestWebKitAPI::TEST):
(TestWebKitAPI::testInt32LEBDecode):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209542
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt@apple.com [Thu, 8 Dec 2016 17:46:41 +0000 (17:46 +0000)]
[CSS Parser] REGRESSION: Values of 0 should not be allowed for -webkit-aspect-ratio
https://bugs.webkit.org/show_bug.cgi?id=165607
Reviewed by Simon Fraser.
Source/WebCore:
Unskipped fast/css/aspect-ratio-parsing-tests.html.
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeWebkitAspectRatio):
Don't allow 0 as either the left or right value of the ratio.
LayoutTests:
* TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209541
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cdumez@apple.com [Thu, 8 Dec 2016 17:45:46 +0000 (17:45 +0000)]
Support running the layout tests offline
https://bugs.webkit.org/show_bug.cgi?id=165534
Reviewed by Ryosuke Niwa.
LayoutTests/imported/w3c:
Commit W3C web-platform-tests modules so that it is now possible to run
layout tests offline.
* resources/web-platform-tests-modules.json:
* resources/web-platform-tests-modules/darobin/webidl2.js/archive/
bd216bcd5596d60734450adc938155deab1e1a80.tar.gz: Added.
* resources/web-platform-tests-modules/dontcallmedom/widlproc/archive/
4ef8dde69c0ba3d0167bccfa2775eea7f0d6c7fe.tar.gz: Added.
* resources/web-platform-tests-modules/html5lib/html5lib-python/archive/
7cce65bbaa78411f98b8b37eeefc9db03c580097.tar.gz: Added.
* resources/web-platform-tests-modules/html5lib/html5lib-tests/archive/
a9badff0cd2fe337170769d42ca2df5e96d30f97.tar.gz: Added.
* resources/web-platform-tests-modules/jgraham/six/archive/
3b6173c833d217ab0186c355804f5925cbcfca47.tar.gz: Added.
* resources/web-platform-tests-modules/pytest-dev/pytest/archive/
168daaa71f4cc5f846064ebebab41b9cf625a89a.tar.gz: Added.
* resources/web-platform-tests-modules/w3c/pywebsocket/archive/
8c285d9015121e8c1c40be852439fc03b4a18112.tar.gz: Added.
* resources/web-platform-tests-modules/w3c/testharness.js/archive/
873f9680aff66553f84d38f21a038c4534cc2789.tar.gz: Added.
* resources/web-platform-tests-modules/w3c/wdclient/archive/
de9b46ec049f0b2a6fe261e27804970535ba8658.tar.gz: Added.
* resources/web-platform-tests-modules/w3c/wpt-tools/archive/
cf9748586c2bca14998eda5956be6cf4d6d221d9.tar.gz: Added.
* resources/web-platform-tests-modules/w3c/wptserve/archive/
071c51e26a57300979ad53313970d7247979f6d3.tar.gz: Added.
Tools:
* Scripts/webkitpy/common/system/autoinstall.py:
(AutoInstaller._download_to_stream):
getcode() returns None for file URLs so handle this.
* Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:
(WebPlatformTestServer._install_modules):
Deal with local path in the json file and resolve them into file URLs
before using AutoInstall.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209540
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt@apple.com [Thu, 8 Dec 2016 17:32:20 +0000 (17:32 +0000)]
[CSS Parser] Unskip more tests
https://bugs.webkit.org/show_bug.cgi?id=165605
Reviewed by Zalan Bujtas.
* TestExpectations:
* fast/dom/Window/getMatchedCSSRules-with-pseudo-elements-complex-expected.txt:
* fast/dom/Window/getMatchedCSSRules-with-pseudo-elements-complex.html:
* fast/selectors/querySelector-pseudo-element-expected.txt:
* fast/selectors/querySelector-pseudo-element-inside-functional-pseudo-class-any-expected.txt:
* fast/selectors/querySelector-pseudo-element-inside-functional-pseudo-class-any.html:
* fast/selectors/querySelector-pseudo-element.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209539
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt@apple.com [Thu, 8 Dec 2016 16:50:51 +0000 (16:50 +0000)]
[CSS Parser] Unskip more tests
https://bugs.webkit.org/show_bug.cgi?id=165604
Reviewed by Zalan Bujtas.
* TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209538
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt@apple.com [Thu, 8 Dec 2016 16:47:12 +0000 (16:47 +0000)]
[CSS Parser] Unskip more tests
https://bugs.webkit.org/show_bug.cgi?id=165602
Reviewed by Zalan Bujtas.
* TestExpectations:
* fast/css/remove-shorthand-expected.txt:
* fast/css/transform-inline-style-expected.txt:
* fast/regions/region-styling/parsing-region-style-rule.html:
* fast/shapes/parsing/parsing-shape-image-threshold-expected.txt:
* fast/shapes/parsing/parsing-shape-image-threshold.html:
* fast/shapes/shape-outside-floats/shape-outside-animation-expected.txt:
* fast/shapes/shape-outside-floats/shape-outside-animation.html:
* platform/mac/svg/webarchive/svg-cursor-subresources-expected.txt:
* svg/webarchive/svg-cursor-subresources.svg:
* transitions/transitions-parsing-expected.txt:
* transitions/transitions-parsing.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209537
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
eric.carlson@apple.com [Thu, 8 Dec 2016 14:09:16 +0000 (14:09 +0000)]
Fix the EFL build.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::isPlayingMediaDidChange): Add another ENABLE(MEDIA_STREAM) guard.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209536
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
antti@apple.com [Thu, 8 Dec 2016 14:05:27 +0000 (14:05 +0000)]
Source/WebCore:
::after and ::before don't work on :host
https://bugs.webkit.org/show_bug.cgi?id=164675
<rdar://problem/
29231874>
Reviewed by Andreas Kling.
We didn't allow combining :host with any other selectors. Pseudo elements should be allowed.
Test: fast/shadow-dom/shadow-host-with-before-after.html
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::matchAuthorRules):
Allow pseudo element matching.
(WebCore::ElementRuleCollector::matchHostPseudoClassRules):
Use the normal collectMatchingRulesForList path instead of a direct call to SelectorChecker::matchHostPseudoClass.
This path supports pseudo elements.
Pass the information that we are matching :host rules with m_isMatchingHostPseudoClass bit
similarly to how this is done with slots.
(WebCore::ElementRuleCollector::ruleMatches):
* css/ElementRuleCollector.h:
* css/RuleSet.cpp:
Collect :host rules similarly to other rules.
(WebCore::RuleSet::addRule):
* css/SelectorChecker.cpp:
Rename didMoveToShadowHost->mayMatchHostPseudoClass for clarity.
(WebCore::SelectorChecker::match):
Enable :host matching in the current context immediately if needed.
(WebCore::SelectorChecker::matchHostPseudoClass):
The check for illegal combinations with :host is now done in checkOne().
(WebCore::localContextForParent):
(WebCore::SelectorChecker::checkOne):
In context where :host matches nothing else can match, except pseudo elements.
* css/SelectorChecker.h:
LayoutTests:
:after and :before don't work on :host
https://bugs.webkit.org/show_bug.cgi?id=164675
<rdar://problem/
29231874>
Reviewed by Andreas Kling.
* fast/shadow-dom/shadow-host-with-before-after-expected.html: Added.
* fast/shadow-dom/shadow-host-with-before-after.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209535
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
tpopela@redhat.com [Thu, 8 Dec 2016 13:39:46 +0000 (13:39 +0000)]
[GTK] Process accelerated compositing env variables only if they are really enabled
https://bugs.webkit.org/show_bug.cgi?id=165300
Don't process the WEBKIT_FORCE_COMPOSITING_MODE and
WEBKIT_DISABLE_COMPOSITING_MODE env variables if they are disabled
(eg. WEBKIT_DISABLE_COMPOSITING_MODE=0).
Reviewed by Michael Catanzaro.
* UIProcess/gtk/WebPreferencesGtk.cpp:
(WebKit::WebPreferences::platformInitializeStore):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209534
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
achristensen@apple.com [Thu, 8 Dec 2016 09:29:28 +0000 (09:29 +0000)]
Fix CMake build.
Source/WebCore:
* PlatformMac.cmake:
Add PerformanceLoggingCocoa.mm after r209181.
Source/WebKit2:
* CMakeLists.txt:
Add the new NetworkProcess/capture include directory to find new headers from r209498.
* NetworkProcess/capture/NetworkCaptureEvent.cpp:
(WebKit::NetworkCapture::Response::Response):
(WebKit::NetworkCapture::Error::Error):
The String constructor was ambiguous after r209498 because URL has an operator NSString* and String has an NSString constructor.
We should get rid of operator NSString* and operator String on URL.
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
Add some ENABLE(MEDIA_STREAM) macros to fix the build without it enabled after r209512.
Tools:
* DumpRenderTree/PlatformMac.cmake:
Remove CheckedMalloc.cpp after r209516.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209533
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
pvollan@apple.com [Thu, 8 Dec 2016 09:04:29 +0000 (09:04 +0000)]
[Win] Some versions of Cygwin Perl generate incorrect C++ code.
https://bugs.webkit.org/show_bug.cgi?id=165524
rdar://problem/
29508043
Reviewed by Daniel Bates.
Perl strings with variables seems to be handled differently, depending on which version of
Cygwin Perl you are running. To make sure they are handled identically, specify variables
in strings as "${var}" instead of "$var".
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209532
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
achristensen@apple.com [Thu, 8 Dec 2016 08:23:16 +0000 (08:23 +0000)]
Fix EFL build after r209526
https://bugs.webkit.org/show_bug.cgi?id=165594
* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumePositiveIntegerRaw):
nullptr is being automatically converted to false everywhere but EFL.
It should be false. This function returns a bool.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209531
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
achristensen@apple.com [Thu, 8 Dec 2016 08:10:36 +0000 (08:10 +0000)]
Fix iOS debug build after r209498
https://bugs.webkit.org/show_bug.cgi?id=164527
* NetworkProcess/capture/NetworkCaptureLogging.h:
Logs were causing compile warnings/errors. Disable logs for now.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209530
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rniwa@webkit.org [Thu, 8 Dec 2016 08:07:42 +0000 (08:07 +0000)]
REGRESSION (r209490): [ios-simulator] LayoutTest fast/shadow-dom/media-shadow-manipulation.html is failing
https://bugs.webkit.org/show_bug.cgi?id=165590
Unreviewed. Revert r209490 on this test and make the check conditional
since iOS and Mac implements video element differently.
In any case, these tests aren't testing anything useful after r209486.
We should consider removing them or make them use internals.shadowRoot instead in a near term.
* fast/shadow-dom/media-shadow-manipulation-expected.txt:
* fast/shadow-dom/media-shadow-manipulation.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209529
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jfbastien@apple.com [Thu, 8 Dec 2016 07:20:37 +0000 (07:20 +0000)]
Cleanup WebAssembly's RETURN_IF_EXCEPTION
https://bugs.webkit.org/show_bug.cgi?id=165595
Reviewed by Filip Pizlo.
* wasm/js/WebAssemblyCompileErrorConstructor.cpp:
(JSC::constructJSWebAssemblyCompileError):
* wasm/js/WebAssemblyFunction.cpp:
(JSC::callWebAssemblyFunction):
* wasm/js/WebAssemblyRuntimeErrorConstructor.cpp:
(JSC::constructJSWebAssemblyRuntimeError):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209528
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt@apple.com [Thu, 8 Dec 2016 06:47:53 +0000 (06:47 +0000)]
[CSS Parser] Remove font test that tests something nobody supports
https://bugs.webkit.org/show_bug.cgi?id=165596
Reviewed by Zalan Bujtas.
Remove this test that thinks "default" should be a special keyword in fonts. No
other browser treat this as special. Our old parser did, but it's just from some
reading of ancient CSS2 specs and not for any real-world reason.
* TestExpectations:
* fast/css/font-family-parse-keyword.html: Removed.
* fast/css/font-family-parse-keyword-expected.html: Removed.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209527
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt@apple.com [Thu, 8 Dec 2016 06:29:46 +0000 (06:29 +0000)]
REGRESSION: font shorthand parsing is broken
https://bugs.webkit.org/show_bug.cgi?id=165594
Reviewed by Zalan Bujtas.
Source/WebCore:
Unskipping fast/css/font-calculated-value.html.
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeFontWeight):
The new parser did not support calc() in the font-weight property.
In order to support a positive integer, add new functions to consume
and handle positive integers without making a CSSPrimitiveValue out of
the number. These correspond to consumeNumberRaw but are limited to positive
integers.
(WebCore::CSSPropertyParser::consumeFont):
The implicit bool was incorrectly set to true when properties were
defined because releaseNonNull() cleared the variables being null
checked. Add separate booleans to avoid this.
* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::CalcParser::consumePositiveIntegerRaw):
(WebCore::CSSPropertyParserHelpers::consumePositiveIntegerRaw):
* css/parser/CSSPropertyParserHelpers.h:
Add the new helpers that consume positive integers without creating
CSSPrimitiveValues out of them.
LayoutTests:
* TestExpectations:
* fast/css/font-shorthand-html-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209526
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 8 Dec 2016 06:19:57 +0000 (06:19 +0000)]
Exit pointer lock when page goes into page cache.
https://bugs.webkit.org/show_bug.cgi?id=165425
rdar://problem/
29430834
Patch by Jeremy Jones <jeremyj@apple.com> on 2016-12-07
Reviewed by Jer Noble.
Source/WebCore:
Test: pointer-lock/lock-lost-on-navigation.html
Cancel pointer lock when page goes into page cache and add methods to Internals
so it can be tested.
* dom/Document.cpp:
(WebCore::Document::setPageCacheState):
* page/PointerLockController.h:
* testing/Internals.cpp:
(WebCore::Internals::pageHasPendingPointerLock):
(WebCore::Internals::pageHasPointerLock):
* testing/Internals.h:
* testing/Internals.idl:
LayoutTests:
* platform/mac/TestExpectations:
* pointer-lock/lock-lost-on-navigation-expected.txt: Added.
* pointer-lock/lock-lost-on-navigation.html: Added.
* pointer-lock/resources/lock-lost-on-navigation2.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209525
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt@apple.com [Thu, 8 Dec 2016 06:14:07 +0000 (06:14 +0000)]
[CSS Parser] Unskip calc() tests
https://bugs.webkit.org/show_bug.cgi?id=165583
Reviewed by Zalan Bujtas.
* TestExpectations:
* fast/css/flex-shrink-calculated-value-expected.txt:
* fast/css/flex-shrink-calculated-value.html:
* fast/css/negative-calc-values-expected.txt:
* fast/css/negative-calc-values.html:
* fast/css/text-shadow-calc-value-expected.txt:
* fast/css/text-shadow-calc-value.html:
* fast/css/webkit-line-clamp-calculated-value-expected.txt:
* fast/css/webkit-line-clamp-calculated-value.html:
* fast/css/z-index-calculated-value-expected.txt:
* fast/css/z-index-calculated-value.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209524
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 8 Dec 2016 05:51:05 +0000 (05:51 +0000)]
[Modern Media Controls] Tracks panel does not display in the right location in fullscreen and cannot be dismissed
https://bugs.webkit.org/show_bug.cgi?id=165575
Patch by Antoine Quint <graouts@apple.com> on 2016-12-07
Reviewed by Dean Jackson.
Source/WebCore:
We position the tracks panel programmatically based on the current bounds of the fullscreen button in fullscreen.
This allows for the tracks panel to be shown in the right spot even after dragging the controls bar. We also use
the fullscreen media controls as the target for tracking "mousedown" events when the tracks panel is shown in a
fullscreen presentation.
Tests: media/modern-media-controls/tracks-support/tracks-support-show-panel-after-dragging-controls.html
media/modern-media-controls/tracks-support/tracks-support-show-panel-fullscreen.html
* Modules/modern-media-controls/controls/macos-fullscreen-media-controls.css:
(.media-controls.mac.fullscreen .scrubber):
(.media-controls.mac.fullscreen .tracks-panel): Deleted.
* Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js:
(MacOSFullscreenMediaControls.prototype.showTracksPanel):
* Modules/modern-media-controls/controls/tracks-panel.js:
(TracksPanel.prototype.presentInParent):
(TracksPanel.prototype.hide):
(TracksPanel.prototype.get bottomY):
(TracksPanel.prototype.set bottomY):
(TracksPanel.prototype.commitProperty):
(TracksPanel.prototype._mousedownTarget):
LayoutTests:
Add new tests to check we correctly position the tracks panel in fullscreen, including when we drag the controls bar.
* media/modern-media-controls/tracks-support/tracks-support-show-panel-after-dragging-controls-expected.txt: Added.
* media/modern-media-controls/tracks-support/tracks-support-show-panel-after-dragging-controls.html: Added.
* media/modern-media-controls/tracks-support/tracks-support-show-panel-fullscreen-expected.txt: Added.
* media/modern-media-controls/tracks-support/tracks-support-show-panel-fullscreen.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209523
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jeremyj-wk@apple.com [Thu, 8 Dec 2016 05:18:06 +0000 (05:18 +0000)]
pointer-lock/lock-lost-on-esc-in-fullscreen.html timeout on mac-wk1
https://bugs.webkit.org/show_bug.cgi?id=165589
Unreviewed skipping test that is timing out.
* platform/mac-wk1/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209522
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryanhaddad@apple.com [Thu, 8 Dec 2016 05:09:53 +0000 (05:09 +0000)]
Fix the filename for a newly added test expectation file.
Unreviewed test gardening.
* tiled-drawing/scrolling/scroll-snap/scroll-snap-scrolling-jumps-to-top-expected.txt: Renamed from LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-scrolling-jumps-to-top.txt.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209521
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 8 Dec 2016 04:46:13 +0000 (04:46 +0000)]
[Modern Media Controls] Use a small picture-in-picture button in fullscreen
https://bugs.webkit.org/show_bug.cgi?id=165587
Patch by Antoine Quint <graouts@apple.com> on 2016-12-07
Reviewed by Dean Jackson.
Source/WebCore:
Use a newer, smaller asset for picture-in-picture in fullscreen.
* Modules/modern-media-controls/controls/icon-service.js:
* Modules/modern-media-controls/images/macOS/pip-in-fullscreen@1x.png: Added.
* Modules/modern-media-controls/images/macOS/pip-in-fullscreen@2x.png: Added.
LayoutTests:
Rebaseline tests to account for the smaller picture-in-picture button in fullscreen.
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles-expected.txt:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles.html:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles-expected.txt:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209520
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 8 Dec 2016 04:27:19 +0000 (04:27 +0000)]
REGRESSION(r203912): Web Inspector: Navigation sidebar widths are not saved
https://bugs.webkit.org/show_bug.cgi?id=165496
Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2016-12-07
Reviewed by Matt Baker.
* UserInterface/Views/TabBrowser.js:
(WebInspector.TabBrowser):
(WebInspector.TabBrowser.prototype._sidebarWidthDidChange):
(WebInspector.TabBrowser.prototype._showNavigationSidebarPanelForTabContentView):
(WebInspector.TabBrowser.prototype._sidebarWidthDidChange): Renamed from _detailsSidebarWidthDidChange.
Add event listener for when the navigation sidebar's width is changed.
* UserInterface/Views/TabContentView.js:
(WebInspector.TabContentView):
(WebInspector.TabContentView.prototype.get navigationSidebarPanel):
(WebInspector.TabContentView.prototype.get navigationSidebarCollapsedSetting):
(WebInspector.TabContentView.prototype.get navigationSidebarWidthSetting):
(WebInspector.TabContentView.prototype.get detailsSidebarPanels):
(WebInspector.TabContentView.prototype.get detailsSidebarCollapsedSetting):
(WebInspector.TabContentView.prototype.get detailsSidebarSelectedPanelSetting):
(WebInspector.TabContentView.prototype.get detailsSidebarWidthSetting):
Add WebInspector.Setting object for the navigation sidebar's width.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209519
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryanhaddad@apple.com [Thu, 8 Dec 2016 03:58:39 +0000 (03:58 +0000)]
Marking inspector/debugger/async-stack-trace.html as flaky on macOS.
https://bugs.webkit.org/show_bug.cgi?id=165584
Unreviewed test gardening.
* platform/mac/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209518
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryanhaddad@apple.com [Thu, 8 Dec 2016 03:52:38 +0000 (03:52 +0000)]
Marking inspector/worker/debugger-scripts.html as flaky on mac-wk2.
https://bugs.webkit.org/show_bug.cgi?id=165582
Unreviewed test gardening.
* platform/mac-wk2/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209517
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mark.lam@apple.com [Thu, 8 Dec 2016 03:26:10 +0000 (03:26 +0000)]
DumpRenderTree should stop using CheckedMalloc.
https://bugs.webkit.org/show_bug.cgi?id=165563
<rdar://problem/
28945820>
Reviewed by Geoffrey Garen.
1. WebKitTestRunner does not have equivalent behavior to that which is implemented
in CheckedMalloc.
2. bmalloc does not honor the settings of CheckedMalloc.
The only time CheckedMalloc comes into play is when DRT uses gmalloc or system
malloc. As a result, DRT exhibits different behavior from the normal way we run
our tests. We should obsolete CheckedMalloc and make DRT behave consistently
with WKTR.
* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
* DumpRenderTree/mac/CheckedMalloc.cpp: Removed.
* DumpRenderTree/mac/CheckedMalloc.h: Removed.
* DumpRenderTree/mac/DumpRenderTree.mm:
(prepareConsistentTestingEnvironment):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209516
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt@apple.com [Thu, 8 Dec 2016 03:22:36 +0000 (03:22 +0000)]
[CSS Parser] Unskip media tests
https://bugs.webkit.org/show_bug.cgi?id=165580
Reviewed by Jon Lee.
The new parser will still create rules for hover/pointer queries with
unknown identifiers. Patch the tests to account for this.
* TestExpectations:
* fast/media/mq-any-hover-invalid-expected.txt:
* fast/media/mq-any-hover-invalid.html:
* fast/media/mq-any-pointer-invalid-expected.txt:
* fast/media/mq-any-pointer-invalid.html:
* fast/media/mq-hover-invalid-expected.txt:
* fast/media/mq-hover-invalid.html:
* fast/media/mq-pointer-invalid-expected.txt:
* fast/media/mq-pointer-invalid.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209515
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
dino@apple.com [Thu, 8 Dec 2016 02:53:41 +0000 (02:53 +0000)]
Remove runtime toggle for pointer-lock
https://bugs.webkit.org/show_bug.cgi?id=165577
<rdar://problems/
29566996>
Reviewed by Jon Lee.
Source/WebCore:
Remove any runtime calls to check if pointer-lock is enabled. It's
either compiled in or out.
Covered by existing tests.
* bindings/generic/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setPointerLockEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::pointerLockEnabled): Deleted.
* dom/Document.idl:
* dom/Element.idl:
* page/Page.h:
* page/PointerLockController.cpp:
(WebCore::PointerLockController::requestPointerLock):
(WebCore::PointerLockController::requestPointerUnlock):
(WebCore::PointerLockController::requestPointerUnlockAndForceCursorVisible):
Source/WebKit/mac:
Remove any runtime calls to check if pointer-lock is enabled. It's
either compiled in or out.
* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(-[WebPreferences pointerLockEnabled]): Deleted.
(-[WebPreferences setPointerLockEnabled:]): Deleted.
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):
Source/WebKit2:
Remove any runtime calls to check if pointer-lock is enabled. It's
either compiled in or out.
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetPointerLockEnabled): Deleted.
(WKPreferencesGetPointerLockEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
Tools:
Remove any runtime calls to check if pointer-lock is enabled. It's
either compiled in or out.
* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
Websites/webkit.org:
No need to have pointer-lock tested.
* experimental-features.html: Also sort the list alphabetically.
LayoutTests:
Remove any runtime calls to check if pointer-lock is enabled. It's
either compiled in or out.
* platform/mac/TestExpectations: Enable the pointer-lock tests that should work.
* pointer-lock/pointer-lock-api.html: Fix a bad DOM call.
* pointer-lock/pointerlock-interface-disabled-expected.txt: Removed.
* pointer-lock/pointerlock-interface-disabled.html: Removed.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209514
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
eric.carlson@apple.com [Thu, 8 Dec 2016 02:25:57 +0000 (02:25 +0000)]
[MediaStream][Mac] Revoke sandbox extensions when capture ends
https://bugs.webkit.org/show_bug.cgi?id=165476
Reviewed by Brady Eidson.
Source/WebKit2:
Track media capture by process so it is possible to revoke the sandbox extensions issued to
a web process when capture stops. Allocate WK2 user media permission manager lazily rather
than every time a page is created as most pages won't need one.
* CMakeLists.txt: Add new files.
* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::UserMediaPermissionRequestManagerProxy): Register
with process manager.
(WebKit::UserMediaPermissionRequestManagerProxy::~UserMediaPermissionRequestManagerProxy):
(WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): Move sandbox
extension code to the process manager.
(WebKit::UserMediaPermissionRequestManagerProxy::stopCapture): New.
(WebKit::UserMediaPermissionRequestManagerProxy::startedCaptureSession): New, report state
change to the process manager.
(WebKit::UserMediaPermissionRequestManagerProxy::endedCaptureSession): Ditto.
* UIProcess/UserMediaPermissionRequestManagerProxy.h:
* UIProcess/UserMediaProcessManager.cpp: Added.
(WebKit::ProcessState::ProcessState):
(WebKit::ProcessState::managers):
(WebKit::ProcessState::sandboxExtensionsGranted):
(WebKit::ProcessState::setSandboxExtensionsGranted):
(WebKit::stateMap):
(WebKit::processState):
(WebKit::ProcessState::addRequestManager):
(WebKit::ProcessState::removeRequestManager):
(WebKit::UserMediaProcessManager::singleton):
(WebKit::UserMediaProcessManager::addUserMediaPermissionRequestManagerProxy):
(WebKit::UserMediaProcessManager::removeUserMediaPermissionRequestManagerProxy):
(WebKit::UserMediaProcessManager::willCreateMediaStream):
(WebKit::UserMediaProcessManager::startedCaptureSession):
(WebKit::UserMediaProcessManager::endedCaptureSession):
* UIProcess/UserMediaProcessManager.h: Added.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Don't allocate m_userMediaPermissionRequestManager.
(WebKit::WebPageProxy::resetState): Set m_userMediaPermissionRequestManager to null.
(WebKit::WebPageProxy::userMediaPermissionRequestManager): Allocate m_userMediaPermissionRequestManager
lazily as most pages don't need it.
(WebKit::WebPageProxy::requestUserMediaPermissionForFrame): Call userMediaPermissionRequestManager().
(WebKit::WebPageProxy::enumerateMediaDevicesForFrame): Ditto.
(WebKit::WebPageProxy::clearUserMediaState): Ditto.
(WebKit::WebPageProxy::isPlayingMediaDidChange): Report capture state changes to the request
manager proxy.
* UIProcess/WebPageProxy.h:
* WebKit2.xcodeproj/project.pbxproj: Add new files.
* WebProcess/MediaStream/MediaDeviceSandboxExtensions.cpp: Added.
(WebKit::MediaDeviceSandboxExtensions::MediaDeviceSandboxExtensions):
(WebKit::MediaDeviceSandboxExtensions::encode):
(WebKit::MediaDeviceSandboxExtensions::decode):
(WebKit::MediaDeviceSandboxExtensions::operator[]):
(WebKit::MediaDeviceSandboxExtensions::size):
* WebProcess/MediaStream/MediaDeviceSandboxExtensions.h: Added.
* WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
(WebKit::UserMediaPermissionRequestManager::~UserMediaPermissionRequestManager): Sandbox extension
is now in a HashMap, not a Vector.
(WebKit::UserMediaPermissionRequestManager::grantUserMediaDeviceSandboxExtensions): Record
IDs with extensions so they can be revoked later.
(WebKit::UserMediaPermissionRequestManager::revokeUserMediaDeviceSandboxExtensions): New.
(WebKit::UserMediaPermissionRequestManager::grantUserMediaDevicesSandboxExtension): Deleted.
* WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::grantUserMediaDeviceSandboxExtensions):
(WebKit::WebPage::revokeUserMediaDeviceSandboxExtensions):
(WebKit::WebPage::grantUserMediaDevicesSandboxExtension): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Tools:
Add a test which loads a page that calls navigator.mediaDevices.enumerateDevices, kills the
page, and loads the same page again to ensure that the WK2 UserMediaPermissionRequestManagerProxy
is reset and recreated when a web page exits and is reloaded.
* TestWebKitAPI/PlatformGTK.cmake:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/EnumerateMediaDevices.cpp: Added.
(TestWebKitAPI::checkUserMediaPermissionCallback):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit2/enumerateMediaDevices.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209512
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt@apple.com [Thu, 8 Dec 2016 02:18:27 +0000 (02:18 +0000)]
[CSS Parser] Unskip gradients tests
https://bugs.webkit.org/show_bug.cgi?id=165576
Reviewed by Dean Jackson.
Keywords like left, center, top, right and bottom are preserved when serializing in
the new parser.
* TestExpectations:
* fast/gradients/css3-gradient-parsing-expected.txt:
* fast/gradients/css3-gradient-parsing.html:
* fast/gradients/unprefixed-gradient-parsing-expected.txt:
* fast/gradients/unprefixed-gradient-parsing.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209511
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
wilander@apple.com [Thu, 8 Dec 2016 02:08:28 +0000 (02:08 +0000)]
Allow commas in Accept, Accept-Language, and Content-Language request headers for simple CORS
https://bugs.webkit.org/show_bug.cgi?id=165566
<rdar://problem/
29560983>
Reviewed by Alex Christensen.
Source/WebCore:
Updated the existing tests.
* platform/network/HTTPParsers.cpp:
(WebCore::isValidAcceptHeaderValue):
Now also accepts ','.
(WebCore::isValidLanguageHeaderValue):
Ditto.
LayoutTests:
* http/tests/xmlhttprequest/cors-non-standard-safelisted-headers-should-trigger-preflight.html:
Added ',' to the tests as well as two examples from
two sites where we found a regression.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209510
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt@apple.com [Thu, 8 Dec 2016 02:01:30 +0000 (02:01 +0000)]
[CSS Parser] Stop skipping tests in the css3 LayoutTests subdirectory
https://bugs.webkit.org/show_bug.cgi?id=165574
Reviewed by Dean Jackson.
Source/WebCore:
* css/CSSGroupingRule.cpp:
(WebCore::CSSGroupingRule::insertRule):
The old parser didn't support the creation of @namespace rules in the
CSS OM, but the new parser does. We need to ensure that just like for
@import rules, that the insertion of a @namespace rule inside a
@supports rule is not allowed. This test passed in the old parser because
the rule just didn't get created, but in the new parser, we need to
add a check along with the @import rule check to ensure it isn't allowed.
LayoutTests:
* TestExpectations:
Stop skipping two tests.
* css3/font-variant-parsing-expected.txt:
* css3/font-variant-parsing.html:
Patched to yield the correct results when multiple values are specified for the
same sub-property.
* css3/supports-cssom-expected.txt:
* css3/supports-cssom.html:
Patched to account for the new result for @namespace insertion failure (see
corresponding WebCore ChangeLog for explanation), and also patched to get rid
of excess whitespace, since the new parser doesn't preserve whitespace formatting
when serializing @supports.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209509
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jiewen_tan@apple.com [Thu, 8 Dec 2016 01:49:40 +0000 (01:49 +0000)]
Unreviewed, Skip imported/w3c/WebCryptoAPI/generateKey/test_failures.html
This is a superset test for all test_failures*.html. No need for it as we run
all the sub tests.
* TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209508
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 8 Dec 2016 01:37:56 +0000 (01:37 +0000)]
[Modern Media Controls] Remove aspect ratio button
https://bugs.webkit.org/show_bug.cgi?id=165571
Patch by Antoine Quint <graouts@apple.com> on 2016-12-07
Reviewed by Dean Jackson.
Source/WebCore:
Since we do not have a way to toggle letterboxing on an HTMLMediaElement, we remove the
corresponding button in the media controls.
* Modules/modern-media-controls/controls/aspect-ratio-button.js: Removed.
* Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js:
* Modules/modern-media-controls/js-files:
LayoutTests:
We no longer have an AspectRatioButton.
* media/modern-media-controls/aspect-ratio-button/aspect-ratio-button-expected.txt: Removed.
* media/modern-media-controls/aspect-ratio-button/aspect-ratio-button.html: Removed.
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles-expected.txt:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles.html:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles-expected.txt:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles.html:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor-expected.txt:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor.html:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-right-container-margin-expected.txt:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-right-container-margin.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209506
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ggaren@apple.com [Thu, 8 Dec 2016 01:31:43 +0000 (01:31 +0000)]
Renamed SourceCode members to match their accessor names
https://bugs.webkit.org/show_bug.cgi?id=165573
Reviewed by Keith Miller.
startChar => startOffset
endChar => endOffset
* parser/UnlinkedSourceCode.h:
(JSC::UnlinkedSourceCode::UnlinkedSourceCode):
(JSC::UnlinkedSourceCode::view):
(JSC::UnlinkedSourceCode::startOffset):
(JSC::UnlinkedSourceCode::endOffset):
(JSC::UnlinkedSourceCode::length):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209505
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 8 Dec 2016 01:19:03 +0000 (01:19 +0000)]
One esc to exit fullscreen and pointer lock
https://bugs.webkit.org/show_bug.cgi?id=165416
rdar://problem/
29430711
Patch by Jeremy Jones <jeremyj@apple.com> on 2016-12-07
Reviewed by Jer Noble.
Source/WebCore:
Test: pointer-lock/lock-lost-on-esc-in-fullscreen.html
When handling escape, also exit fullscreen on escape.
This also means that escape can exit fullscreen in TestRunner.
* page/EventHandler.cpp:
(WebCore::EventHandler::keyEvent):
Source/WebKit2:
Fix a crash when didLosePointerLock is not specified.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
Tools:
Implement WKPageUIClientV8 for pointer lock support.
Add "escape" key support in EventSenderProxy.
* WebKitTestRunner/TestController.cpp:
(WTR::requestPointerLock):
(WTR::TestController::createOtherPage):
(WTR::TestController::createWebViewWithOptions):
* WebKitTestRunner/mac/EventSenderProxy.mm:
(WTR::EventSenderProxy::keyDown):
LayoutTests:
* platform/mac-wk2/TestExpectations:
* pointer-lock/lock-lost-on-esc-in-fullscreen-expected.txt: Added.
* pointer-lock/lock-lost-on-esc-in-fullscreen.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209504
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
keith_miller@apple.com [Thu, 8 Dec 2016 01:13:40 +0000 (01:13 +0000)]
Add more missing trivial wasm ops.
https://bugs.webkit.org/show_bug.cgi?id=165564
JSTests:
Add tests for drop and tee_local.
Reviewed by Geoffrey Garen.
* wasm/function-tests/drop.js: Added.
* wasm/function-tests/nop.js: Added.
* wasm/function-tests/tee-local.js: Added.
Source/JavaScriptCore:
Reviewed by Geoffrey Garen.
This patch adds the nop, drop, and tee_local opcodes.
It also fixes an issue where we were not generating
the proper enums for the grow_memory and current_memory
opcodes.
* wasm/WasmFunctionParser.h:
(JSC::Wasm::FunctionParser<Context>::parseExpression):
* wasm/generateWasmOpsHeader.py:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209503
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
nvasilyev@apple.com [Thu, 8 Dec 2016 01:08:48 +0000 (01:08 +0000)]
Web Inspector: Control Flow Profiler's event handlers aren't getting removed when ContentView closes
https://bugs.webkit.org/show_bug.cgi?id=165556
Reviewed by Joseph Pecoraro.
* UserInterface/Views/ScriptContentView.js:
(WebInspector.ScriptContentView.prototype.closed):
* UserInterface/Views/TextResourceContentView.js:
(WebInspector.TextResourceContentView.prototype.closed):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209502
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ggaren@apple.com [Thu, 8 Dec 2016 01:07:04 +0000 (01:07 +0000)]
Renamed source => parentSource
https://bugs.webkit.org/show_bug.cgi?id=165570
Reviewed by Keith Miller.
For less confuse.
* bytecode/UnlinkedFunctionExecutable.cpp:
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209501
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
utatane.tea@gmail.com [Thu, 8 Dec 2016 01:02:13 +0000 (01:02 +0000)]
[JSC] Drop translate phase in module loader
https://bugs.webkit.org/show_bug.cgi?id=164861
Reviewed by Saam Barati.
Source/JavaScriptCore:
Originally, this "translate" phase was introduced to the module loader.
However, recent rework discussion[1] starts dropping this phase.
And this "translate" phase is meaningless in the browser side module loader
since this phase originally mimics the node.js's translation hook (like,
transpiling CoffeeScript source to JavaScript).
This "translate" phase is not necessary for the exposed HTML5
<script type="module"> tag right now. Once the module loader pipeline is
redefined and specified, we need to update the current loader anyway.
So dropping "translate" phase right now is OK.
This a bit simplifies the current module loader pipeline.
[1]: https://github.com/whatwg/loader/issues/147
* builtins/ModuleLoaderPrototype.js:
(newRegistryEntry):
(fulfillFetch):
(requestFetch):
(requestInstantiate):
(provide):
(fulfillTranslate): Deleted.
(requestTranslate): Deleted.
* bytecode/BytecodeIntrinsicRegistry.cpp:
(JSC::BytecodeIntrinsicRegistry::BytecodeIntrinsicRegistry):
* jsc.cpp:
* runtime/JSGlobalObject.cpp:
* runtime/JSGlobalObject.h:
* runtime/JSModuleLoader.cpp:
(JSC::JSModuleLoader::translate): Deleted.
* runtime/JSModuleLoader.h:
* runtime/ModuleLoaderPrototype.cpp:
(JSC::moduleLoaderPrototypeInstantiate):
(JSC::moduleLoaderPrototypeTranslate): Deleted.
Source/WebCore:
* bindings/js/JSDOMWindowBase.cpp:
* bindings/js/JSWorkerGlobalScopeBase.cpp:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209500
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
beidson@apple.com [Thu, 8 Dec 2016 00:50:17 +0000 (00:50 +0000)]
Add IDB perf tests stressing key size.
https://bugs.webkit.org/show_bug.cgi?id=165567
Reviewed by Alex Christensen.
* IndexedDB/large-array-keys.html: Added.
* IndexedDB/large-binary-keys.html: Added.
* IndexedDB/large-string-keys.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209499
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
krollin@apple.com [Thu, 8 Dec 2016 00:44:19 +0000 (00:44 +0000)]
Network event record/replay
https://bugs.webkit.org/show_bug.cgi?id=164527
<rdar://problem/
29168157>
Reviewed by Alex Christensen.
Source/WebCore:
Export parseURLEncodedForm.
No new tests -- no functionality added, changed, or removed.
* platform/URLParser.h:
Source/WebKit2:
Add WebKit2/NetworkProcess/capture/* for recording the network events
that occur when loading a page and for replaying them later. Update
NetworkLoad to invoke capture facilities. Add preferences for enabling
record or replay.
* CMakeLists.txt:
* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::NetworkLoad):
(WebKit::NetworkLoad::initializeForRecord):
(WebKit::NetworkLoad::initializeForReplay):
(WebKit::NetworkLoad::initialize):
(WebKit::NetworkLoad::setDefersLoading):
(WebKit::NetworkLoad::continueWillSendRequest):
(WebKit::NetworkLoad::sharedWillSendRedirectedRequest):
(WebKit::NetworkLoad::notifyDidReceiveResponse):
(WebKit::NetworkLoad::didReceiveData):
(WebKit::NetworkLoad::didCompleteWithError):
* NetworkProcess/NetworkLoad.h:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::terminate):
* NetworkProcess/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode):
(WebKit::NetworkProcessCreationParameters::decode):
* NetworkProcess/NetworkProcessCreationParameters.h:
* NetworkProcess/capture/NetworkCaptureEvent.cpp: Added.
(WebKit::NetworkCapture::copyHeaders):
(WebKit::NetworkCapture::KeyValuePair::KeyValuePair):
(WebKit::NetworkCapture::ResourceRequest::ResourceRequest):
(WebKit::NetworkCapture::ResourceRequest::operator WebCore::ResourceRequest):
(WebKit::NetworkCapture::ResourceResponse::ResourceResponse):
(WebKit::NetworkCapture::ResourceResponse::operator WebCore::ResourceResponse):
(WebKit::NetworkCapture::ResourceError::ResourceError):
(WebKit::NetworkCapture::ResourceError::operator WebCore::ResourceError):
(WebKit::NetworkCapture::JSONCoder::encode):
(WebKit::NetworkCapture::JSONCoder::decode):
(WebKit::NetworkCapture::JSONCoder<String>::encode):
(WebKit::NetworkCapture::JSONCoder<String>::decode):
(WebKit::NetworkCapture::JSONCoder<CaptureTimeType>::encode):
(WebKit::NetworkCapture::JSONCoder<CaptureTimeType>::decode):
(WebKit::NetworkCapture::JSONCoder<KeyValuePair>::encode):
(WebKit::NetworkCapture::JSONCoder<KeyValuePair>::decode):
(WebKit::NetworkCapture::JSONCoder<Vector<T>>::encode):
(WebKit::NetworkCapture::JSONCoder<Vector<T>>::decode):
(WebKit::NetworkCapture::JSONCoder<ResourceRequest>::encode):
(WebKit::NetworkCapture::JSONCoder<ResourceRequest>::decode):
(WebKit::NetworkCapture::JSONCoder<ResourceResponse>::encode):
(WebKit::NetworkCapture::JSONCoder<ResourceResponse>::decode):
(WebKit::NetworkCapture::JSONCoder<ResourceError>::encode):
(WebKit::NetworkCapture::JSONCoder<ResourceError>::decode):
(WebKit::NetworkCapture::JSONCoder<WebCore::SharedBuffer>::encode):
(WebKit::NetworkCapture::JSONCoder<WebCore::SharedBuffer>::decode):
(WebKit::NetworkCapture::JSONCoder<RequestSentEvent>::encode):
(WebKit::NetworkCapture::JSONCoder<RequestSentEvent>::decode):
(WebKit::NetworkCapture::JSONCoder<ResponseReceivedEvent>::encode):
(WebKit::NetworkCapture::JSONCoder<ResponseReceivedEvent>::decode):
(WebKit::NetworkCapture::JSONCoder<RedirectReceivedEvent>::encode):
(WebKit::NetworkCapture::JSONCoder<RedirectReceivedEvent>::decode):
(WebKit::NetworkCapture::JSONCoder<RedirectSentEvent>::encode):
(WebKit::NetworkCapture::JSONCoder<RedirectSentEvent>::decode):
(WebKit::NetworkCapture::JSONCoder<DataReceivedEvent>::encode):
(WebKit::NetworkCapture::JSONCoder<DataReceivedEvent>::decode):
(WebKit::NetworkCapture::JSONCoder<FinishedEvent>::encode):
(WebKit::NetworkCapture::JSONCoder<FinishedEvent>::decode):
(WebKit::NetworkCapture::eventToString):
(WebKit::NetworkCapture::stringToEvent):
* NetworkProcess/capture/NetworkCaptureEvent.h: Added.
(WebKit::NetworkCapture::TimedEvent::TimedEvent):
* NetworkProcess/capture/NetworkCaptureLogging.h: Added.
* NetworkProcess/capture/NetworkCaptureManager.cpp: Added.
(WebKit::NetworkCapture::Manager::singleton):
(WebKit::NetworkCapture::Manager::initialize):
(WebKit::NetworkCapture::Manager::terminate):
(WebKit::NetworkCapture::Manager::findMatch):
(WebKit::NetworkCapture::Manager::findExactMatch):
(WebKit::NetworkCapture::Manager::findBestFuzzyMatch):
(WebKit::NetworkCapture::Manager::fuzzyMatchURLs):
(WebKit::NetworkCapture::Manager::loadResources):
(WebKit::NetworkCapture::Manager::reportLoadPath):
(WebKit::NetworkCapture::Manager::reportRecordPath):
(WebKit::NetworkCapture::Manager::reportReplayPath):
(WebKit::NetworkCapture::Manager::requestToPath):
(WebKit::NetworkCapture::Manager::stringToHash):
(WebKit::NetworkCapture::Manager::hashToPath):
(WebKit::NetworkCapture::Manager::logRecordedResource):
(WebKit::NetworkCapture::Manager::logLoadedResource):
(WebKit::NetworkCapture::Manager::logPlayedBackResource):
(WebKit::NetworkCapture::Manager::ensureFileHandle):
(WebKit::NetworkCapture::Manager::openCacheFile):
(WebKit::NetworkCapture::Manager::readFile):
(WebKit::NetworkCapture::Manager::getLine):
(WebKit::NetworkCapture::Manager::getWord):
(WebKit::NetworkCapture::Manager::printToFile):
* NetworkProcess/capture/NetworkCaptureManager.h: Added.
(WebKit::NetworkCapture::Manager::isRecording):
(WebKit::NetworkCapture::Manager::isReplaying):
(WebKit::NetworkCapture::Manager::mode):
* NetworkProcess/capture/NetworkCaptureRecorder.cpp: Added.
(WebKit::NetworkCapture::Recorder::recordRequestSent):
(WebKit::NetworkCapture::Recorder::recordResponseReceived):
(WebKit::NetworkCapture::Recorder::recordRedirectReceived):
(WebKit::NetworkCapture::Recorder::recordRedirectSent):
(WebKit::NetworkCapture::Recorder::recordDataReceived):
(WebKit::NetworkCapture::Recorder::recordFinish):
(WebKit::NetworkCapture::Recorder::writeEvents):
* NetworkProcess/capture/NetworkCaptureRecorder.h: Added.
(WebKit::NetworkCapture::Recorder::recordEvent):
* NetworkProcess/capture/NetworkCaptureReplayer.cpp: Added.
(WebKit::NetworkCapture::Replayer::replayResource):
* NetworkProcess/capture/NetworkCaptureReplayer.h: Added.
* NetworkProcess/capture/NetworkCaptureResource.cpp: Added.
(WebKit::NetworkCapture::Resource::Resource):
(WebKit::NetworkCapture::Resource::url):
(WebKit::NetworkCapture::Resource::baseURL):
(WebKit::NetworkCapture::Resource::queryParameters):
(WebKit::NetworkCapture::Resource::eventStream):
(WebKit::NetworkCapture::Resource::EventStream::EventStream):
(WebKit::NetworkCapture::Resource::EventStream::nextEvent):
* NetworkProcess/capture/NetworkCaptureResource.h: Added.
* NetworkProcess/capture/NetworkCaptureTypes.h: Added.
(WebKit::NetworkCapture::TypeHolder::forEachTypeImpl):
(WebKit::NetworkCapture::TypeHolder::forEachType):
* NetworkProcess/capture/NetworkDataTaskReplay.cpp: Added.
(WebKit::NetworkCapture::NetworkDataTaskReplay::NetworkDataTaskReplay):
(WebKit::NetworkCapture::NetworkDataTaskReplay::~NetworkDataTaskReplay):
(WebKit::NetworkCapture::NetworkDataTaskReplay::resume):
(WebKit::NetworkCapture::NetworkDataTaskReplay::suspend):
(WebKit::NetworkCapture::NetworkDataTaskReplay::cancel):
(WebKit::NetworkCapture::NetworkDataTaskReplay::complete):
(WebKit::NetworkCapture::NetworkDataTaskReplay::invalidateAndCancel):
(WebKit::NetworkCapture::NetworkDataTaskReplay::enqueueEventHandler):
(WebKit::NetworkCapture::NetworkDataTaskReplay::replayRequestSent):
(WebKit::NetworkCapture::NetworkDataTaskReplay::replayResponseReceived):
(WebKit::NetworkCapture::NetworkDataTaskReplay::replayRedirectReceived):
(WebKit::NetworkCapture::NetworkDataTaskReplay::replayRedirectSent):
(WebKit::NetworkCapture::NetworkDataTaskReplay::replayDataReceived):
(WebKit::NetworkCapture::NetworkDataTaskReplay::replayFinished):
(WebKit::NetworkCapture::NetworkDataTaskReplay::didReceiveResponse):
(WebKit::NetworkCapture::NetworkDataTaskReplay::didFinish):
* NetworkProcess/capture/NetworkDataTaskReplay.h: Added.
(WebKit::NetworkCapture::NetworkDataTaskReplay::create):
* NetworkProcess/capture/json.hpp: Added.
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
* WebKit2.xcodeproj/project.pbxproj:
* config.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209498
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt@apple.com [Thu, 8 Dec 2016 00:42:29 +0000 (00:42 +0000)]
[CSS Parser] Remove tests that depend on SVG CSS OM that has been removed
https://bugs.webkit.org/show_bug.cgi?id=165565
Reviewed by Jon Lee.
* TestExpectations:
* svg/dom/SVGColor-expected.txt: Removed.
* svg/dom/SVGColor.html: Removed.
* svg/dom/SVGPaint-expected.txt: Removed.
* svg/dom/SVGPaint.html: Removed.
* svg/dom/rgb-color-parser-expected.txt: Removed.
* svg/dom/rgb-color-parser.html: Removed.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209497
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryanhaddad@apple.com [Thu, 8 Dec 2016 00:37:28 +0000 (00:37 +0000)]
Marking compositing/layer-creation/fixed-overlap-extent-rtl.html as failing on mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=165541
Unreviewed test gardening.
* platform/mac-wk1/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209496
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt@apple.com [Thu, 8 Dec 2016 00:34:02 +0000 (00:34 +0000)]
[CSS Parser] Consolidate string/ident/url serialization functions
https://bugs.webkit.org/show_bug.cgi?id=165552
Reviewed by Zalan Bujtas.
Source/WebCore:
Right now CSSParser has string, ident and url serialization functions
called quoteCSStringIfNeeded (which actually serializes both strings and
identifiers), as well as quoteCSSURLIfNeeded.
CSSMarkup already has serialization functions that exist outside of the
CSSParser and that handle serialization of strings, idents and URLs. This
patch eliminates the CSSParser functions and consolidates all of the
serialization to use CSSMarkup's functions.
Note that we are not spec-compliant at all here, and so I had to amend
the functions to support our non-spec-compliant serialization. The goal
of this patch is consolidation and not to fix our broken serialization.
Notable changes include parameterizing string serialization so that
both single and double quotes are supported, since in the existing code
we're sometimes spec-compliant (CSSSelectors) and sometimes not
(CSSPrimitiveValue).
We also overload CSS_STRING primitive value type and have it act as both
a string and a custom identifier. This is lame, since the parser should
have made two different types of objects instead, but since our parser
doesn't do that yet, I added a serializeAsStringOrCustomIdent that
preserves our old behavior of "quote the string only if needed." In this
case what that really meant was "Try to guess that we were originally a
custom ident and leave off quotes if so." This function will go away
once we properly create CSSStringValues and CSSCustomIdentValues instead
of turning the latter into strings.
* css/CSSBasicShapes.cpp:
(WebCore::buildPathString):
* css/CSSImageValue.cpp:
(WebCore::CSSImageValue::customCSSText):
* css/CSSMarkup.cpp:
(WebCore::isCSSTokenizerURL):
(WebCore::serializeString):
(WebCore::serializeURL):
(WebCore::serializeAsStringOrCustomIdent):
(WebCore::serializeURI): Deleted.
* css/CSSMarkup.h:
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText):
* css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText):
* css/parser/CSSParser.cpp:
(WebCore::isCSSTokenizerIdent): Deleted.
(WebCore::isCSSTokenizerURL): Deleted.
(WebCore::quoteCSSStringInternal): Deleted.
(WebCore::quoteCSSString): Deleted.
(WebCore::quoteCSSStringIfNeeded): Deleted.
(WebCore::quoteCSSURLIfNeeded): Deleted.
* css/parser/CSSParser.h:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::mapLanguageAttributeToLocale):
LayoutTests:
* fast/css/content-language-only-whitespace-expected.txt:
* fast/css/content-language-with-whitespace-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209495
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
dino@apple.com [Thu, 8 Dec 2016 00:27:35 +0000 (00:27 +0000)]
Expose internal API to detect media documents
https://bugs.webkit.org/show_bug.cgi?id=165559
<rdar://problems/
29564054>
Reviewed by Antoine Quint.
Expose via MediaControlsHost whether or not we're in
a MediaDocument.
Since MediaControlsHost is only exposed to our
internal controls, it's not possible to test this
directly. However, a subsequent test for media documents
with audio-only content will cover this change.
* Modules/mediacontrols/MediaControlsHost.cpp: Add isInMediaDocument and put const on
various methods that should have it.
(WebCore::MediaControlsHost::captionDisplayMode):
(WebCore::MediaControlsHost::supportsFullscreen):
(WebCore::MediaControlsHost::isVideoLayerInline):
(WebCore::MediaControlsHost::isInMediaDocument):
* Modules/mediacontrols/MediaControlsHost.h:
* Modules/mediacontrols/MediaControlsHost.idl: Add isInMediaDocument.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209494
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryanhaddad@apple.com [Thu, 8 Dec 2016 00:17:26 +0000 (00:17 +0000)]
Marking imported/mathml-in-html5/mathml/presentation-markup/fractions/frac-parameters-1.html as flaky on El Capitan WK2.
https://bugs.webkit.org/show_bug.cgi?id=165392
Unreviewed test gardening.
* platform/mac-wk2/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209493
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
joepeck@webkit.org [Thu, 8 Dec 2016 00:04:13 +0000 (00:04 +0000)]
Web Inspector: Add ability to distinguish if a Script was parsed as a module
https://bugs.webkit.org/show_bug.cgi?id=164900
<rdar://problem/
29323817>
Reviewed by Timothy Hatcher.
Source/JavaScriptCore:
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::didParseSource):
* inspector/protocol/Debugger.json:
Add an optional event parameter to distinguish if a script was a module or not.
Source/WebInspectorUI:
* UserInterface/Models/Script.js:
(WebInspector.Script.prototype.get sourceType):
New property of Scripts. SourceType is either Program or Module.
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.scriptDidParse):
* UserInterface/Protocol/DebuggerObserver.js:
(WebInspector.DebuggerObserver.prototype.scriptParsed):
Convert incoming module boolean into SourceType when creating new Scripts.
* UserInterface/Models/ScriptSyntaxTree.js:
(WebInspector.ScriptSyntaxTree):
(WebInspector.ScriptSyntaxTree.prototype._recurse):
(WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
Update the generic AST for new module specific Esprima types.
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.textEditorScriptSourceType):
* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor.prototype._startWorkerPrettyPrint):
For pretty printing correctly state if this is a module or not for Esprima.
LayoutTests:
* inspector/model/parse-script-syntax-tree-expected.txt:
* inspector/model/parse-script-syntax-tree.html:
* inspector/model/resources/module.js: Added.
(import.string_appeared_here.myModule):
* inspector/model/resources/other-module.js: Added.
(myOtherModule):
* inspector/model/resources/program.js: Added.
(myProgram):
* inspector/model/script-sourceType-expected.txt: Added.
* inspector/model/script-sourceType.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209492
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
joepeck@webkit.org [Thu, 8 Dec 2016 00:04:07 +0000 (00:04 +0000)]
Web Inspector: Update Esprima to support new features / syntax (**, async/await, trailing comma)
https://bugs.webkit.org/show_bug.cgi?id=164830
<rdar://problem/
29293814>
Reviewed by Timothy Hatcher.
Source/WebInspectorUI:
* UserInterface/External/Esprima/LICENSE:
* UserInterface/External/Esprima/esprima.js:
Updated to Esprima@7219731 (4.0.0-dev).
* UserInterface/Models/ScriptSyntaxTree.js:
(WebInspector.ScriptSyntaxTree.prototype._recurse):
(WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
* UserInterface/Workers/Formatter/ESTreeWalker.js:
(ESTreeWalker.prototype._walkChildren):
Add new nodes (AwaitExpression).
Add new states (async boolean property on Functions).
Remove stale properties (defaults is no longer needed, as parameters
with default values are now AssignmentPatterns).
Update MetaProperty where meta/property are now Identifiers not strings.
* UserInterface/Workers/Formatter/EsprimaFormatter.js:
(EsprimaFormatter.prototype._handleTokenAtNode):
Handle pretty printing of new nodes and identifiers.
* Controllers/FrameResourceManager.js
Address a console.assert warning for stripping assertions in Production.
LayoutTests:
* inspector/formatting/resources/javascript-tests/arrow-functions-expected.js:
* inspector/formatting/resources/javascript-tests/arrow-functions.js:
* inspector/formatting/resources/javascript-tests/classes-expected.js:
* inspector/formatting/resources/javascript-tests/classes.js:
* inspector/formatting/resources/javascript-tests/functions-expected.js:
* inspector/formatting/resources/javascript-tests/functions.js:
* inspector/formatting/resources/javascript-tests/other-statements-expected.js:
* inspector/formatting/resources/javascript-tests/other-statements.js:
* inspector/formatting/resources/javascript-tests/unary-binary-expressions-expected.js:
* inspector/formatting/resources/javascript-tests/unary-binary-expressions.js:
* inspector/model/parse-script-syntax-tree-expected.txt:
* inspector/model/parse-script-syntax-tree.html:
Coverage for new supported syntax.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209491
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rniwa@webkit.org [Wed, 7 Dec 2016 23:53:10 +0000 (23:53 +0000)]
Rebaseline tests after r209486. Also updated media-shadow-manipulation.html now that range is null.
* fast/shadow-dom/color-input-element-shadow-manipulation-expected.txt:
* fast/shadow-dom/file-input-element-shadow-manipulation-expected.txt:
* fast/shadow-dom/media-shadow-manipulation-expected.txt:
* fast/shadow-dom/media-shadow-manipulation.html:
* fast/shadow-dom/range-input-element-shadow-manipulation-expected.txt:
* fast/shadow-dom/textarea-shadow-manipulation-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209490
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
simon.fraser@apple.com [Wed, 7 Dec 2016 23:41:58 +0000 (23:41 +0000)]
Add system trace points for JavaScript VM entry/exit
https://bugs.webkit.org/show_bug.cgi?id=165550
Reviewed by Tim Horton.
Source/JavaScriptCore:
Add trace points for entry/exit into/out of the JS VM.
* runtime/VMEntryScope.cpp:
(JSC::VMEntryScope::VMEntryScope):
(JSC::VMEntryScope::~VMEntryScope):
Source/WTF:
Add trace points for entry/exit into/out of the JS VM.
* wtf/SystemTracing.h:
Tools:
Add trace points for entry/exit into/out of the JS VM.
* Tracing/SystemTracePoints.plist:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209489
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryanhaddad@apple.com [Wed, 7 Dec 2016 23:23:30 +0000 (23:23 +0000)]
Marking two compositing tests as failing.
https://bugs.webkit.org/show_bug.cgi?id=165530
Unreviewed test gardening.
* platform/mac-wk1/TestExpectations:
* platform/mac/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209488
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zalan@apple.com [Wed, 7 Dec 2016 23:21:27 +0000 (23:21 +0000)]
ASSERTION FAILED: count >= 1 in WebCore::RenderMultiColumnSet::columnCount
https://bugs.webkit.org/show_bug.cgi?id=136365
<rdar://problem/
27686727>
Reviewed by Simon Fraser.
Source/WebCore:
Margin value overflow ends up confusing the column count computing logic.
Test: fast/multicol/assert-on-column-count-when-zoomed-in.html
* css/StyleResolver.cpp:
(WebCore::addIntrinsicMargins):
LayoutTests:
* fast/multicol/assert-on-column-count-when-zoomed-in-expected.txt: Added.
* fast/multicol/assert-on-column-count-when-zoomed-in.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209487
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rniwa@webkit.org [Wed, 7 Dec 2016 22:51:54 +0000 (22:51 +0000)]
document.caretRangeFromPoint doesn't retarget the resultant Range correctly.
https://bugs.webkit.org/show_bug.cgi?id=165146
Reviewed by Sam Weinig.
Source/WebCore:
The bug was caused by caretRangeFromPoint not retargeting the resultant Range correctly.
Namely, it's possible for RenderObject::positionForPoint to move across shadow boundary
even if node was identically equal to ancestorInThisScope(node).
Fixed the bug by directly retargeting the range's container node and its offset as done
for elementFromPoint in r206795.
Test: fast/shadow-dom/caret-range-from-point-in-shadow-tree.html
* dom/Document.cpp:
(WebCore::Document::caretRangeFromPoint):
LayoutTests:
Added a regression test for caretRangeFromPoint retargeting the result.
* fast/shadow-dom/caret-range-from-point-in-shadow-tree-expected.txt: Added.
* fast/shadow-dom/caret-range-from-point-in-shadow-tree.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209486
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
simon.fraser@apple.com [Wed, 7 Dec 2016 22:51:21 +0000 (22:51 +0000)]
Fix use of enum in a WK2 C SPI header.
rdar://problem/
28725583
Followup to correctly prefix the enum values.
Source/WebKit2:
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetEventThrottlingBehaviorOverride):
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
Tools:
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::prepare):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209485
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Wed, 7 Dec 2016 22:47:06 +0000 (22:47 +0000)]
[Modern Media Controls] Entering fullscreen and returning to inline shows fullscreen controls
https://bugs.webkit.org/show_bug.cgi?id=165536
Patch by Antoine Quint <graouts@apple.com> on 2016-12-07
Reviewed by Tim Horton.
Source/WebCore:
We regressed when we implemented the fix for webkit.org/b/165494 and we started to rely solely
on the "webkitpresentationmodechanged" event to identify presention mode changes. As it turns out,
when the "webkitpresentationmodechanged" event is dispatched when exiting fullscreen and returning
to the inline presentation mode, querying the "webkitPresentationMode" property says "inline" while
"webkitDisplayingFullscreen" still returns true (raised as webkit.org/b/165538).
We now use the "webkitPresentationMode" property when that property is supported and we're using the
"webkitpresentationmodechanged" event, and we use the "webkitDisplayingFullscreen" property otherwise.
Test: media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline.html
* Modules/modern-media-controls/media/media-controller.js:
(MediaController.prototype.get layoutTraits):
LayoutTests:
Add a new test that checks we're using the right media controls presentation as we enter and exit fullscreen.
* media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline-expected.txt: Added.
* media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209484
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
andersca@apple.com [Wed, 7 Dec 2016 22:44:19 +0000 (22:44 +0000)]
Fix build.
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::open):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209483
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
changseok@webkit.org [Wed, 7 Dec 2016 22:36:46 +0000 (22:36 +0000)]
[GTK] Cannot build GTK+ with CUPS 2.* versions
https://bugs.webkit.org/show_bug.cgi?id=163591
Reviewed by Michael Catanzaro.
GTK+ build has failed on the system which CUPS 2.x is installed in. GTK+ 3.16.4
does not assume to use the recent CUPS thus it fails to detect the CUPS in configuration.
GTK+ upstream fixed this issue but it is not easy to apply the original patch to our
old gtk+ since it requires not only bumping up glib accordingly and its consequence
causes many printing test failures. So, I propose to fix the configuration issue by
applying the change to the configure file directly. By doing this, we don't need to
upgrade glib and worry about any test failures as a consequence of the upgraded glib.
* gtk/jhbuild.modules:
* gtk/patches/gtk+-configure-fix-detecting-CUPS-2.x.patch: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209482
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
andersca@apple.com [Wed, 7 Dec 2016 22:30:58 +0000 (22:30 +0000)]
Rename the connection sources to better indicate what data direction they are used for
https://bugs.webkit.org/show_bug.cgi?id=165548
Reviewed by Tim Horton.
* Platform/IPC/Connection.h:
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::platformInvalidate):
(IPC::Connection::platformInitialize):
(IPC::createReceiveSource):
(IPC::Connection::initializeSendSource):
(IPC::Connection::receiveSourceEventHandler):
(IPC::createDataAvailableSource): Deleted.
(IPC::Connection::initializeDeadNameSource): Deleted.
Rename m_deadNameSource to m_sendSource, and m_receivePortDataAvailableSource to m_receiveSource.
(IPC::Connection::open):
Initialize the send source before we attempt to send a first message.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209481
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
achristensen@apple.com [Wed, 7 Dec 2016 22:28:58 +0000 (22:28 +0000)]
Build more of ANGLE on Mac and Windows
https://bugs.webkit.org/show_bug.cgi?id=165543
Reviewed by Dean Jackson.
We will need to compile these files to use ANGLE's GLESv2 implementation instead of
using OpenGL directly. No functional change.
* ANGLE.xcodeproj/project.pbxproj:
* CMakeLists.txt:
Move platform-specific files to Platform*.cmake.
* PlatformMac.cmake: Added.
* PlatformWin.cmake: Added.
* src/libANGLE/renderer/Format.cpp:
* src/libANGLE/renderer/Format_autogen.cpp:
(angle::Format::Get):
* src/libANGLE/renderer/gl/PathGL.cpp:
* src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.h:
* src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm:
Rename SwapLayer to WebSwapLayer. Otherwise, WebCore complains about improperly named ObjC classes.
Since this is the only one, let's just rename it instead of adding an exception.
(rx::WindowSurfaceCGL::initialize):
(-[SwapLayer initWithSharedState:withContext:withFunctions:]): Deleted.
* src/libANGLE/renderer/gl/formatutilsgl.cpp:
(rx::nativegl::GetInternalFormatMap):
(rx::nativegl::GetInternalFormatInfo):
* src/libANGLE/renderer/renderer_utils.cpp:
(rx::GetColorWriteFunction):
* src/libGLESv2/entry_points_egl.cpp:
(egl::GetProcAddress):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209480
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
simon.fraser@apple.com [Wed, 7 Dec 2016 22:21:55 +0000 (22:21 +0000)]
Fix use of enum in a WK2 C SPI header.
rdar://problem/
28725583
Reviewed by Dan Bernstein.
Use correct enum style for a C SPI header and fix the callers.
Source/WebKit2:
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetEventThrottlingBehaviorOverride):
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
Tools:
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::prepare):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209479
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
wenson_hsieh@apple.com [Wed, 7 Dec 2016 21:50:11 +0000 (21:50 +0000)]
Scroll position jumps to the origin when scrolling without momentum at the end of a scroll snapping container
https://bugs.webkit.org/show_bug.cgi?id=165474
<rdar://problem/
29534305>
Reviewed by Simon Fraser.
Source/WebCore:
When initializing an AppKit _NSScrollingMomentumCalculator, if the initial and target positions are the same and
the initial velocity is (0, 0), the momentum calculator will output (0, 0) as the animated scroll position when
animating. This causes the scroll position to jump to the top left in some cases when scrolling in scroll snap
containers. To fix this, we teach the ScrollingMomentumCalculatorMac to return an animation duration of 0 and
an animated scroll position equal to the final scroll position when this is the case.
Test: tiled-drawing/scrolling/scroll-snap/scrolling-jumps-to-top.html
* page/scrolling/mac/ScrollingMomentumCalculatorMac.h:
* page/scrolling/mac/ScrollingMomentumCalculatorMac.mm:
(WebCore::ScrollingMomentumCalculatorMac::ScrollingMomentumCalculatorMac):
(WebCore::ScrollingMomentumCalculatorMac::scrollOffsetAfterElapsedTime):
(WebCore::ScrollingMomentumCalculatorMac::animationDuration):
LayoutTests:
Added a new test verifying that if a scroll gesture ends without momentum at the bottom of a scroll snapping
container, the scroll position won't jump to the top.
* tiled-drawing/scrolling/scroll-snap/scrolling-jumps-to-top-expected.txt: Added.
* tiled-drawing/scrolling/scroll-snap/scrolling-jumps-to-top.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209477
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
keith_miller@apple.com [Wed, 7 Dec 2016 21:43:58 +0000 (21:43 +0000)]
Add support for truncation operators
https://bugs.webkit.org/show_bug.cgi?id=165519
Reviewed by Geoffrey Garen.
JSTests:
* wasm/function-tests/i32-trunc-s-f32.js: Added.
* wasm/function-tests/i32-trunc-s-f64.js: Added.
* wasm/function-tests/i32-trunc-u-f32.js: Added.
* wasm/function-tests/i32-trunc-u-f64.js: Added.
* wasm/function-tests/i64-trunc-s-f32.js: Added.
* wasm/function-tests/i64-trunc-s-f64.js: Added.
* wasm/function-tests/i64-trunc-u-f32.js: Added.
* wasm/function-tests/i64-trunc-u-f64.js: Added.
Source/JavaScriptCore:
This patch adds initial support for truncation operators. The current patch
does range based out of bounds checking, in the future we should use system
register flags on ARM and other tricks on X86 improve the performance of
these opcodes.
* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::branchTruncateDoubleToInt32):
(JSC::MacroAssemblerARM64::truncateDoubleToInt64):
(JSC::MacroAssemblerARM64::truncateDoubleToUint64):
(JSC::MacroAssemblerARM64::truncateFloatToInt32):
(JSC::MacroAssemblerARM64::truncateFloatToUint32):
(JSC::MacroAssemblerARM64::truncateFloatToInt64):
(JSC::MacroAssemblerARM64::truncateFloatToUint64):
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::truncateFloatToInt32):
(JSC::MacroAssemblerX86Common::truncateDoubleToUint32): Deleted.
* assembler/MacroAssemblerX86_64.h:
(JSC::MacroAssemblerX86_64::truncateDoubleToUint32):
(JSC::MacroAssemblerX86_64::truncateDoubleToInt64):
(JSC::MacroAssemblerX86_64::truncateDoubleToUint64):
(JSC::MacroAssemblerX86_64::truncateFloatToUint32):
(JSC::MacroAssemblerX86_64::truncateFloatToInt64):
(JSC::MacroAssemblerX86_64::truncateFloatToUint64):
* assembler/X86Assembler.h:
(JSC::X86Assembler::cvttss2si_rr):
(JSC::X86Assembler::cvttss2siq_rr):
* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32TruncSF64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32TruncSF32>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32TruncUF64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32TruncUF32>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64TruncSF64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64TruncUF64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64TruncSF32>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64TruncUF32>):
* wasm/WasmFunctionParser.h:
(JSC::Wasm::FunctionParser<Context>::parseExpression):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209476
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bdakin@apple.com [Wed, 7 Dec 2016 21:33:37 +0000 (21:33 +0000)]
Remove iCloud Pages and Keynote site-specific hacks
https://bugs.webkit.org/show_bug.cgi?id=165544
-and corresponding-
rdar://problem/
29082536
Reviewed by Wenson Hsieh.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::needsHiddenContentEditableQuirk):
(WebKit::needsPlainTextQuirk):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209475
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
simon.fraser@apple.com [Wed, 7 Dec 2016 21:27:08 +0000 (21:27 +0000)]
REGRESSION (r209447): LayoutTests compositing/layer-creation/fixed-position-out-of-view-scaled.html and compositing/layer-creation/fixed-position-out-of-view-scaled-scroll.html failing
https://bugs.webkit.org/show_bug.cgi?id=165530
New baseline for WK1 (which has RTL/compositing isseus), and mark a test as flakey in WK1.
* platform/mac-wk1/TestExpectations:
* platform/mac-wk1/compositing/layer-creation/fixed-overlap-extent-rtl-expected.txt: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209474
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
adachan@apple.com [Wed, 7 Dec 2016 21:20:15 +0000 (21:20 +0000)]
Add a getter for serverTrust in _WKObservablePageState
https://bugs.webkit.org/show_bug.cgi?id=165433
Reviewed by Anders Carlsson.
* UIProcess/API/C/mac/WKPagePrivateMac.h:
* UIProcess/API/C/mac/WKPagePrivateMac.mm:
(-[WKObservablePageState serverTrust]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209473
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
n_wang@apple.com [Wed, 7 Dec 2016 21:13:13 +0000 (21:13 +0000)]
AX: menu type toolbar should be mapped correctly on Mac
https://bugs.webkit.org/show_bug.cgi?id=165537
Reviewed by Chris Fleizach.
Source/WebCore:
The menu tag with a toolbar type should have the corresponding role.
Test: accessibility/mac/menu-type-toolbar.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
LayoutTests:
* accessibility/mac/menu-type-toolbar-expected.txt: Added.
* accessibility/mac/menu-type-toolbar.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209472
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ggaren@apple.com [Wed, 7 Dec 2016 21:10:24 +0000 (21:10 +0000)]
Fixed a test failure seen in web-timing-minimal-performance-now.html
https://bugs.webkit.org/show_bug.cgi?id=165542
Reviewed by Beth Dakin.
This test was always slightly wrong, but it is much more likely to fail
as of <https://trac.webkit.org/changeset/209462>.
* fast/dom/Window/web-timing-minimal-performance-now.html: < is not a
correct test for monotonicity. < tests for stricly increasing. <= is a
correct test for monotonicity. All computer clocks have some granularity,
so computer clocks are monotonic but not strictly increasing: you can
sample the clock twice in the same tick.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209471
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
wenson_hsieh@apple.com [Wed, 7 Dec 2016 20:40:43 +0000 (20:40 +0000)]
Add a new project for recording and playing back editing commands in editable web content
https://bugs.webkit.org/show_bug.cgi?id=165114
<rdar://problem/
29408135>
Reviewed by Beth Dakin.
Source/WebCore:
Adds new scripts used to record and play back editing, as well as a new Xcode Copy files phase that pushes these
scripts to the internal system directory when installing. See the Tools ChangeLog and individual comments below
for more details. Covered by 3 new unit tests in the EditingHistory project.
* InternalScripts/DumpEditingHistory.js: Added.
(beginProcessingTopLevelUpdate):
(endProcessingTopLevelUpdate):
(appendDOMUpdatesFromRecords):
(appendSelectionUpdateIfNecessary):
Adds new entries into the top-level list of DOM updates captured when editing. Respectively, these are input
events and selection changes.
(EditingHistory.getEditingHistoryAsJSONString):
* InternalScripts/EditingHistoryUtil.js: Added.
(prototype._scramble):
(prototype.applyToText):
(prototype.applyToFilename):
(prototype._scrambedNumberIndexForCode):
(prototype._scrambedLowercaseIndexForCode):
(prototype._scrambedUppercaseIndexForCode):
Naive implementation of an obfuscator. Currently, this only affects alphanumeric characters. Obfuscation is off
by default, but can be toggled on in JavaScript.
(elementFromMarkdown):
(GlobalNodeMap):
(GlobalNodeMap.prototype.nodesForGUIDs):
(GlobalNodeMap.prototype.guidsForTNodes):
(GlobalNodeMap.prototype.nodeForGUID):
(GlobalNodeMap.prototype.guidForNode):
(GlobalNodeMap.prototype.hasGUIDForNode):
(GlobalNodeMap.prototype.nodes):
(GlobalNodeMap.prototype.toObject):
(GlobalNodeMap.fromObject):
(GlobalNodeMap.dataForNode):
(GlobalNodeMap.elementFromTagName):
(GlobalNodeMap.nodeAttributesToObject):
(GlobalNodeMap.prototype.descriptionHTMLForGUID):
(GlobalNodeMap.prototype.descriptionHTMLForNode):
The GlobalNodeMap keeps track of every node that has appeared in the DOM, assigning each node a globally unique
identifier (GUID). This GUID is used when reconstructing the DOM, as well as unapplying or applying editing.
(SelectionState):
(SelectionState.prototype.isEqual):
(SelectionState.prototype.applyToSelection):
(SelectionState.fromSelection):
(SelectionState.prototype.toObject):
(SelectionState.fromObject):
Represents a snapshot of the Selection state (determined by getSelection()).
(DOMUpdate):
(DOMUpdate.prototype.apply):
(DOMUpdate.prototype.unapply):
(DOMUpdate.prototype.targetNode):
(DOMUpdate.prototype.detailsElement):
(DOMUpdate.ofType):
(DOMUpdate.fromRecords):
A DOMUpdate is an abstract object representing a change in the DOM that may be applied and unapplied. These are
also serializable as hashes, which may then be converted to JSON when generating editing history data.
(ChildListUpdate):
(ChildListUpdate.prototype.apply):
(ChildListUpdate.prototype.unapply):
(ChildListUpdate.prototype._nextSibling):
(ChildListUpdate.prototype._removedNodes):
(ChildListUpdate.prototype._addedNodes):
(ChildListUpdate.prototype.toObject):
(ChildListUpdate.prototype.detailsElement):
(ChildListUpdate.fromObject):
These three update types correspond to the three types of DOM mutations. These may appear as top-level updates
if they are not captured during an input event, but for the majority of user-input-driven changes, they will be
children of an input event.
(CharacterDataUpdate):
(CharacterDataUpdate.prototype.apply):
(CharacterDataUpdate.prototype.unapply):
(CharacterDataUpdate.prototype.detailsElement):
(CharacterDataUpdate.prototype.toObject):
(CharacterDataUpdate.fromObject):
(AttributeUpdate):
(AttributeUpdate.prototype.apply):
(AttributeUpdate.prototype.unapply):
(AttributeUpdate.prototype.detailsElement):
(AttributeUpdate.prototype.toObject):
(AttributeUpdate.fromObject):
(SelectionUpdate):
(SelectionUpdate.prototype.apply):
(SelectionUpdate.prototype.unapply):
(SelectionUpdate.prototype.toObject):
(SelectionUpdate.fromObject):
(SelectionUpdate.prototype._rangeDescriptionHTML):
(SelectionUpdate.prototype._anchorDescriptionHTML):
(SelectionUpdate.prototype._focusDescriptionHTML):
(SelectionUpdate.prototype.detailsElement):
Represents a change in the Selection. While no changes to the DOM structure occur as a result of a
SelectionUpdate, the information contained in these updates is used to determine where the selection should be
when rewinding or playing back the editing history.
(InputEventUpdate):
(InputEventUpdate.prototype._obfuscatedData):
(InputEventUpdate.prototype.apply):
(InputEventUpdate.prototype.unapply):
(InputEventUpdate.prototype.toObject):
(InputEventUpdate.fromObject):
(InputEventUpdate.prototype.detailsElement):
Represents an update due to user input, which consists of some number of child DOM mutation updates.
* WebCore.xcodeproj/project.pbxproj:
Tools:
Adds a new Xcode project containing work towards rewinding and playing back editing commands. This work is
wrapped in an Xcode project to take advantage of the XCTest framework. To manually test recording, open the
capture test harness, edit the contenteditable body, and then hit cmd-S. This downloads a .json file which may
then be dragged into the playback test harness.
Also adds 3 new unit tests in EditingHistoryTests/RewindAndPlaybackTests.m. These tests carry out the following
steps:
1. Load the capture harness and perform test-specific editing on the web view.
2. Let originalState be a dump of the DOM at this point in time.
3. Extract the JSON-serialized editing history data and load the playback harness with this data.
4. Rewind all editing to the beginning.
5. Playback all editing to the end.
6. Dump the state of the DOM. This should be identical to originalState.
* EditingHistory/EditingHistory.xcodeproj/project.pbxproj: Added.
* EditingHistory/EditingHistory/Info.plist: Added.
* EditingHistory/EditingHistory/Resources/CaptureHarness.html: Added.
* EditingHistory/EditingHistory/Resources/DOMTestingUtil.js: Added.
* EditingHistory/EditingHistory/Resources/PlaybackHarness.html: Added.
* EditingHistory/EditingHistory/TestRunner.h: Added.
* EditingHistory/EditingHistory/TestRunner.m: Added.
(injectedMessageEventHandlerScript):
(-[TestRunner init]):
(-[TestRunner deleteBackwards:]):
(-[TestRunner typeString:]):
(-[TestRunner bodyElementSubtree]):
(-[TestRunner bodyTextContent]):
(-[TestRunner editingHistoryJSON]):
(-[TestRunner loadPlaybackTestHarnessWithJSON:]):
(-[TestRunner numberOfUpdates]):
(-[TestRunner jumpToUpdateIndex:]):
(-[TestRunner expectEvents:afterPerforming:]):
(-[TestRunner loadCaptureTestHarness]):
(-[TestRunner setTextObfuscationEnabled:]):
(-[TestRunner isDoneWaitingForPendingEvents]):
(-[TestRunner userContentController:didReceiveScriptMessage:]):
The TestRunner provides utilities that a unit test should use to drive the test forward (e.g. loading harnesses)
or inspect the state of the loaded page (e.g. extracting JSON editing history data from the capture harness).
* EditingHistory/EditingHistory/TestUtil.h: Added.
* EditingHistory/EditingHistory/TestUtil.m: Added.
(waitUntilWithTimeout):
(waitUntil):
Provides utilities for running tests. For now, this is just spinning the runloop on a given condition.
* EditingHistory/EditingHistory/WKWebViewAdditions.h: Added.
* EditingHistory/EditingHistory/WKWebViewAdditions.m: Added.
(-[WKWebView loadPageFromBundleNamed:]):
(-[WKWebView typeCharacter:]):
(-[WKWebView keyPressWithCharacters:keyCode:]):
(-[WKWebView stringByEvaluatingJavaScriptFromString:]):
Provides utilities for simulating interaction in a web view.
* EditingHistory/EditingHistory/main.m: Added.
(main):
* EditingHistory/EditingHistoryTests/Info.plist: Added.
* EditingHistory/EditingHistoryTests/RewindAndPlaybackTests.m: Added.
(-[RewindAndPlaybackTests setUp]):
(-[RewindAndPlaybackTests tearDown]):
(-[RewindAndPlaybackTests testTypingSingleLineOfText]):
(-[RewindAndPlaybackTests testTypingMultipleLinesOfText]):
(-[RewindAndPlaybackTests testTypingAndDeletingText]):
(-[RewindAndPlaybackTests rewindAndPlaybackEditingInPlaybackTestHarness]):
(-[RewindAndPlaybackTests originalBodySubtree:isEqualToFinalSubtree:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209470
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jer.noble@apple.com [Wed, 7 Dec 2016 20:32:39 +0000 (20:32 +0000)]
ASSERT crash while running media-source/mediasource-activesourcebuffers.html under Stress GC bot.
https://bugs.webkit.org/show_bug.cgi?id=165514
Reviewed by Eric Carlson.
If a track associated with MSE is disabled after a SourceBuffer begins parsing a queued
append operation, SourceBuffer can get into a state where it asks SourceBufferPrivateAVFObjC
if it is ready to accept data for that disabled track. This causes an ASSERT_NOT_REACHED in
isReadyForMoreData().
However, this seems to be a valid condition; we can safely just return "false" from
isReadyForMoreSamples() (and also bail from notifyClientWhenReadyForMoreSamples()) when asked
about a disabled track.
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples):
(WebCore::SourceBufferPrivateAVFObjC::notifyClientWhenReadyForMoreSamples):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209469
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jer.noble@apple.com [Wed, 7 Dec 2016 20:29:55 +0000 (20:29 +0000)]
Exiting Element Fullscreen mode loses focus on WKWebView.
https://bugs.webkit.org/show_bug.cgi?id=165512
Reviewed by Eric Carlson.
Setting 'window.contentView.hidden = YES' will reset the first-responder (whereas
previously setting 'window.contentView.layer.hidden = YES' did not). Grab the first-
responder before doing so, so that it can be reset correctly when moving the WKWebView
back to it's original window.
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209468
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
achristensen@apple.com [Wed, 7 Dec 2016 20:25:22 +0000 (20:25 +0000)]
Fix CMake build after r209418.
https://bugs.webkit.org/show_bug.cgi?id=165484
* PlatformMac.cmake:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209467
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt@apple.com [Wed, 7 Dec 2016 19:51:56 +0000 (19:51 +0000)]
[CSS Parser] Eliminate the Scope class and fold it into CSSTokenizer
https://bugs.webkit.org/show_bug.cgi?id=165532
Reviewed by Dean Jackson.
The Scope class, nested inside CSSTokenizer, is both poorly named and serves
no purpose. It's especially weird that it was the entry point into tokenization
instead of CSSTokenizer.
Eliminate the class, fold its members and functions into CSSTokenizer, and have
callers just make a CSSTokenizer instead.
* css/parser/CSSParser.cpp:
(WebCore::CSSParser::parseSupportsCondition):
(WebCore::CSSParser::parseSelector):
* css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::parseValue):
(WebCore::CSSParserImpl::parseCustomPropertyValue):
(WebCore::CSSParserImpl::parseInlineStyleDeclaration):
(WebCore::CSSParserImpl::parseDeclarationList):
(WebCore::CSSParserImpl::parseRule):
(WebCore::CSSParserImpl::parseStyleSheet):
(WebCore::CSSParserImpl::parseKeyframeKeyList):
(WebCore::CSSParserImpl::parseDeclarationListForInspector):
(WebCore::CSSParserImpl::parseStyleSheetForInspector):
* css/parser/CSSTokenizer.cpp:
(WebCore::CSSTokenizer::CSSTokenizer):
(WebCore::CSSTokenizer::tokenRange):
(WebCore::CSSTokenizer::tokenCount):
(WebCore::CSSTokenizer::registerString):
(WebCore::CSSTokenizer::Scope::Scope): Deleted.
(WebCore::CSSTokenizer::Scope::tokenRange): Deleted.
(WebCore::CSSTokenizer::Scope::tokenCount): Deleted.
* css/parser/CSSTokenizer.h:
(WebCore::CSSTokenizer::Scope::storeString): Deleted.
* css/parser/CSSTokenizerInputStream.cpp:
(WebCore::CSSTokenizerInputStream::CSSTokenizerInputStream):
* css/parser/CSSTokenizerInputStream.h:
* css/parser/MediaQueryParser.cpp:
(WebCore::MediaQueryParser::parseMediaQuerySet):
* css/parser/SizesAttributeParser.cpp:
(WebCore::SizesAttributeParser::SizesAttributeParser):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209466
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Wed, 7 Dec 2016 19:31:08 +0000 (19:31 +0000)]
Web Inspector: Remove unused and mostly untested Page domain commands and events
https://bugs.webkit.org/show_bug.cgi?id=165507
Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-12-07
Reviewed by Brian Burg.
Source/JavaScriptCore:
Remove unused and unsupported commands and events.
- Page.setDocumentContent
- Page.getScriptExecutionStatus
- Page.setScriptExecutionDisabled
- Page.handleJavaScriptDialog
- Page.javascriptDialogOpening
- Page.javascriptDialogClosed
- Page.scriptsEnabled
* inspector/protocol/Page.json:
Source/WebCore:
Remove any code associated with the commands/events being removed.
* inspector/DOMPatchSupport.cpp:
* inspector/DOMPatchSupport.h:
* inspector/InspectorClient.h:
(WebCore::InspectorClient::handleJavaScriptDialog): Deleted.
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::scriptsEnabledImpl): Deleted.
(WebCore::InspectorInstrumentation::willRunJavaScriptDialogImpl): Deleted.
(WebCore::InspectorInstrumentation::didRunJavaScriptDialogImpl): Deleted.
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::scriptsEnabled): Deleted.
(WebCore::InspectorInstrumentation::willRunJavaScriptDialog): Deleted.
(WebCore::InspectorInstrumentation::didRunJavaScriptDialog): Deleted.
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::disable):
(WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
(WebCore::InspectorPageAgent::didPaint):
(WebCore::InspectorPageAgent::buildObjectForFrame):
(WebCore::InspectorPageAgent::archive):
(WebCore::createXHRTextDecoder): Deleted.
(WebCore::InspectorPageAgent::getScriptExecutionStatus): Deleted.
(WebCore::InspectorPageAgent::setScriptExecutionDisabled): Deleted.
(WebCore::InspectorPageAgent::willRunJavaScriptDialog): Deleted.
(WebCore::InspectorPageAgent::didRunJavaScriptDialog): Deleted.
(WebCore::InspectorPageAgent::scriptsEnabled): Deleted.
(WebCore::InspectorPageAgent::handleJavaScriptDialog): Deleted.
* inspector/InspectorPageAgent.h:
* page/Chrome.cpp:
(WebCore::Chrome::runBeforeUnloadConfirmPanel):
(WebCore::Chrome::runJavaScriptAlert):
(WebCore::Chrome::runJavaScriptConfirm):
(WebCore::Chrome::runJavaScriptPrompt):
* page/Settings.cpp:
(WebCore::Settings::setScriptEnabled):
Source/WebInspectorUI:
* UserInterface/Protocol/PageObserver.js:
(WebInspector.PageObserver.prototype.javascriptDialogOpening):
(WebInspector.PageObserver.prototype.javascriptDialogClosed):
(WebInspector.PageObserver.prototype.scriptsEnabled):
Keep stub in case legacy backends dispatch the event to the frontend.
* UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js:
* Versions/Inspector-iOS-10.0.json:
* Versions/Inspector-iOS-7.0.json:
* Versions/Inspector-iOS-8.0.json:
* Versions/Inspector-iOS-9.0.json:
* Versions/Inspector-iOS-9.3.json:
Remove handleJavaScriptDialog command from legacy backends because it
doesn't appear as if the iOS backend handled it at all.
LayoutTests:
* inspector/page/javascriptDialogEvents-expected.txt: Removed.
* inspector/page/javascriptDialogEvents.html: Removed.
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
Remove test skipped by all platforms.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209465
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jer.noble@apple.com [Wed, 7 Dec 2016 19:30:45 +0000 (19:30 +0000)]
[pointer-lock] Cursor should become visible when exiting pointer-lock via ESC key.
https://bugs.webkit.org/show_bug.cgi?id=165377
Reviewed by Eric Carlson.
Follow up to previous patch; clear the m_forceCursorVisibleUponUnlock flag upon losing
pointer lock, so that subsequent unlocks don't erroneously cause the cursor to become
visible.
* page/PointerLockController.cpp:
(WebCore::PointerLockController::didLosePointerLock):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209464
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ggaren@apple.com [Wed, 7 Dec 2016 18:39:44 +0000 (18:39 +0000)]
performance.now() should truncate to 100us
https://bugs.webkit.org/show_bug.cgi?id=165503
<rdar://problem/
29544531>
Reviewed by Mark Lam.
* page/Performance.cpp:
(WebCore::Performance::reduceTimeResolution):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209462
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt@apple.com [Wed, 7 Dec 2016 18:33:28 +0000 (18:33 +0000)]
Fix a bad result that I landed by accident.
* fast/css/object-position/parsing-object-position-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209461
268f45cc-cd09-0410-ab3c-
d52691b4dbfc