nsViewManager mScrollCnt "leaks", causing flicker

RESOLVED FIXED

Status

()

RESOLVED FIXED
11 years ago
5 months ago

People

(Reporter: roc, Assigned: roc)

Tracking

Trunk
Points:
---
Bug Flags:
blocking1.9 +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

Created attachment 285277 [details] [diff] [review]
obvious patch

nsViewManager::UpdateViewAfterScroll takes a couple of early-exit paths that don't decrement mScrollCnt. This is really bad because it means mScrollCnt will be permanently > 0. And that means we will never flush reflows/restyles when painting, which can lead to flicker.

Requesting blocking because this is hurting a new version of a major app by a certain Large Internet Company. The bug is very hard to diagnose or work around, and the patch I will attach is very safe.
Flags: blocking1.9?
Attachment #285277 - Flags: superreview?(bzbarsky)
Attachment #285277 - Flags: review?(bzbarsky)
Created attachment 285279 [details]
test

this test shows the bug. we don't have an easy way to reftest this, though, because drawWindow flushes...

changing the width of the "i" DIV to something nonzero makes the bug go away --- when the width is zero, we're exiting early from UpdateViewAfterScroll because the rect is empty.
Comment on attachment 285277 [details] [diff] [review]
obvious patch

Indeed.
Attachment #285277 - Flags: superreview?(bzbarsky)
Attachment #285277 - Flags: superreview+
Attachment #285277 - Flags: review?(bzbarsky)
Attachment #285277 - Flags: review+
Flags: blocking1.9? → blocking1.9+
Whiteboard: [needs approval/landing]
Comment on attachment 285277 [details] [diff] [review]
obvious patch

Simple safe fix for a bug is causing weird, hard-to-diagnose problems in web applications by Large Internet Companies
Attachment #285277 - Flags: approval1.9? → approvalM9?
Comment on attachment 285277 [details] [diff] [review]
obvious patch

a=endgame drivers for M9 landing
Attachment #285277 - Flags: approvalM9?
Attachment #285277 - Flags: approvalM9+
Attachment #285277 - Flags: approval1.9+
checked in.
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
Whiteboard: [needs approval/landing]
Component: Layout: View Rendering → Layout: Web Painting
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.