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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp

Issue 1537133002: Renaming: distinguish ancestor, container and paintInvalidationContainer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@SelectionInvalidation
Patch Set: Created 4 years, 12 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
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/layout/LayoutObject.h" 5 #include "core/layout/LayoutObject.h"
6 6
7 #include "core/layout/LayoutTestHelper.h" 7 #include "core/layout/LayoutTestHelper.h"
8 #include "core/layout/LayoutView.h" 8 #include "core/layout/LayoutView.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 setBodyInnerHTML( 111 setBodyInnerHTML(
112 "<div id='container' style='overflow: scroll; will-change: transform; wi dth: 50px; height: 50px'>" 112 "<div id='container' style='overflow: scroll; will-change: transform; wi dth: 50px; height: 50px'>"
113 " <span><img style='width: 20px; height: 100px'></span>" 113 " <span><img style='width: 20px; height: 100px'></span>"
114 " text text text text text text text" 114 " text text text text text text text"
115 "</div>"); 115 "</div>");
116 LayoutBlock* container = toLayoutBlock(document().getElementById("container" )->layoutObject()); 116 LayoutBlock* container = toLayoutBlock(document().getElementById("container" )->layoutObject());
117 LayoutText* text = toLayoutText(container->lastChild()); 117 LayoutText* text = toLayoutText(container->lastChild());
118 118
119 container->setScrollTop(50); 119 container->setScrollTop(50);
120 LayoutRect rect(0, 60, 20, 20); 120 LayoutRect rect(0, 60, 20, 20);
121 text->mapToVisibleRectInContainerSpace(container, rect, nullptr); 121 text->mapToVisibleRectInAncestorSpace(container, rect, nullptr);
122 EXPECT_TRUE(rect == LayoutRect(0, 10, 20, 20)); 122 EXPECT_TRUE(rect == LayoutRect(0, 10, 20, 20));
123 } 123 }
124 124
125 } 125 }
126 126
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutReplaced.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698