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

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

Issue 2552093002: SVG root's contentsProperties should for contents in HTML space (Closed)
Patch Set: - Created 4 years 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/ObjectPaintProperties.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/html/HTMLIFrameElement.h" 5 #include "core/html/HTMLIFrameElement.h"
6 #include "core/layout/LayoutTestHelper.h" 6 #include "core/layout/LayoutTestHelper.h"
7 #include "core/layout/LayoutTreeAsText.h" 7 #include "core/layout/LayoutTreeAsText.h"
8 #include "core/layout/api/LayoutViewItem.h" 8 #include "core/layout/api/LayoutViewItem.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 2267 matching lines...) Expand 10 before | Expand all | Expand 10 after
2278 LayoutObject& svgWithViewBox = 2278 LayoutObject& svgWithViewBox =
2279 *document().getElementById("svgWithViewBox")->layoutObject(); 2279 *document().getElementById("svgWithViewBox")->layoutObject();
2280 const ObjectPaintProperties* svgWithViewBoxProperties = 2280 const ObjectPaintProperties* svgWithViewBoxProperties =
2281 svgWithViewBox.paintProperties(); 2281 svgWithViewBox.paintProperties();
2282 2282
2283 EXPECT_EQ(framePreTranslation(), 2283 EXPECT_EQ(framePreTranslation(),
2284 svgWithViewBoxProperties->localBorderBoxProperties() 2284 svgWithViewBoxProperties->localBorderBoxProperties()
2285 ->propertyTreeState.transform()); 2285 ->propertyTreeState.transform());
2286 2286
2287 auto contentsProperties = svgWithViewBoxProperties->contentsProperties(); 2287 auto contentsProperties = svgWithViewBoxProperties->contentsProperties();
2288 EXPECT_EQ(LayoutPoint(), contentsProperties.paintOffset); 2288 EXPECT_EQ(LayoutPoint(30, 20), contentsProperties.paintOffset);
2289 EXPECT_EQ(svgWithViewBoxProperties->svgLocalToBorderBoxTransform(), 2289 EXPECT_EQ(framePreTranslation(),
2290 contentsProperties.propertyTreeState.transform()); 2290 contentsProperties.propertyTreeState.transform());
2291 } 2291 }
2292 2292
2293 TEST_P(PaintPropertyTreeBuilderTest, OverflowHiddenScrollProperties) { 2293 TEST_P(PaintPropertyTreeBuilderTest, OverflowHiddenScrollProperties) {
2294 setBodyInnerHTML( 2294 setBodyInnerHTML(
2295 "<style>" 2295 "<style>"
2296 " body {" 2296 " body {"
2297 " margin: 0px;" 2297 " margin: 0px;"
2298 " }" 2298 " }"
2299 " #overflowHidden {" 2299 " #overflowHidden {"
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
3023 EXPECT_FALSE(document().layoutView()->descendantNeedsPaintPropertyUpdate()); 3023 EXPECT_FALSE(document().layoutView()->descendantNeedsPaintPropertyUpdate());
3024 EXPECT_FALSE(transform->needsPaintPropertyUpdate()); 3024 EXPECT_FALSE(transform->needsPaintPropertyUpdate());
3025 EXPECT_FALSE(transform->descendantNeedsPaintPropertyUpdate()); 3025 EXPECT_FALSE(transform->descendantNeedsPaintPropertyUpdate());
3026 EXPECT_FALSE(iframeLayoutView->needsPaintPropertyUpdate()); 3026 EXPECT_FALSE(iframeLayoutView->needsPaintPropertyUpdate());
3027 EXPECT_FALSE(iframeLayoutView->descendantNeedsPaintPropertyUpdate()); 3027 EXPECT_FALSE(iframeLayoutView->descendantNeedsPaintPropertyUpdate());
3028 EXPECT_FALSE(iframeTransform->needsPaintPropertyUpdate()); 3028 EXPECT_FALSE(iframeTransform->needsPaintPropertyUpdate());
3029 EXPECT_FALSE(iframeTransform->descendantNeedsPaintPropertyUpdate()); 3029 EXPECT_FALSE(iframeTransform->descendantNeedsPaintPropertyUpdate());
3030 } 3030 }
3031 3031
3032 } // namespace blink 3032 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/ObjectPaintProperties.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698