|
|
Chromium Code Reviews|
Created:
4 years, 1 month ago by estark Modified:
4 years ago Reviewers:
dgozman CC:
chromium-reviews, caseq+blink_chromium.org, jam, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, blink-reviews, darin-cc_chromium.org, pfeldman, kozyatinskiy+blink_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionDo not prompt for reload when security panel is opened on an interstitial
Because interstitials are not real navigations, the security panel
sidebar doesn't work properly for an interstitial, and also doesn't
provide that much more useful information than what's shown in the
Overview view. For this reason, we were already hiding the origins
sidebar when you navigate to an interstitial while the security panel is
open. This CL extends that behavior to when you open DevTools while an
interstitial is already showing.
As a drive-by, this CL also fixes a bug where requests that finished after
the interstitial was shown would still show up in the sidebar.
Also note that this CL only partially addresses the linked bug. This CL
removes the confusing/useless prompt to reload, but doesn't fix the fact
that refreshing on an interstitial does weird things (sends you back to
the previous page). The latter weirdness has been split into
https://crbug.com/669316.
BUG=637299
TEST=Navigate to https://expired.badssl.com. Open the DevTools security
panel. Observe that there is no prompt to reload in the sidebar.
Committed: https://crrev.com/f8d89eaf15d68b685f1d1e0503a2057df1082a75
Cr-Commit-Position: refs/heads/master@{#434887}
Patch Set 1 #
Total comments: 1
Patch Set 2 : remove stray console.log #
Total comments: 1
Patch Set 3 : dgozman suggestion #
Total comments: 2
Patch Set 4 : remove isInterstitialShowing setter #
Messages
Total messages: 29 (17 generated)
The CQ bit was checked by estark@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Do not prompt for reload when security panel is opened on an interstitial Because interstitials are not real navigations, the security panel sidebar doesn't work properly for an interstitial, and also doesn't provide that much more useful information than what's shown in the Overview view. For this reason, we were already hiding the origins sidebar when you navigate to an interstitial while the security panel is open. This CL extends that behavior to when you open DevTools while an interstitial is already showing. To do so, we attach an interstitialIsShowing boolean to the securityStateChanged event which gets sent to the security panel when it's opened. Note that we still need to listen for interstitials shown/hidden while the security panel is open and we can't rely on the securityStateChanged event to hear about those interstitials, because there's no guarantee that a securityStateChanged event will be sent when an interstitial attaches. Also note that this CL only partially addresses the bug; it removes the confusing/useless prompt to reload, but doesn't fix the fact that refreshing on an interstitial sends you back to the previous page. BUG=637299 ========== to ========== Do not prompt for reload when security panel is opened on an interstitial Because interstitials are not real navigations, the security panel sidebar doesn't work properly for an interstitial, and also doesn't provide that much more useful information than what's shown in the Overview view. For this reason, we were already hiding the origins sidebar when you navigate to an interstitial while the security panel is open. This CL extends that behavior to when you open DevTools while an interstitial is already showing. To do so, we attach an interstitialIsShowing boolean to the securityStateChanged event which gets sent to the security panel when it's opened. Note that we still need to listen for interstitials shown/hidden while the security panel is open and we can't rely on the securityStateChanged event to hear about those interstitials, because there's no guarantee that a securityStateChanged event will be sent when an interstitial attaches. Also note that this CL only partially addresses the linked bug. This CL removes the confusing/useless prompt to reload, but doesn't fix the fact that refreshing on an interstitial does weird things (sends you back to the previous page). BUG=637299 ==========
Description was changed from ========== Do not prompt for reload when security panel is opened on an interstitial Because interstitials are not real navigations, the security panel sidebar doesn't work properly for an interstitial, and also doesn't provide that much more useful information than what's shown in the Overview view. For this reason, we were already hiding the origins sidebar when you navigate to an interstitial while the security panel is open. This CL extends that behavior to when you open DevTools while an interstitial is already showing. To do so, we attach an interstitialIsShowing boolean to the securityStateChanged event which gets sent to the security panel when it's opened. Note that we still need to listen for interstitials shown/hidden while the security panel is open and we can't rely on the securityStateChanged event to hear about those interstitials, because there's no guarantee that a securityStateChanged event will be sent when an interstitial attaches. Also note that this CL only partially addresses the linked bug. This CL removes the confusing/useless prompt to reload, but doesn't fix the fact that refreshing on an interstitial does weird things (sends you back to the previous page). BUG=637299 ========== to ========== Do not prompt for reload when security panel is opened on an interstitial Because interstitials are not real navigations, the security panel sidebar doesn't work properly for an interstitial, and also doesn't provide that much more useful information than what's shown in the Overview view. For this reason, we were already hiding the origins sidebar when you navigate to an interstitial while the security panel is open. This CL extends that behavior to when you open DevTools while an interstitial is already showing. To do so, we attach an interstitialIsShowing boolean to the securityStateChanged event which gets sent to the security panel when it's opened. As a drive-by, this CL also fixes a bug where requests that finished after the interstitial was shown would still show up in the sidebar. Note that we still need to listen for interstitials shown/hidden while the security panel is open and we can't rely on the securityStateChanged event to hear about those interstitials, because there's no guarantee that a securityStateChanged event will be sent when an interstitial attaches. Also note that this CL only partially addresses the linked bug. This CL removes the confusing/useless prompt to reload, but doesn't fix the fact that refreshing on an interstitial does weird things (sends you back to the previous page). BUG=637299 ==========
The CQ bit was checked by estark@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
estark@chromium.org changed reviewers: + dgozman@chromium.org
dgozman, can you please review? https://codereview.chromium.org/2522733002/diff/1/third_party/WebKit/Source/d... File third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js (right): https://codereview.chromium.org/2522733002/diff/1/third_party/WebKit/Source/d... third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js:496: newParent.hidden = this._originsAreHidden; This is the drive-by bug fix I mentioned in the CL description: once an interstitial is shown and the sidebar origins list is hidden, requests that finish after that should also be hidden.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2522733002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/inspector/browser_protocol.json (right): https://codereview.chromium.org/2522733002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/inspector/browser_protocol.json:906: { "name": "interstitialIsShowing", "type": "boolean", "description": "True if an interstitial is currently showing.", "optional": true } Instead of this, we should send Page.interstitialShown event when client does Page.enable with visible interstitial. Then we don't need a separate event and it will all be handled by existing code.
On 2016/11/22 21:44:38, dgozman wrote: > https://codereview.chromium.org/2522733002/diff/20001/third_party/WebKit/Sour... > File third_party/WebKit/Source/core/inspector/browser_protocol.json (right): > > https://codereview.chromium.org/2522733002/diff/20001/third_party/WebKit/Sour... > third_party/WebKit/Source/core/inspector/browser_protocol.json:906: { "name": > "interstitialIsShowing", "type": "boolean", "description": "True if an > interstitial is currently showing.", "optional": true } > Instead of this, we should send Page.interstitialShown event when client does > Page.enable with visible interstitial. Then we don't need a separate event and > it will all be handled by existing code. I tried that initially, but it didn't seem to work, I think because the security panel wasn't enabled/attached yet. Does that sound plausible to you? (IIRC I was triggering the event in PageHandler::SetRenderFrameHost. Maybe Enable would work? I can debug it more tonight or tomorrow.)
On 2016/11/22 23:04:54, estark wrote: > On 2016/11/22 21:44:38, dgozman wrote: > > > https://codereview.chromium.org/2522733002/diff/20001/third_party/WebKit/Sour... > > File third_party/WebKit/Source/core/inspector/browser_protocol.json (right): > > > > > https://codereview.chromium.org/2522733002/diff/20001/third_party/WebKit/Sour... > > third_party/WebKit/Source/core/inspector/browser_protocol.json:906: { "name": > > "interstitialIsShowing", "type": "boolean", "description": "True if an > > interstitial is currently showing.", "optional": true } > > Instead of this, we should send Page.interstitialShown event when client does > > Page.enable with visible interstitial. Then we don't need a separate event and > > it will all be handled by existing code. > > I tried that initially, but it didn't seem to work, I think because the security > panel wasn't enabled/attached yet. Does that sound plausible to you? (IIRC I was > triggering the event in PageHandler::SetRenderFrameHost. Maybe Enable would > work? I can debug it more tonight or tomorrow.) I think it should work. Since we should handle the flag on the SecurityModel level, it doesn't matter whether panel is there yet.
On 2016/11/23 01:19:13, dgozman wrote: > On 2016/11/22 23:04:54, estark wrote: > > On 2016/11/22 21:44:38, dgozman wrote: > > > > > > https://codereview.chromium.org/2522733002/diff/20001/third_party/WebKit/Sour... > > > File third_party/WebKit/Source/core/inspector/browser_protocol.json (right): > > > > > > > > > https://codereview.chromium.org/2522733002/diff/20001/third_party/WebKit/Sour... > > > third_party/WebKit/Source/core/inspector/browser_protocol.json:906: { > "name": > > > "interstitialIsShowing", "type": "boolean", "description": "True if an > > > interstitial is currently showing.", "optional": true } > > > Instead of this, we should send Page.interstitialShown event when client > does > > > Page.enable with visible interstitial. Then we don't need a separate event > and > > > it will all be handled by existing code. > > > > I tried that initially, but it didn't seem to work, I think because the > security > > panel wasn't enabled/attached yet. Does that sound plausible to you? (IIRC I > was > > triggering the event in PageHandler::SetRenderFrameHost. Maybe Enable would > > work? I can debug it more tonight or tomorrow.) > > I think it should work. Since we should handle the flag on the SecurityModel > level, it doesn't matter whether panel is there yet. Sorry for the delay. We're listening for the interstitial events on SecurityPanel, though, not SecurityModel, so the panel object isn't around to receive them. Should I be listening for the interstitialShown/interstitialHidden on SecurityModel instead?
On 2016/11/28 22:59:51, estark wrote: > On 2016/11/23 01:19:13, dgozman wrote: > > On 2016/11/22 23:04:54, estark wrote: > > > On 2016/11/22 21:44:38, dgozman wrote: > > > > > > > > > > https://codereview.chromium.org/2522733002/diff/20001/third_party/WebKit/Sour... > > > > File third_party/WebKit/Source/core/inspector/browser_protocol.json > (right): > > > > > > > > > > > > > > https://codereview.chromium.org/2522733002/diff/20001/third_party/WebKit/Sour... > > > > third_party/WebKit/Source/core/inspector/browser_protocol.json:906: { > > "name": > > > > "interstitialIsShowing", "type": "boolean", "description": "True if an > > > > interstitial is currently showing.", "optional": true } > > > > Instead of this, we should send Page.interstitialShown event when client > > does > > > > Page.enable with visible interstitial. Then we don't need a separate event > > and > > > > it will all be handled by existing code. > > > > > > I tried that initially, but it didn't seem to work, I think because the > > security > > > panel wasn't enabled/attached yet. Does that sound plausible to you? (IIRC I > > was > > > triggering the event in PageHandler::SetRenderFrameHost. Maybe Enable would > > > work? I can debug it more tonight or tomorrow.) > > > > I think it should work. Since we should handle the flag on the SecurityModel > > level, it doesn't matter whether panel is there yet. > > Sorry for the delay. We're listening for the interstitial events on > SecurityPanel, though, not SecurityModel, so the panel object isn't around to > receive them. Should I be listening for the interstitialShown/interstitialHidden > on SecurityModel instead? I think it would be easier to have a flag _isInterstitialShown in ResourceTreeModel instead, since it receives the actual events from backend.
The CQ bit was checked by estark@chromium.org to run a CQ dry run
Description was changed from ========== Do not prompt for reload when security panel is opened on an interstitial Because interstitials are not real navigations, the security panel sidebar doesn't work properly for an interstitial, and also doesn't provide that much more useful information than what's shown in the Overview view. For this reason, we were already hiding the origins sidebar when you navigate to an interstitial while the security panel is open. This CL extends that behavior to when you open DevTools while an interstitial is already showing. To do so, we attach an interstitialIsShowing boolean to the securityStateChanged event which gets sent to the security panel when it's opened. As a drive-by, this CL also fixes a bug where requests that finished after the interstitial was shown would still show up in the sidebar. Note that we still need to listen for interstitials shown/hidden while the security panel is open and we can't rely on the securityStateChanged event to hear about those interstitials, because there's no guarantee that a securityStateChanged event will be sent when an interstitial attaches. Also note that this CL only partially addresses the linked bug. This CL removes the confusing/useless prompt to reload, but doesn't fix the fact that refreshing on an interstitial does weird things (sends you back to the previous page). BUG=637299 ========== to ========== Do not prompt for reload when security panel is opened on an interstitial Because interstitials are not real navigations, the security panel sidebar doesn't work properly for an interstitial, and also doesn't provide that much more useful information than what's shown in the Overview view. For this reason, we were already hiding the origins sidebar when you navigate to an interstitial while the security panel is open. This CL extends that behavior to when you open DevTools while an interstitial is already showing. As a drive-by, this CL also fixes a bug where requests that finished after the interstitial was shown would still show up in the sidebar. Also note that this CL only partially addresses the linked bug. This CL removes the confusing/useless prompt to reload, but doesn't fix the fact that refreshing on an interstitial does weird things (sends you back to the previous page). The latter weirdness has been split into https://crbug.com/669316. BUG=637299 TEST=Navigate to https://expired.badssl.com. Open the DevTools security panel. Observe that there is no prompt to reload in the sidebar. ==========
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
On 2016/11/29 00:09:32, dgozman wrote: > On 2016/11/28 22:59:51, estark wrote: > > On 2016/11/23 01:19:13, dgozman wrote: > > > On 2016/11/22 23:04:54, estark wrote: > > > > On 2016/11/22 21:44:38, dgozman wrote: > > > > > > > > > > > > > > > https://codereview.chromium.org/2522733002/diff/20001/third_party/WebKit/Sour... > > > > > File third_party/WebKit/Source/core/inspector/browser_protocol.json > > (right): > > > > > > > > > > > > > > > > > > > > https://codereview.chromium.org/2522733002/diff/20001/third_party/WebKit/Sour... > > > > > third_party/WebKit/Source/core/inspector/browser_protocol.json:906: { > > > "name": > > > > > "interstitialIsShowing", "type": "boolean", "description": "True if an > > > > > interstitial is currently showing.", "optional": true } > > > > > Instead of this, we should send Page.interstitialShown event when client > > > does > > > > > Page.enable with visible interstitial. Then we don't need a separate > event > > > and > > > > > it will all be handled by existing code. > > > > > > > > I tried that initially, but it didn't seem to work, I think because the > > > security > > > > panel wasn't enabled/attached yet. Does that sound plausible to you? (IIRC > I > > > was > > > > triggering the event in PageHandler::SetRenderFrameHost. Maybe Enable > would > > > > work? I can debug it more tonight or tomorrow.) > > > > > > I think it should work. Since we should handle the flag on the SecurityModel > > > level, it doesn't matter whether panel is there yet. > > > > Sorry for the delay. We're listening for the interstitial events on > > SecurityPanel, though, not SecurityModel, so the panel object isn't around to > > receive them. Should I be listening for the > interstitialShown/interstitialHidden > > on SecurityModel instead? > > I think it would be easier to have a flag _isInterstitialShown in > ResourceTreeModel instead, since it receives the actual events from backend. Ah, I see. PTAL at patchset #3.
Nice work! lgtm https://codereview.chromium.org/2522733002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js (right): https://codereview.chromium.org/2522733002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js:877: this._resourceTreeModel.setIsInterstitialShowing(true); Let's just assign directly to a private field here (it's file-private), and do not expose the setter.
Thanks dgozman! https://codereview.chromium.org/2522733002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js (right): https://codereview.chromium.org/2522733002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js:877: this._resourceTreeModel.setIsInterstitialShowing(true); On 2016/11/29 02:07:23, dgozman wrote: > Let's just assign directly to a private field here (it's file-private), and do > not expose the setter. Done.
The CQ bit was checked by estark@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from dgozman@chromium.org Link to the patchset: https://codereview.chromium.org/2522733002/#ps60001 (title: "remove isInterstitialShowing setter")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 60001, "attempt_start_ts": 1480385508807520,
"parent_rev": "8027a4da36a614c5dd63757b0329866d6e482e63", "commit_rev":
"d10c3d3d06024fa9c34b72cb1f39322c5dc70887"}
Message was sent while issue was closed.
Description was changed from ========== Do not prompt for reload when security panel is opened on an interstitial Because interstitials are not real navigations, the security panel sidebar doesn't work properly for an interstitial, and also doesn't provide that much more useful information than what's shown in the Overview view. For this reason, we were already hiding the origins sidebar when you navigate to an interstitial while the security panel is open. This CL extends that behavior to when you open DevTools while an interstitial is already showing. As a drive-by, this CL also fixes a bug where requests that finished after the interstitial was shown would still show up in the sidebar. Also note that this CL only partially addresses the linked bug. This CL removes the confusing/useless prompt to reload, but doesn't fix the fact that refreshing on an interstitial does weird things (sends you back to the previous page). The latter weirdness has been split into https://crbug.com/669316. BUG=637299 TEST=Navigate to https://expired.badssl.com. Open the DevTools security panel. Observe that there is no prompt to reload in the sidebar. ========== to ========== Do not prompt for reload when security panel is opened on an interstitial Because interstitials are not real navigations, the security panel sidebar doesn't work properly for an interstitial, and also doesn't provide that much more useful information than what's shown in the Overview view. For this reason, we were already hiding the origins sidebar when you navigate to an interstitial while the security panel is open. This CL extends that behavior to when you open DevTools while an interstitial is already showing. As a drive-by, this CL also fixes a bug where requests that finished after the interstitial was shown would still show up in the sidebar. Also note that this CL only partially addresses the linked bug. This CL removes the confusing/useless prompt to reload, but doesn't fix the fact that refreshing on an interstitial does weird things (sends you back to the previous page). The latter weirdness has been split into https://crbug.com/669316. BUG=637299 TEST=Navigate to https://expired.badssl.com. Open the DevTools security panel. Observe that there is no prompt to reload in the sidebar. ==========
Message was sent while issue was closed.
Committed patchset #4 (id:60001)
Message was sent while issue was closed.
Description was changed from ========== Do not prompt for reload when security panel is opened on an interstitial Because interstitials are not real navigations, the security panel sidebar doesn't work properly for an interstitial, and also doesn't provide that much more useful information than what's shown in the Overview view. For this reason, we were already hiding the origins sidebar when you navigate to an interstitial while the security panel is open. This CL extends that behavior to when you open DevTools while an interstitial is already showing. As a drive-by, this CL also fixes a bug where requests that finished after the interstitial was shown would still show up in the sidebar. Also note that this CL only partially addresses the linked bug. This CL removes the confusing/useless prompt to reload, but doesn't fix the fact that refreshing on an interstitial does weird things (sends you back to the previous page). The latter weirdness has been split into https://crbug.com/669316. BUG=637299 TEST=Navigate to https://expired.badssl.com. Open the DevTools security panel. Observe that there is no prompt to reload in the sidebar. ========== to ========== Do not prompt for reload when security panel is opened on an interstitial Because interstitials are not real navigations, the security panel sidebar doesn't work properly for an interstitial, and also doesn't provide that much more useful information than what's shown in the Overview view. For this reason, we were already hiding the origins sidebar when you navigate to an interstitial while the security panel is open. This CL extends that behavior to when you open DevTools while an interstitial is already showing. As a drive-by, this CL also fixes a bug where requests that finished after the interstitial was shown would still show up in the sidebar. Also note that this CL only partially addresses the linked bug. This CL removes the confusing/useless prompt to reload, but doesn't fix the fact that refreshing on an interstitial does weird things (sends you back to the previous page). The latter weirdness has been split into https://crbug.com/669316. BUG=637299 TEST=Navigate to https://expired.badssl.com. Open the DevTools security panel. Observe that there is no prompt to reload in the sidebar. Committed: https://crrev.com/f8d89eaf15d68b685f1d1e0503a2057df1082a75 Cr-Commit-Position: refs/heads/master@{#434887} ==========
Message was sent while issue was closed.
Patchset 4 (id:??) landed as https://crrev.com/f8d89eaf15d68b685f1d1e0503a2057df1082a75 Cr-Commit-Position: refs/heads/master@{#434887} |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
