Closed
Bug 10622
Opened 25 years ago
Closed 23 years ago
DOM should set CSS parser in quirks mode when needed
Categories
(Core :: DOM: CSS Object Model, defect, P3)
Tracking
()
RESOLVED
FIXED
Future
People
(Reporter: ekrock, Assigned: bzbarsky)
References
()
Details
(Keywords: dom2, regression, testcase)
Attachments
(1 file)
(deleted),
text/html
|
Details |
M8 1999071417 on WinNT 4.0 SP3.
To repro:
1) go to url
2) click button
expected:
- font size should change to 100pt
actual:
- font size doesn't change
Believe this worked in previous milestones but I'm not certain. Here's the code:
<HTML>
<HEAD>
<TITLE>setFontSize</TITLE>
<SCRIPT TYPE="text/javascript">
<!--
function setFontSize(id,size){
document.getElementById(id).style.fontSize = size ;
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<DIV ID="test" STYLE="font:900 50px Arial"><BR>(^^)/Hi</DIV>
<FORM>
<INPUT TYPE="button"
VALUE="change FontSize"
onClick="if(document.getElementById)setFontSize('test',100)">
</FORM>
</BODY>
</HTML>
Reporter | ||
Updated•25 years ago
|
Summary: style.fontSize broken in M8? → {dom2} style.fontSize broken in M8?
Reporter | ||
Comment 1•25 years ago
|
||
Marked {dom2}.
Reporter | ||
Updated•25 years ago
|
Whiteboard: [TESTCASE]
Reporter | ||
Comment 2•25 years ago
|
||
Marked [TESTCASE] as the source file couldn't be any simpler.
Comment 3•25 years ago
|
||
Shouldn't this require "px" units? (You say expected is 100px, I would expect
100px if anything at all. Technically, "font-size: 100" is invalid.)
Updated•25 years ago
|
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 4•25 years ago
|
||
Works on 9/31/1999 build. w.r.t. David Baron's comment about units, I think
Peter is fairly lenient about missing units, even though they are required for
CSS.
Comment 6•24 years ago
|
||
style.fontSize seems to be broken again. Attaching a testcase.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 7•24 years ago
|
||
Reporter | ||
Comment 8•24 years ago
|
||
If we've indeed regressed in our support for correct DOM code since previous
builds, it's critical to fix the regression before RTM. Changing QA contact to
gerardok; gerardo, could you confirm that we've got a regression in support for
correct DOM2 code here versus previous versions?
Nominating for rtm and marking [rtm need info] since we need to determine
whether this is a real problem and if so whether we can fix it for rtm.
(Vlad, many thanks for the testcase! When you attach one to a bug, add the
testcase keyword.)
QA Contact: vidur → gerardok
Whiteboard: [TESTCASE] → [rtm need info]
Comment 9•24 years ago
|
||
No response from Gerardo, since this probably didn't get caught by his mail
filter (namely, username followed by a space or comma at the start of a line):
gerardok, see above comments from ekrock.
vladimire, the test case is, in my tentative opinion, invalid, since '40' is an
invalid value for font-size in CSS2. Replacing |40| with |'40px'| makes
everything OK. Now the question is, why are we not returning a SYNTAX_ERR DOM
Exception? At least, I can't see one raised in the JS console. Could you do some
more testing, or explain to me how to catch exceptions in JS? I'm a complete
newbie to both the DOM and JavaScript. ;-) Thanks!!
References:
http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSS2Properties-fontSize
http://www.w3.org/TR/CSS2/fonts.html#propdef-font-size
Keywords: correctness
Whiteboard: [rtm need info] → [rtm need info] INVALID?
Comment 10•24 years ago
|
||
I suspect (although I have not tested) that there are 2 bugs here:
* We're not setting the CSS parser quirks mode correctly for parsing done from
the DOM
* We're not throwing SYNTAX_ERR exceptions in our implementation of the
CSS2Properties interface.
These should probably both be filed as separate bugs (assuming they are the
problem), for clarity.
Comment 11•24 years ago
|
||
Reassigning to the guy who does the real DOM work. :-)
Assignee: vidur → jst
Status: REOPENED → NEW
Comment 12•24 years ago
|
||
For gods sake, get this off the rtm radar. There's no chance in hell that this
will ever be fixed for rtm.
Comment 13•24 years ago
|
||
PDT marking [rtm-]. We've been apparently surviving with this bug for a long time.
Whiteboard: [rtm need info] INVALID? → [rtm-] INVALID?
Comment 14•24 years ago
|
||
I don't know what's right or wrong here, maybe the CSS pople know, reassigning
to Pierre for futher triage.
Assignee: jst → pierre
Updated•24 years ago
|
Summary: {dom2} style.fontSize broken in M8? → Should CSS parser be in quirks mode for parsing from DOM?
Comment 15•24 years ago
|
||
Back to jst. I agree with [David Baron 2000-10-22 20:00]. The DOM should set
the CSS parser in quirks mode when the document is in quirks mode. Then I guess
that you can reassign back to me to look into how syntax errors are reported.
Assignee: pierre → jst
QA Contact: gerardok → vidur
Summary: Should CSS parser be in quirks mode for parsing from DOM? → DOM should set CSS parser in quirks mode when needed
Whiteboard: [rtm-] INVALID?
Comment 16•24 years ago
|
||
Ok, I'll look into this sometime, but I won't have time for this any time soon,
--> Future.
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Updated•24 years ago
|
Component: DOM Level 2 → DOM Style
Comment 17•24 years ago
|
||
Taking QA Contact on all open or unverified DOM Style bugs...
QA Contact: vidur → ian
Comment 18•23 years ago
|
||
The attached testcase gives:
<p id="id1" style="">Style Sheet
<script>
document.getElementById('id1').style.fontSize = 40;
</script>
</p>
when I do a document.body.innerHTML
Assignee | ||
Comment 19•23 years ago
|
||
This works now, partially. Specifically, when we are setting .style on an
element in a document, we set the quirks mode correctly.
We do _not_ set it correctly when manipulating the CSSOM. I'm going to look
into that....
Assignee | ||
Comment 20•23 years ago
|
||
Taking this, since jst has futured it.
Assignee: jst → bzbarsky
Status: ASSIGNED → NEW
Assignee | ||
Comment 21•23 years ago
|
||
Fixed by changes in bug 95336
Status: NEW → RESOLVED
Closed: 25 years ago → 23 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•