Summary: | [CSS Shapes] Shapes should not cause relayout when they are equivalent | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Bear Travis <betravis> | ||||
Component: | CSS | Assignee: | Bear Travis <betravis> | ||||
Status: | RESOLVED LATER | ||||||
Severity: | Normal | CC: | ahmad.saleem792, bjonesbe, commit-queue, donggwan.kim, esprehn+autocc, glenn, koivisto, zalan, zoltan | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 89256 | ||||||
Attachments: |
|
Description
Bear Travis
2012-07-24 14:36:17 PDT
This also affects shape-outside, not just shape-inside. *** Bug 100811 has been marked as a duplicate of this bug. *** Created attachment 204744 [details]
Initial patch
Comment on attachment 204744 [details] Initial patch View in context: https://bugs.webkit.org/attachment.cgi?id=204744&action=review > Source/WebCore/ChangeLog:11 > + The two layouts are equivalent, so there are no new tests. If this is being done for performance, do you have any perf results that this made better? Is there a benchmark you are using or a test case you are investigating? > Source/WebCore/rendering/style/BasicShapes.h:98 > + virtual bool operator==(const BasicShape& other) You should add OVERRIDE here (and on all the others below). Given that this is a virtual function, does this really need to be inline? > Source/WebCore/rendering/style/BasicShapes.h:211 > + for (size_t i = 0; i < values().size(); i++) > + if (getXAt(i) != otherPolygon->getXAt(i) || getYAt(i) != otherPolygon->getYAt(i)) > + return false; The for-loop needs braces. Comment on attachment 204744 [details]
Initial patch
Pulling this out from the review queue, since it's need to be updated. (Changelog: [CSS Exclusions])
Closing bug until we have a perf test to verify the improvement. Just to add we do have FIXME still in our code referring to bug, which is marked duplicate of this: https://searchfox.org/wubkat/source/Source/WebCore/rendering/RenderBox.cpp#447 // FIXME: A future optimization would do a deep comparison for equality. (bug 100811) if (shapeOutside == oldShapeOutside && shapeMargin == oldShapeMargin && shapeImageThreshold == oldShapeImageThreshold) return; |