WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
30663
Web Inspector: windowFocused and windowBlured Fail to Clear/Mark Inspector as "inactive"
https://bugs.webkit.org/show_bug.cgi?id=30663
Summary
Web Inspector: windowFocused and windowBlured Fail to Clear/Mark Inspector as...
Joseph Pecoraro
Reported
2009-10-21 23:20:24 PDT
The style class "inactive" is not getting added to the body. It is used numerous times in the CSS.
Attachments
[PATCH] Check document.defaultView
(1.28 KB, patch)
2009-10-21 23:24 PDT
,
Joseph Pecoraro
pfeldman
: review+
Details
Formatted Diff
Diff
[PATCH] Handle Focus/Blur of inner <iframe>s
(2.44 KB, patch)
2009-10-22 13:35 PDT
,
Joseph Pecoraro
timothy
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Joseph Pecoraro
Comment 1
2009-10-21 23:24:21 PDT
Created
attachment 41639
[details]
[PATCH] Check document.defaultView The events are registered on a doc.defaultView: doc.defaultView.addEventListener("focus", this.windowFocused.bind(this), true); doc.defaultView.addEventListener("blur", this.windowBlured.bind(this), true); The doc.defaultView is a DOMWindow. Old behavior always fails: if (event.target.nodeType === Node.DOCUMENT_NODE) New behavior tests against the defaultView: if (event.target === document.defaultView)
Joseph Pecoraro
Comment 2
2009-10-21 23:38:14 PDT
NOTE TO SELF: the function should be renamed to "windowBlurred" to fix the typo.
Pavel Feldman
Comment 3
2009-10-22 07:41:14 PDT
Comment on
attachment 41639
[details]
[PATCH] Check document.defaultView Fix the Reviewed by :P.
Joseph Pecoraro
Comment 4
2009-10-22 08:29:31 PDT
Landed in
http://trac.webkit.org/changeset/49939
r49939
= 4a2c682da0e4de665ca85ef024415a8bdaf830b0
Timothy Hatcher
Comment 5
2009-10-22 08:56:01 PDT
Comment on
attachment 41639
[details]
[PATCH] Check document.defaultView The WebInspector.windowFocused and WebInspector.windowBlured functions are registered on iframes too. So this will break break for iframes. Try clicking in a Resource source frame, the Inspector should not become "inactive" then. SourceFrame.js _loaded calls: WebInspector.addMainEventListeners(this.element.contentDocument);
Timothy Hatcher
Comment 6
2009-10-22 08:57:02 PDT
Maybe you were seeing it fire twice because you were testing with a source frame?
Joseph Pecoraro
Comment 7
2009-10-22 13:35:58 PDT
Created
attachment 41680
[details]
[PATCH] Handle Focus/Blur of inner <iframe>s Because focus/blur do not tell you _what_ they are focusing on there has to be a bit of co-dependence between the focus/blur: - Blur runs first, if you're blurring any inner document, always add "inactive" - Focus runs next, if you're focusing on any inner document, remove "inactive" Changing useCapture to false no longer fires duplicate blur/focus events. This was happening when clicking a toolbar (when they were in their :active state). Could be a bug in itself, and may require some investigation.
Joseph Pecoraro
Comment 8
2009-10-22 13:39:22 PDT
(In reply to
comment #7
)
> Changing useCapture to false no longer fires duplicate blur/focus events.
Oh, this also makes it so event.target is what we expect it to be (doc.defaultView a DOMWindow) so the following should never blow up with an undefined for document: event.target.document.nodeType
Joseph Pecoraro
Comment 9
2009-10-22 14:09:31 PDT
Landed Second Patch in
http://trac.webkit.org/changeset/49956
r49956
= 3ba0b1d4a6414ecd8dc61d94fe35153b36c04eae
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