Closed Bug 1408851 Opened 8 years ago Closed 8 years ago

negative calc()s for inset() should be valid

Categories

(Core :: CSS Parsing and Computation, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: chenpighead, Assigned: chenpighead)

Details

Attachments

(3 files)

Per bug 1378368 comment 9. > ::: layout/style/nsComputedDOMStyle.cpp:6421 > (Diff revision 1) > > position->GetCssText(positionString); > > shapeFunctionString.Append(positionString); > > break; > > } > > case StyleBasicShapeType::Inset: { > > BoxValuesToString(shapeFunctionString, aStyleBasicShape->Coordinates()); > > Negative values for `inset` like `inset(calc(10px - 20px))` should be valid. > Would you file a follow-up, please? > > The fix should be similar to this bug, but we need to add extra argument for > `BoxValuesToString` and pass `false` here.
Comment on attachment 8918793 [details] Bug 1408851 - part1: do not always clamp negative calc values in BoxValuesToString. https://reviewboard.mozilla.org/r/189640/#review195232
Attachment #8918793 - Flags: review?(tlin) → review+
Comment on attachment 8918794 [details] Bug 1408851 - part2: do not always clamp negative calc values while serializing basic-shape inset. https://reviewboard.mozilla.org/r/189642/#review195234
Attachment #8918794 - Flags: review?(tlin) → review+
Attachment #8918795 - Flags: review?(tlin) → review+
Pushed by jichen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/60d9e8195020 part1: do not always clamp negative calc values in BoxValuesToString. r=TYLin https://hg.mozilla.org/integration/autoland/rev/3eeaa611682e part2: do not always clamp negative calc values while serializing basic-shape inset. r=TYLin https://hg.mozilla.org/integration/autoland/rev/637c31729e35 part3: add test. r=TYLin
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: