Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/PaintLayer.h" | 5 #include "core/paint/PaintLayer.h" |
| 6 | 6 |
| 7 #include "core/html/HTMLIFrameElement.h" | 7 #include "core/html/HTMLIFrameElement.h" |
| 8 #include "core/layout/LayoutBoxModelObject.h" | 8 #include "core/layout/LayoutBoxModelObject.h" |
| 9 #include "core/layout/LayoutTestHelper.h" | 9 #include "core/layout/LayoutTestHelper.h" |
| 10 #include "core/layout/LayoutView.h" | 10 #include "core/layout/LayoutView.h" |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 491 EXPECT_EQ(LayoutRect(0, 30, 50, 10), contentLayer->visualRect()); | 491 EXPECT_EQ(LayoutRect(0, 30, 50, 10), contentLayer->visualRect()); |
| 492 EXPECT_EQ(LayoutRect(0, 30, 50, 5), content->visualRect()); | 492 EXPECT_EQ(LayoutRect(0, 30, 50, 5), content->visualRect()); |
| 493 | 493 |
| 494 scroller->getScrollableArea()->setScrollOffset(ScrollOffset(0, 20), | 494 scroller->getScrollableArea()->setScrollOffset(ScrollOffset(0, 20), |
| 495 ProgrammaticScroll); | 495 ProgrammaticScroll); |
| 496 document().view()->updateAllLifecyclePhases(); | 496 document().view()->updateAllLifecyclePhases(); |
| 497 EXPECT_EQ(LayoutRect(0, 30, 50, 10), contentLayer->visualRect()); | 497 EXPECT_EQ(LayoutRect(0, 30, 50, 10), contentLayer->visualRect()); |
| 498 EXPECT_EQ(LayoutRect(0, 30, 50, 5), content->visualRect()); | 498 EXPECT_EQ(LayoutRect(0, 30, 50, 5), content->visualRect()); |
| 499 } | 499 } |
| 500 | 500 |
| 501 TEST_P(PaintLayerTest, CompositingContainerFloat) { | |
| 502 enableCompositing(); | |
| 503 setBodyInnerHTML( | |
| 504 "<div id='containingBlock' style='position: relative; z-index: 0'>" | |
| 505 "<div style='backface-visibility: hidden'></div>" | |
|
Xianzhu
2017/01/07 01:04:46
Nit: indent line 505-508 by 2 spaces after '"'.
chrishtr
2017/01/07 01:15:00
Fixed.
| |
| 506 "<span style='clip-path: polygon(0px 15px, 0px 54px, 100px 0px)'>" | |
| 507 " <div id='target' style='float: right; position: relative'></div>" | |
| 508 "</span>" | |
| 509 "</html>"); | |
|
Xianzhu
2017/01/07 01:04:46
Nit: s/html/div/
chrishtr
2017/01/07 01:15:00
Fixed.
| |
| 510 | |
| 511 PaintLayer* target = | |
| 512 toLayoutBoxModelObject(getLayoutObjectByElementId("target"))->layer(); | |
| 513 PaintLayer* containingBlock = | |
| 514 toLayoutBoxModelObject(getLayoutObjectByElementId("containingBlock")) | |
| 515 ->layer(); | |
| 516 EXPECT_EQ(containingBlock, target->compositingContainer()); | |
| 517 } | |
| 518 | |
| 501 } // namespace blink | 519 } // namespace blink |
| OLD | NEW |