Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1093)

Unified Diff: Source/core/layout/Layer.cpp

Issue 976543002: Fix pixel snapping issue when transforming (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/layout/Layer.cpp
diff --git a/Source/core/layout/Layer.cpp b/Source/core/layout/Layer.cpp
index c34cc2b2340fcd9b828f5c8736b5e1b5cede54d8..7d89f35ff00d0b1fbddc5e7b60abc74fb45fd0b7 100644
--- a/Source/core/layout/Layer.cpp
+++ b/Source/core/layout/Layer.cpp
@@ -1628,6 +1628,7 @@ void Layer::collectFragments(LayerFragments& fragments, const Layer* rootLayer,
ancestorClipRect.intersect(dirtyRect);
}
+ const LayoutSize subPixelAccumulationIfNeeded = compositingState() == PaintsIntoOwnBacking ? LayoutSize() : subPixelAccumulation;
for (size_t i = 0; i < fragments.size(); ++i) {
LayerFragment& fragment = fragments.at(i);
@@ -1635,7 +1636,7 @@ void Layer::collectFragments(LayerFragments& fragments, const Layer* rootLayer,
fragment.setRects(layerBoundsInFlowThread, backgroundRectInFlowThread, foregroundRectInFlowThread, outlineRectInFlowThread);
// Shift to the root-relative physical position used when painting the flow thread in this fragment.
- fragment.moveBy(fragment.paginationOffset + offsetOfPaginationLayerFromRoot);
+ fragment.moveBy(fragment.paginationOffset + offsetOfPaginationLayerFromRoot + subPixelAccumulationIfNeeded);
qiankun 2015/03/10 01:37:00 Hi Chris, this code is what I said fixed the multi
// Intersect the fragment with our ancestor's background clip so that e.g., columns in an overflow:hidden block are
// properly clipped by the overflow.
« no previous file with comments | « LayoutTests/fast/sub-pixel/fractional-border-location-and-size-expected.html ('k') | Source/core/paint/LayerPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698