Bug 261298
| Summary: | Make TranslateTransformOperation::X/Y return const Length& | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> |
| Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Normal | CC: | bfulgham, mattwoodrow, simon.fraser, zalan |
| Priority: | P2 | ||
| Version: | Safari Technology Preview | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Ahmad Saleem
Hi Team,
Based on discussion with Matt over email, it makes sense to merge but it does not have much benefit but still good to add.
Blink Commit: https://chromium-review.googlesource.com/c/chromium/src/+/970821
GitHub WebKit Source: https://github.com/WebKit/WebKit/blob/641608e9630336fbbd011dc072655ee83bdf7b03/Source/WebCore/platform/graphics/transforms/TranslateTransformOperation.h#L56 etc.
___
Local Patch in .h:
const Length& x() const { return m_x; }
const Length& y() const { return m_y; }
and in .cpp:
const auto* fromOp = downcast<TranslateTransformOperation>(from);
const Length& fromX = fromOp ? fromOp->m_x : zeroLength;
const Length& fromY = fromOp ? fromOp->m_y : zeroLength;
____
Just wanted to raise to merge it.
Thanks!
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Ahmad Saleem
Simon's comment on Slack - i don't think it's worth doing this. Length is < 64 bits
Ahmad Saleem
PR attempt for reference - https://github.com/WebKit/WebKit/pull/17558