Web Inspector: Fix negative time interval on zoom-in
https://bugs.webkit.org/show_bug.cgi?id=89798

Patch by Eugene Klyuchnikov <eustas.big@gmail.com> on 2012-06-22
Reviewed by Pavel Feldman.

Steps to reproduce:
1) Record timeline
2) Select small range with left tick close to zero
3) Move pointer to the right end of the ruler
4) Zoom-in with mouse-wheel

Result: right tick goes below the zero.

* inspector/front-end/TimelineOverviewPane.js:
(WebInspector.TimelineOverviewWindow.prototype._zoom):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121084 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Text with text-overflow:ellipsis and text-align:right is left aligned
https://bugs.webkit.org/show_bug.cgi?id=88705

Patch by Benjamin Poulain <bpoulain@apple.com> on 2012-06-22
Reviewed by Dan Bernstein.

Source/WebCore: 

When building the line of a text with overflow, we do not know if we can place
an ellipsis and where it should be. Because of that, text is laid out as if it does
not have text-overflow: ellipsis.

This causes problems with text-alignement right in LTR and left in RTL. The shortened text
did not follow the allignment.

This patch changes the position of lines with ellipsis after layout to follow the allignment.
In RenderBlock::checkLinesForTextOverflow(), the call to RootInlineBox::placeEllipsis() now
also gives the width of the truncated text. We use this width to re-compute the alignement and
shift the box if necessary.

In RenderBlock::deleteEllipsisLineBoxes() we revert the text to the position computed with the
total width. This way all layout computation is done as usual.

Tests: fast/css/text-overflow-ellipsis-text-align-left.html
       fast/css/text-overflow-ellipsis-text-align-right.html

* rendering/InlineBox.cpp:
(WebCore::InlineBox::canAccommodateEllipsis): Make the method const for readability, truncating is
done later in placeEllipsisBox().
(WebCore::InlineBox::placeEllipsisBox): Add an output argument, truncatedWidth, giving the width
of the text + ellipsis after truncation (if any truncation can be done).
* rendering/InlineBox.h:
(InlineBox):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineBox::adjustLogicalPosition): adjustPosition() logical coordinates.
(WebCore::InlineFlowBox::canAccommodateEllipsis):
(WebCore::InlineFlowBox::placeEllipsisBox):
* rendering/InlineFlowBox.h:
(InlineFlowBox):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::placeEllipsisBox):
* rendering/InlineTextBox.h:
(InlineTextBox):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::deleteEllipsisLineBoxes): In addition to removing the truncation, we
need to revert the shift introduced by checkLinesForTextOverflow(). This restore the lines
to its original, untruncated position in order to layout the block correctly in RenderBlock::layoutInlineChildren().
(WebCore::RenderBlock::checkLinesForTextOverflow): After we truncate the text, we now recompute the shift we need
for alignment, and move the line accordingly.
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::placeEllipsis): Return the width of the truncated text + the width of the ellipsis.
(WebCore::RootInlineBox::placeEllipsisBox):
(WebCore::RootInlineBox::adjustPosition):
* rendering/RootInlineBox.h:
(RootInlineBox):

LayoutTests: 

* fast/css/text-overflow-ellipsis-text-align-center.html: Added.
* fast/css/text-overflow-ellipsis-text-align-justify.html: Added.
* fast/css/text-overflow-ellipsis-text-align-left.html: Added.
* fast/css/text-overflow-ellipsis-text-align-right.html: Added.
* fast/css/vertical-text-overflow-ellipsis-text-align-center.html: Added.
* fast/css/vertical-text-overflow-ellipsis-text-align-justify.html: Added.
* fast/css/vertical-text-overflow-ellipsis-text-align-left.html: Added.
* fast/css/vertical-text-overflow-ellipsis-text-align-right.html: Added.
The vertical-text tests are incorrect due to other bugs. Add they to track regressions/progressions
going forward.

* platform/chromium/TestExpectations: The tests need platform specific results.
* platform/mac/fast/css/text-overflow-ellipsis-text-align-center-expected.txt: Added.
* platform/mac/fast/css/text-overflow-ellipsis-text-align-justify-expected.txt: Added.
* platform/mac/fast/css/text-overflow-ellipsis-text-align-left-expected.txt: Added.
* platform/mac/fast/css/text-overflow-ellipsis-text-align-right-expected.txt: Added.
* platform/mac/fast/css/text-overflow-ellipsis-text-align-center-expected.txt: Added.
* platform/mac/fast/css/text-overflow-ellipsis-text-align-justify-expected.txt: Added.
* platform/mac/fast/css/text-overflow-ellipsis-text-align-left-expected.txt: Added.
* platform/mac/fast/css/text-overflow-ellipsis-text-align-right-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121085 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] DumpRenderTree on Android needs to configure fonts for testing
https://bugs.webkit.org/show_bug.cgi?id=89721

Reviewed by Nate Chapin.

This patch teaches DumpRenderTree to configure Skia to use the fallback
fonts that the LayoutTests assume. This patch reduces the number result
differences between chromium-android and chromium-linux.

* DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
* DumpRenderTree/chromium/TestShellAndroid.cpp:
(platformInit):
* DumpRenderTree/chromium/android_fallback_fonts.xml: Added.
* DumpRenderTree/chromium/android_main_fonts.xml: Added.
* Scripts/webkitpy/layout_tests/port/chromium_android.py:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121086 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed.  Rolled DEPS.

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-06-22

* DEPS:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Update my email.

* Scripts/webkitpy/common/config/committers.py:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121088 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Add a new webkit2 tests slave bot
https://bugs.webkit.org/show_bug.cgi?id=89336

Reviewed by Csaba Osztrogonác.

Slave configuration for a new GTK 64 bit release bot that will run
WebKit2 tests.

Also BuildAndTest now accepts the "triggers" parametter,
this means that apart from building and testing it can trigger
some other build/test sequences in other slaves.

* BuildSlaveSupport/build.webkit.org-config/config.json:
* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(BuildAndTestFactory.__init__):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121089 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening after 121063, adding IMAGE test expectation
for tests in fast/css-grid-layout now that some reftests are working
properly and causing failures for platforms that don't support the
feature yet.

* platform/gtk/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121090 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Return has value, in function returning void
https://bugs.webkit.org/show_bug.cgi?id=89805

Patch by Kwang Yul Seo <skyul@company100.net> on 2012-06-23
Reviewed by Adam Barth.

Make WebFrameImpl::replaceSelection not return a value because it is a function returning void.

* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::replaceSelection):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121091 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Fix chromium test expectations

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121092 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Add ContextMenu API to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=81011

Reviewed by Martin Robinson.

Add WebKitWebView::context-menu signal and WebKitContextMenu and
WebKitContextMenuItem objects to customize the default menu or
buils new menus.

