Closed
Bug 263685
Opened 21 years ago
Closed 21 years ago
getComputedStyle not working on -moz-outline-radius
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
People
(Reporter: aaronlev, Assigned: aaronlev)
Details
Attachments
(1 file)
5.64 KB,
patch
|
roc
:
review+
dbaron
:
superreview+
|
Details | Diff | Splinter Review |
(Spinoff from bug 24676)
Code needs to be edited in mozilla/content/html/style/src/nsComputedDOMStyle.cpp
to support computed style for -moz-outline-radius
Assignee | ||
Comment 1•21 years ago
|
||
With this patch the following code returns the correct thing:
document.defaultView.getComputedStyle(node,'').getPropertyValue("-moz-outline-radius-topleft"));
However, I cannot seem to get any of these lines to work:
node.outline = "solid 3px black"; node.mozOutline = "solid 3px black";
node.outlineStyle = "solid"; node.mozOutlineStyle = "solid"
node.outlineWidth = "3px"; node.mozOutlineWidth = "3px";
node.outlineColor = "black"; node.mozOutlineColor = "black";
node.outlineRadius = "2px"; node.mozOutlineRadius = "2px";
etc.
P.S. When should we get rid of the -moz and just make it outline?
Assignee: dbaron → aaronleventhal
Status: NEW → ASSIGNED
Assignee | ||
Updated•21 years ago
|
Attachment #161638 -
Flags: superreview?(dbaron)
Assignee | ||
Comment 2•21 years ago
|
||
Actually changing the outline through node.style does work, but you have to
capitalize the M in Moz, e.g.:
node.MozOutline = "solid 3px black";
I was thrown off by that -- usualy JS properties start with a lowercase letter.
Comment on attachment 161638 [details] [diff] [review]
Support outline in computed style
>+ switch (aSide) {
>+ case NS_SIDE_TOP:
>+ outline->mOutlineRadius.GetTop(coord);
>+ break;
>+ case NS_SIDE_BOTTOM:
>+ outline->mOutlineRadius.GetBottom(coord);
>+ break;
>+ case NS_SIDE_LEFT:
>+ outline->mOutlineRadius.GetLeft(coord);
>+ break;
>+ case NS_SIDE_RIGHT:
>+ outline->mOutlineRadius.GetRight(coord);
>+ break;
>+ default:
>+ NS_WARNING("double check the side");
>+ break;
>+ }
Change this to just be:
outline->mOutlineRadius.Get(aSide, coord);
and fix where you copied it from as well. (nsComputedDOMStyle has too much
copy&pasted code. It needs to use nsCSSPropList.h somehow. It may be worth
filing a bug on that (probably on me).)
>+ // Don't impl _moz_outline / outline since it just returns null as per spec
Don't add this -- there's already a comment above explaining what "////" means,
and you're not adding this comment to all the other "////", which seems to
imply that it's different from them, which it isn't.
sr=dbaron with those changes
Attachment #161638 -
Flags: superreview?(dbaron) → superreview+
Assignee | ||
Comment 4•21 years ago
|
||
Comment on attachment 161638 [details] [diff] [review]
Support outline in computed style
Will post a new patch addressing David's comments if requested to do so.
Attachment #161638 -
Flags: review?(roc)
Attachment #161638 -
Flags: review?(roc) → review+
Assignee | ||
Comment 5•21 years ago
|
||
Checking in nsComputedDOMStyle.cpp;
/cvsroot/mozilla/content/html/style/src/nsComputedDOMStyle.cpp,v <--
nsComputedDOMStyle.cpp
new revision: 1.130; previous revision: 1.129
done
Checking in nsComputedDOMStyle.h;
/cvsroot/mozilla/content/html/style/src/nsComputedDOMStyle.h,v <--
nsComputedDOMStyle.h
new revision: 1.23; previous revision: 1.22
done
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•