1. 10 Jan, 2014 2 commits
  2. 09 Jan, 2014 1 commit
    • seokju@webkit.org's avatar
      Web Inspector: Remove unused overriding protocols. · cb8504d4
      seokju@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=126630
      
      Reviewed by Timothy Hatcher.
      
      Source/WebCore:
      
      No new tests, No change in behavior.
      
      Remove unused overriding protocols as these are not used anymore in Frontned.
      -Page.setGeolocationOverride
      -Page.clearGeolocationOverride
      -Page.canOverrideGeolocation
      -Page.setDeviceOrientationOverride
      -Page.clearDeviceOrientationOverride
      -Page.canOverrideGeolocation
      -Network.setUserAgentOverride
      
      * Modules/geolocation/GeolocationController.cpp:
      (WebCore::GeolocationController::GeolocationController):
      (WebCore::GeolocationController::create):
      (WebCore::GeolocationController::positionChanged):
      (WebCore::provideGeolocationTo):
      * Modules/geolocation/GeolocationController.h:
      * dom/DeviceOrientationController.cpp:
      (WebCore::DeviceOrientationController::DeviceOrientationController):
      (WebCore::DeviceOrientationController::create):
      (WebCore::DeviceOrientationController::didChangeDeviceOrientation):
      (WebCore::provideDeviceOrientationTo):
      * dom/DeviceOrientationController.h:
      * inspector/InspectorInstrumentation.cpp:
      * inspector/InspectorInstrumentation.h:
      * inspector/InspectorPageAgent.cpp:
      (WebCore::InspectorPageAgent::InspectorPageAgent):
      * inspector/InspectorPageAgent.h:
      * inspector/InspectorResourceAgent.cpp:
      (WebCore::InspectorResourceAgent::disable):
      * inspector/InspectorResourceAgent.h:
      * inspector/protocol/Network.json:
      * inspector/protocol/Page.json:
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::userAgent):
      
      Source/WebInspectorUI:
      
      Update InspectorWebBackendCommands.js after removing unused overriding protocols.
      
      * UserInterface/InspectorWebBackendCommands.js:
      * UserInterface/Legacy/6.0/InspectorWebBackendCommands.js:
      * UserInterface/Legacy/7.0/InspectorWebBackendCommands.js:
      * Versions/Inspector-iOS-6.0.json:
      * Versions/Inspector-iOS-7.0.json:
      
      LayoutTests:
      
      * http/tests/inspector/extensions-useragent-expected.txt: Removed.
      * http/tests/inspector/extensions-useragent.html: Removed.
      * inspector/device-orientation-success-expected.txt: Removed.
      * inspector/device-orientation-success.html: Removed.
      * inspector/geolocation-error-expected.txt: Removed.
      * inspector/geolocation-error.html: Removed.
      * inspector/geolocation-success-expected.txt: Removed.
      * inspector/geolocation-success.html: Removed.
      * inspector/geolocation-watchPosition-expected.txt: Removed.
      * inspector/geolocation-watchPosition.html: Removed.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161556 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cb8504d4
  3. 07 Jan, 2014 1 commit
  4. 06 Jan, 2014 3 commits
    • seokju@webkit.org's avatar
      Web Inspector: Remove canOverrideDeviceMetrics and setDeviceMetricsOverride from protocol · 5b14c407
      seokju@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=126149
      
      Reviewed by Joseph Pecoraro.
      
      Source/WebCore:
      
      No new tests, No changes in behavior.
      
      These are not used anywhere in WebInspectorUI.
      So, it removes unused Protocols and APIs.
      
      * inspector/InspectorClient.h:
      * inspector/InspectorPageAgent.cpp:
      (WebCore::InspectorPageAgent::InspectorPageAgent):
      (WebCore::InspectorPageAgent::disable):
      * inspector/InspectorPageAgent.h:
      * inspector/protocol/Page.json:
      
      Source/WebInspectorUI:
      
      * UserInterface/InspectorWebBackendCommands.js: Remove unused codes.
      * UserInterface/Legacy/6.0/InspectorWebBackendCommands.js: Ditto.
      * UserInterface/Legacy/7.0/InspectorWebBackendCommands.js: Ditto.
      * Versions/Inspector-iOS-6.0.json: Ditto.
      * Versions/Inspector-iOS-7.0.json: Ditto.
      
      Source/WebKit/blackberry:
      
      * WebCoreSupport/InspectorClientBlackBerry.cpp: Remove dead codes.
      * WebCoreSupport/InspectorClientBlackBerry.h: Ditto.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161402 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5b14c407
    • seokju@webkit.org's avatar
      Web Inspector: Remove support for FileSystem in Frontend. · 4dc4a12e
      seokju@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=126369
      
      Reviewed by Joseph Pecoraro.
      
      Source/WebCore:
      
      No new tests, No change in behavior.
      
      Remove leftover codes from protocol after r156692.
      
      * CMakeLists.txt:
      * DerivedSources.make:
      * GNUmakefile.am:
      * inspector/InspectorFrontendClient.h:
      * inspector/InspectorFrontendClientLocal.h:
      * inspector/InspectorFrontendHost.cpp:
      * inspector/InspectorFrontendHost.h:
      * inspector/InspectorFrontendHost.idl:
      * inspector/protocol/FileSystem.json: Removed.
      
      Source/WebInspectorUI:
      
      Update InspectorWebBackendCommands after removing 'FileSystem' domain.
      
      * UserInterface/InspectorWebBackendCommands.js:
      * UserInterface/Legacy/6.0/InspectorWebBackendCommands.js:
      * UserInterface/Legacy/7.0/InspectorWebBackendCommands.js:
      * Versions/Inspector-iOS-6.0.json:
      * Versions/Inspector-iOS-7.0.json:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161385 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4dc4a12e
    • seokju@webkit.org's avatar
      Web Inspector: Get rid of DOM.setFileInputFiles from Protocol · 55a4224d
      seokju@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=126312
      
      Reviewed by Joseph Pecoraro.
      
      Source/WebCore:
      
      No new tests, No changes in behavior.
      
      It is a dead code as all ports in WebKit don't support it.
      And this patch removes all things related to DOM.setFileInputFiles in Frontend.
      
      * inspector/InspectorClient.h:
      * inspector/InspectorController.cpp:
      (WebCore::InspectorController::InspectorController):
      * inspector/InspectorDOMAgent.cpp:
      (WebCore::InspectorDOMAgent::InspectorDOMAgent):
      * inspector/InspectorDOMAgent.h:
      (WebCore::InspectorDOMAgent::create):
      * inspector/protocol/DOM.json:
      
      Source/WebInspectorUI:
      
      Update InspectorWebBackendCommands.js after removing DOM.setFileInputFiles.
      
      * UserInterface/InspectorWebBackendCommands.js:
      
      LayoutTests:
      
      * inspector-protocol/dom/setFileInputFiles-expected.txt: Removed.
      * inspector-protocol/dom/setFileInputFiles.html: Removed.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161380 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      55a4224d
  5. 22 Dec, 2013 1 commit
  6. 19 Dec, 2013 3 commits
    • commit-queue@webkit.org's avatar
      Web Inspector: Frontend Error when selecting Database folder in Resources Sidebar · a62349b1
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=126029
      
      Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-12-19
      Reviewed by Timothy Hatcher.
      
      Treat the DatabaseHostTreeElement tree element like a folder. It pretty much
      is a folder, but inherits from StorageTreeElement to share some code there.
      
      * UserInterface/ResourceSidebarPanel.js:
      (WebInspector.ResourceSidebarPanel.prototype._treeElementSelected):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160897 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a62349b1
    • commit-queue@webkit.org's avatar
      Web Inspector: Uncaught Exception: NavigationSidebarPanel.js: TypeError:... · 8ed466b6
      commit-queue@webkit.org authored
      Web Inspector: Uncaught Exception: NavigationSidebarPanel.js: TypeError: undefined is not a function
      https://bugs.webkit.org/show_bug.cgi?id=126018
      
      Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-12-19
      Reviewed by Timothy Hatcher.
      
      ERROR: TypeError: undefined is not a function (evaluating 'representedObject.saveIdentityToCookie(candidateObjectCookie)')
      
      There are some TreeElements (Folders, and the special Databases Folder)
      which do not have a represented object, and would throw an exception
      when trying to use saveIdentityToCookie.
      
      We should always provide a saveIdentityToCookie when possible. So just
      blacklist the tree element types we know do not have representedObjects,
      and where we don't want to save identity. This will continue to throw
      exceptions in the future for tree elements that don't have the save
      function implemented, but should.
      
      Note that even if a TreeElement is constructed with a null represented
      object, it becomes an empty object (representedObject || {}).
      
      * UserInterface/NavigationSidebarPanel.js:
      (WebInspector.NavigationSidebarPanel.prototype.saveStateToCookie):
      (WebInspector.NavigationSidebarPanel.prototype._isTreeElementWithoutRepresentedObject):
      (WebInspector.NavigationSidebarPanel.prototype.treeElementMatchesCookie):
      (WebInspector.NavigationSidebarPanel.prototype._checkElementsForPendingViewStateCookie):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160888 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8ed466b6
    • commit-queue@webkit.org's avatar
      Web Inspector: Add InspectorFrontendHost.debuggableType to let the frontend... · ba1f050d
      commit-queue@webkit.org authored
      Web Inspector: Add InspectorFrontendHost.debuggableType to let the frontend know it's backend is JavaScript or Web
      https://bugs.webkit.org/show_bug.cgi?id=126016
      
      Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-12-19
      Reviewed by Timothy Hatcher.
      
      Source/JavaScriptCore:
      
      * inspector/remote/RemoteInspector.mm:
      (Inspector::RemoteInspector::listingForDebuggable):
      * inspector/remote/RemoteInspectorConstants.h:
      Include a debuggable type identifier in the debuggable listing,
      so the remote frontend can know if it is debugging a Web Page
      or JS Context.
      
      Source/WebCore:
      
      * inspector/InspectorFrontendHost.cpp:
      (WebCore::InspectorFrontendHost::debuggableType):
      * inspector/InspectorFrontendHost.h:
      * inspector/InspectorFrontendHost.idl:
      Expose the debuggableType to the frontend. In WebCore it is always a "web" type.
      
      Source/WebInspectorUI:
      
      * UserInterface/LoadInspectorBackendCommands.js:
      If the debuggable target is "web" load both JS and Web backend commands.
      Otherwise, we only load the default, js backend commands.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160887 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ba1f050d
  7. 16 Dec, 2013 1 commit
    • commit-queue@webkit.org's avatar
      Fixed Win64 build on VS2013. · b638e272
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=125753
      
      Patch by Alex Christensen <achristensen@webkit.org> on 2013-12-16
      Reviewed by Brent Fulgham.
      
      Source/JavaScriptCore:
      
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj:
      * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.vcxproj:
      * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj:
      * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj:
      * JavaScriptCore.vcxproj/jsc/jsc.vcxproj:
      * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj:
      * JavaScriptCore.vcxproj/testapi/testapi.vcxproj:
      Added correct PlatformToolset for 64-bit builds.
      
      Source/ThirdParty/ANGLE:
      
      * ANGLE.vcxproj/libGLESv2.vcxproj:
      * ANGLE.vcxproj/preprocessor.vcxproj:
      * ANGLE.vcxproj/translator_common.vcxproj:
      * ANGLE.vcxproj/translator_glsl.vcxproj:
      * ANGLE.vcxproj/translator_hlsl.vcxproj:
      Added correct PlatformToolset for 64-bit builds.
      
      Source/WebCore:
      
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
      Added correct PlatformToolset for 64-bit builds.
      
      Source/WebInspectorUI:
      
      * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
      Added 64-bit configuration.
      
      Source/WebKit:
      
      * WebKit.vcxproj/WebKit.sln:
      Use new 64-bit WebInspectorUI configurations.
      * WebKit.vcxproj/Interfaces/Interfaces.vcxproj:
      * WebKit.vcxproj/WebKit/WebKit.vcxproj:
      * WebKit.vcxproj/WebKitExportGenerator/WebKitExportGenerator.vcxproj:
      * WebKit.vcxproj/WebKitGUID/WebKitGUID.vcxproj:
      Added correct PlatformToolset for 64-bit builds.
      
      Source/WTF:
      
      * WTF.vcxproj/WTF.vcxproj:
      Added correct PlatformToolset for 64-bit builds.
      
      Tools:
      
      * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTree.vcxproj:
      * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncher.vcxproj:
      * DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiff.vcxproj:
      * DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncher.vcxproj:
      * DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.vcxproj:
      * TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj:
      * WinLauncher/WinLauncher.vcxproj/WinLauncher.vcxproj:
      * WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj:
      * win/record-memory/record-memory.vcxproj:
      Added correct PlatformToolset for 64-bit builds.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160655 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b638e272
  8. 13 Dec, 2013 5 commits
    • joepeck@webkit.org's avatar
      Web Inspector: Move Inspector and Debugger protocol domains into JavaScriptCore · 4591f9bc
      joepeck@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=125707
      
      Reviewed by Timothy Hatcher.
      
      Source/JavaScriptCore:
      
      * CMakeLists.txt:
      * DerivedSources.make:
      * GNUmakefile.am:
      * inspector/protocol/Debugger.json: Renamed from Source/WebCore/inspector/protocol/Debugger.json.
      * inspector/protocol/GenericTypes.json: Added.
      * inspector/protocol/InspectorDomain.json: Renamed from Source/WebCore/inspector/protocol/InspectorDomain.json.
      Add new files to inspector generation.
      
      * inspector/scripts/CodeGeneratorInspector.py:
      (Generator.go):
      Only build TypeBuilder output if the domain only has types. Avoid
      backend/frontend dispatchers and backend commands.
      
      (TypeBindings.create_type_declaration_.EnumBinding.get_setter_value_expression_pattern):
      (format_setter_value_expression):
      (Generator.process_command):
      (Generator.generate_send_method):
      * inspector/scripts/CodeGeneratorInspectorStrings.py:
      Export and name the get{JS,Web}EnumConstant function.
      
      Source/WebCore:
      
        - Switch TypeBuilder::Page::SearchMatch to TypeBuilder::GenericTypes::SearchMatch
          which comes from InspectorJSTypeBuilders.
        - Remove domains that moved to JavaScriptCore.
      
      No new tests, this only moves code around. There are no functional changes.
      
      * CMakeLists.txt:
      * DerivedSources.make:
      * GNUmakefile.am:
      Add new files.
      
      * inspector/ContentSearchUtils.cpp:
      (WebCore::ContentSearchUtils::buildObjectForSearchMatch):
      (WebCore::ContentSearchUtils::searchInTextByLines):
      * inspector/ContentSearchUtils.h:
      * inspector/InspectorAgent.cpp:
      * inspector/InspectorAgent.h:
      * inspector/InspectorDebuggerAgent.h:
      * inspector/InspectorPageAgent.cpp:
      (WebCore::InspectorPageAgent::searchInResource):
      * inspector/InspectorPageAgent.h:
      * inspector/protocol/Page.json:
      Update includes and type builder type names.
      
      * inspector/InspectorDebuggerAgent.cpp:
      (WebCore::breakpointActionTypeForString):
      (WebCore::InspectorDebuggerAgent::searchInContent):
      * inspector/InspectorTimelineAgent.cpp:
      (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
      Use the new getEnum function names.
      
      Source/WebInspectorUI:
      
      * UserInterface/InspectorJSBackendCommands.js:
      * UserInterface/InspectorWebBackendCommands.js:
      Regenerate now that domains have moved around.
      
      LayoutTests:
      
      * http/tests/inspector-protocol/resources/InspectorTest.js:
      (InspectorTest.checkForError):
      Since having a protocol error is likely wrong, make the output
      for it as detailed as possible.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160588 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4591f9bc
    • commit-queue@webkit.org's avatar
      Web Inspector: Exception: TypeError: undefined is not a function (evaluating 'marker.find()') · 21a0fdaa
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=125724
      
      Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-12-13
      Reviewed by Darin Adler.
      
      * UserInterface/CSSStyleDeclarationTextEditor.js:
      (WebInspector.CSSStyleDeclarationTextEditor.prototype.):
      (WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches):
      The callback changed to returning WebInspector.TextMarkers, however
      this class expected a raw CodeMirror marker. Since this class knows
      about CodeMirror and expects to access these markers later go
      directly to the CodeMirror marker.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160585 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      21a0fdaa
    • joepeck@webkit.org's avatar
      Web Inspector: Add Inspector Code Generation to JavaScriptCore for Runtime Domain · 8be4912d
      joepeck@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=125595
      
      Reviewed by Timothy Hatcher.
      
      * GNUmakefile.am:
      
      Source/JavaScriptCore:
      
        - Move CodeGeneration scripts from WebCore into JavaScriptCore/inspector/scripts
        - For ports that build WebKit frameworks separately, export the scripts as PrivateHeaders
        - Update CodeGeneratorInspector.py in a few ways:
          - output dynamic filenames, so JavaScriptCore generates InspectorJSFoo.* and WebCore generates InspectorWebFoo.*
          - take in more then one protocol JSON file. The first contains domains to generate, the others are dependencies
            that are generated elsewhere that we can depend on for Types.
        - Add DerivedSources build step to generate the Inspector Interfaces
      
      * CMakeLists.txt:
      * DerivedSources.make:
      * GNUmakefile.am:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
      * JavaScriptCore.vcxproj/copy-files.cmd:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      Add scripts and code generation.
      
      * inspector/protocol/Runtime.json: Renamed from Source/WebCore/inspector/protocol/Runtime.json.
      Move protocol file into JavaScriptCore so its types will be generated in JavaScriptCore.
      
      * inspector/scripts/CodeGeneratorInspector.py: Renamed from Source/WebCore/inspector/CodeGeneratorInspector.py.
      Updates to the script as listed above.
      
      * inspector/scripts/CodeGeneratorInspectorStrings.py: Renamed from Source/WebCore/inspector/CodeGeneratorInspectorStrings.py.
      * inspector/scripts/generate-combined-inspector-json.py: Renamed from Source/WebCore/inspector/Scripts/generate-combined-inspector-json.py.
      Moved from WebCore into JavaScriptCore for code generation.
      
      Source/WebCore:
      
        - CodeGeneration changed to output Frontend and Backend dispatchers
          in namespace Inspector. So update all the agent's appropriately.
        - Update Derived Sources code generation to use the Scripts that had
          moved to JavaScriptCore. Some ports just use JSC/inspector/scripts
          directly, but others have to use the Scripts exported by JSC
          in JavaScriptCore's PrivateHeaders.
        - Add ForwardingHeaders for the files generated in JavaScriptCore.
        - Update the names of Inspector DerivedSources files, since they
          were renamed to InspectorWeb*.
      
      No new tests, this only moves code around. There are no functional changes.
      
      * CMakeLists.txt:
      * DerivedSources.make:
      * ForwardingHeaders/inspector/InspectorJSBackendDispatchers.h: Added.
      * ForwardingHeaders/inspector/InspectorJSFrontendDispatchers.h: Added.
      * ForwardingHeaders/inspector/InspectorJSTypeBuilders.h: Added.
      * GNUmakefile.am:
      * GNUmakefile.list.am:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.vcxproj/build-generated-files.sh:
      * WebCore.xcodeproj/project.pbxproj:
      Remove files, rename files, update code generation.
      
      * make-generated-sources.sh:
      Update this standalone developer script to fill in the new InspectorScripts variable.
      
      * inspector/ConsoleMessage.h:
      * inspector/InjectedScriptHost.cpp:
      * inspector/InspectorAgent.cpp:
      * inspector/InspectorAgent.h:
      * inspector/InspectorApplicationCacheAgent.cpp:
      * inspector/InspectorApplicationCacheAgent.h:
      * inspector/InspectorCSSAgent.h:
      * inspector/InspectorCanvasAgent.cpp:
      * inspector/InspectorCanvasAgent.h:
      * inspector/InspectorConsoleAgent.cpp:
      * inspector/InspectorConsoleAgent.h:
      * inspector/InspectorController.cpp:
      * inspector/InspectorDOMAgent.cpp:
      * inspector/InspectorDOMAgent.h:
      * inspector/InspectorDOMDebuggerAgent.cpp:
      * inspector/InspectorDOMDebuggerAgent.h:
      * inspector/InspectorDOMStorageAgent.cpp:
      * inspector/InspectorDOMStorageAgent.h:
      * inspector/InspectorDatabaseAgent.cpp:
      * inspector/InspectorDatabaseAgent.h:
      * inspector/InspectorDatabaseResource.cpp:
      * inspector/InspectorDatabaseResource.h:
      * inspector/InspectorDebuggerAgent.cpp:
      * inspector/InspectorDebuggerAgent.h:
      * inspector/InspectorFrontendClientLocal.cpp:
      * inspector/InspectorHeapProfilerAgent.h:
      * inspector/InspectorIndexedDBAgent.cpp:
      * inspector/InspectorIndexedDBAgent.h:
      * inspector/InspectorInputAgent.h:
      * inspector/InspectorLayerTreeAgent.cpp:
      * inspector/InspectorLayerTreeAgent.h:
      * inspector/InspectorMemoryAgent.cpp:
      * inspector/InspectorMemoryAgent.h:
      * inspector/InspectorPageAgent.cpp:
      * inspector/InspectorPageAgent.h:
      * inspector/InspectorProfilerAgent.cpp:
      * inspector/InspectorProfilerAgent.h:
      * inspector/InspectorResourceAgent.cpp:
      * inspector/InspectorResourceAgent.h:
      * inspector/InspectorRuntimeAgent.h:
      * inspector/InspectorTimelineAgent.cpp:
      * inspector/InspectorTimelineAgent.h:
      * inspector/InspectorWorkerAgent.cpp:
      * inspector/InspectorWorkerAgent.h:
      * inspector/PageRuntimeAgent.h:
      * inspector/ScriptCallFrame.cpp:
      * inspector/WorkerInspectorController.cpp:
      * inspector/WorkerRuntimeAgent.h:
      Updates header names and class namespace changes.
      
      Source/WebInspectorUI:
      
      * Scripts/copy-user-interface-resources.sh:
      Copy all the different backend commands files.
      
      * Scripts/update-InspectorBackendCommands.rb:
      Update with respect to new script location and new file names.
      
      * WebInspectorUI.xcodeproj/project.pbxproj:
      Remove Inputs and Outputs of build phase, which were wrong.
      Now this build phase always runs, and not by accident.
      
      * UserInterface/InspectorJSBackendCommands.js: Added.
      * UserInterface/InspectorWebBackendCommands.js: Renamed from Source/WebInspectorUI/UserInterface/InspectorBackendCommands.js.
      * UserInterface/Legacy/6.0/InspectorWebBackendCommands.js: Renamed from Source/WebInspectorUI/UserInterface/Legacy/6.0/InspectorBackendCommands.js.
      * UserInterface/Legacy/7.0/InspectorWebBackendCommands.js: Renamed from Source/WebInspectorUI/UserInterface/Legacy/7.0/InspectorBackendCommands.js.
      * UserInterface/LoadInspectorBackendCommands.js:
      * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
      * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
      
      LayoutTests:
      
      * http/tests/inspector-protocol/resources/InspectorTest.js:
      (InspectorTest.importInspectorScripts):
      Update for the new backend commands files.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160557 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8be4912d
    • graouts@apple.com's avatar
      Web Inspector: provide an abstraction for CodeMirror's TextMarker · e69d304a
      graouts@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125695
      
      Reviewed by Timothy Hatcher.
      
      Introduce a new WebInspector.TextMarker class which is used by code with CodeMirror knowledge
      to return information related to text markers to objects that should have no direct knowledge
      of CodeMirror. Start using this class in TextEditor and SourceCodeTextEditor to remove the
      last remaining pieces of CodeMirror knowledge added to SourceCodeTextEditor to fix
      https://webkit.org/b/124364.
      
      * UserInterface/CodeMirrorAdditions.js:
      Stop using __markedColor to identify a color marker and instead use the type on the matching
      WebInspector.TextMarker. Additionally, create a WebInspector.TextMarker with type
      WebInspector.TextMarker.Type.Color in createColorMarkers().
      
      * UserInterface/CodeMirrorColorEditingController.js:
      (WebInspector.CodeMirrorColorEditingController):
      Use a WebInspector.TextRange to track the edited range and obtain it directly from the
      WebInspector.TextMaker used to instantiate the object. We also use the new "text" public
      property to create the color.
      
      (WebInspector.CodeMirrorColorEditingController.prototype.set color):
      Simply assing the serialized color to the new "text" public property.
      
      (WebInspector.CodeMirrorColorEditingController.prototype.get text):
      (WebInspector.CodeMirrorColorEditingController.prototype.set text):
      New public property to set get and set the text for the edited range, automatically updating
      the range upon setting to a new text.
      
      (WebInspector.CodeMirrorColorEditingController.prototype.presentHoverMenu):
      Obtain the bounds directly from the WebInspector.TextMarker object.
      
      * UserInterface/CodeMirrorTokenTrackingController.js:
      (WebInspector.CodeMirrorTokenTrackingController.prototype._updateHoveredTokenInfo):
      Since we're now tracking the hoveredMarker as a WebInspector.TextMarker, get the CodeMirror
      TextMarker from that object to check if it's contained within the text markers at the
      hovered position.
      
      * UserInterface/Main.html:
      Add the new TextMarker class source.
      
      * UserInterface/SourceCodeTextEditor.js:
      (WebInspector.SourceCodeTextEditor.prototype._hasColorMarkers):
      Use the WebInspector.TextMarker type to identify a given text marker is marking a color.
      
      (WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerNewHighlightCandidate):
      Use the renamed markersAtPosition() method from TextEditor.
      
      (WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedMarkedExpression):
      Use the WebInspector.TextMarker type to identify a given text marker is marking a color.
      
      (WebInspector.SourceCodeTextEditor.prototype.colorEditingControllerDidFinishEditing):
      Since the CodeMirrorColorEditingController is now using a WebInspector.TextRange for its range,
      update to use a WebInspector.TextRange API to get the range's start line.
      
      * UserInterface/TextEditor.js:
      (WebInspector.TextEditor.prototype.get markers):
      Return WebInspector.TextMarker objects instead of CodeMirror TextRange objects.
      
      (WebInspector.TextEditor.prototype.markersAtPosition):
      Rename method to a better name instead of using the CodeMirror-influenced name. Also, return
      WebInspector.TextMarker objects instead of CodeMirror TextRange objects.
      
      * UserInterface/TextMarker.js: Added.
      (WebInspector.TextMarker):
      Create a WebInspector.TextMarker with a CodeMirror TextMarker and an optional type.
      
      (WebInspector.TextMarker.textMarkerForCodeMirrorTextMarker):
      Static method to either obtain the existing WebInspector.TextMarker for a given CodeMirror
      TextMarker, or create a new WebInspector.TextMarker.
      
      (WebInspector.TextMarker.prototype.get codeMirrorTextMarker):
      Public property to access the CodeMirror TextMarker objects for classes that have direct
      knowledge of CodeMirror.
      
      (WebInspector.TextMarker.prototype.get type):
      Public property to access the type used to create this text marker.
      
      (WebInspector.TextMarker.prototype.get range):
      (WebInspector.TextMarker.prototype.get bounds):
      Public properties allowing easy access to generally useful information related to marked text.
      
      (WebInspector.TextMarker.prototype.clear):
      Wrapper for the CodeMirror TextMarker clear() method.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160552 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e69d304a
    • bfulgham@apple.com's avatar
      [Win] Switch WebKit solution to Visual Studio 2013 · 0d3ee590
      bfulgham@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125192
      
      Reviewed by Anders Carlsson.
      
      Source/JavaScriptCore: 
      
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Update for VS2013
      * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj:
      Ditto
      * JavaScriptCore.vcxproj/jsc/jsc.vcxproj: Ditto
      * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj: Ditto
      * JavaScriptCore.vcxproj/testapi/testapi.vcxproj: Ditto
      
      Source/ThirdParty: 
      
      * gtest/msvc/gtest-md.vcxproj: Update for VS2013
      
      Source/WebCore: 
      
      * WebCore.vcxproj/WebCore.vcxproj: Update for VS2013
      * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto
      * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Ditto
      
      Source/WebInspectorUI: 
      
      * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj: Update for VS2013
      
      Source/WebKit: 
      
      * WebKit.vcxproj/Interfaces/Interfaces.vcxproj: Update for VS2013
      * WebKit.vcxproj/WebKit.sln: Ditto
      * WebKit.vcxproj/WebKit/WebKit.vcxproj: Ditto
      * WebKit.vcxproj/WebKitExportGenerator/WebKitExportGenerator.vcxproj: Ditto
      * WebKit.vcxproj/WebKitGUID/WebKitGUID.vcxproj: Ditto
      
      Source/WTF: 
      
      * WTF.vcxproj/WTF.vcxproj: Update for VS2013
      * WTF.vcxproj/WTF.vcxproj.filters: Ditto
      
      Tools: 
      
      Project files must reference vs12_xp for 32-bit builds. 
      
      * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTree.vcxproj:
      Update for VS2013
      * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncher.vcxproj:
      Ditto
      * DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiff.vcxproj:
      Ditto
      * DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncher.vcxproj:
      Ditto
      * DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.vcxproj:
      Ditto
      * Scripts/webkitdirs.pm:
      (visualStudioInstallDir): Specify VS2013
      (visualStudioVersion): Ditto.
      (setupAppleWinEnv): Use VS2013 in messages
      (setupCygwinEnv): Ditto
      * TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj:
      Update for VS2013
      * WinLauncher/WinLauncher.vcxproj/WinLauncher.vcxproj:
      Ditto
      * WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj:
      Ditto
      * win/record-memory/record-memory.vcxproj:
      Ditto
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160548 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0d3ee590
  9. 12 Dec, 2013 2 commits
    • commit-queue@webkit.org's avatar
      Web Inspector: ES6: JavaScript syntax highlighting and recognition of for..of · c9ff3b34
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=122868
      
      Patch by Laszlo Vidacs <lac@inf.u-szeged.hu> on 2013-12-12
      Reviewed by Timothy Hatcher.
      
      Update to CodeMirror 3.20 including javascript ES6 updates.
      
      * Tools/PrettyPrinting/codemirror.css:
      * Tools/PrettyPrinting/codemirror.js: Minor local change due to error from jsmin.py
      * Tools/PrettyPrinting/css.js:
      * Tools/PrettyPrinting/javascript.js:
      * UserInterface/External/CodeMirror/codemirror.css:
      * UserInterface/External/CodeMirror/codemirror.js: Minor local change due to error from jsmin.py
      * UserInterface/External/CodeMirror/coffeescript.js:
      * UserInterface/External/CodeMirror/css.js:
      * UserInterface/External/CodeMirror/htmlmixed.js:
      * UserInterface/External/CodeMirror/javascript.js:
      * UserInterface/External/CodeMirror/less.js:
      * UserInterface/External/CodeMirror/matchbrackets.js:
      * UserInterface/External/CodeMirror/placeholder.js:
      * UserInterface/External/CodeMirror/runmode.js:
      * UserInterface/External/CodeMirror/searchcursor.js:
      * UserInterface/External/CodeMirror/sql.js:
      * UserInterface/External/CodeMirror/xml.js:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160500 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c9ff3b34
    • graouts@apple.com's avatar
      Web Inspector: allow editing of colors in CSS resources · ffc95ad7
      graouts@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124364
      
      Reviewed by Timothy Hatcher.
      
      Identify colors in CSS and HTML resources so that hovering these colors shows a HoverMenu
      allowing a ColorPicker hosted in a Popover to be shown to edit the hovered color.
      
      * UserInterface/CSSStyleDeclarationTextEditor.js:
      (WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches):
      Remove the code that goes through the lines of the CodeMirror editor to look for
      color strings and replace it with a call to the .createColorMarkers() CodeMirror
      extension in which the code was refactored. The callback passed to
      .createColorMarkers() handles the CSSStyleDeclarationTextEditor-specific creation
      of color swatches to show the popover, keeping the existing behavior of the Styles
      sidebar panel.
      
      * UserInterface/CodeMirrorAdditions.js:
      Refactor existing code into two new CodeMirror extensions: .boundsForRange(), which
      was previously defined on the CodeMirrorTokenTrackingController but was also needed
      in the new CodeMirrorColorEditingController, and .createColorMarkers(), discussed above.
      
      * UserInterface/CodeMirrorColorEditingController.js: Added.
      (WebInspector.CodeMirrorColorEditingController):
      New class used by SourceCodeTextEditor to coordinate the editing of a color in a CodeMirror
      TextMarker by a ColorPicker hosted in a Popover shown by the activation of a HoverMenu. This
      controller automatically gets the color set by the user using the ColorPicker and updates
      the CodeMirror text editor with the new value. When the user presses the Esc. key while the
      popover is shown, it's automatically dismissed and the original color is reset in the editor.
      
      (WebInspector.CodeMirrorColorEditingController.prototype.get marker):
      (WebInspector.CodeMirrorColorEditingController.prototype.get range):
      (WebInspector.CodeMirrorColorEditingController.prototype.get delegate):
      (WebInspector.CodeMirrorColorEditingController.prototype.set delegate):
      Getters and setters for public properties.
      
      (WebInspector.CodeMirrorColorEditingController.prototype.get color):
      (WebInspector.CodeMirrorColorEditingController.prototype.set color):
      Get and set the color for the edited color marker, replacing the text in the marker's range
      upon setting.
      
      (WebInspector.CodeMirrorColorEditingController.prototype.presentHoverMenu):
      Public API allowing for a HoverMenu to be shown around the bounds of the TextMarker passed
      in the constructor. This method is called from SourceCodeTextEditor when the
      CodeMirrorTokenTrackingController identifies that a token that is part of a TextMarker is
      hovered and that token is a color.
      
      (WebInspector.CodeMirrorColorEditingController.prototype.dismissHoverMenu):
      Public API allowing for the HoverMenu to be dismissed. This method is called when the
      CodeMirrorTokenTrackingController identifies that its "hoveredMarker" is no longer being
      hovered as well as when we identify that editing of the color has completed.
      
      (WebInspector.CodeMirrorColorEditingController.prototype.handleEvent):
      Event handler for the "keydown" event that are being listened to when the HoverMenu
      is activated such that the Esc. key can be used to dimiss the popover and reset the
      original color before any edits.
      
      (WebInspector.CodeMirrorColorEditingController.prototype.hoverMenuButtonWasPressed):
      Implementation of the HoverMenu delegation method used to show a Popover containing a
      ColorPicker upon clicking on the color wheel attached to the HoverMenu. We also remember
      the color set on the marker so that it may be restored when Esc. is pressed and used to
      set the original state of the ColorPicker. The delegation method
      colorEditingControllerDidStartEditing() is also called at this point, which the
      SourceCodeTextEditor implements.
      
      (WebInspector.CodeMirrorColorEditingController.prototype.didDismissPopover):
      Implementation of the Popover delegation method used to identify that color editing has
      completed. The delegation method colorEditingControllerDidFinishEditing() is called
      at this point, which the SourceCodeTextEditor implements.
      
      (WebInspector.CodeMirrorColorEditingController.prototype._colorPickerColorChanged):
      Apply the color set in the color picker to the CodeMirror text editor.
      
      * UserInterface/CodeMirrorTokenTrackingController.js:
      Add two new modes to CodeMirrorTokenTrackingController. The first mode is "None" and is
      the default, incurring no specific token handling behavior. The second mode is "MarkedTokens"
      which identifies hover of a token contained in a CodeMirror TextMarker range. The new
      "MarkedTokens" mode is used by SourceCodeTextEditor to identify when a marked color is being
      hovered to display a HoverMenu.
      
      (WebInspector.CodeMirrorTokenTrackingController):
      (WebInspector.CodeMirrorTokenTrackingController.prototype.set mode):
      Make "None" the new default mode for CodeMirrorTokenTrackingController.
      
      (WebInspector.CodeMirrorTokenTrackingController.prototype.get hoveredMarker):
      (WebInspector.CodeMirrorTokenTrackingController.prototype.set hoveredMarker):
      (WebInspector.CodeMirrorTokenTrackingController.prototype._updateHoveredTokenInfo):
      Check, when we have a "hoveredMarker" set on the CodeMirrorTokenTrackingController,
      whether the "hoveredMarker" is still being hovered when there is no token at the current
      mouse position. We can then determine when we're mousing out of the "hoveredMarker" and
      notify the delegate via the new tokenTrackingControllerMouseOutOfHoveredMarker delegate
      method. The SourceCodeTextEditor uses this method to dismiss its CodeMirrorColorEditingController.
      
      (WebInspector.CodeMirrorTokenTrackingController.prototype._processNewHoveredToken):
      Add support for the new "MarkedTokens" mode.
      
      (WebInspector.CodeMirrorTokenTrackingController.prototype._processMarkedToken):
      For the moment, use the same behavior as the existing "MarkedTokens" mode.
      
      * UserInterface/Color.js:
      (WebInspector.Color):
      Add a new "valid" property to identify whether a color has any invalid (NaN) component. This property
      is used by SourceCodeTextEditor to establish whether a hovered color marker is indeed set to a
      valid color still.
      
      (WebInspector.Color.prototype.copy):
      New method to create an exact copy of a Color instance, used by CodeMirrorColorEditingController
      to duplicate the edited color in case we need to revert it.
      
      * UserInterface/HoverMenu.js:
      (WebInspector.HoverMenu.prototype._handleClickEvent):
      Rename hoverMenuWasActivated to hoverMenuButtonWasPressed per review feedback.
      
      * UserInterface/Images/ColorIcon.png: Added.
      * UserInterface/Images/ColorIcon@2x.png: Added.
      New color wheel icon used to customize the HoverMenu shown by a CodeMirrorColorEditingController.
      
      * UserInterface/Main.html:
      Link to the new CodeMirrorColorEditingController.js file.
      
      * UserInterface/SourceCodeTextEditor.css:
      (.hover-menu.color):
      (.hover-menu.color > img):
      Customize the HoverMenu shown by a CodeMirrorColorEditingController to use the new ColorIcon asset.
      
      * UserInterface/SourceCodeTextEditor.js:
      (WebInspector.SourceCodeTextEditor):
      Add a new "_ignoreContentDidChange" ivar that increments and decrements to track when handling
      of CodeMirror content changes should be disabled.
      
      (WebInspector.SourceCodeTextEditor.prototype.close):
      Adopt the new ._updateTokenTrackingControllerState() method to update the state of the
      CodeMirrorTokenTrackingController.
      
      (WebInspector.SourceCodeTextEditor.prototype.contentDidChange):
      Override the new TextEditor public API called when content in the CodeMirror text editor is changed.
      We use this method to process any newly added line to create any newly added color marker.
      
      (WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate):
      (WebInspector.SourceCodeTextEditor.prototype._debuggerDidPause):
      (WebInspector.SourceCodeTextEditor.prototype._debuggerDidResume):
      (WebInspector.SourceCodeTextEditor.prototype._sourceCodeSourceMapAdded):
      Adopt the new ._updateTokenTrackingControllerState() method to update the state of the
      CodeMirrorTokenTrackingController.
      
      (WebInspector.SourceCodeTextEditor.prototype._updateTokenTrackingControllerState):
      New method acting as the only point where we check the state of the text editor and set the right
      mode and settings on the CodeMirrorTokenTrackingController, including setting the new "MarkedTokens"
      mode when we have color markers, as determined by ._hasColorMarkers().
      
      (WebInspector.SourceCodeTextEditor.prototype._hasColorMarkers):
      Check whether any of the TextMarkers set on the CodeMirror text editor were created for a color.
      
      (WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked):
      Check the CodeMirrorTokenTrackingController mode rather than the removed "_jumpToSymbolTrackingModeEnabled"
      ivar to identify we're in the "NonSymbolTokens" mode.
      
      (WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerNewHighlightCandidate):
      Refactor method to use the CodeMirrorTokenTrackingController mode to branch into mode-specific code
      and add a new branch for the new "MarkedTokens" mode where we check if the newly hovered token
      is part of a color TextMarker range.
      
      (WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerMouseOutOfHoveredMarker):
      Implement this new CodeMirrorTokenTrackingController delegation method to dismiss the
      CodeMirrorColorEditingController as we identify we're no longer hovering over the TextMarker
      for which the CodeMirrorColorEditingController was created.
      
      (WebInspector.SourceCodeTextEditor.prototype._showPopover):
      Adopt the new TextEditor boundsForRange() method.
      
      (WebInspector.SourceCodeTextEditor.prototype._updateColorMarkers):
      Harness the new TextEditor createColorMarkers() method to create new TextMarkers for the provided
      line, or the entire text editor content if none provided. We then immediately call _updateTokenTrackingControllerState()
      so that the new "MarkedTokens" mode is entered in case color TextMarkers were created for the first
      time for this text editor.
      
      (WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedMarkedExpression):
      Called when we've identified the CodeMirrorTokenTrackingController highlighted a TextMarker. We check
      if any of the hovered TextMarkers are for a color, and in this case create a CodeMirrorColorEditingController
      to coordinate the display of a ColorPicker in a Popover to edit the hovered color token. We also check
      whether the hovered marker still contains a valid color, clearing the marker in case it was edited to
      no longer contain a color.
      
      (WebInspector.SourceCodeTextEditor.prototype._dismissCodeMirrorColorEditingController):
      Used to dismiss the CodeMirrorColorEditingController, if previously presented, and reset some internal state.
      
      (WebInspector.SourceCodeTextEditor.prototype.colorEditingControllerDidStartEditing):
      Implement this CodeMirrorColorEditingController delegation method to temporarily disable the
      CodeMirrorTokenTrackingController while we edit the color with the ColorPicker, remove
      the TextMarker for the edited color and instruct that content changes should be ignored
      such that we act on the complete set of color edits upon completion.
      
      (WebInspector.SourceCodeTextEditor.prototype.colorEditingControllerDidFinishEditing):
      Update color markers for the edited line such that any color edits are correctly updated for
      the future and so that, as a side-effect, the CodeMirrorColorEditingController is reset to the
      appropriate mode depending on whether color TextMarkers are indeed available, resetting states
      that may have been altered by colorEditingControllerDidStartEditing().
      
      * UserInterface/TextEditor.js:
      (WebInspector.TextEditor.prototype.contentDidChange):
      New public method meant to be overriden by subclasses, added for the use of SourceCodeTextEditor, exposing
      the list of TextRanges affected by the content change, both in the context of the old content and new content.
      
      (WebInspector.TextEditor.prototype.boundsForRange):
      (WebInspector.TextEditor.prototype.get markers):
      (WebInspector.TextEditor.prototype.findMarkersAtPosition):
      (WebInspector.TextEditor.prototype.createColorMarkers):
      (WebInspector.TextEditor.prototype.colorEditingControllerForMarker):
      New public methods calling into the CodeMirror private ivar for the benefit of SourceCodeTextEditor.
      
      (WebInspector.TextEditor.prototype._contentChanged):
      Call the new contentDidChange() method.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ffc95ad7
  10. 05 Dec, 2013 3 commits
    • seokju@webkit.org's avatar
      Web Inspector: Remove 'cookiesString' output from Page.getCookies · 1eb5c051
      seokju@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=125268
      
      Reviewed by Timothy Hatcher.
      
      Remove 'cookiesString' output from Page.getCookies protocol.
      It is no longer meaningful because it is an unused parameter.
      
      Source/WebCore:
      
      No new tests, no behavior change.
      
      * inspector/InspectorPageAgent.cpp:
      (WebCore::InspectorPageAgent::getCookies):
      * inspector/InspectorPageAgent.h:
      * inspector/protocol/Page.json:
      
      Source/WebInspectorUI:
      
      * UserInterface/CookieStorageContentView.js:
      (WebInspector.CookieStorageContentView.prototype.update):
      * UserInterface/InspectorBackendCommands.js:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1eb5c051
    • commit-queue@webkit.org's avatar
      Web Inspector: expose node and frame snapshot capabilities. · b54f0aea
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=124326
      
      Patch by Brian J. Burg <burg@cs.washington.edu> on 2013-12-05
      Reviewed by Joseph Pecoraro.
      
      Source/WebCore:
      
      This adds snapshotRect() and snapshotNode() to the Page domain.
      Both methods create snapshots using FrameSnapshotting APIs
      and send images to the inspector frontend as a data URL.
      
      Remove the unimplemented Page.captureScreenshot API.
      
      * inspector/InspectorPageAgent.cpp:
      (WebCore::InspectorPageAgent::snapshotNode): Added.
      (WebCore::InspectorPageAgent::snapshotRect): Added.
      * inspector/InspectorPageAgent.h:
      * inspector/protocol/Page.json: Added new protocol APIs.
      
      Source/WebInspectorUI:
      
      Add method signatures for snapshotNode() and snapshotRect().
      Remove method signature for unimplemented Page.captureScreenshot.
      
      * UserInterface/InspectorBackendCommands.js:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160202 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b54f0aea
    • achicu@adobe.com's avatar
      Web Inspector: [CSS Regions] Show a list of containing regions when clicking a... · 0e035b16
      achicu@adobe.com authored
      Web Inspector: [CSS Regions] Show a list of containing regions when clicking a node that is part of a flow
      https://bugs.webkit.org/show_bug.cgi?id=124614
      
      Reviewed by Timothy Hatcher.
      
      Source/WebInspectorUI:
      
      Added a new function in DOMTreeManager called getNodeContentFlowInfo that can be used
      to retrieve an object with the following structure:
      {
           "regionFlow": <Reference to the ContentFlow object referenced by the -webkit-flow-from property of the node>,
           "contentFlow": <Reference to the ContentFlow object referenced by the -webkit-flow-into property of
                           the node or a parent of the node>,
           "regions": [ list of DOMNodes representing the regions containers of the node. The node is split across all these regions. ]
      }
      
      Also, used this method to display a two new sections in the Computed Styles panel.
      1. Section "Flows": can have up to two Simple Rows: "Region Flow" and "Content Flow".
      2. Section "Container Regions" contains a DOMTreeDataGrid with the list of regions.
      
      The sections are only visible when there's content to display.
      
      Next to the "Region Flow" simple row I've added an arrow that will take the user to the "ContentFlowDOMTreeContentView" of the
      ContentFlow. The same happens for the "Content Flow", but in this case the element will also be highlighted.
      
      Part of the patch I've added the DOMTreeDataGridNode. LayerTreeDataGrid has a lot of CSS in common with it, so I
      will make another patch to refactor LayerTreeDataGrid to use DOMTreeDataGridNode as a base class.
      
      * Localizations/en.lproj/localizedStrings.js:
      * UserInterface/ComputedStyleDetailsPanel.css: Added.
      (.details-section > .content > .group > .row.simple.content-flow-link > .label):
      (.details-section > .content > .group > .row.simple.content-flow-link > .value):
      (.details-section > .content > .group > .row.simple.content-flow-link > .value > div):
      (.details-section > .content > .group > .row.simple.content-flow-link > .value > div > .icon):
      (.details-section > .content > .group > .row.simple.content-flow-link > .value > div > span):
      (.details-section > .content > .group > .row.simple.content-flow-link > .value > div > .go-to-arrow):
      (.details-section > .content > .group > .row.simple.content-flow-link:hover > .value > div > .go-to-arrow):
      * UserInterface/ComputedStyleDetailsPanel.js:
      (WebInspector.ComputedStyleDetailsPanel):
      (WebInspector.ComputedStyleDetailsPanel.prototype.get regionFlow):
      (WebInspector.ComputedStyleDetailsPanel.prototype.set regionFlow):
      (WebInspector.ComputedStyleDetailsPanel.prototype.get contentFlow):
      (WebInspector.ComputedStyleDetailsPanel.prototype.set contentFlow):
      (WebInspector.ComputedStyleDetailsPanel.prototype.get containerRegions):
      (WebInspector.ComputedStyleDetailsPanel.prototype.set containerRegions):
      (WebInspector.ComputedStyleDetailsPanel.prototype.refresh):
      (WebInspector.ComputedStyleDetailsPanel.prototype._computedStyleShowAllCheckboxValueChanged):
      (WebInspector.ComputedStyleDetailsPanel.prototype._resetFlowDetails):
      (WebInspector.ComputedStyleDetailsPanel.prototype._refreshFlowDetails.contentFlowInfoReady):
      (WebInspector.ComputedStyleDetailsPanel.prototype._refreshFlowDetails):
      (WebInspector.ComputedStyleDetailsPanel.prototype._goToRegionFlowArrowWasClicked):
      (WebInspector.ComputedStyleDetailsPanel.prototype._goToContentFlowArrowWasClicked):
      * UserInterface/DOMTreeDataGrid.css: Added.
      (.dom-tree-data-grid .data-grid):
      (.dom-tree-data-grid .data-grid table.data):
      (.dom-tree-data-grid .data-container):
      (.dom-tree-data-grid .data-container tr):
      (.dom-tree-data-grid .data-container td > div):
      (.dom-tree-data-grid .data-container .name-column):
      (.dom-tree-data-grid .data-container .name-column .icon):
      (.dom-tree-data-grid .data-container .name-column .label):
      (.dom-tree-data-grid .data-container tr:hover .name-column .label):
      (.dom-tree-data-grid .data-container .go-to-arrow):
      (.dom-tree-data-grid .data-container tr:hover .go-to-arrow):
      (.dom-tree-data-grid .data-container tbody > tr:nth-child(2n)):
      (.dom-tree-data-grid .data-container tbody > tr:nth-child(2n+1)):
      * UserInterface/DOMTreeDataGrid.js: Added.
      (WebInspector.DOMTreeDataGrid):
      (WebInspector.DOMTreeDataGrid.prototype._onmousemove):
      (WebInspector.DOMTreeDataGrid.prototype._onmouseout):
      * UserInterface/DOMTreeDataGridNode.js: Added.
      (WebInspector.DOMTreeDataGridNode):
      (WebInspector.DOMTreeDataGridNode.prototype.get domNode):
      (WebInspector.DOMTreeDataGridNode.prototype.createCellContent):
      (WebInspector.DOMTreeDataGridNode.prototype._updateNodeName):
      (WebInspector.DOMTreeDataGridNode.prototype._makeNameCell):
      (WebInspector.DOMTreeDataGridNode.prototype._updateNameCellData):
      (WebInspector.DOMTreeDataGridNode.prototype._goToArrowWasClicked):
      * UserInterface/DOMTreeManager.js:
      (WebInspector.DOMTreeManager.prototype.unregisteredNamedFlowContentElement):
      (WebInspector.DOMTreeManager.prototype.nodeRequested):
      (WebInspector.DOMTreeManager.prototype._coerceRemoteArrayOfDOMNodes):
      (WebInspector.DOMTreeManager.prototype.domNodeResolved):
      (WebInspector.DOMTreeManager.prototype.regionNodesAvailable):
      (WebInspector.DOMTreeManager.prototype.get if):
      (WebInspector.DOMTreeManager.prototype.get var):
      (WebInspector.DOMTreeManager.prototype.backendFunction.getComputedProperty):
      (WebInspector.DOMTreeManager.prototype.backendFunction.getContentFlowName):
      (WebInspector.DOMTreeManager.prototype.):
      * UserInterface/DataGrid.css:
      (.data-grid.no-header > table.header):
      (.data-grid.no-header .data-container):
      * UserInterface/DetailsSection.js:
      (WebInspector.DetailsSection):
      * UserInterface/InspectorBackend.js:
      (InspectorBackendClass.prototype._wrap):
      * UserInterface/Main.html:
      * UserInterface/ResourceSidebarPanel.js:
      (WebInspector.ResourceSidebarPanel.prototype.showContentFlowDOMTree):
      * UserInterface/RuntimeManager.js:
      (WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
      (WebInspector.RuntimeManager.prototype.getPropertiesForRemoteObject):
      
      LayoutTests:
      
      Added a new test to check the new WebInspector function called DOMTreeManager.getNodeContentFlowInfo.
      
      * http/tests/inspector-protocol/resources/InspectorTest.js:
      When testing the inspector code, we want to catch and log any uncaught exceptions or console.errors/asserts.
      (InspectorTest.importInspectorScripts.console.error.window.onerror):
      (InspectorTest.importInspectorScripts.console.assert):
      (InspectorTest.importInspectorScripts):
      * inspector-protocol/model/content-node-region-info-expected.txt: Added.
      * inspector-protocol/model/content-node-region-info.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160198 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0e035b16
  11. 04 Dec, 2013 5 commits
    • graouts@apple.com's avatar
      Web Inspector: ColorWheel uses old Color constructor · b0f03099
      graouts@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125260
      
      Reviewed by Joseph Pecoraro.
      
      Update to new WebInspector.Color constructor signature and use a clear color.
      
      * UserInterface/ColorWheel.js:
      (WebInspector.ColorWheel.prototype.get tintedColor):
      (WebInspector.ColorWheel.prototype.get rawColor):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160145 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b0f03099
    • graouts@apple.com's avatar
      Web Inspector: color picker doesn't work with "blue" · 93373a76
      graouts@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125262
      
      Reviewed by Joseph Pecoraro.
      
      Under certain circumstances rounding issues would have us compare
      two equal numbers that differ by 0.00000001 and sometime trip this
      if statement and yield a null color. We now add a little fudge to
      the test and also return a clear color rather than null to match what
      we do in the getters for "tintedColor" and "rawColor".
      
      * UserInterface/ColorWheel.js:
      (WebInspector.ColorWheel.prototype._colorAtPointWithBrightness):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160143 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      93373a76
    • graouts@apple.com's avatar
      Web Inspector: use only two decimals for opacity in rgba/hsla colors · 46c2c3d4
      graouts@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125261
      
      Reviewed by Joseph Pecoraro.
      
      * UserInterface/ColorPicker.js:
      (WebInspector.ColorPicker.prototype._updateColor):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160142 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      46c2c3d4
    • graouts@apple.com's avatar
      Web Inspector: "data detectors" menu on hover for actionable tokens · e3186aeb
      graouts@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124363
      
      Reviewed by Timothy Hatcher.
      
      Add a new WebInspector.HoverMenu class to display an overlay menu that is presented
      with respect to a target frame that it draws itself around adding a customizable
      action button to its right. The menu uses fade animations as it's presented and
      dismissed and a single delegation method is fired when the button is pressed. Finally,
      just like a popover, it automatically dismisses itself upon scrolling anywhere
      outside of its bounds.
      
      * UserInterface/HoverMenu.css: Added.
      * UserInterface/HoverMenu.js: Added.
      (WebInspector.HoverMenu):
      (WebInspector.HoverMenu.prototype.get element):
      (WebInspector.HoverMenu.prototype.dismiss):
      (WebInspector.HoverMenu.prototype.handleEvent):
      (WebInspector.HoverMenu.prototype._handleClickEvent):
      * UserInterface/Images/HoverMenuButton.png: Added.
      * UserInterface/Images/HoverMenuButton@2x.png: Added.
      * UserInterface/Main.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160134 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e3186aeb
    • graouts@apple.com's avatar
      Web Inspector: edited color should serialize back to original format when possible · 10e771e5
      graouts@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125244
      
      Reviewed by Joseph Pecoraro.
      
      Profoundly reworked WebInspector.Color to be more efficient and more flexible when
      serializing the color to the various supported formats.
      
      * UserInterface/CSSStyleDeclarationTextEditor.js:
      (WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches):
      Use new WebInspector.Color.fromString() factory and check for a null return value
      rather than an exception to identify invalid color tokens.
      
      * UserInterface/Color.js:
      (WebInspector.Color):
      Rewrote WebInspector.Color such that it would have, at all times, a canonical
      representation in terms of either RGBA or HSLA depending on the format used to
      create the color. The new constructor parameters lets the user pass a format
      and the RGBA or HSLA components, allowing to bypass the string-only creation
      system which was sub-optimal for the new color picker. Additionally, the toString()
      method now can provide the most accurate serialization of the color based on the
      provided format with a fallback mechanism to RGB/RGBA in cases where the desired
      format would incur a loss of fidelity. Finally, simplified the API to only feature
      essential features.
      
      (WebInspector.Color.fromString):
      New factory method used to create a color from a string.
      
      * UserInterface/ColorPicker.js:
      (WebInspector.ColorPicker.prototype.set color):
      Keep track of the original color format so that we can use it as the preferred format
      when serializing the updated color in _updateColor().
      
      (WebInspector.ColorPicker.prototype._updateColor):
      Use the original color format as the prefered formation for color serialization. Also,
      use the new WebInspector.Color constructor in lieu of the removed .fromRGBA factory.
      
      (WebInspector.ColorPicker.prototype._updateSliders):
      Use the new WebInspector.Color constructor in lieu of the removed .fromRGBA factory.
      
      * UserInterface/ColorWheel.js:
      (WebInspector.ColorWheel.prototype._colorAtPointWithBrightness):
      Use the new WebInspector.Color constructor in lieu of the removed .fromRGB factory.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160132 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      10e771e5
  12. 03 Dec, 2013 2 commits
    • seokju@webkit.org's avatar
      Web Inspector: Remove '_attachedWindowHeight' property in InspectorFrontendHostStub.js · 67edb213
      seokju@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=125204
      
      Reviewed by Timothy Hatcher.
      
      '_attachedWindowHeight' property is not used anywhere, so remove it.
      
      * UserInterface/InspectorFrontendHostStub.js:
      (.WebInspector.InspectorFrontendHostStub):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160066 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      67edb213
    • commit-queue@webkit.org's avatar
      Web Inspector: restore navigation panel state across reloads and reopens · 08ccc28b
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=122125
      
      Patch by Brian J. Burg <burg@cs.washington.edu> on 2013-12-03
      Reviewed by Timothy Hatcher.
      
      The previous strategy for restoring content views after inspector
      re-open did not consider the active sidebar and its selection, and
      tried to recreate the appropriate selection from the saved content
      view. However, doesn't work for tree elements in the sidebar panel
      that don't change views when selected, such as script breakpoints,
      special breakpoints, call stack, timeline sections, etc.
      
      This patch implements a new strategy that saves the navigation
      sidebar panel's view state by serializing the identity of the
      selected element's represented object. Relevant represented
      object classes implement the saveIdentityToCookie() method. Each
      represented object class also adds a TypeIdentifier property to
      its constructor, to aid inexact matching based on represented
      object type, rather than its complete identity.
      
      When restoring, the navigation sidebar attempts to match added
      tree elements against the pending cookie, and selects the element
      if it matches. A represented object matches if its serialized
      identity matches the previously saved serialized identity.
      
      The inspector view state is now only saved on the page hide event
      (for saving across reopen) and when the main frame commits its
      provisional load (for saving across same-page reloads). It
      consolidates similar view state settings into a single setting.
      
      * UserInterface/ApplicationCacheFrame.js:
      (WebInspector.ApplicationCacheFrame): Add cookie keys and type identifier.
      (WebInspector.ApplicationCacheFrame.prototype.saveIdentityToCookie): Added.
      * UserInterface/ApplicationCacheManager.js: remove objectForCookie().
      * UserInterface/Breakpoint.js:
      (WebInspector.Breakpoint): Add cookie keys and type identifier.
      (WebInspector.Breakpoint.prototype.saveIdentityToCookie):
      * UserInterface/CookieStorageObject.js:
      (WebInspector.CookieStorageObject.prototype.saveIdentityToCookie): Added.
      * UserInterface/DOMStorageObject.js:
      (WebInspector.DOMStorageObject): Add cookie keys and type identifier.
      (WebInspector.DOMStorageObject.prototype.saveIdentityToCookie): Added.
      * UserInterface/DatabaseObject.js:
      (WebInspector.DatabaseObject): Add cookie keys and type identifier.
      (WebInspector.DatabaseObject.prototype.saveIdentityToCookie): Added.
      * UserInterface/DatabaseTableObject.js:
      (WebInspector.DatabaseTableObject): Add cookie keys and type identifier.
      (WebInspector.DatabaseTableObject.prototype.saveIdentityToCookie): Added.
      * UserInterface/DebuggerSidebarPanel.js:
      (WebInspector.DebuggerSidebarPanel.prototype.saveStateToCookie): Added.
      (WebInspector.DebuggerSidebarPanel.prototype.restoreStateFromCookie): Added.
      * UserInterface/Frame.js:
      (WebInspector.Frame): Add cookie keys and type identifier.
      (WebInspector.Frame.prototype.saveIdentityToCookie): Added.
      * UserInterface/FrameResourceManager.js: remove objectForCookie().
      * UserInterface/InstrumentSidebarPanel.js:
      (WebInspector.InstrumentSidebarPanel.prototype.showTimelineForRecordType):
      Return the shown timeline, if any.
      
      (WebInspector.InstrumentSidebarPanel.prototype.saveStateToCookie): Added.
      (WebInspector.InstrumentSidebarPanel.prototype.restoreStateFromCookie): Added.
      (WebInspector.InstrumentSidebarPanel.prototype.showProfile):
      Return the shown profile, if any.
      
      * UserInterface/Main.js:
      (WebInspector): Added cookie keys for the selected sidebar and
      typeidentifier of the sidebar's selected tree element.
      
      (WebInspector.contentLoaded): Remove callbacks for
      resolveAndShowPendingContentViewCookie(). Consolidate all saved
      inspector view state into one Setting. Move special-cased
      restoring of the console to the restoration method. Move saving
      of last opened navigation panel to the saving method.
      
      (WebInspector._mainResourceDidChange): Try to restore saved view
      state when the main resource changes.
      
      (WebInspector._provisionalLoadCommitted): Update the saved view
      state when the navigation commits. This is the last chance to save
      it before the main resource changes and the navigation panel view
      state is discarded and rebuilt.
      
      (WebInspector._pageHidden): Update the saved view state when the
      inspector page is hidden, but before state is discarded.
      
      (WebInspector._navigationSidebarPanelSelected): Don't save last
      navigation sidebar panel.
      (WebInspector._updateCookieForInspectorViewState): Renamed from
      _updateCurrentContentViewCookie. It delegates view state
      serialization to the currently open navigation sidebar, rather
      than the current content view.
      
      (WebInspector._contentBrowserRepresentedObjectsDidChange): Don't
      spuriously serialize the current view state cookie on every
      ContentView change.
      
      (WebInspector._restoreInspectorViewStateFromCookie): Renamed from
      _showContentViewForCookie. It now restores a specific navigation
      panel and delegates remaining view state restoration to the panel
      itself. Last-resort selection of any tree element with the same
      type identifier was moved to the navigation panel's restore method.
      
      * UserInterface/NavigationSidebarPanel.js:
      (WebInspector.NavigationSidebarPanel):
      (WebInspector.NavigationSidebarPanel.prototype.set contentTreeOutline):
      (WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
      Save references to all created TreeOutlines in a Set, so we can
      restore any tree's selection.
      
      (WebInspector.NavigationSidebarPanel.prototype.saveStateToCookie):
      Added. Find the selected tree element from all tree outlines and
      ask it to serialize its identity.
      
      (WebInspector.NavigationSidebarPanel.prototype.restoreStateFromCookie):
      Added. Eagerly search existing tree elements for a matching
      representedObject. If none exists, save the pending cookie and
      schedule last-resort matching using the provided timeout interval.
      
      (WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
      Check if the added tree element matches a pending view state
      cookie, if one exists.
      
      (WebInspector.NavigationSidebarPanel.prototype.treeElementMatchesCookie):
      Added. Check if the tree element's representedObject matches the
      pending view state cookie.
      
      (WebInspector.NavigationSidebarPanel.prototype._checkElementsForPendingViewStateCookie):
      Added. For each provided tree element, check if the tree
      element's represented object produces the same serialized identity
      as the pending view state cookie that we are trying to resolve.
      If a match is found (possibly by relaxing to matching anything
      with the same type), select the tree element and clear both the
      pending view state cookie and last-resort selection timer.
      
      * UserInterface/Resource.js:
      (WebInspector.Resource): Add cookie keys and type identifier.
      (WebInspector.Resource.prototype.saveIdentityToCookie): Added.
      
      * UserInterface/ResourceClusterContentView.js:
      (WebInspector.ResourceClusterContentView.prototype.saveToCookie):
      (WebInspector.ResourceClusterContentView.prototype.restoreFromCookie):
      Since identity state is serialized by the representedObject, these
      methods only need to save view-specific state, such as the visible
      subview. Remove extraneous state.
      
      * UserInterface/Script.js:
      (WebInspector.Script): Add cookie keys and type identifier.
      (WebInspector.Script.prototype.saveIdentityToCookie): Added.
      * UserInterface/StorageManager.js: remove objectForCookie().
      * UserInterface/TimelineManager.js: remove objectForCookie().
      * UserInterface/TimelinesContentView.js:
      (WebInspector.TimelinesContentView.prototype.saveToCookie):
      (WebInspector.TimelinesContentView.prototype.restoreFromCookie):
      Since identity state is serialized by the representedObject, these
      methods only need to save view-specific state, such as the visible
      subview. Remove extraneous state.
      
      * UserInterface/TreeOutline.js: Add TreeOutline.prototype.constructor
      so other code can assume the constructor property exists.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160025 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      08ccc28b
  13. 02 Dec, 2013 2 commits
    • graouts@apple.com's avatar
      Web Inspector: popover can overlap target frame · 88f07961
      graouts@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125069
      
      Reviewed by Joseph Pecoraro.
      
      Fix a regression introduced in http://trac.webkit.org/changeset/159286. We should only
      offset the frame of the popover in the y-axis if the target edge is on the x-axis, and
      vice versa. We also remove the needsToDrawBackground check since it incorrectly disregarded
      the anchor point. We now always draw the background which is a lot safer and guarantees
      we'll always draw an adequate frame and anchor point.
      
      * UserInterface/Popover.js:
      (WebInspector.Popover.prototype._update):
      (WebInspector.Popover.prototype._bestMetricsForEdge):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159952 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      88f07961
    • graouts@apple.com's avatar
      Web Inspector: add a method to add padding around a WebInspector.Rect · 2a6f5934
      graouts@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125072
      
      Reviewed by Joseph Pecoraro.
      
      Add a new WebInspector.Rect.prototype.pad() method which does not alter
      the rectangle it's called and returns a new rect much like .inset(). I've
      checked all call sites and there was no reuse of the rectangle that was
      padded so this patch won't have any side effects.
      
      * UserInterface/Breakpoint.js:
      (WebInspector.Breakpoint.prototype._showEditBreakpointPopover):
      * UserInterface/CSSStyleDeclarationTextEditor.js:
      * UserInterface/Geometry.js:
      (WebInspector.Rect.prototype.pad):
      * UserInterface/LayerTreeSidebarPanel.js:
      (WebInspector.LayerTreeSidebarPanel.prototype._updatePopoverForSelectedNode):
      * UserInterface/SourceCodeTextEditor.js:
      (WebInspector.SourceCodeTextEditor.prototype._showPopover):
      * UserInterface/TimelineDataGrid.js:
      (WebInspector.TimelineDataGrid.prototype._updatePopoverForSelectedNode):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159946 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2a6f5934
  14. 26 Nov, 2013 1 commit
    • graouts@apple.com's avatar
      Web Inspector: Allow showing a context menu on all mouse events. · 05069040
      graouts@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124747
      
      Reviewed by Joseph Pecoraro.
      
      Source/WebCore:
      
      Add a new InspectorFrontendHost::dispatchEventAsContextMenuEvent(Event*) method
      to let the inspector front-end dispatch a native contextmenu event that will allow
      for a context menu to be shown from within a non-contextmenu event handler.
      
      * inspector/InspectorFrontendHost.cpp:
      (WebCore::InspectorFrontendHost::dispatchEventAsContextMenuEvent):
      Check that we're dealing with a mouse event, get the frame for the event target
      and the event's location to call ContextMenuController::showContextMenuAt()
      which will handle the new contextmenu event dispatch to the original event target.
      
      * inspector/InspectorFrontendHost.h:
      * inspector/InspectorFrontendHost.idl:
      
      Source/WebInspectorUI:
      
      Automatically dispatch a contextmenu event in case WebInspector.ContextMenu.prototype.show()
      is called outside of a contextmenu event handler and would therefore not show the expected
      context menu (except in the Remote Web Inspector where this already works).
      
      * UserInterface/ContextMenu.js:
      (WebInspector.ContextMenu.prototype.show):
      Check whether the event is a contextmenu event, and if not, add an event listener for a manually
      dispatched contextmenu event such that we may then call InspectorFrontendHost.showContextMenu()
      in a contextmenu event handler.
      
      (WebInspector.ContextMenu.prototype.handleEvent):
      Call InspectorFrontendHost.showContextMenu() now that we received the manually dispatched
      contextmenu event.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159780 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      05069040
  15. 25 Nov, 2013 2 commits
  16. 21 Nov, 2013 1 commit
    • mrowe@apple.com's avatar
      <https://webkit.org/b/124702> Stop overriding VALID_ARCHS. · 836db138
      mrowe@apple.com authored
      All modern versions of Xcode set it appropriately for our needs.
      
      Reviewed by Alexey Proskuryakov.
      
      Source/JavaScriptCore:
      
      * Configurations/Base.xcconfig:
      
      Source/WebCore:
      
      * Configurations/Base.xcconfig:
      
      Source/WebInspectorUI:
      
      * Configurations/Base.xcconfig:
      
      Source/WebKit/mac:
      
      * Configurations/Base.xcconfig:
      
      Source/WebKit2:
      
      * Configurations/Base.xcconfig:
      
      Tools:
      
      * MiniBrowser/Configurations/Base.xcconfig:
      * WebKitTestRunner/Configurations/Base.xcconfig:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159669 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      836db138
  17. 19 Nov, 2013 2 commits
  18. 18 Nov, 2013 2 commits
  19. 15 Nov, 2013 1 commit
    • graouts@apple.com's avatar
      Web Inspector: New color picker · d26f595c
      graouts@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124354
      
      Reviewed by Timothy Hatcher.
      
      Beginning of a new color picker. The focus of this new picker is to let you pick from
      a color wheel as the primary mean of color picking, with additional slider controls for
      the brightness and the opacity, better matching the default OS X color picker. This is the
      basis for a color picker that will evolve to support the following:
      
      - editable CSS value label (http://webkit.org/b/124356)
      - picking a color anywhere on screen (http://webkit.org/b/124357)
      - swatches based on other colors in page (http://webkit.org/b/124358)
      
      Note also that the color wheel has not been tested on Retina displays
      (see http://webkit.org/b/124355).
      
      * UserInterface/CSSColorPicker.css: Removed.
      * UserInterface/CSSColorPicker.js: Removed.
      Previous color picker, now removed in favor of the new ColorPicker class.
      
      * UserInterface/CSSStyleDeclarationTextEditor.js:
      Adopt new class name for the color picker, add a little padding to the popover
      target frame and set the base color after the picker has been presented.
      
      * UserInterface/Color.js:
      (WebInspector.Color.prototype._hslToRGB):
      Simplified math.
      
      (WebInspector.Color.rgb2hsv):
      (WebInspector.Color.hsv2rgb):
      New utilities to deal with HSV colors used in the ColorWheel.
      
      * UserInterface/ColorPicker.css: Added.
      
      * UserInterface/ColorPicker.js: Added.
      (WebInspector.ColorPicker):
      (WebInspector.ColorPicker.prototype.get element):
      (WebInspector.ColorPicker.prototype.set brightness):
      (WebInspector.ColorPicker.prototype.set opacity):
      (WebInspector.ColorPicker.prototype.get color):
      
      (WebInspector.ColorPicker.prototype.set color):
      We set the _dontUpdateColor flag here such that we don't attempt to
      notify about a color change at this point in case the selected color
      is too saturated to be represented accurately on the color wheel and
      we would end up changing the color by virtue of presenting the popover.
      
      (WebInspector.ColorPicker.prototype.colorWheelColorDidChange):
      (WebInspector.ColorPicker.prototype.sliderValueDidChange):
      (WebInspector.ColorPicker.prototype._updateColor):
      (WebInspector.ColorPicker.prototype._updateSliders):
      
      * UserInterface/ColorWheel.css: Added.
      
      * UserInterface/ColorWheel.js: Added.
      The ColorWheel makes use of three different <canvas> elements to draw itself.
      The "raw" canvas is used to draw the raw, un-tinted color wheel with poor
      aliasing. The "raw" canvas is only drawn when the dimension is changed.
      The "tinted" canvas is used to draw the "raw" canvas with a black overlay
      based on the brightness set on the wheel. The "final" canvas, the only <canvas>
      element attached to the DOM, is used to draw the "tinted" canvas into a circle
      clip of a slightly narrower radius so that the drawn image is visually more pleasing
      and can be displayed above virtually any background color.
      
      We use color math to generate the color wheel, courtesy of Dean Jackson, and also to
      figure out where to position the crosshair for the provided base color as well as
      the opposite operation where we get the color under the mouse pointer.
      
      The color wheel fires a single delegate method call colorWheelColorDidChange(colorWheel),
      the colors themselves being retrieved via the public properties tintedColor and rawColor.
      
      (WebInspector.ColorWheel):
      (WebInspector.ColorWheel.prototype.set dimension):
      (WebInspector.ColorWheel.prototype.get element):
      (WebInspector.ColorWheel.prototype.get brightness):
      (WebInspector.ColorWheel.prototype.set brightness):
      (WebInspector.ColorWheel.prototype.get tintedColor):
      (WebInspector.ColorWheel.prototype.set tintedColor):
      (WebInspector.ColorWheel.prototype.get rawColor):
      (WebInspector.ColorWheel.prototype.handleEvent):
      (WebInspector.ColorWheel.prototype._handleMousedown):
      (WebInspector.ColorWheel.prototype._handleMousemove):
      (WebInspector.ColorWheel.prototype._handleMouseup):
      (WebInspector.ColorWheel.prototype._pointInCircleForEvent):
      (WebInspector.ColorWheel.prototype._pointInCircleForEvent.angleFromCenterToPoint):
      (WebInspector.ColorWheel.prototype._pointInCircleForEvent.pointOnCircumference):
      (WebInspector.ColorWheel.prototype._updateColorForMouseEvent):
      (WebInspector.ColorWheel.prototype._setCrosshairPosition):
      (WebInspector.ColorWheel.prototype._tintedColorToPointAndBrightness):
      (WebInspector.ColorWheel.prototype._drawRawCanvas):
      (WebInspector.ColorWheel.prototype._colorAtPointWithBrightness):
      (WebInspector.ColorWheel.prototype._drawTintedCanvas):
      (WebInspector.ColorWheel.prototype._draw):
      
      * UserInterface/Images/SliderThumb.png: Added.
      * UserInterface/Images/SliderThumb@2x.png: Added.
      * UserInterface/Images/SliderThumbPressed.png: Added.
      * UserInterface/Images/SliderThumbPressed@2x.png: Added.
      Supporting artwork for the new Slider class.
      
      * UserInterface/Main.html:
      Remove the previous color picker class and add the new one, as well as the new Slider class.
      
      * UserInterface/Slider.css: Added.
      
      * UserInterface/Slider.js: Added.
      New slider to match the look of the sliders used in the native OS X color picker. The most
      interesting feature of these sliders is that they can be transformed using CSS in any way
      and will still operate correctly due to always converting the mouse coordinates in the page
      coordinate system to the coordinate system local to the backing element. For instance, the
      color picker uses two sliders transformed to be displayed vertically.
      
      As it stands these slides only support values between 0 and 1 and fire a single delegate
      method call sliderValueDidChange(slider, newValue).
      
      (WebInspector.Slider):
      (WebInspector.Slider.prototype.get element):
      (WebInspector.Slider.prototype.get value):
      (WebInspector.Slider.prototype.set value):
      (WebInspector.Slider.prototype.handleEvent):
      (WebInspector.Slider.prototype._handleMousedown):
      (WebInspector.Slider.prototype._handleMousemove):
      (WebInspector.Slider.prototype._handleMouseup):
      (WebInspector.Slider.prototype._localPointForEvent):
      (WebInspector.Slider.prototype.get _maxX):
      
      * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
      * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
      Update file names for the new color picker.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159332 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d26f595c