WebKit-https.git
5 years ago[Win] Unreviewed EWS correction.
bfulgham@apple.com [Fri, 28 Aug 2015 21:54:34 +0000 (21:54 +0000)]
[Win] Unreviewed EWS correction.

* EWSTools/start-queue-win.sh: Update settings to point to VS2015.

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

5 years agoMove std::function from JSFunction into NativeStdFunctionCell to correctly destroy...
utatane.tea@gmail.com [Fri, 28 Aug 2015 21:35:39 +0000 (21:35 +0000)]
Move std::function from JSFunction into NativeStdFunctionCell to correctly destroy the heap allocated std::function
https://bugs.webkit.org/show_bug.cgi?id=148262

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

std::function is heap allocated value. So if this is held in the JSCell, the cell should be destructible.
Before this patch, it is held in the JSStdFunction. JSStdFunction is the derived class from the JSFunction,
and they are not destructible. So it leaked the memory.

This patch extracts std::function field from the JSStdFunction to the NativeStdFunctionCell. NativeStdFunctionCell
is responsible for destructing the held std::function.
Instead of moving std::function to the ExecutableBase, we move it to the newly created NativeStdFunctionCell cell.
The reason is the following.

- Each NativeExecutable (in 64_32 JIT environment) has the trampolines to call given host functions.
  And the address of the host function is directly embedded on the JIT-compiled trampoline code.
- To suppress the overuse of the executable memory (which is used to generate the trampoline), NativeExecutable
  is cached. The host function address is used as the key to look up the cached executable from the table.
- In all the JSStdFunction, we use the same host function that immediately calls the each std::function.
- As a result, without any change, all the JSStdFunction hit the same cached NativeExecutable even if the held
  std::function is different.
- To solve it, if we put the std::function in the NativeExecutable, we need to add this std::function
  identity (like address) to the cache key, because the address of the stub host function (that calls the
  std::function) is the same in the all JSStdFunction.
- But since the std::function will be allocated in the heap, this address is always different. So caching has
  no effect.
- If we do not cache the NativeExecutable that holds the std::function, each time when creating the JSStdFunction,
  we need to regenerate the completely same trampolines (since it just calls the same host function stub that
  calls the std::function).

And this patch drops JSArrowFunction::destroy because (1) JSArrowFunction is not destructible and (2) it no longer
holds any fields that require destructions.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* jsc.cpp:
(runWithScripts):
* runtime/JSArrowFunction.cpp:
(JSC::JSArrowFunction::destroy): Deleted.
* runtime/JSArrowFunction.h:
* runtime/JSFunction.cpp:
(JSC::JSFunction::lookUpOrCreateNativeExecutable):
(JSC::JSFunction::create):
(JSC::getNativeExecutable): Deleted.
(JSC::JSStdFunction::JSStdFunction): Deleted.
(JSC::runStdFunction): Deleted.
* runtime/JSFunction.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::nativeStdFunctionStructure):
* runtime/JSNativeStdFunction.cpp: Added.
(JSC::JSNativeStdFunction::JSNativeStdFunction):
(JSC::JSNativeStdFunction::visitChildren):
(JSC::JSNativeStdFunction::finishCreation):
(JSC::runStdFunction):
(JSC::JSNativeStdFunction::create):
* runtime/JSNativeStdFunction.h: Copied from Source/JavaScriptCore/runtime/JSArrowFunction.h.
(JSC::JSNativeStdFunction::createStructure):
(JSC::JSNativeStdFunction::nativeStdFunctionCell):
* runtime/NativeStdFunctionCell.cpp: Added.
(JSC::NativeStdFunctionCell::create):
(JSC::NativeStdFunctionCell::NativeStdFunctionCell):
(JSC::NativeStdFunctionCell::destroy):
* runtime/NativeStdFunctionCell.h: Added.
(JSC::NativeStdFunctionCell::createStructure):
(JSC::NativeStdFunctionCell::function):
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:

Source/WebCore:

No behavior change.

Change JSFunction::create to JSNativeStdFunction::create to explicitly create the JSNativeStdFunction with the C++ lambda.

* ForwardingHeaders/runtime/JSNativeStdFunction.h: Added.
* bindings/js/ReadableJSStream.cpp:
(WebCore::createStartResultFulfilledFunction):
(WebCore::createPullResultFulfilledFunction):
(WebCore::createCancelResultFulfilledFunction):
(WebCore::createCancelResultRejectedFunction):
(WebCore::ReadableJSStream::ReadableJSStream):

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

5 years agoCreate WebAssembly functions
commit-queue@webkit.org [Fri, 28 Aug 2015 21:07:22 +0000 (21:07 +0000)]
Create WebAssembly functions
https://bugs.webkit.org/show_bug.cgi?id=148373

Patch by Sukolsak Sakshuwong <sukolsak@gmail.com> on 2015-08-28
Reviewed by Filip Pizlo.

Source/JavaScriptCore:

Create functions from WebAssembly files generated by pack-asmjs
<https://github.com/WebAssembly/polyfill-prototype-1>.
WebAssembly functions created by this patch can only return 0.
Actual code generation will be implemented in subsequent patches.

This patch introduces WebAssemblyExecutable, a new subclass of
ExecutableBase for WebAssembly functions. CodeBlocks can now have
an owner that is not a ScriptExecutable. This patch changes the
return type of CodeBlock::ownerExecutable() from ScriptExecutable*
to ExecutableBase*. It also changes code that calls ScriptExecutable's
methods on CodeBlock::ownerExecutable() to use
CodeBlock::ownerScriptExecutable(), which does jsCast<ScriptExecutable*>.

Since ownerScriptExecutable() is called from WebCore and it uses
jsCast<ScriptExecutable*>, this patch needs to export
ScriptExecutable::info(). This should fix the build error in
https://bugs.webkit.org/show_bug.cgi?id=148555

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::hash):
(JSC::CodeBlock::sourceCodeForTools):
(JSC::CodeBlock::dumpAssumingJITType):
(JSC::CodeBlock::dumpSource):
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::finalizeUnconditionally):
(JSC::CodeBlock::lineNumberForBytecodeOffset):
(JSC::CodeBlock::expressionRangeForBytecodeOffset):
(JSC::CodeBlock::install):
(JSC::CodeBlock::newReplacement):
(JSC::WebAssemblyCodeBlock::replacement):
(JSC::WebAssemblyCodeBlock::capabilityLevelInternal):
(JSC::CodeBlock::updateAllPredictions):
(JSC::CodeBlock::insertBasicBlockBoundariesForControlFlowProfiler):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::ownerExecutable):
(JSC::CodeBlock::ownerScriptExecutable):
(JSC::CodeBlock::codeType):
(JSC::WebAssemblyCodeBlock::WebAssemblyCodeBlock):
* debugger/Debugger.cpp:
(JSC::Debugger::toggleBreakpoint):
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::sourceIDForCallFrame):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::InlineStackEntry::executable):
(JSC::DFG::ByteCodeParser::inliningCost):
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
(JSC::DFG::ByteCodeParser::parseCodeBlock):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::isSupportedForInlining):
(JSC::DFG::mightCompileEval):
(JSC::DFG::mightCompileProgram):
(JSC::DFG::mightCompileFunctionForCall):
(JSC::DFG::mightCompileFunctionForConstruct):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::executableFor):
* dfg/DFGOSREntry.cpp:
(JSC::DFG::prepareOSREntry):
* inspector/ScriptCallStackFactory.cpp:
(Inspector::CreateScriptCallStackFunctor::operator()):
* interpreter/Interpreter.cpp:
(JSC::eval):
(JSC::isWebAssemblyExecutable):
(JSC::GetStackTraceFunctor::operator()):
(JSC::UnwindFunctor::operator()):
* interpreter/StackVisitor.cpp:
(JSC::StackVisitor::Frame::sourceURL):
(JSC::StackVisitor::Frame::computeLineAndColumn):
* jit/JITOperations.cpp:
* jit/Repatch.cpp:
(JSC::linkPolymorphicCall):
* llint/LLIntData.cpp:
(JSC::LLInt::Data::performAssertions):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::setUpCall):
* llint/LowLevelInterpreter.asm:
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/Executable.cpp:
(JSC::WebAssemblyExecutable::WebAssemblyExecutable):
(JSC::WebAssemblyExecutable::destroy):
(JSC::WebAssemblyExecutable::visitChildren):
(JSC::WebAssemblyExecutable::clearCode):
(JSC::WebAssemblyExecutable::prepareForExecution):
* runtime/Executable.h:
(JSC::ExecutableBase::isEvalExecutable):
(JSC::ExecutableBase::isFunctionExecutable):
(JSC::ExecutableBase::isProgramExecutable):
(JSC::ExecutableBase::isWebAssemblyExecutable):
(JSC::ExecutableBase::clearCodeVirtual):
* runtime/JSFunction.cpp:
(JSC::JSFunction::create):
* runtime/JSFunction.h:
* runtime/JSFunctionInlines.h:
(JSC::JSFunction::JSFunction):
(JSC::JSFunction::isBuiltinFunction):
* runtime/JSType.h:
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:
* wasm/JSWASMModule.h:
(JSC::JSWASMModule::functions):
* wasm/WASMFunctionParser.cpp:
(JSC::WASMFunctionParser::compile):
* wasm/WASMFunctionParser.h:
* wasm/WASMModuleParser.cpp:
(JSC::WASMModuleParser::WASMModuleParser):
(JSC::WASMModuleParser::parse):
(JSC::WASMModuleParser::parseFunctionDeclarationSection):
(JSC::WASMModuleParser::parseFunctionDefinition):
(JSC::WASMModuleParser::parseExportSection):
(JSC::parseWebAssembly):
* wasm/WASMModuleParser.h:

Source/WebCore:

No new tests, because it is a function rename.

* testing/Internals.cpp:
(WebCore::Internals::parserMetaData):

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

5 years agoCrash in WK1 when clicking on a PDF inside an iframe
bdakin@apple.com [Fri, 28 Aug 2015 20:35:28 +0000 (20:35 +0000)]
Crash in WK1 when clicking on a PDF inside an iframe
https://bugs.webkit.org/show_bug.cgi?id=148585
-and corresponding-
rdar://problem/22165194

Reviewed by Tim Horton.

Only handle WebHTMLViews.
* WebView/WebImmediateActionController.mm:
(-[WebImmediateActionController immediateActionRecognizerWillPrepare:]):
(-[WebImmediateActionController immediateActionRecognizerDidCancelAnimation:]):

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

5 years agoUnreviewed gardening; fix (rebaseline) expected results for media/video-fullscreeen...
jer.noble@apple.com [Fri, 28 Aug 2015 20:06:25 +0000 (20:06 +0000)]
Unreviewed gardening; fix (rebaseline) expected results for media/video-fullscreeen-only-playback.html after r189112.

Reviewed by NOBODY (OOPS!).

* media/video-fullscreeen-only-playback-expected.txt:

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

5 years ago[Follow up] ScratchRegisterAllocator::preserveReusedRegistersByPushing() should allow...
mark.lam@apple.com [Fri, 28 Aug 2015 19:49:49 +0000 (19:49 +0000)]
[Follow up] ScratchRegisterAllocator::preserveReusedRegistersByPushing() should allow room for C helper calls and keep sp properly aligned.
https://bugs.webkit.org/show_bug.cgi?id=148564

Not reviewed.

Updated the test to run with //@ runNoCJITNoAccessInlining instead of specifying
the JSC option directly via //@ run().  This is the right thing to do in order
to guarantee that the test will be compiled by the DFG.

* tests/stress/regress-148564.js:

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

5 years agoWeb Inspector: Improve ScriptSyntaxTree a bit
commit-queue@webkit.org [Fri, 28 Aug 2015 19:31:36 +0000 (19:31 +0000)]
Web Inspector: Improve ScriptSyntaxTree a bit
https://bugs.webkit.org/show_bug.cgi?id=148563

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-08-28
Reviewed by Timothy Hatcher.

* UserInterface/Models/ScriptSyntaxTree.js:
(WebInspector.ScriptSyntaxTree.prototype._recurse):
(WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
Share and fix ClassDeclaration and ClassExpression recursion to visit
the identifier (node.id). Include the kind with a VariableDeclaration
("var", "let", "const").

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

5 years ago[iOS] Make the AllowsInlineMediaPlayback preference work in WebKit / WebKit2.
jer.noble@apple.com [Fri, 28 Aug 2015 18:51:42 +0000 (18:51 +0000)]
[iOS] Make the AllowsInlineMediaPlayback preference work in WebKit / WebKit2.
https://bugs.webkit.org/show_bug.cgi?id=147512

Reviewed by Anders Carlsson.

Source/WebCore:

Updated existing tests to use the Setting rather than the Behavior Restriction.

Get rid of the sessionRestrictsInlineVideoPlayback() method and the InlineVideoPlaybackRestricted
restriction. Instead, just use the allowsInlineMediaPlayback() setting, and require
WebKit and WebKitLegacy clients to initialize the setting appropriately.

* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::requiresFullscreenForVideoPlayback): Deleted.
* page/Settings.cpp: Add a new inlineMediaPlaybackRequiresPlaysInlineAttribute setting.
* page/Settings.in: Ditto.
* platform/audio/PlatformMediaSessionManager.cpp:
(WebCore::PlatformMediaSessionManager::sessionRestrictsInlineVideoPlayback): Deleted.
* platform/audio/PlatformMediaSessionManager.h:
* platform/audio/ios/MediaSessionManagerIOS.mm:
(WebCore::MediaSessionManageriOS::resetRestrictions): Deleted.
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup): Backup the allowsInlineMediaPlayback() setting value.
(WebCore::InternalSettings::Backup::restoreTo): Restore same.
(WebCore::InternalSettings::setAllowsInlineMediaPlayback): Set allowsInlineMediaPlayback().
* testing/InternalSettings.h:
* testing/InternalSettings.idl:
* testing/Internals.cpp:
(WebCore::Internals::setMediaSessionRestrictions): Deleted.

Source/WebKit/mac:

Add a new preference, inlineMediaPlaybackRequiresPlaysInlineAttribute, which defaults to
NO on iPad and YES on iPhone and iPod.

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]): Default the value of WebKitAllowsInlineMediaPlaybackPreferenceKey to
YES on iPad and NO on iPhone and iPod.
(-[WebPreferences inlineMediaPlaybackRequiresPlaysInlineAttribute]):
(-[WebPreferences setInlineMediaPlaybackRequiresPlaysInlineAttribute:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit2:

Default the value of allowsInlineMediaPlayback to YES on iPad and NO on iPhone and iPod.
Add a new configuration property, _inlineMediaPlaybackRequiresPlaysInlineAttribute, which
defaults to NO on iPad and YES on iPhone and iPad.

* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetInlineMediaPlaybackRequiresPlaysInlineAttribute):
(WKPreferencesGetInlineMediaPlaybackRequiresPlaysInlineAttribute):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _inlineMediaPlaybackRequiresPlaysInlineAttribute]):
(-[WKWebViewConfiguration _setInlineMediaPlaybackRequiresPlaysInlineAttribute:]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Tools:

Set the value of WebKitAllowsInlineMediaPlayback / WKPreferencesSetMediaPlaybackAllowsInline()
to a consistent (true) value.

* DumpRenderTree/mac/DumpRenderTree.mm:
(setDefaultsToConsistentValuesForTesting):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):

LayoutTests:

* media/video-fullscreeen-only-controls.html:
* media/video-fullscreeen-only-controls-expected.txt:
* media/video-fullscreeen-only-playback.html:
* media/video-fullscreeen-only-playback-expected.txt:

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

5 years agoAdd assets for Styles Sidebar Refinements in Web Inspector blog post.
jond@apple.com [Fri, 28 Aug 2015 18:42:22 +0000 (18:42 +0000)]
Add assets for Styles Sidebar Refinements in Web Inspector blog post.

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

5 years agoAdd navigation gesture callbacks to WKPageNavigationClient
timothy_horton@apple.com [Fri, 28 Aug 2015 18:37:50 +0000 (18:37 +0000)]
Add navigation gesture callbacks to WKPageNavigationClient
https://bugs.webkit.org/show_bug.cgi?id=148568
<rdar://problem/22371346>

Reviewed by Anders Carlsson.

* UIProcess/API/APINavigationClient.h:
(API::NavigationClient::didBeginNavigationGesture):
(API::NavigationClient::willEndNavigationGesture):
(API::NavigationClient::didEndNavigationGesture):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageNavigationClient):
* UIProcess/API/C/WKPageNavigationClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::navigationGestureDidBegin):
(WebKit::WebPageProxy::navigationGestureWillEnd):
(WebKit::WebPageProxy::navigationGestureDidEnd):

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createOtherPage):
(WTR::TestController::createWebViewWithOptions):
Add some zeroes.

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

5 years ago[Mac] kill-old-processes should kill more processes
ap@apple.com [Fri, 28 Aug 2015 18:35:48 +0000 (18:35 +0000)]
[Mac] kill-old-processes should kill more processes
https://bugs.webkit.org/show_bug.cgi?id=148577

Reviewed by Tim Horton.

* BuildSlaveSupport/kill-old-processes:

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

5 years agoMedia Session: MediaSession.releaseSession() renamed to deactivate()
eric.carlson@apple.com [Fri, 28 Aug 2015 18:21:21 +0000 (18:21 +0000)]
Media Session: MediaSession.releaseSession() renamed to deactivate()
https://bugs.webkit.org/show_bug.cgi?id=148578

Reviewed by Jer Noble.

Source/WebCore:

No new tests, media/session/releasing-sessions.html was updated for the change.

* Modules/mediasession/MediaSession.cpp:
(WebCore::MediaSession::deactivate): Renamed from releaseSession.
(WebCore::MediaSession::releaseSession): Deleted.
* Modules/mediasession/MediaSession.h:
* Modules/mediasession/MediaSession.idl:

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setSession): releaseSession -> deactivate.

LayoutTests:

* media/session/releasing-sessions-expected.txt:
* media/session/releasing-sessions.html:

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

5 years agoThe status message for combined builder queues should say "all builds succeeded"...
commit-queue@webkit.org [Fri, 28 Aug 2015 18:13:37 +0000 (18:13 +0000)]
The status message for combined builder queues should say "all builds succeeded" if everything
built correctly.
https://bugs.webkit.org/show_bug.cgi?id=148535

Patch by Jason Marcell <jmarcell@apple.com> on 2015-08-28
Reviewed by David Kilzer and Alexey Proskuryakov.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotCombinedQueueView.js:
(BuildbotCombinedQueueView.prototype.update): Make status message for combined builder queues
say "all builds succeeded" if everything built correctly.

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

5 years agoGet rid of the DynamicSizeWithMinimumViewSize layout mode
timothy_horton@apple.com [Fri, 28 Aug 2015 18:09:49 +0000 (18:09 +0000)]
Get rid of the DynamicSizeWithMinimumViewSize layout mode
https://bugs.webkit.org/show_bug.cgi?id=148554

Reviewed by Anders Carlsson.

* UIProcess/API/C/WKLayoutMode.h:
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _layoutMode]):
(-[WKWebView _setLayoutMode:]):
(-[WKWebView _setMinimumViewSize:]): Deleted.
(-[WKWebView _minimumViewSize]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/Cocoa/_WKLayoutMode.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _setMinimumViewSize:]): Deleted.
(-[WKView _minimumViewSize]): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::scaleViewAndUpdateGeometryFenced): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WKViewLayoutStrategy.mm:
(+[WKViewLayoutStrategy layoutStrategyWithPage:view:mode:]):
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy _updateTransientScale:]): Deleted.
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]): Deleted.
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didChangeMinimumViewSize]): Deleted.
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willStartLiveResize]): Deleted.
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didEndLiveResize]): Deleted.
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didChangeFrameSize]): Deleted.
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willChangeLayoutStrategy]): Deleted.
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::replyWithFenceAfterNextFlush): Deleted.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scaleViewAndUpdateGeometryFenced): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::replyWithFenceAfterNextFlush): Deleted.

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

5 years agoWeb Inspector: Separate creating a style sheet from adding a new rule in the protocol
commit-queue@webkit.org [Fri, 28 Aug 2015 17:59:27 +0000 (17:59 +0000)]
Web Inspector: Separate creating a style sheet from adding a new rule in the protocol
https://bugs.webkit.org/show_bug.cgi?id=148502

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-08-28
Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/protocol/CSS.json:
Add CSS.createStyleSheet. Modify CSS.addRule.

Source/WebCore:

Tests: inspector/css/createStyleSheet.html
       inspector/css/manager-preferredInspectorStyleSheetForFrame.html

* inspector/InspectorCSSAgent.h:
Allow for multiple inspector style sheets per document.

* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::createStyleSheet):
(WebCore::InspectorCSSAgent::createInspectorStyleSheetForDocument): Added.
(WebCore::InspectorCSSAgent::viaInspectorStyleSheet): Deleted.
Extract and generalize creating a via-inspector stylesheet here.

(WebCore::InspectorCSSAgent::addRule):
Lookup stylesheet to add a rule to via the provided stylesheet id.

(WebCore::InspectorCSSAgent::bindStyleSheet):
(WebCore::InspectorCSSAgent::detectOrigin):
Update to account for a list of stylesheets per document instead of one.

* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyleSheet::addRule):
(WebCore::InspectorStyleSheetForInlineStyle::setStyleText):

Source/WebInspectorUI:

The backend allows creating multiple stylesheets. This patch makes
the frontend have a preferred InspectorStyleSheet per-frame.

* UserInterface/Base/Object.js:
(WebInspector.Object.singleFireEventListener):
Return the wrapped listener so it can be removed if needed.

* UserInterface/Models/CSSStyleSheet.js:
(WebInspector.CSSStyleSheet.prototype.isInspectorStyleSheet):
Helper to check if the current stylesheet is an inspector created stylesheet.

* UserInterface/Controllers/CSSStyleManager.js:
(WebInspector.CSSStyleManager.prototype.preferredInspectorStyleSheetForFrame):
(WebInspector.CSSStyleManager.prototype.preferredInspectorStyleSheetForFrame.documentNodeAvailable):
(WebInspector.CSSStyleManager.prototype.preferredInspectorStyleSheetForFrame.bodyNodeAvailable):
(WebInspector.CSSStyleManager.prototype.preferredInspectorStyleSheetForFrame.cssRuleAvailable):
(WebInspector.CSSStyleManager.prototype._inspectorStyleSheetsForFrame):
Lookup the inspector stylesheet for a particular frame. If one doesn't exist create it.
For legacy backends, exploit "addRule" to create the inspector stylesheet.

* UserInterface/Models/DOMNode.js:
* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.addEmptyRule.inspectorStyleSheetAvailable):
(WebInspector.DOMNodeStyles.prototype.addEmptyRule):
Currently add all new rules to the inspector stylesheet.

LayoutTests:

* inspector/css/createStyleSheet-expected.txt: Added.
* inspector/css/createStyleSheet.html: Added.
* inspector/css/manager-preferredInspectorStyleSheetForFrame-expected.txt: Added.
* inspector/css/manager-preferredInspectorStyleSheetForFrame.html: Added.
* inspector/css/stylesheet-events-inspector-stylesheet-expected.txt:
* inspector/css/stylesheet-events-inspector-stylesheet.html:

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

5 years agoScratchRegisterAllocator::preserveReusedRegistersByPushing() should allow room for...
mark.lam@apple.com [Fri, 28 Aug 2015 17:52:35 +0000 (17:52 +0000)]
ScratchRegisterAllocator::preserveReusedRegistersByPushing() should allow room for C helper calls and keep sp properly aligned.
https://bugs.webkit.org/show_bug.cgi?id=148564

Reviewed by Saam Barati.

ScratchRegisterAllocator::preserveReusedRegistersByPushing() pushes registers on
the stack in order to preserve them.  But emitPutTransitionStub() (which uses
preserveReusedRegistersByPushing()) may also emit a call to a C helper function
to flush the heap write barrier buffer.  The code for emitting a C helper call
expects the stack pointer (sp) to already be pointing to a location on the stack
where there's adequate space reserved for storing the arguments to the C helper,
and that space is expected to be at the top of the stack.  Hence, there is a
conflict of expectations.  As a result, the arguments for the C helper will
overwrite and corrupt the values that are pushed on the stack by
preserveReusedRegistersByPushing().

In addition, JIT compiled functions always position the sp such that it will be
aligned (according to platform ABI dictates) after a C call is made (i.e. after
the frame pointer and return address is pushed on to the stack).
preserveReusedRegistersByPushing()'s arbitrary pushing of a number of saved
register values may mess up this alignment.

The fix is to have preserveReusedRegistersByPushing(), after it has pushed the
saved register values, adjust the sp to reserve an additional amount of stack
space needed for C call helpers plus any padding needed to restore proper sp
alignment.  The stack's ReservedZone will ensure that we have enough stack space
for this.  ScratchRegisterAllocator::restoreReusedRegistersByPopping() also
needs to be updated to perform the complement of this behavior.

* jit/Repatch.cpp:
(JSC::emitPutReplaceStub):
(JSC::emitPutTransitionStub):
* jit/ScratchRegisterAllocator.cpp:
(JSC::ScratchRegisterAllocator::allocateScratchGPR):
(JSC::ScratchRegisterAllocator::allocateScratchFPR):
(JSC::ScratchRegisterAllocator::preserveReusedRegistersByPushing):
(JSC::ScratchRegisterAllocator::restoreReusedRegistersByPopping):
* jit/ScratchRegisterAllocator.h:
(JSC::ScratchRegisterAllocator::numberOfReusedRegisters):
* tests/stress/regress-148564.js: Added.
(test):
(runTest):

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

5 years ago[Mac] Right-clicking on GIFs spins the UI process for a while
timothy_horton@apple.com [Fri, 28 Aug 2015 17:35:07 +0000 (17:35 +0000)]
[Mac] Right-clicking on GIFs spins the UI process for a while
https://bugs.webkit.org/show_bug.cgi?id=148566
<rdar://problem/22460854>

Reviewed by Brady Eidson.

* platform/ContextMenuItem.h:
Properly mark this as Mac-only. It's only implemented in ContextMenuItemMac.

* platform/mac/ContextMenuItemMac.mm:
(WebCore::ContextMenuItem::shareMenuItem):
Take a NSImage directly, so we don't have to round-trip through BitmapImage,
which can be lossy and expensive.

* WebCoreSupport/WebContextMenuClient.mm:
(WebContextMenuClient::shareMenuItem):
Make an NSImage directly from the hit image if possible.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu):
(WebKit::WebPageProxy::platformInitializeShareMenuItem):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::platformInitializeShareMenuItem):
Move all of the code to make a Share menuitem into platformInitializeShareMenuItem.
Make an NSImage directly from the image data if possible.

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

5 years agoUse new CFNetwork cookie jar SPI only on El Capitan.
beidson@apple.com [Fri, 28 Aug 2015 17:14:11 +0000 (17:14 +0000)]
Use new CFNetwork cookie jar SPI only on El Capitan.
https://bugs.webkit.org/show_bug.cgi?id=148574 and rdar://problem/22460752

Reviewed by David Kilzer.

* platform/network/mac/CookieJarMac.mm:
(WebCore::setCookiesFromDOM): Use OS X version to decide which API/SPI to use.
* platform/spi/cf/CFNetworkSPI.h: Forward declare the SPI

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

5 years ago[CMake] LIBSECCOMP_INCLUDE_DIRS should be added to WebKit2_SYSTEM_INCLUDE_DIRECTORIES
mcatanzaro@igalia.com [Fri, 28 Aug 2015 14:24:10 +0000 (14:24 +0000)]
[CMake] LIBSECCOMP_INCLUDE_DIRS should be added to WebKit2_SYSTEM_INCLUDE_DIRECTORIES
https://bugs.webkit.org/show_bug.cgi?id=148552

Reviewed by Žan Doberšek.

LIBSECCOMP_INCLUDE_DIRS should be added to WebKit2_SYSTEM_INCLUDE_DIRECTORIES, not
WebKit2_INCLUDE_DIRECTORIES. (So that warnings from libseccomp headers are suppressed. Not
that there are any right now.)

* PlatformGTK.cmake:

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

5 years agoMinor fixes in reportUnexpectedSyscall
mcatanzaro@igalia.com [Fri, 28 Aug 2015 14:22:57 +0000 (14:22 +0000)]
Minor fixes in reportUnexpectedSyscall
https://bugs.webkit.org/show_bug.cgi?id=148551

Reviewed by Žan Doberšek.

There is an off-by-one in the static assert.

Also, an unsigned long long is passed in, but the parameter is an int. Then it's passed to
writeUnsignedInt, which takes an unsigned int. Let's use unsigned int instead. (The value
is a syscall number, so it's safe to truncate regardless -- it never be anywhere near as
large as an int, unless the input is malicious, in which case truncating it is the right
thing to do anyway -- so this is just a matter of style.)

* Shared/linux/SeccompFilters/Syscall.cpp:
(WebKit::reportUnexpectedSyscall):

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

5 years agoWeb Inspector: Type Profiler does not understand Functions within Default Argument...
commit-queue@webkit.org [Fri, 28 Aug 2015 12:58:14 +0000 (12:58 +0000)]
Web Inspector: Type Profiler does not understand Functions within Default Argument Expressions
https://bugs.webkit.org/show_bug.cgi?id=148557

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-08-28
Reviewed by Timothy Hatcher.

* UserInterface/Models/ScriptSyntaxTree.js:
(WebInspector.ScriptSyntaxTree.prototype._recurse):
(WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
(WebInspector.ScriptSyntaxTree):
Add support for abstracting and recursing through the default parameter
expressions Esprima has on function expressions and declarations.

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

5 years agoWeb Inspector: Type Profiler does not understand Functions inside Template Strings...
commit-queue@webkit.org [Fri, 28 Aug 2015 12:57:07 +0000 (12:57 +0000)]
Web Inspector: Type Profiler does not understand Functions inside Template Strings (ScriptSyntaxTree warnings)
https://bugs.webkit.org/show_bug.cgi?id=148556

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-08-28
Reviewed by Timothy Hatcher.

* UserInterface/Models/ScriptSyntaxTree.js:
(WebInspector.ScriptSyntaxTree.prototype._recurse):
(WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
(WebInspector.ScriptSyntaxTree):
Add support for abstracting and recursing through the Esprima template nodes.

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

5 years ago[GTK] Simplify the internal API to create a WebView
carlosgc@webkit.org [Fri, 28 Aug 2015 11:16:05 +0000 (11:16 +0000)]
[GTK] Simplify the internal API to create a WebView
https://bugs.webkit.org/show_bug.cgi?id=148570

Reviewed by Žan Doberšek.

Source/WebKit2:

Now that all the information required to create a WebView is in
API::PageConfiguration, we can simplify the internal API to
receive only the configuration instead of receiving a long list of
parameters that we use to build a new API::PageConfiguration.

* UIProcess/API/C/gtk/WKView.cpp:
(WKViewCreate):
* UIProcess/API/C/gtk/WKView.h:
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkitWebContextCreatePageForWebView):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseCreate):
(webkitWebViewBaseCreateWebPage):
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):

Tools:

* TestWebKitAPI/PlatformWebView.h: Add initialize method for GTK+ too.
* TestWebKitAPI/gtk/PlatformWebViewGtk.cpp:
(TestWebKitAPI::PlatformWebView::PlatformWebView): Implement all
PlatformWebView constructors that end up calling initialize with a PageConfiguration.
(TestWebKitAPI::PlatformWebView::initialize): Create the WebView
passing the received PageConfiguration.
* WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
(WTR::PlatformWebView::PlatformWebView): Create the WebView
passing the received PageConfiguration.

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

5 years agoLayout Test streams/reference-implementation/readable-stream.html is flaky
calvaris@igalia.com [Fri, 28 Aug 2015 09:48:41 +0000 (09:48 +0000)]
Layout Test streams/reference-implementation/readable-stream.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=148320

Reviewed by Alexey Proskuryakov.

* streams/reference-implementation/readable-stream.html: Set the timeouts at the last moment so that it is less
likely to hit them earlier that we should.

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

5 years agoUnreviewed GTK+ gardening. Skip inspector tests timing out after r188639.
carlosgc@webkit.org [Fri, 28 Aug 2015 09:11:33 +0000 (09:11 +0000)]
Unreviewed GTK+ gardening. Skip inspector tests timing out after r188639.

* platform/gtk/TestExpectations:

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

5 years agoUnreviewed Windows buildfix.
ossy@webkit.org [Fri, 28 Aug 2015 09:09:55 +0000 (09:09 +0000)]
Unreviewed Windows buildfix.

Revert part of r189072 since the original change was rolled out by r189085.

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:

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

5 years agoUnreviewed Windows buildfix.
ossy@webkit.org [Fri, 28 Aug 2015 08:57:49 +0000 (08:57 +0000)]
Unreviewed Windows buildfix.

Revert r189077 since the original change was rolled out by r189085.

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:

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

5 years agoUnreviewed GTK+ gardening. Skip some MediaStream tests that are timing out.
carlosgc@webkit.org [Fri, 28 Aug 2015 08:27:38 +0000 (08:27 +0000)]
Unreviewed GTK+ gardening. Skip some MediaStream tests that are timing out.

* platform/gtk/TestExpectations:

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

5 years ago[ES6] Implement Module execution and Loader's ready / link phase
utatane.tea@gmail.com [Fri, 28 Aug 2015 06:22:08 +0000 (06:22 +0000)]
[ES6] Implement Module execution and Loader's ready / link phase
https://bugs.webkit.org/show_bug.cgi?id=148172

Reviewed by Saam Barati.

This patch adds the link / ready phases to the existing module loader.
They are just the stubs and the actual implementations will be
forthcoming in the subsequnt patch.

And this patch paves the way to instantiate the module environment and
compile the executable code in the link phase. Move declaredVariables /
lexicalVariables from ModuleAnalyzer to JSModuleRecord to use them when
instantiating the module environment. Hold the source code in
JSModuleRecord to construct the executable in the link phase. And to
use HostResolveImportedModule operation from the C++ side, we expose
the JSMap from C++ to JS and use it in the builtin JS module loader
code.

* builtins/ModuleLoaderObject.js:
(requestResolveDependencies.resolveDependenciesPromise.this.requestInstantiate.then.):
(requestLink):
(requestReady):
(link):
(moduleEvaluation):
(loadModule):
* parser/ModuleAnalyzer.cpp:
(JSC::ModuleAnalyzer::ModuleAnalyzer):
(JSC::ModuleAnalyzer::analyze):
* parser/ModuleAnalyzer.h:
* runtime/Completion.cpp:
(JSC::checkModuleSyntax):
* runtime/JSModuleRecord.cpp:
(JSC::JSModuleRecord::finishCreation):
(JSC::JSModuleRecord::visitChildren):
(JSC::identifierToJSValue):
(JSC::JSModuleRecord::hostResolveImportedModule):
(JSC::JSModuleRecord::link):
(JSC::JSModuleRecord::execute):
* runtime/JSModuleRecord.h:
(JSC::JSModuleRecord::create):
(JSC::JSModuleRecord::sourceCode):
(JSC::JSModuleRecord::moduleKey):
(JSC::JSModuleRecord::exportEntries):
(JSC::JSModuleRecord::importEntries):
(JSC::JSModuleRecord::declaredVariables):
(JSC::JSModuleRecord::lexicalVariables):
(JSC::JSModuleRecord::JSModuleRecord):
* runtime/ModuleLoaderObject.cpp:
(JSC::moduleLoaderObjectParseModule):
(JSC::moduleLoaderObjectRequestedModules):
(JSC::moduleLoaderObjectModuleDeclarationInstantiation):
(JSC::moduleLoaderObjectEvaluate):
(JSC::ModuleLoaderObject::requestInstantiateAll): Deleted.
* runtime/ModuleLoaderObject.h:

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

5 years ago[Cocoa] Draw fonts at their native sizes instead of scaling a 1pt font
mmaxfield@apple.com [Fri, 28 Aug 2015 06:03:48 +0000 (06:03 +0000)]
[Cocoa] Draw fonts at their native sizes instead of scaling a 1pt font
https://bugs.webkit.org/show_bug.cgi?id=146045

Reviewed by Darin Adler.

In his WWDC talk[1], Antonio Cavedoni describes how painting a font at a particular point size
may yield different visual results than painting a font at a 1pt size into a scaled context.
However, this is something that we currently do in WebKit. This patch migrates from this
behavior to instead drawing text at the appropriate point size.

[1] https://developer.apple.com/videos/wwdc/2015/?id=804

* platform/graphics/cocoa/FontCascadeCocoa.mm:
(WebCore::FontCascade::drawGlyphs):

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

5 years agoAdd noDFG() to jsc to prevent DFG compilation of a specified function.
mark.lam@apple.com [Fri, 28 Aug 2015 05:59:44 +0000 (05:59 +0000)]
Add noDFG() to jsc to prevent DFG compilation of a specified function.
https://bugs.webkit.org/show_bug.cgi?id=148559

Reviewed by Geoffrey Garen and Saam Barati.

* API/JSCTestRunnerUtils.cpp:
(JSC::setNeverInline):
(JSC::setNeverOptimize):
* API/JSCTestRunnerUtils.h:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpAssumingJITType):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::mightCompileEval):
(JSC::DFG::mightCompileProgram):
(JSC::DFG::mightCompileFunctionForCall):
(JSC::DFG::mightCompileFunctionForConstruct):
(JSC::DFG::mightInlineFunctionForCall):
* jsc.cpp:
(GlobalObject::finishCreation):
(functionNoDFG):
* runtime/Executable.h:
(JSC::ScriptExecutable::ecmaMode):
(JSC::ScriptExecutable::setNeverInline):
(JSC::ScriptExecutable::setNeverOptimize):
(JSC::ScriptExecutable::setDidTryToEnterInLoop):
(JSC::ScriptExecutable::neverInline):
(JSC::ScriptExecutable::neverOptimize):
(JSC::ScriptExecutable::didTryToEnterInLoop):
(JSC::ScriptExecutable::isInliningCandidate):
(JSC::ScriptExecutable::isOkToOptimize):
(JSC::ScriptExecutable::addressOfDidTryToEnterInLoop):
* runtime/TestRunnerUtils.cpp:
(JSC::setNeverInline):
(JSC::setNeverOptimize):
(JSC::optimizeNextInvocation):
* runtime/TestRunnerUtils.h:

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

5 years agoUnreviewed, rolling out r189064 and r189084.
commit-queue@webkit.org [Fri, 28 Aug 2015 05:19:34 +0000 (05:19 +0000)]
Unreviewed, rolling out r189064 and r189084.
https://bugs.webkit.org/show_bug.cgi?id=148560

Breaks 117 JSC tests. (Requested by mlam on #webkit).

Reverted changesets:

"[ES6] Add TypedArray.prototype functionality."
https://bugs.webkit.org/show_bug.cgi?id=148035
http://trac.webkit.org/changeset/189064

"Unbreak JSC tests (broken since r189064)."
http://trac.webkit.org/changeset/189084

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

5 years agoUnbreak JSC tests (broken since r189064).
mark.lam@apple.com [Fri, 28 Aug 2015 04:27:36 +0000 (04:27 +0000)]
Unbreak JSC tests (broken since r189064).

Not reviewed.

* js/script-tests/typedarray-test-helper-functions.js:

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

5 years agoTiny cleanup in RenderLayer::enclosingCompositingLayerForRepaint()
zalan@apple.com [Fri, 28 Aug 2015 03:51:13 +0000 (03:51 +0000)]
Tiny cleanup in RenderLayer::enclosingCompositingLayerForRepaint()
https://bugs.webkit.org/show_bug.cgi?id=148541

Reviewed by Tim Horton.

No change in functionality.

* rendering/RenderLayer.cpp:
(WebCore::compositingContainer):
(WebCore::compositedWithOwnBackingStore):
(WebCore::RenderLayer::enclosingCompositingLayer):
(WebCore::RenderLayer::enclosingCompositingLayerForRepaint):
(WebCore::RenderLayer::enclosingFilterRepaintLayer):
(WebCore::RenderLayer::clippingRootForPainting):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::descendantLayerPaintsIntoAncestor):

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

5 years agoUnreviewed, rolling out r189079.
commit-queue@webkit.org [Fri, 28 Aug 2015 02:28:35 +0000 (02:28 +0000)]
Unreviewed, rolling out r189079.
https://bugs.webkit.org/show_bug.cgi?id=148555

broke the build (Requested by jessieberlin on #webkit).

Reverted changeset:

"Create WebAssembly functions"
https://bugs.webkit.org/show_bug.cgi?id=148373
http://trac.webkit.org/changeset/189079

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

5 years agoVideo full-screen shouldn't use the DynamicSizeWithMinimumViewSize layout mode
timothy_horton@apple.com [Fri, 28 Aug 2015 02:11:36 +0000 (02:11 +0000)]
Video full-screen shouldn't use the DynamicSizeWithMinimumViewSize layout mode
https://bugs.webkit.org/show_bug.cgi?id=148553

Reviewed by Zalan Bujtas.

* UIProcess/API/mac/WKView.mm:
(-[WKView _supportsArbitraryLayoutModes]):
(-[WKView _updateSupportsArbitraryLayoutModes]):
(-[WKView _didCommitLoadForMainFrame]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::beganEnterFullScreen):
(WebKit::PageClientImpl::beganExitFullScreen):
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Deleted.
(-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Deleted.
It's not OK to just randomly change the layout mode, because the client
can change it or its properties out from under us, and also because we
weren't resetting it to whatever the client had specified.

I recently implemented a better way to override layout modes, for PDF,
so use that here. Also, we shouldn't use DynamicSizeWithMinimumViewSize,
we should just use the "normal" mode (ViewSize), since we've already ensured
a minimum size by setting contentMinSize.

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

5 years agopluginInfo.clientLoadPolicy is used uninitialized in WebContent process
ap@apple.com [Fri, 28 Aug 2015 01:43:14 +0000 (01:43 +0000)]
pluginInfo.clientLoadPolicy is used uninitialized in WebContent process
https://bugs.webkit.org/show_bug.cgi?id=148550

Reviewed by Tim Horton.

This fixes flakiness on plugins/plugin-javascript-access.html.

* Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<PluginInfo>::decode):

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

5 years agoCreate WebAssembly functions
commit-queue@webkit.org [Fri, 28 Aug 2015 01:13:39 +0000 (01:13 +0000)]
Create WebAssembly functions
https://bugs.webkit.org/show_bug.cgi?id=148373

Patch by Sukolsak Sakshuwong <sukolsak@gmail.com> on 2015-08-27
Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Create functions from WebAssembly files generated by pack-asmjs
<https://github.com/WebAssembly/polyfill-prototype-1>.
WebAssembly functions created by this patch can only return 0.
Actual code generation will be implemented in subsequent patches.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::hash):
(JSC::CodeBlock::sourceCodeForTools):
(JSC::CodeBlock::dumpAssumingJITType):
(JSC::CodeBlock::dumpSource):
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::finalizeUnconditionally):
(JSC::CodeBlock::lineNumberForBytecodeOffset):
(JSC::CodeBlock::expressionRangeForBytecodeOffset):
(JSC::CodeBlock::install):
(JSC::CodeBlock::newReplacement):
(JSC::WebAssemblyCodeBlock::replacement):
(JSC::WebAssemblyCodeBlock::capabilityLevelInternal):
(JSC::CodeBlock::updateAllPredictions):
(JSC::CodeBlock::insertBasicBlockBoundariesForControlFlowProfiler):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::ownerExecutable):
(JSC::CodeBlock::ownerScriptExecutable):
(JSC::CodeBlock::codeType):
(JSC::WebAssemblyCodeBlock::WebAssemblyCodeBlock):
* debugger/Debugger.cpp:
(JSC::Debugger::toggleBreakpoint):
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::sourceIDForCallFrame):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::InlineStackEntry::executable):
(JSC::DFG::ByteCodeParser::inliningCost):
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
(JSC::DFG::ByteCodeParser::parseCodeBlock):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::isSupportedForInlining):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::executableFor):
* dfg/DFGOSREntry.cpp:
(JSC::DFG::prepareOSREntry):
* inspector/ScriptCallStackFactory.cpp:
(Inspector::CreateScriptCallStackFunctor::operator()):
* interpreter/Interpreter.cpp:
(JSC::eval):
(JSC::isWebAssemblyExecutable):
(JSC::GetStackTraceFunctor::operator()):
(JSC::UnwindFunctor::operator()):
* interpreter/StackVisitor.cpp:
(JSC::StackVisitor::Frame::sourceURL):
(JSC::StackVisitor::Frame::computeLineAndColumn):
* jit/JITOperations.cpp:
* jit/Repatch.cpp:
(JSC::isWebAssemblyExecutable):
(JSC::linkPolymorphicCall):
* llint/LLIntData.cpp:
(JSC::LLInt::Data::performAssertions):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::setUpCall):
* llint/LowLevelInterpreter.asm:
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/Executable.cpp:
(JSC::WebAssemblyExecutable::WebAssemblyExecutable):
(JSC::WebAssemblyExecutable::destroy):
(JSC::WebAssemblyExecutable::visitChildren):
(JSC::WebAssemblyExecutable::clearCode):
(JSC::WebAssemblyExecutable::prepareForExecution):
* runtime/Executable.h:
(JSC::ExecutableBase::isEvalExecutable):
(JSC::ExecutableBase::isFunctionExecutable):
(JSC::ExecutableBase::isProgramExecutable):
(JSC::ExecutableBase::isWebAssemblyExecutable):
(JSC::ExecutableBase::clearCodeVirtual):
* runtime/JSFunction.cpp:
(JSC::JSFunction::create):
* runtime/JSFunction.h:
* runtime/JSFunctionInlines.h:
(JSC::JSFunction::JSFunction):
(JSC::JSFunction::isBuiltinFunction):
* runtime/JSType.h:
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:
* wasm/JSWASMModule.h:
(JSC::JSWASMModule::functions):
* wasm/WASMFunctionParser.cpp:
(JSC::WASMFunctionParser::compile):
* wasm/WASMFunctionParser.h:
* wasm/WASMModuleParser.cpp:
(JSC::WASMModuleParser::WASMModuleParser):
(JSC::WASMModuleParser::parse):
(JSC::WASMModuleParser::parseFunctionDeclarationSection):
(JSC::WASMModuleParser::parseFunctionDefinition):
(JSC::WASMModuleParser::parseExportSection):
(JSC::parseWebAssembly):
* wasm/WASMModuleParser.h:

