Advanced Dialog for CSS properties should rely on ElementCSSInlineStyle

VERIFIED FIXED in mozilla0.9.2

Status

()

Core
Editor
P3
normal
VERIFIED FIXED
17 years ago
17 years ago

People

(Reporter: glazou, Assigned: glazou)

Tracking

Trunk
mozilla0.9.2
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Assignee)

Description

17 years ago
Advanced Dialog for CSS properties should rely on DOM Level 2
ElementCSSInlineStyle instead of parsing by hand the contents of the STYLE
attribute.
(Assignee)

Comment 1

17 years ago
Created attachment 33870 [details] [diff] [review]
patch v1.0
(Assignee)

Comment 2

17 years ago
Patch for this bug added above. I think it is much more reliable than the former
parsing "by hand" of tokens separated by semi-colons. In particular, the value
of a CSS property can be a string containing a semi-colon...

r= and sr= needed, thanks.
Status: NEW → ASSIGNED

Comment 3

17 years ago
r=cmanske
Can you solve the problem that we have in Advanced editor that we always end up
with separate CSS attributes (e.g.: border-left : 10px; border-right : 10px...)
instead of combined (e.g. border : 10px)?

Updated

17 years ago
Priority: -- → P3
Target Milestone: --- → mozilla0.9.2
(Assignee)

Comment 4

17 years ago
Hum. This is a very complex problem. 'border-width' is not really a property in
itself but a shorthand setting the 4 values of border-left -right -bottom -top.
I think that our CSS OM does not correctly support queries on shorthand properties
for the moment and your problem is a side-effect of that one.

Comment 5

17 years ago
Question ... the old code:

-  var style = element.getAttribute("style");

returns a string and the new code:

+  var style = element.style;

returns an object?

Shouldn't we check if style is undefined before we try to access style.length?

+  var style = element.style;
+  var l = style.length;
+
+  if(style == undefined || style == "" || l == 0)
(Assignee)

Comment 6

17 years ago
Agreed ; will submit a rewriting tomorrow
(Assignee)

Comment 7

17 years ago
Created attachment 34051 [details] [diff] [review]
patch v1.1
(Assignee)

Comment 8

17 years ago
patch re-submitted in answer to Kin. sr= ?

Comment 9

17 years ago
sr=kin@netscape.com with the changes we discussed over aim. (Remove dump 
statements where not neccessary.)
(Assignee)

Comment 10

17 years ago
Created attachment 34068 [details] [diff] [review]
new patch following AIM chat with kin
(Assignee)

Comment 11

17 years ago
yay! checked in :-) 
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED

Comment 12

17 years ago
Glazman, can you verify this and mark verified-fixed? thanks!

Comment 13

17 years ago
glazman, please verify this one...thanks...

Comment 14

17 years ago
code level fix...marking verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.