WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
179211
Web Inspector: Move Show Compositing Borders/Paint Flashing buttons from Elements tab to Layers tab
https://bugs.webkit.org/show_bug.cgi?id=179211
Summary
Web Inspector: Move Show Compositing Borders/Paint Flashing buttons from Elem...
Ross Kirsling
Reported
2017-11-02 16:44:33 PDT
As the new home for compositing layer-related information, the nav bar toggle buttons for the Compositing Borders and Paint Flashing page overlays should be moved to the Layers tab.
Attachments
Patch
(11.27 KB, patch)
2017-11-03 12:15 PDT
,
Ross Kirsling
no flags
Details
Formatted Diff
Diff
Patch
(7.34 KB, patch)
2017-11-03 13:12 PDT
,
Ross Kirsling
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Ross Kirsling
Comment 1
2017-11-03 12:15:22 PDT
Created
attachment 325930
[details]
Patch
Joseph Pecoraro
Comment 2
2017-11-03 12:35:53 PDT
Comment on
attachment 325930
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=325930&action=review
r- just because I want to see an updated patch. The Layers ContentView changes look good to me.
> Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js:34 > + if (!WI.settings.experimentalEnableLayersTab.value) {
Sometimes, to make things less error prone, we just always create the properties and only make them show up in the UI based on settings. This makes the code more resilient (someone might try to use this._compositingBordersButtonNavigationItem and forget that its only sometimes available). For example here you probably want to listen for a change in the WI.settings.experimentalEnableLayersTab.value setting value and dispatch an update to our navigation items. (up to you really, but that would be the most appropriate thing to do).
> Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js:136 > + if (!WI.settings.experimentalEnableLayersTab.value) > + this._updateCompositingBordersButtonToMatchPageSettings();
Regardless of what you decide to above, you should put the bail inside of _updateCompositingBordersButtonToMatchPageSettings, not at the callsite, because if someone adds a new callsite they might forget to add the check.
> Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js:157 > + if (!WI.settings.experimentalEnableLayersTab.value) > + WI.showPaintRectsSetting.removeEventListener(null, null, this);
Here is a case where unambiguously adding an event listener and removing an event listener would be a win. If the setting's value changes throughout the lifetime of this view being opened / closed, then we can have an add without a remove, or a remove without an add.
Ross Kirsling
Comment 3
2017-11-03 13:12:11 PDT
Created
attachment 325941
[details]
Patch
Joseph Pecoraro
Comment 4
2017-11-03 13:27:50 PDT
Comment on
attachment 325941
[details]
Patch r=me
WebKit Commit Bot
Comment 5
2017-11-03 14:53:45 PDT
Comment on
attachment 325941
[details]
Patch Clearing flags on attachment: 325941 Committed
r224434
: <
https://trac.webkit.org/changeset/224434
>
WebKit Commit Bot
Comment 6
2017-11-03 14:53:47 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7
2017-11-15 12:21:03 PST
<
rdar://problem/35567364
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug