Summary: | Use explicit constructor to convert from Int/FloatSize to Int/FloatPoint | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Steve Block <steveblock> | ||||||
Component: | New Bugs | Assignee: | Steve Block <steveblock> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | eric, haraken, ojan.autocc, simon.fraser, steveblock, webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Steve Block
2013-01-06 21:37:19 PST
Created attachment 181477 [details]
Patch
This is easier to read than using operator+ with a zero Int/FloatPoint. Comment on attachment 181477 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=181477&action=review > Source/WebCore/rendering/RenderLayerBacking.cpp:623 > + m_ancestorClippingLayer->setPosition(IntPoint(parentClipRect.location() - graphicsLayerParentLocation)); Nit: How about using FloatPoint() instead of IntPoint(), since GraphicLayers::setPosition() expects a FloatPoint? > Source/WebCore/rendering/RenderLayerBacking.cpp:633 > + m_graphicsLayer->setPosition(IntPoint(relativeCompositingBounds.location() - graphicsLayerParentLocation)); Ditto. > Source/WebCore/rendering/RenderLayerBacking.cpp:651 > + clipLayer->setPosition(IntPoint(clippingBox.location() - localCompositingBounds.location())); Ditto. > Source/WebCore/rendering/RenderLayerBacking.cpp:736 > + m_scrollingLayer->setPosition(IntPoint(paddingBox.location() - localCompositingBounds.location())); Ditto. Created attachment 181623 [details]
Patch
I thought that it was good to make clear that the arguments to setPosition() were integer types, rather than floating types, but I don't feel strongly. Done. Comment on attachment 181623 [details] Patch Clearing flags on attachment: 181623 Committed r139032: <http://trac.webkit.org/changeset/139032> All reviewed patches have been landed. Closing bug. |