Source/WebCore:

No new tests because it's a function rename.

* testing/Internals.cpp:
(WebCore::Internals::parserMetaData):

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

5 years agoiOS Simulator API tests fails as Simulator is not running
commit-queue@webkit.org [Fri, 28 Aug 2015 00:36:24 +0000 (00:36 +0000)]
iOS Simulator API tests fails as Simulator is not running
https://bugs.webkit.org/show_bug.cgi?id=148501
rdar://problem/22447525

Patch by Aakash Jain <aakash_jain@apple.com> on 2015-08-27
Reviewed by Daniel Bates.

This change is a workaround for <rdar://problem/22388812>.

 * Scripts/run-api-tests: Launch the iOS Simulator before starting the API Tests
 and quit it on program termination when running tests on the iOS port.
 * Scripts/webkitdirs.pm: Store string "For WebKit Development" in constant
 SIMULATOR_DEVICE_SUFFIX_FOR_WEBKIT_DEVELOPMENT to make it consistently reusable.

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

5 years ago[Win] Unreviewed build fix after r189064.
bfulgham@apple.com [Fri, 28 Aug 2015 00:20:06 +0000 (00:20 +0000)]
[Win] Unreviewed build fix after r189064.

JSTypedArrayViewPrototypes.{h,cpp} -> JSTypedArrayViewPrototype.{h,cpp}

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:

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

5 years agoMake DLLLauncherMain executables dependent on dll
achristensen@apple.com [Fri, 28 Aug 2015 00:04:52 +0000 (00:04 +0000)]
Make DLLLauncherMain executables dependent on dll
https://bugs.webkit.org/show_bug.cgi?id=148548

Reviewed by Brent Fulgham.

Source/JavaScriptCore:

* shell/CMakeLists.txt:
* shell/PlatformWin.cmake:

Tools:

* DumpRenderTree/CMakeLists.txt:
* DumpRenderTree/PlatformWin.cmake:
* MiniBrowser/win/CMakeLists.txt:
* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/PlatformWin.cmake:

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

5 years agoDFG::StrCat isn't really effectful
fpizlo@apple.com [Thu, 27 Aug 2015 23:59:57 +0000 (23:59 +0000)]
DFG::StrCat isn't really effectful
https://bugs.webkit.org/show_bug.cgi?id=148443

Reviewed by Geoffrey Garen.

I previously made the DFG StrCat node effectful because it is implemented by calling a
DFGOperations function that could cause arbitrary effects. But, the node is only generated from the
op_strcat bytecode operation, and that operation is only used when we first ensure that its
operands are primitives. Primitive operands to StrCat cannot cause arbitrary side-effects. The
reason why I didn't immediately mark StrCat as pure was because there was nothing in DFG IR that
guaranteed that StrCat's children were primitives.

This change adds a KnownPrimitiveUse use kind, and applies it to StrCat. This allows us to mark
StrCat as being pure. This should be a speed-up because we can CSE StrCat and because it means that
we can OSR exit after a StrCat (a pure node doesn't clobber exit state), so we can convert more
of a large string concatenation into MakeRope's.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::attemptToMakeFastStringAdd):
* dfg/DFGOperations.cpp:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::SafeToExecuteEdge::operator()):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::speculate):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGUseKind.cpp:
(WTF::printInternal):
* dfg/DFGUseKind.h:
(JSC::DFG::typeFilterFor):
(JSC::DFG::shouldNotHaveTypeCheck):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compileStrCat):
(JSC::FTL::DFG::LowerDFGToLLVM::speculate):

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

5 years agofast/css/object-fit/object-fit-embed.html isn't testing anything
timothy_horton@apple.com [Thu, 27 Aug 2015 23:52:26 +0000 (23:52 +0000)]
fast/css/object-fit/object-fit-embed.html isn't testing anything
https://bugs.webkit.org/show_bug.cgi?id=148512

Reviewed by Andy Estes.

* fast/css/object-fit/object-fit-embed-expected.html:
* fast/css/object-fit/object-fit-embed.html:
* fast/replaced/border-radius-clip-content-edge.html:
* fast/replaced/outline-replaced-elements.html:
These tests load PNGs inside <embeds>. r82001 made it so that
the test plugin handles PNGs, and also so that <embed> prefers
plugins even for types that we know how to handle natively.

Since these tests actually want to load PNGs natively, disable
plugins so we don't get that behavior.

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

5 years ago[Win] Unreviewed build fix after r189064.
bfulgham@apple.com [Thu, 27 Aug 2015 23:50:55 +0000 (23:50 +0000)]
[Win] Unreviewed build fix after r189064.

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:

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

5 years agoAdd module loader "resolve" hook for local file system to test the loader in JSC...
utatane.tea@gmail.com [Thu, 27 Aug 2015 23:48:13 +0000 (23:48 +0000)]
Add module loader "resolve" hook for local file system to test the loader in JSC shell
https://bugs.webkit.org/show_bug.cgi?id=148543

Reviewed by Filip Pizlo.

Add the module loader "resolve" hook to the JSC shell.
It takes the module name and the referrer module key and resolves the name to the unique module key.

resolve(ModuleName moduleName, ModuleKey referrer) -> Promise<ModuleKey>

In the JSC shell, since we load the module from the local file system, we treat an absolute file path
as a module key. So, in this patch, we implement the "resolve" hook that resolves the module name to
the absolute file path.

This local file system "resolve" functionality makes JSC shell easy to test the module loader.

* jsc.cpp:
(GlobalObject::finishCreation):
(GlobalObject::moduleLoaderFetch):
(pathSeparator):
(extractDirectoryName):
(currentWorkingDirectory):
(resolvePath):
(GlobalObject::moduleLoaderResolve):
(functionDrainMicrotasks):
* runtime/JSInternalPromiseDeferred.cpp:
(JSC::JSInternalPromiseDeferred::resolve):
(JSC::JSInternalPromiseDeferred::reject):
* runtime/JSInternalPromiseDeferred.h:
* tests/stress/pathname-resolve.js: Added.
(shouldBe):
(shouldThrow):

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

5 years agoUnreviewed, fix some FIXMEs and add some new ones, based on things we've learned...
fpizlo@apple.com [Thu, 27 Aug 2015 23:41:59 +0000 (23:41 +0000)]
Unreviewed, fix some FIXMEs and add some new ones, based on things we've learned from some
recent OSR exit work.

* dfg/DFGLICMPhase.cpp:
(JSC::DFG::LICMPhase::run):
(JSC::DFG::LICMPhase::attemptHoist):
* dfg/DFGMayExit.cpp:
* dfg/DFGMayExit.h:

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

5 years agoRemove Mac slaves 188/189 after being replaced with 400/401.
lforschler@apple.com [Thu, 27 Aug 2015 23:39:46 +0000 (23:39 +0000)]
Remove Mac slaves 188/189 after being replaced with 400/401.

Unreviewed.

* BuildSlaveSupport/build.webkit.org-config/config.json:

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

5 years ago[ES6] Add TypedArray.prototype functionality.
commit-queue@webkit.org [Thu, 27 Aug 2015 22:57:07 +0000 (22:57 +0000)]
[ES6] Add TypedArray.prototype functionality.
https://bugs.webkit.org/show_bug.cgi?id=148035

Patch by Keith Miller <keith_miller@apple.com> on 2015-08-27
Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

This patch should add most of the functionality for
the prototype properties of TypedArray objects in ES6.
There are a few exceptions to this, which will be added
in upcoming patches:

1) First we do not use the species constructor for some
of the TypedArray prototype functions (namely: map, filter,
slice, and subarray). That will need to be added when
species constructors are finished.

2) TypedArrays still have a length, byteOffset, byteLength,
and buffer are still attached to the TypedArray instance (in
the spec they are on the TypedArray.prototype instance object)
since the JIT currently assumes those properties are fixed.

3) The TypedArray.constructor property is not added yet
as it should point to the TypedArray instance object,
which will be added in a future patch.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* builtins/TypedArray.prototype.js: Added.
(every):
(find):
(findIndex):
(forEach):
(some):
(sort.min):
(sort.merge):
(sort.mergeSort):
(sort):
(reduce):
(reduceRight):
(map):
(filter):
(toLocaleString):
* runtime/ArrayPrototype.cpp:
* runtime/ArrayPrototype.h:
* runtime/CommonIdentifiers.h:
* runtime/JSGenericTypedArrayView.h:
(JSC::sortFloat):
(JSC::JSGenericTypedArrayView::toAdaptorNativeFromValue):
(JSC::JSGenericTypedArrayView::setRangeToValue):
(JSC::JSGenericTypedArrayView::sort):
* runtime/JSGenericTypedArrayViewInlines.h:
* runtime/JSGenericTypedArrayViewPrototypeFunctions.h: Added.
(JSC::argumentClampedIndexFromStartOrEnd):
(JSC::genericTypedArrayViewProtoFuncSet):
(JSC::genericTypedArrayViewProtoFuncEntries):
(JSC::genericTypedArrayViewProtoFuncCopyWithin):
(JSC::genericTypedArrayViewProtoFuncFill):
(JSC::genericTypedArrayViewProtoFuncIndexOf):
(JSC::genericTypedArrayViewProtoFuncJoin):
(JSC::genericTypedArrayViewProtoFuncKeys):
(JSC::genericTypedArrayViewProtoFuncLastIndexOf):
(JSC::genericTypedArrayViewProtoGetterFuncLength):
(JSC::genericTypedArrayViewProtoGetterFuncByteLength):
(JSC::genericTypedArrayViewProtoGetterFuncByteOffset):
(JSC::genericTypedArrayViewProtoFuncReverse):
(JSC::genericTypedArrayViewPrivateFuncSort):
(JSC::genericTypedArrayViewProtoFuncSlice):
(JSC::genericTypedArrayViewProtoFuncSubarray):
(JSC::typedArrayViewProtoFuncValues):
* runtime/JSGenericTypedArrayViewPrototypeInlines.h:
(JSC::JSGenericTypedArrayViewPrototype<ViewClass>::finishCreation):
(JSC::genericTypedArrayViewProtoFuncSet): Deleted.
(JSC::genericTypedArrayViewProtoFuncSubarray): Deleted.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/JSObject.h:
* runtime/JSTypedArrayPrototypes.cpp:
* runtime/JSTypedArrayPrototypes.h:
* runtime/JSTypedArrayViewPrototype.cpp: Added.
(JSC::typedArrayViewPrivateFuncLength):
(JSC::typedArrayViewPrivateFuncSort):
(JSC::typedArrayViewProtoFuncSet):
(JSC::typedArrayViewProtoFuncEntries):
(JSC::typedArrayViewProtoFuncCopyWithin):
(JSC::typedArrayViewProtoFuncFill):
(JSC::typedArrayViewProtoFuncLastIndexOf):
(JSC::typedArrayViewProtoFuncIndexOf):
(JSC::typedArrayViewProtoFuncJoin):
(JSC::typedArrayViewProtoFuncKeys):
(JSC::typedArrayViewProtoGetterFuncLength):
(JSC::typedArrayViewProtoGetterFuncByteLength):
(JSC::typedArrayViewProtoGetterFuncByteOffset):
(JSC::typedArrayViewProtoFuncReverse):
(JSC::typedArrayViewProtoFuncSubarray):
(JSC::typedArrayViewProtoFuncSlice):
(JSC::typedArrayViewProtoFuncValues):
(JSC::JSTypedArrayViewPrototype::JSTypedArrayViewPrototype):
(JSC::JSTypedArrayViewPrototype::finishCreation):
(JSC::JSTypedArrayViewPrototype::create):
(JSC::JSTypedArrayViewPrototype::createStructure):
* runtime/JSTypedArrayViewPrototype.h: Copied from Source/JavaScriptCore/runtime/JSTypedArrayPrototypes.cpp.

LayoutTests:

Added tests for the TypedArray.prototype functions.
All the tests use the typedarray-test-helper-function.js
to run the test on each TypedArray.

* fast/canvas/webgl/type-conversion-test-expected.txt:
* js/script-tests/typedarray-copyWithin.js: Added.
* js/script-tests/typedarray-every.js: Added.
(isBigEnough):
(isBigEnoughAndChange):
(isBigEnoughAndException):
* js/script-tests/typedarray-fill.js: Added.
* js/script-tests/typedarray-filter.js: Added.
(keepEven):
(keepEvenAndChange):
(isBigEnoughAndException):
* js/script-tests/typedarray-find.js: Added.
(keepEven):
(keepEvenAndChange):
(isBigEnoughAndException):
* js/script-tests/typedarray-findIndex.js: Added.
(keepEven):
(keepEvenAndChange):
(isBigEnoughAndException):
* js/script-tests/typedarray-forEach.js: Added.
(.checkCorrect.let.list):
(.checkCorrect):
(createChecker):
(foo):
(changeArray):
(isBigEnoughAndException):
* js/script-tests/typedarray-indexOf.js: Added.
(keepEven):
* js/script-tests/typedarray-lastIndexOf.js: Added.
* js/script-tests/typedarray-map.js: Added.
(even):
(evenAndChange):
(isBigEnoughAndException):
* js/script-tests/typedarray-reduce.js: Added.
(createArray):
(sum):
(createArrayAndChange):
(isBigEnoughAndException):
* js/script-tests/typedarray-reduceRight.js: Added.
(createArray):
(sum):
(createArrayAndChange):
(isBigEnoughAndException):
* js/script-tests/typedarray-slice.js: Added.
* js/script-tests/typedarray-some.js: Added.
(isBigEnough):
(isBigEnoughAndChange):
(isBigEnoughAndException):
* js/script-tests/typedarray-sort.js: Added.
(sortBackwards):
(compareException):
* js/script-tests/typedarray-test-helper-functions.js: Added.
(forEachTypedArray):
(isSameFunctionForEachTypedArrayPrototype.eq):
(isSameFunctionForEachTypedArrayPrototype):
(hasSameValues):
(.foo):
(testPrototypeFunctionHelper):
(testPrototypeFunctionOnSigned):
(testPrototypeFunctionOnFloat):
(testPrototypeFunction):
* js/typedarray-copyWithin-expected.txt: Added.
* js/typedarray-copyWithin.html: Added.
* js/typedarray-every-expected.txt: Added.
* js/typedarray-every.html: Added.
* js/typedarray-fill-expected.txt: Added.
* js/typedarray-fill.html: Added.
* js/typedarray-filter-expected.txt: Added.
* js/typedarray-filter.html: Added.
* js/typedarray-find-expected.txt: Added.
* js/typedarray-find.html: Added.
* js/typedarray-findIndex-expected.txt: Added.
* js/typedarray-findIndex.html: Added.
* js/typedarray-forEach-expected.txt: Added.
* js/typedarray-forEach.html: Added.
* js/typedarray-indexOf-expected.txt: Added.
* js/typedarray-indexOf.html: Added.
* js/typedarray-lastIndexOf-expected.txt: Added.
* js/typedarray-lastIndexOf.html: Added.
* js/typedarray-map-expected.txt: Added.
* js/typedarray-map.html: Added.
* js/typedarray-reduce-expected.txt: Added.
* js/typedarray-reduce.html: Added.
* js/typedarray-reduceRight-expected.txt: Added.
* js/typedarray-reduceRight.html: Added.
* js/typedarray-slice-expected.txt: Added.
* js/typedarray-slice.html: Added.
* js/typedarray-some-expected.txt: Added.
* js/typedarray-some.html: Added.
* js/typedarray-sort-expected.txt: Added.
* js/typedarray-sort.html: Added.

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

5 years agoA WebIDL callback interface is allowed to have constants
cdumez@apple.com [Thu, 27 Aug 2015 22:35:46 +0000 (22:35 +0000)]
A WebIDL callback interface is allowed to have constants
https://bugs.webkit.org/show_bug.cgi?id=148449

Reviewed by Geoffrey Garen.

Our JS bindings generator is now able to:
1. Handle IDL constants [1] on a callback interfaces [2] and generate
   a DOMConstructorObject subclass with static properties for
   these constants [3].
2. Generate a property on the global object for callback interfaces
   that have constants and do not have the [NoInterfaceObject] IDL
   extended attribute [4].

This is a pre-requirement for Bug 148415 as NodeFilter [5] has constants
and should be a callback interface. Once NodeFilter is ported to be
a callback interface, the JS still needs to be able to access
window.NodeFilter.SHOW_ALL for e.g.

[1] https://heycam.github.io/webidl/#dfn-constant
[2] https://heycam.github.io/webidl/#dfn-callback-interface
[3] https://heycam.github.io/webidl/#NoInterfaceObject
[4] https://heycam.github.io/webidl/#es-interfaces
[5] https://dom.spec.whatwg.org/#interface-nodefilter

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallbackHeader):
(GenerateCallbackImplementation):
(GenerateConstructorHelperMethods):
(ConstructorHasProperties): Deleted.
* bindings/scripts/preprocess-idls.pl:
(getInterfaceExtendedAttributesFromIDL):
(interfaceHasConstantAttribute):
* bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallbackConstructor::create):
(WebCore::JSTestCallbackConstructor::createStructure):
(WebCore::JSTestCallbackConstructor::JSTestCallbackConstructor):
(WebCore::JSTestCallbackConstructor::finishCreation):
(WebCore::JSTestCallback::getConstructor):
* bindings/scripts/test/JS/JSTestCallback.h:
* bindings/scripts/test/ObjC/DOMTestCallback.h:
* bindings/scripts/test/TestCallback.idl:

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

5 years agoRange.compareBoundaryPoints() should throw a NotSupportedError for invalid compareHow...
cdumez@apple.com [Thu, 27 Aug 2015 22:33:40 +0000 (22:33 +0000)]
Range.compareBoundaryPoints() should throw a NotSupportedError for invalid compareHow values
https://bugs.webkit.org/show_bug.cgi?id=148483

Reviewed by Geoffrey Garen.

Source/WebCore:

Range.compareBoundaryPoints() should throw a NotSupportedError for
invalid compareHow values:
https://dom.spec.whatwg.org/#dom-range-compareboundarypoints (step 1)

Firefox and Chrome conform to the specification already.

Previously, WebKit would not throw and simply cast the value to our
internal CompareHow enum type. This patch aligns WebKit's behavior with
the DOM specificaiton and other browsers.

W3C test suite:
http://w3c-test.org/dom/ranges/Range-compareBoundaryPoints.html

Test: fast/dom/Range/compareBoundaryPoints-compareHow-exception.html

* bindings/scripts/CodeGenerator.pm:
* bindings/scripts/CodeGeneratorGObject.pm:
* bindings/scripts/CodeGeneratorJS.pm:
* bindings/scripts/CodeGeneratorObjC.pm:
Drop CompareHow special casing from bindings generator as we now use
unsigned short instead in the IDL.

* dom/Range.cpp:
(WebCore::Range::compareBoundaryPointsForBindings):
* dom/Range.h:
* dom/Range.idl:
Use "unsigned short" type instead of WebCore's CompareHow for the
parameter, as per the specification. On implementation side, we
now validate the compareHow value before casting it to a CompareHow
enum type. If the value is not value, we throw and abort early.

LayoutTests:

Add new layout test to confirm that Range.compareBoundaryPoints() throws
when passed in invalid compareHow values.

* fast/dom/Range/compareBoundaryPoints-compareHow-exception-expected.txt: Added.
* fast/dom/Range/compareBoundaryPoints-compareHow-exception.html: Added.

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

5 years agoPage does not update when <link> media attribute changes to no longer apply to page
joepeck@webkit.org [Thu, 27 Aug 2015 22:12:12 +0000 (22:12 +0000)]
Page does not update when <link> media attribute changes to no longer apply to page
https://bugs.webkit.org/show_bug.cgi?id=148392

Reviewed by Antti Koivisto.

Source/WebCore:

Test: fast/css/link-media-attr.html

* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::parseAttribute):
When the media attribute changes, recalculate styles if the link is not disabled.

LayoutTests:

* fast/css/link-media-attr-expected.txt: Added.
* fast/css/link-media-attr.html: Added.
Add a test to verify that styles change after a link's media attribute changes.

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

5 years agoDocument window.NodeFilter properties
cdumez@apple.com [Thu, 27 Aug 2015 21:42:29 +0000 (21:42 +0000)]
Document window.NodeFilter properties
https://bugs.webkit.org/show_bug.cgi?id=148531

Reviewed by Geoffrey Garen.

Document window.NodeFilter properties to detect changes to them. This
is in preparation of Bug 148415 as this will help detect unwanted
changes to the interface when making NodeFilter a callback interface.

* fast/dom/node-filter-interface-expected.txt: Added.
* fast/dom/node-filter-interface.html: Added.

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

5 years agoSimple line layout: Text jumps sometimes on naughty strings page
zalan@apple.com [Thu, 27 Aug 2015 21:39:20 +0000 (21:39 +0000)]
Simple line layout: Text jumps sometimes on naughty strings page
https://bugs.webkit.org/show_bug.cgi?id=148399
rdar://problem/22212568

Reviewed by Antti Koivisto.

The x position we set for tab characters during painting should
be the same as if it was set by the inline box tree painting.

Inline box tree computes the distance from the rootbox for each line
and sets this value as the xPos for the TextRun.
Currently simple line layout does not support cases where a line
would have an offset, so this value is always 0.

Source/WebCore:

Test: fast/text/whitespace/simple-line-layout-tab-position.html

* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintFlow):

LayoutTests:

* fast/text/whitespace/simple-line-layout-tab-position-expected.html: Added.
* fast/text/whitespace/simple-line-layout-tab-position.html: Added.

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

5 years agoAdd two bots to the Mac Yosemite queue.
lforschler@apple.com [Thu, 27 Aug 2015 21:38:53 +0000 (21:38 +0000)]
Add two bots to the Mac Yosemite queue.
This is to eventually replace bots188/189, which will be removed after 400/401 are vetted.

Unreviewed.

* BuildSlaveSupport/build.webkit.org-config/config.json:

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

5 years agoIsolate Source directories in CMake build
achristensen@apple.com [Thu, 27 Aug 2015 21:36:49 +0000 (21:36 +0000)]
Isolate Source directories in CMake build
https://bugs.webkit.org/show_bug.cgi?id=148389

Reviewed by Brent Fulgham.

.:

* CMakeLists.txt:
* Source/cmake/WebKitCommon.cmake:
Move package finding to WebKitCommon.

Source/JavaScriptCore:

* PlatformWin.cmake:
Include ../include/private to find WTF headers in internal build.
Don't use a script to generate forwarding headers.
* shell/PlatformWin.cmake:
Copy inspector scripts to the forwarding headers directory to be used by WebCore.

Source/WebCore:

* CMakeLists.txt:
Use the forwarding header copy of the inspector scripts to avoid requiring JavaScriptCore directory to exist.
* PlatformAppleWin.cmake:
Add AVFoundation sources to build.
* PlatformEFL.cmake:
Moved WebKitVersion.h generating from CMakeLists.txt because it is now only used in WebCore by EFL.
* PlatformWin.cmake:
Include ../include/private to find forwarding headers in internal build.

Source/WebKit:

* PlatformWin.cmake:
Moved WebKitVersion.h generation from WebCore because the scripts required for it are in WebKit.

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

5 years ago[Win CMake] Fix incremental build after r188673
achristensen@apple.com [Thu, 27 Aug 2015 21:31:43 +0000 (21:31 +0000)]
[Win CMake] Fix incremental build after r188673
https://bugs.webkit.org/show_bug.cgi?id=148539

Reviewed by Brent Fulgham.

Source/JavaScriptCore:

* PlatformWin.cmake:
Use xcopy as a build step instead of file(COPY ...) to copy updated headers.

Source/WebCore:

* CMakeLists.txt:
* PlatformWin.cmake:
Use xcopy as a build step instead of file(COPY ...) to copy updated headers.

Tools:

* TestWebKitAPI/PlatformWin.cmake:
Copy forwarding headers from WebCore before building in case that was not yet done.
It used to be done when running CMake, but now it's a build step.

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

5 years agoInclude ES6 Generators and Proxy object status to feature status page.
jond@apple.com [Thu, 27 Aug 2015 21:26:24 +0000 (21:26 +0000)]
Include ES6 Generators and Proxy object status to feature status page.
https://bugs.webkit.org/show_bug.cgi?id=148095

Reviewed by Timothy Hatcher.

* features.json:

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

5 years agoFactor out Lookup invocation
timothy_horton@apple.com [Thu, 27 Aug 2015 21:24:27 +0000 (21:24 +0000)]
Factor out Lookup invocation
https://bugs.webkit.org/show_bug.cgi?id=148509

Reviewed by Anders Carlsson.

There's a ton of duplicated code in legacy and modern WebKit to talk to
Lookup. And, it's pretty messy. As a first step to making it less messy,
make it so we only have it in one place instead of four (or two).

* editing/DictionaryPopupInfo.h:
Move DictionaryPopupInfo into WebCore. This was duplicated
in both legacy and modern WebKit.

* editing/mac/DictionaryLookup.h:
* editing/mac/DictionaryLookup.mm:
(WebCore::DictionaryLookup::rangeForSelection):
(WebCore::DictionaryLookup::rangeAtHitTestResult):
(WebCore::DictionaryLookup::stringForPDFSelection):
(WebCore::showPopupOrCreateAnimationController):
(WebCore::DictionaryLookup::showPopup):
(WebCore::DictionaryLookup::hidePopup):
(WebCore::DictionaryLookup::animationControllerForPopup):
(WebCore::rangeForDictionaryLookupForSelection): Deleted.
(WebCore::rangeForDictionaryLookupAtHitTestResult): Deleted.
(WebCore::dictionaryLookupForPDFSelection): Deleted.
Move DictionaryLookup stuff into a class for better names.

Move showPopup, hidePopup, and animationControllerForPopup here.
showPopup and animationControllerForPopup both bottleneck through
a single function, where previously we duplicated all of the code
for both of them, and in both legacy and modern WebKit.

showPopup and animationControllerForPopup take a block that they *may*
call if we have support for overriding Lookup's indicator with TextIndicator,
because the installation process is different per WebKit.

* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::selectClosestWordFromHitTestResultBasedOnLookup):
* testing/Internals.cpp:
(WebCore::Internals::rangeForDictionaryLookupAtLocation):
Adjust to the new naming.

* Shared/DictionaryPopupInfo.cpp: Removed.
* Shared/DictionaryPopupInfo.h: Removed.
Moved to WebCore.

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<DictionaryPopupInfo>::encode):
(IPC::ArgumentCoder<DictionaryPopupInfo>::decode):
Add encode/decoders for DictionaryPopupInfo now that it's in WebCore.

* Shared/WebCoreArgumentCoders.h:
* Shared/WebHitTestResult.h:
* Shared/mac/ArgumentCodersMac.h:
* UIProcess/API/mac/WKView.mm:
(+[WKView hideWordDefinitionWindow]):
(-[WKView _dismissContentRelativeChildWindows]):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didPerformDictionaryLookup):
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _animationControllerForText]):
* UIProcess/mac/WebPageProxyMac.mm:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::showDefinitionForAttributedString):
(WebKit::PDFPlugin::lookupTextAtLocation):
* WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupAtLocation):
(WebKit::WebPage::performDictionaryLookupForSelection):
(WebKit::WebPage::dictionaryPopupInfoForRange):
(WebKit::WebPage::dictionaryPopupInfoForSelectionInPDFPlugin):
(WebKit::WebPage::lookupTextAtLocation):
Adjust to new names and move stuff to WebCore.

* WebKit.xcodeproj/project.pbxproj:

* WebView/DictionaryPopupInfo.h: Removed.
Move to WebCore.

* WebView/WebHTMLView.mm:
(-[WebHTMLView _lookUpInDictionaryFromMenu:]):
DictionaryPopupInfo keeps a TextIndicatorData, not a TextIndicator.

* WebView/WebImmediateActionController.mm:
(-[WebImmediateActionController _animationControllerForDataDetectedLink]):
(dictionaryPopupInfoForRange):
(-[WebImmediateActionController _animationControllerForText]):
* WebView/WebView.mm:
(-[WebView _prepareForDictionaryLookup]):
(-[WebView _animationControllerForDictionaryLookupPopupInfo:]):
(-[WebView _setTextIndicator:withLifetime:]):
(-[WebView _showDictionaryLookupPopup:]):
* WebView/WebViewInternal.h:
Move a bunch of code to WebCore.
Factor some that has to stay out into _prepareForDictionaryLookup.

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

5 years agoAdd IndexedDB to the feature status page.
jond@apple.com [Thu, 27 Aug 2015 21:23:49 +0000 (21:23 +0000)]
Add IndexedDB to the feature status page.
https://bugs.webkit.org/show_bug.cgi?id=148094

Reviewed by Timothy Hatcher.

* features.json:

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

5 years agoREGRESSION (r188987): imported/mozilla/svg/filters/feConvolveMatrix-1.svg fails
andersca@apple.com [Thu, 27 Aug 2015 21:02:39 +0000 (21:02 +0000)]
REGRESSION (r188987): imported/mozilla/svg/filters/feConvolveMatrix-1.svg fails
https://bugs.webkit.org/show_bug.cgi?id=148497
<rdar://problem/22459541>

Reviewed by Andy Estes.

Source/WebCore:

Don't return early if iterations is 0.

* platform/graphics/filters/FEConvolveMatrix.cpp:
(WebCore::FEConvolveMatrix::platformApplySoftware):

LayoutTests:

* TestExpectations:

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

5 years agoUnreviewed, add a comment to describe something I learned about a confusingly-named...
fpizlo@apple.com [Thu, 27 Aug 2015 19:58:50 +0000 (19:58 +0000)]
Unreviewed, add a comment to describe something I learned about a confusingly-named function.

* dfg/DFGUseKind.h:
(JSC::DFG::isCell):

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

5 years agoREGRESSION(r184779): Possible read-after-free in JavaScriptCore/dfg/DFGClobberize.h
basile_clement@apple.com [Thu, 27 Aug 2015 19:40:09 +0000 (19:40 +0000)]
REGRESSION(r184779): Possible read-after-free in JavaScriptCore/dfg/DFGClobberize.h
https://bugs.webkit.org/show_bug.cgi?id=148411

Reviewed by Geoffrey Garen and Filip Pizlo.

Source/JavaScriptCore:

* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):

LayoutTests:

* js/regress-148411-expected.txt: Added.
* js/regress-148411.html: Added.
* js/script-tests/regress-148411.js: Added.
(foo):

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

5 years agoAX: Remove accessibility/mac/change-notification-on-scroll.html test
commit-queue@webkit.org [Thu, 27 Aug 2015 19:36:02 +0000 (19:36 +0000)]
AX: Remove accessibility/mac/change-notification-on-scroll.html test
https://bugs.webkit.org/show_bug.cgi?id=148534

Patch by Nan Wang <n_wang@apple.com> on 2015-08-27
Reviewed by Chris Fleizach.

Removed the test since AXValueChange notifications are not being sent
when scrollable regions inside the WebView are scrolled.

* accessibility/mac/change-notification-on-scroll-expected.txt: Removed.
* accessibility/mac/change-notification-on-scroll.html: Removed.
* platform/mac/TestExpectations:

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

5 years agoAX: Fix accessibility/select-element-at-index.html test
commit-queue@webkit.org [Thu, 27 Aug 2015 19:21:29 +0000 (19:21 +0000)]
AX: Fix accessibility/select-element-at-index.html test
https://bugs.webkit.org/show_bug.cgi?id=148516

Patch by Nan Wang <n_wang@apple.com> on 2015-08-27
Reviewed by Chris Fleizach.

Tools:

Implemented setSelectedChildAtIndex and removeSelectionAtIndex for mac.

* DumpRenderTree/AccessibilityUIElement.cpp:
(setSelectedChildCallback):
(setSelectedChildAtIndexCallback):
(removeSelectionAtIndexCallback):
(elementAtPointCallback):
(sentenceAtOffsetCallback):
(stringForSelectionCallback):
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::setSelectedChild):
(AccessibilityUIElement::setSelectedChildAtIndex):
(AccessibilityUIElement::removeSelectionAtIndex):
(AccessibilityUIElement::accessibilityValue):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::wordAtOffset):
(WTR::AccessibilityUIElement::lineAtOffset):
(WTR::AccessibilityUIElement::sentenceAtOffset):
(WTR::AccessibilityUIElement::isSelectable):
(WTR::AccessibilityUIElement::isMultiSelectable):
(WTR::AccessibilityUIElement::setSelectedChild):
(WTR::AccessibilityUIElement::setSelectedChildAtIndex):
(WTR::AccessibilityUIElement::removeSelectionAtIndex):
(WTR::AccessibilityUIElement::selectedChildrenCount):
(WTR::AccessibilityUIElement::selectedChildAtIndex):
(WTR::AccessibilityUIElement::isExpanded):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::setSelectedChild):
(WTR::AccessibilityUIElement::setSelectedChildAtIndex):
(WTR::AccessibilityUIElement::removeSelectionAtIndex):
(WTR::AccessibilityUIElement::accessibilityValue):

LayoutTests:

* accessibility/select-element-at-index.html:
* platform/mac/TestExpectations:
* platform/mac/accessibility/select-element-at-index-expected.txt: Added.

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

5 years agoDecode redirected data URLs in web process
antti@apple.com [Thu, 27 Aug 2015 19:10:29 +0000 (19:10 +0000)]
Decode redirected data URLs in web process
https://bugs.webkit.org/show_bug.cgi?id=148386

Reviewed by Zalan Bujtas.

Redirected data URLs still end up to networking layer for decoding. Handle them locally as well.

Covered by existing tests.

* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::~ResourceLoader):
(WebCore::ResourceLoader::finishNetworkLoad):

    Factor to a function.

(WebCore::ResourceLoader::releaseResources):
(WebCore::ResourceLoader::willSendRequestInternal):

    When receiving redirect to a data URL end the network load and decode it locally.

(WebCore::ResourceLoader::willSendRequest):
* loader/ResourceLoader.h:

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

5 years ago[Win] Skip new High DPI test (Windows doesn't quite support this)
bfulgham@apple.com [Thu, 27 Aug 2015 18:45:30 +0000 (18:45 +0000)]
[Win] Skip new High DPI test (Windows doesn't quite support this)
Also skip an event test that started failing after r188793.

* platform/win/TestExpectations:

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

5 years agoREGRESSION (r188820): fast/dom/HTMLObjectElement/object-as-frame.html is flaky.
ap@apple.com [Thu, 27 Aug 2015 18:35:49 +0000 (18:35 +0000)]
REGRESSION (r188820): fast/dom/HTMLObjectElement/object-as-frame.html is flaky.
https://bugs.webkit.org/show_bug.cgi?id=148533

* TestExpectations: Marking is as such.

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

5 years ago[Win] Mark some test failures.
bfulgham@apple.com [Thu, 27 Aug 2015 18:32:53 +0000 (18:32 +0000)]
[Win] Mark some test failures.

* platform/win/TestExpectations: Mark some test failures. Images are black instead
of showing the correct output.

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

5 years ago[Win] Test gardening.
bfulgham@apple.com [Thu, 27 Aug 2015 18:26:07 +0000 (18:26 +0000)]
[Win] Test gardening.

Remove failure case for recent progression.

* platform/win/sputnik/Conformance/11_Expressions/11.5_Multiplicative_Operators/11.5.3_Percent: Removed.
* platform/win/sputnik/Conformance/11_Expressions/11.5_Multiplicative_Operators/11.5.3_Percent/S11.5.3_A4_T6-expected.txt: Removed.

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

5 years ago[Cocoa] Generic font families do not consult with the user's preferred language
mmaxfield@apple.com [Thu, 27 Aug 2015 18:09:20 +0000 (18:09 +0000)]
[Cocoa] Generic font families do not consult with the user's preferred language
https://bugs.webkit.org/show_bug.cgi?id=148499
<rdar://problem/22407296>

Reviewed by Antti Koivisto.

Source/WebCore:

When WebKit encounters markup like lang="zh" style="font-family: sans-serif;"
we currently always use Simplified Chinese fonts. However, the user may
have specifically selected Traditional Chinese in their user preferences.
In this absence of other signals, we should consult with the user
preferences when determining which font to pick.

Tests: fast/text/international/generic-font-family-language-simplified.html
       fast/text/international/generic-font-family-language-traditional.html

* platform/Language.cpp:
(WebCore::observerMap):
(WebCore::overrideUserPreferredLanguages):
* platform/graphics/FontGenericFamilies.cpp:
(WebCore::computeUserPrefersSimplified):
(WebCore::cachedUserPrefersSimplified):
(WebCore::languageChanged):
(WebCore::genericFontFamilyForScript):
(WebCore::FontGenericFamilies::FontGenericFamilies):
* platform/text/LocaleToScriptMappingDefault.cpp:
(WebCore::scriptNameToCode):

LayoutTests:

Mock the user's font preferences.

* fast/text/international/font-fallback-to-common-script.html:
* fast/text/international/generic-font-family-language-simplified-expected.html: Added.
* fast/text/international/generic-font-family-language-simplified.html: Added.
* fast/text/international/generic-font-family-language-traditional-expected.html: Added.
* fast/text/international/generic-font-family-language-traditional.html: Added.
* fast/text/international/lang-sensitive-fonts-xml.xhtml:
* fast/text/international/lang-sensitive-fonts.html:
* fast/text/international/locale-sensitive-fonts.html:

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

5 years agoUpdate Grid Layout to use fewer magic -1s
mmaxfield@apple.com [Thu, 27 Aug 2015 18:03:43 +0000 (18:03 +0000)]
Update Grid Layout to use fewer magic -1s
https://bugs.webkit.org/show_bug.cgi?id=148505

Reviewed by Javier Fernandez.

After r188873, there were still some -1s left in Grid Layout code. This patch cleans them
up after consulting with Javier Fernandez.

No new tests because there is no behavior change.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::containingBlockLogicalWidthForContent):
(WebCore::RenderBox::containingBlockLogicalHeightForContent):
(WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):

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

5 years agoBuild fix after r188982
achristensen@apple.com [Thu, 27 Aug 2015 17:51:42 +0000 (17:51 +0000)]
Build fix after r188982

* MiniBrowser/win/CMakeLists.txt:
The directory structure changed in the move.

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

5 years agoWeb Inspector: FrontendChannel should know its own connection type
bburg@apple.com [Thu, 27 Aug 2015 17:42:45 +0000 (17:42 +0000)]
Web Inspector: FrontendChannel should know its own connection type
https://bugs.webkit.org/show_bug.cgi?id=148482

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

* inspector/InspectorFrontendChannel.h: Add connectionType().
* inspector/remote/RemoteInspectorDebuggableConnection.h:

Source/WebCore:

To prepare for multiple attached frontends, the frontend connection should
be able to report its type rather than explicitly setting connection type
via a getter.

No behavior change, no new tests.

* inspector/InspectorController.cpp:
(WebCore::InspectorController::hasLocalFrontend): Ask the channel what it is.
(WebCore::InspectorController::hasRemoteFrontend): Ask the channel what it is.
(WebCore::InspectorController::connectFrontend): Use hasRemoteFrotend().
(WebCore::InspectorController::disconnectFrontend): Use hasRemoteFrontend().
(WebCore::InspectorController::InspectorController): Deleted.
* inspector/InspectorController.h: Initialize a few members here.
(WebCore::InspectorController::hasFrontend): Deleted, it was unused.
(WebCore::InspectorController::setHasRemoteFrontend): Deleted.
* inspector/WorkerInspectorController.cpp:
* page/PageDebuggable.cpp:
(WebCore::PageDebuggable::connect):
(WebCore::PageDebuggable::disconnect):
* testing/Internals.cpp: Add connectionType().

Source/WebKit/mac:

* WebCoreSupport/WebInspectorClient.h: add connectionType().

Source/WebKit/win:

* WebCoreSupport/WebInspectorClient.h: add connectionType().

Source/WebKit2:

* WebProcess/WebPage/WebInspector.h: add connectionType().

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

5 years agoDefine legacy main thread calling functions for iOS as well
andersca@apple.com [Thu, 27 Aug 2015 17:40:56 +0000 (17:40 +0000)]
Define legacy main thread calling functions for iOS as well
https://bugs.webkit.org/show_bug.cgi?id=148530

Reviewed by Tim Horton.

* wtf/mac/DeprecatedSymbolsUsedBySafari.mm:

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

5 years agoWeb Inspector: Standardize on CSSStyleSheet.Type enum and move more protocol enum...
commit-queue@webkit.org [Thu, 27 Aug 2015 17:37:22 +0000 (17:37 +0000)]
Web Inspector: Standardize on CSSStyleSheet.Type enum and move more protocol enum conversion to the manager
https://bugs.webkit.org/show_bug.cgi?id=148515

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-08-27
Reviewed by Brian Burg.

Source/WebInspectorUI:

* UserInterface/Controllers/CSSStyleManager.js:
(WebInspector.CSSStyleManager.protocolStyleSheetOriginToEnum):
(WebInspector.CSSStyleManager.protocolMediaSourceToEnum):
Protocol enum to frontend enum conversion.

* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle):
(WebInspector.DOMNodeStyles.prototype.refresh):
(WebInspector.DOMNodeStyles.prototype._parseRulePayload):
(WebInspector.DOMNodeStyles.prototype._collectStylesInCascadeOrder):
Use the manager to convert from a protocol payload enum to frontend num for css types.

* UserInterface/Models/CSSRule.js:
(WebInspector.CSSRule.prototype.get editable):
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection):
(WebInspector.CSSStyleDeclarationSection.prototype.refresh):
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.refresh.appendStyleSection):
(WebInspector.RulesStyleDetailsPanel.prototype.refresh):
* UserInterface/Views/VisualStyleSelectorSection.js:
(WebInspector.VisualStyleSelectorSection.prototype.update.createSelectorItem):
(WebInspector.VisualStyleSelectorSection.prototype.update.uniqueOrderedRules.set return):
(WebInspector.VisualStyleSelectorSection.prototype.update.uniqueOrderedRules):
(WebInspector.VisualStyleSelectorSection.prototype.update):
* UserInterface/Views/VisualStyleSelectorTreeItem.js:
(WebInspector.VisualStyleSelectorTreeItem):
Update enum use.

LayoutTests:

* inspector/css/matched-style-properties.html:
* inspector/css/pseudo-element-matches.html:
* inspector/css/selector-dynamic-specificity.html:
* inspector/css/selector-specificity.html:
* inspector/css/stylesheet-with-mutations.html:

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

5 years agoMedia Session: MediaSession constructor 'kind' argument optional
eric.carlson@apple.com [Thu, 27 Aug 2015 17:33:48 +0000 (17:33 +0000)]
Media Session: MediaSession constructor 'kind' argument optional
https://bugs.webkit.org/show_bug.cgi?id=148527

Reviewed by Jer Noble.

Source/WebCore:

No new tests, updated media/session/session-creation.html.

* Modules/mediasession/MediaSession.cpp:
(WebCore::MediaSession::parseKind): Treat null kind "content".
(WebCore::MediaSession::MediaSession): Delete Document* version.
* Modules/mediasession/MediaSession.h: Make constructor private.
* Modules/mediasession/MediaSession.idl:

* WebCore.xcodeproj/project.pbxproj: Add JSMediaSessionCustom.cpp.

* bindings/js/JSMediaSessionCustom.cpp: Added.
(WebCore::constructJSMediaSession):

* dom/Document.cpp:
(WebCore::Document::defaultMediaSession): Call MediaSession::create.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::session): Compare session with document.defaultMediaSession, not
  its kind.
(WebCore::HTMLMediaElement::setSession): Update comments.

LayoutTests:

* media/session/content-interruptions.html: Restructure to make less timing dependent. Minor cleanup.
* media/session/session-creation-expected.txt:
* media/session/session-creation.html: Test default MediaSession constructor argument.

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

5 years agoSimple line layout: Use float types wherever possible to match line tree.
zalan@apple.com [Thu, 27 Aug 2015 17:23:26 +0000 (17:23 +0000)]
Simple line layout: Use float types wherever possible to match line tree.
https://bugs.webkit.org/show_bug.cgi?id=148444

Reviewed by Antti Koivisto.

To match inline tree output, we should try to match the data types as far as precision goes.

This patch also fixes the confusing mismatch between Run::baseline().x() and Run::rect().x().
They are both supposed to return the left edge of the run. However Run::rect().x() returns a rounded
LayoutUnit of the logical left, while Run::baseline().x() returns the correct logical left.
With this patch
  1. baseline position does not include logical left anymore.
  2. Run::rect().x() does not round the logical left coordinate anymore.

* rendering/RenderTreeAsText.cpp:
(WebCore::writeSimpleLine):
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintFlow):
(WebCore::SimpleLineLayout::collectFlowOverflow):
(WebCore::SimpleLineLayout::collectAbsoluteRects):
(WebCore::SimpleLineLayout::showLineLayoutForFlow):
* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::linePosition):
(WebCore::SimpleLineLayout::lineSize):
(WebCore::SimpleLineLayout::RunResolver::Run::rect):
(WebCore::SimpleLineLayout::LineResolver::Iterator::operator*):
(WebCore::SimpleLineLayout::baselinePosition): Deleted.
(WebCore::SimpleLineLayout::RunResolver::Run::baseline): Deleted.
* rendering/SimpleLineLayoutResolver.h:
(WebCore::SimpleLineLayout::RunResolver::Run::baselinePosition):
(WebCore::SimpleLineLayout::RunResolver::Run::computeBaselinePosition):

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

5 years agoAdd an expectation for another momentum scrolling test that became flaky.
ap@apple.com [Thu, 27 Aug 2015 16:59:31 +0000 (16:59 +0000)]
Add an expectation for another momentum scrolling test that became flaky.

* platform/mac-wk2/TestExpectations:

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

5 years ago[EFL] REGRESSION(r188793): It made 200 layout tests and Bindings/event-target-wrapper...
ossy@webkit.org [Thu, 27 Aug 2015 16:33:43 +0000 (16:33 +0000)]
[EFL] REGRESSION(r188793): It made 200 layout tests and Bindings/event-target-wrapper.html performance test fail
https://bugs.webkit.org/show_bug.cgi?id=148470

Unreviewed gardening, skip the hanging test to make the performance bot work.

* Skipped:

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

5 years agoSubpixel positioned iframe's repaint area calculation problem.
zalan@apple.com [Thu, 27 Aug 2015 15:48:33 +0000 (15:48 +0000)]
Subpixel positioned iframe's repaint area calculation problem.
https://bugs.webkit.org/show_bug.cgi?id=148422

When the repaint rect position is floored for iframes, we need
to expand the size so that it still covers the content.

Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/repaint/content-inside-subpixel-positioned-iframe.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeRectForRepaint):

LayoutTests:

* fast/repaint/content-inside-subpixel-positioned-iframe-expected.txt: Added.
* fast/repaint/content-inside-subpixel-positioned-iframe.html: Copied from LayoutTests/fast/repaint/hidpi-content-inside-iframe-leaves-trails.html.
* fast/repaint/hidpi-content-inside-iframe-leaves-trails.html:

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

5 years ago[GTK] Unreviewed, install-dependencies should install geoclue2 on Fedora
mcatanzaro@igalia.com [Thu, 27 Aug 2015 15:35:12 +0000 (15:35 +0000)]
[GTK] Unreviewed, install-dependencies should install geoclue2 on Fedora

geoclue-devel is for obsolete geoclue. Install geoclue2-devel instead.

* gtk/install-dependencies:

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

5 years agoAdd some new emoji with modifiers and new sequence.
enrica@apple.com [Thu, 27 Aug 2015 15:15:40 +0000 (15:15 +0000)]
Add some new emoji with modifiers and new sequence.
https://bugs.webkit.org/show_bug.cgi?id=148202
rdar://problem/21849857

Reviewed by Sam Weinig.

Source/WebCore:

Adding support for some new emoji with modifiers and
one new emoji sequence.

* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::characterRangeCodePath):
* platform/text/CharacterProperties.h:
(WebCore::isEmojiGroupCandidate):
(WebCore::isEmojiModifier):
* platform/text/TextBreakIterator.cpp:
(WebCore::cursorMovementIterator):

LayoutTests:

Updated test to reflect the changes.

* editing/deleting/delete-emoji-expected.txt:
* editing/deleting/delete-emoji.html:

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

5 years agoInitial infrastructure of media controls testing
dino@apple.com [Thu, 27 Aug 2015 14:46:08 +0000 (14:46 +0000)]
Initial infrastructure of media controls testing
https://bugs.webkit.org/show_bug.cgi?id=148426
<rdar://problem/22417286>

Reviewed by Eric Carlson.

Source/WebCore:

Expose a JS API from Internals that allows a layout test
to ask the controls instance what it thinks it is
doing.

Test: media/controls/basic.html

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.getCurrentControlsStatus): New method. Currently
returns a simple JSON string.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::getCurrentMediaControlsStatus): Call into
the controls instance.
* html/HTMLMediaElement.h:
* testing/Internals.cpp:
(WebCore::Internals::getCurrentMediaControlsStatusForElement): Link
between the Internals API and the HTMLMediaElement.
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

Very simple test that calls into the status object
of the media controls instance.

* media/controls/basic-expected.txt: Added.
* media/controls/basic.html: Added.

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

5 years agoAdd a Layout test for r188991
wenson_hsieh@apple.com [Thu, 27 Aug 2015 14:26:20 +0000 (14:26 +0000)]
Add a Layout test for r188991
https://bugs.webkit.org/show_bug.cgi?id=148507

Reviewed by Tim Horton.

Tests that stopping an animation early and closing the window does
not crash the process. This is a retrospective test added for
https://bugs.webkit.org/show_bug.cgi?id=148442, "Fix crash due to
animationDidEnd called on deallocated RemoteLayerTreeHost."

* animations/crash-on-removing-animation.html: Added.
* animations/crash-on-removing-animation-expected.txt: Added.

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

5 years agoUnreviewed. Mark WTF_WordLock.ContendedShortSection as slow too.
carlosgc@webkit.org [Thu, 27 Aug 2015 10:26:47 +0000 (10:26 +0000)]
Unreviewed. Mark WTF_WordLock.ContendedShortSection as slow too.

* Scripts/run-gtk-tests:
(TestRunner):

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

5 years ago[EFL] Move RenderThemeEfl.cpp|h from WebCore/platform/efl to WebCore/rendering
gyuyoung.kim@webkit.org [Thu, 27 Aug 2015 09:59:37 +0000 (09:59 +0000)]
[EFL] Move RenderThemeEfl.cpp|h from WebCore/platform/efl to WebCore/rendering
https://bugs.webkit.org/show_bug.cgi?id=148511

Reviewed by Csaba Osztrogonác.

To be aligned with other ports, move RenderThemeEfl.cpp|h to WebCore/rendering.

Additionally this patch fixes style errors in RenderThemeEfl.cpp

* PlatformEfl.cmake:
* rendering/RenderThemeEfl.cpp: Renamed from Source/WebCore/platform/efl/RenderThemeEfl.cpp.
(WebCore::toEdjeGroup):
(WebCore::setSourceGroupForEdjeObject):
(WebCore::RenderThemeEfl::adjustSizeConstraints):
(WebCore::isFormElementTooLargeToDisplay):
(WebCore::RenderThemeEfl::ThemePartCacheEntry::create):
(WebCore::RenderThemeEfl::ThemePartCacheEntry::reuse):
(WebCore::RenderThemeEfl::getThemePartFromCache):
(WebCore::RenderThemeEfl::clearThemePartCache):
(WebCore::RenderThemeEfl::applyEdjeStateFromForm):
(WebCore::RenderThemeEfl::applyEdjeRTLState):
(WebCore::RenderThemeEfl::isControlStyled):
(WebCore::RenderThemeEfl::paintThemePart):
(WebCore::RenderThemeEfl::create):
(WebCore::RenderTheme::themeForPage):
(WebCore::applyColorCallback):
(WebCore::fillColorsFromEdjeClass):
(WebCore::RenderThemeEfl::setColorFromThemeClass):
(WebCore::RenderThemeEfl::setThemePath):
(WebCore::RenderThemeEfl::themePath):
(WebCore::RenderThemeEfl::loadTheme):
(WebCore::RenderThemeEfl::applyPartDescriptionFallback):
(WebCore::RenderThemeEfl::applyPartDescription):
(WebCore::RenderThemeEfl::applyPartDescriptionsFrom):
(WebCore::RenderThemeEfl::RenderThemeEfl):
(WebCore::RenderThemeEfl::~RenderThemeEfl):
(WebCore::supportsFocus):
(WebCore::RenderThemeEfl::supportsFocusRing):
(WebCore::RenderThemeEfl::controlSupportsTints):
(WebCore::RenderThemeEfl::baselinePosition):
(WebCore::RenderThemeEfl::platformActiveSelectionBackgroundColor):
(WebCore::RenderThemeEfl::platformInactiveSelectionBackgroundColor):
(WebCore::RenderThemeEfl::platformActiveSelectionForegroundColor):
(WebCore::RenderThemeEfl::platformInactiveSelectionForegroundColor):
(WebCore::RenderThemeEfl::platformFocusRingColor):
(WebCore::RenderThemeEfl::supportsSelectionForegroundColors):
(WebCore::RenderThemeEfl::paintSliderTrack):
(WebCore::RenderThemeEfl::adjustSliderTrackStyle):
(WebCore::RenderThemeEfl::adjustSliderThumbStyle):
(WebCore::RenderThemeEfl::adjustSliderThumbSize):
(WebCore::RenderThemeEfl::sliderTickSize):
(WebCore::RenderThemeEfl::sliderTickOffsetFromTrackCenter):
(WebCore::RenderThemeEfl::sliderTickSnappingThreshold):
(WebCore::RenderThemeEfl::supportsDataListUI):
(WebCore::RenderThemeEfl::paintSliderThumb):
(WebCore::RenderThemeEfl::adjustCheckboxStyle):
(WebCore::RenderThemeEfl::paintCheckbox):
(WebCore::RenderThemeEfl::adjustRadioStyle):
(WebCore::RenderThemeEfl::paintRadio):
(WebCore::RenderThemeEfl::adjustButtonStyle):
(WebCore::RenderThemeEfl::paintButton):
(WebCore::RenderThemeEfl::adjustMenuListStyle):
(WebCore::RenderThemeEfl::paintMenuList):
(WebCore::RenderThemeEfl::adjustMenuListButtonStyle):
(WebCore::RenderThemeEfl::paintMenuListButtonDecorations):
(WebCore::RenderThemeEfl::adjustTextFieldStyle):
(WebCore::RenderThemeEfl::paintTextField):
(WebCore::RenderThemeEfl::adjustTextAreaStyle):
(WebCore::RenderThemeEfl::paintTextArea):
(WebCore::RenderThemeEfl::adjustSearchFieldResultsButtonStyle):
(WebCore::RenderThemeEfl::paintSearchFieldResultsButton):
(WebCore::RenderThemeEfl::adjustSearchFieldResultsDecorationPartStyle):
(WebCore::RenderThemeEfl::paintSearchFieldResultsDecorationPart):
(WebCore::RenderThemeEfl::adjustSearchFieldCancelButtonStyle):
(WebCore::RenderThemeEfl::paintSearchFieldCancelButton):
(WebCore::RenderThemeEfl::adjustSearchFieldStyle):
(WebCore::RenderThemeEfl::paintSearchField):
(WebCore::RenderThemeEfl::adjustInnerSpinButtonStyle):
(WebCore::RenderThemeEfl::paintInnerSpinButton):
(WebCore::RenderThemeEfl::setDefaultFontSize):
(WebCore::RenderThemeEfl::updateCachedSystemFontDescription):
(WebCore::RenderThemeEfl::adjustProgressBarStyle):
(WebCore::RenderThemeEfl::animationRepeatIntervalForProgressBar):
(WebCore::RenderThemeEfl::animationDurationForProgressBar):
(WebCore::RenderThemeEfl::paintProgressBar):
(WebCore::RenderThemeEfl::mediaControlsStyleSheet):
(WebCore::RenderThemeEfl::mediaControlsScript):
* rendering/RenderThemeEfl.h: Renamed from Source/WebCore/platform/efl/RenderThemeEfl.h.

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

5 years ago[EFL] REGRESSION: userscripts tests crash
ossy@webkit.org [Thu, 27 Aug 2015 09:46:26 +0000 (09:46 +0000)]
[EFL] REGRESSION: userscripts tests crash
https://bugs.webkit.org/show_bug.cgi?id=148519

Unreviewed gardening, skip failing tests to make the bot work again.

* platform/efl/TestExpectations:

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

5 years ago[EFL] REGRESSION: fullscreen tests fail with timeout
ossy@webkit.org [Thu, 27 Aug 2015 09:41:57 +0000 (09:41 +0000)]
[EFL] REGRESSION: fullscreen tests fail with timeout
https://bugs.webkit.org/show_bug.cgi?id=148518

Unreviewed gardening, skip failing tests to make the bot work again.

* platform/efl/TestExpectations:

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

5 years agoFix GTK+ WTR crashes in initializeMainRunLoop()
carlosgc@webkit.org [Thu, 27 Aug 2015 09:37:12 +0000 (09:37 +0000)]
Fix GTK+ WTR crashes in initializeMainRunLoop()

Rubber-stamped by Žan Doberšek.

Initialize threading and main thread before
RunLoop::initializeMainRunLoop(), since the GLib implementation of
the RunLoop uses isMainThread() to decide whether to create a new
GMainContext or use the default one. Also use RunLoop::run() and
::stop() instead of gtk_main/quit.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::initialize):
* WebKitTestRunner/gtk/TestControllerGtk.cpp:
(WTR::TestController::notifyDone):
(WTR::TestController::platformRunUntil):

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

5 years ago[EFL] REGRESSION: 50+ layout tests crash
ossy@webkit.org [Thu, 27 Aug 2015 09:16:01 +0000 (09:16 +0000)]
[EFL] REGRESSION: 50+ layout tests crash
https://bugs.webkit.org/show_bug.cgi?id=148471

Reviewed by Gyuyoung Kim.

* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::WebView):

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

5 years agoFix WKMutableArray creations in WKUserMediaPermissionRequest
zandobersek@gmail.com [Thu, 27 Aug 2015 07:59:43 +0000 (07:59 +0000)]
Fix WKMutableArray creations in WKUserMediaPermissionRequest
https://bugs.webkit.org/show_bug.cgi?id=148489

Reviewed by Carlos Garcia Campos.

Call WKMutableArrayCreate() to create the WKMutableArray objects.
WKMutableArrayRef type is a pointer, so calling 'WKMutableArrayRef()'
just sets a null value to the variable that is then returned and
queried for size in WebKitTestRunner's TestController, resulting
in a crash.

* UIProcess/API/C/WKUserMediaPermissionRequest.cpp:
(WKUserMediaPermissionRequestDeviceNamesVideo):
(WKUserMediaPermissionRequestDeviceNamesAudio):

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

5 years agoUnreviewed, further shorten a test that times out because it's very long
fpizlo@apple.com [Thu, 27 Aug 2015 07:23:29 +0000 (07:23 +0000)]
Unreviewed, further shorten a test that times out because it's very long
running.

I've locally run these tests on repeat for 24 hours and found no genuine
failures, like deadlocks. So, the timeouts are probably because the test
machine is slow and debug is slow. We should just run this test for fewer
iterations.

* TestWebKitAPI/Tests/WTF/Lock.cpp:
(TestWebKitAPI::TEST):

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

5 years agoNode::origin should always be set, and the dead zone due to SSA Phis can just use...
fpizlo@apple.com [Thu, 27 Aug 2015 07:16:07 +0000 (07:16 +0000)]
Node::origin should always be set, and the dead zone due to SSA Phis can just use exitOK=false
https://bugs.webkit.org/show_bug.cgi?id=148462

Reviewed by Saam Barati.

The need to label nodes that absolutely cannot exit was first observed when we introduced SSA form.
We indicated this by not setting the CodeOrigin.

But just recently (http://trac.webkit.org/changeset/188979), we added a more comprehensive "exitOK"
bit in NodeOrigin. After that change, there were two ways of indicating that you cannot exit:
!exitOK and an unset NodeOrigin. An unset NodeOrigin implied !exitOK.

Now, this change is about removing the old way so that we only use !exitOK. From now on, all nodes
must have their NodeOrigin set, and the IR validation will check this. This means that I could
remove various pieces of cruft for dealing with unset NodeOrigins, but I did have to add some new
cruft to ensure that all nodes we create have a NodeOrigin.

This change simplifies our IR by having a simpler rule about when NodeOrigin is set: it's always
set.

* dfg/DFGBasicBlock.cpp:
(JSC::DFG::BasicBlock::isInBlock):
(JSC::DFG::BasicBlock::removePredecessor):
(JSC::DFG::BasicBlock::firstOriginNode): Deleted.
(JSC::DFG::BasicBlock::firstOrigin): Deleted.
* dfg/DFGBasicBlock.h:
(JSC::DFG::BasicBlock::begin):
(JSC::DFG::BasicBlock::end):
(JSC::DFG::BasicBlock::numSuccessors):
(JSC::DFG::BasicBlock::successor):
* dfg/DFGCombinedLiveness.cpp:
(JSC::DFG::liveNodesAtHead):
* dfg/DFGConstantHoistingPhase.cpp:
* dfg/DFGCriticalEdgeBreakingPhase.cpp:
(JSC::DFG::CriticalEdgeBreakingPhase::breakCriticalEdge):
* dfg/DFGForAllKills.h:
(JSC::DFG::forAllKilledOperands):
* dfg/DFGIntegerRangeOptimizationPhase.cpp:
* dfg/DFGLoopPreHeaderCreationPhase.cpp:
(JSC::DFG::createPreHeader):
(JSC::DFG::LoopPreHeaderCreationPhase::run):
* dfg/DFGOSRAvailabilityAnalysisPhase.cpp:
(JSC::DFG::OSRAvailabilityAnalysisPhase::run):
* dfg/DFGObjectAllocationSinkingPhase.cpp:
* dfg/DFGPutStackSinkingPhase.cpp:
* dfg/DFGSSAConversionPhase.cpp:
(JSC::DFG::SSAConversionPhase::run):
* dfg/DFGValidate.cpp:
(JSC::DFG::Validate::validate):
(JSC::DFG::Validate::validateSSA):

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

5 years agoMarkedBlock::allocateBlock will have the wrong allocation size when (sizeof(MarkedBlo...
saambarati1@gmail.com [Thu, 27 Aug 2015 05:54:21 +0000 (05:54 +0000)]
MarkedBlock::allocateBlock will have the wrong allocation size when (sizeof(MarkedBlock) + bytes) is divisible by WTF::pageSize()
https://bugs.webkit.org/show_bug.cgi?id=148500

Reviewed by Mark Lam.

Consider the following scenario:
- On OS X, WTF::pageSize() is 4*1024 bytes.
- JSEnvironmentRecord::allocationSizeForScopeSize(6621) == 53000
- sizeof(MarkedBlock) == 248
- (248 + 53000) is a multiple of 4*1024.
- (248 + 53000)/(4*1024) == 13

We will allocate a chunk of memory of size 53248 bytes that looks like this:
0            248       256                       53248       53256
[Marked Block | 8 bytes |  payload     ......      ]  8 bytes  |
                        ^                                      ^
                   Our Environment record starts here.         ^
                                                               ^
                                                         Our last JSValue in the environment record will go from byte 53248 to 53256. But, we don't own this memory.

We need to ensure that we round up sizeof(MarkedBlock) to an
atomSize boundary. We need to do this because the first atom
inside the MarkedBlock will start at the rounded up multiple
of atomSize past MarkedBlock. If we end up with an allocation
that is perfectly aligned to the page size, then we will be short
8 bytes (in the current implementation where atomSize is 16 bytes,
and MarkedBlock is 248 bytes).

* heap/MarkedAllocator.cpp:
(JSC::MarkedAllocator::allocateBlock):
* tests/stress/heap-allocator-allocates-incorrect-size-for-activation.js: Added.
(use):
(makeFunction):

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

5 years agoWeb Inspector: [Regression] [Mavericks]: Undocked Web Inspector toolbar is two differ...
nvasilyev@apple.com [Thu, 27 Aug 2015 04:40:50 +0000 (04:40 +0000)]
Web Inspector: [Regression] [Mavericks]: Undocked Web Inspector toolbar is two different colors and has extra space
https://bugs.webkit.org/show_bug.cgi?id=148510

Make body element transparent and remove extra padding above the toolbar only for OS X Mavericks.

Reviewed by Timothy Hatcher.

* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
* UserInterface/Views/Main.css:
(body:not(.mavericks)):
(body): Deleted.
* UserInterface/Views/Toolbar.css:
(body:not(.mavericks) .toolbar):
(body.window-inactive:not(.mavericks) .toolbar):
(body.mac-platform:not(.docked, .mavericks) .toolbar):
(.toolbar): Deleted.
(body.window-inactive .toolbar): Deleted.
(body.mac-platform:not(.docked) .toolbar): Deleted.

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

5 years ago[ThreadedCompositor] Use WTF::Condition together with WTF::Lock
commit-queue@webkit.org [Thu, 27 Aug 2015 03:32:12 +0000 (03:32 +0000)]
[ThreadedCompositor] Use WTF::Condition together with WTF::Lock
https://bugs.webkit.org/show_bug.cgi?id=148493

Patch by Emanuele Aina <emanuele.aina@collabora.com> on 2015-08-26
Reviewed by Gyuyoung Kim.

* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
Replace ThreadCondition::signal() calls with Condition::notifyOne().
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
Replace ThreadCondition usage with Condition.

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

5 years agowatchdog m_didFire state erroneously retained.
mark.lam@apple.com [Thu, 27 Aug 2015 02:49:52 +0000 (02:49 +0000)]
watchdog m_didFire state erroneously retained.
https://bugs.webkit.org/show_bug.cgi?id=131082

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

The watchdog can fire for 2 reasons:
1. an external controlling entity (i.e. another thread) has scheduled termination
   of the script thread via watchdog::terminateSoon().
2. the allowed CPU time has expired.

For case 1, we're doing away with the m_didFire flag.  Watchdog::terminateSoon()
will set the timer deadlines and m_timeLimit to 0, and m_timerDidFire to true.
This will get the script thread to check Watchdog::didFire() and terminate
execution.

Note: the watchdog only guarantees that script execution will terminate as soon
as possible due to a time limit of 0.  Once we've exited the VM, the client of the
VM is responsible from keeping a flag to prevent new script execution.

In a race condition, if terminateSoon() is called just after execution has gotten
past the client's reentry check and the client is in the process of re-entering,
the worst that can happen is that we will schedule the watchdog timer to fire
after a period of 0.  This will terminate script execution quickly, and thereafter
the client's check should be able to prevent further entry into the VM.

The correctness (i.e. has no race condition) of this type of termination relies
on the termination state being sticky.  Once the script thread is terminated this
way, the VM will continue to terminate scripts quickly until the client sets the
time limit to a non-zero value (or clears it which sets the time limit to
noTimeLimit).

For case 2, the watchdog does not alter m_timeLimit.  If the CPU deadline has
been reached, the script thread will terminate execution and exit the VM.

If the client of the VM starts new script execution, the watchdog will allow
execution for the specified m_timeLimit.  In this case, since m_timeLimit is not
0, the script gets a fresh allowance of CPU time to execute.  Hence, terminations
due to watchdog time outs are no longer sticky.

* API/JSContextRef.cpp:
(JSContextGroupSetExecutionTimeLimit):
(JSContextGroupClearExecutionTimeLimit):
* API/tests/ExecutionTimeLimitTest.cpp:
- Add test scenarios to verify that the watchdog is automatically reset by the VM
  upon throwing the TerminatedExecutionException.

(testResetAfterTimeout):
(testExecutionTimeLimit):
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_loop_hint):
(JSC::JIT::emitSlow_op_loop_hint):
* jit/JITOperations.cpp:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/VM.cpp:
(JSC::VM::VM):
(JSC::VM::ensureWatchdog):
* runtime/VM.h:
* runtime/VMInlines.h: Added.
(JSC::VM::shouldTriggerTermination):
* runtime/Watchdog.cpp:
(JSC::Watchdog::Watchdog):
(JSC::Watchdog::setTimeLimit):
(JSC::Watchdog::terminateSoon):
(JSC::Watchdog::didFireSlow):
(JSC::Watchdog::hasTimeLimit):
(JSC::Watchdog::enteredVM):
(JSC::Watchdog::exitedVM):
(JSC::Watchdog::startTimer):
(JSC::Watchdog::stopTimer):
(JSC::Watchdog::hasStartedTimer): Deleted.
(JSC::Watchdog::fire): Deleted.
* runtime/Watchdog.h:
(JSC::Watchdog::didFire):
(JSC::Watchdog::timerDidFireAddress):

Source/WebCore:

No new tests.  The new code is covered by the JSC API tests and an existing test:
fast/workers/worker-terminate-forever.html

* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::handleEvent):
* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::WorkerScriptController):
- Always create a watchdog for the Web Worker's VM.  We need this in order to support
  Worker.terminate().
(WebCore::WorkerScriptController::evaluate):
(WebCore::WorkerScriptController::scheduleExecutionTermination):
(WebCore::WorkerScriptController::isTerminatingExecution):
(WebCore::WorkerScriptController::forbidExecution):
(WebCore::WorkerScriptController::isExecutionTerminating): Deleted.
* bindings/js/WorkerScriptController.h:

LayoutTests:

* fast/workers/worker-terminate-forever-expected.txt:
* fast/workers/worker-terminate-forever.html:
- Updated to check if the worker actually did terminate.

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

5 years agoWeb Inspector: Uncaught exception in CSS Completion - TypeError: undefined is not...
commit-queue@webkit.org [Thu, 27 Aug 2015 01:28:06 +0000 (01:28 +0000)]
Web Inspector: Uncaught exception in CSS Completion - TypeError: undefined is not an object (evaluating 'this._values[middleIndex].startsWith')
https://bugs.webkit.org/show_bug.cgi?id=148508

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-08-26
Reviewed by Timothy Hatcher.

* UserInterface/Models/CSSCompletions.js:
(WebInspector.CSSCompletions):
Add a comment explaining that the constructor may be called with
a list of strings or a list of objects from the protocol. Add
a fast path for when this is constructed with a list of strings.

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

5 years agoUnreviewed build fix attempt on EFL
ryuan.choi@navercorp.com [Thu, 27 Aug 2015 01:10:45 +0000 (01:10 +0000)]
Unreviewed build fix attempt on EFL

* WebKitTestRunner/PlatformEfl.cmake:

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

5 years agoWeb Inspector: Rendering Frames timeline pie chart should use SVG instead of 2D canvas
mattbaker@apple.com [Thu, 27 Aug 2015 01:09:44 +0000 (01:09 +0000)]
Web Inspector: Rendering Frames timeline pie chart should use SVG instead of 2D canvas
https://bugs.webkit.org/show_bug.cgi?id=148457

Reviewed by Timothy Hatcher.

* UserInterface/Views/ChartDetailsSectionRow.css:
(.details-section > .content > .group > .row.chart > .chart-content > svg > path.hidden):
(.details-section > .content > .group > .row.chart > .chart-content > svg > path.chart-segment):
(.details-section > .content > .group > .row.chart > .chart-content > svg > path.empty-chart):
New styles for SVG chart elements.

* UserInterface/Views/ChartDetailsSectionRow.js:
(WebInspector.ChartDetailsSectionRow):
Calculate radii and create SVG chart elements.
(WebInspector.ChartDetailsSectionRow.prototype.clearItems):
Remove chart segment path elements.
(WebInspector.ChartDetailsSectionRow.prototype._needsLayout):
(WebInspector.ChartDetailsSectionRow.prototype._updateLayout.createSegmentPathData):
Helper function that creates path data for a single pie chart segment.
(WebInspector.ChartDetailsSectionRow.prototype._updateLayout):
Creates path elements as needed, and updates path data for for non-zero data points.
(WebInspector.ChartDetailsSectionRow.prototype.set innerLabel): Deleted.
(WebInspector.ChartDetailsSectionRow.prototype.set innerRadius): Deleted.
These properties are now set during construction.
(WebInspector.ChartDetailsSectionRow.prototype.updateLayout): Deleted.
Renamed to _updateLayout.

* UserInterface/Views/TimelineSidebarPanel.js:
Chart size and inner radius passed to chart constructor.

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