Closed Bug 453896 Opened 12 years ago Closed 12 years ago

need to flush delayed resizes during layout flushes

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

VERIFIED FIXED
mozilla1.9.1b1

People

(Reporter: dbaron, Assigned: dbaron)

References

Details

(Keywords: verified1.9.1)

Attachments

(1 file, 1 obsolete file)

Attached patch patch (obsolete) — Splinter Review
I initially wrote this patch thinking it might fix bug 448132, but it didn't.

However, after working on bug 453759, I realized that this patch fixes a bug where a bunch of the tests in layout/style/test/test_media_queries.html fail when the test is loaded in a non-active tab, i.e., one of the following two ways:

Steps to reproduce:
 1. cd objdir/_tests/testing/mochitest && python ./runtests.py --test-path=layout/style
 2. right click on the "test_media_queries.html" link and select "Open in new Tab"
 3. switch to the new tab
 4. hit reload
 5. switch back to the directory listing tab
 6. right click on the test page tab and select "Reload Tab"
 7. switch to the test page tab

Actual results:
 3. a bunch of the tests fail (this is way-to-reproduce #1)
 5. all tests pass
 7. a bunch of the tests fail again (this is way-to-reproduce #2)

Expected results:
 3. all tests pass
 5. all tests pass
 7. all tests pass

The attached patch fixes the bug, but I need to write a test that tests it.
Flags: blocking1.9.1?
Er, 3/5/7 lists in the above comment should be 3/4/7 in both cases.
Attached patch patch with testsSplinter Review
This adds two tests:
 * a normal mochitest that runs a part of test_media_queries.html inside an iframe in the non-visible part of a deck
 * a browser mochitest that runs the same part of test_media_queries.html in a new tab

I verified that the tests pass with the patch and that 6 of the tests fail if I comment out the FlushDelayedResize call (added in this patch) in nsPresShell.cpp
Attachment #337138 - Attachment is obsolete: true
Attachment #337497 - Flags: superreview?(bzbarsky)
Attachment #337497 - Flags: review?(bzbarsky)
(It also wouldn't surprise me if this patch fixed some real-world bugs...)
Attachment #337497 - Flags: superreview?(bzbarsky)
Attachment #337497 - Flags: superreview+
Attachment #337497 - Flags: review?(bzbarsky)
Attachment #337497 - Flags: review+
Comment on attachment 337497 [details] [diff] [review]
patch with tests

Please rev nsIViewManager's IID, and looks good.
Fixed: http://hg.mozilla.org/mozilla-central/rev/250798f99819
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Depends on: 454513
Depends on: 454578
Flags: blocking1.9.1? → blocking1.9.1+
Priority: -- → P3
No longer depends on: 454578
pushed: http://hg.mozilla.org/releases/mozilla-1.9.1/rev/c9482d51ef47


Seeing as there hasn't been any discussions about this bug for 8 months and it's been in mochitest, I'm assuming there aren't any residual issues. I'm moving this to verified as a result. If anyone has any qualms, feel free to bring them up.
Status: RESOLVED → VERIFIED
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.