* GNUmakefile.list.am: Add new files to destination.
* UIProcess/API/gtk/WebKitContextMenu.cpp: Added.
(webkitContextMenuFinalize):
(webkit_context_menu_init):
(webkit_context_menu_class_init):
(webkitContextMenuPopulate): Populate the given vector of
ContextMenuItems with the WebKitContextMenu items releasing the
items added to the vector.
(webkitContextMenuCreate): Create a new WebKitContextMenu for the
given WKArrayRef of WKContextMenuItemRef.
(webkitContextMenuSetParentItem): Set the parent menu item of the
menu. Used when a menu is added as a submenu of a menu item.
(webkitContextMenuGetParentItem): Return the parent menu item of
the menu.
(webkit_context_menu_new): Create a new WebKitContextMenu.
(webkit_context_menu_new_with_items): Create a new
WebKitContextMenu using the given list of WebKitContextMenuItem.
(webkit_context_menu_prepend): Add item at the beginning.
(webkit_context_menu_append): Add item at the end.
(webkit_context_menu_insert): Insert item at a random position.
(webkit_context_menu_move_item): Move an existing item to a new
position.
(webkit_context_menu_get_items): Get the list of items.
(webkit_context_menu_get_n_items): Get the number of items.
(webkit_context_menu_first): Get the first item.
(webkit_context_menu_last): Get the last item.
(webkit_context_menu_get_item_at_position): Get the item at the
given position.
(webkit_context_menu_remove): Remove the given item.
(webkit_context_menu_remove_all): Remove all items.
* UIProcess/API/gtk/WebKitContextMenu.h: Added.
* UIProcess/API/gtk/WebKitContextMenuActions.cpp: Added.
(webkitContextMenuActionIsCheckable): Check if the given stock
action is a toggle action.
(webkitContextMenuActionGetActionTag): Get the WebCore
ContextMenuAction corresponding to the given stock action.
(webkitContextMenuActionGetForContextMenuItem): Get the stock
action corresponding to the given WebCore ContextMenuAction.
(webkitContextMenuActionGetLabel): Get the label string of the
given stock action.
* UIProcess/API/gtk/WebKitContextMenuActions.h: Added.
* UIProcess/API/gtk/WebKitContextMenuActionsPrivate.h: Added.
* UIProcess/API/gtk/WebKitContextMenuItem.cpp: Added.
(webkitContextMenuItemFinalize):
(webkit_context_menu_item_init):
(webkit_context_menu_item_class_init):
(checkAndWarnIfMenuHasParentItem): Check whether the given menu
is already inside another menu showing a warning in such case.
(webkitContextMenuItemSetSubMenu): Set the submenu of a menu item,
checking that the menu is not part of another menu and setting the
item as the parent of the submenu.
(webkitContextMenuItemCreate): Create a new WebKitContextMenuItem
for the given WKContextMenuItemRef.
(webkitContextMenuItemCreateForGtkItem): Create a new
WebKitContextMenuItem using the given GtkMenuItem.
(webkitContextMenuItemSetSubMenuFromGtkMenu): Set the given
GtkMenu as submenu of the item. This is used only to add Input
Methods submenu that is created by GTK.
(webkitContextMenuItemRelease): Release the WebCore
ContextMenuItem associated to the item.
(webkit_context_menu_item_new): Create a new WebKitContextMenuItem
for the given GtkAction.
(webkit_context_menu_item_new_from_stock_action): Create a new
WebKitContextMenuItem for a stock action.
(webkit_context_menu_item_new_from_stock_action_with_label):
Create a new WebKitContextMenuItem for a stock action using a
custom label.
(webkit_context_menu_item_new_with_submenu): Create a new
WebKitContextMenuItem with a submenu.
(webkit_context_menu_item_new_separator): Create a new separator
menu item.
(webkit_context_menu_item_get_action): Get the GtkAction of the item.
(webkit_context_menu_item_get_stock_action): Get the stock action
of the item.
(webkit_context_menu_item_is_separator): Whether item is a separator.
(webkit_context_menu_item_set_submenu): Set or replace the
submenu of the item.
(webkit_context_menu_item_get_submenu): Get the submenu of the item.
* UIProcess/API/gtk/WebKitContextMenuItem.h: Added.
* UIProcess/API/gtk/WebKitContextMenuItemPrivate.h: Added.
* UIProcess/API/gtk/WebKitContextMenuPrivate.h: Added.
* UIProcess/API/gtk/WebKitDefines.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_class_init): Add WebKitWebView::context-menu signal.
(getUnicodeMenuItemPosition): Helper function that returns the
position of the unicode menu item in the proposed context menu.
(webkitWebViewCreateAndAppendInputMethodsMenuItem): Use
WebKitContextMenu API to add the input methods submenu to the
default context menu.
(webkitWebViewPopulateContextMenu): Create a WebKitContextMenu for
the default context menu and emit WebKitWebView::context-menu
signal. Then populate the context menu proxy with the resulting
WebKitContextMenu.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseButtonPressEvent): In case of right click save
the event to be used by context menu signal.
(webkitWebViewBaseTakeContextMenuEvent): Return and release the
saved button event.
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add sections for
WebKitContextMenu and WebKitContextMenuItem.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
* UIProcess/API/gtk/docs/webkit2gtk.types: Add
webkit_context_menu_get_type and webkit_context_menu_item_get_type.
* UIProcess/API/gtk/tests/GNUmakefile.am: Add new test for context menu.
* UIProcess/API/gtk/tests/TestContextMenu.cpp: Added.
(testContextMenuDefaultMenu):
(testContextMenuPopulateMenu):
(testContextMenuCustomMenu):
(testContextMenuDisableMenu):
(testContextMenuSubMenu):
(beforeAll):
(afterAll):
* UIProcess/API/gtk/tests/TestMain.h:
(Test::addLogFatalFlag): Add a log level flag to the mask of flags
causing the program to abort.
(Test::removeLogFatalFlag): Remove a log level flag to the mask of
flags causing the program to abort.
* UIProcess/API/gtk/tests/WebViewTest.cpp:
(WebViewTest::quitMainLoop): Finish the main loop.
(WebViewTest::quitMainLoopAfterProcessingPendingEvents): Finish
the main loop when all pending events have been processed.
(quitMainLoopIdleCallback):
(WebViewTest::wait):
* UIProcess/API/gtk/tests/WebViewTest.h:
* UIProcess/API/gtk/webkit2.h: Include WebKitContextMenu.h,
WebKitContextMenuItem.h and WebKitContextMenuActions.h.
* UIProcess/API/gtk/webkit2marshal.list:
* UIProcess/gtk/WebContextMenuProxyGtk.cpp:
(WebKit::WebContextMenuProxyGtk::showContextMenu): Attach the
popup menu to the view widget before showing it.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121093 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Fix several GTK+ unit tests.

GTK+ unit tests using WebViewTest::wait() started to fail due to a
bug introduced in r121093.

* UIProcess/API/gtk/tests/WebViewTest.cpp:
(WebViewTest::wait): Use this instead of m_mainLoop as user data
for the idle callback.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121094 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][WK2]Mis-spelt defaultWindowTitle
https://bugs.webkit.org/show_bug.cgi?id=89808

Patch by Wajahat Siddiqui <mdwajahatali.siddiqui@motorola.com> on 2012-06-23
Reviewed by Carlos Garcia Campos.

* MiniBrowser/gtk/BrowserWindow.c:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121095 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Store hit-test rect in HitTestPoint as Rect.
https://bugs.webkit.org/show_bug.cgi?id=89454

Patch by Allan Sandfeld Jensen <allan.jensen@nokia.com> on 2012-06-23
Reviewed by Darin Adler.

Calculate the rectangle early and store that instead of padding
to avoid recalculating the rectangle for every single element
hit tested.

No change in functionality. No new tests.

* page/EventHandler.cpp:
(WebCore::EventHandler::bestClickableNodeForTouchPoint):
(WebCore::EventHandler::bestZoomableAreaForTouchPoint):
* rendering/HitTestResult.cpp:
(WebCore::HitTestPoint::HitTestPoint):
(WebCore::HitTestPoint::operator=):
(WebCore::HitTestPoint::setPoint):
(WebCore::hitTestPointIntersects):
(WebCore::HitTestPoint::intersects):
(WebCore::HitTestResult::addNodeToRectBasedTestResult):
* rendering/HitTestResult.h:
(HitTestPoint):
(WebCore::HitTestPoint::boundingBox):
(WebCore::HitTestPoint::topPadding):
(WebCore::HitTestPoint::rightPadding):
(WebCore::HitTestPoint::bottomPadding):
(WebCore::HitTestPoint::leftPadding):
(HitTestResult):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::hitTestColumns):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::nodeAtPoint):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121096 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix for GTK's WebKit2 build after r121093.

* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewPopulateContextMenu):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r121058.
http://trac.webkit.org/changeset/121058
https://bugs.webkit.org/show_bug.cgi?id=89809

Patch causes plugins tests to crash in GTK debug builds
(Requested by zdobersek on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-06-23

Source/JavaScriptCore: 

* API/APIShims.h:
(JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
(JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
(APIEntryShimWithoutLock):
(JSC::APIEntryShim::APIEntryShim):
(APIEntryShim):
(JSC::APICallbackShim::~APICallbackShim):
* API/JSContextRef.cpp:
(JSGlobalContextCreate):
(JSGlobalContextCreateInGroup):
(JSGlobalContextRelease):
(JSContextCreateBacktrace):
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* heap/CopiedSpace.cpp:
(JSC::CopiedSpace::tryAllocateSlowCase):
* heap/Heap.cpp:
(JSC::Heap::protect):
(JSC::Heap::unprotect):
(JSC::Heap::collect):
(JSC::Heap::setActivityCallback):
(JSC::Heap::activityCallback):
(JSC::Heap::sweeper):
* heap/Heap.h:
(Heap):
* heap/HeapTimer.cpp:
(JSC::HeapTimer::~HeapTimer):
(JSC::HeapTimer::invalidate):
(JSC::HeapTimer::timerDidFire):
(JSC):
* heap/HeapTimer.h:
(HeapTimer):
* heap/IncrementalSweeper.cpp:
(JSC::IncrementalSweeper::doWork):
(JSC::IncrementalSweeper::create):
* heap/IncrementalSweeper.h:
(IncrementalSweeper):
* heap/MarkedAllocator.cpp:
(JSC::MarkedAllocator::allocateSlowCase):
* heap/WeakBlock.cpp:
(JSC::WeakBlock::reap):
* jsc.cpp:
(functionGC):
(functionReleaseExecutableMemory):
(jscmain):
* runtime/Completion.cpp:
(JSC::checkSyntax):
(JSC::evaluate):
* runtime/GCActivityCallback.h:
(DefaultGCActivityCallback):
(JSC::DefaultGCActivityCallback::create):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
(JSC::JSGlobalData::~JSGlobalData):
(JSC::JSGlobalData::sharedInstance):
(JSC::JSGlobalData::sharedInstanceInternal):
* runtime/JSGlobalData.h:
(JSGlobalData):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::~JSGlobalObject):
(JSC::JSGlobalObject::init):
* runtime/JSLock.cpp:
(JSC):
(JSC::createJSLockCount):
(JSC::JSLock::lockCount):
(JSC::setLockCount):
(JSC::JSLock::JSLock):
(JSC::JSLock::lock):
(JSC::JSLock::unlock):
(JSC::JSLock::currentThreadIsHoldingLock):
(JSC::JSLock::DropAllLocks::DropAllLocks):
(JSC::JSLock::DropAllLocks::~DropAllLocks):
* runtime/JSLock.h:
(JSC):
(JSLock):
(JSC::JSLock::JSLock):
(JSC::JSLock::~JSLock):
(DropAllLocks):
* runtime/WeakGCMap.h:
(JSC::WeakGCMap::set):
* testRegExp.cpp:
(realMain):

Source/WebCore: 

* bindings/js/GCController.cpp:
(WebCore::collect):
(WebCore::GCController::garbageCollectSoon):
(WebCore::GCController::garbageCollectNow):
(WebCore::GCController::discardAllCompiledCode):
* bindings/js/JSCustomSQLStatementErrorCallback.cpp:
(WebCore::JSSQLStatementErrorCallback::handleEvent):
* bindings/js/JSCustomVoidCallback.cpp:
(WebCore::JSCustomVoidCallback::handleEvent):
* bindings/js/JSCustomXPathNSResolver.cpp:
(WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
* bindings/js/JSErrorHandler.cpp:
(WebCore::JSErrorHandler::handleEvent):
* bindings/js/JSEventCustom.cpp:
(WebCore::toJS):
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::handleEvent):
* bindings/js/JSInjectedScriptHostCustom.cpp:
(WebCore::InjectedScriptHost::nodeAsScriptValue):
(WebCore::JSInjectedScriptHost::inspectedObject):
* bindings/js/JSInjectedScriptManager.cpp:
(WebCore::InjectedScriptManager::createInjectedScript):
(WebCore::InjectedScriptManager::canAccessInspectedWindow):
* bindings/js/JSLazyEventListener.cpp:
(WebCore::JSLazyEventListener::initializeJSFunction):
* bindings/js/JSMainThreadExecState.h:
(WebCore::JSMainThreadExecState::evaluate):
* bindings/js/JSMutationCallbackCustom.cpp:
(WebCore::JSMutationCallback::handleEvent):
* bindings/js/JSNodeFilterCondition.cpp:
(WebCore::JSNodeFilterCondition::acceptNode):
* bindings/js/JSRequestAnimationFrameCallbackCustom.cpp:
(WebCore::JSRequestAnimationFrameCallback::handleEvent):
* bindings/js/JavaScriptCallFrame.cpp:
(WebCore::JavaScriptCallFrame::evaluate):
* bindings/js/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::recompileAllJSFunctions):
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::executeFunctionInContext):
* bindings/js/ScriptCachedFrameData.cpp:
(WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
(WebCore::ScriptCachedFrameData::restore):
(WebCore::ScriptCachedFrameData::clear):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::evaluateInWorld):
(WebCore::ScriptController::clearWindowShell):
(WebCore::ScriptController::initScript):
(WebCore::ScriptController::updateDocument):
(WebCore::ScriptController::cacheableBindingRootObject):
(WebCore::ScriptController::bindingRootObject):
(WebCore::ScriptController::windowScriptNPObject):
(WebCore::ScriptController::jsObjectForPluginElement):
(WebCore::ScriptController::clearScriptObjects):
* bindings/js/ScriptControllerMac.mm:
(WebCore::ScriptController::windowScriptObject):
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::dispatchDidPause):
* bindings/js/ScriptEventListener.cpp:
(WebCore::eventListenerHandlerBody):
(WebCore::eventListenerHandlerLocation):
* bindings/js/ScriptFunctionCall.cpp:
(WebCore::ScriptCallArgumentHandler::appendArgument):
(WebCore::ScriptFunctionCall::call):
(WebCore::ScriptFunctionCall::construct):
(WebCore::ScriptCallback::call):
* bindings/js/ScriptObject.cpp:
(WebCore::ScriptGlobalObject::set):
(WebCore::ScriptGlobalObject::get):
(WebCore::ScriptGlobalObject::remove):
* bindings/js/ScriptValue.cpp:
(WebCore::ScriptValue::getString):
(WebCore::ScriptValue::toInspectorValue):
* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::~WorkerScriptController):
(WebCore::WorkerScriptController::initScript):
(WebCore::WorkerScriptController::evaluate):
(WebCore::WorkerScriptController::disableEval):
* bindings/objc/WebScriptObject.mm:
(_didExecute):
(-[WebScriptObject _setImp:originRootObject:rootObject:]):
(-[WebScriptObject _setOriginRootObject:andRootObject:]):
(-[WebScriptObject dealloc]):
(-[WebScriptObject finalize]):
(-[WebScriptObject callWebScriptMethod:withArguments:]):
(-[WebScriptObject evaluateWebScript:]):
(-[WebScriptObject setValue:forKey:]):
(-[WebScriptObject valueForKey:]):
(-[WebScriptObject removeWebScriptKey:]):
(-[WebScriptObject hasWebScriptKey:]):
(-[WebScriptObject stringRepresentation]):
(-[WebScriptObject webScriptValueAtIndex:]):
(-[WebScriptObject setWebScriptValueAtIndex:value:]):
(+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallbackImplementation):
* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallback::callbackWithNoParam):
(WebCore::JSTestCallback::callbackWithClass1Param):
(WebCore::JSTestCallback::callbackWithClass2Param):
(WebCore::JSTestCallback::callbackWithStringList):
(WebCore::JSTestCallback::callbackWithBoolean):
(WebCore::JSTestCallback::callbackRequiresThisToPass):
* bridge/NP_jsobject.cpp:
(_NPN_InvokeDefault):
(_NPN_Invoke):
(_NPN_Evaluate):
(_NPN_GetProperty):
(_NPN_SetProperty):
(_NPN_RemoveProperty):
(_NPN_HasProperty):
(_NPN_HasMethod):
(_NPN_Enumerate):
(_NPN_Construct):
* bridge/c/c_class.cpp:
(JSC::Bindings::CClass::~CClass):
(JSC::Bindings::CClass::methodsNamed):
(JSC::Bindings::CClass::fieldNamed):
* bridge/c/c_instance.cpp:
(JSC::Bindings::CInstance::moveGlobalExceptionToExecState):
(JSC::Bindings::CInstance::invokeMethod):
(JSC::Bindings::CInstance::invokeDefaultMethod):
(JSC::Bindings::CInstance::invokeConstruct):
(JSC::Bindings::CInstance::getPropertyNames):
* bridge/c/c_runtime.cpp:
(JSC::Bindings::CField::valueFromInstance):
(JSC::Bindings::CField::setValueToInstance):
* bridge/c/c_utility.cpp:
(JSC::Bindings::convertValueToNPVariant):
(JSC::Bindings::convertNPVariantToValue):
* bridge/jni/jni_jsobject.mm:
(JavaJSObject::call):
(JavaJSObject::eval):
(JavaJSObject::getMember):
(JavaJSObject::setMember):
(JavaJSObject::removeMember):
(JavaJSObject::getSlot):
(JavaJSObject::setSlot):
(JavaJSObject::toString):
(JavaJSObject::convertValueToJObject):
(JavaJSObject::convertJObjectToValue):
* bridge/jni/jni_objc.mm:
(JSC::Bindings::dispatchJNICall):
* bridge/jni/jsc/JNIUtilityPrivate.cpp:
(JSC::Bindings::convertValueToJValue):
* bridge/jni/jsc/JavaClassJSC.cpp:
(JavaClass::JavaClass):
(JavaClass::~JavaClass):
* bridge/jni/jsc/JavaInstanceJSC.cpp:
(JavaInstance::stringValue):
* bridge/jni/jsc/JavaMethodJSC.cpp:
(appendClassName):
(JavaMethod::signature):
* bridge/jni/jsc/JavaStringJSC.h:
(JSC::Bindings::JavaString::JavaString):
(JSC::Bindings::JavaString::~JavaString):
(JSC::Bindings::JavaString::utf8):
(JSC::Bindings::JavaString::init):
* bridge/jsc/BridgeJSC.cpp:
(JSC::Bindings::Instance::createRuntimeObject):
(JSC::Bindings::Instance::newRuntimeObject):
* bridge/objc/objc_instance.mm:
(ObjcInstance::moveGlobalExceptionToExecState):
(ObjcInstance::invokeObjcMethod):
(ObjcInstance::invokeDefaultMethod):
(ObjcInstance::setValueOfUndefinedField):
(ObjcInstance::getValueOfUndefinedField):
* bridge/objc/objc_runtime.mm:
(JSC::Bindings::ObjcField::valueFromInstance):
(JSC::Bindings::ObjcField::setValueToInstance):
* bridge/objc/objc_utility.mm:
(JSC::Bindings::convertValueToObjcValue):
(JSC::Bindings::convertNSStringToString):
(JSC::Bindings::convertObjcValueToValue):
* bridge/qt/qt_instance.cpp:
(JSC::Bindings::QtInstance::~QtInstance):
(JSC::Bindings::QtInstance::getQtInstance):
(JSC::Bindings::QtInstance::newRuntimeObject):
* bridge/qt/qt_pixmapruntime.cpp:
(JSC::Bindings::QtPixmapInstance::createPixmapRuntimeObject):
* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::convertValueToQVariant):
(JSC::Bindings::convertQVariantToValue):
(JSC::Bindings::QtRuntimeMetaMethod::call):
(JSC::Bindings::QtRuntimeConnectionMethod::call):
* bridge/qt/qt_runtime_qt4.cpp:
(JSC::Bindings::convertValueToQVariant):
(JSC::Bindings::convertQVariantToValue):
(JSC::Bindings::QtRuntimeMetaMethod::call):
(JSC::Bindings::QtRuntimeConnectionMethod::call):
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::createImageBuffer):
* html/HTMLImageLoader.cpp:
(WebCore::HTMLImageLoader::notifyFinished):
* plugins/PluginView.cpp:
(WebCore::PluginView::start):
(WebCore::PluginView::stop):
(WebCore::PluginView::performRequest):
(WebCore::PluginView::npObject):
(WebCore::PluginView::privateBrowsingStateChanged):
* plugins/blackberry/PluginViewBlackBerry.cpp:
(WebCore::PluginView::dispatchNPEvent):
(WebCore::PluginView::setNPWindowIfNeeded):
(WebCore::PluginView::platformStart):
(WebCore::PluginView::getWindowInfo):
* plugins/efl/PluginViewEfl.cpp:
(WebCore::PluginView::dispatchNPEvent):
* plugins/gtk/PluginViewGtk.cpp:
(WebCore::PluginView::dispatchNPEvent):
(WebCore::PluginView::handleKeyboardEvent):
(WebCore::PluginView::handleMouseEvent):
(WebCore::PluginView::setNPWindowIfNeeded):
(WebCore::PluginView::platformStart):
* plugins/mac/PluginViewMac.mm:
(WebCore::PluginView::setNPWindowIfNeeded):
(WebCore::PluginView::dispatchNPEvent):
* plugins/qt/PluginViewQt.cpp:
(WebCore::PluginView::dispatchNPEvent):
(WebCore::PluginView::setNPWindowIfNeeded):
(WebCore::PluginView::platformStart):
* plugins/win/PluginViewWin.cpp:
(WebCore::PluginView::dispatchNPEvent):
(WebCore::PluginView::handleKeyboardEvent):
(WebCore::PluginView::handleMouseEvent):
(WebCore::PluginView::setNPWindowRect):
* testing/js/WebCoreTestSupport.cpp:
(WebCoreTestSupport::injectInternalsObject):
(WebCoreTestSupport::resetInternalsObject):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::dropProtection):

Source/WebKit/blackberry: 

* Api/BlackBerryGlobal.cpp:
(BlackBerry::WebKit::clearMemoryCaches):
* WebCoreSupport/ClientExtension.cpp:
* WebCoreSupport/PagePopupBlackBerry.cpp:
(WebCore::PagePopupBlackBerry::installDomFunction):
* WebKitSupport/DumpRenderTreeSupport.cpp:
(DumpRenderTreeSupport::computedStyleIncludingVisitedInfo):

Source/WebKit/efl: 

* ewk/ewk_frame.cpp:
(ewk_frame_script_execute):
* ewk/ewk_view.cpp:
(ewk_view_js_object_add):

Source/WebKit/gtk: 

* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
(DumpRenderTreeSupportGtk::gcCountJavascriptObjects):

Source/WebKit/mac: 

* DOM/WebDOMOperations.mm:
(JSC):
* Misc/WebCoreStatistics.mm:
(+[WebCoreStatistics javaScriptObjectsCount]):
(+[WebCoreStatistics javaScriptGlobalObjectsCount]):
(+[WebCoreStatistics javaScriptProtectedObjectsCount]):
(+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]):
(+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]):
(+[WebCoreStatistics javaScriptObjectTypeCounts]):
(+[WebCoreStatistics shouldPrintExceptions]):
(+[WebCoreStatistics setShouldPrintExceptions:]):
(+[WebCoreStatistics memoryStatistics]):
(+[WebCoreStatistics javaScriptReferencedObjectsCount]):
* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::evaluate):
(WebKit::NetscapePluginInstanceProxy::invoke):
(WebKit::NetscapePluginInstanceProxy::invokeDefault):
(WebKit::NetscapePluginInstanceProxy::construct):
(WebKit::NetscapePluginInstanceProxy::getProperty):
(WebKit::NetscapePluginInstanceProxy::setProperty):
(WebKit::NetscapePluginInstanceProxy::removeProperty):
(WebKit::NetscapePluginInstanceProxy::hasMethod):
(WebKit::NetscapePluginInstanceProxy::enumerate):
(WebKit::NetscapePluginInstanceProxy::addValueToArray):
(WebKit::NetscapePluginInstanceProxy::moveGlobalExceptionToExecState):
* Plugins/WebNetscapePluginStream.mm:
(WebNetscapePluginStream::wantsAllStreams):
* Plugins/WebNetscapePluginView.mm:
(-[WebNetscapePluginView sendEvent:isDrawRect:]):
(-[WebNetscapePluginView privateBrowsingModeDidChange]):
(-[WebNetscapePluginView setWindowIfNecessary]):
(-[WebNetscapePluginView createPluginScriptableObject]):
(-[WebNetscapePluginView getFormValue:]):
(-[WebNetscapePluginView evaluateJavaScriptPluginRequest:]):
(-[WebNetscapePluginView webFrame:didFinishLoadWithReason:]):
(-[WebNetscapePluginView loadPluginRequest:]):
(-[WebNetscapePluginView _printedPluginBitmap]):
* Plugins/WebPluginController.mm:
(+[WebPluginController plugInViewWithArguments:fromPluginPackage:]):
(-[WebPluginController stopOnePlugin:]):
(-[WebPluginController destroyOnePlugin:]):
(-[WebPluginController startAllPlugins]):
(-[WebPluginController addPlugin:]):
* WebView/WebFrame.mm:
(-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
(-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]):
* WebView/WebScriptDebugDelegate.mm:
(-[WebScriptCallFrame scopeChain]):
(-[WebScriptCallFrame evaluateWebScript:]):
* WebView/WebView.mm:
(+[WebView _reportException:inContext:]):
(-[WebView aeDescByEvaluatingJavaScriptFromString:]):
(-[WebView _computedStyleIncludingVisitedInfo:forElement:]):

Source/WebKit/qt: 

* Api/qwebframe.cpp:
(QWebFramePrivate::addQtSenderToGlobalObject):
(QWebFrame::addToJavaScriptWindowObject):
* WebCoreSupport/DumpRenderTreeSupportQt.cpp:
(DumpRenderTreeSupportQt::injectInternalsObject):
(DumpRenderTreeSupportQt::resetInternalsObject):

Source/WebKit/win: 

* WebCoreStatistics.cpp:
(WebCoreStatistics::javaScriptObjectsCount):
(WebCoreStatistics::javaScriptGlobalObjectsCount):
(WebCoreStatistics::javaScriptProtectedObjectsCount):
(WebCoreStatistics::javaScriptProtectedGlobalObjectsCount):
(WebCoreStatistics::javaScriptProtectedObjectTypeCounts):
* WebFrame.cpp:
(WebFrame::stringByEvaluatingJavaScriptInScriptWorld):
* WebJavaScriptCollector.cpp:
(WebJavaScriptCollector::objectCount):
* WebView.cpp:
(WebView::stringByEvaluatingJavaScriptFromString):
(WebView::reportException):
(WebView::elementFromJS):

Source/WebKit2: 

* Shared/mac/WebMemorySampler.mac.mm:
(WebKit::WebMemorySampler::sampleWebKit):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::javaScriptObjectsCount):
(WebKit::InjectedBundle::reportException):
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::callMethod):
(WebKit::JSNPObject::callObject):
(WebKit::JSNPObject::callConstructor):
(WebKit::JSNPObject::put):
(WebKit::JSNPObject::deleteProperty):
(WebKit::JSNPObject::getOwnPropertyNames):
(WebKit::JSNPObject::propertyGetter):
* WebProcess/Plugins/Netscape/NPJSObject.cpp:
(WebKit::NPJSObject::hasMethod):
(WebKit::NPJSObject::invoke):
(WebKit::NPJSObject::invokeDefault):
(WebKit::NPJSObject::hasProperty):
(WebKit::NPJSObject::getProperty):
(WebKit::NPJSObject::setProperty):
(WebKit::NPJSObject::removeProperty):
(WebKit::NPJSObject::enumerate):
(WebKit::NPJSObject::construct):
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
(WebKit::NPRuntimeObjectMap::evaluate):
(WebKit::NPRuntimeObjectMap::moveGlobalExceptionToExecState):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::jsWrapperForWorld):
(WebKit::WebFrame::computedStyleIncludingVisitedInfo):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::runJavaScriptInMainFrame):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::getWebCoreStatistics):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Skip GTK+ unit test /webkit2/WebKitFindController/hide.

