WebKit-https.git
4 years agoAdd support for callback interfaces using other callback names than "handleEvent"
cdumez@apple.com [Tue, 25 Aug 2015 17:04:47 +0000 (17:04 +0000)]
Add support for callback interfaces using other callback names than "handleEvent"
https://bugs.webkit.org/show_bug.cgi?id=148418

Reviewed by Ryosuke Niwa.

Add support for callback interfaces using other callback names than
"handleEvent" [1].

This is a pre-requirement for Bug 148415, as NodeFilter's callback
function name is "acceptNode":
- https://dom.spec.whatwg.org/#interface-nodefilter

[1] https://heycam.github.io/webidl/#es-user-objects

* bindings/js/JSCallbackData.cpp:
(WebCore::JSCallbackData::invokeCallback):
* bindings/js/JSCallbackData.h:
* bindings/js/JSCustomSQLStatementErrorCallback.cpp:
(WebCore::JSSQLStatementErrorCallback::handleEvent):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallbackImplementation):
* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallback::callbackWithNoParam):
(WebCore::JSTestCallback::callbackWithArrayParam):
(WebCore::JSTestCallback::callbackWithSerializedScriptValueParam):
(WebCore::JSTestCallback::callbackWithStringList):
(WebCore::JSTestCallback::callbackWithBoolean):
(WebCore::JSTestCallback::callbackRequiresThisToPass):

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

4 years agoRequire GCC version at least 4.9
ossy@webkit.org [Tue, 25 Aug 2015 17:02:34 +0000 (17:02 +0000)]
Require GCC version at least 4.9
https://bugs.webkit.org/show_bug.cgi?id=148430

Reviewed by Darin Adler.

* wtf/Compiler.h:

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

4 years agoGet rid of custom bindings for RequestAnimationFrameCallback.handleEvent()
cdumez@apple.com [Tue, 25 Aug 2015 10:11:14 +0000 (10:11 +0000)]
Get rid of custom bindings for RequestAnimationFrameCallback.handleEvent()
https://bugs.webkit.org/show_bug.cgi?id=148417

Reviewed by Sam Weinig.

Get rid of custom bindings for RequestAnimationFrameCallback.handleEvent()
by improving the bindings generator. In this case, the problem was that the
bindings generator did not know how to convert a double parameter into a
JSValue. The new code leverages the pre-existing NativeToJSValue subroutine
to do the conversion instead of duplicating complex support here.

* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSRequestAnimationFrameCallbackCustom.cpp: Removed.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallbackImplementation):
* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallback::callbackWithArrayParam):
(WebCore::JSTestCallback::callbackWithSerializedScriptValueParam):
(WebCore::JSTestCallback::callbackWithStringList):
(WebCore::JSTestCallback::callbackWithBoolean):
(WebCore::JSTestCallback::callbackRequiresThisToPass):
* dom/RequestAnimationFrameCallback.idl:

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

4 years agoAdd mp4 version of types-changing video.
saambarati1@gmail.com [Tue, 25 Aug 2015 05:31:49 +0000 (05:31 +0000)]
Add mp4 version of types-changing video.

* blog-files/type-profiler-and-code-coverage-profiler/types-changing.mp4: Added.

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

4 years ago[Win] Unreviewed test gardening.
bfulgham@apple.com [Tue, 25 Aug 2015 03:25:53 +0000 (03:25 +0000)]
[Win] Unreviewed test gardening.

Fix another case where the logging string is constructed using the variable 'frame',
but the method argument is not given a name. This causes the global 'frame' value to
be used, producing incorrect output.

* DumpRenderTree/win/FrameLoadDelegate.cpp:
(FrameLoadDelegate::didReceiveServerRedirectForProvisionalLoadForFrame): Use 'frame'
argument.

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

4 years agoClear cairo-gl surface for initialization
commit-queue@webkit.org [Tue, 25 Aug 2015 01:56:46 +0000 (01:56 +0000)]
Clear cairo-gl surface for initialization
https://bugs.webkit.org/show_bug.cgi?id=148307

Patch by Jinyoung Hur <hur.ims@navercorp.com> on 2015-08-24
Reviewed by Martin Robinson.

A cairo-gl surface that is created from an uninitialized texture, should be cleared before use.
A texture memory created by calling glTexImage2D with null data parameter, is uninitialized.
And cairo_gl_surface_create_for_texture doesn't clear the provided texture for initialization.
So it seems safe to clear the surface explicitly.

It is hard to verify this behavior change because the texture memory status is undefined. Undefined means
it can be either initialized or not, though mostly initialized in my experiences.

* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::clearSurface):
(WebCore::createCairoGLSurface):

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

4 years agoAX: Fix accessibility/mac/search-with-frames.html test
commit-queue@webkit.org [Tue, 25 Aug 2015 01:48:18 +0000 (01:48 +0000)]
AX: Fix accessibility/mac/search-with-frames.html test
https://bugs.webkit.org/show_bug.cgi?id=148313

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

Fixed the test by making sure that search is performed after all frames
have been loaded.

* accessibility/mac/search-with-frames.html:
* platform/mac/TestExpectations:

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

4 years agoUnreviewed, EFL and GTK build fix since r188895.
gyuyoung.kim@webkit.org [Tue, 25 Aug 2015 01:22:31 +0000 (01:22 +0000)]
Unreviewed, EFL and GTK build fix since r188895.

* CMakeLists.txt: Rename Rename VisitedLinkProvider to VisitedLinkStore.

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

4 years agoMarking more scroll-snap tests as flaky.
ap@apple.com [Tue, 25 Aug 2015 00:33:29 +0000 (00:33 +0000)]
Marking more scroll-snap tests as flaky.

* platform/mac-wk2/TestExpectations:

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

4 years agoRoll out r188827, because it didn't help.
ap@apple.com [Tue, 25 Aug 2015 00:22:59 +0000 (00:22 +0000)]
Roll out r188827, because it didn't help.

* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-borders.html:

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

4 years agoWeb Inspector: add protocol test for existing error handling performed by the backend
bburg@apple.com [Mon, 24 Aug 2015 23:58:31 +0000 (23:58 +0000)]
Web Inspector: add protocol test for existing error handling performed by the backend
https://bugs.webkit.org/show_bug.cgi?id=147097

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

A new test revealed that the protocol "method" parameter was being parsed in a naive way.
Rewrite it to use String::split and improve error checking to avoid failing later.

* inspector/InspectorBackendDispatcher.cpp:
(Inspector::BackendDispatcher::dispatch):

Source/WebInspectorUI:

Add a way to send raw messages to the backend while still awaiting on responses.
This is necessary to test protocol error handling in the inspector backend.

* UserInterface/Test/InspectorProtocol.js:
(InspectorProtocol.sendCommand):
(InspectorProtocol.awaitCommand): Use awaitMessage internally.
(InspectorProtocol.awaitMessage): Added. Use a dummy requestId if none is supplied.
(InspectorProtocol._sendMessage): Added.
(InspectorProtocol.dispatchMessageFromBackend):
Reject with the error object instead of the error message, so error code/data can be checked.
(InspectorProtocol.sendMessage): Deleted, it is now a private method.

LayoutTests:

Add a bunch of test cases to cover existing error handling by the backend dispatcher.

* inspector/protocol/backend-dispatcher-argument-errors-expected.txt: Added.
* inspector/protocol/backend-dispatcher-argument-errors.html: Added.
* inspector/protocol/backend-dispatcher-malformed-message-errors-expected.txt: Added.
* inspector/protocol/backend-dispatcher-malformed-message-errors.html: Added.

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

4 years agoMark flaky scrolling tests as such.
ap@apple.com [Mon, 24 Aug 2015 23:53:32 +0000 (23:53 +0000)]
Mark flaky scrolling tests as such.

* platform/mac-wk2/TestExpectations:

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

4 years agoRename VisitedLinkProvider to VisitedLinkStore
andersca@apple.com [Mon, 24 Aug 2015 23:51:01 +0000 (23:51 +0000)]
Rename VisitedLinkProvider to VisitedLinkStore
https://bugs.webkit.org/show_bug.cgi?id=148406

Reviewed by Tim Horton.

* DerivedSources.make:
* Shared/API/APIObject.h:
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
* UIProcess/API/APIPageConfiguration.cpp:
(API::PageConfiguration::copy):
(API::PageConfiguration::visitedLinkStore):
(API::PageConfiguration::setVisitedLinkStore):
(API::PageConfiguration::visitedLinkProvider): Deleted.
(API::PageConfiguration::setVisitedLinkProvider): Deleted.
* UIProcess/API/APIPageConfiguration.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextAddVisitedLink):
(WKContextClearVisitedLinks):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/_WKVisitedLinkStore.mm:
(-[_WKVisitedLinkStore init]):
(-[_WKVisitedLinkStore dealloc]):
(-[_WKVisitedLinkStore addVisitedLinkWithURL:]):
(-[_WKVisitedLinkStore removeAll]):
(-[_WKVisitedLinkStore _apiObject]):
* UIProcess/API/Cocoa/_WKVisitedLinkStoreInternal.h:
(WebKit::wrapper):
* UIProcess/VisitedLinkProvider.cpp:
(WebKit::generateIdentifier): Deleted.
(WebKit::VisitedLinkProvider::create): Deleted.
(WebKit::VisitedLinkProvider::~VisitedLinkProvider): Deleted.
(WebKit::VisitedLinkProvider::VisitedLinkProvider): Deleted.
(WebKit::VisitedLinkProvider::addProcess): Deleted.
(WebKit::VisitedLinkProvider::removeProcess): Deleted.
(WebKit::VisitedLinkProvider::addVisitedLinkHash): Deleted.
(WebKit::VisitedLinkProvider::removeAll): Deleted.
(WebKit::VisitedLinkProvider::webProcessWillOpenConnection): Deleted.
(WebKit::VisitedLinkProvider::webProcessDidCloseConnection): Deleted.
(WebKit::VisitedLinkProvider::addVisitedLinkHashFromPage): Deleted.
(WebKit::nextPowerOf2): Deleted.
(WebKit::tableSizeForKeyCount): Deleted.
(WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired): Deleted.
(WebKit::VisitedLinkProvider::resizeTable): Deleted.
(WebKit::VisitedLinkProvider::sendTable): Deleted.
* UIProcess/VisitedLinkStore.cpp: Renamed from Source/WebKit2/UIProcess/VisitedLinkProvider.cpp.
(WebKit::generateIdentifier):
(WebKit::VisitedLinkStore::create):
(WebKit::VisitedLinkStore::~VisitedLinkStore):
(WebKit::VisitedLinkStore::VisitedLinkStore):
(WebKit::VisitedLinkStore::addProcess):
(WebKit::VisitedLinkStore::removeProcess):
(WebKit::VisitedLinkStore::addVisitedLinkHash):
(WebKit::VisitedLinkStore::removeAll):
(WebKit::VisitedLinkStore::webProcessWillOpenConnection):
(WebKit::VisitedLinkStore::webProcessDidCloseConnection):
(WebKit::VisitedLinkStore::addVisitedLinkHashFromPage):
(WebKit::nextPowerOf2):
(WebKit::tableSizeForKeyCount):
(WebKit::VisitedLinkStore::pendingVisitedLinksTimerFired):
(WebKit::VisitedLinkStore::resizeTable):
(WebKit::VisitedLinkStore::sendTable):
* UIProcess/VisitedLinkStore.h: Renamed from Source/WebKit2/UIProcess/VisitedLinkProvider.h.
* UIProcess/VisitedLinkStore.messages.in: Renamed from Source/WebKit2/UIProcess/VisitedLinkProvider.messages.in.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::processDidFinishLaunching):
(WebKit::WebPageProxy::creationParameters):
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::WebProcessPool):
(WebKit::WebProcessPool::createWebPage):
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::shutDown):
(WebKit::WebProcessProxy::addVisitedLinkStore):
(WebKit::WebProcessProxy::didDestroyVisitedLinkStore):
(WebKit::WebProcessProxy::addVisitedLinkProvider): Deleted.
(WebKit::WebProcessProxy::didDestroyVisitedLinkProvider): Deleted.
* UIProcess/WebProcessProxy.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/VisitedLinkTableController.cpp:
(WebKit::VisitedLinkTableController::addVisitedLink):

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

4 years ago[ES6] Return JSInternalPromise as result of evaluateModule
utatane.tea@gmail.com [Mon, 24 Aug 2015 23:48:55 +0000 (23:48 +0000)]
[ES6] Return JSInternalPromise as result of evaluateModule
https://bugs.webkit.org/show_bug.cgi?id=148173

Reviewed by Saam Barati.

Now evaluateModule returns JSInternalPromise* as its result value.
When an error occurs while loading or executing the modules,
this promise is rejected by that error. By leveraging this, we implemented
asynchronous error reporting when executing the modules in JSC shell.

And this patch also changes the evaluateModule signature to accept the entry
point by the moduleName. By using it, JSC shell can start executing the modules
with the entry point module name.

* builtins/ModuleLoaderObject.js:
(loadModule):
* jsc.cpp:
(dumpException):
(runWithScripts):
* runtime/Completion.cpp:
(JSC::evaluateModule):
* runtime/Completion.h:
* runtime/JSInternalPromise.cpp:
(JSC::JSInternalPromise::then):
* runtime/JSInternalPromise.h:
* runtime/ModuleLoaderObject.cpp:
(JSC::ModuleLoaderObject::requestInstantiateAll):
(JSC::ModuleLoaderObject::loadModule):
(JSC::ModuleLoaderObject::resolve):
(JSC::ModuleLoaderObject::fetch):
(JSC::ModuleLoaderObject::translate):
(JSC::ModuleLoaderObject::instantiate):
(JSC::moduleLoaderObjectParseModule):
* runtime/ModuleLoaderObject.h:

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

4 years agoAX: Fix accessibility/mac/mathml-elements.html test
commit-queue@webkit.org [Mon, 24 Aug 2015 23:31:58 +0000 (23:31 +0000)]
AX: Fix accessibility/mac/mathml-elements.html test
https://bugs.webkit.org/show_bug.cgi?id=148393

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

Updated the test to match the structure changes of mfenced/mo operators in bug 124838.

* accessibility/mac/mathml-elements-expected.txt:
* accessibility/mac/mathml-elements.html:
* platform/mac/TestExpectations:

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

4 years ago(Finally...) get rid of WKViewIOS
timothy_horton@apple.com [Mon, 24 Aug 2015 23:11:25 +0000 (23:11 +0000)]
(Finally...) get rid of WKViewIOS
https://bugs.webkit.org/show_bug.cgi?id=148404

Reviewed by Anders Carlsson.

* UIProcess/API/Cocoa/WKView.h:
* UIProcess/API/ios/WKViewIOS.mm: Removed.
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::PageClientImpl): Deleted.
(WebKit::PageClientImpl::didRelaunchProcess): Deleted.
(WebKit::PageClientImpl::refView): Deleted.
(WebKit::PageClientImpl::derefView): Deleted.
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView initWithFrame:processPool:configuration:wkView:]): Deleted.
* WebKit2.xcodeproj/project.pbxproj:
Get rid of WKViewIOS and references to it.

* DatabaseProcess/ios/DatabaseProcessIOS.mm:
(WebKit::DatabaseProcess::initializeSandbox):
* NetworkProcess/ios/NetworkProcessIOS.mm:
(WebKit::NetworkProcess::initializeSandbox):
* Shared/Plugins/mac/PluginSandboxProfile.mm:
(WebKit::pluginSandboxProfileDirectory):
* Shared/ios/ChildProcessIOS.mm:
(WebKit::ChildProcess::initializeSandbox):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::initializeSandbox):
Look for WKWebView instead of WKView if we have it.

* TestWebKitAPI/Tests/CustomProtocolsSyncXHRTest.mm:
* TestWebKitAPI/Tests/WebKit2Cocoa/ContentFiltering.mm:
* TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsInvalidScheme.mm:
* TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsTest.mm:
* TestWebKitAPI/Tests/WebKit2ObjC/PreventImageLoadWithAutoResizing.mm:
* TestWebKitAPI/Tests/WebKit2ObjC/UserContentTest.mm:
* TestWebKitAPI/Tests/WebKit2ObjC/WKBrowsingContextGroupTest.mm:
* TestWebKitAPI/Tests/WebKit2ObjC/WKBrowsingContextLoadDelegateTest.mm:
* TestWebKitAPI/mac/TestBrowsingContextLoadDelegate.h:
* TestWebKitAPI/mac/TestBrowsingContextLoadDelegate.mm:
Mark tests that use WKBrowsingContextController as Mac-only.

* WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm:
(WTR::AccessibilityController::addNotificationListener):
* WebKitTestRunner/ios/mainIOS.mm:
(-[WebKitTestRunnerApp applicationDidEnterBackground:]):
Import UIKit instead of depending on WKView.h to do so.

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

4 years agoRename _WKVisitedLinkProvider to _WKVisitedLinkStore for consistency
andersca@apple.com [Mon, 24 Aug 2015 22:45:17 +0000 (22:45 +0000)]
Rename _WKVisitedLinkProvider to _WKVisitedLinkStore for consistency
https://bugs.webkit.org/show_bug.cgi?id=148398

Reviewed by Tim Horton.

We'd like to call the abstract classes providers and the concrete classes stores in WebKit. Begin by renaming
_WKVisitedLinkProvider to _WKVisitedLinkStore, but keep the former around as a deprecated class.

* Shared/API/Cocoa/WebKitPrivate.h:
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _visitedLinkStore]):
(-[WKWebViewConfiguration _setVisitedLinkStore:]):
(-[WKWebViewConfiguration _visitedLinkProvider]):
(-[WKWebViewConfiguration _setVisitedLinkProvider:]):
(-[WKWebViewConfiguration _validate]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* UIProcess/API/Cocoa/_WKVisitedLinkProvider.h:
* UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm:
(-[_WKVisitedLinkProvider init]): Deleted.
(-[_WKVisitedLinkProvider dealloc]): Deleted.
(-[_WKVisitedLinkProvider addVisitedLinkWithURL:]): Deleted.
(-[_WKVisitedLinkProvider removeAll]): Deleted.
(-[_WKVisitedLinkProvider _apiObject]): Deleted.
* UIProcess/API/Cocoa/_WKVisitedLinkStore.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKVisitedLinkProvider.h.
* UIProcess/API/Cocoa/_WKVisitedLinkStore.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm.
(-[_WKVisitedLinkStore init]):
(-[_WKVisitedLinkStore dealloc]):
(-[_WKVisitedLinkStore addVisitedLinkWithURL:]):
(-[_WKVisitedLinkStore removeAll]):
(-[_WKVisitedLinkStore _apiObject]):
* UIProcess/API/Cocoa/_WKVisitedLinkStoreInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKVisitedLinkProviderInternal.h.
(WebKit::wrapper):
* WebKit2.xcodeproj/project.pbxproj:

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

4 years agoAdd support to dashboard for displaying Git SHA's as revisions.
commit-queue@webkit.org [Mon, 24 Aug 2015 22:42:54 +0000 (22:42 +0000)]
Add support to dashboard for displaying Git SHA's as revisions.
https://bugs.webkit.org/show_bug.cgi?id=148387

Patch by Jason Marcell <jmarcell@apple.com> on 2015-08-24
Reviewed by Daniel Bates.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
(parseRevisionProperty): Added support to dashboard for displaying Git SHA's as revisions.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:
(BuildbotQueueView.prototype._revisionContentWithPopoverForIteration): Ditto.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Dashboard.js: Added
"isSVN" property to Dashboard.Repository.(OpenSource|Internal).

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

4 years agoREPTACH is not a word
basile_clement@apple.com [Mon, 24 Aug 2015 21:56:38 +0000 (21:56 +0000)]
REPTACH is not a word
https://bugs.webkit.org/show_bug.cgi?id=148401

Reviewed by Saam Barati.

* assembler/MacroAssemblerX86_64.h:
(JSC::MacroAssemblerX86_64::callWithSlowPathReturnType):
(JSC::MacroAssemblerX86_64::call):
(JSC::MacroAssemblerX86_64::tailRecursiveCall):
(JSC::MacroAssemblerX86_64::makeTailRecursiveCall):
(JSC::MacroAssemblerX86_64::readCallTarget):
(JSC::MacroAssemblerX86_64::linkCall):
(JSC::MacroAssemblerX86_64::repatchCall):

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

4 years agoAdd support for setting JSC options from a file.
mark.lam@apple.com [Mon, 24 Aug 2015 21:51:26 +0000 (21:51 +0000)]
Add support for setting JSC options from a file.
https://bugs.webkit.org/show_bug.cgi?id=148394

Reviewed by Saam Barati.

This is needed for environments where the JSC executable does not have access to
environmental variables.  This is only needed for debugging, and is currently
guarded under a #define USE_OPTIONS_FILE in Options.cpp, and is disabled by
default.

Also fixed Options::setOptions() to be allow for whitespace that is not a single
' '.  This makes setOptions() much more flexible and friendlier to use for loading
options in general.

For example, this current use case of loading options from a file may have '\n's
in the character stream, and this feature is easier to implement if setOptions()
just support more than 1 whitespace char between options, and recognize whitespace
characters other than ' '.

* runtime/Options.cpp:
(JSC::parse):
(JSC::Options::initialize):
(JSC::Options::setOptions):

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

4 years agoDFG::FixupPhase should use the lambda form of m_graph.doToChildren() rather than...
fpizlo@apple.com [Mon, 24 Aug 2015 21:44:39 +0000 (21:44 +0000)]
DFG::FixupPhase should use the lambda form of m_graph.doToChildren() rather than the old macro
https://bugs.webkit.org/show_bug.cgi?id=148397

Reviewed by Geoffrey Garen.

We used to iterate the edges of a node by using the DFG_NODE_DO_TO_CHILDREN macro. We
don't need to do that anymore since we have the lambda-based m_graph.doToChildren(). This
allows us to get rid of a bunch of helper methods in DFG::FixupPhase.

I also took the opportunity to give the injectTypeConversionsInBlock() method a more
generic name, since after https://bugs.webkit.org/show_bug.cgi?id=145204 it will be used
for fix-up of checks more broadly.

* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::run):
(JSC::DFG::FixupPhase::attemptToMakeGetTypedArrayByteOffset):
(JSC::DFG::FixupPhase::fixupChecksInBlock):
(JSC::DFG::FixupPhase::injectTypeConversionsInBlock): Deleted.
(JSC::DFG::FixupPhase::tryToRelaxRepresentation): Deleted.
(JSC::DFG::FixupPhase::fixEdgeRepresentation): Deleted.
(JSC::DFG::FixupPhase::injectTypeConversionsForEdge): Deleted.

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

4 years agoNodeList should not have a named getter
cdumez@apple.com [Mon, 24 Aug 2015 21:44:32 +0000 (21:44 +0000)]
NodeList should not have a named getter
https://bugs.webkit.org/show_bug.cgi?id=148117

Reviewed by Geoffrey Garen.

Add a layout test to check that NodeList no longer has a named property
getter after r188829.

* fast/dom/NodeList/no-named-getter-expected.txt: Added.
* fast/dom/NodeList/no-named-getter.html: Added.

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

4 years agoSome renaming to clarify CodeBlock and UnlinkedCodeBlock
ggaren@apple.com [Mon, 24 Aug 2015 21:43:13 +0000 (21:43 +0000)]
Some renaming to clarify CodeBlock and UnlinkedCodeBlock
https://bugs.webkit.org/show_bug.cgi?id=148391

Reviewed by Saam Barati.

* bytecode/UnlinkedFunctionExecutable.cpp:
(JSC::generateUnlinkedFunctionCodeBlock):
(JSC::UnlinkedFunctionExecutable::visitChildren):
(JSC::UnlinkedFunctionExecutable::fromGlobalCode):
(JSC::UnlinkedFunctionExecutable::unlinkedCodeBlockFor):
(JSC::generateFunctionCodeBlock): Deleted.
(JSC::UnlinkedFunctionExecutable::codeBlockFor): Deleted.
* bytecode/UnlinkedFunctionExecutable.h: Call our CodeBlocks "unlinked"
in the name for clarity, since we are unlinked.

* heap/Heap.cpp:
(JSC::Heap::objectTypeCounts):
(JSC::Heap::deleteAllCodeBlocks):
(JSC::Heap::deleteAllUnlinkedCodeBlocks):
(JSC::Heap::clearUnmarkedExecutables):
(JSC::Heap::deleteOldCode):
(JSC::Heap::FinalizerOwner::finalize):
(JSC::Heap::addExecutable):
(JSC::Heap::collectAllGarbageIfNotDoneRecently):
(JSC::Heap::deleteAllCompiledCode): Deleted.
(JSC::Heap::deleteAllUnlinkedFunctionCode): Deleted.
(JSC::Heap::addCompiledCode): Deleted.
* heap/Heap.h:
(JSC::Heap::notifyIsSafeToCollect):
(JSC::Heap::isSafeToCollect):
(JSC::Heap::sizeBeforeLastFullCollection):
(JSC::Heap::sizeAfterLastFullCollection):
(JSC::Heap::compiledCode): Deleted.

    deleteAllCompiledCode => deleteAllCodeBlocks because "compiled"
    is a broad phrase these days.

    m_compiledCode => m_executables for the same reason.

    addCompiledCode => addExecutable for the same reason.

    deleteAllUnlinkedFunctionCode => deleteAllUnlinkedCodeBlocks
    for consistency.

* jsc.cpp:
(functionDeleteAllCompiledCode):

* runtime/Executable.cpp:
(JSC::ScriptExecutable::newCodeBlockFor): codeBlockFor => unlinkedCodeBlockFor

(JSC::FunctionExecutable::clearUnlinkedCodeForRecompilation): Deleted.
It was strange to put this function on executable, since its name implied
that it only changed the executable, but it actually changed all cached
code. Now, a client that wants to change cached code must do so explicitly.

* runtime/Executable.h:
(JSC::ScriptExecutable::finishCreation):
* runtime/VM.cpp:
(JSC::VM::deleteAllCode):
* runtime/VMEntryScope.cpp:
(JSC::VMEntryScope::VMEntryScope): Updated for renames above.

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

4 years agoSpecify the corrent regression revision.
aestes@apple.com [Mon, 24 Aug 2015 21:31:13 +0000 (21:31 +0000)]
Specify the corrent regression revision.

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

4 years agoREGRESSION (r182356): WebKit2.BundleParameters fails on iOS
aestes@apple.com [Mon, 24 Aug 2015 21:25:27 +0000 (21:25 +0000)]
REGRESSION (r182356): WebKit2.BundleParameters fails on iOS

* TestWebKitAPI/Configurations/WebProcessPlugIn.xcconfig: Specify LD_RUNPATH_SEARCH_PATHS correctly for iOS.

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

4 years agoDFG::InsertionSet should be tolerant of occasional out-of-order insertions
fpizlo@apple.com [Mon, 24 Aug 2015 21:11:17 +0000 (21:11 +0000)]
DFG::InsertionSet should be tolerant of occasional out-of-order insertions
https://bugs.webkit.org/show_bug.cgi?id=148367

Reviewed by Geoffrey Garen and Saam Barati.

Since forever, the DFG::InsertionSet has been the way we insert nodes into DFG IR, and it
requires that you walk a block in order and perform insertions in order: you can't insert
something at index J, then at index I where I < J, except if you do a second pass.

This restriction makes sense, because it enables a very fast algorithm. And it's very
rare that a phase would need to insert things out of order.

But sometimes - rarely - we need to insert things slightly out-of-order. For example we
may want to insert a node at index J, but to insert a check associated with that node, we
may need to use index I where I < J. This will come up from the work on
https://bugs.webkit.org/show_bug.cgi?id=145204. And it has already come up in the past.
It seems like it would be best to just lift this restriction.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGInsertionSet.cpp: Added.
(JSC::DFG::InsertionSet::insertSlow):
* dfg/DFGInsertionSet.h:
(JSC::DFG::InsertionSet::InsertionSet):
(JSC::DFG::InsertionSet::graph):
(JSC::DFG::InsertionSet::insert):
(JSC::DFG::InsertionSet::execute):

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

4 years agoCreate ById IC for ByVal operation only when the specific Id comes more than once
utatane.tea@gmail.com [Mon, 24 Aug 2015 20:26:05 +0000 (20:26 +0000)]
Create ById IC for ByVal operation only when the specific Id comes more than once
https://bugs.webkit.org/show_bug.cgi?id=148288

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

After introducing byId ICs into byVal ops, byVal ops creates much ICs than before.
The failure fixed in r188767 figures out these ICs are created even if this op is executed only once.

The situation is the following;
In the current code, when byVal op is executed with the Id, we immediately set up the byId IC for that byVal op.
But setting up JITGetByIdGenerator generates the fast path IC code and consumes executable memory.
As a result, if we call eval("contains byVal ops") with the different strings repeatedly under no-llint environment, each eval call creates byId IC for byVal and consumes executable memory.

To solve it, we will add "seen" flag to ByValInfo.
And we will create the IC on the second byVal op call with the same Id.

* bytecode/ByValInfo.h:
(JSC::ByValInfo::ByValInfo):
* jit/JITOperations.cpp:
(JSC::tryGetByValOptimize):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::privateCompileGetByValWithCachedId): Deleted.
(JSC::JIT::privateCompilePutByValWithCachedId): Deleted.

LayoutTests:

Revert the skip marks introduced in r188767.

* js/script-tests/dfg-float32array.js:
* js/script-tests/dfg-int16array.js:
* js/script-tests/dfg-int32array-overflow-values.js:
* js/script-tests/dfg-int32array.js:
* js/script-tests/dfg-int8array.js:
* js/script-tests/dfg-uint16array.js:
* js/script-tests/dfg-uint32array-overflow-values.js:
* js/script-tests/dfg-uint32array.js:
* js/script-tests/dfg-uint8array.js:
* js/script-tests/dfg-uint8clampedarray.js:
* js/script-tests/regress-141098.js:

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

4 years agoFix the build fixes in r188875 and r188874
mmaxfield@apple.com [Mon, 24 Aug 2015 20:18:13 +0000 (20:18 +0000)]
Fix the build fixes in r188875 and r188874

Unreviewed.

* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::FontCache::createFontPlatformData):
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::toNSFontTraits):

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

4 years agoWeb Inspector: Change webkitAnimationEnd use, should be animationEnd
timothy@apple.com [Mon, 24 Aug 2015 19:52:42 +0000 (19:52 +0000)]
Web Inspector: Change webkitAnimationEnd use, should be animationEnd
https://bugs.webkit.org/show_bug.cgi?id=148385

Reviewed by Joseph Pecoraro.

* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype.emphasizeSearchHighlight):
* UserInterface/Views/DashboardContainerView.js:
(WebInspector.DashboardContainerView.prototype._showDashboardView.animationEnded):
(WebInspector.DashboardContainerView.prototype._showDashboardView):
(WebInspector.DashboardContainerView.prototype._hideDashboardView.animationEnded):
(WebInspector.DashboardContainerView.prototype._hideDashboardView):
* UserInterface/Views/DefaultDashboardView.js:
(WebInspector.DefaultDashboardView.prototype._setConsoleItemValue.animationEnded):
(WebInspector.DefaultDashboardView.prototype._setConsoleItemValue):
* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor.prototype.revealPosition.revealAndHighlightLine):
(WebInspector.TextEditor.prototype.revealPosition):
(WebInspector.TextEditor.prototype._revealSearchResult):

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

4 years agoTry to fix the build.
timothy_horton@apple.com [Mon, 24 Aug 2015 19:03:28 +0000 (19:03 +0000)]
Try to fix the build.

* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::FontCache::createFontPlatformData):

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

4 years agoFix the build.
timothy_horton@apple.com [Mon, 24 Aug 2015 18:50:09 +0000 (18:50 +0000)]
Fix the build.

* platform/graphics/mac/FontCacheMac.mm:
(WebCore::toNSFontWeight):
(WebCore::toNSFontTraits):
(WebCore::platformFontWithFamilySpecialCase):

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

4 years agoUse Optionals in RenderBox height computations
mmaxfield@apple.com [Mon, 24 Aug 2015 18:48:51 +0000 (18:48 +0000)]
Use Optionals in RenderBox height computations
https://bugs.webkit.org/show_bug.cgi?id=147253

Reviewed by David Hyatt.

No new tests because there is no behavior change.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::constrainLogicalHeightByMinMax):
(WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax):
(WebCore::RenderBox::overrideContainingBlockContentLogicalWidth):
(WebCore::RenderBox::overrideContainingBlockContentLogicalHeight):
(WebCore::RenderBox::setOverrideContainingBlockContentLogicalWidth):
(WebCore::RenderBox::setOverrideContainingBlockContentLogicalHeight):
(WebCore::RenderBox::adjustContentBoxLogicalHeightForBoxSizing):
(WebCore::RenderBox::containingBlockLogicalWidthForContent):
(WebCore::RenderBox::containingBlockLogicalHeightForContent):
(WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
(WebCore::RenderBox::computeLogicalHeight):
(WebCore::RenderBox::computeLogicalHeightUsing):
(WebCore::RenderBox::computeContentLogicalHeight):
(WebCore::RenderBox::computeIntrinsicLogicalContentHeightUsing):
(WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
(WebCore::RenderBox::computePercentageLogicalHeight):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
(WebCore::RenderBox::availableLogicalHeight):
(WebCore::RenderBox::availableLogicalHeightUsing):
(WebCore::RenderBox::computePositionedLogicalHeightUsing):
(WebCore::logicalWidthIsResolvable):
(WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock):
(WebCore::RenderBox::hasDefiniteLogicalHeight):
* rendering/RenderBox.h:
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
(WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
(WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
* rendering/RenderFlexibleBox.h:
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::addForcedRegionBreak):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
(WebCore::RenderGrid::logicalContentHeightForChild):
(WebCore::RenderGrid::minContentForChild):
(WebCore::RenderGrid::maxContentForChild):
(WebCore::RenderGrid::layoutGridItems):
(WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::calculateMaxColumnHeight):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):

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

4 years agoFix failing tests.
andersca@apple.com [Mon, 24 Aug 2015 18:46:44 +0000 (18:46 +0000)]
Fix failing tests.

It's OK to call runStateMachine with an idle state. Just bail early when that happens.

* Modules/webdatabase/SQLTransactionStateMachine.h:
(WebCore::SQLTransactionStateMachine<T>::runStateMachine):

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

4 years ago[Cocoa] Unify FontCache
mmaxfield@apple.com [Mon, 24 Aug 2015 18:37:37 +0000 (18:37 +0000)]
[Cocoa] Unify FontCache
https://bugs.webkit.org/show_bug.cgi?id=148358

Reviewed by Antti Koivisto.

Move all the duplicate code to FontCacheCoreText.

No new tests because there is no behavior change.

* platform/graphics/FontCache.h:
* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::fontWeightFromCoreText):
(WebCore::toTraitsMask):
(WebCore::isFontWeightBold):
(WebCore::toCoreTextFontWeight):
(WebCore::invalidateFontCache):
(WebCore::fontCacheRegisteredFontsChangedNotificationCallback):
(WebCore::FontCache::platformInit):
(WebCore::FontCache::systemFontFamilies):
(WebCore::computeTraits):
(WebCore::computeNecessarySynthesis):
(WebCore::fontWhitelist):
(WebCore::FontCache::setFontWhitelist):
(WebCore::platformFontLookupWithFamily):
(WebCore::fontWithFamily):
(WebCore::shouldAutoActivateFontIfNeeded):
(WebCore::FontCache::createFontPlatformData):
(WebCore::fallbackDedupSet):
(WebCore::FontCache::platformPurgeInactiveFontData):
(WebCore::FontCache::systemFallbackForCharacters):
* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::platformInvalidateFontCache):
(WebCore::getSystemFontFallbackForCharacters):
(WebCore::platformLookupFallbackFont):
(WebCore::FontCache::lastResortFallbackFont):
(WebCore::FontCache::weightOfCTFont):
(WebCore::platformFontWithFamilySpecialCase):
(WebCore::FontCache::platformInit): Deleted.
(WebCore::isFontWeightBold): Deleted.
(WebCore::FontCache::getSystemFontFallbackForCharacters): Deleted.
(WebCore::FontCache::systemFallbackForCharacters): Deleted.
(WebCore::FontCache::systemFontFamilies): Deleted.
(WebCore::createCTFontWithTextStyle): Deleted.
(WebCore::createCTFontWithFamilyNameAndWeight): Deleted.
(WebCore::toCTFontWeight): Deleted.
(WebCore::FontCache::createFontPlatformData): Deleted.
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::appkitWeightToFontWeight):
(WebCore::toNSFontTraits):
(WebCore::platformFontWithFamilySpecialCase):
(WebCore::platformFontWithFamily):
(WebCore::platformInvalidateFontCache):
(WebCore::platformLookupFallbackFont):
(WebCore::FontCache::lastResortFallbackFont):
(WebCore::toCoreTextFontWeight): Deleted.
(WebCore::fontWhitelist): Deleted.
(WebCore::FontCache::setFontWhitelist): Deleted.
(WebCore::fontWithFamilySpecialCase): Deleted.
(WebCore::fontWithFamily): Deleted.
(WebCore::invalidateFontCache): Deleted.
(WebCore::fontCacheRegisteredFontsChangedNotificationCallback): Deleted.
(WebCore::FontCache::platformInit): Deleted.
(WebCore::isAppKitFontWeightBold): Deleted.
(WebCore::shouldAutoActivateFontIfNeeded): Deleted.
(WebCore::fallbackDedupSet): Deleted.
(WebCore::FontCache::platformPurgeInactiveFontData): Deleted.
(WebCore::lookupCTFont): Deleted.
(WebCore::FontCache::systemFallbackForCharacters): Deleted.
(WebCore::FontCache::systemFontFamilies): Deleted.
(WebCore::FontCache::createFontPlatformData): Deleted.
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
(WebCore::fromCTFontWeight): Deleted.

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

4 years agoUnreviewed, attempt to fix iOS build after r188860
wenson_hsieh@apple.com [Mon, 24 Aug 2015 17:38:23 +0000 (17:38 +0000)]
Unreviewed, attempt to fix iOS build after r188860

* page/WheelEventDeltaFilter.cpp:
(WebCore::WheelEventDeltaFilter::isFilteringDeltas): Moved implementation out of header.
(WebCore::WheelEventDeltaFilter::filteredDelta): Moved implementation out of header.
* page/WheelEventDeltaFilter.h:
(WebCore::WheelEventDeltaFilter::isFilteringDeltas): Deleted.
(WebCore::WheelEventDeltaFilter::filteredDelta): Deleted.

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

4 years agoRemove unused return values from SQLTransaction state functions
andersca@apple.com [Mon, 24 Aug 2015 17:16:47 +0000 (17:16 +0000)]
Remove unused return values from SQLTransaction state functions
https://bugs.webkit.org/show_bug.cgi?id=148344

Reviewed by Tim Horton.

* Modules/webdatabase/SQLTransaction.cpp:
(WebCore::SQLTransaction::deliverTransactionCallback):
(WebCore::SQLTransaction::deliverTransactionErrorCallback):
(WebCore::SQLTransaction::deliverStatementCallback):
(WebCore::SQLTransaction::deliverQuotaIncreaseCallback):
(WebCore::SQLTransaction::deliverSuccessCallback):
(WebCore::SQLTransaction::unreachableState):
* Modules/webdatabase/SQLTransaction.h:
* Modules/webdatabase/SQLTransactionBackend.cpp:
(WebCore::SQLTransactionBackend::acquireLock):
(WebCore::SQLTransactionBackend::openTransactionAndPreflight):
(WebCore::SQLTransactionBackend::runStatements):
(WebCore::SQLTransactionBackend::cleanupAndTerminate):
(WebCore::SQLTransactionBackend::cleanupAfterTransactionErrorCallback):
(WebCore::SQLTransactionBackend::unreachableState):
* Modules/webdatabase/SQLTransactionBackend.h:
* Modules/webdatabase/SQLTransactionStateMachine.h:
(WebCore::SQLTransactionStateMachine<T>::runStateMachine):

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

4 years agoUnreviewed, fix build after r188860
wenson_hsieh@apple.com [Mon, 24 Aug 2015 17:13:06 +0000 (17:13 +0000)]
Unreviewed, fix build after r188860

* page/mac/WheelEventDeltaFilterMac.mm:
(WebCore::WheelEventDeltaFilterMac::updateFromDelta): Convert argument explicitly to an NSPoint.

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

4 years agoUnreviewed, slight layout test clean up after r188829.
cdumez@apple.com [Mon, 24 Aug 2015 17:02:25 +0000 (17:02 +0000)]
Unreviewed, slight layout test clean up after r188829.

Remove a useless blank line.

* fast/dom/named-items-with-symbol-name-expected.txt:
* fast/dom/named-items-with-symbol-name.html:

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

4 years agoREGRESSION (r188581): Web Inspector: Console user command isn't visible when it's...
nvasilyev@apple.com [Mon, 24 Aug 2015 15:57:09 +0000 (15:57 +0000)]
REGRESSION (r188581): Web Inspector: Console user command isn't visible when it's expected to be
https://bugs.webkit.org/show_bug.cgi?id=148283

One of the improvements of r188581 "Option-Enter should commit console command
without erasing the prompt" was not to show a console user command if it's the
same as the previous one.

However, there could be a lot of other messages between the last two user
commands - console.log, CSS warnings, etc. In that case we should show a console
user command again by resetting _lastCommitted.

Reviewed by Timothy Hatcher.

* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController):
(WebInspector.JavaScriptLogViewController.prototype.startNewSession):
(WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessageView):
Reset _lastCommitted for all messages except for user commands and use command results.

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

4 years agoWeb Inspector: Rendering Frames filter checkboxes all become checked during recording
mattbaker@apple.com [Mon, 24 Aug 2015 15:55:40 +0000 (15:55 +0000)]
Web Inspector: Rendering Frames filter checkboxes all become checked during recording
https://bugs.webkit.org/show_bug.cgi?id=148375

Reviewed by Timothy Hatcher.

* UserInterface/Views/ChartDetailsSectionRow.js:
(WebInspector.ChartDetailsSectionRow.prototype._createLegend):
Removed incorrect code that forced checked to true.

* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel._refreshFrameSelectionChart):
Persist legend item checkbox state when updating the chart.

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

4 years agoUse _NSScrollingPredominantAxisFilter for wheel event filtering on Mac
wenson_hsieh@apple.com [Mon, 24 Aug 2015 15:23:21 +0000 (15:23 +0000)]
Use _NSScrollingPredominantAxisFilter for wheel event filtering on Mac
https://bugs.webkit.org/show_bug.cgi?id=147320

Reviewed by Simon Fraser.

Refactored to use a predominant axis filter instead of a predominant axis tracker. This allows us to
employ AppKit's _NSScrollingPredominantAxisFilter when possible, and use the wheel event delta tracker
Source/WebCore:

as a fallback. Here, we refactor EventHandler to use the new filters for overflow scrolling and replace
the MainFrame's WheelEventDeltaTracker with an appropriate type of WheelEventDeltaFilter.

In the case where an _NSScrollingPredominantAxisFilter is unavailable, the platform-invariant wheel
event delta filter simply uses the existing wheel event delta tracker to compute the current predominant
axis. It uses the predominant axis to determine which axis (if any) should have its delta zeroed out.

This patch also introduces NSScrollingInputFilterSPI.h, which either imports the internal input filter
header from AppKit or declares relevant interfaces and functions.

No new tests, since this change does not add new functionality.

* CMakeLists.txt: Add page/WheelEventDeltaFilter.cpp.
* WebCore.vcxproj/WebCore.vcxproj: Add WheelEventDeltaFilter.cpp and WheelEventDeltaFilter.h.
* WebCore.vcxproj/WebCore.vcxproj.filters: Add WheelEventDeltaFilter.cpp and WheelEventDeltaFilter.h.
* WebCore.xcodeproj/project.pbxproj: Add WheelEventDeltaFilter.cpp, WheelEventDeltaFilter.h, and their Mac counterparts.
* page/EventHandler.cpp:
(WebCore::didScrollInScrollableArea): Refactored to no longer handle axes separately.
(WebCore::handleWheelEventInAppropriateEnclosingBox): Ditto.
(WebCore::EventHandler::platformRecordWheelEvent): Refactored to update the wheel delta filter.
(WebCore::EventHandler::clearLatchedState): Ditto.
(WebCore::EventHandler::defaultWheelEventHandler): Refactored to use wheel delta filters. No longer splits wheel events
        and handles them on separate axes.
(WebCore::didScrollInScrollableAreaForSingleAxis): Deleted.
(WebCore::handleWheelEventInAppropriateEnclosingBoxForSingleAxis): Deleted.
* page/EventHandler.h:
* page/MainFrame.cpp:
(WebCore::MainFrame::MainFrame): Initializes the appropriate type of WheelEventDeltaFilter.
* page/MainFrame.h:
* page/WheelEventDeltaFilter.cpp: Added.
(WebCore::WheelEventDeltaFilter::WheelEventDeltaFilter):
(WebCore::WheelEventDeltaFilter::~WheelEventDeltaFilter):
(WebCore::WheelEventDeltaFilter::create):
(WebCore::BasicWheelEventDeltaFilter::BasicWheelEventDeltaFilter):
(WebCore::BasicWheelEventDeltaFilter::updateFromDelta):
(WebCore::BasicWheelEventDeltaFilter::beginFilteringDeltas):
(WebCore::BasicWheelEventDeltaFilter::endFilteringDeltas):
(WebCore::deltaIsPredominantlyVertical):
(WebCore::BasicWheelEventDeltaFilter::dominantScrollGestureDirection):
* page/WheelEventDeltaFilter.h: Refactored WheelEventDeltaTracker logic to work as a filter instead.
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::platformPrepareForWheelEvents): Refactored to use wheel delta filters.
(WebCore::EventHandler::platformRecordWheelEvent): Ditto.
* page/mac/WheelEventDeltaFilterMac.h: Wraps the new _NSScrollingPredominantAxisFilter.
* page/mac/WheelEventDeltaFilterMac.mm: Added.
(WebCore::WheelEventDeltaFilterMac::WheelEventDeltaFilterMac):
(WebCore::WheelEventDeltaFilterMac::beginFilteringDeltas):
(WebCore::WheelEventDeltaFilterMac::updateFromDelta):
(WebCore::WheelEventDeltaFilterMac::endFilteringDeltas):
* platform/PlatformWheelEvent.h:
(WebCore::PlatformWheelEvent::copyWithDeltas): Used to create a copy of the platform wheel event with filtered deltas.
(WebCore::PlatformWheelEvent::copyIgnoringHorizontalDelta): Deleted. No longer necessary, since we won't be handling wheel
        events on separate axes.
(WebCore::PlatformWheelEvent::copyIgnoringVerticalDelta): Ditto.
* platform/spi/mac/NSScrollingInputFilterSPI.h: Added.

Source/WebKit2:

as a fallback. Here, we refactor EventDispatcher to use the new filters for mainframe scrolling.

No new tests, since this change does not add new functionality.

* WebProcess/WebPage/EventDispatcher.cpp: Include WheelEventDeltaFilterMac.h when necessary.
(WebKit::EventDispatcher::EventDispatcher): Initialize a WheelEventDeltaFilterMac when possible. Otherwise,
    fall back to a BasicWheelEventDeltaFilter.
(WebKit::EventDispatcher::wheelEvent): Use filtered deltas to initialize the platform wheel event instead
    of zeroing out non-predominant axes.
* WebProcess/WebPage/EventDispatcher.h: Replace m_recentWheelEventDeltaTracker with m_recentWheelEventDeltaFilter.

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

4 years agoUnreviewed, fix typo in a comment ("unsused" -> "unused")
mcatanzaro@igalia.com [Mon, 24 Aug 2015 13:39:11 +0000 (13:39 +0000)]
Unreviewed, fix typo in a comment ("unsused" -> "unused")

* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateFunction):

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

4 years agoUnreviewed. Fix cairo performance regression introduced in r188379.
carlosgc@webkit.org [Mon, 24 Aug 2015 13:23:45 +0000 (13:23 +0000)]
Unreviewed. Fix cairo performance regression introduced in r188379.

A missing break in a switch was making us to use High image
interpolation quality by default.

* platform/graphics/cairo/PlatformContextCairo.cpp:
(WebCore::PlatformContextCairo::drawSurfaceToContext): Add the
missing break.

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

4 years agoUnreviewed. Fix GObject DOM bindings API break test after r188809.
carlosgc@webkit.org [Mon, 24 Aug 2015 11:33:05 +0000 (11:33 +0000)]
Unreviewed. Fix GObject DOM bindings API break test after r188809.

element.getElementsByTagName and element.getElementsByClassName
were also changed in r188809 to return an HTMLCollection. The
build didn't fail because we don't use those in our tests, but the
API breaks need to be fixed too.

* bindings/gobject/WebKitDOMDeprecated.cpp:
(webkit_dom_element_get_elements_by_tag_name):
(webkit_dom_element_get_elements_by_tag_name_ns):
(webkit_dom_element_get_elements_by_class_name):
* bindings/gobject/WebKitDOMDeprecated.h:
* bindings/gobject/WebKitDOMDeprecated.symbols:
* bindings/gobject/webkitdom.symbols:
* bindings/scripts/CodeGeneratorGObject.pm:
(GetEffectiveFunctionName):

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

4 years agoUnreviewed. Fix GObject DOM bindings API break test after r188735.
carlosgc@webkit.org [Mon, 24 Aug 2015 11:15:41 +0000 (11:15 +0000)]
Unreviewed. Fix GObject DOM bindings API break test after r188735.

document.getElementsByClassName returns an HTMLCollection since
r188735. So, rename it as
webkit_dom_document_get_elements_by_class_name_as_html_collection,
and deprecate the old method returning a NodeList.

* bindings/gobject/WebKitDOMDeprecated.cpp:
(webkit_dom_document_get_elements_by_class_name): Use the
implementation returning a NodeList.
* bindings/gobject/WebKitDOMDeprecated.h:
* bindings/gobject/WebKitDOMDeprecated.symbols: Add new symbols.
* bindings/gobject/webkitdom.symbols: Ditto.
* bindings/scripts/CodeGeneratorGObject.pm:
(GetEffectiveFunctionName): Also check getElementsByClassName.

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

4 years agoUnreviewed. Fix GTK+ build after r188711.
carlosgc@webkit.org [Mon, 24 Aug 2015 10:23:38 +0000 (10:23 +0000)]
Unreviewed. Fix GTK+ build after r188711.

Since r188711 document.createNodeIterator and
document.createTreeWalker, don't raise exceptions anymore. Keep
the GError parameter even if it's ignored to not break the API
compatibility.

* bindings/scripts/CodeGeneratorGObject.pm:
(FunctionUsedToRaiseException):
(GenerateFunction):

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

4 years agoUnreviewed. Fix GTK+ build after r188809.
carlosgc@webkit.org [Mon, 24 Aug 2015 10:19:39 +0000 (10:19 +0000)]
Unreviewed. Fix GTK+ build after r188809.

document.getElementsByTagName returns an HTMLCollection since
r188809. So, rename it as
webkit_dom_document_get_elements_by_tag_name_as_html_collection,
and deprecate the old methods returning a NodeList.

* bindings/gobject/WebKitDOMDeprecated.cpp:
(webkit_dom_document_get_elements_by_tag_name): Use the
implementation returning a NodeList.
(webkit_dom_document_get_elements_by_tag_name_ns): Ditto.
* bindings/gobject/WebKitDOMDeprecated.h:
* bindings/gobject/WebKitDOMDeprecated.symbols: Add new symbols.
* bindings/gobject/webkitdom.symbols: Ditto.
* bindings/scripts/CodeGeneratorGObject.pm:
(GetEffectiveFunctionName): Bring back this method, now that we
have deprecated API again and add the checks for
getElementsByTagName methods.
(GenerateFunction): Use GetEffectiveFunctionName().

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

4 years ago@font-face related cleanup
mmaxfield@apple.com [Mon, 24 Aug 2015 08:06:00 +0000 (08:06 +0000)]
@font-face related cleanup
https://bugs.webkit.org/show_bug.cgi?id=148355

Reviewed by Darin Adler.

This patch cleans up much of our code related to web fonts. In general, it
migrates to using C++ for-each style loops, uses Ref instead of RefPtr when
things can't be nullptr, migrates to C++ Rvalue-references instead of
PassRefPtr, and refactors CSSFontSelector::addFontFaceRule() to use helper
functions.

No new tests because there is no behavior change.

* css/CSSFontFace.cpp:
(WebCore::CSSFontFace::fontLoaded): Use a C++ for-each loop.
* css/CSSFontFace.h:
(WebCore::CSSFontFace::create): Use C++ Rvalue-references instead of
PassRefPtr.
(WebCore::CSSFontFace::CSSFontFace): Ditto.
* css/CSSFontSelector.cpp:
(WebCore::computeTraitsMask): Migrated a chunk of
CSSFontSelector::addFontFaceRule() into this helper function.
(WebCore::createFontFace): Ditto.
(WebCore::familyNameFromPrimitive): Ditto.
(WebCore::CSSFontSelector::addFontFaceRule): Call the newly-created helper
functions. In addition, migrate to Refs instead of RefPtrs.
(WebCore::compareFontFaces): Migrate to references instead of pointers.
(WebCore::CSSFontSelector::getFontFace): Migrate to Refs instead of
RefPtrs. Also use C++ for-each loops.
* css/CSSFontSelector.h:
* css/CSSSegmentedFontFace.cpp:
(WebCore::CSSSegmentedFontFace::~CSSSegmentedFontFace): Use C++ for-each
loops.
(WebCore::CSSSegmentedFontFace::isValid): Ditto.
(WebCore::CSSSegmentedFontFace::appendFontFace): Migrate to Rvalue-
references instead of PassRefPtr.
* css/CSSSegmentedFontFace.h:
* platform/graphics/FontCache.h:
* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::FontCache::getTraitsInFamily): Return the result instead of being
passed an out parameter.
* platform/graphics/freetype/FontCacheFreeType.cpp:
(WebCore::FontCache::getTraitsInFamily): Ditto.
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::traitsInFamilyEnumProc): Ditto.
(WebCore::FontCache::getTraitsInFamily): Ditto.

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

4 years agoAddressed a missed piece of review feedback from r188851.
aestes@apple.com [Mon, 24 Aug 2015 06:54:41 +0000 (06:54 +0000)]
Addressed a missed piece of review feedback from r188851.

* TestWebKitAPI/Tests/WebKit2Cocoa/ContentFiltering.mm:

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

4 years ago[Content Filtering] REGRESSION (r182356): Provisional URL is incorrect in didReceiveS...
aestes@apple.com [Mon, 24 Aug 2015 06:48:28 +0000 (06:48 +0000)]
[Content Filtering] REGRESSION (r182356): Provisional URL is incorrect in didReceiveServerRedirectForProvisionalLoadForFrame when Content Filtering is enabled
https://bugs.webkit.org/show_bug.cgi?id=147872
rdar://problem/22044000

Reviewed by Dan Bernstein.
Source/WebCore:

Passed the ResourceLoader request URL to dispatchDidReceiveServerRedirectForProvisionalLoad().

New API test: ContentFiltering.ServerRedirect

* WebCore.xcodeproj/project.pbxproj:
* loader/EmptyClients.h:
* loader/FrameLoaderClient.h: Added a URL argument to dispatchDidReceiveServerRedirectForProvisionalLoad().
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::willSendRequestInternal): Passed the request URL to dispatchDidReceiveServerRedirectForProvisionalLoad().
* testing/Internals.cpp:
(WebCore::Internals::Internals): Stopped calling MockContentFilter::ensureInstalled().
* testing/MockContentFilterSettings.cpp:
(WebCore::MockContentFilterSettings::setEnabled): Called MockContentFilter::ensureInstalled() to ensure the
mock is installed whenever the filter is enabled.
* testing/MockContentFilterSettings.h: Exported member functions used by TestWebKitAPI.

Source/WebKit/mac:

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad): Set provisionalURL using the URL argument.

Source/WebKit/win:

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad): Added the URL argument.
* WebCoreSupport/WebFrameLoaderClient.h:

Source/WebKit2:

The provisional DocumentLoader request URL does not reflect redirects when content filtering is enabled, but
the URL argument passed to dispatchDidReceiveServerRedirectForProvisionalLoad() does, so use it intead.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
Sent DidReceiveServerRedirectForProvisionalLoadForFrame using the URL argument.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

Tools:

Added an API test.

* TestWebKitAPI/Configurations/WebProcessPlugIn.xcconfig: Linked libWebCoreTestSupport in order to use MockContentFilter.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/ContentFiltering.mm: Added.
(-[ServerRedirectNavigationDelegate webView:didStartProvisionalNavigation:]): Expect the initial request URL.
(-[ServerRedirectNavigationDelegate webView:didReceiveServerRedirectForProvisionalNavigation:]): Expect the redirect URL.
(-[ServerRedirectNavigationDelegate webView:didCommitNavigation:]):
(TEST): Tested that -[WKWebView URL] is updated after a redirect when content filtering is enabled.
* TestWebKitAPI/Tests/WebKit2Cocoa/ContentFilteringPlugIn.mm: Added.
(+[ServerRedirectPlugIn initialize]): Enable MockContentFilter.
* TestWebKitAPI/cocoa/TestProtocol.h: Renamed from Tools/TestWebKitAPI/mac/TestProtocol.h.
* TestWebKitAPI/cocoa/TestProtocol.mm: Renamed from Tools/TestWebKitAPI/mac/TestProtocol.mm.

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

4 years ago[JSC] Get rid of NodePointerTraits
benjamin@webkit.org [Mon, 24 Aug 2015 06:19:49 +0000 (06:19 +0000)]
[JSC] Get rid of NodePointerTraits
https://bugs.webkit.org/show_bug.cgi?id=148340

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-08-23
Reviewed by Anders Carlsson.

NodePointerTraits does exactly the same thing has the default trait.

* dfg/DFGBasicBlock.h:
* dfg/DFGCommon.h:
(JSC::DFG::NodePointerTraits::defaultValue): Deleted.
(JSC::DFG::NodePointerTraits::isEmptyForDump): Deleted.

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

4 years ago[JSC] Reduce the memory usage of BytecodeLivenessAnalysis
benjamin@webkit.org [Mon, 24 Aug 2015 06:18:42 +0000 (06:18 +0000)]
[JSC] Reduce the memory usage of BytecodeLivenessAnalysis
https://bugs.webkit.org/show_bug.cgi?id=148353

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-08-23
Reviewed by Darin Adler.

BytecodeLivenessAnalysis easily takes kilobytes of memory for
non trivial blocks and that memory sticks around because
it stored on CodeBlock.

This patch reduces that memory use a bit.

Most of the memory is in the array of BytecodeBasicBlock.
BytecodeBasicBlock is shrunk by:
-Making it not ref-counted.
-Removing m_predecessors, it was only used for debugging and
 is usually big.
-Added a shrinkToFit() phase to shrink the vectors once we are
 done building the BytecodeBasicBlock.

There are more things we should do in the future:
-Store all the BytecodeBasicBlock direclty in the array.
 We know the size ahead of time, this would be a pure win.
 The only tricky part is changing m_successors to have the
 index of the successor instead of a pointer.
-Stop putting duplicates in m_successors.

* bytecode/BytecodeBasicBlock.cpp:
(JSC::computeBytecodeBasicBlocks):
(JSC::BytecodeBasicBlock::shrinkToFit): Deleted.
(JSC::linkBlocks): Deleted.
* bytecode/BytecodeBasicBlock.h:
(JSC::BytecodeBasicBlock::addSuccessor):
(JSC::BytecodeBasicBlock::addPredecessor): Deleted.
(JSC::BytecodeBasicBlock::predecessors): Deleted.
* bytecode/BytecodeLivenessAnalysis.cpp:
(JSC::getLeaderOffsetForBasicBlock):
(JSC::findBasicBlockWithLeaderOffset):
(JSC::findBasicBlockForBytecodeOffset):
(JSC::stepOverInstruction):
(JSC::computeLocalLivenessForBytecodeOffset):
(JSC::computeLocalLivenessForBlock):
(JSC::BytecodeLivenessAnalysis::dumpResults): Deleted.
* bytecode/BytecodeLivenessAnalysis.h:

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

4 years agoWeb Inspector: Filtered style not applied to graph elements during timeline recording
mattbaker@apple.com [Mon, 24 Aug 2015 05:33:42 +0000 (05:33 +0000)]
Web Inspector: Filtered style not applied to graph elements during timeline recording
https://bugs.webkit.org/show_bug.cgi?id=148339

Reviewed by Brian Burg.

* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
Check for hidden state change when applying filters to newly added tree elements.

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

4 years agoChange compiler-pipeline image for type profiler and code coverage profiler blog...
saambarati1@gmail.com [Mon, 24 Aug 2015 05:27:59 +0000 (05:27 +0000)]
Change compiler-pipeline image for type profiler and code coverage profiler blog post.

* blog-files/type-profiler-and-code-coverage-profiler/compiler-pipeline-1x.png: Added.
* blog-files/type-profiler-and-code-coverage-profiler/compiler-pipeline-2x.png: Added.
* blog-files/type-profiler-and-code-coverage-profiler/compiler-pipeline.png: Removed.

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

4 years agoUnreviewed, rolling back in r188792.
ggaren@apple.com [Mon, 24 Aug 2015 02:07:27 +0000 (02:07 +0000)]
Unreviewed, rolling back in r188792.
https://bugs.webkit.org/show_bug.cgi?id=148347

Previously reverted changesets:

"Unify code paths for manually deleting all code"
https://bugs.webkit.org/show_bug.cgi?id=148280
http://trac.webkit.org/changeset/188792

The previous patch caused some inspector tests to hang because it
introduced extra calls to sourceParsed, and sourceParsed is
pathologically slow in WK1 debug builds. This patch restores pre-existing
code to limit calls to sourceParsed, excluding code not being debugged
(i.e., inspector code).

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

4 years agoFixed the 32-bit Mac build after r188844.
aestes@apple.com [Sun, 23 Aug 2015 22:51:28 +0000 (22:51 +0000)]
Fixed the 32-bit Mac build after r188844.

* TestWebKitAPI/WKWebViewConfigurationExtras.h:
* TestWebKitAPI/WKWebViewConfigurationExtras.mm:

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

4 years ago[Cocoa] API tests using the Modern WebKit API should be able to create web process...
aestes@apple.com [Sun, 23 Aug 2015 22:31:32 +0000 (22:31 +0000)]
[Cocoa] API tests using the Modern WebKit API should be able to create web process plug-ins
https://bugs.webkit.org/show_bug.cgi?id=148317

Reviewed by Dan Bernstein.

Added the ability for Modern WebKit API tests to create WKWebProcessPlugIns. A test can create a plug-in by
creating a class that conforms to WKWebProcessPlugIn, adding it to the WebProcessPlugIn target, and using the
WKWebViewConfiguration returned by +[WKWebViewConfiguration testwebkitapi_configurationWithTestPlugInClassName:]
when creating WKWebViews.

Since TestWebKitAPI relies on a bundle parameter to know which test class to instantiate in the plug-in, I also
added a new API test for bundle parameters.

* TestWebKitAPI/Configurations/WebProcessPlugIn.xcconfig: Added. Named the bundle TestWebKitAPI.wkbundle and
named its executable TestWebKitAPI.bundle.
* TestWebKitAPI/PlatformUtilities.h: Declared TestPlugInClassNameParameter.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Added the WebProcessPlugIn target.
* TestWebKitAPI/Tests/WebKit2Cocoa/BundleParameters.mm: Added.
(TEST): Tested bundle parameters by verifying that parameter changes in the UI process are observed in the bundle.
* TestWebKitAPI/Tests/WebKit2Cocoa/BundleParametersPlugIn.mm: Added.
(-[BundleParametersPlugIn webProcessPlugIn:didCreateBrowserContextController:]): Started observing changes to a
bundle parameter and asked for an initial notification.
(-[BundleParametersPlugIn dealloc]): Stopped observing changes to a bundle parameter.
(-[BundleParametersPlugIn observeValueForKeyPath:ofObject:change:context:]): When a bundle parameter changes,
mirror its value in the main frame's JSContext.
* TestWebKitAPI/WKWebViewConfigurationExtras.h: Added.
* TestWebKitAPI/WKWebViewConfigurationExtras.mm: Added.
(+[WKWebViewConfiguration testwebkitapi_configurationWithTestPlugInClassName:]): Created a configuration with
TestWebKitAPI's bundle URL and set a bundle parameter indicating the test plug-in's class name.
* TestWebKitAPI/cocoa/PlatformUtilitiesCocoa.mm: Defined TestPlugInClassNameParameter.
* TestWebKitAPI/cocoa/WebProcessPlugIn/Info.plist: Added. Set the principal class to WebProcessPlugIn.
* TestWebKitAPI/cocoa/WebProcessPlugIn/WebProcessPlugIn.mm: Added.
(-[WebProcessPlugIn webProcessPlugIn:initializeWithObject:]): Forwarded to a newly-created test class instance.
(-[WebProcessPlugIn respondsToSelector:]): Returned YES if the test class instance response.
(-[WebProcessPlugIn forwardingTargetForSelector:]): Forwarded unimplemented methods to the test class instance.

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

4 years agoTypo fix after r188842.
ossy@webkit.org [Sun, 23 Aug 2015 21:42:50 +0000 (21:42 +0000)]
Typo fix after r188842.

* CMakeLists.txt:

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

4 years agoSpeculative buildfix after r188828.
ossy@webkit.org [Sun, 23 Aug 2015 21:37:43 +0000 (21:37 +0000)]
Speculative buildfix after r188828.

* CMakeLists.txt:

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

4 years agoUnreviewed, rolling back in r188803.
ggaren@apple.com [Sun, 23 Aug 2015 21:28:38 +0000 (21:28 +0000)]
Unreviewed, rolling back in r188803.

"Debugger's VM should never be null"
https://bugs.webkit.org/show_bug.cgi?id=148341
http://trac.webkit.org/changeset/188803

Source/JavaScriptCore:

* debugger/Debugger.cpp:
(JSC::Debugger::Debugger):
(JSC::Debugger::attach):
(JSC::Debugger::detach):
(JSC::Debugger::isAttached):
(JSC::Debugger::setSteppingMode):
(JSC::Debugger::registerCodeBlock):
(JSC::Debugger::toggleBreakpoint):
(JSC::Debugger::recompileAllJSFunctions):
(JSC::Debugger::setBreakpoint):
(JSC::Debugger::clearBreakpoints):
(JSC::Debugger::clearDebuggerRequests):
(JSC::Debugger::setBreakpointsActivated):
(JSC::Debugger::breakProgram):
(JSC::Debugger::stepOutOfFunction):
(JSC::Debugger::returnEvent):
(JSC::Debugger::didExecuteProgram):
* debugger/Debugger.h:
* inspector/JSGlobalObjectScriptDebugServer.cpp:
(Inspector::JSGlobalObjectScriptDebugServer::JSGlobalObjectScriptDebugServer):
(Inspector::JSGlobalObjectScriptDebugServer::removeListener):
(Inspector::JSGlobalObjectScriptDebugServer::runEventLoopWhilePaused):
(Inspector::JSGlobalObjectScriptDebugServer::recompileAllJSFunctions): Deleted.
* inspector/JSGlobalObjectScriptDebugServer.h:
* inspector/ScriptDebugServer.cpp:
(Inspector::ScriptDebugServer::ScriptDebugServer):
* inspector/ScriptDebugServer.h:

Source/WebCore:

* bindings/js/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer):
(WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
(WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):
* inspector/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::PageScriptDebugServer):
(WebCore::PageScriptDebugServer::recompileAllJSFunctions):
(WebCore::PageScriptDebugServer::didPause):
(WebCore::PageScriptDebugServer::runEventLoopWhilePaused):

Source/WebKit/mac:

* WebView/WebScriptDebugger.mm:
(toWebFrame):
(WebScriptDebugger::WebScriptDebugger):

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

4 years agoURTBF after r188828.
ossy@webkit.org [Sun, 23 Aug 2015 21:27:33 +0000 (21:27 +0000)]
URTBF after r188828.

* WebKitTestRunner/PlatformWebView.h:

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

4 years agoRemove SVGFrameLoaderClient and dataProtocolFrameLoader
antti@apple.com [Sun, 23 Aug 2015 16:37:01 +0000 (16:37 +0000)]
Remove SVGFrameLoaderClient and dataProtocolFrameLoader
https://bugs.webkit.org/show_bug.cgi?id=148370

Reviewed by Darin Adler.

With data protocol handled internally in WebKit these are no longer needed.

This mostly reverts code changes from http://trac.webkit.org/179626 keeping the tests.

* loader/FrameLoaderClient.h:
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::loadDataURL):
(WebCore::ResourceLoader::setDataBufferingPolicy):
(WebCore::ResourceLoader::dataProtocolFrameLoader): Deleted.
* loader/ResourceLoader.h:
(WebCore::ResourceLoader::documentLoader):
(WebCore::ResourceLoader::originalRequest):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::finishLoading):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::dataChanged):
* svg/graphics/SVGImage.h:
* svg/graphics/SVGImageClients.h:

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

4 years agobuild.webkit.org/dashboard: Combined queues don't turn orange on internal failure
ap@apple.com [Sun, 23 Aug 2015 16:33:01 +0000 (16:33 +0000)]
build.webkit.org/dashboard: Combined queues don't turn orange on internal failure
https://bugs.webkit.org/show_bug.cgi?id=148356

Reviewed by Darin Adler.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotCombinedQueueView.js:
(BuildbotCombinedQueueView.prototype.update):

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

4 years agoWeb Inspector: Drop webkit prefixes from animation, keyframes and transform
timothy@apple.com [Sun, 23 Aug 2015 16:31:16 +0000 (16:31 +0000)]
Web Inspector: Drop webkit prefixes from animation, keyframes and transform
https://bugs.webkit.org/show_bug.cgi?id=148364

Reviewed by Darin Adler.

* UserInterface/Views/BreakpointTreeElement.css:
(.breakpoint-generic-line-icon .icon > span):
(.data-updated.breakpoint-generic-line-icon .icon > span):
* UserInterface/Views/ColorPicker.css:
(.color-picker > .slider):
* UserInterface/Views/DashboardContainerView.css:
(.toolbar .dashboard):
(.toolbar .dashboard.slide-out-up):
(.toolbar .dashboard.slide-out-down):
(.toolbar .dashboard.slide-in-up):
(.toolbar .dashboard.slide-in-down):
(@keyframes slide-top-edge):
(@keyframes slide-bottom-edge):
(@-webkit-keyframes slide-top-edge): Deleted.
(@-webkit-keyframes slide-bottom-edge): Deleted.
* UserInterface/Views/DebuggerDashboardView.css:
(.dashboard.debugger .navigation-bar .item.button > .glyph):
(@keyframes pulse-pause-button):
(@-webkit-keyframes pulse-pause-button): Deleted.
* UserInterface/Views/DefaultDashboardView.css:
(.toolbar .dashboard.default > .item.pulsing):
(@keyframes console-item-pulse):
(@-webkit-keyframes console-item-pulse): Deleted.
* UserInterface/Views/GoToLineDialog.css:
(.go-to-line-dialog):
* UserInterface/Views/HoverMenu.css:
(.hover-menu):
* UserInterface/Views/IndeterminateProgressSpinner.css:
(@keyframes discrete-spinner):
(.indeterminate-progress-spinner):
(@-webkit-keyframes discrete-spinner): Deleted.
* UserInterface/Views/Main.css:
(.bouncy-highlight):
(@keyframes bouncy-highlight-animation):
(@-webkit-keyframes bouncy-highlight-animation): Deleted.
* UserInterface/Views/ProbeSetDataGrid.css:
(.details-section.probe-set .data-grid tr.revealed.highlighted):
(@keyframes blink-frame-highlight):
(.details-section.probe-set .data-grid > tr.data-updated):
(@keyframes blink-probe-frame):
(@-webkit-keyframes blink-frame-highlight): Deleted.
(@-webkit-keyframes blink-probe-frame): Deleted.
* UserInterface/Views/TextEditor.css:
(.text-editor > .CodeMirror .highlighted):
(@keyframes text-editor-highlight-fadeout):
(.text-editor > .CodeMirror .hovered-expression-highlight):
(@keyframes text-editor-hovered-expression-highlight-fadeout):
(@-webkit-keyframes text-editor-highlight-fadeout): Deleted.
(@-webkit-keyframes text-editor-hovered-expression-highlight-fadeout): Deleted.
* UserInterface/Views/TimelineOverview.css:
(.timeline-overview.frames > .timeline-ruler > .markers > .divider):
(.timeline-overview.frames > .timeline-ruler:not(.both-handles-clamped) > .selection-handle.right):
(.timeline-overview.frames > .timeline-ruler:not(.both-handles-clamped) > .shaded-area.right):
* UserInterface/Views/TimelineRuler.css:
(.timeline-ruler > .header > .divider):
(.timeline-ruler > .markers > .divider):
(.timeline-ruler > .markers > .marker):
(.timeline-ruler > .selection-handle.left):
(.timeline-ruler > .selection-handle.right):

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

4 years agobuild.webkit.org/dashboard: Respect step's hidden flag
ap@apple.com [Sun, 23 Aug 2015 16:29:45 +0000 (16:29 +0000)]
build.webkit.org/dashboard: Respect step's hidden flag
https://bugs.webkit.org/show_bug.cgi?id=148357

Reviewed by Darin Adler.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
(BuildbotIteration.prototype._parseData):

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

4 years agoAX: Fix accessibility/deleting-iframe-destroys-axcache.html test
commit-queue@webkit.org [Sun, 23 Aug 2015 16:26:29 +0000 (16:26 +0000)]
AX: Fix accessibility/deleting-iframe-destroys-axcache.html test
https://bugs.webkit.org/show_bug.cgi?id=148328

Patch by Nan Wang <n_wang@apple.com> on 2015-08-23
Reviewed by Darin Adler.

Tools:

We should only expose stringValue() when value attribute is set.

* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::stringValue):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::stringValue):

LayoutTests:

* platform/mac/TestExpectations:

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

4 years agoRemove style checking rule regarding OwnPtr and PassOwnPtr
gyuyoung.kim@webkit.org [Sun, 23 Aug 2015 10:35:19 +0000 (10:35 +0000)]
Remove style checking rule regarding OwnPtr and PassOwnPtr
https://bugs.webkit.org/show_bug.cgi?id=148360

Reviewed by Darin Adler.

OwnPtr and PassOwnPtr were totally removed though, style rule is still alive.
Removed it.

* Scripts/do-webcore-rename:
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(PassPtrTest.test_pass_own_ptr_in_function): Deleted.
(PassPtrTest.test_pass_ref_ptr_return_value): Deleted.
(PassPtrTest.test_own_ptr_parameter_value): Deleted.
(WebKitStyleTest.test_names): Deleted.

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

4 years agoFactor out and add logging to swipe-start hysteresis code
timothy_horton@apple.com [Sun, 23 Aug 2015 04:14:44 +0000 (04:14 +0000)]
Factor out and add logging to swipe-start hysteresis code
https://bugs.webkit.org/show_bug.cgi?id=148361

Reviewed by Darin Adler.

* UIProcess/ViewGestureController.cpp:
(WebKit::ViewGestureController::ViewGestureController):
* UIProcess/mac/ViewGestureController.h:
(WebKit::ViewGestureController::wheelEventWasNotHandledByWebCore):
(WebKit::ViewGestureController::shouldIgnorePinnedState):
(WebKit::ViewGestureController::setShouldIgnorePinnedState):
(WebKit::ViewGestureController::PendingSwipeTracker::PendingSwipeTracker):
(WebKit::ViewGestureController::PendingSwipeTracker::shouldIgnorePinnedState):
(WebKit::ViewGestureController::PendingSwipeTracker::setShouldIgnorePinnedState):
Move pending-swipe members into PendingSwipeTracker.

* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::scrollEventCanInfluenceSwipe):
(WebKit::deltaShouldCancelSwipe):
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe):
(WebKit::ViewGestureController::handleScrollWheelEvent):
(WebKit::ViewGestureController::PendingSwipeTracker::handleEvent):
(WebKit::ViewGestureController::PendingSwipeTracker::eventWasNotHandledByWebCore):
(WebKit::ViewGestureController::PendingSwipeTracker::tryToStartSwipe):
(WebKit::ViewGestureController::PendingSwipeTracker::reset):
(WebKit::ViewGestureController::trackSwipeGesture):
(WebKit::ViewGestureController::setDidMoveSwipeSnapshotCallback):
Move pending-swipe methods into PendingSwipeTracker.
Clean up the logic a bit.
Add some logging.

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

4 years agoChange image for type profiler and code coverage profiler blog post.
saambarati1@gmail.com [Sun, 23 Aug 2015 02:28:09 +0000 (02:28 +0000)]
Change image for type profiler and code coverage profiler blog post.

* blog-files/type-profiler-and-code-coverage-profiler/code-coverage-1x.png:
* blog-files/type-profiler-and-code-coverage-profiler/code-coverage-2x.png:

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

4 years agoChange video for type profiler and code coverage profiler blog post.
saambarati1@gmail.com [Sat, 22 Aug 2015 23:05:36 +0000 (23:05 +0000)]
Change video for type profiler and code coverage profiler blog post.

* blog-files/type-profiler-and-code-coverage-profiler/types-changing.mov:

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

4 years agoAdd 1x/2x resources for type profiler and code coverage profiler blog post.
saambarati1@gmail.com [Sat, 22 Aug 2015 22:46:53 +0000 (22:46 +0000)]
Add 1x/2x resources for type profiler and code coverage profiler blog post.

* blog-files/type-profiler-and-code-coverage-profiler/code-coverage-1x.png: Added.
* blog-files/type-profiler-and-code-coverage-profiler/code-coverage-2x.png: Added.
* blog-files/type-profiler-and-code-coverage-profiler/code-coverage.png: Removed.
* blog-files/type-profiler-and-code-coverage-profiler/subtle-bug-1x.png: Added.
* blog-files/type-profiler-and-code-coverage-profiler/subtle-bug-2x.png: Added.
* blog-files/type-profiler-and-code-coverage-profiler/subtle-bug.png: Removed.
* blog-files/type-profiler-and-code-coverage-profiler/type-profiler-api-view-1x.png: Added.
* blog-files/type-profiler-and-code-coverage-profiler/type-profiler-api-view-2x.png: Added.
* blog-files/type-profiler-and-code-coverage-profiler/type-profiler-api-view.png: Removed.
* blog-files/type-profiler-and-code-coverage-profiler/types-everywhere-1x.png: Added.
* blog-files/type-profiler-and-code-coverage-profiler/types-everywhere-2x.png: Added.
* blog-files/type-profiler-and-code-coverage-profiler/types-everywhere.png: Removed.

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

4 years agoNodeList should not have a named getter
cdumez@apple.com [Sat, 22 Aug 2015 22:29:26 +0000 (22:29 +0000)]
NodeList should not have a named getter
https://bugs.webkit.org/show_bug.cgi?id=148117

Reviewed by Darin Adler.

Source/WebCore:

Drop the named property getter on NodeList to match the specification:
https://dom.spec.whatwg.org/#interface-nodelist

This change could be a bit risky but:
1. Firefox and IE never had this named property getter on NodeList.
2. Chrome successfuly dropped this named property getter in early 2014:
   https://src.chromium.org/viewvc/blink?revision=166356&view=revision
3. Our named property getter on NodeList is only partly functional:
   It only matches by 'id' attribute, not by 'name' attribute.
4. Our APIs that were wrongly returning a NodeList instead of an
   HTMLCollection (getElementsByTagName() / getElementsByClassName())
   have been fixed in r188735 and r188809. HTMLCollection does have
   a named property getter.
5. This named getter adds code complexity.

* bindings/js/JSNodeListCustom.cpp:
(WebCore::createWrapper): Deleted.
* dom/ChildNodeList.cpp:
(WebCore::ChildNodeList::invalidateCache): Deleted.
* dom/ChildNodeList.h:
* dom/LiveNodeList.cpp:
* dom/LiveNodeList.h:
* dom/NodeList.h:
* dom/NodeList.idl:
* dom/StaticNodeList.cpp:
(WebCore::StaticElementList::length): Deleted.
(WebCore::StaticElementList::item): Deleted.
* dom/StaticNodeList.h:
* html/HTMLCollection.h:

LayoutTests:

* fast/dom/childnode-item-after-itemname-expected.txt: Removed.
* fast/dom/childnode-item-after-itemname.html: Removed.
Drop test as it is no longer relevant now that NodeList no longer
has a named property getter.

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

4 years agoWebKitTestRunner should use WKWebView on OS X and iOS
timothy_horton@apple.com [Sat, 22 Aug 2015 22:20:46 +0000 (22:20 +0000)]
WebKitTestRunner should use WKWebView on OS X and iOS
https://bugs.webkit.org/show_bug.cgi?id=143743
<rdar://problem/16947123>

Reviewed by Anders Carlsson.
Patch by Enrica Casucci and myself.

* WebKitTestRunner/PlatformWebView.h:
(WTR::PlatformWebView::windowSnapshotEnabled): Deleted.
Add a PlatformWebView constructor that takes a WKWebViewConfiguration
instead of WKContext and WKPageGroup.

Remove the unused, always-true windowSnapshotEnabled().
While technically some platforms don't have window snapshotting,
they just return null instead of implementing windowSnapshotEnabled().

* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createOtherPage):
(WTR::TestController::initialize):
(WTR::TestController::createWebViewWithOptions):
Delegate to the various platforms for creating PlatformWebView instances,
for creating WKContexts, and for accessing WKPreferences,
so that they can do special things (like, use WKWebView instead!).

(WTR::TestController::resetPreferencesToConsistentValues):
Make explicit WebKitTestRunner's desired default for two preferences
which have differing defaults between the antique and modern API,
for consistency's sake.

(WTR::TestController::resetStateToConsistentValues):
Add platformResetStateToConsistentValues.

* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::dumpResults):
Adjust to the aforementioned removal of windowSnapshotEnabled().

* WebKitTestRunner/ios/TestControllerCocoa.mm:
(WTR::TestController::platformResetStateToConsistentValues):
(WTR::TestController::platformPreferences):
(WTR::TestController::platformCreateWebView):
(WTR::TestController::platformCreateOtherPage):
(WTR::TestController::platformInitializeConfiguration):
Implement the new platform functions for the Modern WebKit2 API,
in a new TestControllerCocoa file that is shared between iOS and Mac.

For platformMaybeCreateContext, use the trick that we know we can cast
the WKProcessPool to a WKContextRef to retrieve a WKContextRef from
WKWebView's configuration.

Ditto for WKPreferencesRef and WKPreferences.

Remove user content filters on the WKWebView's userContentController.

* WebKitTestRunner/mac/TestControllerMac.mm:
* WebKitTestRunner/ios/TestControllerIOS.mm:
Move code into TestControllerCocoa.

* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::beginTesting):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::addUserScript):
(WTR::TestRunner::addUserStyleSheet):
Adopt WKBundlePage API for user scripts/sheets.

* WebKitTestRunner/ios/PlatformWebViewIOS.mm:
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
Make and keep a WKWebView instead of a WKView.

* WebKitTestRunner/mac/EventSenderProxy.mm:
(WTR::EventSenderProxy::mouseUp):
(WTR::EventSenderProxy::mouseMoveTo):
Reach inside the WKWebView to the WKView when dispatching events.
This is fairly ugly and we should come up with a better solution.
Also, fix some flipping and style errors.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _windowOcclusionDetectionEnabled]):
(-[WKWebView _setWindowOcclusionDetectionEnabled:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
Add SPI to disable window occlusion detection, for WebKitTestRunner's use.

* Shared/WebPreferencesDefinitions.h:
Remove a completely unused WebPreference. It is a WebCore Setting,
but in the API it's exposed as a WKPage setter and WKView and WKWebView property
instead of as a WKPreference, so there's no need for the WebPreference.

* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageAddUserScript):
(WKBundlePageAddUserStyleSheet):
(WKBundlePageRemoveAllUserContent):
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::addUserScript):
(WebKit::WebPage::addUserStyleSheet):
(WebKit::WebPage::removeAllUserContent):
* WebProcess/WebPage/WebPage.h:
Add WKBundlePage functions for user script and style sheet manipulation.
These use the WebPage's WebUserContentController instead of the WebPageGroupProxy's
(used by the WKBundle functions), so they work correctly with the modern API.

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

4 years agoTweak a test that became flaky on some machines after r188793.
ap@apple.com [Sat, 22 Aug 2015 19:29:44 +0000 (19:29 +0000)]
Tweak a test that became flaky on some machines after r188793.

* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-borders.html:

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

4 years agoUnreviewed, attempt to fix GTK build after r188718
mcatanzaro@igalia.com [Sat, 22 Aug 2015 18:38:29 +0000 (18:38 +0000)]
Unreviewed, attempt to fix GTK build after r188718

Source/WebKit2:

* CMakeLists.txt: Build WKPageConfigurationRef.cpp
* PlatformEfl.cmake: Don't build WKPageConfigurationRef.cpp

Tools:

* WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
(WTR::PlatformWebView::PlatformWebView):

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

4 years agoDFG string concatenation shouldn't be playing fast and loose with effects and OSR...
fpizlo@apple.com [Sat, 22 Aug 2015 18:35:47 +0000 (18:35 +0000)]
DFG string concatenation shouldn't be playing fast and loose with effects and OSR exit
https://bugs.webkit.org/show_bug.cgi?id=148338

Reviewed by Michael Saboff and Saam Barati.

Prior to this change, DFG string concatenation appeared to have various different ways of
creating an OSR exit right after a side effect. That's bad, because the exit will cause
us to reexecute the side effect. The code appears to have some hacks for avoiding this,
but some cases are basically unavoidable, like the OOM case of string concatenation: in
trunk that could cause two executions of the toString operation.

This changes the string concatenation code to either be speculative or effectful but
never both. It's already the case that when this code needs to be effectful, it also
needs to be slow (it does int->string conversions, calls JS functions, etc). So, this is
a small price to pay for sanity.

