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

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: fix layout tests 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..29ca4543d9cdf08860de74ac48f9a5a00abd7187 100644
--- a/Source/core/layout/Layer.cpp
+++ b/Source/core/layout/Layer.cpp
@@ -1627,6 +1627,11 @@ void Layer::collectFragments(LayerFragments& fragments, const Layer* rootLayer,
ancestorClipRect.intersect(dirtyRect);
}
+ LayoutSize subPixelAccumulationIfNeeded;
+ if (isAllowedToQueryCompositingState())
qiankun 2015/03/10 10:13:16 Check isAllowedToQueryCompositingState() to make s
leviw_travelin_and_unemployed 2015/03/10 17:55:51 This isn't the right fix. I talked to chrishtr an
+ subPixelAccumulationIfNeeded = compositingState() == PaintsIntoOwnBacking ? LayoutSize() : subPixelAccumulation;
+ else
+ subPixelAccumulationIfNeeded = LayoutSize();
for (size_t i = 0; i < fragments.size(); ++i) {
LayerFragment& fragment = fragments.at(i);
@@ -1634,7 +1639,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);
// 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