WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
198956
Web Inspector: Debug: "Reset Web Inspector" should also clear the saved window size and attachment side
https://bugs.webkit.org/show_bug.cgi?id=198956
Summary
Web Inspector: Debug: "Reset Web Inspector" should also clear the saved windo...
Devin Rousso
Reported
2019-06-17 22:42:16 PDT
# STEPS TO REPRODUCE: 1. inspect any page 2. change the Web Inspector window size/docking to be different than default 3. enable the debug settings panel (⌥⇧⌘D) 4. click "Reset Web Inspector" => Web Inspector window has the same size/docking as before the reset
Attachments
Patch
(38.51 KB, patch)
2019-06-18 16:02 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Patch
(39.37 KB, patch)
2019-06-18 16:27 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Patch
(39.15 KB, patch)
2019-06-18 17:33 PDT
,
Devin Rousso
mattbaker
: review+
Details
Formatted Diff
Diff
Patch
(39.13 KB, patch)
2019-07-02 00:13 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Devin Rousso
Comment 1
2019-06-18 16:02:54 PDT
Created
attachment 372400
[details]
Patch Lots of plumbing -.-
EWS Watchlist
Comment 2
2019-06-18 16:05:25 PDT
Comment hidden (obsolete)
Attachment 372400
[details]
did not pass style-queue: ERROR: Source/WebKitLegacy/cf/WebCoreSupport/WebInspectorClientCF.cpp:94: Use nullptr instead of NULL. [readability/null] [5] Total errors found: 1 in 46 files If any of these errors are false positives, please file a bug against check-webkit-style.
Devin Rousso
Comment 3
2019-06-18 16:27:41 PDT
Created
attachment 372403
[details]
Patch Looks like I missed a few platforms 😅
EWS Watchlist
Comment 4
2019-06-18 16:29:47 PDT
Comment hidden (obsolete)
Attachment 372403
[details]
did not pass style-queue: ERROR: Source/WebKitLegacy/cf/WebCoreSupport/WebInspectorClientCF.cpp:94: Use nullptr instead of NULL. [readability/null] [5] Total errors found: 1 in 46 files If any of these errors are false positives, please file a bug against check-webkit-style.
Joseph Pecoraro
Comment 5
2019-06-18 16:37:15 PDT
Comment on
attachment 372403
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=372403&action=review
> Source/WebCore/inspector/InspectorFrontendHost.cpp:203 > + if (m_client) > + m_client->resetWindowState();
Perhaps this should be `m_client->reset()` or `resetState()`? What if some non-window state creeps in, we would still want to reset it here.
> Source/WebKit/UIProcess/mac/RemoteWebInspectorProxyMac.mm:128 > + [m_window removeFrameUsingName:@"WKRemoteWebInspectorWindowFrame"];
The magic string should be shared in this file (perhaps a file static const) to ensure no chance of changing one without the other.
> Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.h:86 > + void deleteInspectorStartsAttached();
Why two calls? I seem unlikely that one will be called without the other.
> Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm:267 > + [m_frontendWindowController.get() setWindowFrameAutosaveName:@"Web Inspector 2"];
Ditto: magic string.
Devin Rousso
Comment 6
2019-06-18 16:59:53 PDT
Comment on
attachment 372403
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=372403&action=review
>> Source/WebCore/inspector/InspectorFrontendHost.cpp:203 >> + m_client->resetWindowState(); > > Perhaps this should be `m_client->reset()` or `resetState()`? What if some non-window state creeps in, we would still want to reset it here.
I'd hope that all non-window state is held in the frontend, but good point in case not :)
>> Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.h:86 >> + void deleteInspectorStartsAttached(); > > Why two calls? I seem unlikely that one will be called without the other.
I wanted to match the "flexibility" of having each be separate. Not to mention, there was already a getter/setter specifically for each, so I continued that "pattern".
Devin Rousso
Comment 7
2019-06-18 17:33:49 PDT
Created
attachment 372412
[details]
Patch
EWS Watchlist
Comment 8
2019-06-18 17:38:32 PDT
Comment hidden (obsolete)
Attachment 372412
[details]
did not pass style-queue: ERROR: Source/WebKitLegacy/cf/WebCoreSupport/WebInspectorClientCF.cpp:94: Use nullptr instead of NULL. [readability/null] [5] Total errors found: 1 in 46 files If any of these errors are false positives, please file a bug against check-webkit-style.
Devin Rousso
Comment 9
2019-06-18 22:04:20 PDT
Comment on
attachment 372412
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=372412&action=review
> Source/WebInspectorUI/UserInterface/Base/Main.js:3229 > +WI.reset = async function()
This was moved into Main.js primarily to make an easier way of resetting non-engineering builds (assuming you have "access" to inspector2).
Matt Baker
Comment 10
2019-07-01 21:25:26 PDT
Comment on
attachment 372412
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=372412&action=review
r=me, looks like you addressed Joe's comments.
> Source/WebKitLegacy/cf/WebCoreSupport/WebInspectorClientCF.cpp:94 > + CFPreferencesSetAppValue(createKeyForPreferences(key).get(), NULL, kCFPreferencesCurrentApplication);
You can pass nullptr for the CFPropertyListRef argument. Should fix the [style] error.
Devin Rousso
Comment 11
2019-07-02 00:13:51 PDT
Created
attachment 373309
[details]
Patch
WebKit Commit Bot
Comment 12
2019-07-02 00:47:20 PDT
Comment on
attachment 373309
[details]
Patch Clearing flags on attachment: 373309 Committed
r247043
: <
https://trac.webkit.org/changeset/247043
>
WebKit Commit Bot
Comment 13
2019-07-02 00:47:22 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 14
2019-07-02 00:48:18 PDT
<
rdar://problem/52508508
>
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