Closed Bug 873443 Opened 7 years ago Closed 5 years ago

Inspector doesn't search inside frames

Categories

(DevTools :: Inspector, defect, P2)

defect

Tracking

(firefox40 verified, relnote-firefox 40+)

VERIFIED FIXED
Firefox 40
Tracking Status
firefox40 --- verified
relnote-firefox --- 40+

People

(Reporter: infocatcher.bugs, Assigned: pbro)

References

(Depends on 1 open bug)

Details

(Keywords: testcase, Whiteboard: [polish-backlog][difficulty=easy][bugday-20150527])

Attachments

(2 files, 1 obsolete file)

Attached file Testcase with frame
User Agent: Mozilla/5.0 (Windows NT 6.1; rv:21.0) Gecko/20100101 Firefox/21.0 (Beta/Release)
Build ID: 20130511120803

Steps to reproduce:

1. Open any page with frame(s).
Example:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>Frame testcase</title>
</head>
<frameset>
	<frame src="data:text/html;charset=UTF-8,%3C!DOCTYPE%20HTML%3E%0D%0A%3Cmeta%20charset%3D%22utf-8%22%20%2F%3E%0D%0A%3Ctitle%3EFrame%3C%2Ftitle%3E%0D%0A%3Cdiv%20id%3D%22findMe%22%3ETry%20find%20this%20div%20in%20Inspector%3C%2Fdiv%3E">
</frameset>
</html>

2. Open Web Developer – Inspector.
3. Click on "search" icon and type "div".


Actual results:

Nothing found.


Expected results:

Search should work for all frames (include nested frames – frame inside frame).
Component: Untriaged → Developer Tools: Inspector
OS: Windows 7 → All
Hardware: x86 → All
Attachment #751006 - Attachment mime type: text/plain → text/html
Confirmed on Windows 7, 64 bits, with Firefox 21.0 (User agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0, Build ID: 20130511120803).

Also with latest Nightly 24.0 (User agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:24.0) Gecko/20130515 Firefox/24.0, Build ID: 20130515141643).

This bug is reproducible both in safe mode and with a clean profile.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: All → Windows 7
The search box uses querySelectorAll to search for elements: http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/inspector.js#1394
So it indeed does not search in sub-frames.
Fixing this bug will require either another function to search cross-frames, or repeat the querySelectorAll call in all existing frames of the current document.
OS: Windows 7 → All
Whiteboard: [devedition-40]
Assignee: nobody → pbrosset
Status: NEW → ASSIGNED
Whiteboard: [devedition-40] → [devedition-40][difficulty=easy]
For info, I have a patch almost ready for this. It suggests and selects nodes across all frames in the content page. I need to finalize a new test I'm adding for this, and it should be good to go.
(In reply to Patrick Brosset [:pbrosset] [:patrick] from comment #3)
> For info, I have a patch almost ready for this. It suggests and selects
> nodes across all frames in the content page. I need to finalize a new test
> I'm adding for this, and it should be good to go.

How is it related to Bug 1149346?  Should it be blocking that bug, or vice versa, or are they unrelated?
Setting devedition-40 bugs to P2, filter on C17C996C-A0BE-4153-8057-FAB642D0746D
Priority: -- → P2
(In reply to Brian Grinstead [:bgrins] from comment #4)
> (In reply to Patrick Brosset [:pbrosset] [:patrick] from comment #3)
> > For info, I have a patch almost ready for this. It suggests and selects
> > nodes across all frames in the content page. I need to finalize a new test
> > I'm adding for this, and it should be good to go.
> 
> How is it related to Bug 1149346?  Should it be blocking that bug, or vice
> versa, or are they unrelated?
Not related to this bug, apart from the fact that they touch some of the same code and so will require merging, but doing any one of them before the other should be pretty harmless.
/r/6783 - Bug 873443 - Make the inspector search suggest and select elements in frames; r=bgrins

Pull down this commit:

hg pull -r e7d3ac809ea8f223acfb5d04dd72a9e6a292796d https://reviewboard-hg.mozilla.org/gecko/
Attachment #8590297 - Flags: review?(bgrinstead)
Comment on attachment 8590297 [details]
MozReview Request: bz://873443/pbrosset

https://reviewboard.mozilla.org/r/6781/#review5709

Ship It!
Attachment #8590297 - Flags: review?(bgrinstead) → review+
Blocks: 835896
https://hg.mozilla.org/mozilla-central/rev/fb55e092ec37
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 40
QA Whiteboard: [good first verify]
Release Note Request (optional, but appreciated)
[Why is this notable]: Making search better is a good thing
[Suggested wording]: Inspector will now search across all content frames in a page
[Links (documentation, blog post, etc)]:
Reproduced with Firefox Nightly 24.0a1 (2013-05-15) with the instruction from comment 0 and on Windows 7 x64.

Verified as fixed with Firefox Aurora 40.0a2  (Build ID: 20150526004004) 

Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0
QA Whiteboard: [good first verify] → [good first verify][bugday-20150527]
Whiteboard: [devedition-40][difficulty=easy] → [devedition-40][difficulty=easy][bugday-20150527]
I have reproduced this bug with Firefox aurora 23.0a2 (2013-05-16) with instruction from comment 0 and Linux x64.

Verified as fixed with Firefox 40.0a2 (2015-05-20)  (Build ID: 20150520165851)

Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0 

[bugday-20150527]
As per Comment 13 & Comment 14, Changing the Fix as Verified!
Status: RESOLVED → VERIFIED
Attachment #8590297 - Attachment is obsolete: true
Attachment #8618016 - Flags: review+
Whiteboard: [devedition-40][difficulty=easy][bugday-20150527] → [polish-backlog][difficulty=easy][bugday-20150527]
Depends on: 1326781
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.