Closed
Bug 545636
Opened 15 years ago
Closed 15 years ago
return a wrong value for css style at first call when change stylesheet file
Categories
(Core :: DOM: CSS Object Model, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: xidorn, Unassigned)
References
()
Details
(Keywords: testcase)
Attachments
(3 files)
User-Agent: Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.9.1.7) Gecko/20100106 Ubuntu/9.10 (karmic) Firefox/3.5.7
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.9.1.7) Gecko/20100106 Ubuntu/9.10 (karmic) Firefox/3.5.7
When I click the white block for the first time, with the stylesheet to be changed, the text on the right should show the background color (black) and text color (white) of the block modified, but it shows "transparent" and "rgb(0, 0, 0)" instead.
Reproducible: Always
Steps to Reproduce:
1.Open the HTML file
2.Click the white block
3.It happens!
Actual Results:
background: transparent
color: rgb(0, 0, 0)
Expected Results:
background: rgb(0, 0, 0)
color: rgb(255, 255, 255)
Reporter | ||
Updated•15 years ago
|
OS: Linux → All
Reporter | ||
Comment 1•15 years ago
|
||
Comment 2•15 years ago
|
||
Updated•15 years ago
|
Attachment #426503 -
Attachment is patch: false
Attachment #426503 -
Attachment mime type: text/plain → application/zip
Comment 4•15 years ago
|
||
The testcase starts an asynchronous load of a new stylesheet, then immediately (synchronously) checks the computed style. Since the new sheet hasn't loaded yet at that point, you don't get the new sheet's styles applied.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
Comment 5•15 years ago
|
||
Oh, and Opera and Safari have the same behavior.
Reporter | ||
Comment 6•15 years ago
|
||
(In reply to comment #5)
> Oh, and Opera and Safari have the same behavior.
But when I test it locally, only Firefox behaves like that, and other browsers including IE6 give the correct value.
Reporter | ||
Comment 7•15 years ago
|
||
(In reply to comment #5)
> Oh, and Opera and Safari have the same behavior.
And when testing the modified testcase submitted by John P Baker, Firefox is the only browser returns a wrong value as well.
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Comment 8•15 years ago
|
||
Local behavior will depend on browser; some might decide to make the load synchronous. Firefox always does loads asynchronously, so that you don't get inconsistent behavior between local and non-local.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago → 15 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•