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

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

Issue 1863143002: Use correct clip container when computing acl for scroll children (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update test expectations Created 4 years, 7 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/layout/compositing/CompositedLayerMapping.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/compositing/CompositedLayerMapping.h" 5 #include "core/layout/compositing/CompositedLayerMapping.h"
6 6
7 #include "core/frame/FrameView.h" 7 #include "core/frame/FrameView.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 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 Element* negativeCompositedChild = document().getElementById("negative-compo sited-child"); 619 Element* negativeCompositedChild = document().getElementById("negative-compo sited-child");
620 negativeCompositedChild->parentNode()->removeChild(negativeCompositedChild); 620 negativeCompositedChild->parentNode()->removeChild(negativeCompositedChild);
621 document().view()->updateAllLifecyclePhases(); 621 document().view()->updateAllLifecyclePhases();
622 622
623 mapping = toLayoutBlock(getLayoutObjectByElementId("container"))->layer()->c ompositedLayerMapping(); 623 mapping = toLayoutBlock(getLayoutObjectByElementId("container"))->layer()->c ompositedLayerMapping();
624 ASSERT_TRUE(mapping->scrollingContentsLayer()); 624 ASSERT_TRUE(mapping->scrollingContentsLayer());
625 EXPECT_EQ(static_cast<GraphicsLayerPaintingPhase>(GraphicsLayerPaintOverflow Contents | GraphicsLayerPaintCompositedScroll | GraphicsLayerPaintForeground), m apping->scrollingContentsLayer()->paintingPhase()); 625 EXPECT_EQ(static_cast<GraphicsLayerPaintingPhase>(GraphicsLayerPaintOverflow Contents | GraphicsLayerPaintCompositedScroll | GraphicsLayerPaintForeground), m apping->scrollingContentsLayer()->paintingPhase());
626 EXPECT_FALSE(mapping->foregroundLayer()); 626 EXPECT_FALSE(mapping->foregroundLayer());
627 } 627 }
628 628
629 TEST_F(CompositedLayerMappingTest, OverflowAndClippingWithACL)
630 {
631 document().frame()->settings()->setPreferCompositingToLCDTextEnabled(true);
632 setBodyInnerHTML(
633 "<div style='height:700px; overflow-y:scroll; background-color:red;'>"
634 " <div style='overflow:hidden; width: 700px; height:2000px;'>"
635 " <div id='hidden' style='background-color:blue; width: 700px; height :2000px; position:relative;'></div>"
636 " </div>"
637 "</div>");
638 CompositedLayerMapping* mapping = toLayoutBlock(getLayoutObjectByElementId(" hidden"))->layer()->compositedLayerMapping();
639 ASSERT_TRUE(mapping->ancestorClippingLayer());
640 EXPECT_EQ(2000.f, mapping->ancestorClippingLayer()->size().height());
641 }
642
629 } // namespace blink 643 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698