Closed Bug 779010 Opened 10 years ago Closed 10 years ago

nsStyleSides comparison always assume Calc values are different

Categories

(Core :: CSS Parsing and Computation, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: mattwoodrow, Assigned: mattwoodrow)

Details

Attachments

(2 files, 1 obsolete file)

Attached patch Compare calc values (obsolete) — Splinter Review
This is causing unnecessary invalidation in Gaia.
Attachment #647374 - Flags: review?(roc)
Attachment #647374 - Flags: review?(roc) → review?(dbaron)
Comment on attachment 647374 [details] [diff] [review]
Compare calc values

Could you just get rid of this macro and construct an nsStyleCoord for each side?  nsStyleCoord::nsStyleCoord(const nsStyleUnion&, nsStyleUnit) is inline and quite cheap, and then this logic will be in one place (nsStyleCoord::operator==) rather than two.
Comment on attachment 647374 [details] [diff] [review]
Compare calc values

Good catch, though, but I'd like this not to happen in the future (see previous comment).

(Alternatively, if you think that there would be a performance difference, you could refactor the macro so it's used by both places and there's only one thing to change.  But I don't think it's worth it.)
Attachment #647374 - Flags: review?(dbaron) → review-
Seems reasonable, updated the patch
Attachment #647374 - Attachment is obsolete: true
Attachment #647393 - Flags: review?(dbaron)
Comment on attachment 647393 [details] [diff] [review]
Compare calc values v2

r=dbaron.  Thanks for finding and fixing this.
Attachment #647393 - Flags: review?(dbaron) → review+
Assignee: nobody → matt.woodrow
https://hg.mozilla.org/mozilla-central/rev/a57c83db51a7
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Attachment #647659 - Flags: review?(dbaron)
Comment on attachment 647659 [details] [diff] [review]
Mochitest for this bug

r=dbaron
Attachment #647659 - Flags: review?(dbaron) → review+
You need to log in before you can comment on or make changes to this bug.