The biggest part of this change is the introduction of StrCat, which is like MakeRope but
does toString conversions on its own instead of relying on separate nodes. StrCat can
take either 2 or 3 children. It's the effectful but not speculative version of MakeRope.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGBackwardsPropagationPhase.cpp:
(JSC::DFG::BackwardsPropagationPhase::propagate):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::convertStringAddUse):
(JSC::DFG::FixupPhase::fixupToStringOrCallStringConstructor):
(JSC::DFG::FixupPhase::attemptToMakeFastStringAdd):
(JSC::DFG::FixupPhase::canOptimizeStringObjectAccess):
* dfg/DFGNodeType.h:
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
(JSC::DFG::JSValueOperand::JSValueOperand):
(JSC::DFG::JSValueOperand::~JSValueOperand):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGValidate.cpp:
(JSC::DFG::Validate::validate):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLIntrinsicRepository.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compileNode):
(JSC::FTL::DFG::LowerDFGToLLVM::compileValueAdd):
(JSC::FTL::DFG::LowerDFGToLLVM::compileStrCat):
(JSC::FTL::DFG::LowerDFGToLLVM::compileArithAddOrSub):
* jit/JITOperations.h:
* tests/stress/exception-effect-strcat.js: Added. This test previously failed.
* tests/stress/exception-in-strcat-string-overflow.js: Added. An earlier version of this patch made this fail.
* tests/stress/exception-in-strcat.js: Added.

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

4 years ago[JSC] Static hash tables should be 100% compile-time constant.
akling@apple.com [Sat, 22 Aug 2015 18:05:50 +0000 (18:05 +0000)]
[JSC] Static hash tables should be 100% compile-time constant.
<https://webkit.org/b/148359>

Reviewed by Michael Saboff.

Source/JavaScriptCore:

We were dirtying the memory pages containing static hash tables the
first time they were used, when a dynamically allocated index-to-key
table was built and cached in the HashTable struct.

It turns out that this "optimization" was completely useless, since
we've long since decoupled static hash tables from the JSC::VM and
we can get the key for an index via HashTable::values[index].m_key!

We also get rid of VM::keywords which was a little wrapper around
a VM-specific copy of JSC::mainTable. There was nothing VM-specific
about it at all, so clients now use JSC::mainTable directly.

After this change all fooHashTable structs end up in __DATA __const
and no runtime initialization/allocation takes place.

* create_hash_table:
* jsc.cpp:
* parser/Lexer.cpp:
(JSC::isLexerKeyword):
(JSC::Lexer<LChar>::parseIdentifier):
(JSC::Lexer<UChar>::parseIdentifier):
(JSC::Lexer<CharacterType>::parseIdentifierSlowCase):
(JSC::Keywords::Keywords): Deleted.
* parser/Lexer.h:
(JSC::Keywords::isKeyword): Deleted.
(JSC::Keywords::getKeyword): Deleted.
(JSC::Keywords::~Keywords): Deleted.
* runtime/LiteralParser.cpp:
(JSC::LiteralParser<CharType>::tryJSONPParse):
* runtime/Lookup.cpp:
(JSC::HashTable::createTable): Deleted.
(JSC::HashTable::deleteTable): Deleted.
* runtime/Lookup.h:
(JSC::HashTable::entry):
(JSC::HashTable::ConstIterator::key):
(JSC::HashTable::ConstIterator::skipInvalidKeys):
(JSC::HashTable::copy): Deleted.
(JSC::HashTable::initializeIfNeeded): Deleted.
(JSC::HashTable::begin): Deleted.
(JSC::HashTable::end): Deleted.
* runtime/VM.cpp:
(JSC::VM::VM): Deleted.
* runtime/VM.h:
* testRegExp.cpp:

Source/WebCore:

Adjust WebCore bindings generator for new JSC::HashTable layout
and rebaseline the bindings tests for that change.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHashTable):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:

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

4 years agoUnreviewed, fix build without ENABLE_CSS_GRID_LAYOUT after r188582
mcatanzaro@igalia.com [Sat, 22 Aug 2015 17:42:46 +0000 (17:42 +0000)]
Unreviewed, fix build without ENABLE_CSS_GRID_LAYOUT after r188582

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

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

4 years agostd::once_flag needs to be static.
andersca@apple.com [Sat, 22 Aug 2015 17:14:22 +0000 (17:14 +0000)]
std::once_flag needs to be static.

* wtf/mac/DeprecatedSymbolsUsedBySafari.mm:
(WTF::MainThreadFunctionTracker::singleton):

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

4 years agoPage::renderTreeSize() does not include anonymous renderers.
zalan@apple.com [Sat, 22 Aug 2015 13:38:01 +0000 (13:38 +0000)]
Page::renderTreeSize() does not include anonymous renderers.
https://bugs.webkit.org/show_bug.cgi?id=148352

Reviewed by Andreas Kling.

Anonymous renderes take the document as their node. Instead
of checking whether the node is the document, we could just check
if the RenderView is available.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::RenderObject):
(WebCore::RenderObject::~RenderObject):
* rendering/RenderView.cpp:
(WebCore::RenderView::RenderView): Deleted.
* rendering/RenderView.h: Include the RenderView in render tree size as well.

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

4 years agoDecode data URLs in web process
antti@apple.com [Sat, 22 Aug 2015 09:57:23 +0000 (09:57 +0000)]
Decode data URLs in web process
https://bugs.webkit.org/show_bug.cgi?id=148128

Reviewed by Darin Adler.

Source/WebCore:

We currenly send data URLs to networking layer for decoding. This involves a long and slow roundtrip through IPC and API layers.

* WebCore.xcodeproj/project.pbxproj:
* loader/ResourceLoadScheduler.cpp:
(WebCore::ResourceLoadScheduler::maybeLoadQuickLookResource): Deleted.

    Remove this awkward interface for WebKit2.

* loader/ResourceLoadScheduler.h:
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::start):
(WebCore::ResourceLoader::loadDataURL):

    Load using DataURLDecoder.

* loader/ResourceLoader.h:

    Make start() public and export it so it can be called directly from WebKit2.

* platform/network/DataURLDecoder.cpp: Added.
(WebCore::DataURLDecoder::decodeQueue):
(WebCore::DataURLDecoder::DecodeTask::DecodeTask):
(WebCore::DataURLDecoder::createDecodeTask):

    Parse data URL metadata and initialize the decode task.

(WebCore::DataURLDecoder::decodeBase64):
(WebCore::DataURLDecoder::decodeEscaped):
(WebCore::DataURLDecoder::decode):

    Asynchronously decode in a concurrent distpatch queue.

* platform/network/DataURLDecoder.h: Added.
* platform/network/ios/QuickLook.h:
* platform/text/DecodeEscapeSequences.h:
(WebCore::URLEscapeSequence::findEndOfRun):
(WebCore::URLEscapeSequence::decodeRun):

    Factor buffer generation to a function.

(WebCore::decodeEscapeSequences):
(WebCore::decodeURLEscapeSequencesAsData):

    Add decode function that produces bytes instead of a String.

Source/WebKit2:

* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::scheduleLoad):

    Don't send data: loads to the network process, handle them locally.

(WebKit::WebResourceLoadScheduler::startLocalLoad):

    Call ResourceLoder::start() directly.

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

4 years agoAX: aria-table-content.html test failing on windows
commit-queue@webkit.org [Sat, 22 Aug 2015 07:20:33 +0000 (07:20 +0000)]
AX: aria-table-content.html test failing on windows
https://bugs.webkit.org/show_bug.cgi?id=148354

Update TestExpectation for Windows to Skip test.

Patch by Doug Russell <d_russell@apple.com> on 2015-08-22
Reviewed by Tim Horton.

* platform/win/TestExpectations:

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

4 years agoWeb Inspector: Type profiler shows 'Undefined' annotation for functions with no retur...
commit-queue@webkit.org [Sat, 22 Aug 2015 03:27:24 +0000 (03:27 +0000)]
Web Inspector: Type profiler shows 'Undefined' annotation for functions with no return statements
https://bugs.webkit.org/show_bug.cgi?id=146882

Patch by Saam barati <sbarati@apple.com> on 2015-08-21
Reviewed by Joseph Pecoraro.

* UserInterface/Controllers/TypeTokenAnnotator.js:
(WebInspector.TypeTokenAnnotator.prototype._insertTypeToken):
* UserInterface/Models/ScriptSyntaxTree.js:
(WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
(WebInspector.ScriptSyntaxTree):

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

4 years agoUnreviewed, rolling out r188807, r188813, and r188815.
commit-queue@webkit.org [Sat, 22 Aug 2015 02:32:41 +0000 (02:32 +0000)]
Unreviewed, rolling out r188807, r188813, and r188815.
https://bugs.webkit.org/show_bug.cgi?id=148349

lots of 32-bit build problems, better to resolve separately
and try again (Requested by thorton on #webkit).

Reverted changesets:

"WebKitTestRunner should use WKWebView on OS X and iOS"
https://bugs.webkit.org/show_bug.cgi?id=143743
http://trac.webkit.org/changeset/188807

"Stop building WebKitTestRunner for 32-bit platforms"
https://bugs.webkit.org/show_bug.cgi?id=143743
http://trac.webkit.org/changeset/188813

"Stop building WebKitTestRunner for 32-bit platforms"
https://bugs.webkit.org/show_bug.cgi?id=143743
http://trac.webkit.org/changeset/188815

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

4 years agoWeb Inspector: WebInspector.domTreeManager.regionLayoutUpdated does not exist
commit-queue@webkit.org [Sat, 22 Aug 2015 02:27:23 +0000 (02:27 +0000)]
Web Inspector: WebInspector.domTreeManager.regionLayoutUpdated does not exist
https://bugs.webkit.org/show_bug.cgi?id=148348

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

* UserInterface/Protocol/CSSObserver.js:
(WebInspector.CSSObserver.prototype.regionLayoutUpdated):
Just do the same as the new event name.

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

4 years agoStop building WebKitTestRunner for 32-bit platforms
timothy_horton@apple.com [Sat, 22 Aug 2015 01:43:10 +0000 (01:43 +0000)]
Stop building WebKitTestRunner for 32-bit platforms
https://bugs.webkit.org/show_bug.cgi?id=143743
<rdar://problem/16947123>

* WebKitTestRunner/Configurations/DebugRelease.xcconfig:
This is a restriction on the valid set, not the desired set.

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

4 years agoMake Dashboard.Branches be objects of the form (repository, "branch name") and update...
commit-queue@webkit.org [Sat, 22 Aug 2015 01:39:48 +0000 (01:39 +0000)]
Make Dashboard.Branches be objects of the form (repository, "branch name") and update existing code
to work with these new objects.
https://bugs.webkit.org/show_bug.cgi?id=148188

Patch by Jason Marcell <jmarcell@apple.com> on 2015-08-21
Reviewed by Daniel Bates.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Buildbot.js:
(Buildbot.prototype._normalizeQueueInfo): Renamed BuildbotQueue.branch to BuildbotQueue.branches.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotCombinedQueueView.js:
(BuildbotCombinedQueueView): Changed to work with new branch objects which represent a
(repository, "branch name")-pair.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js: Ditto.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js:
(BuildbotQueue): Renamed BuildbotQueue.branch to BuildbotQueue.branches.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:
(BuildbotQueueView.prototype._appendPendingRevisionCount): Changed to work with new branch
objects which represent a (repository, "branch name")-pair.
(BuildbotQueueView.prototype._presentPopoverForPendingCommits): Ditto.
(BuildbotQueueView.prototype._revisionContentWithPopoverForIteration): Ditto.
(BuildbotQueueView.prototype._addDividerToPopover): Ditto.
(BuildbotQueueView.prototype.revisionContentForIteration): Ditto.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js: Renamed
BuildbotQueue.branch to BuildbotQueue.branches.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
(WebKitBuildbot.prototype.get defaultBranches): Changed to new (repository, "branch name") format.

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

4 years agoStop building WebKitTestRunner for 32-bit platforms
timothy_horton@apple.com [Sat, 22 Aug 2015 01:34:47 +0000 (01:34 +0000)]
Stop building WebKitTestRunner for 32-bit platforms
https://bugs.webkit.org/show_bug.cgi?id=143743
<rdar://problem/16947123>

* WebKitTestRunner/Configurations/DebugRelease.xcconfig:
WKWebView is not available on 32-bit OS X.

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

4 years ago[Win] Unreviewed test correction after r188709.
bfulgham@apple.com [Sat, 22 Aug 2015 01:26:50 +0000 (01:26 +0000)]
[Win] Unreviewed test correction after r188709.

I removed a function argument that happened to be mirrored by a global
value with the same name. This prevented a compile error, but testing
showed that the wrong value was being used in the function.

* DumpRenderTree/win/FrameLoadDelegate.cpp:
(FrameLoadDelegate::willPerformClientRedirectToURL): Put function argument
back

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

4 years agoUnreviewed, rolling out r188792 and r188803.
commit-queue@webkit.org [Sat, 22 Aug 2015 00:53:55 +0000 (00:53 +0000)]
Unreviewed, rolling out r188792 and r188803.
https://bugs.webkit.org/show_bug.cgi?id=148347

broke lots of tests, ggaren is going to investigate and reland
(Requested by thorton on #webkit).

Reverted changesets:

"Unify code paths for manually deleting all code"
https://bugs.webkit.org/show_bug.cgi?id=148280
http://trac.webkit.org/changeset/188792

"Debugger's VM should never be null"
https://bugs.webkit.org/show_bug.cgi?id=148341
http://trac.webkit.org/changeset/188803

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

4 years agodocument.getElementsByTagName should return an HTMLCollection
cdumez@apple.com [Sat, 22 Aug 2015 00:50:13 +0000 (00:50 +0000)]
document.getElementsByTagName should return an HTMLCollection
https://bugs.webkit.org/show_bug.cgi?id=110611

Reviewed by Darin Adler.

Source/WebCore:

Update getElementsByTagName*() to return an HTMLCollection as per
the specification:
- https://dom.spec.whatwg.org/#interface-document
- https://dom.spec.whatwg.org/#interface-element

Firefox, Chrome and IE all match the specification but WebKit was
returning a NodeList.

Performance:
DOM/get-elements-by-tag-name-traversal-uncached.html is ~4.5% faster.

Test: fast/dom/getElementsByTagName-return-type.html

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
Rename TagNodeList.* to TagCollection.*

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
Update the function to use descendantsOfType<>() instead of
getElementsByTagName(). The code is both shorter and more efficient.

* dom/ContainerNode.cpp:
(WebCore::ContainerNode::getElementsByTagName):
(WebCore::ContainerNode::getElementsByTagNameForObjC):
(WebCore::ContainerNode::getElementsByTagNameNS):
(WebCore::ContainerNode::getElementsByTagNameNSForObjC):
* dom/ContainerNode.h:
- Have getElementsByTagName*() return an HTMLCollection.
- Introduce versions used by the ObjC bindings that return a NodeList
  for API compatibility reasons.
- Move the localName null check to the *ForObjC versions and use a
  simple assertion for the non ObjC versions. This gets rid of a
  branch for our JS bindings as this function is hot. It is currently
  impossible to get a null AtomicString from our JS bindings code because
  getElementsByTagName() and getElementsByTagName(undefined) in JS end up
  calling ContainerNode::getElementsByTagName("undefined").
  Also getElementsByTagName(null) in JS ends up calling
  ContainerNode::getElementsByTagName("null"). I have also gotten rid of
  most of the getElementsByTagName() calls from our native code. The
  remaining ones either call with a non-null AtomicString and they now
  have a null-check.

* dom/Document.idl:
* dom/Element.idl:
Have getElementsByTagName*() return an HTMLCollection except for ObjC
bindings in order to maintain legacy API compatibility.

* dom/Node.cpp:
(WebCore::Document::invalidateNodeListAndCollectionCaches):
(WebCore::NodeListsNodeData::invalidateCaches):
HTMLCollection::invalidateCache(attr) is now renamed to
invalidateCacheForAttribute(attr) to avoid ambiguity with
HTMLCollection::invalidateCache(doc) and for consistency
with LiveNodeList.

* dom/NodeRareData.h:
Make necessary updates now that TagNodeList is renamed to TagCollection
and is an HTMLCollection.

* dom/TagCollection.cpp: Renamed from Source/WebCore/dom/TagNodeList.cpp.
* dom/TagCollection.h: Renamed from Source/WebCore/dom/TagNodeList.h.
Rename TagNodeList / HTMLTagNodeList to TagCollection / HTMLTagCollection
and inherit CachedHTMLCollection instead of CachedLiveNodeList.

* editing/Editor.cpp:
(WebCore::Editor::applyEditingStyleToBodyElement):
Update code using getElementsByTagName() to reflect the fact that it
now returns an HTMLCollection and item() returns an Element*. This
function is matching any Element with "body" tag, not just HTMLBodyElement
so I did not refactor it to use an descendantsOfType<HTMLBodyElement>().
It is not clear to me what the intention of this code is.

* editing/markup.cpp:
(WebCore::createFragmentFromMarkup):
* editing/markup.h:
- Return a Ref<> instead of a PassRefPtr<> as it can never return null.
- Use descendantsOfType<HTMLAttachmentElement>(fragment) instead of
  getElementsByTagName() as it results in both shorter and more efficient
  code.

* html/CollectionType.h:
Add new ByTag / ByHTMLTag collection types for TagCollection /
HTMLTabCollection.

* html/GenericCachedHTMLCollection.cpp:
(WebCore::GenericCachedHTMLCollection<traversalType>::elementMatches):
Handle new ByTag / ByHTMLTag collection types in the switch statement.

* html/HTMLCollection.cpp:
(WebCore::invalidationTypeExcludingIdAndNameAttributes):
(WebCore::HTMLCollection::~HTMLCollection):
Handle new ByTag / ByHTMLTag collection types in switch statements.

(WebCore::HTMLCollection::tags):
Add a null-check on localName() before calling getElementsByTagName().
This function is currently for ObjC bindings only.

* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::restartSimilarPlugIns):
Simplify / optimize the code by using descendantsOfType<HTMLPlugInImageElement>()
instead of getElementsByTagName().

* html/MediaDocument.cpp:
(WebCore::descendantVideoElement):
Use descendantsOfType<HTMLVideoElement> instead of getElementsByTagNameNS().

Source/WebKit/mac:

* WebView/WebFrame.mm:
(-[WebFrame _documentFragmentWithMarkupString:baseURLString:]):
Use .ptr() as createFragmentFromMarkup() now returns a
Ref<> instead of a RefPtr<>.

Source/WebKit/win:

* DOMCoreClasses.cpp:
(DOMDocument::getElementsByTagName):
(DOMDocument::getElementsByTagNameNS):
Add null checks for localName() before calling
ContainerNode::getElementsByTagName*().

LayoutTests:

* fast/dom/getElementsByTagName-return-type-expected.txt: Added.
* fast/dom/getElementsByTagName-return-type.html: Added.
New test checking that getElementsByTagName*() returns an HTMLcollection.

* fast/dom/NodeList/script-tests/nodelist-item-call-as-function.js:
* fast/dom/domListEnumeration-expected.txt:
* fast/dom/named-items-with-symbol-name-expected.txt:
* fast/dom/script-tests/domListEnumeration.js:
* fast/dom/wrapper-classes-expected.txt:
* fast/dom/wrapper-classes.html:
* js/dom/constructor-expected.txt:
* js/dom/script-tests/constructor.js:
* platform/mac/fast/dom/wrapper-classes-objc-expected.txt:
* platform/mac/fast/dom/wrapper-classes-objc.html:
Rebaseline / update.

* fast/dom/non-numeric-values-numeric-parameters-expected.txt:
One of the checks is now failing because HTMLCollection.item()'s
parameter is optional. The specification says the parameter should
be mandatory so I did not update the test. It was previously passing
because NodeList.item()'s parameter is mandatory.

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

4 years agoParse control flow statements in WebAssembly
commit-queue@webkit.org [Sat, 22 Aug 2015 00:49:20 +0000 (00:49 +0000)]
Parse control flow statements in WebAssembly
https://bugs.webkit.org/show_bug.cgi?id=148333

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

Parse control flow statements in WebAssembly files generated by pack-asmjs
<https://github.com/WebAssembly/polyfill-prototype-1>.

* wasm/WASMConstants.h:
* wasm/WASMFunctionParser.cpp:
(JSC::WASMFunctionParser::parseStatement):
(JSC::WASMFunctionParser::parseIfStatement):
(JSC::WASMFunctionParser::parseIfElseStatement):
(JSC::WASMFunctionParser::parseWhileStatement):
(JSC::WASMFunctionParser::parseDoStatement):
(JSC::WASMFunctionParser::parseLabelStatement):
(JSC::WASMFunctionParser::parseBreakStatement):
(JSC::WASMFunctionParser::parseBreakLabelStatement):
(JSC::WASMFunctionParser::parseContinueStatement):
(JSC::WASMFunctionParser::parseContinueLabelStatement):
(JSC::WASMFunctionParser::parseSwitchStatement):
* wasm/WASMFunctionParser.h:
(JSC::WASMFunctionParser::WASMFunctionParser):
* wasm/WASMReader.cpp:
(JSC::WASMReader::readCompactInt32):
(JSC::WASMReader::readSwitchCase):
* wasm/WASMReader.h:

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

4 years agoWebKitTestRunner should use WKWebView on OS X and iOS
timothy_horton@apple.com [Sat, 22 Aug 2015 00:34:31 +0000 (00:34 +0000)]
WebKitTestRunner should use WKWebView on OS X and iOS
https://bugs.webkit.org/show_bug.cgi?id=143743
<rdar://problem/16947123>

Reviewed by Anders Carlsson.
Patch by Enrica Casucci and myself.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _windowOcclusionDetectionEnabled]):
(-[WKWebView _setWindowOcclusionDetectionEnabled:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
Add SPI to disable window occlusion detection, for WebKitTestRunner's use.

* Shared/WebPreferencesDefinitions.h:
Remove a completely unused WebPreference. It is a WebCore Setting,
but in the API it's exposed as a WKPage setter and WKView and WKWebView property
instead of as a WKPreference, so there's no need for the WebPreference.

* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageAddUserScript):
(WKBundlePageAddUserStyleSheet):
(WKBundlePageRemoveAllUserContent):
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::addUserScript):
(WebKit::WebPage::addUserStyleSheet):
(WebKit::WebPage::removeAllUserContent):
* WebProcess/WebPage/WebPage.h:
Add WKBundlePage functions for user script and style sheet manipulation.
These use the WebPage's WebUserContentController instead of the WebPageGroupProxy's
(used by the WKBundle functions), so they work correctly with the modern API.

* WebKitTestRunner/PlatformWebView.h:
(WTR::PlatformWebView::windowSnapshotEnabled): Deleted.
Add a PlatformWebView constructor that takes a WKWebViewConfiguration
instead of WKContext and WKPageGroup.

Remove the unused, always-true windowSnapshotEnabled().
While technically some platforms don't have window snapshotting,
they just return null instead of implementing windowSnapshotEnabled().

* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createOtherPage):
(WTR::TestController::initialize):
(WTR::TestController::createWebViewWithOptions):
Delegate to the various platforms for creating PlatformWebView instances,
for creating WKContexts, and for accessing WKPreferences,
so that they can do special things (like, use WKWebView instead!).

(WTR::TestController::resetPreferencesToConsistentValues):
Make explicit WebKitTestRunner's desired default for two preferences
which have differing defaults between the antique and modern API,
for consistency's sake.

(WTR::TestController::resetStateToConsistentValues):
Add platformResetStateToConsistentValues.

* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::dumpResults):
Adjust to the aforementioned removal of windowSnapshotEnabled().

* WebKitTestRunner/ios/TestControllerCocoa.mm:
(WTR::TestController::platformResetStateToConsistentValues):
(WTR::TestController::platformPreferences):
(WTR::TestController::platformCreateWebView):
(WTR::TestController::platformCreateOtherPage):
(WTR::TestController::platformInitializeConfiguration):
Implement the new platform functions for the Modern WebKit2 API,
in a new TestControllerCocoa file that is shared between iOS and Mac.

For platformMaybeCreateContext, use the trick that we know we can cast
the WKProcessPool to a WKContextRef to retrieve a WKContextRef from
WKWebView's configuration.

Ditto for WKPreferencesRef and WKPreferences.

Remove user content filters on the WKWebView's userContentController.

* WebKitTestRunner/mac/TestControllerMac.mm:
* WebKitTestRunner/ios/TestControllerIOS.mm:
Move code into TestControllerCocoa.

* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::beginTesting):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::addUserScript):
(WTR::TestRunner::addUserStyleSheet):
Adopt WKBundlePage API for user scripts/sheets.

* WebKitTestRunner/ios/PlatformWebViewIOS.mm:
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
Make and keep a WKWebView instead of a WKView.

* WebKitTestRunner/mac/EventSenderProxy.mm:
(WTR::EventSenderProxy::mouseUp):
(WTR::EventSenderProxy::mouseMoveTo):
Reach inside the WKWebView to the WKView when dispatching events.
This is fairly ugly and we should come up with a better solution.
Also, fix some flipping and style errors.

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

4 years agoBuild fix.
andersca@apple.com [Sat, 22 Aug 2015 00:03:34 +0000 (00:03 +0000)]
Build fix.

* wtf/MainThread.h:

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

4 years agoDebugger's VM should never be null
ggaren@apple.com [Fri, 21 Aug 2015 23:57:07 +0000 (23:57 +0000)]
Debugger's VM should never be null
https://bugs.webkit.org/show_bug.cgi?id=148341

Reviewed by Joseph Pecoraro.

It doesn't make sense for a Debugger's VM to be null, and code related
to maintaining that illusion just caused the Web Inspector to crash on
launch (https://bugs.webkit.org/show_bug.cgi?id=148312). So, let's stop
doing that.

Now, Debugger requires its subclass to provide a never-null VM&.

Source/JavaScriptCore:

Also took the opportunity, based on review feedback, to remove some
confusion in the virtual recompileAllJSFunctions hierarchy, by eliminating
the pure virtual in ScriptDebugServer and the unnecessary override in
JSGlobalObjectScriptDebugServer.

* debugger/Debugger.cpp:
(JSC::Debugger::Debugger):
(JSC::Debugger::attach):
(JSC::Debugger::detach):
(JSC::Debugger::isAttached):
(JSC::Debugger::setSteppingMode):
(JSC::Debugger::registerCodeBlock):
(JSC::Debugger::toggleBreakpoint):
(JSC::Debugger::recompileAllJSFunctions):
(JSC::Debugger::setBreakpoint):
(JSC::Debugger::clearBreakpoints):
(JSC::Debugger::clearDebuggerRequests):
(JSC::Debugger::setBreakpointsActivated):
(JSC::Debugger::breakProgram):
(JSC::Debugger::stepOutOfFunction):
(JSC::Debugger::returnEvent):
(JSC::Debugger::didExecuteProgram):
* debugger/Debugger.h:
* inspector/JSGlobalObjectScriptDebugServer.cpp:
(Inspector::JSGlobalObjectScriptDebugServer::JSGlobalObjectScriptDebugServer):
(Inspector::JSGlobalObjectScriptDebugServer::recompileAllJSFunctions):
(Inspector::JSGlobalObjectScriptDebugServer::runEventLoopWhilePaused):
* inspector/ScriptDebugServer.cpp:
(Inspector::ScriptDebugServer::ScriptDebugServer):
* inspector/ScriptDebugServer.h:

Source/WebCore:

* bindings/js/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer):
(WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
(WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):
* inspector/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::recompileAllJSFunctions):
(WebCore::PageScriptDebugServer::didPause):

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

4 years ago[OS X] Remove dead code from FontCache::systemFallbackForCharacters()
mmaxfield@apple.com [Fri, 21 Aug 2015 23:50:21 +0000 (23:50 +0000)]
[OS X] Remove dead code from FontCache::systemFallbackForCharacters()
https://bugs.webkit.org/show_bug.cgi?id=148218

Reviewed by Daniel Bates.

lookupCTFont() in FontCacheMac.mm will always return the best font (because
CTFontCreateForCharactersWithLanguage() does so). Also, all fonts that will
be created on WebKit's behalf are already printer fonts.

No new tests because there is no behavior change.

* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::systemFallbackForCharacters): Deleted.

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

4 years ago[Win] Unreviewed build fix.
bfulgham@apple.com [Fri, 21 Aug 2015 23:48:52 +0000 (23:48 +0000)]
[Win] Unreviewed build fix.

* win/tools/vsprops/common.props: Ignore a warning that is filling the
build logs with useless cruft.

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

4 years agoRe-mark accessibility/mac/search-with-frames.html flaky
timothy_horton@apple.com [Fri, 21 Aug 2015 23:46:17 +0000 (23:46 +0000)]
Re-mark accessibility/mac/search-with-frames.html flaky

* platform/mac/TestExpectations:
It's still not 100%.

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

4 years agoFix build.
andersca@apple.com [Fri, 21 Aug 2015 23:41:40 +0000 (23:41 +0000)]
Fix build.

* platform/network/win/NetworkStateNotifierWin.cpp:
(WebCore::NetworkStateNotifier::addrChangeCallback):
(WebCore::NetworkStateNotifier::callAddressChanged): Deleted.

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

4 years agoAddress review feedback from Darin.
andersca@apple.com [Fri, 21 Aug 2015 23:37:24 +0000 (23:37 +0000)]
Address review feedback from Darin.

* wtf/MainThread.h:
* wtf/mac/DeprecatedSymbolsUsedBySafari.mm:
(WTF::callOnMainThread):
(WTF::cancelCallOnMainThread):

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