WebKit-https.git
6 years ago2014-01-31 Oliver Hunt <oliver@apple.com>
oliver@apple.com [Sat, 1 Feb 2014 01:37:59 +0000 (01:37 +0000)]
2014-01-31  Oliver Hunt  <oliver@apple.com>

        Rollout r163195 and related patches

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

6 years agoDFG->FTL tier-up shouldn't assume that LoopHints stay at the tops of loops
fpizlo@apple.com [Sat, 1 Feb 2014 01:28:26 +0000 (01:28 +0000)]
DFG->FTL tier-up shouldn't assume that LoopHints stay at the tops of loops
https://bugs.webkit.org/show_bug.cgi?id=128030

Reviewed by Oliver Hunt.

Remove a bogus assertion. The only thing that matters is that the LoopHint had at one
point in time been at the top of a loop header, and that it is now at the top of a
basic block. But the basic block that it's at the top of now doesn't have to be the
same as the loop header that it once was the top of.

* dfg/DFGTierUpCheckInjectionPhase.cpp:
(JSC::DFG::TierUpCheckInjectionPhase::run):
* tests/stress/tier-up-in-loop-with-cfg-simplification.js: Added.
(foo):

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

6 years agoAvoid eagerly creating the JSActivation when the debugger is attached.
mark.lam@apple.com [Sat, 1 Feb 2014 01:24:39 +0000 (01:24 +0000)]
Avoid eagerly creating the JSActivation when the debugger is attached.
<https://webkit.org/b/127910>

Reviewed by Oliver Hunt.

Octane scores for this patch:
    baseline w/o WebInspector: 11621
    patched  w/o WebInspector: 11801
    baseline w/ WebInspector:  3295
    patched  w/ WebInspector:  7070   2.1x improvement

1. Because debugger can potentially create a closure from any call frame,
   we need every function to allocate an activation register and check for
   the need to tear off the activation (if needed) on return.

   However, we do not need to eagerly create the activation object.
   This patch implements the optimization to defer creation of the
   activation object until we actually need it i.e. when:

   1. We encounter a "eval", "with", or "catch" statement.
   2. We've paused in the debugger, and called DebuggerCallFrame::scope().

2. The UnlinkedCodeBlock provides a needsFullScopeChain flag that is used
   to indicate whether the linked CodeBlock will need an activation
   object or not. Under normal circumstances, needsFullScopeChain and
   needsActivation are synonymous. However, with a debugger attached, we
   want the CodeBlock to always allocate an activationRegister even if
   it does not need a "full scope chain".

   Hence, we apply the following definitions to the "flags":

   1. UnlinkedCodeBlock::needsFullScopeChain() - this flag indicates that
      the parser discovered JS artifacts (e.g. use of "eval", "with", etc.)
      that requires an activation.

      BytecodeGenerator's destinationForAssignResult() and leftHandSideNeedsCopy()
      checks needsFullScopeChain().

   2. UnlinkedCodeBlock::hasActivationRegister() - this flag indicates that
      an activation register was created for the UnlinkedCodeBlock either
      because it needsFullScopeChain() or because the debugger is attached.

   3. CodeBlock::needsActivation() reflects UnlinkedCodeBlock's
      hasActivationRegister().

3. Introduced BytecodeGenerator::emitPushFunctionNameScope() and
   BytecodeGenerator::emitPushCatchScope() because the JSNameScope
   pushed for a function name cannot be popped unlike the JSNameScope
   pushed for a "catch". Hence, we have 2 functions to handle the 2 cases
   differently.

4. Removed DebuggerCallFrame::evaluateWithCallFrame() and require that all
   debugger evaluations go through the DebuggerCallFrame::evaluate(). This
   ensures that debugger evaluations require a DebuggerCallFrame.

   DebuggerCallFrame::evaluateWithCallFrame() was used previously because
   we didn't want to instantiate a DebuggerCallFrame on every debug hook
   callback. However, we now only call the debug hooks when needed, and
   this no longer poses a performance problem.

   In addition, when the debug hook does an eval to test a breakpoint
   condition, it is incorrect to evaluate it without a DebuggerCallFrame
   anyway.

5. Added some utility functions to the CallFrame to make it easier to work
   with the activation register in the frame (if present). These utility
   functions should only be called if the CodeBlock::needsActivation() is
   true (which indicates the presence of the activation register). The
   utlity functions are:

   1. CallFrame::hasActivation()
      - checks if the frame's activation object has been created.

   2. CallFrame::activation()
      - returns the frame's activation object.

   3. CallFrame::uncheckedActivation()
      - returns the JSValue in the frame's activation register. May be null.

   4. CallFrame::setActivation()
      - sets the frame's activation object.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
- added symbollic dumping of ResolveMode and ResolveType values for some
  bytecodes.
(JSC::CodeBlock::CodeBlock):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::activationRegister):
(JSC::CodeBlock::uncheckedActivationRegister):
(JSC::CodeBlock::needsActivation):
* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedCodeBlock::needsFullScopeChain):
(JSC::UnlinkedCodeBlock::hasActivationRegister):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::resolveCallee):
(JSC::BytecodeGenerator::createActivationIfNecessary):
(JSC::BytecodeGenerator::emitCallEval):
(JSC::BytecodeGenerator::emitReturn):
(JSC::BytecodeGenerator::emitPushWithScope):
(JSC::BytecodeGenerator::emitPushFunctionNameScope):
(JSC::BytecodeGenerator::emitPushCatchScope):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::TryNode::emitBytecode):
* debugger/Debugger.cpp:
(JSC::Debugger::hasBreakpoint):
(JSC::Debugger::pauseIfNeeded):
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::scope):
(JSC::DebuggerCallFrame::evaluate):
* debugger/DebuggerCallFrame.h:
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseCodeBlock):
* dfg/DFGGraph.h:
- Removed an unused function DFGGraph::needsActivation().
* interpreter/CallFrame.cpp:
(JSC::CallFrame::activation):
(JSC::CallFrame::setActivation):
* interpreter/CallFrame.h:
(JSC::ExecState::hasActivation):
(JSC::ExecState::registers):
* interpreter/CallFrameInlines.h:
(JSC::CallFrame::uncheckedActivation):
* interpreter/Interpreter.cpp:
(JSC::unwindCallFrame):
(JSC::Interpreter::unwind):
* jit/JITOperations.cpp:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):

* runtime/JSScope.cpp:
* runtime/JSScope.h:
(JSC::resolveModeName):
(JSC::resolveTypeName):
- utility functions for decoding names of the ResolveMode and ResolveType.
  These are used in CodeBlock::dumpBytecode().

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

6 years agoAttempt to fix Production Dashboard after <http://trac.webkit.org/changeset/163213>
dbates@webkit.org [Sat, 1 Feb 2014 01:14:47 +0000 (01:14 +0000)]
Attempt to fix Production Dashboard after <trac.webkit.org/changeset/163213>
(https://bugs.webkit.org/show_bug.cgi?id=127849)

Reviewed by David Farler.

Pass credentials when querying build bot iteration.

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

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

6 years agoFix iOS build.
andersca@apple.com [Sat, 1 Feb 2014 00:57:33 +0000 (00:57 +0000)]
Fix iOS build.

* TestWebKitAPI/Configurations/Base.xcconfig:

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

6 years agoUpdate test results for a new DOM URL test (we now pass more).
ap@apple.com [Sat, 1 Feb 2014 00:44:11 +0000 (00:44 +0000)]
Update test results for a new DOM URL test (we now pass more).

* fast/dom/DOMURL/invalid-url-getters-expected.txt:

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

6 years ago[wk2] PlatformCALayerRemoteCustom doesn't work on iOS
timothy_horton@apple.com [Sat, 1 Feb 2014 00:34:12 +0000 (00:34 +0000)]
[wk2] PlatformCALayerRemoteCustom doesn't work on iOS
https://bugs.webkit.org/show_bug.cgi?id=128025
<rdar://problem/15950271>

Reviewed by Simon Fraser.

* Platform/mac/LayerHostingContext.h:
* Platform/mac/LayerHostingContext.mm:
(WebKit::LayerHostingContext::createForPort):
(WebKit::LayerHostingContext::createForExternalHostingProcess):
Use the new macro name (in a lot of places).
Rename LayerHostingContext::createForWindowServer() to createForExternalHostingProcess().
Don't use WKCAContextMakeRemoteForWindowServer on iOS, just use the CAContext
SPI directly. We don't want our CAContext to be hit tested because it's purely
presentational.

* UIProcess/API/ios/PageClientImplIOS.h:
iOS always hosts layers in an external process.

* PluginProcess/mac/PluginControllerProxyMac.mm:
(WebKit::PluginControllerProxy::updateLayerHostingContext):
* Shared/LayerTreeContext.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::viewLayerHostingMode):
* UIProcess/PageClient.h:
(WebKit::PageClient::viewLayerHostingMode):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::viewStateDidChange):
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::NetscapePlugin):
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::compositingRenderServerPort):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::setLayerHostingMode):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::reinitializeWebPage):
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
(PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::updateLayerHostingContext):
Use enum class for LayerHostingMode and rename the members to InProcess and OutOfProcess.

* Plugins/Hosted/WebHostedNetscapePluginView.mm:
(-[WebHostedNetscapePluginView windowHostsLayersInWindowServer]):
Use the new macro name.

* wtf/Platform.h:
Rename HAVE_LAYER_HOSTING_IN_WINDOW_SERVER to HAVE_OUT_OF_PROCESS_LAYER_HOSTING
and make it true on iOS.

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

6 years agoAdd session support to WebPlatformStrategies
commit-queue@webkit.org [Sat, 1 Feb 2014 00:24:30 +0000 (00:24 +0000)]
Add session support to WebPlatformStrategies
https://bugs.webkit.org/show_bug.cgi?id=127926

Patch by Martin Hock <mhock@apple.com> on 2014-01-31
Reviewed by Alexey Proskuryakov.

* NetworkProcess/mac/RemoteNetworkingContext.mm:
(WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
* Shared/SessionTracker.cpp:
(WebKit::storageSessionToID):
(WebKit::SessionTracker::session):
(WebKit::SessionTracker::sessionID):
(WebKit::SessionTracker::setSession):
(WebKit::SessionTracker::destroySession):
* Shared/SessionTracker.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setSession):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::cookiesForDOM):
(WebKit::WebPlatformStrategies::setCookiesFromDOM):
(WebKit::WebPlatformStrategies::cookiesEnabled):
(WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
(WebKit::WebPlatformStrategies::getRawCookies):
(WebKit::WebPlatformStrategies::deleteCookie):
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setSessionID): Ensure the storage session exists.
* WebProcess/WebPage/WebPage.h:

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

6 years agoEven when in fixed layout mode, some platforms need to do layout after a viewport...
simon.fraser@apple.com [Fri, 31 Jan 2014 23:57:29 +0000 (23:57 +0000)]
Even when in fixed layout mode, some platforms need to do layout after a viewport change
https://bugs.webkit.org/show_bug.cgi?id=128003

Reviewed by Andreas Kling.

Re-land 163182 with a less aggresive check in visibleContentsResized() for
needing to layout.

iOS uses fixed layout mode in both WK1 and WK2, but lays out fixed position
elements relative to a variable viewport. This code assumed that fixed layout
implies a fixed viewport.

Fix by testing for useCustomFixedPositionLayoutRect() in the fixed layout case.

Also removed RenderView::hasCustomFixedPosition() which is no longer used.

* page/FrameView.cpp:
(WebCore::FrameView::shouldLayoutAfterViewportChange):
(WebCore::FrameView::visibleContentsResized):
* page/FrameView.h:
* rendering/RenderView.cpp:
* rendering/RenderView.h:

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

6 years agoWebKitTestRunner project doesn't show Mac as a valid destination architecture.
simon.fraser@apple.com [Fri, 31 Jan 2014 23:57:27 +0000 (23:57 +0000)]
WebKitTestRunner project doesn't show Mac as a valid destination architecture.

Make sure that SUPPORTED_PLATFORMS is defined in Base.xcconfig.

Also add BaseTarget.xcconfig to the project.

* WebKitTestRunner/Configurations/Base.xcconfig:
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:

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

6 years agoREGRESSION: Crash in sanitizeStackForVMImpl when scrolling @ lifehacker.com.au
msaboff@apple.com [Fri, 31 Jan 2014 23:53:52 +0000 (23:53 +0000)]
REGRESSION: Crash in sanitizeStackForVMImpl when scrolling @ lifehacker.com.au
https://bugs.webkit.org/show_bug.cgi?id=128017

Reviewed by Filip Pizlo.

Moved the setting and saving of VM::stackPointerAtVMEntry and the corresponding stack limit
to JSLock and JSLock::DropAllLocks.  The saved data is now stored in per-thread in
WTFThreadData.

Source/JavaScriptCore:

* runtime/InitializeThreading.cpp:
(JSC::initializeThreading):
* runtime/JSLock.cpp:
(JSC::JSLock::lock):
(JSC::JSLock::unlock):
(JSC::JSLock::DropAllLocks::DropAllLocks):
(JSC::JSLock::DropAllLocks::~DropAllLocks):
* runtime/JSLock.h:
* runtime/VMEntryScope.cpp:
(JSC::VMEntryScope::VMEntryScope):
(JSC::VMEntryScope::~VMEntryScope):
* runtime/VMEntryScope.h:

Source/WTF:

* wtf/WTFThreadData.cpp:
(WTF::WTFThreadData::WTFThreadData):
* wtf/WTFThreadData.h:
(WTF::WTFThreadData::savedStackPointerAtVMEntry):
(WTF::WTFThreadData::setSavedStackPointerAtVMEntry):
(WTF::WTFThreadData::savedLastStackTop):
(WTF::WTFThreadData::setSavedLastStackTop):
(WTF::WTFThreadData::savedReservedZoneSize):
(WTF::WTFThreadData::setSavedReservedZoneSize):

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

6 years agoWebKit Bot Watcher's Dashboard: Access restricted queue should only prompt for HTTP...
dbates@webkit.org [Fri, 31 Jan 2014 23:31:00 +0000 (23:31 +0000)]
WebKit Bot Watcher's Dashboard: Access restricted queue should only prompt for HTTP credentials once per page load
https://bugs.webkit.org/show_bug.cgi?id=127849

Reviewed by Alexey Proskuryakov.

Currently whenever the dashboard updates the status of a queue whose Buildbot requires authentication
it will cause a browser to prompt for credentials once per update until valid credentials are provided.
Instead we should keep track of Buildbots that respond with an HTTP 401 Unauthorized status code to avoid
subsequently querying them and hence cause a browser to prompt for credentials. Together with an optional
hint provided when instantiating a Buildbot object as to whether it requires authentication, we can make
the dashboard prompt for HTTP credentials exactly once per page load for each queue whose associated
Buildbot requires authentication.

Queues whose Buildbot wasn't authenticated will show in the dashboard as "unauthorized". Clicking on
this status message will cause the browser to prompt for credentials.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Buildbot.js:
(Buildbot): Initialize instance variable authenticationStatus to Buildbot.AuthenticationStatus.Unauthenticated.
(Buildbot.prototype.get needsAuthentication): Added.
(Buildbot.prototype.get authenticationStatus): Added.
(Buildbot.prototype.get isAuthenticated): Added.
(Buildbot.prototype.set isAuthenticated): Added.
(Buildbot.prototype.updateQueues): Added.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotBuilderQueueView.js:
(BuildbotBuilderQueueView.prototype.update.appendBuilderQueueStatus): Modified to call
BuildbotQueueView.prototype._appendUnauthorizedLineView() to update the view and show status of the queue as
"unauthorized" if the Buildbot associated with the queue is either unauthenticated or was given invalid credentials.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js:
(BuildbotQueue.prototype.update): Return immediately if the associated Buildbot requires authentication.
Additionally, if the JSON load fails with an HTTP 401 Unauthorized access error (say, credentials were
invalidated) then update the authentication status of the Buildbot to avoid subsequently prompting a
person for credentials the next time the queue update timer fires.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:
(BuildbotQueueView): Register as a listener for event BuildbotQueue.Event.UnauthorizedAccess on each queue
so that the view can be updated to show status "unauthorized".
(BuildbotQueueView.prototype._appendUnauthorizedLineView): Added.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js:
(BuildbotTesterQueueView.prototype.update.appendBuilderQueueStatus):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/StatusLineView.js: Added new status, StatusLineView.Status.Unauthorized.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/StatusLineView.css:
(.status-line.unauthorized .bubble): Added.
(.status-line.unauthorized .bubble.pictogram): Added.
(.status-line.unauthorized .message): Added.

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

6 years agoExpose creation and modification times for LocalStorage
ap@apple.com [Fri, 31 Jan 2014 23:28:44 +0000 (23:28 +0000)]
Expose creation and modification times for LocalStorage
https://bugs.webkit.org/show_bug.cgi?id=128018

Reviewed by Anders Carlsson.

Source/WebCore:

* WebCore.exp.in: Export FileSystem functions to get file times.

Source/WebKit2:

* UIProcess/API/C/WKKeyValueStorageManager.cpp:
(WKKeyValueStorageManagerGetOriginKey):
(WKKeyValueStorageManagerGetCreationTimeKey):
(WKKeyValueStorageManagerGetModificationTimeKey):
(WKKeyValueStorageManagerGetStorageDetailsByOrigin):
* UIProcess/API/C/WKKeyValueStorageManager.h:
* UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
(WebKit::LocalStorageDatabaseTracker::origins):
(WebKit::LocalStorageDatabaseTracker::details):
* UIProcess/Storage/LocalStorageDatabaseTracker.h:
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::getStorageDetailsByOrigin):
(WebKit::StorageManager::getStorageDetailsByOriginInternal):
* UIProcess/Storage/StorageManager.h:
* UIProcess/WebKeyValueStorageManager.cpp:
(WebKit::WebKeyValueStorageManager::originKey):
(WebKit::WebKeyValueStorageManager::creationTimeKey):
(WebKit::WebKeyValueStorageManager::modificationTimeKey):
(WebKit::didGetKeyValueStorageOrigins):
(WebKit::didGetStorageDetailsByOrigin):
(WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
* UIProcess/WebKeyValueStorageManager.h:
* WebKit2.xcodeproj/project.pbxproj:

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

6 years agoDon't need a JSNameScope for the callee name just for the debugger.
mark.lam@apple.com [Fri, 31 Jan 2014 23:18:15 +0000 (23:18 +0000)]
Don't need a JSNameScope for the callee name just for the debugger.
<https://webkit.org/b/128024>

Reviewed by Geoffrey Garen.

Currently, in the bytecode for a function, we push a JSNamedScope for
the name of the function when a debugger is attached. The name scope for
the function name is only needed for evals which can redefine the name
to resolve to something else, and can later delete the redefined name
which should revert the resolution of the name to the original function.
The debugger does not need this feature because it declares all new vars
in a temporary nested scope. Hence, we can remove the presence of the
debugger as a criteria for pushing the JSNameScope.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::resolveCallee):
(JSC::BytecodeGenerator::addCallee):

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

6 years agoImplement (most of) URL API
mjs@apple.com [Fri, 31 Jan 2014 23:06:25 +0000 (23:06 +0000)]
Implement (most of) URL API
https://bugs.webkit.org/show_bug.cgi?id=127795

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Tests: fast/dom/DOMURL/get-href-attribute-port.html
       fast/dom/DOMURL/invalid-url-getters.html
       fast/dom/DOMURL/set-href-attribute-hash.html
       fast/dom/DOMURL/set-href-attribute-host.html
       fast/dom/DOMURL/set-href-attribute-hostname.html
       fast/dom/DOMURL/set-href-attribute-pathname.html
       fast/dom/DOMURL/set-href-attribute-port.html
       fast/dom/DOMURL/set-href-attribute-protocol.html
       fast/dom/DOMURL/set-href-attribute-search.html
       fast/dom/DOMURL/set-href-attribute-whitespace.html
       fast/dom/DOMURL/url-constructor.html
       fast/dom/DOMURL/url-origin.html
       fast/dom/DOMURL/url-password.html
       fast/dom/DOMURL/url-username.html

* CMakeLists.txt: Update for new IDL file.
* DerivedSources.make: ditto
* GNUmakefile.list.am: ditto
* html/DOMURL.cpp: Implement URL() constructor and instance methods; cribbed from
HTMLAnchorElement mostly
(WebCore::DOMURL::DOMURL):
(WebCore::DOMURL::href):
(WebCore::DOMURL::setHref):
(WebCore::DOMURL::toString):
(WebCore::DOMURL::origin):
(WebCore::DOMURL::protocol):
(WebCore::DOMURL::setProtocol):
(WebCore::DOMURL::username):
(WebCore::DOMURL::setUsername):
(WebCore::DOMURL::password):
(WebCore::DOMURL::setPassword):
(WebCore::DOMURL::host):
(WebCore::parsePortFromStringPosition):
(WebCore::DOMURL::setHost):
(WebCore::DOMURL::hostname):
(WebCore::DOMURL::setHostname):
(WebCore::DOMURL::port):
(WebCore::DOMURL::setPort):
(WebCore::DOMURL::pathname):
(WebCore::DOMURL::setPathname):
(WebCore::DOMURL::search):
(WebCore::DOMURL::setSearch):
(WebCore::DOMURL::hash):
(WebCore::DOMURL::setHash):
* html/DOMURL.h:
(WebCore::DOMURL::create):
* html/DOMURL.idl: Update for new methods.
* html/URLUtils.idl: Added. New IDL file that contains most of the interface.

LayoutTests:

Add a bunch of new tests for URL(), copied from HTMLAnchorElement API tests:

* fast/dom/DOMURL/get-href-attribute-port-expected.txt: Added.
* fast/dom/DOMURL/get-href-attribute-port.html: Added.
* fast/dom/DOMURL/resources: Added.
* fast/dom/DOMURL/resources/iframe-with-anchor.html: Added.
* fast/dom/DOMURL/set-href-attribute-hash-expected.txt: Added.
* fast/dom/DOMURL/set-href-attribute-hash.html: Added.
* fast/dom/DOMURL/set-href-attribute-host-expected.txt: Added.
* fast/dom/DOMURL/set-href-attribute-host.html: Added.
* fast/dom/DOMURL/set-href-attribute-hostname-expected.txt: Added.
* fast/dom/DOMURL/set-href-attribute-hostname.html: Added.
* fast/dom/DOMURL/set-href-attribute-pathname-expected.txt: Added.
* fast/dom/DOMURL/set-href-attribute-pathname.html: Added.
* fast/dom/DOMURL/set-href-attribute-port-expected.txt: Added.
* fast/dom/DOMURL/set-href-attribute-port.html: Added.
* fast/dom/DOMURL/set-href-attribute-protocol-expected.txt: Added.
* fast/dom/DOMURL/set-href-attribute-protocol.html: Added.
* fast/dom/DOMURL/set-href-attribute-search-expected.txt: Added.
* fast/dom/DOMURL/set-href-attribute-search.html: Added.
* fast/dom/DOMURL/set-href-attribute-whitespace-expected.txt: Added.
* fast/dom/DOMURL/set-href-attribute-whitespace.html: Added.
* fast/dom/DOMURL/url-origin-expected.txt: Added.
* fast/dom/DOMURL/url-origin.html: Added.

Brand new tests for username and password properties, accessors on invalid URLS,
and different constructor modes:
* fast/dom/DOMURL/invalid-url-getters-expected.txt: Added.
* fast/dom/DOMURL/invalid-url-getters.html: Added.
* fast/dom/DOMURL/url-constructor-expected.txt: Added.
* fast/dom/DOMURL/url-constructor.html: Added.
* fast/dom/DOMURL/url-password-expected.txt: Added.
* fast/dom/DOMURL/url-password.html: Added.
* fast/dom/DOMURL/url-username-expected.txt: Added.
* fast/dom/DOMURL/url-username.html: Added.

Update tests and results for the fact that URL constructor takes arguments.
* fast/dom/DOMURL/check-instanceof-domurl-functions.html:
* fast/dom/constructed-objects-prototypes-expected.txt:
* fast/dom/script-tests/constructed-objects-prototypes.js:
* js/dom/constructor-length.html:
* platform/efl/js/dom/constructor-length-expected.txt:
* platform/gtk-wk2/js/dom/constructor-length-expected.txt:
* platform/gtk/js/dom/constructor-length-expected.txt:
* platform/mac/js/dom/constructor-length-expected.txt:

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

6 years agoUnreviewed, build fix.
fpizlo@apple.com [Fri, 31 Jan 2014 22:59:49 +0000 (22:59 +0000)]
Unreviewed, build fix.

* ftl/FTLOSREntry.cpp:

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

6 years agoUnreviewed, really make --copy-libraries a no-able option.
fpizlo@apple.com [Fri, 31 Jan 2014 22:57:44 +0000 (22:57 +0000)]
Unreviewed, really make --copy-libraries a no-able option.

* Scripts/build-jsc:

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

6 years agoCreate clipping path from <box> value
bjonesbe@adobe.com [Fri, 31 Jan 2014 22:44:26 +0000 (22:44 +0000)]
Create clipping path from <box> value
https://bugs.webkit.org/show_bug.cgi?id=126205

Reviewed by Dirk Schulze.

Source/WebCore:

This implements <box> values for border, content, and padding boxes.
Since margin box is not implemented as a reference box, this does not
implement margin box value.

Tests: css3/masking/clip-path-border-box.html
       css3/masking/clip-path-content-box.html
       css3/masking/clip-path-padding-box.html

* rendering/ClipPathOperation.h:
(WebCore::BoxClipPathOperation::pathForReferenceRect): Implement.
* rendering/RenderLayer.cpp:
(WebCore::computeReferenceBox): Pull out reference box calculation.
(WebCore::RenderLayer::setupClipPath): Add support for <box> values.
* rendering/shapes/ShapeInfo.cpp:
(WebCore::ShapeInfo<RenderType>::computedShape): Add FIXME comment.

LayoutTests:

Tests for border, padding and content box values. Margin is
unimplemented as of yet.

* css3/masking/clip-path-border-box-expected.html: Added.
* css3/masking/clip-path-border-box.html: Added.
* css3/masking/clip-path-content-box-expected.html: Added.
* css3/masking/clip-path-content-box.html: Added.
* css3/masking/clip-path-padding-box-expected.html: Added.
* css3/masking/clip-path-padding-box.html: Added.

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

6 years agoFix windows
oliver@apple.com [Fri, 31 Jan 2014 22:35:14 +0000 (22:35 +0000)]
Fix windows

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

6 years agoUnreviewed, really add the --copy-libraries option.
fpizlo@apple.com [Fri, 31 Jan 2014 22:26:38 +0000 (22:26 +0000)]
Unreviewed, really add the --copy-libraries option.

* Scripts/build-jsc:

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

6 years agoUnreviewed, fix the script for older Rubies.
fpizlo@apple.com [Fri, 31 Jan 2014 22:23:09 +0000 (22:23 +0000)]
Unreviewed, fix the script for older Rubies.

* Scripts/export-llvm-build:

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

6 years agoAdd webView:didReceiveServerRedirectForProvisionalNavigation:
andersca@apple.com [Fri, 31 Jan 2014 22:21:27 +0000 (22:21 +0000)]
Add webView:didReceiveServerRedirectForProvisionalNavigation:
https://bugs.webkit.org/show_bug.cgi?id=128016

Reviewed by Dan Bernstein.

* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

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

6 years agoIDB: Index cursor preliminary support
beidson@apple.com [Fri, 31 Jan 2014 22:18:08 +0000 (22:18 +0000)]
IDB: Index cursor preliminary support
https://bugs.webkit.org/show_bug.cgi?id=127869

Reviewed by Sam Weinig.

This gets index cursors running and - for some situations - returning results.

Bug 127870 will make them fully functional.

* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
(WebKit::getIndexStatement): Using the key and sorting parameters, find the appropriate SQL
  statement to run an index cursor.
(WebKit::getObjectStoreStatement): Same, but for object store cursors.
(WebKit::SQLiteIDBCursor::establishStatement): Depending on the type of cursor, choose the
  correct SQL query and id to use.
(WebKit::SQLiteIDBCursor::createSQLiteStatement): With the passed in SQL and id, handle both
  index and object store cursors.
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.h:

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

6 years agoFix 32bit.
oliver@apple.com [Fri, 31 Jan 2014 22:10:33 +0000 (22:10 +0000)]
Fix 32bit.

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

6 years agoHaving a custom LLVM checkout should always override all other ways of getting LLVM
fpizlo@apple.com [Fri, 31 Jan 2014 21:59:39 +0000 (21:59 +0000)]
Having a custom LLVM checkout should always override all other ways of getting LLVM
https://bugs.webkit.org/show_bug.cgi?id=128015

Reviewed by Oliver Hunt.

* Scripts/copy-webkitlibraries-to-product-directory:

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

6 years agoAdd options to force debugger / profiler bytecode generation.
mark.lam@apple.com [Fri, 31 Jan 2014 21:59:02 +0000 (21:59 +0000)]
Add options to force debugger / profiler bytecode generation.
<https://webkit.org/b/128014>

Reviewed by Oliver Hunt.

Add Options::forceDebuggerBytecodeGeneration() and
Options::forceProfilerBytecodeGeneration(). These options make it more
convenient to do correctness testing when debugger / profiler bytecodes
are generated.

These options are disabled by default.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* runtime/Options.h:

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

6 years agoWebKit Bot Watcher's Dashboard: Teach JSON.load() to take optional failure callback...
dbates@webkit.org [Fri, 31 Jan 2014 21:56:30 +0000 (21:56 +0000)]
WebKit Bot Watcher's Dashboard: Teach JSON.load() to take optional failure callback function
https://bugs.webkit.org/show_bug.cgi?id=127924

Reviewed by Alexey Proskuryakov.

Towards providing better error handling when a JSON load fails with a non-200 HTTP status
code, we should teach JSON.load() to take an optional failure callback function and invoke
it when either a load error or a JSON parsing error occurs.

As a side benefit of having a failure callback function a caller can separate the error handling
logic for a JSON load or parse error from the logic of handling a successful parsing of JSON content.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
(BuildbotIteration.prototype.loadLayoutTestResults): Move JSON parser error logic into failure
callback function.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Utilities.js:
(JSON.load): Modified to take optional failure callback function called failureCallback.

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

6 years agoMake it possible to implement JS builtins in JS
oliver@apple.com [Fri, 31 Jan 2014 21:34:38 +0000 (21:34 +0000)]
Make it possible to implement JS builtins in JS
https://bugs.webkit.org/show_bug.cgi?id=127887

Reviewed by Michael Saboff.

.:

CMake updates

* Source/cmake/gtest/CMakeLists.txt:

Source/JavaScriptCore:

This patch makes it possible to write builtin functions in JS.
The bindings, generators, and definitions are all created automatically
based on js files in the builtins/ directory.  This patch includes one
such case: Array.prototype.js with an implementation of every().

There's a lot of refactoring to make it possible for CommonIdentifiers
to include the output of the generated files (DerivedSources/JSCBuiltins.{h,cpp})
without breaking the offset extractor. The result of this refactoring
is that CommonIdentifiers, and a few other miscellaneous headers now
need to be included directly as they were formerly captured through other
paths.

In addition this adds a flag to the Lookup table's hashentry to indicate
that a static function is actually backed by JS. There is then a lot of
logic to thread the special nature of the functon to where it matters.
This allows toString(), .caller, etc to mimic the behaviour of a host
function.

Notes on writing builtins:
 - Each function is compiled independently of the others, and those
   implementations cannot currently capture all global properties (as
   that could be potentially unsafe). If a function does capture a
   global we will deliberately crash.
 - For those "global" properties that we do want access to, we use
   the @ prefix, e.g. Object(this) becomes @Object(this). The @ identifiers
   are private names, and behave just like regular properties, only
   without the risk of adulteration. Again, in the @Object case, we
   explicitly duplicate the ObjectConstructor reference on the GlobalObject
   so that we have guaranteed access to the original version of the
   constructor.
 - call, apply, eval, and Function are all rejected identifiers, again
   to prevent anything from accidentally using an adulterated object.
   Instead @call and @apply are available, and happily they completely
   drop the neq_ptr instruction as they're defined as always being the
   original call/apply functions.

These restrictions are just intended to make it harder to accidentally
make changes that are incorrect (for instance calling whatever has been
assigned to global.Object, instead of the original constructor function).
However, making a mistake like this should result in a purely semantic
error as fundamentally these functions are treated as though they were
regular JS code in the host global, and have no more privileges than
any other JS.

The initial proof of concept is Array.prototype.every, this shows a 65%
performance improvement, and that improvement is significantly hurt by
our poor optimisation of op_in.

As this is such a limited function, we have not yet exported all symbols
that we could possibly need, but as we implement more, the likelihood
of encountering missing features will reduce.

This did require breaking out a JSStringInlines header, and required
fixing a few objects that were trying to using PropertyName::publicName
rather than PropertyName::uid.

* API/JSCallbackObjectFunctions.h:
(JSC::JSCallbackObject<Parent>::getOwnPropertySlot):
(JSC::JSCallbackObject<Parent>::put):
(JSC::JSCallbackObject<Parent>::deleteProperty):
(JSC::JSCallbackObject<Parent>::getStaticValue):
(JSC::JSCallbackObject<Parent>::staticFunctionGetter):
(JSC::JSCallbackObject<Parent>::callbackGetter):
* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* builtins/Array.prototype.js:
(every):
* builtins/BuiltinExecutables.cpp: Added.
(JSC::BuiltinExecutables::BuiltinExecutables):
(JSC::BuiltinExecutables::createBuiltinExecutable):
* builtins/BuiltinExecutables.h:
(JSC::BuiltinExecutables::create):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
* bytecode/CodeBlock.h:
* bytecode/ProfiledCodeBlockJettisoningWatchpoint.cpp:
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::generateFunctionCodeBlock):
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
(JSC::UnlinkedFunctionExecutable::codeBlockFor):
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
* bytecode/UnlinkedCodeBlock.h:
(JSC::ExecutableInfo::ExecutableInfo):
(JSC::UnlinkedFunctionExecutable::create):
(JSC::UnlinkedFunctionExecutable::toStrictness):
(JSC::UnlinkedFunctionExecutable::isBuiltinFunction):
(JSC::UnlinkedCodeBlock::isBuiltinFunction):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::isBuiltinFunction):
(JSC::BytecodeGenerator::makeFunction):
* bytecompiler/NodesCodegen.cpp:
(JSC::CallFunctionCallDotNode::emitBytecode):
(JSC::ApplyFunctionCallDotNode::emitBytecode):
* create_hash_table:
* dfg/DFGOperations.cpp:
* generate-js-builtins: Added.
(getCopyright):
(getFunctions):
(generateCode):
(mangleName):
(FunctionExecutable):
(Identifier):
(JSGlobalObject):
(SourceCode):
(UnlinkedFunctionExecutable):
(VM):
* interpreter/Interpreter.cpp:
* interpreter/ProtoCallFrame.cpp:
* jit/JITOpcodes.cpp:
* jit/JITOpcodes32_64.cpp:
* jit/JITOperations.cpp:
* jit/JITPropertyAccess.cpp:
* jit/JITPropertyAccess32_64.cpp:
* jsc.cpp:
* llint/LLIntSlowPaths.cpp:
* parser/ASTBuilder.h:
(JSC::ASTBuilder::makeFunctionCallNode):
* parser/Lexer.cpp:
(JSC::Lexer<T>::Lexer):
(JSC::isSafeIdentifier):
(JSC::Lexer<LChar>::parseIdentifier):
(JSC::Lexer<UChar>::parseIdentifier):
(JSC::Lexer<T>::lex):
* parser/Lexer.h:
(JSC::isSafeIdentifier):
(JSC::Lexer<T>::lexExpectIdentifier):
* parser/Nodes.cpp:
(JSC::ProgramNode::setClosedVariables):
* parser/Nodes.h:
(JSC::ScopeNode::capturedVariables):
(JSC::ScopeNode::setClosedVariables):
(JSC::ProgramNode::closedVariables):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::Parser):
(JSC::Parser<LexerType>::parseInner):
(JSC::Parser<LexerType>::didFinishParsing):
(JSC::Parser<LexerType>::printUnexpectedTokenText):
* parser/Parser.h:
(JSC::Scope::getUsedVariables):
(JSC::Parser::closedVariables):
(JSC::parse):
* parser/ParserModes.h:
* parser/ParserTokens.h:
* runtime/ArgList.cpp:
* runtime/Arguments.cpp:
* runtime/Arguments.h:
* runtime/ArgumentsIteratorConstructor.cpp:
* runtime/ArgumentsIteratorPrototype.cpp:
* runtime/ArrayPrototype.cpp:
* runtime/CodeCache.cpp:
(JSC::CodeCache::getFunctionExecutableFromGlobalCode):
* runtime/CommonIdentifiers.cpp:
(JSC::CommonIdentifiers::CommonIdentifiers):
(JSC::CommonIdentifiers::getPrivateName):
(JSC::CommonIdentifiers::getPublicName):
* runtime/CommonIdentifiers.h:
* runtime/CommonSlowPaths.cpp:
* runtime/CommonSlowPathsExceptions.cpp:
* runtime/ExceptionHelpers.cpp:
(JSC::createUndefinedVariableError):
* runtime/Executable.h:
(JSC::EvalExecutable::executableInfo):
(JSC::ProgramExecutable::executableInfo):
(JSC::FunctionExecutable::isBuiltinFunction):
* runtime/FunctionPrototype.cpp:
(JSC::functionProtoFuncToString):
* runtime/JSActivation.cpp:
(JSC::JSActivation::symbolTableGet):
(JSC::JSActivation::symbolTablePut):
(JSC::JSActivation::symbolTablePutWithAttributes):
* runtime/JSArgumentsIterator.cpp:
* runtime/JSArray.cpp:
* runtime/JSArrayIterator.cpp:
* runtime/JSCJSValue.cpp:
* runtime/JSCellInlines.h:
* runtime/JSFunction.cpp:
(JSC::JSFunction::createBuiltinFunction):
(JSC::JSFunction::calculatedDisplayName):
(JSC::JSFunction::sourceCode):
(JSC::JSFunction::isHostOrBuiltinFunction):
(JSC::JSFunction::isBuiltinFunction):
(JSC::JSFunction::callerGetter):
(JSC::JSFunction::getOwnPropertySlot):
(JSC::JSFunction::getOwnNonIndexPropertyNames):
(JSC::JSFunction::put):
(JSC::JSFunction::defineOwnProperty):
* runtime/JSFunction.h:
* runtime/JSGenericTypedArrayViewConstructorInlines.h:
* runtime/JSGenericTypedArrayViewInlines.h:
* runtime/JSGenericTypedArrayViewPrototypeInlines.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::reset):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::objectConstructor):
(JSC::JSGlobalObject::symbolTableHasProperty):
* runtime/JSObject.cpp:
(JSC::getClassPropertyNames):
(JSC::JSObject::reifyStaticFunctionsForDelete):
(JSC::JSObject::putDirectBuiltinFunction):
* runtime/JSObject.h:
* runtime/JSPropertyNameIterator.cpp:
* runtime/JSPropertyNameIterator.h:
* runtime/JSString.h:
* runtime/JSStringInlines.h: Added.
(JSC::JSString::getStringPropertySlot):
(JSC::inlineJSValueNotStringtoString):
(JSC::JSValue::toWTFStringInline):
* runtime/JSSymbolTableObject.cpp:
(JSC::JSSymbolTableObject::getOwnNonIndexPropertyNames):
   Don't report private names.
* runtime/JSSymbolTableObject.h:
(JSC::symbolTableGet):
(JSC::symbolTablePut):
(JSC::symbolTablePutWithAttributes):
* runtime/Lookup.cpp:
(JSC::setUpStaticFunctionSlot):
* runtime/Lookup.h:
(JSC::HashEntry::builtinGenerator):
(JSC::HashEntry::propertyGetter):
(JSC::HashEntry::propertyPutter):
(JSC::HashTable::entry):
(JSC::getStaticPropertySlot):
(JSC::getStaticValueSlot):
(JSC::putEntry):
* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::finishCreation):
* runtime/NativeErrorConstructor.h:
* runtime/PropertySlot.h:
* runtime/RegExpPrototype.cpp:
* runtime/SetConstructor.cpp:
* runtime/StringObject.cpp:
* runtime/Structure.cpp:
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:
(JSC::VM::builtinExecutables):

Source/WebCore:

Updating for the newly required headers.

Test: js/regress/array-prototype-every.html

* ForwardingHeaders/runtime/JSStringInlines.h: Added.
* Modules/plugins/QuickTimePluginReplacement.cpp:
* bindings/js/JSIDBAnyCustom.cpp:
* bindings/js/JSIDBDatabaseCustom.cpp:
* bindings/js/JSIDBObjectStoreCustom.cpp:

Source/WebKit:

CMake updates

* CMakeLists.txt:

Source/WebKit2:

CMake updates

* CMakeLists.txt:

Tools:

CMake updates

* DumpRenderTree/CMakeLists.txt:
* WebKitTestRunner/CMakeLists.txt:
* WinCELauncher/CMakeLists.txt:

LayoutTests:

Updated the test results for new error messages (now that they're
actually helpful), and added a js-regress test to track performance.

* js/array-every-expected.txt:
* js/dom/array-prototype-properties-expected.txt:
* js/regress/array-prototype-every-expected.txt: Added.
* js/regress/array-prototype-every.html: Added.
* js/regress/script-tests/array-prototype-every.js: Added.
(test1):
(test2):
(test3):

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

6 years agoBuild fix.
bdakin@apple.com [Fri, 31 Jan 2014 21:27:40 +0000 (21:27 +0000)]
Build fix.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::setRootExtendedBackgroundColor):

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

6 years agoAllow more flexibility for copy-webkitlibraries-to-product-directory
fpizlo@apple.com [Fri, 31 Jan 2014 21:26:26 +0000 (21:26 +0000)]
Allow more flexibility for copy-webkitlibraries-to-product-directory
https://bugs.webkit.org/show_bug.cgi?id=128010

Reviewed by Oliver Hunt.

It's now the case that copy-webkitlibraries-to-product-directory does nothing by
default, but you can tell it to either copy WebKitSystemInterface (--wksi) or LLVM
(--llvm). You can also tell it where to get LLVM from.

* Scripts/build-jsc:
* Scripts/build-webkit:
* Scripts/copy-webkitlibraries-to-product-directory:

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

6 years agoWebKit2 View Gestures (Swipe): Crashes swiping around a Google Docs spreadsheet
timothy_horton@apple.com [Fri, 31 Jan 2014 21:17:47 +0000 (21:17 +0000)]
WebKit2 View Gestures (Swipe): Crashes swiping around a Google Docs spreadsheet
https://bugs.webkit.org/show_bug.cgi?id=128013
<rdar://problem/15959481>

Reviewed by Anders Carlsson.

* UIProcess/mac/ViewGestureController.mm:
(WebKit::ViewGestureController::wheelEventWasNotHandledByWebCore):
We should never (currently) start a swipe from a non-begin-phase wheel event.
We already check this in handleScrollWheelEvent, but can still get
non-begin-phase events in wheelEventWasNotHandled.

We only start "pending" swipes with Begin events, so we should never make them
non-pending with anything but a Begin event (we'll get it when it bubbles back up,
unhandled, from WebCore). In addition, AppKit throws an exception when we try
to start a swipe from end-phase events.

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

6 years agoProperly handle cases where a profile couldn't be recorded and null is returned.
timothy@apple.com [Fri, 31 Jan 2014 21:11:35 +0000 (21:11 +0000)]
Properly handle cases where a profile couldn't be recorded and null is returned.

<rdar://problem/15957993> Crash with Inspector open at WebCore::ScriptProfile::buildInspectorObject

Reviewed by Joseph Pecoraro.

* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::didCallFunction): Null check profile.
(WebCore::InspectorTimelineAgent::didEvaluateScript): Ditto.

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

6 years agoExtended background should only create margin tiles for pages with background
bdakin@apple.com [Fri, 31 Jan 2014 21:06:38 +0000 (21:06 +0000)]
Extended background should only create margin tiles for pages with background
images
https://bugs.webkit.org/show_bug.cgi?id=127876
-and corresponding-
<rdar://problem/15827632>

Reviewed by Simon Fraser.

Source/WebCore:

Settings::backgroundShouldExtendBeyondPage() doesn't need to create margin tiles
for pages with simple background colors. Instead, those pages should achieve the
same effect by setting a background color on RenderLayerCompositor's
m_layerForOverhangAreas. For now, we should only create tiles when there is a
background image. We may want to extend this to other types of complicated
backgrounds in the future.

This patch makes callers that only care about the value of the setting always call
Settings::backgroundShouldExtendBeyondPage() rather than asking about margin
tiles. And callers that want to know about margin tiles can either keep querying
that directly or they can call FrameView::hasExtendedBackgroundRectForPainting().
An extended background does not necessarily require an extended background rect
for painting, and this new FrameView function can make that distinction.

When setBackgroundExtendsBeyondPage() is called, call RenderLayerCompositor::
setRootExtendedBackgroundColor() with either the document background color, or an
invalid color, depending on whether you have or do not have an extended
background. Also call needsExtendedBackgroundRectForPainting() to determine if we
also need to extend the background rect, and then call
setHasExtendedBackgroundRectForPainting() with its value.
* page/FrameView.cpp:
(WebCore::FrameView::setBackgroundExtendsBeyondPage):
(WebCore::FrameView::hasExtendedBackgroundRectForPainting):

 Right now we only need to extend the background rect for documents with
background images on the root. This may be extended in the future.
(WebCore::FrameView::needsExtendedBackgroundRectForPainting):
(WebCore::FrameView::setHasExtendedBackgroundRectForPainting):
(WebCore::FrameView::extendedBackgroundRectForPainting):
* page/FrameView.h:

Expose defaultTileWidth and defaultTileHeight from TiledBacking.h so that we can
access the values from RenderLayerBacking.
* platform/graphics/TiledBacking.h:
* platform/graphics/ca/mac/TileController.mm:

hasExtendedBackgroundForPainting() is now called
hasExtendedBackgroundRectForPainting() to distinguish
the case where an extended RECT is needed.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::repaintLayerRectsForImage):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):

Call setHasExtendedBackgroundRectForPainting() if relevant.
* rendering/RenderElement.cpp:
(WebCore::RenderElement::styleWillChange):

Don't call setTiledBackingHasMargins() right in the constructor because we only
want margins if we have a background image, and we won't have that information
yet.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::RenderLayerBacking):

Clean up the variable name here. We are only setting margins when we need to
extend the background rect for painting. Also make us of newly-exposed
defaultTileWidth and Height.
(WebCore::RenderLayerBacking::setTiledBackingHasMargins):

Remove RenderLayerBacking::tiledBackingHasMargin() since there aren't any more
callers.
* rendering/RenderLayerBacking.h:
(WebCore::RenderLayerBacking::usingTiledBacking):

setMasksToBounds(false) based on the Setting, and not based on whether there are
tile margins.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateBacking):

Return false from RenderLayerCompositor::requiresContentShadowLayer() if there is
an extended background.
(WebCore::RenderLayerCompositor::requiresContentShadowLayer):

Setting the background color on m_layerForOverhangAreas is all we need to do to
create the extended background effect on pages that only have background colors.
(WebCore::RenderLayerCompositor::setRootExtendedBackgroundColor):
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):

Remove mainFrameBackingIsTiledWithMargin() since there aren't any more callers,
and add setRootExtendedBackgroundColor() so that we can update the color from
RenderView.
* rendering/RenderLayerCompositor.h:

Revert the code that was added to paint background color here, since this should
all be covered by calling RenderLayerCompositor::setExtendedBackgroundColor().
More complicated backgrounds will run through the full background painting code.
* rendering/RenderView.cpp:
(WebCore::RenderView::paintBoxDecorations):
(WebCore::RenderView::backgroundRect):

LayoutTests:

We can only test margin tiles if we also give the document a background image.
* platform/mac-wk2/tiled-drawing/resources/greenbox.png: Added.
* platform/mac-wk2/tiled-drawing/simple-document-with-margin-tiles.html:

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

6 years agoRemove FrameLoader's reloadWithOverrideURL and reloadWithRequest
jochen@chromium.org [Fri, 31 Jan 2014 21:03:52 +0000 (21:03 +0000)]
Remove FrameLoader's reloadWithOverrideURL and reloadWithRequest
https://bugs.webkit.org/show_bug.cgi?id=128005

Reviewed by Darin Adler.

The former was used by chromium-android to implement the "request
desktop version" feature, but is no longer used. After removing it,
the latter is only invoked by reload(), so we can merge the method
with it.

No new tests, just removing dead code.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::reload):
* loader/FrameLoader.h:

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

6 years agoUnreviewed, rolling out r163182.
commit-queue@webkit.org [Fri, 31 Jan 2014 20:56:06 +0000 (20:56 +0000)]
Unreviewed, rolling out r163182.
http://trac.webkit.org/changeset/163182
https://bugs.webkit.org/show_bug.cgi?id=128012

Broke lots of tests (Requested by smfr on #webkit).

* page/FrameView.cpp:
(WebCore::FrameView::visibleContentsResized):
* page/FrameView.h:
* rendering/RenderView.cpp:
(WebCore::isFixedPositionInViewport):
(WebCore::RenderView::hasCustomFixedPosition):
* rendering/RenderView.h:

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

6 years agoIDB: openCursor() needs to prime the cursor with first position values
beidson@apple.com [Fri, 31 Jan 2014 20:50:57 +0000 (20:50 +0000)]
IDB: openCursor() needs to prime the cursor with first position values
https://bugs.webkit.org/show_bug.cgi?id=128008

Reviewed by Alexey Proskuryakov.

Source/WebCore:

* Modules/indexeddb/IDBTransactionBackendOperations.cpp:
(WebCore::OpenCursorOperation::perform): If the server connection returns initial keys/values
  for the cursor, store them.

* Modules/indexeddb/IDBServerConnection.h:

* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
(WebCore::IDBServerConnectionLevelDB::openCursor):
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:

Source/WebKit2:

Change openCursor() messaging to pass back the initial keys/values
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::didOpenCursor):
(WebKit::WebIDBServerConnection::openCursor):
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:

* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
(WebKit::DatabaseProcessIDBConnection::openCursor):

* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::openCursor):
(WebKit::UniqueIDBDatabase::cursorAdvance): Const and reference updates.
(WebKit::UniqueIDBDatabase::cursorIterate): Ditto.
(WebKit::UniqueIDBDatabase::openCursorInBackingStore):
(WebKit::UniqueIDBDatabase::didOpenCursorInBackingStore):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:

* DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::openCursor):
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:

* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
(WebKit::SQLiteIDBCursor::maybeCreate): After creating the cursor, advance(1) it.

* Shared/AsyncTask.h:
(WebKit::createAsyncTask):

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

6 years ago[CSS Shapes] Image valued shape can fail
hmuller@adobe.com [Fri, 31 Jan 2014 20:01:54 +0000 (20:01 +0000)]
[CSS Shapes] Image valued shape can fail
https://bugs.webkit.org/show_bug.cgi?id=127588

Reviewed by Dean Jackson.

Source/WebCore:

Correct the handling of image valued shapes that extend into or beyond the
margin box. This can happen when object-fit causes one dimension of the shape
to be greater than the corresponding margin box dimension.

Made some simplifications in RasterShapeIntervals::computeShapeMarginIntervals()
by making the shapeMargin parameter an int, removing some unnecessary variables.

Revised the RasterShapeIntervals class. It's now a just a list of size() interval-lists,
with valid indices: -offset() <= y < size() - offset(), or minY() to maxY(). If margin-top
and shape-margin are specified, then offset() is the larger of shape-margin and margin-top.
Similarly size() is the vertical size of the margin-box or the content-box expanded by
shape-margin, whichever is larger. See computeShapeMarginIntervals().

Tests: fast/shapes/shape-outside-floats/shape-outside-image-fit-005.html
       fast/shapes/shape-outside-floats/shape-outside-image-fit-006.html

* rendering/shapes/RasterShape.cpp:
(WebCore::RasterShapeIntervals::computeShapeMarginIntervals):
(WebCore::RasterShape::marginIntervals):
* rendering/shapes/RasterShape.h:
(WebCore::RasterShapeIntervals::RasterShapeIntervals):
(WebCore::RasterShapeIntervals::offset):
(WebCore::RasterShapeIntervals::minY):
(WebCore::RasterShapeIntervals::maxY):
(WebCore::RasterShapeIntervals::intervalsAt):
* rendering/shapes/Shape.cpp:
(WebCore::Shape::createRasterShape):
* rendering/shapes/Shape.h:
* rendering/shapes/ShapeInfo.cpp:

(WebCore::getShapeImageReplacedRect):
The rect that the image will be drawn into. This rect can imply image
scaling and translation.

(WebCore::getShapeImageMarginRect):
The margin rect relative too the (0,0 origin) shape content rect.

(WebCore::ShapeInfo<RenderType>::computedShape):

LayoutTests:

Check shape-outside layout for image valued shapes where object-fit causes
the image to extend into or beyond the image element's margin box.

* fast/shapes/shape-outside-floats/shape-outside-image-fit-005-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-image-fit-005.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-image-fit-006-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-image-fit-006.html: Added.

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

6 years agoDumpRenderTree iOS fails to link: missing rowHeaders and columnHeaders in Accessibili...
dfarler@apple.com [Fri, 31 Jan 2014 19:57:17 +0000 (19:57 +0000)]
DumpRenderTree iOS fails to link: missing rowHeaders and columnHeaders in AccessibilityUIElement
https://bugs.webkit.org/show_bug.cgi?id=128004

Reviewed by Chris Fleizach.

* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::columnHeaders): Stub added.
(AccessibilityUIElement::rowHeaders): Stub added.

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

6 years agoDeduplicate Document::encoding().
akling@apple.com [Fri, 31 Jan 2014 19:49:30 +0000 (19:49 +0000)]
Deduplicate Document::encoding().
<https://webkit.org/b/128000>

Make Document::encoding() return an AtomicString so we don't duplicate
the string every time it's called.

215 KB progression on Membuster3.

Reviewed by Simon Fraser.

* dom/Document.h:
* dom/Document.cpp:
(WebCore::Document::encoding):

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

6 years agoUnreviewed. Update my contributors.json entry.
zoltan@webkit.org [Fri, 31 Jan 2014 19:48:35 +0000 (19:48 +0000)]
Unreviewed. Update my contributors.json entry.

* Scripts/webkitpy/common/config/contributors.json:

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

6 years agoEven when in fixed layout mode, some platforms need to do layout after a viewport...
simon.fraser@apple.com [Fri, 31 Jan 2014 19:36:57 +0000 (19:36 +0000)]
Even when in fixed layout mode, some platforms need to do layout after a viewport change
https://bugs.webkit.org/show_bug.cgi?id=128003

Reviewed by Andreas Kling.

iOS uses fixed layout mode in both WK1 and WK2, but lays out fixed position
elements relative to a variable viewport. This code assumed that fixed layout
implies a fixed viewport.

Fix by testing for useCustomFixedPositionLayoutRect() in the fixed layout case.

Also removed RenderView::hasCustomFixedPosition() which is no longer used.

* page/FrameView.cpp:
(WebCore::FrameView::shouldLayoutAfterViewportChange):
(WebCore::FrameView::visibleContentsResized):
* page/FrameView.h:
* rendering/RenderView.cpp:
* rendering/RenderView.h:

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

6 years agoGuard GLContextEGL::platformContext() with USE(3D_GRAPHICS)
zandobersek@gmail.com [Fri, 31 Jan 2014 19:34:11 +0000 (19:34 +0000)]
Guard GLContextEGL::platformContext() with USE(3D_GRAPHICS)
https://bugs.webkit.org/show_bug.cgi?id=120214

Reviewed by Philippe Normand.

Guard the GLContextEGL::platformContext() declaration and definiton with USE(3D_GRAPHICS)
since this guard is used in the GLContext class, from which the GLContextEGL class overrides
this method.

* platform/graphics/egl/GLContextEGL.cpp:
* platform/graphics/egl/GLContextEGL.h:

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

6 years agoSource/WebCore: Sideways 'wobble' when scrolling with trackpad on Mavericks
bdakin@apple.com [Fri, 31 Jan 2014 19:04:21 +0000 (19:04 +0000)]
Source/WebCore: Sideways 'wobble' when scrolling with trackpad on Mavericks
https://bugs.webkit.org/show_bug.cgi?id=127521
-and corresponding-
<rdar://problem/14137306>

Reviewed by Simon Fraser.

This patch takes http://trac.webkit.org/changeset/154535 which introduced
filtering wheel events for overflow areas to try to make them less sensitive to X
deltas when scrolling in a primarily Y direction, and it factors that code out
into its own class, now called WheelEventDeltaTracker. So now this new class can
use the same code to filter events for WebKit2’s EventDispatcher.

Files for WheelEventDeltaTracker.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:

WK2 needs these new WheelEventDeltaTracker functions.
* WebCore.exp.in:

Move a bunch of code over to WheelEventDeltaTracker and use
m_recentWheelEventTracker to serve the same purpose.
* page/EventHandler.cpp:
(WebCore::EventHandler::EventHandler):
(WebCore::EventHandler::handleWheelEvent):
(WebCore::EventHandler::defaultWheelEventHandler):
* page/EventHandler.h:

Allow horizontal rubber banding now that we have some event filtering in place.
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):

New files. Most of this code was from EventHandler.
* page/WheelEventDeltaTracker.cpp: Added.
(WebCore::WheelEventDeltaTracker::WheelEventDeltaTracker):
(WebCore::WheelEventDeltaTracker::~WheelEventDeltaTracker):
(WebCore::WheelEventDeltaTracker::beginTrackingDeltas):
(WebCore::WheelEventDeltaTracker::endTrackingDeltas):
(WebCore::WheelEventDeltaTracker::recordWheelEventDelta):
(WebCore::deltaIsPredominantlyVertical):
(WebCore::WheelEventDeltaTracker::dominantScrollGestureDirection):
* page/WheelEventDeltaTracker.h: Added.
(WebCore::WheelEventDeltaTracker::isTrackingDeltas):

New function to clone events while zero-ing out certain deltas.
* platform/PlatformWheelEvent.h:
(WebCore::PlatformWheelEvent::copyIgnoringHorizontalDelta):
(WebCore::PlatformWheelEvent::copyIgnoringVerticalDelta):

Source/WebKit2: Sideways 'wobble' when scrolling with trackpad on Mavericks
https://bugs.webkit.org/show_bug.cgi?id=127521
-and corresponding-
<rdar://problem/14137306>

Reviewed by Simon Fraser.

Start using WebCore::WheelEventDeltaTracker to filter events.
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::EventDispatcher):
(WebKit::EventDispatcher::wheelEvent):
* WebProcess/WebPage/EventDispatcher.h:

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

6 years agoFix the ARM Thumb2 build after jsCStack branch merge
rgabor@webkit.org [Fri, 31 Jan 2014 18:59:59 +0000 (18:59 +0000)]
Fix the ARM Thumb2 build after jsCStack branch merge
https://bugs.webkit.org/show_bug.cgi?id=127903

Reviewed by Michael Saboff.

SP register cannot be used as a destination register of SUB or ADD on Thumb mode.

* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter32_64.asm:

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

6 years agoFix the forward declaration of RawPluginMetaData in NetscapePluginModule.h
zandobersek@gmail.com [Fri, 31 Jan 2014 18:49:27 +0000 (18:49 +0000)]
Fix the forward declaration of RawPluginMetaData in NetscapePluginModule.h
https://bugs.webkit.org/show_bug.cgi?id=127992

Reviewed by Martin Robinson.

* Shared/Plugins/Netscape/NetscapePluginModule.h: RawPluginMetaData is a struct, so it should
be declared as such. The current forward declaration is throwing a warning when using Clang.

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

6 years agoDon't do logging from Range::collectSelectionRects() on iOS
simon.fraser@apple.com [Fri, 31 Jan 2014 18:49:13 +0000 (18:49 +0000)]
Don't do logging from Range::collectSelectionRects() on iOS
https://bugs.webkit.org/show_bug.cgi?id=127999

Reviewed by Enrica Casucci.

Remove some logging code that printed Range stuff in debug builds.

* dom/Range.cpp:
(WebCore::Range::collectSelectionRects):

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

6 years agoMake iOS fixed layer registration more like OS X
simon.fraser@apple.com [Fri, 31 Jan 2014 18:25:34 +0000 (18:25 +0000)]
Make iOS fixed layer registration more like OS X
https://bugs.webkit.org/show_bug.cgi?id=127983

Reviewed by Antti Koivisto.

Remove some #if PLATFORM(IOS) in the code related to registering
viewport-constrained layers. The code behaves correctly now in WK1
and WK2 based on the presence of a ScrollingCoordinator.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
(WebCore::nearestScrollingCoordinatorAncestor):
(WebCore::RenderLayerCompositor::registerOrUpdateViewportConstrainedLayer):
(WebCore::RenderLayerCompositor::unregisterViewportConstrainedLayer):

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

6 years agoUnreviewed, rolling out r163165.
commit-queue@webkit.org [Fri, 31 Jan 2014 17:43:04 +0000 (17:43 +0000)]
Unreviewed, rolling out r163165.
http://trac.webkit.org/changeset/163165
https://bugs.webkit.org/show_bug.cgi?id=127997

broke 2 fast/table tests (Requested by kling on #webkit).

Source/WebCore:

* rendering/RenderTable.cpp:
(WebCore::RenderTable::updateLogicalWidth):
(WebCore::RenderTable::computePreferredLogicalWidths):

LayoutTests:

* fast/table/css-table-max-width-expected.txt:
* fast/table/css-table-max-width.html:
* fast/table/html-table-width-max-width-constrained-expected.txt: Removed.
* fast/table/html-table-width-max-width-constrained.html: Removed.

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

6 years agoDon't allocate a new XMLHttpRequestStaticData every time staticData() is called
andersca@apple.com [Fri, 31 Jan 2014 17:36:37 +0000 (17:36 +0000)]
Don't allocate a new XMLHttpRequestStaticData every time staticData() is called
https://bugs.webkit.org/show_bug.cgi?id=127996

Reviewed by Andreas Kling.

std::once_flag should be static.

* xml/XMLHttpRequest.cpp:
(WebCore::staticData):

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

6 years agoREGRESSION: WebKit2.PageLoadBasic API test is failing
andersca@apple.com [Fri, 31 Jan 2014 17:26:46 +0000 (17:26 +0000)]
REGRESSION: WebKit2.PageLoadBasic API test is failing
https://bugs.webkit.org/show_bug.cgi?id=127892

Reviewed by Dan Bernstein.

Source/WebKit2:

On Mountain Lion, URLs returned by -[NSBundle URLForResource:withExtension:subdirectory] include
localhost as the hostname, but WebCore::URL normalizes those URLs and removes the host name.

Because of this, URLs created by WKURLCreateWithCFURL won't be equal to urls passed through
the WebCore::URL constructor. Change WKURLIsEqual to compare the normalized URLs.

* Shared/API/c/WKURL.cpp:
(WKURLIsEqual):
* Shared/APIURL.h:
(API::URL::equals):
(API::URL::url):

Tools:

Re-enable test.

* TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp:

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

6 years agoIDB: When deleting object stores/indexes, also delete associated records
beidson@apple.com [Fri, 31 Jan 2014 17:03:17 +0000 (17:03 +0000)]
IDB: When deleting object stores/indexes, also delete associated records
https://bugs.webkit.org/show_bug.cgi?id=127872

Reviewed by Anders Carlsson.

This was mostly done via other patches, but clearObjectStore was the last remaining case:
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::clearObjectStore): Also delete Index records.

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

6 years agoSubpixel rendering: Change RenderBoxModelObject's border functions' signature to...
zalan@apple.com [Fri, 31 Jan 2014 16:48:55 +0000 (16:48 +0000)]
Subpixel rendering: Change RenderBoxModelObject's border functions' signature to support subpixel border painting.
https://bugs.webkit.org/show_bug.cgi?id=127975

Reviewed by Simon Fraser.

From int to LayoutUnit.

Covered by existing tests. No change in functionality.

* platform/text/TextStream.cpp:
(WebCore::TextStream::operator<<):
* platform/text/TextStream.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::borderTop):
(WebCore::RenderBoxModelObject::borderBottom):
(WebCore::RenderBoxModelObject::borderLeft):
(WebCore::RenderBoxModelObject::borderRight):
(WebCore::RenderBoxModelObject::borderBefore):
(WebCore::RenderBoxModelObject::borderAfter):
(WebCore::RenderBoxModelObject::borderStart):
(WebCore::RenderBoxModelObject::borderEnd):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::repaintAfterLayoutIfNeeded):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::borderBefore):
(WebCore::RenderTable::borderAfter):
* rendering/RenderTable.h:
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::borderLeft):
(WebCore::RenderTableCell::borderRight):
(WebCore::RenderTableCell::borderTop):
(WebCore::RenderTableCell::borderBottom):
(WebCore::RenderTableCell::borderStart):
(WebCore::RenderTableCell::borderEnd):
(WebCore::RenderTableCell::borderBefore):
(WebCore::RenderTableCell::borderAfter):
* rendering/RenderTableCell.h:

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

6 years agoIDB: Index writing
beidson@apple.com [Fri, 31 Jan 2014 15:55:28 +0000 (15:55 +0000)]
IDB: Index writing
<rdar://problem/15899973> and https://bugs.webkit.org/show_bug.cgi?id=127868

Reviewed by Anders Carlsson.

Source/WebCore:

* Modules/indexeddb/IDBDatabaseBackend.cpp:
(WebCore::IDBDatabaseBackend::openConnectionInternal): Remove outdated comment and ASSERT.

* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::createIndex): Conditionalize a block of code that is LevelDB-only.

Remove getColumnBlob().  Nobody used it, and it was dangerous because it reset the statement:
* platform/sql/SQLiteStatement.cpp:
* platform/sql/SQLiteStatement.h:
* WebCore.exp.in:

Source/WebKit2:

* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::putRecordInBackingStore): Handle writing index records, as well.

* DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata): Create a table
  for index records
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::extractExistingMetadata): Extract IDBIndexMetadata
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteObjectStore):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteIndex):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::putIndexRecord): Store in the IndexRecords table.
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:

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

6 years ago[arm] Add missing pushPair/popPair implementations in MacroAssemblerARM.h
commit-queue@webkit.org [Fri, 31 Jan 2014 15:11:05 +0000 (15:11 +0000)]
[arm] Add missing pushPair/popPair implementations in MacroAssemblerARM.h
https://bugs.webkit.org/show_bug.cgi?id=127904

Patch by Julien Brianceau <jbriance@cisco.com> on 2014-01-31
Reviewed by Zoltan Herczeg.

* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::popPair):
(JSC::MacroAssemblerARM::pushPair):

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

6 years ago[CSSRegions] Add test(s) for list item as region
mihnea@adobe.com [Fri, 31 Jan 2014 14:29:10 +0000 (14:29 +0000)]
[CSSRegions] Add test(s) for list item as region
https://bugs.webkit.org/show_bug.cgi?id=122961

Reviewed by Dirk Schulze.

* fast/regions/list-item-as-region-expected.html: Added.
* fast/regions/list-item-as-region.html: Added.

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

6 years ago[jhbuild] Disable escape sequences in EWS output
ossy@webkit.org [Fri, 31 Jan 2014 10:51:24 +0000 (10:51 +0000)]
[jhbuild] Disable escape sequences in EWS output
https://bugs.webkit.org/show_bug.cgi?id=127922

Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/common/system/environment.py:
(Environment.disable_gcc_smartquotes):
(Environment):
(Environment.disable_jhbuild_VT100_output):
* Scripts/webkitpy/tool/commands/download_unittest.py:
* Scripts/webkitpy/tool/steps/build.py:
(Build.build):

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

6 years ago[CSS Grid Layout] Do log(n) search in the named line vectors when positioning named...
commit-queue@webkit.org [Fri, 31 Jan 2014 08:10:11 +0000 (08:10 +0000)]
[CSS Grid Layout] Do log(n) search in the named line vectors when positioning named line spans.
https://bugs.webkit.org/show_bug.cgi?id=125396

Patch by László Langó <lango@inf.u-szeged.hu> on 2014-01-30
Reviewed by Andreas Kling.

Implement the suggested FIXMEs and do a log search in the named line
vectors. This maintains the previous (somewhat tricky) behavior by
using std::lower_bound and std::upper_bound. No difference in existing
performance tests, but should scale much better for big grids.

Backported from Blink:
https://chromium.googlesource.com/chromium/blink/+/9fc477af0be708c490a6b90e65e412b0c22b161f

No new tests, no behavior change.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition):
(WebCore::RenderGrid::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition):

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

6 years agoFix table sizing when 'max-width' is used.
commit-queue@webkit.org [Fri, 31 Jan 2014 08:09:07 +0000 (08:09 +0000)]
Fix table sizing when 'max-width' is used.
https://bugs.webkit.org/show_bug.cgi?id=115156

Patch by László Langó <lango@inf.u-szeged.hu> on 2014-01-31
Reviewed by Andreas Kling.

Source/WebCore:

r143534 make <table> abide by 'max-width' all the time which is wrong.
Per the CSS specification, a table should be wide enough to fit its
content, regardless of 'max-width'.

r140479 fixed part of the regression from that change but made the
same fatal mistake by constraining min-content to fit 'max-width'.

The fix is to avoid constraining min-content and ensure that the table
logical width is at least its min-content size.

Backported from Blink:
https://chromium.googlesource.com/chromium/blink/+/0bca0dec4895aeeb2054ba36316e984e4ebed06f

Test: fast/table/html-table-width-max-width-constrained.html

* rendering/RenderTable.cpp:
(WebCore::RenderTable::updateLogicalWidth):
(WebCore::RenderTable::computePreferredLogicalWidths):

LayoutTests:

* fast/table/css-table-max-width-expected.txt:
* fast/table/css-table-max-width.html:
* fast/table/html-table-width-max-width-constrained-expected.txt: Added.
* fast/table/html-table-width-max-width-constrained.html: Added.

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

6 years ago[EFL][WK2] Unreviewed EFL WebKit2 build fix after r163116.
jinwoo7.song@samsung.com [Fri, 31 Jan 2014 07:51:17 +0000 (07:51 +0000)]
[EFL][WK2] Unreviewed EFL WebKit2 build fix after r163116.
https://bugs.webkit.org/show_bug.cgi?id=127985

Unreviewed EFL WebKit2 build fix.

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

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

6 years agoVersioning.
lforschler@apple.com [Fri, 31 Jan 2014 06:38:05 +0000 (06:38 +0000)]
Versioning.

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

6 years agoFix iOS WK2 build after r163156.
simon.fraser@apple.com [Fri, 31 Jan 2014 06:10:12 +0000 (06:10 +0000)]
Fix iOS WK2 build after r163156.

Need to convert to IntSizes.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::tapHighlightAtPosition):

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

6 years agoFix iOS build after r163156.
simon.fraser@apple.com [Fri, 31 Jan 2014 06:00:45 +0000 (06:00 +0000)]
Fix iOS build after r163156.

Need to convert LayoutSizes to FloatSizes.

* bindings/objc/DOMUIKitExtensions.mm:
(-[DOMNode borderRadii]):

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

6 years agoSubpixel rendering: Change drawRect()/drawLine() signature to support subpixel rendering.
zalan@apple.com [Fri, 31 Jan 2014 05:47:20 +0000 (05:47 +0000)]
Subpixel rendering: Change drawRect()/drawLine() signature to support subpixel rendering.
https://bugs.webkit.org/show_bug.cgi?id=127961

Reviewed by Simon Fraser.

IntRect/IntPoint -> FloatRect/FloatPoint.

Covered by existing tests. No change in functionality.

* platform/graphics/GraphicsContext.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::drawRect):
(WebCore::GraphicsContext::drawLine):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawRect):
(WebCore::GraphicsContext::drawLine): Keep 'distance' int for DottedStroke and DashedStroke for now.
* platform/graphics/wince/GraphicsContextWinCE.cpp:
(WebCore::GraphicsContext::drawRect):
(WebCore::GraphicsContext::drawLine):

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

6 years agoRemove ScrollingCoordinator::setLayerIsContainerForFixedPositionLayers() which is...
simon.fraser@apple.com [Fri, 31 Jan 2014 05:42:27 +0000 (05:42 +0000)]
Remove ScrollingCoordinator::setLayerIsContainerForFixedPositionLayers() which is no longer used
https://bugs.webkit.org/show_bug.cgi?id=127981

Reviewed by Andreas Kling.

setLayerIsContainerForFixedPositionLayers() was only used by Chromium and Blackberry,
so remove it.

This allows the removal of RenderLayerBacking::registerScrollingLayers(),
moving the single useful line of code to the caller.

* page/scrolling/ScrollingCoordinator.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::ensureRootLayer):

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

6 years agoSome fixed position elements disappear in WK2 on iOS
simon.fraser@apple.com [Fri, 31 Jan 2014 05:42:25 +0000 (05:42 +0000)]
Some fixed position elements disappear in WK2 on iOS
https://bugs.webkit.org/show_bug.cgi?id=127977

Reviewed by Tim Horton.

Use the appropriate rectangle to ensure that on iOS we don't
consider a fixed element outside the viewport when zoomed in,
and therefore never make a compositing layer for it.

Also remove the iOS-specific code in RenderLayerCompositor::requiresCompositingForPosition(),
since it's OK to use the common code. Doing so requires that we
set the "acceleratedCompositingForFixedPositionEnabled" setting to true
for iOS, so do so.

* page/Settings.cpp:
* page/Settings.in:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForPosition):

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

6 years agoSubpixel rendering: Make RoundedRect layout unit aware.
zalan@apple.com [Fri, 31 Jan 2014 05:41:46 +0000 (05:41 +0000)]
Subpixel rendering: Make RoundedRect layout unit aware.
https://bugs.webkit.org/show_bug.cgi?id=127779

Reviewed by Simon Fraser.

In order to draw hairline borders, RoundedRect needs to be
LayoutUnit based.

No change in behavior.

* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::fillRoundedRect):
* platform/graphics/GraphicsContext.h:
* platform/graphics/RoundedRect.cpp:
(WebCore::RoundedRect::Radii::scale):
(WebCore::RoundedRect::Radii::expand):
(WebCore::RoundedRect::inflateWithRadii):
(WebCore::RoundedRect::RoundedRect):
(WebCore::RoundedRect::intersectsQuad):
* platform/graphics/RoundedRect.h:
(WebCore::RoundedRect::Radii::Radii):
(WebCore::RoundedRect::Radii::setTopLeft):
(WebCore::RoundedRect::Radii::setTopRight):
(WebCore::RoundedRect::Radii::setBottomLeft):
(WebCore::RoundedRect::Radii::setBottomRight):
(WebCore::RoundedRect::Radii::topLeft):
(WebCore::RoundedRect::Radii::topRight):
(WebCore::RoundedRect::Radii::bottomLeft):
(WebCore::RoundedRect::Radii::bottomRight):
(WebCore::RoundedRect::Radii::expand):
(WebCore::RoundedRect::Radii::shrink):
(WebCore::RoundedRect::rect):
(WebCore::RoundedRect::setRect):
(WebCore::RoundedRect::move):
(WebCore::RoundedRect::inflate):
(WebCore::RoundedRect::expandRadii):
(WebCore::RoundedRect::shrinkRadii):
* platform/graphics/ShadowBlur.cpp:
(WebCore::ScratchBuffer::setCachedShadowValues):
(WebCore::ScratchBuffer::setCachedInsetShadowValues):
(WebCore::computeSliceSizesFromRadii):
(WebCore::ShadowBlur::templateSize):
(WebCore::ShadowBlur::drawRectShadow):
(WebCore::ShadowBlur::drawInsetShadow):
(WebCore::ShadowBlur::drawRectShadowWithoutTiling):
(WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
(WebCore::ShadowBlur::drawInsetShadowWithTiling):
(WebCore::ShadowBlur::drawRectShadowWithTiling):
(WebCore::ShadowBlur::drawLayerPieces):
(WebCore::ShadowBlur::beginShadowLayer):
* platform/graphics/ShadowBlur.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::clipOut):
(WebCore::GraphicsContext::fillRoundedRect):
(WebCore::GraphicsContext::fillRectWithRoundedHole):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::platformInit):
* platform/graphics/wince/GraphicsContextWinCE.cpp:
(WebCore::GraphicsContext::clipOut):
(WebCore::GraphicsContext::fillRoundedRect):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintOneBorderSide):
(WebCore::calculateSideRect):
(WebCore::RenderBoxModelObject::paintBorderSides):
(WebCore::RenderBoxModelObject::paintBorder):
(WebCore::RenderBoxModelObject::clipBorderSidePolygon):
(WebCore::calculateSideRectIncludingInner):
(WebCore::calculateAdjustedInnerBorder):
(WebCore::areaCastingShadowInHole):
(WebCore::RenderBoxModelObject::paintBoxShadow):
* rendering/RenderBoxModelObject.h:
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::paintMenuListButtonGradients):
(WebCore::RenderThemeSafari::paintSliderTrack):

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

6 years ago[GTK] [CMake] Add support for building against GTK+ 2
mrobinson@webkit.org [Fri, 31 Jan 2014 05:37:15 +0000 (05:37 +0000)]
[GTK] [CMake] Add support for building against GTK+ 2
https://bugs.webkit.org/show_bug.cgi?id=127959

Reviewed by Anders Carlsson.

.:

* Source/cmake/OptionsGTK.cmake: Add a new option to use GTK 2 and make a variable holding the
library API version. When using GTK 2 do not build WebKit 2.

Source/JavaScriptCore:

* PlatformGTK.cmake: Use the new API version variable and don't use GTK3 directly.

Source/WebCore:

* PlatformGTK.cmake: Use the new API version variable and don't use GTK3 directly.

Source/WebKit:

* PlatformGTK.cmake: Use the new API version variable and don't use GTK3 directly.

Source/WebKit2:

* PlatformGTK.cmake: Use the new API version variable and don't use GTK3 directly.

Tools:

* DumpRenderTree/PlatformGTK.cmake: Use the new API version variable and don't use GTK3 directly.
* GtkLauncher/CMakeLists.txt: Ditto.
* ImageDiff/PlatformGTK.cmake: Ditto.
* TestWebKitAPI/Tests/WebKitGtk/CMakeLists.txt: Ditto.

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

6 years agoSpeculative build fix.
jberlin@webkit.org [Fri, 31 Jan 2014 04:51:21 +0000 (04:51 +0000)]
Speculative build fix.

* page/animation/CSSPropertyAnimation.cpp:

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

6 years agoFix profiler layout test crashes.
timothy@apple.com [Fri, 31 Jan 2014 04:04:04 +0000 (04:04 +0000)]
Fix profiler layout test crashes.

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

6 years agoSubpixel rendering: Change BorderData's width from unsigned to float to enable subpix...
zalan@apple.com [Fri, 31 Jan 2014 03:52:14 +0000 (03:52 +0000)]
Subpixel rendering: Change BorderData's width from unsigned to float to enable subpixel border painting.
https://bugs.webkit.org/show_bug.cgi?id=127949

Reviewed by Andreas Kling.

Covered by existing tests. No change in functionality.

* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::calcBorderStart):
(WebCore::RenderTable::calcBorderEnd):
* rendering/style/BorderValue.h:
(WebCore::BorderValue::BorderValue):
(WebCore::BorderValue::width):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::borderBeforeWidth):
(WebCore::RenderStyle::borderAfterWidth):
(WebCore::RenderStyle::borderStartWidth):
(WebCore::RenderStyle::borderEndWidth):
* rendering/style/RenderStyle.h:

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

6 years agoCodeBlock's cloned SymbolTables only need the captured names.
akling@apple.com [Fri, 31 Jan 2014 03:38:06 +0000 (03:38 +0000)]
CodeBlock's cloned SymbolTables only need the captured names.
<https://webkit.org/b/127978>

Renamed SymbolTable::clone() to SymbolTable::cloneCapturedNames()
and make it skip over any symbols that aren't captured, since those
won't be needed after codegen.

This is a first step towards getting rid of redundant symbol tables.

Reviewed by Geoffrey Garen.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
* runtime/SymbolTable.cpp:
(JSC::SymbolTable::cloneCapturedNames):
* runtime/SymbolTable.h:

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

6 years agoUnreviewed, rolling out r163125.
commit-queue@webkit.org [Fri, 31 Jan 2014 03:16:21 +0000 (03:16 +0000)]
Unreviewed, rolling out r163125.
http://trac.webkit.org/changeset/163125
https://bugs.webkit.org/show_bug.cgi?id=127980

caused 9 layout tests to assert and crash (Requested by estes
on #webkit).

* NetworkProcess/mac/RemoteNetworkingContext.mm:
(WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
* Shared/SessionTracker.cpp:
(WebKit::SessionTracker::session):
(WebKit::SessionTracker::setSession):
(WebKit::SessionTracker::destroySession):
* Shared/SessionTracker.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setSession):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::legacySessionID):
(WebKit::WebPlatformStrategies::cookiesForDOM):
(WebKit::WebPlatformStrategies::setCookiesFromDOM):
(WebKit::WebPlatformStrategies::cookiesEnabled):
(WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
(WebKit::WebPlatformStrategies::getRawCookies):
(WebKit::WebPlatformStrategies::deleteCookie):
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::setSessionID):

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

6 years agoAdd webView:didFinishLoadingNavigation: delegate method
andersca@apple.com [Fri, 31 Jan 2014 02:24:35 +0000 (02:24 +0000)]
Add webView:didFinishLoadingNavigation: delegate method
https://bugs.webkit.org/show_bug.cgi?id=127976

Reviewed by Dan Bernstein.

Source/WebKit2:

* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didFinishLoadForFrame):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::LoaderClient::didStartProvisionalLoadForFrame):
(WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
(WebKit::NavigationState::LoaderClient::didCommitLoadForFrame):
(WebKit::NavigationState::LoaderClient::didFinishLoadForFrame):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFinishLoadForFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidFinishLoad):

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/Navigation.mm:
(-[NavigationDelegate webView:didCommitNavigation:]):
(-[NavigationDelegate webView:didFinishLoadingNavigation:]):

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

6 years agoAdd security-checked cast for WebCore::CachedImage
ddkilzer@apple.com [Fri, 31 Jan 2014 02:02:05 +0000 (02:02 +0000)]
Add security-checked cast for WebCore::CachedImage
<http://webkit.org/b/127967>

Reviewed by Darin Adler.

Source/WebCore:

* loader/cache/CachedImage.h:
(WebCore::toCachedImage): Add.
(WebCore::toCachedImageManual): Add.
* loader/cache/CachedResource.h:
(CACHED_RESOURCE_TYPE_CASTS): Add macro.

* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::switchClientsToRevalidatedResource):
(WebCore::CachedImage::resumeAnimatingImagesForLoader):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestImage):
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::removeImageFromCache):
- Use toCachedImage() and toCachedImageManual().

Source/WebKit/mac:

* Misc/WebCache.mm:
(+[WebCache imageForURL:]):
- Use WebCore::toCachedImage().

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

6 years agoCrashes after 163116 in [WKView takeViewSnapshot]
timothy_horton@apple.com [Fri, 31 Jan 2014 01:53:19 +0000 (01:53 +0000)]
Crashes after 163116 in [WKView takeViewSnapshot]
https://bugs.webkit.org/show_bug.cgi?id=127973

Reviewed by Alexey Proskuryakov.

* UIProcess/API/mac/WKView.mm:
(-[WKView _takeViewSnapshot]):
Make the ViewGestureController before using it, if we need one.

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

6 years agoFixed position objects are clipped in iOS WK2
simon.fraser@apple.com [Fri, 31 Jan 2014 01:47:45 +0000 (01:47 +0000)]
Fixed position objects are clipped in iOS WK2
https://bugs.webkit.org/show_bug.cgi?id=127974

Reviewed by Darin Adler.

We clip compositing layers for fixed position objects to the viewport
to avoid huge layers. However, because iOS changes the fixed position
rect when zooming, we need a different rect for iOS.

In WK1 (when we have a platformWidget), we can use
visibleContentRect(ScrollableArea::LegacyIOSDocumentVisibleRect)
which is effectively the whole document. However in WK2 this is
the real visibleContentRect(), so there we use unscaledDocumentRect().

* page/FrameView.cpp:
(WebCore::FrameView::viewportConstrainedExtentRect):
* page/FrameView.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateCompositedBounds):

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

6 years agoDebug build fix.
timothy@apple.com [Fri, 31 Jan 2014 01:46:00 +0000 (01:46 +0000)]
Debug build fix.

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

6 years agoAdd a webView:didCommitNavigation: delegate method
andersca@apple.com [Fri, 31 Jan 2014 01:45:16 +0000 (01:45 +0000)]
Add a webView:didCommitNavigation: delegate method
https://bugs.webkit.org/show_bug.cgi?id=127972

Reviewed by Dan Bernstein.

Source/WebKit2:

* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didCommitLoadForFrame):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::LoaderClient::didCommitLoadForFrame):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/Navigation.mm:
(-[NavigationDelegate webView:didStartProvisionalNavigation:]):
(-[NavigationDelegate webView:didCommitNavigation:]):

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

6 years agoUpdate WebCore localized strings.
timothy@apple.com [Fri, 31 Jan 2014 01:35:16 +0000 (01:35 +0000)]
Update WebCore localized strings.

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

6 years agoShow profile data in the discrete Scripts timeline view.
timothy@apple.com [Fri, 31 Jan 2014 01:35:12 +0000 (01:35 +0000)]
Show profile data in the discrete Scripts timeline view.

https://bugs.webkit.org/show_bug.cgi?id=127900

Reviewed by Joseph Pecoraro.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/DataGrid.js:
(WebInspector.DataGridNode.prototype.refreshIfNeeded):
(WebInspector.DataGridNode.prototype.needsRefresh):
(WebInspector.DataGridNode.prototype.set data):
(WebInspector.DataGridNode.prototype.set revealed):
(WebInspector.DataGridNode.prototype.refresh):
* UserInterface/LayoutTimelineDataGrid.js:
(WebInspector.LayoutTimelineDataGrid):
* UserInterface/LayoutTimelineDataGridNode.js:
(WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent):
* UserInterface/Main.html:
* UserInterface/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype._updateFilter):
(WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
(WebInspector.NavigationSidebarPanel.prototype._generateStyleRulesIfNeeded):
* UserInterface/ProfileNodeDataGridNode.js: Added.
(WebInspector.ProfileNodeDataGridNode):
(WebInspector.ProfileNodeDataGridNode.prototype.get profileNode):
(WebInspector.ProfileNodeDataGridNode.prototype.get records):
(WebInspector.ProfileNodeDataGridNode.prototype.get baseStartTime):
(WebInspector.ProfileNodeDataGridNode.prototype.get rangeStartTime):
(WebInspector.ProfileNodeDataGridNode.prototype.set rangeStartTime):
(WebInspector.ProfileNodeDataGridNode.prototype.get rangeEndTime):
(WebInspector.ProfileNodeDataGridNode.prototype.set rangeEndTime):
(WebInspector.ProfileNodeDataGridNode.prototype.get data):
(WebInspector.ProfileNodeDataGridNode.prototype.refresh):
(WebInspector.ProfileNodeDataGridNode.prototype.createCellContent):
* UserInterface/ProfileNodeTreeElement.js: Added.
(WebInspector.ProfileNodeTreeElement):
(WebInspector.ProfileNodeTreeElement.prototype.get profileNode):
(WebInspector.ProfileNodeTreeElement.prototype.get filterableData):
(WebInspector.ProfileNodeTreeElement.prototype.onattach):
(WebInspector.ProfileNodeTreeElement.prototype.onpopulate):
* UserInterface/ResourceTimelineDataGridNode.js:
(WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent):
* UserInterface/ScriptTimelineDataGrid.js:
(WebInspector.ScriptTimelineDataGrid):
* UserInterface/ScriptTimelineDataGridNode.js:
(WebInspector.ScriptTimelineDataGridNode):
(WebInspector.ScriptTimelineDataGridNode.prototype.get baseStartTime):
(WebInspector.ScriptTimelineDataGridNode.prototype.get rangeStartTime):
(WebInspector.ScriptTimelineDataGridNode.prototype.set rangeStartTime):
(WebInspector.ScriptTimelineDataGridNode.prototype.get rangeEndTime):
(WebInspector.ScriptTimelineDataGridNode.prototype.set rangeEndTime):
(WebInspector.ScriptTimelineDataGridNode.prototype.get data):
(WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent):
* UserInterface/ScriptTimelineRecord.js:
(WebInspector.ScriptTimelineRecord):
(WebInspector.ScriptTimelineRecord.prototype.get profile):
* UserInterface/ScriptTimelineView.js:
(WebInspector.ScriptTimelineView.prototype.updateLayout):
(WebInspector.ScriptTimelineView.prototype.get selectionPathComponents):
(WebInspector.ScriptTimelineView.prototype.dataGridNodeForTreeElement):
(WebInspector.ScriptTimelineView.prototype.populateProfileNodeTreeElement):
(WebInspector.ScriptTimelineView.prototype._processPendingRecords):
(WebInspector.ScriptTimelineView.prototype._treeElementSelected):
* UserInterface/TimelineContentView.js:
(WebInspector.TimelineContentView.prototype.matchTreeElementAgainstCustomFilters):
* UserInterface/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid):
(WebInspector.TimelineDataGrid.prototype.addRowInSortOrder):
(WebInspector.TimelineDataGrid.prototype._sort):
* UserInterface/TimelineDataGridNode.js:
(WebInspector.TimelineDataGridNode):
(WebInspector.TimelineDataGridNode.prototype.collapse):
(WebInspector.TimelineDataGridNode.prototype.expand):
* UserInterface/TimelineRecord.js:
* UserInterface/TreeOutlineDataGridSynchronizer.js:
(WebInspector.TreeOutlineDataGridSynchronizer.prototype.get delegate):
(WebInspector.TreeOutlineDataGridSynchronizer.prototype.dataGridNodeForTreeElement):
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementAdded):

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

6 years agoAdd the model objects for the new Web Inspector profile data.
timothy@apple.com [Fri, 31 Jan 2014 01:35:01 +0000 (01:35 +0000)]
Add the model objects for the new Web Inspector profile data.

https://bugs.webkit.org/show_bug.cgi?id=127899

Reviewed by Joseph Pecoraro.

* UserInterface/Main.html:
* UserInterface/Profile.js: Added.
(WebInspector.Profile):
(WebInspector.Profile.prototype.get idleTime):
(WebInspector.Profile.prototype.get topDownRootNodes):
(WebInspector.Profile.prototype.get bottomUpRootNodes):
* UserInterface/ProfileNode.js: Added.
(WebInspector.ProfileNode):
(WebInspector.ProfileNode.prototype.get id):
(WebInspector.ProfileNode.prototype.get type):
(WebInspector.ProfileNode.prototype.get functionName):
(WebInspector.ProfileNode.prototype.get sourceCodeLocation):
(WebInspector.ProfileNode.prototype.get startTime):
(WebInspector.ProfileNode.prototype.get endTime):
(WebInspector.ProfileNode.prototype.get selfTime):
(WebInspector.ProfileNode.prototype.get totalTime):
(WebInspector.ProfileNode.prototype.get calls):
(WebInspector.ProfileNode.prototype.get previousSibling):
(WebInspector.ProfileNode.prototype.get nextSibling):
(WebInspector.ProfileNode.prototype.get parentNode):
(WebInspector.ProfileNode.prototype.get childNodes):
(WebInspector.ProfileNode.prototype.totalTimeInRange):
(WebInspector.ProfileNode.prototype.computeCallInfoForTimeRange):
(WebInspector.ProfileNode.prototype.traverseNextProfileNode):
(WebInspector.ProfileNode.prototype.saveIdentityToCookie):
(WebInspector.ProfileNode.prototype.establishRelationships):
* UserInterface/ProfileNodeCall.js: Added.
(WebInspector.ProfileNodeCall):
(WebInspector.ProfileNodeCall.prototype.get startTime):
(WebInspector.ProfileNodeCall.prototype.get totalTime):
(WebInspector.ProfileNodeCall.prototype.get endTime):
(WebInspector.ProfileNodeCall.prototype.establishRelationships):
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
(WebInspector.TimelineManager.prototype.eventRecorded):
(WebInspector.TimelineManager.prototype._profileFromPayload.profileNodeFromPayload):
(WebInspector.TimelineManager.prototype._profileFromPayload.profileNodeCallFromPayload):
(WebInspector.TimelineManager.prototype._profileFromPayload):

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

6 years agoAdd column number and call timing support to LegacyProfiler.
timothy@apple.com [Fri, 31 Jan 2014 01:34:54 +0000 (01:34 +0000)]
Add column number and call timing support to LegacyProfiler.

https://bugs.webkit.org/show_bug.cgi?id=127764

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

* interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
* profiler/CallIdentifier.h:
(JSC::CallIdentifier::CallIdentifier):
(JSC::CallIdentifier::functionName):
(JSC::CallIdentifier::url):
(JSC::CallIdentifier::lineNumber):
(JSC::CallIdentifier::columnNumber):
(JSC::CallIdentifier::operator==):
(JSC::CallIdentifier::operator!=):
(JSC::CallIdentifier::Hash::hash):
(WTF::HashTraits<JSC::CallIdentifier>::constructDeletedValue):
(WTF::HashTraits<JSC::CallIdentifier>::isDeletedValue):
* profiler/LegacyProfiler.cpp:
(JSC::LegacyProfiler::willExecute):
(JSC::LegacyProfiler::didExecute):
(JSC::LegacyProfiler::exceptionUnwind):
(JSC::LegacyProfiler::createCallIdentifier):
(JSC::createCallIdentifierFromFunctionImp):
* profiler/LegacyProfiler.h:
* profiler/Profile.cpp:
(JSC::Profile::Profile):
* profiler/Profile.h:
(JSC::Profile::uid):
(JSC::Profile::idleTime):
(JSC::Profile::setIdleTime):
* profiler/ProfileGenerator.cpp:
(JSC::AddParentForConsoleStartFunctor::operator()):
(JSC::ProfileGenerator::addParentForConsoleStart):
(JSC::ProfileGenerator::willExecute):
(JSC::ProfileGenerator::didExecute):
(JSC::ProfileGenerator::stopProfiling):
(JSC::ProfileGenerator::removeProfileStart):
(JSC::ProfileGenerator::removeProfileEnd):
* profiler/ProfileNode.cpp:
(JSC::ProfileNode::ProfileNode):
(JSC::ProfileNode::stopProfiling):
(JSC::ProfileNode::endAndRecordCall):
(JSC::ProfileNode::startTimer):
(JSC::ProfileNode::debugPrintData):
* profiler/ProfileNode.h:
(JSC::ProfileNode::Call::Call):
(JSC::ProfileNode::Call::startTime):
(JSC::ProfileNode::Call::setStartTime):
(JSC::ProfileNode::Call::totalTime):
(JSC::ProfileNode::Call::setTotalTime):
(JSC::ProfileNode::id):
(JSC::ProfileNode::functionName):
(JSC::ProfileNode::url):
(JSC::ProfileNode::lineNumber):
(JSC::ProfileNode::columnNumber):
(JSC::ProfileNode::calls):
(JSC::ProfileNode::lastCall):
(JSC::ProfileNode::numberOfCalls):

Source/WebCore:

* bindings/js/ScriptProfile.cpp:
(WebCore::ScriptProfile::idleTime):
(WebCore::buildInspectorObjectFor):
(WebCore::ScriptProfile::buildInspectorObject):
* bindings/js/ScriptProfile.h:
* inspector/InspectorHeapProfilerAgent.cpp:
(WebCore::InspectorHeapProfilerAgent::createSnapshotHeader):
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::createSnapshotHeader):
(WebCore::InspectorProfilerAgent::getCPUProfile):
* inspector/ScriptProfileNode.idl:
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::appendProfile):
* inspector/protocol/Profiler.json:

LayoutTests:

Update test and results to include column numbers.

* fast/profiler/anonymous-event-handler-expected.txt:
* fast/profiler/anonymous-function-called-from-different-contexts-expected.txt:
* fast/profiler/anonymous-function-calls-built-in-functions-expected.txt:
* fast/profiler/anonymous-function-calls-eval-expected.txt:
* fast/profiler/anonymous-functions-with-display-names-expected.txt:
* fast/profiler/apply-expected.txt:
* fast/profiler/built-in-function-calls-anonymous-expected.txt:
* fast/profiler/built-in-function-calls-user-defined-function-expected.txt:
* fast/profiler/call-expected.txt:
* fast/profiler/calling-the-function-that-started-the-profiler-from-another-scope-expected.txt:
* fast/profiler/compare-multiple-profiles-expected.txt:
* fast/profiler/constructor-expected.txt:
* fast/profiler/dead-time-expected.txt:
* fast/profiler/document-dot-write-expected.txt:
* fast/profiler/event-handler-expected.txt:
* fast/profiler/execution-context-and-eval-on-same-line-expected.txt:
* fast/profiler/inline-event-handler-expected.txt:
* fast/profiler/many-calls-in-the-same-scope-expected.txt:
* fast/profiler/multiple-and-different-scoped-anonymous-function-calls-expected.txt:
* fast/profiler/multiple-and-different-scoped-function-calls-expected.txt:
* fast/profiler/multiple-anonymous-functions-called-from-the-same-function-expected.txt:
* fast/profiler/multiple-frames-expected.txt:
* fast/profiler/named-functions-with-display-names-expected.txt:
* fast/profiler/nested-anonymous-functon-expected.txt:
* fast/profiler/nested-start-and-stop-profiler-expected.txt:
* fast/profiler/one-execution-context-expected.txt:
* fast/profiler/profile-calls-in-included-file-expected.txt:
* fast/profiler/profile-with-no-title-expected.txt:
* fast/profiler/profiling-from-a-nested-location-but-stop-profiling-outside-the-nesting-expected.txt:
* fast/profiler/profiling-from-a-nested-location-expected.txt:
* fast/profiler/resources/profiler-test-JS-resources.js:
(printProfileNodeWithoutTime):
* fast/profiler/simple-event-call-expected.txt:
* fast/profiler/simple-no-level-change-expected.txt:
* fast/profiler/start-and-stop-profiler-multiple-times-expected.txt:
* fast/profiler/start-and-stop-profiling-in-the-same-function-expected.txt:
* fast/profiler/stop-profiling-after-setTimeout-expected.txt:
* fast/profiler/stop-then-function-call-expected.txt:
* fast/profiler/two-execution-contexts-expected.txt:
* fast/profiler/user-defined-function-calls-built-in-functions-expected.txt:
* fast/profiler/window-dot-eval-expected.txt:

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

6 years agoInclude profile with FunctionCall and EvaluateScript Timeline records.
timothy@apple.com [Fri, 31 Jan 2014 01:34:31 +0000 (01:34 +0000)]
Include profile with FunctionCall and EvaluateScript Timeline records.

https://bugs.webkit.org/show_bug.cgi?id=127663

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

* inspector/InjectedScriptBase.cpp:
(Inspector::InjectedScriptBase::callFunctionWithEvalEnabled):
* inspector/InspectorEnvironment.h:
* inspector/JSGlobalObjectInspectorController.h:

Source/WebCore:

* bindings/js/JSCallbackData.cpp:
(WebCore::JSCallbackData::invokeCallback):
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::handleEvent):
* bindings/js/JSMutationCallback.cpp:
(WebCore::JSMutationCallback::call):
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::executeFunctionInContext):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::evaluateInWorld):
* inspector/InspectorController.cpp:
(WebCore::InspectorController::didCallInjectedScriptFunction):
* inspector/InspectorController.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didCallFunctionImpl):
(WebCore::InspectorInstrumentation::didEvaluateScriptImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didCallFunction):
(WebCore::InspectorInstrumentation::didEvaluateScript):
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::willCallFunction):
(WebCore::InspectorTimelineAgent::didCallFunction):
(WebCore::InspectorTimelineAgent::willEvaluateScript):
(WebCore::InspectorTimelineAgent::didEvaluateScript):
(WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
* inspector/InspectorTimelineAgent.h:
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::appendProfile):
* inspector/TimelineRecordFactory.h:
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::didCallInjectedScriptFunction):
* inspector/WorkerInspectorController.h:

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

6 years agoPrefix existing Web Inspector profiler classes with "Legacy".
timothy@apple.com [Fri, 31 Jan 2014 01:34:19 +0000 (01:34 +0000)]
Prefix existing Web Inspector profiler classes with "Legacy".

Remove a dependency on ProfileView for showTimeAsPercent and selection as a drive-by.
Also remove the unfinished Canvas profiler classes, they will need redone for the Timeline view.

https://bugs.webkit.org/show_bug.cgi?id=127655

Reviewed by Joseph Pecoraro.

* UserInterface/CanvasDataGridNode.js: Removed.
* UserInterface/CanvasObserver.js: Removed.
* UserInterface/CanvasProfileObject.js: Removed.
* UserInterface/CanvasProfileType.js: Removed.
* UserInterface/CanvasProfileView.js: Removed.
* UserInterface/ConsoleObserver.js:
(WebInspector.ConsoleObserver.prototype.messageAdded):
* UserInterface/ContentView.js:
(WebInspector.ContentView):
(WebInspector.ContentView.isViewable):
* UserInterface/InspectorFrontendAPI.js:
(InspectorFrontendAPI.isProfilingJavaScript):
(InspectorFrontendAPI.startProfilingJavaScript):
(InspectorFrontendAPI.stopProfilingJavaScript):
* UserInterface/LegacyBottomUpProfileDataGridTree.js: Renamed from Source/WebInspectorUI/UserInterface/BottomUpProfileDataGridTree.js.
* UserInterface/LegacyJavaScriptProfileObject.js: Renamed from Source/WebInspectorUI/UserInterface/JavaScriptProfileObject.js.
* UserInterface/LegacyJavaScriptProfileType.js: Renamed from Source/WebInspectorUI/UserInterface/JavaScriptProfileType.js.
* UserInterface/LegacyJavaScriptProfileView.css: Renamed from Source/WebInspectorUI/UserInterface/JavaScriptProfileView.css.
* UserInterface/LegacyJavaScriptProfileView.js: Renamed from Source/WebInspectorUI/UserInterface/JavaScriptProfileView.js.
* UserInterface/LegacyProfileDataGridTree.js: Renamed from Source/WebInspectorUI/UserInterface/ProfileDataGridTree.js.
* UserInterface/LegacyProfileManager.js: Renamed from Source/WebInspectorUI/UserInterface/ProfileManager.js.
* UserInterface/LegacyProfileObject.js: Renamed from Source/WebInspectorUI/UserInterface/ProfileObject.js.
* UserInterface/LegacyProfileType.js: Renamed from Source/WebInspectorUI/UserInterface/ProfileType.js.
* UserInterface/LegacyProfileView.css: Renamed from Source/WebInspectorUI/UserInterface/ProfileView.css.
* UserInterface/LegacyProfileView.js: Renamed from Source/WebInspectorUI/UserInterface/ProfileView.js.
* UserInterface/LegacyProfilerObserver.js: Renamed from Source/WebInspectorUI/UserInterface/ProfilerObserver.js.
* UserInterface/LegacyTopDownProfileDataGridTree.js: Renamed from Source/WebInspectorUI/UserInterface/TopDownProfileDataGridTree.js.
* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector.loaded):
(WebInspector.openURL):

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

6 years agoAdd a webView:didFailProvisionalNavigation:withError: delegate method
andersca@apple.com [Fri, 31 Jan 2014 01:08:54 +0000 (01:08 +0000)]
Add a webView:didFailProvisionalNavigation:withError: delegate method
https://bugs.webkit.org/show_bug.cgi?id=127968

Reviewed by Dan Bernstein.

Source/WebKit2:

* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/Navigation.mm:
(-[DidFailProvisionalNavigationDelegate webView:didStartProvisionalNavigation:]):
(-[DidFailProvisionalNavigationDelegate webView:didFailProvisionalNavigation:withError:]):
(TEST):

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

6 years agoThe test server build fixes.
rniwa@webkit.org [Fri, 31 Jan 2014 01:07:16 +0000 (01:07 +0000)]
The test server build fixes.

* TestResultServer/model/jsonresults.py:
(JsonResults.merge):
* TestResultServer/static-dashboards/flakiness_dashboard.js:

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

6 years agoRemove now-empty ScriptController::setCaptureCallStackForUncaughtExceptions
commit-queue@webkit.org [Fri, 31 Jan 2014 01:04:07 +0000 (01:04 +0000)]
Remove now-empty ScriptController::setCaptureCallStackForUncaughtExceptions
https://bugs.webkit.org/show_bug.cgi?id=127964

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-01-30
Reviewed by Timothy Hatcher.

Remove empty function. It was only needed by v8 at one point.

* bindings/js/ScriptController.h:
* bindings/js/ScriptController.cpp:
Remove empty function.

* inspector/InspectorConsoleAgent.h:
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::enable):
(WebCore::InspectorConsoleAgent::disable):
Remove callers and related tracking state.

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

6 years agoNRWT shouldn't say "Finished writing JSON files" if it failed to to so
rniwa@webkit.org [Fri, 31 Jan 2014 01:03:37 +0000 (01:03 +0000)]
NRWT shouldn't say "Finished writing JSON files" if it failed to to so
https://bugs.webkit.org/show_bug.cgi?id=127966

Reviewed by Alexey Proskuryakov.

Don't say "Finished writing JSON files" if we had failed to generate the JSON file.
Also explicitly say this is for test results server as we're generating two JSON files.

* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager._upload_json_files):
* Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py:
(JSONLayoutResultsGenerator.__init__): Don't generate JSON file implicitly inside the constructor.
* Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:
(JSONResultsGenerator.generate_json_output): Return a boolean indicating whether the generation
had succeeded or not.

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

6 years agocopy-webkitlibraries-to-product-directory should accept command-line arguments for...
fpizlo@apple.com [Fri, 31 Jan 2014 00:41:51 +0000 (00:41 +0000)]
copy-webkitlibraries-to-product-directory should accept command-line arguments for extra work required for optional features rather than relying on environment variables
https://bugs.webkit.org/show_bug.cgi?id=120221

Reviewed by Mark Hahnenberg.

* Scripts/build-jsc:
* Scripts/build-webkit:
* Scripts/copy-webkitlibraries-to-product-directory:

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

6 years agoAdd a webView:didStartProvisionalNavigation: delegate method
andersca@apple.com [Fri, 31 Jan 2014 00:23:23 +0000 (00:23 +0000)]
Add a webView:didStartProvisionalNavigation: delegate method
https://bugs.webkit.org/show_bug.cgi?id=127965

Reviewed by Dan Bernstein.

Source/WebKit2:

* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didStartProvisionalLoadForFrame):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::createLoaderClient):
(WebKit::NavigationState::createPolicyClient):
(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::LoaderClient::LoaderClient):
(WebKit::NavigationState::LoaderClient::~LoaderClient):
(WebKit::NavigationState::LoaderClient::didStartProvisionalLoadForFrame):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/Navigation.mm:
(-[NavigationDelegate webView:didStartProvisionalNavigation:]):
(TEST):

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

6 years agoIDB: Implement IDBObjectStore.count()
beidson@apple.com [Thu, 30 Jan 2014 23:58:30 +0000 (23:58 +0000)]
IDB: Implement IDBObjectStore.count()
https://bugs.webkit.org/show_bug.cgi?id=127888

Reviewed by Tim Horton.

Now count() actually works.

Forward the count() request to the backing store”
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::countInBackingStore):

Using a cursor, get a count:
* DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::count):
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:

Give a direct accessor to allow the backing store to close a cursor it opened
for its own use:
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.cpp:
(WebKit::SQLiteIDBTransaction::closeCursor):
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.h:

* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::didCount): Update the logging to show the count.

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

6 years agoWeb Inspector: [REGRESSION(r163086)] Missing localized string 'Hide console (%s)'
commit-queue@webkit.org [Thu, 30 Jan 2014 23:36:34 +0000 (23:36 +0000)]
Web Inspector: [REGRESSION(r163086)] Missing localized string 'Hide console (%s)'
https://bugs.webkit.org/show_bug.cgi?id=127951

Patch by Diego Pino Garcia <dpino@igalia.com> on 2014-01-30
Reviewed by Timothy Hatcher.

* Localizations/en.lproj/localizedStrings.js:
Add 'Hide console (%s)'.

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

6 years agoImplement NavigationState::PolicyClient::decidePolicyForNewWindowAction
andersca@apple.com [Thu, 30 Jan 2014 23:24:12 +0000 (23:24 +0000)]
Implement NavigationState::PolicyClient::decidePolicyForNewWindowAction
https://bugs.webkit.org/show_bug.cgi?id=127962

Reviewed by Andreas Kling.

Have decidePolicyForNewWindowAction call decidePolicyForNavigationAction with a null destination frame.

* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
(WebKit::NavigationState::PolicyClient::decidePolicyForNewWindowAction):

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

6 years agohttp/tests/security/cross-origin-plugin-private-browsing-toggled.html is flaky on WK2
ap@apple.com [Thu, 30 Jan 2014 23:18:26 +0000 (23:18 +0000)]
http/tests/security/cross-origin-plugin-private-browsing-toggled.html is flaky on WK2
https://bugs.webkit.org/show_bug.cgi?id=127960

* platform/mac-wk2/TestExpectations: Marked it as such.

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

6 years agoWebGL load policy should be queried for the top level document.
roger_fong@apple.com [Thu, 30 Jan 2014 23:16:50 +0000 (23:16 +0000)]
WebGL load policy should be queried for the top level document.
https://bugs.webkit.org/show_bug.cgi?id=127937.
<rdar://problem/15950122>
Reviewed by Timothy Horton.
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::getContext):

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

6 years agoAdd session support to WebPlatformStrategies
commit-queue@webkit.org [Thu, 30 Jan 2014 23:11:09 +0000 (23:11 +0000)]
Add session support to WebPlatformStrategies
https://bugs.webkit.org/show_bug.cgi?id=127926

Patch by Martin Hock <mhock@apple.com> on 2014-01-30
Reviewed by Alexey Proskuryakov.

* NetworkProcess/mac/RemoteNetworkingContext.mm:
(WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
* Shared/SessionTracker.cpp:
(WebKit::storageSessionToID):
(WebKit::SessionTracker::session):
(WebKit::SessionTracker::sessionID):
(WebKit::SessionTracker::setSession):
(WebKit::SessionTracker::destroySession):
* Shared/SessionTracker.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setSession):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::cookiesForDOM):
(WebKit::WebPlatformStrategies::setCookiesFromDOM):
(WebKit::WebPlatformStrategies::cookiesEnabled):
(WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
(WebKit::WebPlatformStrategies::getRawCookies):
(WebKit::WebPlatformStrategies::deleteCookie):
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setSessionID): Ensure the storage session exists.
* WebProcess/WebPage/WebPage.h:

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

6 years agoIDB: ObjectStore cursor iterate() support
beidson@apple.com [Thu, 30 Jan 2014 23:06:53 +0000 (23:06 +0000)]
IDB: ObjectStore cursor iterate() support
<rdar://problem/15941914> and https://bugs.webkit.org/show_bug.cgi?id=127867

Reviewed by Tim Horton.

* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
(WebKit::SQLiteIDBCursor::iterate): Implement iterate() using advance()

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

6 years agodecidePolicyForNewWindowAction should take a NavigationActionData object
andersca@apple.com [Thu, 30 Jan 2014 23:04:21 +0000 (23:04 +0000)]
decidePolicyForNewWindowAction should take a NavigationActionData object
https://bugs.webkit.org/show_bug.cgi?id=127952

Reviewed by Dan Bernstein.

* UIProcess/API/APIPolicyClient.h:
(API::PolicyClient::decidePolicyForNewWindowAction):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPagePolicyClient):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):

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

6 years agoAdd a method for schemes to be registered as supporting cache partitioning
jpfau@apple.com [Thu, 30 Jan 2014 23:02:39 +0000 (23:02 +0000)]
Add a method for schemes to be registered as supporting cache partitioning
https://bugs.webkit.org/show_bug.cgi?id=127739

Reviewed by Darin Adler.

Source/WebCore:

Currently, this assumes that schemes supporting cache partitioning
also support (scheme, host) doubles for the scheme. Furthermore,
the scheme is currently discarded when partitioning and is only
checked to ensure that partitioning is supported for that scheme: it
is assumed that all origins with the same host double should be binned
together, regardless of scheme.

* WebCore.exp.in:
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::cachePartition):
* platform/SchemeRegistry.cpp:
(WebCore::CachePartitioningSchemes):
(WebCore::SchemeRegistry::registerURLSchemeAsCachePartitioned):
(WebCore::SchemeRegistry::shouldPartitionCacheForURLScheme):
* platform/SchemeRegistry.h:

Source/WebKit2:

Pipe information about cache partitioned scheme through WebKit2.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextRegisterURLSchemeAsCachePartitioned):
* UIProcess/API/C/WKContextPrivate.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createNewWebProcess):
(WebKit::WebContext::registerURLSchemeAsCachePartitioned):
* UIProcess/WebContext.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::registerURLSchemeAsCachePartitioned):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:

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

6 years agoFTL should support GetById(Untyped:)
fpizlo@apple.com [Thu, 30 Jan 2014 23:00:16 +0000 (23:00 +0000)]
FTL should support GetById(Untyped:)
https://bugs.webkit.org/show_bug.cgi?id=127750

Reviewed by Oliver Hunt.

This was supposed to be easy. Indeed, the actual GetById UntypedUse case was easy. But
then it expanded coverage by a lot and I got to deal with three bugs. So, this has
some additional changes:

Also make it safe for LLVM to duplicate calls to patchpoints and stackmaps. Previously
we incorrectly assumed that if we emitted a patchpoint, then there would only be one
copy of that patchpoint (with that ID) in the resulting machine code and in the
stackmaps section. That's obviously a bad assumption - LLVM is allowed to do anything
it wants so long as the outcome of executing the code has a semantically equivalent
meaning to the IR we gave it, and duplicating code is trivially OK under this rule. We
should be OK with it, too. The solution is to add Vectors in a bunch of places that
previously just thought they only had one value. For example, an InlineCacheDescriptor
now has a Vector of generators - one generator for each copy that LLVM stamped out.
Normally there will only be one copy, of course - since duplication is usually
unprofitable. But, if LLVM decides that copying would be groovy then we will no longer
barf.

Also fix SSA conversion. It turns out that we mishandled the case where a block had
multiple Phi functions for the same local. If any of those CPS Phis fail to trivialize
in the Aycock-Horspool fixpoint, we need to insert an SSA Phi. Previously, it was
assuming that so long as the head CPS Phi was trivial, we could forego SSA Phi
insertion. That's wrong if the head CPS Phi trivialized but ended up pointing to a
non-trivial CPS Phi in the same block. This madness with trees of Phis occurs because
we try to save on compile times: no Phi ever has more than three children even if the
block has more than three predecessors; we just build out a tree of Phis to satisfy
all predecessors. So weird.

And finally, fix DFG->FTL OSR entry's reconstruction of 'this' in a constructor. That
reconstruction code, JITCode::reconstruct(), had a work-around for the case where we
were entering into a constructor at the prologue. In that case, 'this' is definitely
unavailable. But the OSR code does reconstructions at LoopHints, which aren't at the
prologue, and so 'this' should totally be available.

* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
* dfg/DFGJITCode.cpp:
(JSC::DFG::JITCode::reconstruct):
* dfg/DFGNode.h:
(JSC::DFG::Node::tryGetVariableAccessData):
* dfg/DFGSSAConversionPhase.cpp:
(JSC::DFG::SSAConversionPhase::run):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLCompile.cpp:
(JSC::FTL::generateICFastPath):
(JSC::FTL::fixFunctionBasedOnStackMaps):
* ftl/FTLInlineCacheDescriptor.h:
* ftl/FTLJITFinalizer.cpp:
(JSC::FTL::JITFinalizer::codeSize):
* ftl/FTLJSCall.cpp:
(JSC::FTL::JSCall::JSCall):
* ftl/FTLJSCall.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileGetById):
(JSC::FTL::LowerDFGToLLVM::getById):
* ftl/FTLOSREntry.cpp:
(JSC::FTL::prepareOSREntry):
* ftl/FTLStackMaps.cpp:
(JSC::FTL::StackMaps::getRecordMap):
* ftl/FTLStackMaps.h:
* tests/stress/get-by-id-untyped.js: Added.
(foo):

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