Changeset 264999 in webkit


Ignore:
Timestamp:
Jul 28, 2020 12:21:35 PM (4 years ago)
Author:
timothy@apple.com
Message:

Web Inspector: Don't allow docking to a hidden web view
https://bugs.webkit.org/show_bug.cgi?id=214886

Reviewed by Devin Rousso.

  • UIProcess/Inspector/WebInspectorProxy.cpp:

(WebKit::WebInspectorProxy::attach): Call platformCanAttach() since it can do a live check.
(WebKit::WebInspectorProxy::detach): Return early if already attached, otherwise asserts later.

  • UIProcess/Inspector/mac/WebInspectorProxyMac.mm:

(WebKit::WebInspectorProxy::platformCanAttach): Return flase when the web view is hidden.

Location:
trunk/Source/WebKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r264990 r264999  
     12020-07-28  Timothy Hatcher  <timothy@apple.com>
     2
     3        Web Inspector: Don't allow docking to a hidden web view
     4        https://bugs.webkit.org/show_bug.cgi?id=214886
     5
     6        Reviewed by Devin Rousso.
     7
     8        * UIProcess/Inspector/WebInspectorProxy.cpp:
     9        (WebKit::WebInspectorProxy::attach): Call platformCanAttach() since it can do a live check.
     10        (WebKit::WebInspectorProxy::detach): Return early if already attached, otherwise asserts later.
     11        * UIProcess/Inspector/mac/WebInspectorProxyMac.mm:
     12        (WebKit::WebInspectorProxy::platformCanAttach): Return flase when the web view is hidden.
     13
    1142020-07-28  Alex Christensen  <achristensen@webkit.org>
    215
  • trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.cpp

    r264803 r264999  
    280280{
    281281    ASSERT(m_inspectorPage);
    282     if (!m_inspectedPage || !m_inspectorPage || !canAttach())
     282    if (!m_inspectedPage || !m_inspectorPage || !platformCanAttach(canAttach()))
    283283        return;
    284284
     
    312312void WebInspectorProxy::detach()
    313313{
    314     if (!m_inspectedPage || !m_inspectorPage)
     314    if (!m_inspectedPage || !m_inspectorPage || (!m_isAttached && m_isVisible))
    315315        return;
    316316
  • trunk/Source/WebKit/UIProcess/Inspector/mac/WebInspectorProxyMac.mm

    r264526 r264999  
    412412        return webProcessCanAttach;
    413413
     414    if (inspectedView.hidden)
     415        return false;
     416
    414417    static const float minimumAttachedHeight = 250;
    415418    static const float maximumAttachedHeightRatio = 0.75;
Note: See TracChangeset for help on using the changeset viewer.