-moz-text-decoration-style: -moz-none; does paint the decoration lines

RESOLVED FIXED in mozilla6

Status

()

Core
Layout: Text
--
minor
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: masayuki, Assigned: masayuki)

Tracking

({dev-doc-complete})

Trunk
mozilla6
dev-doc-complete
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Created attachment 524417 [details] [diff] [review]
Patch v1.0

I missed to implement the actual behavior of -moz-none in bug 59109. I realized this bug at working on bug 537230...
Attachment #524417 - Flags: review?(dbaron)
Status: NEW → ASSIGNED

Updated

6 years ago
Keywords: dev-doc-needed
> dev-doc-needed

I think that we shouldn't document -moz-none for -moz-text-decoration-style. The value is used only internally, and web developers shouldn't use it. Furthermore, we're not going to propose it for web standards.

Comment 2

6 years ago
Documentation is also required for internal use. 
Generally everything should be documented (IMHO), where appropriate with a hint like "not intended for use in public web pages". We have such things for some other CSS properties or values.
Comment on attachment 524417 [details] [diff] [review]
Patch v1.0

>-  NS_ASSERTION(aStyle != NS_STYLE_TEXT_DECORATION_STYLE_NONE, "aStyle is none");
>+  NS_ENSURE_TRUE(aStyle != NS_STYLE_TEXT_DECORATION_STYLE_NONE, );

This should either stay an assertion or that it be an if (...) { return; }.  If you don't actually hit it, leave it an assertion, otherwise make it a return without any console output.

>-  if (decorations == NS_STYLE_TEXT_DECORATION_NONE)
>+  if (decorations == NS_STYLE_TEXT_DECORATION_NONE ||
>+      (underStyle == NS_STYLE_TEXT_DECORATION_STYLE_NONE &&
>+       overStyle == NS_STYLE_TEXT_DECORATION_STYLE_NONE &&
>+       strikeStyle == NS_STYLE_TEXT_DECORATION_STYLE_NONE)) {
>     return NS_OK;
>+  }

I don't think this check is worth the extra code, and it also looks like it will read uninitialized memory and therefore not actually be useful unless all three decorations are present and all set to a none style.  I'd say just leave this as it was.

r=dbaron with that
Attachment #524417 - Flags: review?(dbaron) → review+
http://hg.mozilla.org/mozilla-central/rev/6c66c546fb04
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla6
Mentioned on https://developer.mozilla.org/en/CSS/text-decoration-style
Keywords: dev-doc-needed → dev-doc-complete
You need to log in before you can comment on or make changes to this bug.