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)

x86
Windows NT
defect

Tracking

()

RESOLVED FIXED
Future

People

(Reporter: ekrock, Assigned: bzbarsky)

References

()

Details

(Keywords: dom2, regression, testcase)

Attachments

(1 file)

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>
Summary: style.fontSize broken in M8? → {dom2} style.fontSize broken in M8?
Marked {dom2}.
Whiteboard: [TESTCASE]
Marked [TESTCASE] as the source file couldn't be any simpler.
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.)
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
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.
*** Bug 16247 has been marked as a duplicate of this bug. ***
style.fontSize seems to be broken again. Attaching a testcase.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached file testcase style.fontSize (deleted) —
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.)
Keywords: regression, rtm, testcase
QA Contact: vidur → gerardok
Whiteboard: [TESTCASE] → [rtm need info]
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?
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.
Reassigning to the guy who does the real DOM work. :-)
Assignee: vidur → jst
Status: REOPENED → NEW
For gods sake, get this off the rtm radar. There's no chance in hell that this will ever be fixed for rtm.
PDT marking [rtm-]. We've been apparently surviving with this bug for a long time.
Whiteboard: [rtm need info] INVALID? → [rtm-] INVALID?
I don't know what's right or wrong here, maybe the CSS pople know, reassigning to Pierre for futher triage.
Assignee: jst → pierre
Summary: {dom2} style.fontSize broken in M8? → Should CSS parser be in quirks mode for parsing from DOM?
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?
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
Keywords: dom2
Component: DOM Level 2 → DOM Style
Taking QA Contact on all open or unverified DOM Style bugs...
QA Contact: vidur → ian
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
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....
Taking this, since jst has futured it.
Assignee: jst → bzbarsky
Status: ASSIGNED → NEW
Blocks: 95336
Fixed by changes in bug 95336
Status: NEW → RESOLVED
Closed: 25 years ago23 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: