Closed
Bug 78202
Opened 24 years ago
Closed 24 years ago
getComputedStyle not implemented for text-decoration property
Categories
(Core :: DOM: CSS Object Model, defect)
Core
DOM: CSS Object Model
Tracking
()
VERIFIED
FIXED
mozilla0.9.1
People
(Reporter: glazou, Assigned: harishd)
References
Details
(Keywords: css1, dom2, testcase, Whiteboard: [Hixie-PF] [fix in hand])
Attachments
(2 files)
1.34 KB,
text/html
|
Details | |
1.88 KB,
patch
|
Details | Diff | Splinter Review |
getComputedStyle DOM 2 Style is not implemented for text-decoration property.
The answer is always "".
This is needed for the CSSization of Composer.
Reporter | ||
Comment 1•24 years ago
|
||
Reporter | ||
Comment 4•24 years ago
|
||
I have a question related to your patch :
+
+ if(text) {
+ const nsCString& decoration=
+
nsCSSProps::SearchKeywordTable(text->mTextDecoration,nsCSSProps::kTextDecorationKTable);
+ val->SetString(decoration);
+ }
+ else {
+ val->SetString("");
+ }
What means here a "" return string ?
Empty value is not a valid value for text-decoration. What does it mean ?
If it means 'equal to the initial value because the property is not inherited
and no specific value is assigned', I suggest you use the value "none" for
fallback instead of "".
Using the initial value should also be the fallback for all other properties.
Cc:ing Hixie because I would like to read his opinion.
Comment 5•24 years ago
|
||
I don't have a particular opinion. The result of GetComputedStyle for text-
decoration is quite well defined, and will be one of the following strings:
"none"
"underline" "overline"
"line-through" "blink"
"underline overline" "underline line-through"
"underline blink" "overline line-through"
"overline blink" "line-through blink"
"underline overline line-through" "underline overline blink"
"underline line-through blink" "overline line-through blink"
Note that the CSS3 text module will change this. In CSS3, "" will be a valid
response for GetComputedStyle.textDecoration. It will represent the cases that
do not map to the text-decoration shorthand (this is similar to how "border"
can be "" for some cases).
Comment 7•24 years ago
|
||
Daniel, you'd only get "" in an error case if the style system screws up, you'll
get default values n' all that from the style system.
sr=jst
Reporter | ||
Comment 8•24 years ago
|
||
aaaahhh, ok, thanks jst
Fix is in. Marking FIXED.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 10•24 years ago
|
||
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•