Poor man's fast breakpoints for a 2.3x debugger speedup.
<https://webkit.org/b/122836>

Reviewed by Geoffrey Garen.

Previously we gained back some performance (run at baseline JIT speeds)
when the WebInspector is opened provided no breakpoints are set. This
was achieved by simply skipping all op_debug callbacks to the debugger
if no breakpoints are set. If any breakpoints are set, the debugger will
set a m_needsOpDebugCallbacks flag which causes the callbacks to be
called, and we don't get the baseline JIT speeds anymore.

With this patch, we will now track the number of breakpoints set in the
CodeBlock that they are set in. The LLINT and baseline JIT code will
check CodeBlock::m_numBreakpoints to determine if the op_debug callbacks
need to be called. With this, we will only enable op_debug callbacks for
CodeBlocks that need it i.e. those with breakpoints set in them.

Debugger::m_needsOpDebugCallbacks is now obsoleted. The LLINT and baseline
JIT code still needs to check Debugger::m_shouldPause to determine if the
debugger is in stepping mode and hence, needs op_debug callbacks enabled
for everything until the debugger "continues" the run and exit stepping
mode.

Also in this patch, I fixed a regression in DOM breakpoints which relies
Debugger::breakProgram() to pause the debugger.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
- Missed accounting for op_debug's new hasBreakpointFlag operand here when
  it was added.
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::hasOpDebugForLineAndColumn):
- This is needed in Debugger::toggleBreakpoint() to determine if a
  breakpoint falls within a CodeBlock or not. Simply checking the bounds
  of the CodeBlock is insufficient. For example, let's say we have the
  following JS code:

      // begin global scope
      function f1() {
          function f2() {
             ... // set breakpoint here.
          }
      }
      // end global scope

  Using the CodeBlock bounds alone, the breakpoint above will to appear
  to be in the global program CodeBlock, and the CodeBlocks for function
  f1() and f2(). With CodeBlock::hasOpDebugForLineAndColumn() we can
  rule out the global program CodeBlock and f1(), and only apply the
  breakpoint to f2(0 where it belongs.

  CodeBlock::hasOpDebugForLineAndColumn() works by iterating over all
  the opcodes in the CodeBlock to look for op_debug's. For each op_debug,
  it calls CodeBlock::expressionRangeForBytecodeOffset() to do a binary
  seach to get the line and column info for that op_debug. This is a
  N * log(N) algorithm. However, a quick hands on test using the
  WebInspector (with this patch applied) to exercise setting, breaking
  on, and clearing breakpoints, as well as stepping through some code
  shows no noticeable degradation of the user experience compared to the
  baseline without this patch.

* bytecode/CodeBlock.h:
(JSC::CodeBlock::numBreakpoints):
(JSC::CodeBlock::numBreakpointsOffset):
(JSC::CodeBlock::addBreakpoint):
(JSC::CodeBlock::removeBreakpoint):
(JSC::CodeBlock::clearAllBreakpoints):
* debugger/Breakpoint.h:
- defined Breakpoint::unspecifiedColumn so that we can explicitly indicate
  when the WebInspector was setting a line breakpoint and did not provide
  a column value. CodeBlock::hasOpDebugForLineAndColumn() needs this
  information in order to loosen its matching criteria for op_debug
  bytecodes for the specified breakpoint line and column values provided
  by the debugger.

  Previously, we just hijack a 0 value column as an unspecified column.
  However, the WebInspector operates on 0-based ints for column values.
  Hence, 0 should be a valid column value and should not be hijacked to
  mean an unspecified column.

* debugger/Debugger.cpp:
(JSC::Debugger::Debugger):
- added tracking of the VM that the debugger is used with. This is
  needed by Debugger::breakProgram().

  The VM pointer is attained from the first JSGlobalObject that the debugger
  attaches to. When the debugger detaches from the last JSGlobalObject, it
  will nullify its VM pointer to allow a new one to be set on the next
  attach.

  We were always only using each debugger instance with one VM. This change
  makes it explicit with an assert to ensure that all globalObjects that
  the debugger attaches to beongs to the same VM.

(JSC::Debugger::attach):
(JSC::Debugger::detach):
(JSC::Debugger::setShouldPause):

(JSC::Debugger::registerCodeBlock):
(JSC::Debugger::unregisterCodeBlock):
- registerCodeBlock() is responsible for applying pre-existing breakpoints
  to new CodeBlocks being installed. Similarly, unregisterCodeBlock()
  clears the breakpoints.

(JSC::Debugger::toggleBreakpoint):
- This is the workhorse function that checks if a breakpoint falls within
  a CodeBlock or not. If it does, then it can either enable or disable
  said breakpoint in the CodeBlock. In the current implementation,
  enabling/disabling the breakpoint simply means incrementing/decrementing
  the CodeBlock's m_numBreakpoints.

(JSC::Debugger::applyBreakpoints):

(JSC::Debugger::ToggleBreakpointFunctor::ToggleBreakpointFunctor):
(JSC::Debugger::ToggleBreakpointFunctor::operator()):
(JSC::Debugger::toggleBreakpoint):
- Iterates all relevant CodeBlocks and apply the specified breakpoint
  if appropriate. This is called when a new breakpoint is being defined
  by the WebInspector and needs to be applied to an already installed
  CodeBlock.

(JSC::Debugger::setBreakpoint):
(JSC::Debugger::removeBreakpoint):
(JSC::Debugger::hasBreakpoint):
(JSC::Debugger::ClearBreakpointsFunctor::ClearBreakpointsFunctor):
(JSC::Debugger::ClearBreakpointsFunctor::operator()):
(JSC::Debugger::clearBreakpoints):

(JSC::Debugger::breakProgram):
- Fixed a regression that broke DOM breakpoints. The issue is that with
  the skipping of op_debug callbacks, we don't always have an updated
  m_currentCallFrame. Normally, m_currentCallFrame is provided as arg
  in the op_debug callback. In this case, we can get the CallFrame* from
  m_vm->topCallFrame.

(JSC::Debugger::updateCallFrameAndPauseIfNeeded):
(JSC::Debugger::pauseIfNeeded):
(JSC::Debugger::willExecuteProgram):
* debugger/Debugger.h:
(JSC::Debugger::Debugger):
(JSC::Debugger::shouldPause):

* heap/CodeBlockSet.h:
(JSC::CodeBlockSet::iterate):
* heap/Heap.h:
(JSC::Heap::forEachCodeBlock):
- Added utility to iterate all CodeBlocks in the heap / VM.

* interpreter/Interpreter.cpp:
(JSC::Interpreter::debug):

* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_debug):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_debug):
* llint/LowLevelInterpreter.asm:
- These now checks CodeBlock::m_numBreakpoints and Debugger::m_shouldPause
  instead of Debugger::m_needsOpDebugCallbacks.

* runtime/Executable.cpp:
(JSC::ScriptExecutable::installCode):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162598 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GLIB] Use GUniquePtr instead of GOwnPtr
https://bugs.webkit.org/show_bug.cgi?id=127431

Reviewed by Martin Robinson.

GUniquePtr is a template alias of std::unique_ptr with a custom
deleter that replaces GOwnPtr. GOwnPtr is still used for the cases
where the output pointer is needed, but it will also be replaced soon.

Source/WebCore:

* GNUmakefile.list.am:
* PlatformGTK.cmake:
* accessibility/atk/AXObjectCacheAtk.cpp:
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(getAttributeSetForAccessibilityObject):
(accessibilityObjectLength):
(textExtents):
(webkitAccessibleTextGetChar):
(numberOfReplacedElementsBeforeOffset):
* page/ContextMenuController.cpp:
* platform/SharedBuffer.h:
* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
(webKitWebAudioSrcConstructed):
(webKitWebAudioSrcLoop):
* platform/audio/gtk/AudioBusGtk.cpp:
(WebCore::AudioBus::loadPlatformResource):
* platform/geoclue/GeolocationProviderGeoclue.cpp:
* platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
* platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
(webKitMediaSrcAddSrc):
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcStart):
(ResourceHandleStreamingClient::wasBlocked):
(ResourceHandleStreamingClient::cannotShowURL):
* platform/graphics/gtk/ImageBufferGtk.cpp:
(WebCore::encodeImage):
(WebCore::ImageBuffer::toDataURL):
* platform/graphics/gtk/ImageGtk.cpp:
(WebCore::getThemeIconFileName):
(WebCore::Image::loadPlatformResource):
* platform/gtk/ContextMenuGtk.cpp:
(WebCore::ContextMenu::itemCount):
(WebCore::contextMenuItemVector):
* platform/gtk/ContextMenuItemGtk.cpp:
(WebCore::createPlatformMenuItemDescription):
* platform/gtk/DataObjectGtk.cpp:
(WebCore::DataObjectGtk::setURIList):
(WebCore::DataObjectGtk::setURL):
* platform/gtk/FileSystemGtk.cpp:
(WebCore::filenameToString):
(WebCore::fileSystemRepresentation):
(WebCore::filenameForDisplay):
(WebCore::pathGetFileName):
(WebCore::applicationDirectoryPath):
(WebCore::sharedResourcesPath):
(WebCore::directoryName):
(WebCore::listDirectory):
(WebCore::openTemporaryFile):
* platform/gtk/GOwnPtrGtk.cpp: Removed.
* platform/gtk/GOwnPtrGtk.h: Removed.
* platform/gtk/GUniquePtrGtk.h: Added.
* platform/gtk/GamepadsGtk.cpp:
(WebCore::GamepadsGtk::GamepadsGtk):
* platform/gtk/GtkClickCounter.cpp:
(WebCore::GtkClickCounter::shouldProcessButtonEvent):
* platform/gtk/GtkInputMethodFilter.cpp:
(WebCore::GtkInputMethodFilter::sendCompositionAndPreeditWithFakeKeyEvents):
* platform/gtk/GtkPopupMenu.cpp:
(WebCore::GtkPopupMenu::popUp):
(WebCore::GtkPopupMenu::typeAheadFind):
* platform/gtk/LanguageGtk.cpp:
(WebCore::platformLanguage):
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::imageTitle):
(WebCore::localizedMediaTimeDescription):
* platform/gtk/PasteboardHelper.cpp:
(WebCore::selectionDataToUTF8String):
(WebCore::PasteboardHelper::getClipboardContents):
(WebCore::PasteboardHelper::fillSelectionData):
* platform/gtk/PopupMenuGtk.cpp:
(WebCore::PopupMenuGtk::createGtkActionForMenuItem):
(WebCore::PopupMenuGtk::show):
* platform/gtk/WebKitAuthenticationWidget.cpp:
(webkitAuthenticationWidgetInitialize):
* platform/network/ResourceHandleInternal.h:
* platform/network/gtk/CredentialBackingStore.cpp:
(WebCore::credentialForChallengeAsyncReadyCallback):
* platform/network/soup/CookieJarSoup.cpp:
(WebCore::setCookiesFromDOM):
(WebCore::cookiesForSession):
(WebCore::getRawCookies):
(WebCore::deleteCookie):
(WebCore::getHostnamesWithCookies):
(WebCore::deleteCookiesForHostname):
(WebCore::deleteAllCookies):
* platform/network/soup/DNSSoup.cpp:
* platform/network/soup/GUniquePtrSoup.h: Added.
* platform/network/soup/ResourceErrorSoup.cpp:
(WebCore::failingURI):
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::ResourceHandle::ensureReadBuffer):
(WebCore::cleanupSoupRequestOperation):
(WebCore::createSoupRequestAndMessageForHandle):
* platform/network/soup/ResourceRequestSoup.cpp:
(WebCore::ResourceRequest::updateSoupMessageMembers):
(WebCore::ResourceRequest::updateSoupMessage):
* platform/network/soup/ResourceResponseSoup.cpp:
* platform/network/soup/SoupURIUtils.cpp:
(WebCore::soupURIToKURL):
* platform/soup/SharedBufferSoup.cpp:
(WebCore::SharedBuffer::SharedBuffer):
(WebCore::SharedBuffer::clearPlatformData):
(WebCore::SharedBuffer::maybeTransferPlatformData):
(WebCore::SharedBuffer::hasPlatformData):
* plugins/gtk/PluginPackageGtk.cpp:
(WebCore::PluginPackage::fetchInfo):
(WebCore::PluginPackage::load):

Source/WebKit/gtk:

* WebCoreSupport/ContextMenuClientGtk.cpp:
(WebKit::getUnicodeMenuItemPosition):
* WebCoreSupport/DragClientGtk.cpp:
(WebKit::DragClient::startDrag):
* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
(DumpRenderTreeSupportGtk::setValueForUser):
* WebCoreSupport/EditorClientGtk.h:
* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::userAgent):
(WebKit::FrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
(WebKit::FrameLoaderClient::dispatchWillSendRequest):
(WebKit::FrameLoaderClient::assignIdentifierToInitialRequest):
(WebKit::FrameLoaderClient::dispatchDidReceiveResponse):
(WebKit::FrameLoaderClient::dispatchDidReceiveContentLength):
(WebKit::FrameLoaderClient::dispatchDidFinishLoading):
(WebKit::FrameLoaderClient::dispatchDidFailLoading):
(WebKit::FrameLoaderClient::dispatchDidFailLoad):
* WebCoreSupport/InspectorClientGtk.h:
* webkit/webkitfavicondatabase.cpp:
(webkit_favicon_database_set_path):
* webkit/webkitfilechooserrequest.cpp:
* webkit/webkitglobals.cpp:
(webkitInit):
* webkit/webkithittestresult.cpp:
(WebKit::kit):
* webkit/webkiticondatabase.cpp:
(webkit_icon_database_set_path):
* webkit/webkitspellcheckerenchant.cpp:
* webkit/webkitwebplugin.cpp:
(webkit_web_plugin_get_path):
* webkit/webkitwebpluginprivate.h:
* webkit/webkitwebsettings.cpp:
(webkit_web_settings_class_init):
(webkit_web_settings_copy):
* webkit/webkitwebview.cpp:
(webkit_web_view_forward_context_menu_event):
(fileChooserDialogResponseCallback):
(webkit_web_view_drag_end):
* webkit/webkitwebviewprivate.h:

Source/WebKit2:

* Shared/Downloads/soup/DownloadSoup.cpp:
(WebKit::DownloadClient::didReceiveResponse):
* Shared/NativeWebKeyboardEvent.h:
* Shared/NativeWebMouseEvent.h:
* Shared/NativeWebWheelEvent.h:
* Shared/gtk/ArgumentCodersGtk.cpp:
(IPC::encodeGKeyFile):
(IPC::decodeGKeyFile):
(IPC::encode):
(IPC::decode):
* UIProcess/API/gtk/WebKitContextMenuItem.cpp:
(webkitContextMenuItemSetSubMenuFromGtkMenu):
* UIProcess/API/gtk/WebKitDownload.cpp:
(webkitDownloadDecideDestination):
(webkitDownloadNotifyProgress):
(webkitDownloadFailed):
* UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
(webkit_file_chooser_request_select_files):
* UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
(didReceiveWebViewMessageFromInjectedBundle):
(getInjectedBundleInitializationUserData):
* UIProcess/API/gtk/WebKitLoaderClient.cpp:
(didFailProvisionalLoadWithErrorForFrame):
(didFailLoadWithErrorForFrame):
* UIProcess/API/gtk/WebKitPrintOperation.cpp:
(drawPagesForPrintingCompleted):
* UIProcess/API/gtk/WebKitURIRequest.cpp:
(webkit_uri_request_get_http_headers):
* UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
(webkit_uri_scheme_request_get_scheme):
(webkit_uri_scheme_request_get_path):
* UIProcess/API/gtk/WebKitWebContext.cpp:
(injectedBundleFilename):
(webkit_web_context_set_favicon_database_directory):
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewLoadFail):
(webkitWebViewCreateJavaScriptDialog):
(fileChooserDialogResponseCallback):
(webkitWebViewLoadChanged):
(webkitWebViewLoadFailedWithTLSErrors):
(webkitWebViewPopulateContextMenu):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseButtonPressEvent):
(webkitWebViewBaseStartDrag):
* UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
(WebKit::WebInspectorServer::platformResourceForPath):
* UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp:
(WebKit::connectionCallback):
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::platformDefaultApplicationCacheDirectory):
(WebKit::WebContext::platformDefaultDatabaseDirectory):
(WebKit::WebContext::platformDefaultIconDatabasePath):
(WebKit::WebContext::platformDefaultLocalStorageDirectory):
(WebKit::WebContext::platformDefaultDiskCacheDirectory):
* UIProcess/gtk/WebContextMenuProxyGtk.cpp:
(WebKit::contextMenuItemVisibilityChanged):
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformInspectedURLChanged):
* UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
(WebKit::WebPopupMenuProxyGtk::createGtkActionForMenuItem):
* WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
* WebProcess/WebPage/gtk/WebPageGtk.cpp:
(WebKit::WebPage::platformInitialize):
* WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
* WebProcess/gtk/WebProcessMainGtk.cpp:
* WebProcess/soup/WebSoupRequestManager.cpp:
(WebKit::WebSoupRequestManager::send):

Tools:

* DumpRenderTree/atk/AccessibilityCallbacksAtk.cpp:
(printAccessibilityEvent):
(axObjectEventListener):
* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(indexRangeInTable):
(AccessibilityUIElement::role):
(AccessibilityUIElement::title):
(AccessibilityUIElement::description):
(AccessibilityUIElement::stringValue):
(AccessibilityUIElement::language):
(AccessibilityUIElement::lineForIndex):
(AccessibilityUIElement::selectedTextRange):
(AccessibilityUIElement::url):
* DumpRenderTree/efl/AccessibilityControllerEfl.cpp:
(AccessibilityController::accessibleElementById):
* DumpRenderTree/gtk/AccessibilityControllerGtk.cpp:
(AccessibilityController::accessibleElementById):
* DumpRenderTree/gtk/DumpRenderTree.cpp:
(getOutputDir):
(getFontsPath):
(initializeFonts):
(dumpFramesAsText):
(compareHistoryItems):
(dumpHistoryItem):
(soupURIToStringPreservingPassword):
(resetDefaultsToConsistentValues):
(temporaryDatabaseDirectory):
(webViewTitleChanged):
(webFrameLoadStatusNotified):
(pathFromSoupURI):
(convertWebResourceToURLPath):
(urlSuitableForTestResult):
(descriptionSuitableForTestResult):
(willSendRequestCallback):
(frameLoadEventCallback):
* DumpRenderTree/gtk/EditingCallbacks.cpp:
(dumpNodePath):
(dumpRange):
(shouldApplyStyle):
* DumpRenderTree/gtk/EventSender.cpp:
(contextClickCallback):
(beginDragWithFilesCallback):
* DumpRenderTree/gtk/TestRunnerGtk.cpp:
(TestRunner::pathToLocalResource):
(TestRunner::queueLoad):
(TestRunner::removeOriginAccessWhitelistEntry):
(TestRunner::setMockGeolocationPositionUnavailableError):
(TestRunner::setIconDatabaseEnabled):
(TestRunner::findString):
(TestRunner::setDomainRelaxationForbiddenForURLScheme):
(TestRunner::overridePreference):
(TestRunner::addUserScript):
(TestRunner::addUserStyleSheet):
(TestRunner::setTextDirection):
* DumpRenderTree/gtk/TextInputController.cpp:
(setMarkedTextCallback):
(insertTextCallback):
(doCommandCallback):
* DumpRenderTree/gtk/WorkQueueItemGtk.cpp:
(LoadHTMLStringItem::invoke):
* TestWebKitAPI/PlatformGTK.cmake:
* TestWebKitAPI/Tests/WebKit2Gtk/DOMNodeTest.cpp:
(WebKitDOMNodeTest::testTagNames):
* TestWebKitAPI/Tests/WebKit2Gtk/TestBackForwardList.cpp:
(testBackForwardListLimitAndCache):
* TestWebKitAPI/Tests/WebKit2Gtk/TestContextMenu.cpp:
(testContextMenuSmartSeparators):
* TestWebKitAPI/Tests/WebKit2Gtk/TestCookieManager.cpp:
* TestWebKitAPI/Tests/WebKit2Gtk/TestDownloads.cpp:
(testDownloadLocalFile):
(testDownloadLocalFileError):
(addContentDispositionHTTPHeaderToResponse):
(serverCallback):
(testDownloadRemoteFileError):
* TestWebKitAPI/Tests/WebKit2Gtk/TestInspectorServer.cpp:
(startTestServer):
(testInspectorServerPageList):
(openRemoteDebuggingSession):
* TestWebKitAPI/Tests/WebKit2Gtk/TestPrinting.cpp:
(testPrintOperationPrint):
* TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp:
(addCacheHTTPHeadersToResponse):
(serverCallback):
* TestWebKitAPI/Tests/WebKit2Gtk/TestSSL.cpp:
(httpsServerCallback):
(httpServerCallback):
* TestWebKitAPI/Tests/WebKit2Gtk/TestUIClient.cpp:
(testWebViewJavaScriptDialogs):
(testWebViewWindowProperties):
(testWebViewFileChooserRequest):
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebExtensions.cpp:
(testWebExtensionWindowObjectCleared):
(testWebExtensionIsolatedWorld):
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitAccessibility.cpp:
(startTestServer):
(checkAtspiAccessible):
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitFaviconDatabase.cpp:
(serverCallback):
(testClearDatabase):
(testGetFaviconURI):
(webkitFaviconDatabaseFinalizedCallback):
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebContext.cpp:
(testWebContextGetPlugins):
(testWebContextURIScheme):
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp:
(testWebViewRunJavaScript):
(testWebViewMode):
(testWebViewPageVisibility):
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebViewGroup.cpp:
(isStyleSheetInjectedForURLAtPath):
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebViewEditor.cpp:
(testWebViewEditorCutCopyPasteNonEditable):
(testWebViewEditorCutCopyPasteEditable):
(testWebViewEditorSelectAllNonEditable):
(testWebViewEditorSelectAllEditable):
* TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp:
(sendRequestCallback):
(methodCallCallback):
* TestWebKitAPI/gtk/PlatformUtilitiesGtk.cpp:
(TestWebKitAPI::Util::createInjectedBundlePath):
(TestWebKitAPI::Util::createURLForResource):
* TestWebKitAPI/gtk/PlatformWebViewGtk.cpp:
(TestWebKitAPI::doKeyStroke):
(TestWebKitAPI::doMouseButtonEvent):
(TestWebKitAPI::PlatformWebView::simulateMouseMove):
* TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.cpp:
(loadFailedCallback):
(LoadTrackingTest::loadURI):
(LoadTrackingTest::loadHtml):
(LoadTrackingTest::loadPlainText):
(LoadTrackingTest::loadRequest):
(LoadTrackingTest::reload):
(LoadTrackingTest::goBack):
(LoadTrackingTest::goForward):
* TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.h:
* TestWebKitAPI/gtk/WebKit2Gtk/TestMain.cpp:
(registerGResource):
(removeNonEmptyDirectory):
(main):
* TestWebKitAPI/gtk/WebKit2Gtk/TestMain.h:
(Test::getWebKit1TestResoucesDir):
(Test::getResourcesDir):
* TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestBus.cpp:
(WebKitTestBus::run):
* TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestServer.cpp:
(WebKitTestServer::WebKitTestServer):
(WebKitTestServer::getURIForPath):
* TestWebKitAPI/gtk/WebKit2Gtk/WebProcessTestRunner.cpp:
(WebProcessTestRunner::runTest):
* TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.cpp:
(resourceGetDataCallback):
(WebViewTest::mainResourceData):
(WebViewTest::mouseMoveTo):
(WebViewTest::keyStroke):
(WebViewTest::doMouseButtonEvent):
* TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.h:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp:
(WTR::AccessibilityController::accessibleElementById):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::role):
(WTR::AccessibilityUIElement::title):
(WTR::AccessibilityUIElement::description):
(WTR::AccessibilityUIElement::stringValue):
(WTR::AccessibilityUIElement::language):
(WTR::AccessibilityUIElement::lineForIndex):
(WTR::AccessibilityUIElement::selectedTextRange):
(WTR::AccessibilityUIElement::url):
* WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp:
(WTR::getOutputDir):
(WTR::getFontsPath):
(WTR::initializeFontConfigSetting):
* WebKitTestRunner/InjectedBundle/gtk/InjectedBundleUtilities.cpp:
(WTR::topLevelPath):
* WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp:
(WTR::TestRunner::pathToLocalResource):
* WebKitTestRunner/gtk/TestControllerGtk.cpp:
(WTR::TestController::initializeInjectedBundlePath):
(WTR::TestController::initializeTestPluginDirectory):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162599 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix for gles after r162565. Add missing definitions.

* platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
(WebCore::GraphicsContext3D::drawArraysInstanced):
(WebCore::GraphicsContext3D::drawElementsInstanced):
(WebCore::GraphicsContext3D::vertexAttribDivisor):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162600 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Range should be constructable.
https://bugs.webkit.org/show_bug.cgi?id=115639

Patch by László Langó <llango.u-szeged@partner.samsung.com> on 2014-01-23
Reviewed by Ryosuke Niwa.

Source/WebCore:

http://www.w3.org/TR/2013/WD-dom-20131107/#interface-range
Now we can do `new Range()` instead of `document.createRange()`.

Backported from Blink: https://chromium.googlesource.com/chromium/blink/+/47ca40efdf58a4787aa33aa75a35778899b1c002%5E%21

Test: fast/dom/Range/range-constructor.html

* dom/Range.cpp:
(WebCore::Range::create):
* dom/Range.h:
* dom/Range.idl:

LayoutTests:

* fast/dom/Range/range-constructor-expected.txt: Added.
* fast/dom/Range/range-constructor.html: Added.
* fast/dom/dom-constructors-expected.txt:
* fast/dom/dom-constructors.html:

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