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

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: rebase and go back to last patch 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 9cc742b9c67879ea25f09b6ae2821e83c6918222..d7b29c7e9ca57298e19442627cf896666ffc41ff 100644
--- a/Source/core/layout/Layer.cpp
+++ b/Source/core/layout/Layer.cpp
@@ -1627,6 +1627,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);
@@ -1634,7 +1635,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);
esprehn 2015/03/24 23:13:23 extra space
qiankun 2015/03/26 11:06:25 Done.
// 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.

Powered by Google App Engine
This is Rietveld 408576698