Use JSString::toIdentifier() in more places.
<https://webkit.org/b/136348>

Call sites that grab the WTF::String from a JSString using value() can
use the more efficient toIdentifier() if the string is going to be used
to construct an Identifier.

If the JSString is a rope that resolves to something that is already
present in the VM's Identifier table, using toIdentifier() can avoid
allocating a new StringImpl.

Reviewed by Geoffrey Garen.

* jit/JITOperations.cpp:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/CommonSlowPaths.h:
(JSC::CommonSlowPaths::opIn):
* runtime/JSONObject.cpp:
(JSC::Stringifier::Stringifier):
* runtime/ObjectConstructor.cpp:
(JSC::objectConstructorGetOwnPropertyDescriptor):
(JSC::objectConstructorDefineProperty):
* runtime/ObjectPrototype.cpp:
(JSC::objectProtoFuncPropertyIsEnumerable):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173082 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Clients that include WebCoreThread.h fail to build after <http://trac.webkit.org/changeset/172814/>
(https://bugs.webkit.org/show_bug.cgi?id=136108)

Define WEBCORE_EXPORT (if its not already defined) in WebCoreThread.h so as to fix the
build for clients that include this header.

* platform/ios/wak/WebCoreThread.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173090 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Occasional thread-safety-related crashes on the ServicesController queue
https://bugs.webkit.org/show_bug.cgi?id=136356
<rdar://problem/18045685>

Reviewed by Dan Bernstein.

* UIProcess/mac/ServicesController.mm:
(WebKit::hasCompatibleServicesForItems):
Added. Check directly with NSSharingService if we have any services for the given items.
We should eventually check Viewer and Editor services separately so the Web process can
be smarter about when it shows the overlay, but for now this maintains the existing behavior.

(WebKit::ServicesController::refreshExistingServices):
Make use of hasCompatibleServicesForItems instead of having NSSharingServicePicker construct NSMenus.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173092 268f45cc-cd09-0410-ab3c-d52691b4dbfc
_setDidMoveSwipeSnapshotCallback's block should only be called if the snapshot is going to move
https://bugs.webkit.org/show_bug.cgi?id=136354
<rdar://problem/18167791>

Reviewed by Simon Fraser.

* UIProcess/API/Cocoa/WKViewPrivate.h:
Update the comment to note the new behavior.

* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
Don't call the block until the snapshot is actually moving (if the snapshot
never moves because it's behind the live view, don't call the block at all).


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173093 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Can't hit tab key more than 3 times continuously.
https://bugs.webkit.org/show_bug.cgi?id=136357
rdar://problem/17927266

Reviewed by Dean Jackson.

Source/WebCore:

Test: fast/css/multiple-tabs.html

When computing the tabWidth disregard increments of less than half the size of the space character
for the given font.

* platform/graphics/Font.h:
(WebCore::Font::tabWidth):

LayoutTests:

* fast/css/multiple-tabs-expected.html: Added.
* fast/css/multiple-tabs.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DebuggerCallFrame::scope() should return a DebuggerScope.
<https://webkit.org/b/134420>

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Rolling back in r170680 with the fix for <https://webkit.org/b/135656>.

Previously, DebuggerCallFrame::scope() returns a JSActivation (and relevant
peers) which the WebInspector will use to introspect CallFrame variables.
Instead, we should be returning a DebuggerScope as an abstraction layer that
provides the introspection functionality that the WebInspector needs.  This
is the first step towards not forcing every frame to have a JSActivation
object just because the debugger is enabled.

1. Instantiate the debuggerScopeStructure as a member of the JSGlobalObject
   instead of the VM.  This allows JSObject::globalObject() to be able to
   return the global object for the DebuggerScope.

2. On the DebuggerScope's life-cycle management:

   The DebuggerCallFrame is designed to be "valid" only during a debugging session
   (while the debugger is broken) through the use of a DebuggerCallFrameScope in
   Debugger::pauseIfNeeded().  Once the debugger resumes from the break, the
   DebuggerCallFrameScope destructs, and the DebuggerCallFrame will be invalidated.
   We can't guarantee (from this code alone) that the Inspector code isn't still
   holding a ref to the DebuggerCallFrame (though they shouldn't), but by contract,
   the frame will be invalidated, and any attempt to query it will return null values.
   This is pre-existing behavior.

   Now, we're adding the DebuggerScope into the picture.  While a single debugger
   pause session is in progress, the Inspector may request the scope from the
   DebuggerCallFrame.  While the DebuggerCallFrame is still valid, we want
   DebuggerCallFrame::scope() to always return the same DebuggerScope object.
   This is why we hold on to the DebuggerScope with a strong ref.

   If we use a weak ref instead, the following cooky behavior can manifest:
   1. The Inspector calls Debugger::scope() to get the top scope.
   2. The Inspector iterates down the scope chain and is now only holding a
      reference to a parent scope.  It is no longer referencing the top scope.
   3. A GC occurs, and the DebuggerCallFrame's weak m_scope ref to the top scope
      gets cleared.
   4. The Inspector calls DebuggerCallFrame::scope() to get the top scope again but gets
      a different DebuggerScope instance.
   5. The Inspector iterates down the scope chain but never sees the parent scope
      instance that retained a ref to in step 2 above.  This is because when iterating
      this new DebuggerScope instance (which has no knowledge of the previous parent
      DebuggerScope instance), a new DebuggerScope instance will get created for the
      same parent scope. 

   Since the DebuggerScope is a JSObject, its liveness is determined by its reachability.
   However, its "validity" is determined by the life-cycle of its owner DebuggerCallFrame.
   When the owner DebuggerCallFrame gets invalidated, its debugger scope chain (if
   instantiated) will also get invalidated.  This is why we need the
   DebuggerScope::invalidateChain() method.  The Inspector should not be using the
   DebuggerScope instance after its owner DebuggerCallFrame is invalidated.  If it does,
   those methods will do nothing or returned a failed status.

Fix for <https://webkit.org/b/135656>:
3. DebuggerScope::getOwnPropertySlot() and DebuggerScope::put() need to set
   m_thisValue in the returned slot to the wrapped scope object.  Previously,
   it was pointing to the DebuggerScope though the rest of the fields in the
   returned slot will be set to data pertaining the wrapped scope object.

4. DebuggerScope::getOwnPropertySlot() will invoke getPropertySlot() on its
   wrapped scope.  This is because JSObject::getPropertySlot() cannot be
   overridden, and when called on a DebuggerScope, will not know to look in
   the ptototype chain of the DebuggerScope's wrapped scope.  Hence, we'll
   treat all properties in the wrapped scope as own properties in the
   DebuggerScope.  This is fine because the WebInspector does not presently
   care about where in the prototype chain the scope property comes from.

   Note that the DebuggerScope and the JSActivation objects that it wraps do
   not have prototypes.  They are always jsNull().  This works perfectly with
   the above change to use getPropertySlot() instead of getOwnPropertySlot().
   To make this an explicit invariant, I also changed DebuggerScope::createStructure()
   and JSActivation::createStructure() to not take a prototype argument, and
   to always use jsNull() for their prototype value.

* debugger/Debugger.h:
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::scope):
(JSC::DebuggerCallFrame::evaluate):
(JSC::DebuggerCallFrame::invalidate):
* debugger/DebuggerCallFrame.h:
* debugger/DebuggerScope.cpp:
(JSC::DebuggerScope::DebuggerScope):
(JSC::DebuggerScope::finishCreation):
(JSC::DebuggerScope::visitChildren):
(JSC::DebuggerScope::className):
(JSC::DebuggerScope::getOwnPropertySlot):
(JSC::DebuggerScope::put):
(JSC::DebuggerScope::deleteProperty):
(JSC::DebuggerScope::getOwnPropertyNames):
(JSC::DebuggerScope::defineOwnProperty):
(JSC::DebuggerScope::next):
(JSC::DebuggerScope::invalidateChain):
(JSC::DebuggerScope::isWithScope):
(JSC::DebuggerScope::isGlobalScope):
(JSC::DebuggerScope::isFunctionOrEvalScope):
* debugger/DebuggerScope.h:
(JSC::DebuggerScope::create):
(JSC::DebuggerScope::createStructure):
(JSC::DebuggerScope::iterator::iterator):
(JSC::DebuggerScope::iterator::get):
(JSC::DebuggerScope::iterator::operator++):
(JSC::DebuggerScope::iterator::operator==):
(JSC::DebuggerScope::iterator::operator!=):
(JSC::DebuggerScope::isValid):
(JSC::DebuggerScope::jsScope):
(JSC::DebuggerScope::begin):
(JSC::DebuggerScope::end):
* inspector/JSJavaScriptCallFrame.cpp:
(Inspector::JSJavaScriptCallFrame::scopeType):
(Inspector::JSJavaScriptCallFrame::scopeChain):
* inspector/JavaScriptCallFrame.h:
(Inspector::JavaScriptCallFrame::scopeChain):
* inspector/ScriptDebugServer.cpp:
* runtime/JSActivation.h:
(JSC::JSActivation::createStructure):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::reset):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::debuggerScopeStructure):
* runtime/JSObject.cpp:
* runtime/JSObject.h:
(JSC::JSObject::isWithScope):
* runtime/JSScope.h:
* runtime/PropertySlot.h:
(JSC::PropertySlot::setThisValue):
* runtime/PutPropertySlot.h:
(JSC::PutPropertySlot::setThisValue):
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:

Source/WebCore:

No new tests.

Rolling back in r170680 with the fix for <https://webkit.org/b/135656>.

* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::attachDebugger):
- We should acquire the JSLock before modifying a JS global object.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173100 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Win] update-webkit should update auxiliary libs by default

Reviewed by Dan Bernstein.

The change set <http://trac.webkit.org/changeset/172795> inadvertently prevented update-webkit
from updating the Windows auxiliary libs by default. We should make update-webkit update the
Windows auxiliary libs by default. This will make its behavior match its usage text.

* Scripts/update-webkit:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173101 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Write tests for ScriptSyntaxTree and fix bugs in the data structure
https://bugs.webkit.org/show_bug.cgi?id=136272

Patch by Saam Barati <sbarati@apple.com> on 2014-08-28
Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

Include the necessary files in Test.html to test ScriptSyntaxTree.
Also, ScriptSyntaxTree had a couple of errors for two of its nodes
where they simply ignored one of the properties on the node.
These errors were found while writing the tests and are fixed
in this patch.

* UserInterface/Models/ScriptSyntaxTree.js:
(WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
* UserInterface/Test.html:

LayoutTests:

This patch tests all nodes in the WebInspecor's Abstract Syntax Tree.
These tests don't test every aspect of the data structure, but focus
on having it parse all JavaScript expressions successfully and to also
make sure nodes in the tree are of the correct type.

* inspector/model: Added.
* inspector/model/parse-script-syntax-tree-expected.txt: Added.
* inspector/model/parse-script-syntax-tree.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173103 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Merge RenderThemeGtk3.cpp into RenderThemeGtk.cpp and ScrollbarThemeGtk3.cpp intoScrollbarThemeGtk.cpp
https://bugs.webkit.org/show_bug.cgi?id=136336

Reviewed by Philippe Normand.

There's no reason to have two files now that there's no GTK+2
support. Also fix coding style issues and compile warnings.

* PlatformGTK.cmake:
* platform/gtk/RenderThemeGtk.cpp:
* platform/gtk/RenderThemeGtk.h:
* platform/gtk/RenderThemeGtk3.cpp: Removed.
* platform/gtk/ScrollbarThemeGtk.cpp:
* platform/gtk/ScrollbarThemeGtk3.cpp: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173109 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] ScrollbarThemeGtk should not depend on RenderThemeGtk
https://bugs.webkit.org/show_bug.cgi?id=136338

Reviewed by Philippe Normand.

Remove the dependency by creating the GtkStyleContext for the
scrollbars in ScrollbarThemeGtk.

* platform/gtk/RenderThemeGtk.cpp:
(WebCore::gtkStyleChangedCallback): Call ScrollbarThemeGtk::themeChanged().
(WebCore::getStyleContext): Remove the scrollbar style context support.
* platform/gtk/RenderThemeGtk.h: Remove gtkScrollbarStyle().
* platform/gtk/ScrollbarThemeGtk.cpp:
(WebCore::ScrollbarStyleContext::ScrollbarStyleContext): Helper
class to create the global GtkStyleContext for scrollbars.
(WebCore::ScrollbarStyleContext::~ScrollbarStyleContext):
(WebCore::ScrollbarStyleContext::context):
(WebCore::gtkScrollbarStyleContext):
(WebCore::ScrollbarThemeGtk::ScrollbarThemeGtk): Remove m_context initialization.
(WebCore::ScrollbarThemeGtk::themeChanged): Invalidate the
GtkStylecontext and call updateThemeProperties().
(WebCore::ScrollbarThemeGtk::updateThemeProperties): Use the
global style context.
(WebCore::ScrollbarThemeGtk::paintTrackBackground): Ditto.
(WebCore::ScrollbarThemeGtk::paintScrollbarBackground): Ditto.
(WebCore::ScrollbarThemeGtk::paintThumb): Ditto.
(WebCore::ScrollbarThemeGtk::paintButton): Ditto.
* platform/gtk/ScrollbarThemeGtk.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173110 268f45cc-cd09-0410-ab3c-d52691b4dbfc
RenderThemeGtk depends on classes outside of platform
https://bugs.webkit.org/show_bug.cgi?id=22176

Reviewed by Martin Robinson.

Move RenderThemeGtk.cpp from platform to rendering.

* PlatformGTK.cmake:
* rendering/RenderThemeGtk.cpp: Renamed from Source/WebCore/platform/gtk/RenderThemeGtk.cpp.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173111 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Remove non Coordinated Graphics code path from cmake build system after r142169
https://bugs.webkit.org/show_bug.cgi?id=135560

Patch by Eva Balazsfalvi <evab.u-szeged@partner.samsung.com> on 2014-08-29
Reviewed by Gyuyoung Kim.

.:

* Source/cmake/OptionsEfl.cmake: Removed TILED_BACKING_STORE guard.

Source/WebCore:

No new tests required, no new functionality.

* PlatformEfl.cmake: Removed TEXTURE_MAPPER and 3D_GRAPHICS guards.
* platform/graphics/efl/GraphicsContext3DEfl.cpp: Removed TEXTURE_MAPPER_GL and GRAPHICS_SURFACE guards.
(WebCore::GraphicsContext3D::platformLayer):
(WebCore::GraphicsContext3D::createGraphicsSurfaces):
* platform/graphics/efl/GraphicsContext3DPrivate.cpp: Removed TEXTURE_MAPPER_GL and GRAPHICS_SURFACE guards.
(WebCore::GraphicsContext3DPrivate::initialize):
(WebCore::GraphicsContext3DPrivate::releaseResources):
(WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
(WebCore::GraphicsContext3DPrivate::graphicsSurfaceFlags):
* platform/graphics/efl/GraphicsContext3DPrivate.h: Removed TEXTURE_MAPPER_GL and GRAPHICS_SURFACE guards.
* platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp: Removed GRAPHICS_SURFACE guard.

Tools:

* Scripts/webkitperl/FeatureList.pm: Removed TILED_BACKING_STORE guard.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173112 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviwed, remove empty directories.

Source/JavaScriptCore:

* qt: Removed.

Source/ThirdParty/ANGLE:

* src/compiler/depgraph: Removed.
* src/compiler/timing: Removed.
* src/libGLESv2/renderer/shaders: Removed.
* src/libGLESv2/renderer/shaders/compiled: Removed.

Source/WebCore:

* Modules/networkinfo: Removed.
* inspector/front-end: Removed.
* inspector/front-end/Images: Removed.
* inspector/front-end/UglifyJS: Removed.
* inspector/front-end/ace: Removed.
* inspector/front-end/cm: Removed.
* platform/audio/ffmpeg: Removed.
* platform/audio/ipp: Removed.
* platform/graphics/gpu/opencl: Removed.

Source/WebKit:

* efl: Removed.
* efl/DefaultTheme: Removed.
* efl/DefaultTheme/widget: Removed.
* efl/WebCoreSupport: Removed.
* efl/ewk: Removed.
* efl/tests: Removed.
* efl/tests/UnitTestUtils: Removed.
* efl/tests/resources: Removed.
* gtk: Removed.
* gtk/WebCoreSupport: Removed.
* gtk/docs: Removed.
* gtk/gdom: Removed.
* gtk/resources: Removed.
* gtk/webkit: Removed.

Source/WebKit/mac:

* ForwardingHeaders/wtf: Removed.

Source/WebKit2:

* PluginProcess/qt: Removed.
* Shared/API/c/qt: Removed.
* Shared/Downloads/qt: Removed.
* Shared/FileAPI: Removed.
* Shared/qt: Removed.
* UIProcess/API/C/qt: Removed.
* UIProcess/API/cpp/qt: Removed.
* UIProcess/API/qt: Removed.
* UIProcess/API/qt/raw: Removed.
* UIProcess/API/qt/tests: Removed.
* UIProcess/API/qt/tests/html: Removed.
* UIProcess/API/qt/tests/html/resources: Removed.
* UIProcess/API/qt/tests/inspectorserver: Removed.
* UIProcess/API/qt/tests/publicapi: Removed.
* UIProcess/API/qt/tests/qmltests: Removed.
* UIProcess/API/qt/tests/qmltests/DesktopBehavior: Removed.
* UIProcess/API/qt/tests/qmltests/WebView: Removed.
* UIProcess/API/qt/tests/qmltests/common: Removed.
* UIProcess/API/qt/tests/qquickwebview: Removed.
* UIProcess/API/qt/tests/qrawwebview: Removed.
* UIProcess/InspectorServer/qt: Removed.
* UIProcess/Launcher/qt: Removed.
* UIProcess/Plugins/qt: Removed.
* UIProcess/SharedWorkers: Removed.
* UIProcess/qt: Removed.
* WebProcess/Cookies/qt: Removed.
* WebProcess/Downloads: Removed.
* WebProcess/IndexedDB: Removed.
* WebProcess/InjectedBundle/qt: Removed.
* WebProcess/NetworkInfo: Removed.
* WebProcess/Plugins/Netscape/qt: Removed.
* WebProcess/WebCoreSupport/qt: Removed.
* WebProcess/WebPage/qt: Removed.
* WebProcess/qt: Removed.
* qt: Removed.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173113 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Improve showRenderTree() output.
https://bugs.webkit.org/show_bug.cgi?id=136244

Reviewed by Darin Adler.

Add more debugging information to showRenderTree().

Not testable.

* rendering/InlineBox.cpp:
(WebCore::InlineBox::showLineTreeForThis):
(WebCore::InlineBox::showLineTreeAndMark):
(WebCore::InlineBox::showLineBox):
(showNodeTree):
(showLineTree):
(WebCore::InlineBox::showBox): Deleted.
* rendering/InlineBox.h:
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::showLineTreeAndMark):
* rendering/InlineFlowBox.h:
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::showLineBox):
(WebCore::InlineTextBox::showBox): Deleted.
* rendering/InlineTextBox.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::showLineTreeAndMark): Deleted.
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::showLineTreeAndMark):
* rendering/RenderBlockFlow.h:
* rendering/RenderObject.cpp:
(WebCore::showRenderTreeLegend):
(WebCore::RenderObject::showNodeTreeForThis):
(WebCore::RenderObject::showRenderTreeForThis):
(WebCore::RenderObject::showLineTreeForThis):
(WebCore::RenderObject::showRegionsInformation):
(WebCore::RenderObject::showRenderObject):
(WebCore::RenderObject::showRenderSubTreeAndMark):
(showNodeTree):
(showLineTree):
(showRenderTree):
(WebCore::RenderObject::showRenderTreeAndMark): Deleted.
* rendering/RenderObject.h:
* rendering/RootInlineBox.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173114 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove NetworkResourceLoaderClient and subclasses.
https://bugs.webkit.org/show_bug.cgi?id=136370

Reviewed by Darin Adler.

This code is needlessly abstract. Move what logic these classes have to NetworkResourceLoader.

* NetworkProcess/AsynchronousNetworkLoaderClient.cpp: Removed.
* NetworkProcess/AsynchronousNetworkLoaderClient.h: Removed.
* NetworkProcess/NetworkLoaderClient.h: Removed.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::NetworkResourceLoader):
(WebKit::NetworkResourceLoader::~NetworkResourceLoader):
(WebKit::NetworkResourceLoader::isSynchronous):
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):
(WebKit::NetworkResourceLoader::didReceiveBuffer):
(WebKit::NetworkResourceLoader::didFinishLoading):
(WebKit::NetworkResourceLoader::didFail):
(WebKit::NetworkResourceLoader::willSendRequestAsync):
(WebKit::NetworkResourceLoader::didSendData):
(WebKit::NetworkResourceLoader::sendBuffer):
(WebKit::NetworkResourceLoader::sendReplyToSynchronousRequest):
(WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
* NetworkProcess/NetworkResourceLoader.h:
(WebKit::NetworkResourceLoader::SynchronousLoadData::SynchronousLoadData):
* NetworkProcess/SynchronousNetworkLoaderClient.cpp: Removed.
* NetworkProcess/SynchronousNetworkLoaderClient.h: Removed.
* WebKit2.xcodeproj/project.pbxproj:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173115 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[JSC] Some JSC tests are dependent on the machine time zone.
https://bugs.webkit.org/show_bug.cgi?id=136363

Reviewed by Filip Pizlo.

* Scripts/run-javascriptcore-tests: Export TZ environment variable to US/Pacific.
Unskip the tests that were skipped on r99580.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173116 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Fix how Popover animates
https://bugs.webkit.org/show_bug.cgi?id=136353

Patch by Saam Barati <sbarati@apple.com> on 2014-08-29
Reviewed by Timothy Hatcher.

Popovers currently don't animate properly because they use
window.requestAnimationFrame which won't fire its callback
while the inspector is paused in the debugger. This patches
switches the callback mechanism to setTimeout and also changes
how a Popover's anchor animates to prevent visual glitches.

Popover also has a new function that allows a new target
frame and new content to be set simultaneously and to
animate to show the new content while changing the
location of the popover frame.

SourceCodeTextEditor uses Popover's new API for animating
between popovers when paused in the debugger. SourceCodeTextEditor
also now ensures proper balancing of popover tracking event
listeners.

* UserInterface/Views/Popover.js:
(WebInspector.Popover.prototype.present):
(WebInspector.Popover.prototype.presentNewContentWithFrame):
(WebInspector.Popover.prototype.dismiss):
(WebInspector.Popover.prototype._update):
(WebInspector.Popover.prototype.drawBackground):
(WebInspector.Popover.prototype._animateFrame):
(WebInspector.Popover.prototype._drawFrame):
(WebInspector.Popover.prototype._addListenersIfNeeded):
(WebInspector.Popover.prototype._animateFrame.drawBackground): Deleted.
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._showPopover):
(WebInspector.SourceCodeTextEditor.prototype._dismissPopover):
(WebInspector.SourceCodeTextEditor.prototype._trackPopoverEvents):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173117 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebPageProxy::close() is a no-op for terminated processes
https://bugs.webkit.org/show_bug.cgi?id=136378
Related to <rdar://problem/16991213> and to <rdar://problem/17095600>

Reviewed by Brady Eidson.

Also fixes issues that got uncovered after making close() work.

* UIProcess/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::invalidate): Don't
close the page, because it makes no sense, and causes an assertion now. Previosly,
this was OK because the page was invalid already, and close() was a no-op.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::~WebPageProxy): Added some assertions to catch invalidation
issues earlier.
(WebKit::WebPageProxy::reattachToWebProcess): Make it an invariant that a page's
process always has a message receiver for it, until close() removes it.
(WebKit::WebPageProxy::close): Make this function work for all open pages, whether
they have a page or not.
(WebKit::WebPageProxy::processDidFinishLaunching): Added an asserion that process
agrees about its state.
(WebKit::WebPageProxy::resetStateAfterProcessExited): Don't remove a message receiver,
we now only do this in reattach or close.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173118 268f45cc-cd09-0410-ab3c-d52691b4dbfc
More occasional crashes in ServicesController::resfreshExistingServices
https://bugs.webkit.org/show_bug.cgi?id=136387
<rdar://problem/18167200>

Reviewed by Dan Bernstein.

* UIProcess/mac/ServicesController.mm:
(WebKit::ServicesController::ServicesController):
Speculative fix; if this block is called synchronously, we'll end up
calling back into ::shared() before the NeverDestroyed is initialized,
ending up with two ServicesControllers.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173119 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore: Use ASCIILiteral where possible
https://bugs.webkit.org/show_bug.cgi?id=136179

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-08-29
Reviewed by Michael Saboff.

Source/JavaScriptCore:

General string / character related changes. Use ASCIILiteral where
possible, jsNontrivialString where possible, and replace string
literals with character literals in some places.

No new tests, no changes to functionality.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::nameForRegister):
* bytecompiler/NodesCodegen.cpp:
(JSC::PostfixNode::emitBytecode):
(JSC::PrefixNode::emitBytecode):
(JSC::AssignErrorNode::emitBytecode):
(JSC::ForInNode::emitMultiLoopBytecode):
(JSC::ForOfNode::emitBytecode):
(JSC::ObjectPatternNode::toString):
* dfg/DFGFunctionWhitelist.cpp:
(JSC::DFG::FunctionWhitelist::contains):
* dfg/DFGOperations.cpp:
(JSC::DFG::newTypedArrayWithSize):
(JSC::DFG::newTypedArrayWithOneArgument):
* inspector/ConsoleMessage.cpp:
(Inspector::ConsoleMessage::addToFrontend):
* inspector/InspectorBackendDispatcher.cpp:
(Inspector::InspectorBackendDispatcher::dispatch):
* inspector/ScriptCallStackFactory.cpp:
(Inspector::extractSourceInformationFromException):
* inspector/scripts/codegen/generator_templates.py:
* interpreter/StackVisitor.cpp:
(JSC::StackVisitor::Frame::functionName):
(JSC::StackVisitor::Frame::sourceURL):
* jit/JITOperations.cpp:
* jsc.cpp:
(functionDescribeArray):
(functionRun):
(functionLoad):
(functionReadFile):
(functionCheckSyntax):
(functionTransferArrayBuffer):
(runWithScripts):
(runInteractive):
* parser/Lexer.cpp:
(JSC::Lexer<T>::invalidCharacterMessage):
(JSC::Lexer<T>::parseString):
(JSC::Lexer<T>::parseStringSlowCase):
(JSC::Lexer<T>::lex):
* profiler/Profile.cpp:
(JSC::Profile::Profile):
* runtime/Arguments.cpp:
(JSC::argumentsFuncIterator):
* runtime/ArrayPrototype.cpp:
(JSC::performSlowSort):
(JSC::arrayProtoFuncSort):
* runtime/ExceptionHelpers.cpp:
(JSC::createError):
(JSC::createInvalidParameterError):
(JSC::createNotAConstructorError):
(JSC::createNotAFunctionError):
(JSC::createNotAnObjectError):
(JSC::createErrorForInvalidGlobalAssignment):
* runtime/FunctionPrototype.cpp:
(JSC::insertSemicolonIfNeeded):
* runtime/JSArray.cpp:
(JSC::JSArray::defineOwnProperty):
(JSC::JSArray::pop):
(JSC::JSArray::push):
* runtime/JSArrayBufferConstructor.cpp:
(JSC::JSArrayBufferConstructor::finishCreation):
* runtime/JSArrayBufferPrototype.cpp:
(JSC::arrayBufferProtoFuncSlice):
* runtime/JSDataView.cpp:
(JSC::JSDataView::create):
* runtime/JSDataViewPrototype.cpp:
(JSC::getData):
(JSC::setData):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::reset):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncProtoSetter):
* runtime/JSPromiseConstructor.cpp:
(JSC::JSPromiseConstructor::finishCreation):
* runtime/LiteralParser.cpp:
(JSC::LiteralParser<CharType>::Lexer::lex):
(JSC::LiteralParser<CharType>::Lexer::lexString):
(JSC::LiteralParser<CharType>::parse):
* runtime/LiteralParser.h:
(JSC::LiteralParser::getErrorMessage):
* runtime/TypeSet.cpp:
(JSC::TypeSet::seenTypes):
(JSC::TypeSet::displayName):
(JSC::TypeSet::allPrimitiveTypeNames):
(JSC::StructureShape::propertyHash):
(JSC::StructureShape::stringRepresentation):

Source/WTF:

* wtf/text/WTFString.cpp:
(asciiDebug):

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