Closed
Bug 436717
Opened 16 years ago
Closed 15 years ago
Reading contentDocument.documentElement during onLocationChange forces Quirks Mode
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: bugzilla, Unassigned)
References
Details
(Keywords: testcase)
Attachments
(4 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; da; rv:1.9) Gecko/2008051206 Firefox/3.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; da; rv:1.9) Gecko/2008051206 Firefox/3.0
See StR
Reproducible: Always
Steps to Reproduce:
1. Open a website like this:
<!DOCTYPE html>
<style>body{font-size: 2em}</style>
<body>Test<table><tr><td>Test</table></body>
2. In stall an extension which overlays this on browser.xul:
<script type="application/javascript">
window.addEventListener("load", function () {
document.getElementById("urlbar").addEventListener("ValueChange", function() {
getBrowser().contentDocument.documentElement;
}, true);
}, false);
</script>
3. View the same page as in step one.
Actual Results:
In step one two texts of equal size are displayed, but in step three the first text is bigger than the last.
Expected Results:
The two page displays should be the same.
Reporter | ||
Comment 1•16 years ago
|
||
Reporter | ||
Comment 2•16 years ago
|
||
Comment 3•16 years ago
|
||
Regression range is
http://bonsai.mozilla.org/cvsquery.cgi?module=PhoenixTinderbox&date=explicit&mindate=2006-10-12+06%3A00&maxdate=2006-10-12+12%3A00
Martijn, could this have been caused by one of your bugs?
Reporter | ||
Comment 4•16 years ago
|
||
CC Dão because the bug was found in his addon "Dictionary Switcher"
Summary: Font size in tables ignored when extension uses contentDocument.documentElement → Reading contentDocument.documentElement in extension forces Quirks Mode
Updated•16 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
Product: Firefox → Core
QA Contact: general → general
Version: unspecified → Trunk
Comment 6•16 years ago
|
||
This seems to fix it, it's basically putting back the setTimeout thing that was removed in bug 248612.
See bug 248612, comment 12. We didn't really know why the setTimeout was there and whether it was still necessary. Apparently it is, because it caused this bug.
This is happening because the ValueChange happens when the urlbar changes value:
http://lxr.mozilla.org/seamonkey/source/toolkit/content/widgets/autocomplete.xml#271
and the url bar changes the value directly onlocationchange now (which the patch changes back to do it on a timeout).
So this patch is just working around a behavior that seems like a bug to me.
I guess a standalone testcase could be made that has an nsIWebProgress instance with a progress listener that tries to access document.documentElement onlocationchange.
I haven't tested this patch with the automated tests yet.
Not sure how serious this bug is for inclusion in FF3.01.
Thanks for finding the regression range, Ria!
Comment 7•16 years ago
|
||
Mano, see comment 6, should we try and put the setTimeout hack back in for FF3.01?
Blocks: 248612
Comment 8•16 years ago
|
||
Note that the extension itself can workaround this the same way, by using the setTimeout hack.
Comment 9•16 years ago
|
||
(In reply to comment #6)
> So this patch is just working around a behavior that seems like a bug to me.
Agreed. I don't think we should add the timeout back but investigate the underlying bug.
I guess adding a custom progress listener is more common than listening to ValueChange, so attachment 323347 [details] [diff] [review] wouldn't even help in most cases.
Updated•16 years ago
|
Keywords: regression
Summary: Reading contentDocument.documentElement in extension forces Quirks Mode → Reading contentDocument.documentElement during onLocationChange forces Quirks Mode
Updated•16 years ago
|
Attachment #323347 -
Attachment description: patch → workaround
Updated•16 years ago
|
Flags: in-testsuite?
Reporter | ||
Comment 10•16 years ago
|
||
This extension uses nsIWebProgressListener
Updated•16 years ago
|
Component: General → Layout
QA Contact: general → layout
Reporter | ||
Comment 11•15 years ago
|
||
Looks like it was fixed a long time ago. I guess bug 450191 based on the time.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → WORKSFORME
Updated•10 years ago
|
Flags: in-testsuite?
You need to log in
before you can comment on or make changes to this bug.
Description
•