WebKit Bugzilla
Attachment 361542 Details for
Bug 193305
: Web Inspector: Styles: easier way to select a single line
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
patch.txt (text/plain), 3.44 KB, created by
Nikita Vasilyev
on 2019-02-08 15:30:36 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Nikita Vasilyev
Created:
2019-02-08 15:30:36 PST
Size:
3.44 KB
patch
obsolete
>diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index aae175a9202..ea644cef2bb 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,18 @@ >+2019-02-08 Nikita Vasilyev <nvasilyev@apple.com> >+ >+ Web Inspector: Styles: easier way to select a single line >+ https://bugs.webkit.org/show_bug.cgi?id=193305 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Start property selection if mouse cursor moved more than 8px after mousedown. >+ >+ * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js: >+ (WI.SpreadsheetCSSStyleDeclarationSection): >+ (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown): >+ (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleWindowMouseMove): Added. >+ (WI.SpreadsheetCSSStyleDeclarationSection.prototype._stopSelection): >+ > 2019-02-08 Nikita Vasilyev <nvasilyev@apple.com> > > Web Inspector: Styles: close unbalanced quotes and parenthesis when editing values >diff --git a/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js b/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js >index 6fa142d2a27..2a4bbe7b6fa 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js >+++ b/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js >@@ -45,6 +45,8 @@ WI.SpreadsheetCSSStyleDeclarationSection = class SpreadsheetCSSStyleDeclarationS > > this._isMousePressed = false; > this._mouseDownIndex = NaN; >+ >+ this._boundHandleWindowMouseMove = this._handleWindowMouseMove.bind(this); > } > > // Public >@@ -404,8 +406,11 @@ WI.SpreadsheetCSSStyleDeclarationSection = class SpreadsheetCSSStyleDeclarationS > let propertyIndex = parseInt(propertyElement.dataset.propertyIndex); > if (event.shiftKey && this._propertiesEditor.hasSelectedProperties()) > this._propertiesEditor.extendSelectedProperties(propertyIndex); >- else >+ else { > this._propertiesEditor.deselectProperties(); >+ this._mouseDownPoint = WI.Point.fromEvent(event); >+ window.addEventListener("mousemove", this._boundHandleWindowMouseMove, false); >+ } > > if (propertyElement.parentNode) { > this._mouseDownIndex = propertyIndex; >@@ -423,6 +428,18 @@ WI.SpreadsheetCSSStyleDeclarationSection = class SpreadsheetCSSStyleDeclarationS > this._stopSelection(); > } > >+ _handleWindowMouseMove(event) >+ { >+ console.assert(this._mouseDownPoint); >+ if (WI.Point.fromEvent(event).distance(this._mouseDownPoint) > 8) { >+ if (!this._propertiesEditor.hasSelectedProperties()) >+ this._propertiesEditor.selectProperties(this._mouseDownIndex, this._mouseDownIndex); >+ >+ window.removeEventListener("mousemove", this._boundHandleWindowMouseMove, false); >+ this._mouseDownPoint = null; >+ } >+ } >+ > _handleClick(event) > { > this._stopSelection(); >@@ -457,6 +474,9 @@ WI.SpreadsheetCSSStyleDeclarationSection = class SpreadsheetCSSStyleDeclarationS > this._isMousePressed = false; > this._mouseDownIndex = NaN; > this._element.classList.remove("selecting"); >+ >+ window.removeEventListener("mousemove", this._boundHandleWindowMouseMove, false); >+ this._mouseDownPoint = null; > } > > _highlightNodesWithSelector()
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
hi
:
review+
hi
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193305
:
358823
|
361542
|
361544
|
361570
|
361571