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

Unified Diff: third_party/WebKit/LayoutTests/paint/subpixel/subpixel-accumulation-with-layer.html

Issue 2112753002: Snap paint offset paint property to pixel boundaries (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More unit tests for simple snapping and fixed position Created 4 years, 6 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: third_party/WebKit/LayoutTests/paint/subpixel/subpixel-accumulation-with-layer.html
diff --git a/third_party/WebKit/LayoutTests/paint/subpixel/subpixel-accumulation-with-layer.html b/third_party/WebKit/LayoutTests/paint/subpixel/subpixel-accumulation-with-layer.html
new file mode 100644
index 0000000000000000000000000000000000000000..11fb50feaad40aedd4e89e5b037fcf30c36ba501
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/paint/subpixel/subpixel-accumulation-with-layer.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<style>
+ div { position: relative; }
+</style>
+PASS if there is no red visible.
+<!-- This div should be snapped up to (1,1) -->
+<div style="width: 70px; height: 70px; left: 0.7px; top: 0.7px;">
+ <div style="background: red; width: 40px; height: 40px; transform: translateZ(0);">
+ <!-- Because the first div is snapped up to (1,1), this div will start with a -->
+ <!-- paint offset of (-0.3,-0.3) which will be added to (0.7,0.7) to get -->
+ <!-- (0.4,0.4) which rounds down to (0,0) and obscures the red div. -->
+ <div style="background: white; width: 40px; height: 40px; left: 0.7px; top: 0.7px;"></div>
+ </div>
+</div>

Powered by Google App Engine
This is Rietveld 408576698