commit | 7d4caadfaa86b424f3c2459563aa5a369f468976 | [log] [tgz] |
---|---|---|
author | lfg <[email protected]> | Wed Mar 22 09:01:45 2017 |
committer | Commit bot <[email protected]> | Wed Mar 22 09:01:45 2017 |
tree | a326a0127a8814e8d252bb265c8dbdcbfb4103fc | |
parent | 234aec4f17e0b08204b0e8df547ab7426100b404 [diff] [blame] |
Reland of Only release the pointer lock when the RenderWidgetHost being destroyed (patchset #1 id:1 of https://codereview.chromium.org/2763953003/ ) Reason for revert: Relanding with the test disabled on Mac. Original issue's description: > Revert of Only release the pointer lock when the RenderWidgetHost being destroyed (patchset #1 id:1 of https://codereview.chromium.org/2760343002/ ) > > Reason for revert: > Looks like this breaks PointerLockBrowserTest.PointerLockChildFrameDetached: https://uberchromegw.corp.google.com/i/chromium.memory/builders/Mac%20ASan%2064%20Tests%20%281%29/builds/28142 > > Original issue's description: > > Only release the pointer lock when the RenderWidgetHost being destroyed > > is the one holding the pointer lock. > > > > This fixes a crash where the WebContents would stop tracking which > > RenderWidgetHost was holding the pointer lock. > > > > BUG=703284 > > > > Review-Url: https://codereview.chromium.org/2760343002 > > Cr-Commit-Position: refs/heads/master@{#458446} > > Committed: https://chromium.googlesource.com/chromium/src/+/bf846a94da5c2b4f8ff93a7942d3d50799381675 > > [email protected],[email protected],[email protected] > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=703284 > > Review-Url: https://codereview.chromium.org/2763953003 > Cr-Commit-Position: refs/heads/master@{#458539} > Committed: https://chromium.googlesource.com/chromium/src/+/a2fda5591832a96af3146f6a3db8cb9b947c2a86 [email protected],[email protected],[email protected] BUG=703284 Review-Url: https://codereview.chromium.org/2764703004 Cr-Commit-Position: refs/heads/master@{#458692}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc index 093f1f22..b165369 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1739,7 +1739,7 @@ view_->RestoreFocus(); } - if (mouse_lock_widget_) + if (render_widget_host == mouse_lock_widget_) LostMouseLock(mouse_lock_widget_); }