Closed
Bug 97052
Opened 24 years ago
Closed 23 years ago
[review]getComputedStyle returns default value for border width when there is no border
Categories
(Core :: DOM: CSS Object Model, defect, P4)
Tracking
()
RESOLVED
FIXED
mozilla0.9.6
People
(Reporter: tfriesen, Assigned: pierre)
References
Details
(Whiteboard: [fix in hand])
Attachments
(3 files)
617 bytes,
text/html
|
Details | |
1.44 KB,
patch
|
jst
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
1.13 KB,
text/html
|
Details |
getComputedStyle returns "medium" as the default value for border width even
if there is no border present.
According to CSS2,this value is correct if there is actually a border.
But if the border style has not been set (ie no border),then
the border width should be "0"
![]() |
||
Comment 1•23 years ago
|
||
reassign to harish
Assignee: jst → harishd
Summary: getComputedStyle returns default value for border width when there is no border → getComputedStyle returns default value for border width when there is no border
![]() |
||
Comment 2•23 years ago
|
||
![]() |
||
Updated•23 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
This is probably a style system bug since getComputedStyle just retrieves values
from stylecontext. CCing pierre.
Priority: -- → P4
![]() |
||
Comment 4•23 years ago
|
||
Actually, in this case the problem is that the stylecontext value should _not_
be used if border is none... Assumung I understand the style contexts
correctly...
Assignee | ||
Comment 5•23 years ago
|
||
Thank you Boris for the testcase. I'll attach a patch.
jst/boris: please review.
Assignee: harishd → pierre
Whiteboard: [fix in hand]
Target Milestone: --- → mozilla0.9.6
Assignee | ||
Comment 6•23 years ago
|
||
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
![]() |
||
Comment 7•23 years ago
|
||
![]() |
||
Comment 8•23 years ago
|
||
Pierre, do you really need the temporary |borderStyle| var? I guess it's a
style issue... not sure what's best there.
Either way, looks good and works perfectly. r=bzbarsky
Assignee | ||
Comment 9•23 years ago
|
||
The variable is not necessary. Separating steps is an inconspicuous habit of
mine that allows to put conditional breakpoints in debug builds. In optimized
builds, I'm fairly sure no assignment is made (or maybe to an internal register,
and it would have taken place anyhow).
Assignee | ||
Updated•23 years ago
|
Summary: getComputedStyle returns default value for border width when there is no border → [review]getComputedStyle returns default value for border width when there is no border
Comment 10•23 years ago
|
||
Comment on attachment 50742 [details] [diff] [review]
patch
sr=jst
Attachment #50742 -
Flags: superreview+
Attachment #50742 -
Flags: review+
Assignee | ||
Comment 11•23 years ago
|
||
Fix checked into the trunk.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•