Changeset 49956 in webkit


Ignore:
Timestamp:
Oct 22, 2009 2:08:58 PM (14 years ago)
Author:
Joseph Pecoraro
Message:

2009-10-22 Joseph Pecoraro <Joseph Pecoraro>

Reviewed by Timothy Hatcher.

Web Inspector: windowFocused and windowBlured Fail to Clear/Mark Inspector as "inactive"
https://bugs.webkit.org/show_bug.cgi?id=30663

Correctly handle focusing/blurring on inner <iframe>'s such as Source Frames.

  • inspector/front-end/inspector.js: (WebInspector.windowFocused): fix for inner iframes (WebInspector.windowBlurred): fix for inner iframes (WebInspector.addMainEventListeners): change useCapture to false
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r49954 r49956  
     12009-10-22  Joseph Pecoraro  <joepeck@webkit.org>
     2
     3        Reviewed by Timothy Hatcher.
     4
     5        Web Inspector: windowFocused and windowBlured Fail to Clear/Mark Inspector as "inactive"
     6        https://bugs.webkit.org/show_bug.cgi?id=30663
     7
     8          Correctly handle focusing/blurring on inner <iframe>'s such as Source Frames.
     9
     10        * inspector/front-end/inspector.js:
     11        (WebInspector.windowFocused): fix for inner iframes
     12        (WebInspector.windowBlurred): fix for inner iframes
     13        (WebInspector.addMainEventListeners): change useCapture to false
     14
    1152009-10-22  Jaime Yap  <jaimeyap@google.com>
    216
  • trunk/WebCore/inspector/front-end/inspector.js

    r49939 r49956  
    512512WebInspector.windowFocused = function(event)
    513513{
    514     if (event.target === document.defaultView)
     514    // Fires after blur, so when focusing on either the main inspector
     515    // or an <iframe> within the inspector we should always remove the
     516    // "inactive" class.
     517    if (event.target.document.nodeType === Node.DOCUMENT_NODE)
    515518        document.body.removeStyleClass("inactive");
    516519}
     
    518521WebInspector.windowBlurred = function(event)
    519522{
    520     if (event.target === document.defaultView)
     523    // Leaving the main inspector or an <iframe> within the inspector.
     524    // We can add "inactive" now, and if we are moving the focus to another
     525    // part of the inspector then windowFocused will correct this.
     526    if (event.target.document.nodeType === Node.DOCUMENT_NODE)
    521527        document.body.addStyleClass("inactive");
    522528}
     
    14241430WebInspector.addMainEventListeners = function(doc)
    14251431{
    1426     doc.defaultView.addEventListener("focus", this.windowFocused.bind(this), true);
    1427     doc.defaultView.addEventListener("blur", this.windowBlurred.bind(this), true);
     1432    doc.defaultView.addEventListener("focus", this.windowFocused.bind(this), false);
     1433    doc.defaultView.addEventListener("blur", this.windowBlurred.bind(this), false);
    14281434    doc.addEventListener("click", this.documentClick.bind(this), true);
    14291435}
Note: See TracChangeset for help on using the changeset viewer.