It fails always when running it in Xvfb.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121099 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening, adding test expectations for two
flaky media tests.

* platform/gtk/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121100 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed Chromium gardening. Marked tests flaky per bugs 89812
and 89813.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121101 268f45cc-cd09-0410-ab3c-d52691b4dbfc
RenderText’s minimum preferred width is incorrect automatic hyphenation is used
https://bugs.webkit.org/show_bug.cgi?id=89814

Reviewed by Sam Weinig.

Source/WebCore: 

Test: fast/text/hyphen-min-preferred-width.html

* rendering/RenderText.cpp:
(WebCore::maxWordFragmentWidth): Added this helper function. It returns the width of the
widest hyphenated fragment of the word (except for the suffix after the last hyphen) and
the offset of the last hyphenation opportunity.
(WebCore::RenderText::computePreferredLogicalWidths): Changed this function to consider the
widths of hyphenated word fragments rather than entire words when computing the minimum
width. Because hyphenating and measuring all fragments is expensive, hyphenation is only
attempted if the unhyphenated word is wider than the current minimum width.

LayoutTests: 

* fast/text/hyphen-min-preferred-width-expected.html: Added.
* fast/text/hyphen-min-preferred-width.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121102 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r120979): getElementsByTagName is 12% slower
https://bugs.webkit.org/show_bug.cgi?id=89783

Reviewed by Darin Adler.

The problem is that hashing std::pair<unsigned short, AtomicString> is very slow compared to just hashing AtomicString,
which internally holds a hash already. Fixed the regression by replacing the default hash function by the one that
computes AtomicString's hash + list type. This is okay because we only have 7 node list types at the moment.

* dom/NodeRareData.h:
(NodeListsNodeData):
(WebCore::NodeListsNodeData::NodeListCacheMapEntryHash::hash):
(NodeListCacheMapEntryHash):
(WebCore::NodeListsNodeData::NodeListCacheMapEntryHash::equal):
(WebCore::NodeListsNodeData::namedNodeListKey):


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