-
leviw@chromium.org authored
https://bugs.webkit.org/show_bug.cgi?id=101779 Reviewed by Simon Fraser. Source/WebCore: The old SnapOffsetForTransforms behavior fell apart when there was content nested in multiple levels of containers with sub-pixel offsets. The point of this flag was to mirror the pixel snapping that occurs in paint, where offsets are accumulated bottom- up through the render tree and snapped at the end. This change eliminates this flag and pushes pixel snapping logic down into TransformState. TransformState now tracks a LayoutSize accumulated offset when there's no transform or we're just translating. We then snap and apply this offset before accumulating values into a transform, and when returning planar coordinates to callers. Test: fast/sub-pixel/transformed-iframe-copy-on-scroll.html added, fast/sub-pixel/sub-pixel-iframe-copy-on-scroll.html modified to also catch this bug. * platform/graphics/transforms/TransformState.cpp: (WebCore::TransformState::operato...
104fddd8