Closed Bug 546033 Opened 14 years ago Closed 14 years ago

Scrolling while the viewport has a focus rectangle causes smearing

Categories

(Core :: Web Painting, defect, P2)

defect

Tracking

()

RESOLVED FIXED
Tracking Status
blocking2.0 --- final+

People

(Reporter: ori, Assigned: roc)

References

Details

Attachments

(1 file, 1 obsolete file)

Steps to reproduce:

1) Alt-tab until the entire viewport is in "focus" and has a rectangle around
it.
2) Scroll up/down.

Results:
The focus rect's dotted line will smear.

I found this happening beginning with the 2010-01-12 nightly builds.
Previously, the focus rect would immediately disappear after scrolling, so no
smearing is possible.

I assume bug 526394 is to blame.
OS: Linux → All
Hardware: x86 → All
Blocks: 526394
No longer depends on: 526394
Assignee: nobody → roc
blocking2.0: --- → ?
Attached patch fix (obsolete) — Splinter Review
Oops. When nsCanvasFrame::Init is called, the root nsHTMLScrollFrame has not yet been attached to the frame tree. Instead, let's just add the scroll position listener when the nsCanvasFrame actually gets focus ... and to avoid adding it multiple times, remove it when we lose focus.
Attachment #428639 - Flags: review?(matspal)
Whiteboard: [needs review]
Do you need to also remove the listener in RemoveScrollPositionListener?
Comment on attachment 428639 [details] [diff] [review]
fix

You also need to deal with the case of a scroll changing mDoPaintFocus.
Bah, that's what I meant to say, but failed. I wanted to say remove the listener in ScrollPositionWillChange.
Attached patch fix v2Splinter Review
Good catch!

RemoveScrollPositionListener during the callback is bad. This approach is simpler. Just AddScrollPositionListener once when we first get focus.
Attachment #428639 - Attachment is obsolete: true
Attachment #428842 - Flags: review?(enndeakin)
Attachment #428639 - Flags: review?(matspal)
Attachment #428842 - Flags: review?(enndeakin) → review+
Whiteboard: [needs review] → [needs landing]
http://hg.mozilla.org/mozilla-central/rev/34b13470f8ef
Status: NEW → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [needs landing]
Depends on: 551635
Depends on: 560128
blocking2.0: ? → final+
Priority: -- → P2
Component: Layout: View Rendering → Layout: Web Painting
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: