Closed Bug 188210 Opened 22 years ago Closed 22 years ago

[FIX]Inspector doesn't outline/blink iframes or elements within them

Categories

(Other Applications :: DOM Inspector, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jesup, Assigned: bzbarsky)

Details

Attachments

(1 file, 1 obsolete file)

_Probably_ due to problems with the fact that drawing into the iframe means
drawing into a different gdk surface, so the offsets in
inLayoutUtils::GetClientOrigin() aren't correct.

This is GetClientOrigin:
  nsPoint result(0,0);
  nsIView* view;
  aFrame->GetOffsetFromView(aPresContext, result, &view);
  while (view) {
    nscoord x, y;
    view->GetPosition(&x, &y);
    result.x += x;
    result.y += y;
    view->GetParent(view);
  }
  return result;

This gives you an offset from the window's surface, which is badly offset
relative to the iframe's surface.

Note: this theary hasn't been tested yet, but I have some reasons to believe
that may be the cause.  Could be wrong, however.
Adding bz; timeless says bz knows about this (as does caillon).
Attachment #110983 - Flags: superreview?(roc+moz)
Attachment #110983 - Flags: review?(caillon)
may as well take this...
Assignee: caillon → bzbarsky
Summary: Inspector doesn't outline/blink iframes or elements within them → [FIX]Inspector doesn't outline/blink iframes or elements within them
Comment on attachment 110983 [details] [diff] [review]
this has been bugging me for ages; and you're right.

Excellent!  Though ISTR another bug filed about this, which should get duped
here.
Attachment #110983 - Flags: review?(caillon) → review+
That is what I had in mind, but it's not a dupe after looking again.
Comment on attachment 110983 [details] [diff] [review]
this has been bugging me for ages; and you're right.

The old code included the position of the root view in the result ... should we
be checking for a change in view managers instead?
Comment on attachment 111046 [details] [diff] [review]
kin's right; we want the offset of the root view too....

sr=kin@netscape.com
Attachment #111046 - Flags: superreview+
fixed.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Product: Core → Other Applications
QA Contact: timeless → dom-inspector
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: