WebKit Bugzilla
Attachment 356262 Details for
Bug 192266
: Web Inspector: Styles: can't select properties of read-only rules
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
patch.txt (text/plain), 6.08 KB, created by
Nikita Vasilyev
on 2018-11-30 16:50:26 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Nikita Vasilyev
Created:
2018-11-30 16:50:26 PST
Size:
6.08 KB
patch
obsolete
>diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index 55e1def1224..c8a142b539b 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,28 @@ >+2018-11-30 Nikita Vasilyev <nvasilyev@apple.com> >+ >+ Web Inspector: Styles: can't select properties of read-only rules >+ https://bugs.webkit.org/show_bug.cgi?id=192266 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Implement multiple properties selection for read-only rules (such as User Agent Stylesheets) >+ in the Styles panel. >+ >+ * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js: >+ (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.initialLayout): >+ (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout): >+ Keep selection on layout. >+ >+ (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyBlur): >+ (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyMouseEnter): >+ SpreadsheetCSSStyleDeclarationEditor is used by ComputedStyleDetailsPanel, which doesn't have: >+ - spreadsheetCSSStyleDeclarationEditorPropertyBlur >+ - spreadsheetCSSStyleDeclarationEditorPropertyMouseEnter >+ >+ * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js: >+ (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout): >+ * UserInterface/Views/SpreadsheetStyleProperty.js: >+ > 2018-11-30 Nikita Vasilyev <nvasilyev@apple.com> > > Web Inspector: Jumping from Computed to Styles should select property >diff --git a/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js b/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js >index 6a14d9fda9c..bb5c895c520 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js >+++ b/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js >@@ -56,7 +56,7 @@ WI.SpreadsheetCSSStyleDeclarationEditor = class SpreadsheetCSSStyleDeclarationEd > > initialLayout() > { >- if (!this._style || !this._style.editable) >+ if (!this._style) > return; > > this.element.addEventListener("focus", () => { this.focused = true; }, true); >@@ -110,6 +110,9 @@ WI.SpreadsheetCSSStyleDeclarationEditor = class SpreadsheetCSSStyleDeclarationEd > > if (!isNaN(this._pendingAddBlankPropertyIndexOffset)) > this.addBlankProperty(this._propertyViews.length - 1 - this._pendingAddBlankPropertyIndexOffset); >+ >+ if (this.hasSelectedProperties()) >+ this.selectProperties(this._anchorIndex, this._focusIndex); > } > > detached() >@@ -389,12 +392,14 @@ WI.SpreadsheetCSSStyleDeclarationEditor = class SpreadsheetCSSStyleDeclarationEd > if (this._suppressBlur) > return; > >- this._delegate.spreadsheetCSSStyleDeclarationEditorPropertyBlur(event, property); >+ if (this._delegate.spreadsheetCSSStyleDeclarationEditorPropertyBlur) >+ this._delegate.spreadsheetCSSStyleDeclarationEditorPropertyBlur(event, property); > } > > spreadsheetStylePropertyMouseEnter(event, property) > { >- this._delegate.spreadsheetCSSStyleDeclarationEditorPropertyMouseEnter(event, property); >+ if (this._delegate.spreadsheetCSSStyleDeclarationEditorPropertyMouseEnter) >+ this._delegate.spreadsheetCSSStyleDeclarationEditorPropertyMouseEnter(event, property); > } > > spreadsheetStylePropertyFocusMoved(propertyView, {direction, willRemoveProperty}) >diff --git a/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js b/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js >index 18c311139b1..d4f7dbc4eef 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js >+++ b/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js >@@ -102,9 +102,10 @@ WI.SpreadsheetCSSStyleDeclarationSection = class SpreadsheetCSSStyleDeclarationS > else if (!this._style.ownerRule) > this._element.classList.add("selector-locked"); > >+ this.element.addEventListener("mousedown", this._handleMouseDown.bind(this)); >+ > if (this._style.editable) { > this.element.addEventListener("click", this._handleClick.bind(this)); >- this.element.addEventListener("mousedown", this._handleMouseDown.bind(this)); > > new WI.KeyboardShortcut(WI.KeyboardShortcut.Modifier.CommandOrControl, "S", this._save.bind(this), this._element); > new WI.KeyboardShortcut(WI.KeyboardShortcut.Modifier.CommandOrControl | WI.KeyboardShortcut.Modifier.Shift, "S", this._save.bind(this), this._element); >diff --git a/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js b/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js >index 99b6b2b1e0a..ecc078f7054 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js >+++ b/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js >@@ -50,15 +50,17 @@ WI.SpreadsheetStyleProperty = class SpreadsheetStyleProperty extends WI.Object > property.addEventListener(WI.CSSProperty.Event.OverriddenStatusChanged, this.updateStatus, this); > property.addEventListener(WI.CSSProperty.Event.Changed, this.updateStatus, this); > >- if (this._isEditable()) { >+ if (!this._readOnly) { > this._element.tabIndex = -1; > > this._element.addEventListener("blur", (event) => { >- this._delegate.spreadsheetStylePropertyBlur(event, this); >+ if (this._delegate.spreadsheetStylePropertyBlur) >+ this._delegate.spreadsheetStylePropertyBlur(event, this); > }); > > this._element.addEventListener("mouseenter", (event) => { >- this._delegate.spreadsheetStylePropertyMouseEnter(event, this); >+ if (this._delegate.spreadsheetStylePropertyMouseEnter) >+ this._delegate.spreadsheetStylePropertyMouseEnter(event, this); > }); > > this._element.copyHandler = this;
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
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192266
:
356262
|
356263
|
356269
|
356305
|
356391