Closed
Bug 1445605
Opened 5 years ago
Closed 5 years ago
Make GetCSSFloatValue use GetPropertyValue instead of GetPropertyCSSValue.
Categories
(Core :: DOM: Editor, enhancement)
Core
DOM: Editor
Tracking
()
RESOLVED
FIXED
mozilla61
Tracking | Status | |
---|---|---|
firefox61 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
Details
Attachments
(1 file, 1 obsolete file)
3.10 KB,
patch
|
masayuki
:
review+
|
Details | Diff | Splinter Review |
We only use it for properties that return pixels anyway, so we can use it without much problem. This also fixes bug 1428974.
Assignee | ||
Comment 1•5 years ago
|
||
We only use it for properties that return pixels anyway, so we can use it without much problem. This also fixes bug 1428974.
Attachment #8958777 -
Flags: review?(masayuki)
Comment 2•5 years ago
|
||
Comment on attachment 8958777 [details] [diff] [review] Make GetCSSFloatValue use GetPropertyValue instead of GetPropertyCSSValue. Review of attachment 8958777 [details] [diff] [review]: ----------------------------------------------------------------- ::: editor/libeditor/HTMLAnonymousNodeEditor.cpp @@ +62,4 @@ > return 0; > } > > + MOZ_ASSERT(value.Length() > 2, "Should always have a `px` suffix"); So, does nsComputedDOMStyle::GetPropertyValue() always return the value as CSS pixels, i.e., even if border-width is specified with "thin"/"medium"/"thick"? Your commit message and this bug report is really unclear to me. Please explain more for making any other developers who are not familiar with CSS implementation can understand easier.
Attachment #8958777 -
Flags: review?(masayuki) → review-
Assignee | ||
Comment 3•5 years ago
|
||
Comment on attachment 8958777 [details] [diff] [review] Make GetCSSFloatValue use GetPropertyValue instead of GetPropertyCSSValue. Yes, see bug 1428974, which was filed because we don't need to handle those. Per spec borders are resolved to pixels.
Attachment #8958777 -
Flags: review- → review?(masayuki)
Assignee | ||
Comment 4•5 years ago
|
||
You can see this easily with: document.body.style.border = "1px solid thin"; getComputedStyle(document.body).getPropertyValue("border")
Assignee | ||
Comment 5•5 years ago
|
||
Err, getPropertyValue("border-left-width"); I mean
Comment 6•5 years ago
|
||
Okay, could you explain that getPropertyValue() always returns pixels in the commit message and comment in HTMLAnonymousNodeEditor.cpp? Without the explanation, some developers may start to investigate if it's buggy like me.
Assignee | ||
Comment 7•5 years ago
|
||
Attachment #8959109 -
Flags: review?(masayuki)
Assignee | ||
Updated•5 years ago
|
Attachment #8958777 -
Attachment is obsolete: true
Attachment #8958777 -
Flags: review?(masayuki)
Comment 8•5 years ago
|
||
Comment on attachment 8959109 [details] [diff] [review] With comments. Thanks!
Attachment #8959109 -
Flags: review?(masayuki) → review+
Pushed by ecoal95@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/7b2dbf5775c9 Make GetCSSFloatValue use GetPropertyValue instead of GetPropertyCSSValue. r=masayuki
Comment 10•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/7b2dbf5775c9
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox61:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in
before you can comment on or make changes to this bug.
Description
•