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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp

Issue 2701523003: Don't pixel-snap overflow clips in clip paint property nodes. (Closed)
Patch Set: Merge branch 'master' into fixclipping Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/PaintPropertyTreeBuilderTest.h" 5 #include "core/paint/PaintPropertyTreeBuilderTest.h"
6 6
7 #include "core/html/HTMLIFrameElement.h" 7 #include "core/html/HTMLIFrameElement.h"
8 #include "core/layout/LayoutTreeAsText.h" 8 #include "core/layout/LayoutTreeAsText.h"
9 #include "core/paint/ObjectPaintProperties.h" 9 #include "core/paint/ObjectPaintProperties.h"
10 #include "core/paint/PaintPropertyTreePrinter.h" 10 #include "core/paint/PaintPropertyTreePrinter.h"
(...skipping 3156 matching lines...) Expand 10 before | Expand all | Expand 10 after
3167 setBodyInnerHTML( 3167 setBodyInnerHTML(
3168 "<div id='target' style='overflow: auto; width: 100px; height: 100px'>" 3168 "<div id='target' style='overflow: auto; width: 100px; height: 100px'>"
3169 " <div style='width: 200px; height: 200px'></div>" 3169 " <div style='width: 200px; height: 200px'></div>"
3170 "</div>"); 3170 "</div>");
3171 3171
3172 const ObjectPaintProperties* properties = paintPropertiesForElement("target"); 3172 const ObjectPaintProperties* properties = paintPropertiesForElement("target");
3173 EXPECT_NE(CompositorElementId(), 3173 EXPECT_NE(CompositorElementId(),
3174 properties->scrollTranslation()->compositorElementId()); 3174 properties->scrollTranslation()->compositorElementId());
3175 } 3175 }
3176 3176
3177 TEST_P(PaintPropertyTreeBuilderTest, OverflowClipSubpixelPosition) {
3178 setBodyInnerHTML(
3179 "<style>body { margin: 20px 30px; }</style>"
3180 "<div id='clipper'"
3181 " style='position: relative; overflow: hidden; "
3182 " width: 400px; height: 300px; left: 1.5px'>"
3183 "</div>");
3184
3185 LayoutBoxModelObject* clipper = toLayoutBoxModelObject(
3186 document().getElementById("clipper")->layoutObject());
3187 const ObjectPaintProperties* clipProperties = clipper->paintProperties();
3188
3189 EXPECT_EQ(LayoutPoint(FloatPoint(31.5, 20)), clipper->paintOffset());
3190 EXPECT_EQ(FloatRect(31.5, 20, 400, 300),
3191 clipProperties->overflowClip()->clipRect().rect());
3192 }
3193
3177 } // namespace blink 3194 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698