Closed Bug 498340 Opened 16 years ago Closed 16 years ago

Repaint issue when I open a sidebar

Categories

(Core :: Layout, defect, P2)

x86
Windows XP
defect

Tracking

()

RESOLVED FIXED
Tracking Status
status1.9.2 --- beta4-fixed

People

(Reporter: alice0775, Assigned: roc)

References

Details

(Keywords: regression)

Attachments

(6 files, 2 obsolete files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1pre) Gecko/20090615 Firefox/3.5.0 (.NET CLR 3.5.30729) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090614 Minefield/3.6a1pre ID:20090614050328 The drawing of contents becomes funny when I open a sidebar Reproducible: Always Steps to Reproduce: 1.Start Minefield with New Profile 2.View > Sidebar > History (do not ctrl + h) 3. Actual Results: The drawing of contents becomes funny. Expected Results: The drawing of contents should be painted pictures definitely.
Attached image Screen shot
You may have to repeat "step 2" 2 or 3 times to reproduce this problem. Regression range: Works fine: http://hg.mozilla.org/mozilla-central/rev/497fe6fed36e Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090611 Minefield/3.6a1pre ID:20090611185346 Broken: http://hg.mozilla.org/mozilla-central/rev/b3c4e464fed7 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090611 Minefield/3.6a1pre ID:20090611210216 Pushlog: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=497fe6fed36e&tochange=b3c4e464fed7
Keywords: regression
Version: unspecified → Trunk
Sorry, the regression range in Comment #2 is wrong. however , http://hg.mozilla.org/mozilla-central/rev/497fe6fed36e is also broken .
Component: General → Layout
Product: Firefox → Core
QA Contact: general → layout
Corrected regression range: Works: http://hg.mozilla.org/mozilla-central/rev/89811ac1b35a Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090114 Firefox/3.2a1pre ID:20090114034711 Broken: http://hg.mozilla.org/mozilla-central/rev/73fbb12f48e1 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090115 Firefox/3.2a1pre ID:20090115033950 Pushlog: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=89811ac1b35a&tochange=73fbb12f48e1
Summary: The drawing of contents becomes funny when I open a sidebar → Repaint issue when I open a sidebar
Nothing in that regression range jumped out at me. A narrower range might be more useful, although maybe roc will see something suspicious.
Yes, I don't see anything suspicious
To reproduce it surely, step 2. View > Sidebar > history & Hold left click a while repeat "step 2" 2 or 3 times to reproduce this problem.
I backed out 40ba2eac8f4b and build Minfield, the issue does not occur. So, I suspect bug 472730.
Blocks: 472730
This problem does not seem to reappear since the following build. http://hg.mozilla.org/mozilla-central/rev/5b0d9f36c0b3 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090721 Minefield/3.6a1pre ID:20090721192005 Therefore,I assume it resolved at present.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → WORKSFORME
Sorry, There is still the problem. It occurs frequently in a page of about:buildconfig with new profile. Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090807 Minefield/3.6a1pre ID:20090807045043
Status: RESOLVED → UNCONFIRMED
Resolution: WORKSFORME → ---
Attached file avi
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.3a1pre) Gecko/20090816 Minefield/3.7a1pre Confirmed. Notice the about:buildconfig page extends beyond the right border of the window, the box didn't resize it self appropriately.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking1.9.2?
Flags: blocking1.9.2? → wanted1.9.2+
This repaint issue happens on persona page http://www.getpersonas.com/en-US/gallery/Foxkeh/Popular . Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2b2pre) Gecko/20091030 Namoroka/3.6b2pre ID:20091030060000 Mozilla/5.0 (Windows; U; Windows NT 6.0; ja; rv:1.9.2b1) Gecko/20091029 Firefox/3.6b1 and Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.3a1pre) Gecko/20091030 Minefield/3.7a1pre ID:20091030060356
Assignee: nobody → roc
Alice, can you be more specific? You mean opening the history tab while at that Personas page causes the problem?
(In reply to comment #14) > Alice, can you be more specific? You mean opening the history tab while at that > Personas page causes the problem? STR: 1.Start Browser with new profile 2.Open http://www.getpersonas.com/en-US/gallery/Foxkeh/Popular 3.View > Sidebar > History (repeat this several times if necessary, Do not use short-cut or Toolbar button) Actual result: Repaint issue happens.
Thanks, I can reproduce this.
Attached file testcase
Load this testcase, then show the sidebar. The right border doesn't repaint correctly, for me. May be Windows only, I can't reproduce on Mac.
Here's what I think is happening: * When we open the sidebar, we change the state of the chrome document * This triggers an asynchronous reflow of the chrome document ** In a post-reflow callback, we adjust the size of the <browser>'s nsSubdocumentFrame's docshell ** Which resizes the contentviewer ** Which resizes the page's root widget ** Which does reflow and triggers invalidation of the right areas *** I think this triggers a pending resize event in the child document ** Resetting the geometry the chrome document's widget for the <browser> is deferred * Then we get an asynchronous repaint of the content document ** We set up the DC and clip region etc to draw into ** Then in nsViewManager::DispatchEvent we call WillPaint on the content presshell ** This flushes notifications, and it appears to be safe to run script so we flush out the pending resize event ** This runs a bunch of script, which happens to call some boxObject.width in the chrome document, which flushes notifications in that document ** That starts and ends a view batch in the chrome document, which triggers nsViewManager::FlushPendingInvalidates ** This flushes out the change to the geometry of the chrome document's <browser> widget, moving the widget to the right *** This also moves the content document's window as well, of course ** Then we return out of all this and start painting into the DC we set up earlier I think changing the ancestor widget geometry while we already have the DC set up for painting the content document confuses Windows ... which is not unreasonable. I need to think a little about what the right fix is.
Attached patch fix (obsolete) — Splinter Review
I'm just extending the scope of the script blocker from the body of nsViewManager::Refresh to the whole NS_PAINT handler. Any script execution here has a chance of causing widget tree geometry changes that will confuse painting.
Attachment #411107 - Flags: review?(bzbarsky)
Whiteboard: [needs review]
Attachment #411107 - Flags: review?(bzbarsky) → review+
Status: NEW → RESOLVED
Closed: 16 years ago16 years ago
Resolution: --- → FIXED
Whiteboard: [needs review] → [needs 192 landing]
Comment on attachment 411107 [details] [diff] [review] fix I'll take the liberty of granting myself 1.9.2 approval, since this is actually quite a bad bug and the fix is very simple.
Attachment #411107 - Flags: approval1.9.2+
This caused the regression in bug 527864, so I need to look into that before landing this on 1.9.2
Whiteboard: [needs 192 landing]
I actually think this should be a blocker.
Flags: blocking1.9.2?
Flags: blocking1.9.2? → blocking1.9.2+
This ensures that our flushes happen before we call BeginPaint, so we end up painting the right content in the right place even if those flushes move ancestor widgets around. This depends on the fix for bug 527864 landing.
Attachment #412264 - Flags: review?(jmathies)
Priority: -- → P2
Whiteboard: [needs review][depends on 527864]
Attached patch Part 1 v2Splinter Review
Correct backout
Attachment #412262 - Attachment is obsolete: true
Attachment #412264 - Flags: review?(jmathies) → review+
Whiteboard: [needs review][depends on 527864] → [needs landing][depends on 527864]
I meant this depends on the fix for bug 517804 landing.
Depends on: 517804
Whiteboard: [needs landing][depends on 527864] → [needs landing][depends on 517804]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: