1. 13 Aug, 2013 1 commit
  2. 11 Aug, 2013 1 commit
    • dino@apple.com's avatar
      Bootstrap canvas profiler · 31858a66
      dino@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=119652
      <rdar://problem/14703665>
      
      Reviewed by Joseph Pecoraro.
      
      Add enough to get an empty Canvas profile recording
      and displayed.
      
      * Localizations/en.lproj/localizedStrings.js: Add canvas strings.
      * UserInterface/CanvasProfileObject.js: Added. Mostly copied from CSS Selector Profiles.
      * UserInterface/CanvasProfileType.js: Added. Ditto.
      * UserInterface/CanvasDataGridNode.js: Added. Ditto.
      * UserInterface/CanvasProfileView.js: Added. Ditto.
      * UserInterface/ContentView.js:
      (WebInspector.ContentView): Add support for the new View type.
      (WebInspector.ContentView.isViewable):
      * UserInterface/InstrumentSidebarPanel.js:
      (WebInspector.InstrumentSidebarPanel): Add support for canvas profiles.
      (WebInspector.InstrumentSidebarPanel.prototype._recordProfileGlyphMousedOver):
      (WebInspector.InstrumentSidebarPanel.prototype._recordProfileGlyphMousedDown):
      (WebInspector.InstrumentSidebarPanel.prototype._recordProfileGlyphClicked):
      (WebInspector.InstrumentSidebarPanel.prototype._profileTypeWasSelected):
      (WebInspector.InstrumentSidebarPanel.prototype._profilesCleared):
      * UserInterface/Main.html: Load the new files.
      * UserInterface/ProfileManager.js: New methods and support for canvas profiles.
      (WebInspector.ProfileManager):
      (WebInspector.ProfileManager.prototype.initialize):
      (WebInspector.ProfileManager.prototype.isProfilingCanvas):
      (WebInspector.ProfileManager.prototype.startProfilingCanvas):
      (WebInspector.ProfileManager.prototype.stopProfilingCanvas):
      (WebInspector.ProfileManager.prototype._checkForInterruptions):
      (WebInspector.ProfileManager.prototype._attemptToResumeProfiling):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153928 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      31858a66
  3. 24 Jul, 2013 1 commit
    • graouts@apple.com's avatar
      Web Inspector: support click-and-drag editing of CSS numeric values · 930aea84
      graouts@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=118896
      
      Reviewed by Timothy Hatcher.
      
      Add support for adjustment of numeric values in the various CodeMirror editors
      by holding the option key and dragging the mouse. By default, dragging one pixel
      changes the value by 1, but key modifiers allow to customize that behavior by using
      the control key to change the value to 0.1 and the shift key to change the value to 10.
      
      * UserInterface/CodeMirrorAdditions.js:
      Split adjustNumber() into two methods such that we may use its logic from the
      CodeMirrorDragToAlterNumberController. The new method, CodeMirror.prototype.alterNumberInRange()
      allow to set begin and end CodeMirror positions such that the existing alterNumber()
      can use information based on the current cursor position, and CodeMirrorDragToAlterNumberController
      can use information based on the hovered token.
      
      * UserInterface/CodeMirrorDragToAlterNumberController.css: Added.
      (.CodeMirror.drag-to-adjust .CodeMirror-lines):
      Set the cursor to "col-resize" when a number token is hovered and the option key
      modifier is pressed.
      
      * UserInterface/CodeMirrorDragToAlterNumberController.js: Added.
      (WebInspector.CodeMirrorDragToAlterNumberController):
      We define the new "dragToAdjustNumbers" CodeMirror option.
      
      (WebInspector.CodeMirrorDragToAlterNumberController.prototype.set enabled):
      The "enabled" property controls whether the associated CodeMirror instance
      may act upon hovering numeric values to adjust them via a drag interaction.
      
      (WebInspector.CodeMirrorDragToAlterNumberController.prototype.handleEvent):
      Proxy for various event-specific methods to deal with mouse events. We also bind
      the value of the "active" property to the "mouseenter" and "mouseleave" events
      if we're not currently dragging-to-adjust.
      
      (WebInspector.CodeMirrorDragToAlterNumberController.prototype._setActive):
      The "active" property is set when the mouse is over the associated CodeMirror
      editor and when it's on we track all "mousemove" events such that we may
      identify tokens containing numeric values. We also start tracking changes to the
      option modifier key press state such that we may change the cursor accordingly.
      We ensure that the CodeMirror instance is not read-only such that we don't
      allow adjustment of numeric values in places where they couldn't be committed.
      
      (WebInspector.CodeMirrorDragToAlterNumberController.prototype._setDragging):
      The "dragging" property reflects whether a dragging-to-adjust interaction
      is underway. We call into WebInspector.elementDragStart() and WebInspector.elementDragEnd()
      to set the cursor to "col-resize" for the whole document while tracking mousemove
      and mouseup events at the window level such that we can drag-to-adjust even outside
      of the inspector window.
      
      (WebInspector.CodeMirrorDragToAlterNumberController.prototype._setTracksMouseClickAndDrag):
      The "tracksMouseClickAndDrag" property is set to true whenever the controller
      has detected that a token containing a numeric value is being hovered and the
      option modifier key is pressed. This property controls the cursor value for the
      hovered token to reflect that a drag-to-adjust interaction is allowed and tracks
      "mousedown" events for when a dragging interaction may be initiated.
      
      (WebInspector.CodeMirrorDragToAlterNumberController.prototype._modifiersDidChange):
      Sets the "tracksMouseClickAndDrag" property depending on the availability of a hovered
      token containing a numeric value and the pressed state of the option modified key.
      
      (WebInspector.CodeMirrorDragToAlterNumberController.prototype._mouseMoved):
      Handles "mousemove" events when we're not in the "dragging" state such that we
      check the currently hovered token, if any, to see if it contains a number that
      we may drag-to-adjust. Subsequently, we may enter the "tracksMouseClickAndDrag"
      state.
      
      (WebInspector.CodeMirrorDragToAlterNumberController.prototype._mouseWasPressed):
      Handles "mousedown" events during a drag-to-adjust interaction. We simply track
      the current mouse position in the x-axis and enter the "dragging" state.
      
      (WebInspector.CodeMirrorDragToAlterNumberController.prototype._mouseWasDragged):
      Handles "mousemove" events when we are in the "dragging" state. We compare the
      current mouse position in the x-axis with the last recoreded value and determine
      the amount by which we should adjust the value, taking into account the shift and
      control modifier keys. We then call into WebInspector.alterNumberInRange() to
      apply the change amount to the associated CodeMirror editor.
      
      (WebInspector.CodeMirrorDragToAlterNumberController.prototype._mouseWasReleased):
      Handles "mouseup" events, simply exiting the "dragging" state and resetting other
      parameters we would have customized as a result of the drag-to-adjust interaction.
      
      (WebInspector.CodeMirrorDragToAlterNumberController.prototype._reset):
      Resetting some parameters we would have customized as a result of the drag-to-adjust
      interaction.
      
      * UserInterface/Main.html:
      Include the new CodeMirrorDragToAlterNumberController.{js|css} files.
      
      * UserInterface/Main.js:
      (WebInspector.elementDragStart):
      (WebInspector.elementDragEnd):
      Add an extra parameter to elementDragStart() such that the caller may specify the event
      target for the "mousemove" and "mouseup" events.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      930aea84
  4. 23 Jul, 2013 1 commit
    • commit-queue@webkit.org's avatar
      WebSocket initialization to use remote inspector · 25ed15c5
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=118678
      
      Patch by Roland Takacs <rtakacs@inf.u-szeged.hu> on 2013-07-23
      Reviewed by Timothy Hatcher.
      
      Add WebSocket initialization and define a 'connect-src' directive in the
      Content-Security-Policy HTTP header to enable the connection.
      
      * UserInterface/InspectorFrontendHostStub.js:
      (.WebInspector.InspectorFrontendHostStub.prototype.sendMessageToBackend):
      * UserInterface/Main.html:
      * UserInterface/Main.js:
      (WebInspector.loaded):
      (WebInspector._initializeWebSocketIfNeeded.createSocket.WebInspector):
      (WebInspector._initializeWebSocketIfNeeded.createSocket):
      (WebInspector._initializeWebSocketIfNeeded):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153044 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      25ed15c5
  5. 16 Jul, 2013 1 commit
    • commit-queue@webkit.org's avatar
      Web Inspector: InspectorFrontendHost is undefined · 79bf00d5
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=118715
      
      Patch by Seokju Kwon <seokju.kwon@gmail.com> on 2013-07-16
      Reviewed by Timothy Hatcher.
      
      Add InspectorFrontendHostStub.js to New Inspector because of the InspectorFrontendHost initialization.
      
      * UserInterface/InspectorFrontendHostStub.js: Added.
      (.WebInspector.InspectorFrontendHostStub):
      (.WebInspector.InspectorFrontendHostStub.prototype.platform):
      (.WebInspector.InspectorFrontendHostStub.prototype.port):
      (.WebInspector.InspectorFrontendHostStub.prototype.bringToFront):
      (.WebInspector.InspectorFrontendHostStub.prototype.closeWindow):
      (.WebInspector.InspectorFrontendHostStub.prototype.requestSetDockSide):
      (.WebInspector.InspectorFrontendHostStub.prototype.setAttachedWindowHeight):
      (.WebInspector.InspectorFrontendHostStub.prototype.setAttachedWindowWidth):
      (.WebInspector.InspectorFrontendHostStub.prototype.setToolbarHeight):
      (.WebInspector.InspectorFrontendHostStub.prototype.moveWindowBy):
      (.WebInspector.InspectorFrontendHostStub.prototype.loaded):
      (.WebInspector.InspectorFrontendHostStub.prototype.localizedStringsURL):
      (.WebInspector.InspectorFrontendHostStub.prototype.inspectedURLChanged):
      (.WebInspector.InspectorFrontendHostStub.prototype.copyText):
      (.WebInspector.InspectorFrontendHostStub.prototype.openInNewTab):
      (.WebInspector.InspectorFrontendHostStub.prototype.canSave):
      (.WebInspector.InspectorFrontendHostStub.prototype.save):
      (.WebInspector.InspectorFrontendHostStub.prototype.append):
      (.WebInspector.InspectorFrontendHostStub.prototype.close.cleanup):
      (.WebInspector.InspectorFrontendHostStub.prototype.close):
      (.WebInspector.InspectorFrontendHostStub.prototype.sendMessageToBackend):
      (.WebInspector.InspectorFrontendHostStub.prototype.loadResourceSynchronously):
      * UserInterface/Main.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152749 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      79bf00d5
  6. 27 Jun, 2013 1 commit
    • commit-queue@webkit.org's avatar
      Web Inspector: Display color picker in popover on color swatch click · 9848b0bb
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=117919
      
      Patch by Matthew Holden <jftholden@yahoo.com> on 2013-06-27
      Reviewed by Timothy Hatcher.
      
      Includes fixes from second code review.
      
      * Localizations/en.lproj/localizedStrings.js:
      * UserInterface/CSSColorPicker.css: Added.
      (.colorpicker-container):
      (.colorpicker-fill-parent):
      (.colorpicker-top):
      (.colorpicker-color):
      (.colorpicker-bottom span):
      (.colorpicker-text):
      (.colorpicker-color-text-value):
      (.colorpicker-hue):
      (.colorpicker-fill):
      (.colorpicker-range-container):
      (.colorpicker-range-container *):
      (.colorpicker-range-container label):
      (.colorpicker-range-container input):
      (.colorpicker-saturation):
      (.colorpicker-value):
      (.colorpicker-dragger):
      (.colorpicker-slider):
      (.colorpicker-container .swatch):
      (.colorpicker-container .swatch-inner):
      * UserInterface/CSSColorPicker.js: Added.
      (WebInspector.CSSColorPicker.consume):
      (WebInspector.CSSColorPicker.move):
      (WebInspector.CSSColorPicker.start):
      (WebInspector.CSSColorPicker.stop):
      (WebInspector.CSSColorPicker.makeDraggable):
      (WebInspector.CSSColorPicker.hueDrag):
      (WebInspector.CSSColorPicker.colorDragStart):
      (WebInspector.CSSColorPicker.colorDrag):
      (WebInspector.CSSColorPicker.alphaDrag):
      (WebInspector.CSSColorPicker.colorSwatchClicked):
      (WebInspector.CSSColorPicker):
      (WebInspector.CSSColorPicker.prototype.get element):
      (WebInspector.CSSColorPicker.prototype.set color):
      (WebInspector.CSSColorPicker.prototype.get color):
      (WebInspector.CSSColorPicker.prototype.get outputColorFormat):
      (WebInspector.CSSColorPicker.prototype.get colorHueOnly):
      (WebInspector.CSSColorPicker.prototype.set displayText):
      (WebInspector.CSSColorPicker.prototype.shown):
      (WebInspector.CSSColorPicker.prototype._updateHelperLocations):
      (WebInspector.CSSColorPicker.prototype._updateDisplay):
      (WebInspector.CSSColorPicker.hsvaToRGBA):
      (WebInspector.CSSColorPicker.rgbaToHSVA):
      * UserInterface/CSSStyleDeclarationTextEditor.js:
      (WebInspector.CSSStyleDeclarationTextEditor.prototype.didDismissPopover):
      (WebInspector.CSSStyleDeclarationTextEditor.prototype.):
      (WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches):
      (WebInspector.CSSStyleDeclarationTextEditor.prototype.event.newColorText.colorTextMarker):
      (WebInspector.CSSStyleDeclarationTextEditor.prototype.event.newColorText):
      * UserInterface/Main.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152092 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9848b0bb
  7. 11 Jun, 2013 1 commit