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

Side by Side Diff: third_party/WebKit/Source/web/tests/ScrollingCoordinatorTest.cpp

Issue 2810873007: Replace LayoutPart::GetFrameViewBase with GetNodeFrameView (Closed)
Patch Set: No need for child_frame_view var Created 3 years, 8 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/PrePaintTreeWalk.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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 Element* scrollable_frame = 663 Element* scrollable_frame =
664 GetFrame()->GetDocument()->GetElementById("scrollable"); 664 GetFrame()->GetDocument()->GetElementById("scrollable");
665 ASSERT_TRUE(scrollable_frame); 665 ASSERT_TRUE(scrollable_frame);
666 666
667 LayoutObject* layout_object = scrollable_frame->GetLayoutObject(); 667 LayoutObject* layout_object = scrollable_frame->GetLayoutObject();
668 ASSERT_TRUE(layout_object); 668 ASSERT_TRUE(layout_object);
669 ASSERT_TRUE(layout_object->IsLayoutPart()); 669 ASSERT_TRUE(layout_object->IsLayoutPart());
670 670
671 LayoutPart* layout_part = ToLayoutPart(layout_object); 671 LayoutPart* layout_part = ToLayoutPart(layout_object);
672 ASSERT_TRUE(layout_part); 672 ASSERT_TRUE(layout_part);
673 ASSERT_TRUE(layout_part->GetFrameViewBase());
674 ASSERT_TRUE(layout_part->GetFrameViewBase()->IsFrameView());
675 673
676 FrameView* inner_frame_view = ToFrameView(layout_part->GetFrameViewBase()); 674 FrameView* inner_frame_view = layout_part->ChildFrameView();
675 ASSERT_TRUE(inner_frame_view);
676
677 LayoutViewItem inner_layout_view_item = inner_frame_view->GetLayoutViewItem(); 677 LayoutViewItem inner_layout_view_item = inner_frame_view->GetLayoutViewItem();
678 ASSERT_FALSE(inner_layout_view_item.IsNull()); 678 ASSERT_FALSE(inner_layout_view_item.IsNull());
679 679
680 PaintLayerCompositor* inner_compositor = inner_layout_view_item.Compositor(); 680 PaintLayerCompositor* inner_compositor = inner_layout_view_item.Compositor();
681 ASSERT_TRUE(inner_compositor->InCompositingMode()); 681 ASSERT_TRUE(inner_compositor->InCompositingMode());
682 682
683 GraphicsLayer* scroll_layer = 683 GraphicsLayer* scroll_layer =
684 inner_frame_view->LayoutViewportScrollableArea()->LayerForScrolling(); 684 inner_frame_view->LayoutViewportScrollableArea()->LayerForScrolling();
685 ASSERT_TRUE(scroll_layer); 685 ASSERT_TRUE(scroll_layer);
686 ASSERT_EQ(inner_frame_view->LayoutViewportScrollableArea(), 686 ASSERT_EQ(inner_frame_view->LayoutViewportScrollableArea(),
(...skipping 28 matching lines...) Expand all
715 Element* scrollable_frame = 715 Element* scrollable_frame =
716 GetFrame()->GetDocument()->GetElementById("scrollable"); 716 GetFrame()->GetDocument()->GetElementById("scrollable");
717 ASSERT_TRUE(scrollable_frame); 717 ASSERT_TRUE(scrollable_frame);
718 718
719 LayoutObject* layout_object = scrollable_frame->GetLayoutObject(); 719 LayoutObject* layout_object = scrollable_frame->GetLayoutObject();
720 ASSERT_TRUE(layout_object); 720 ASSERT_TRUE(layout_object);
721 ASSERT_TRUE(layout_object->IsLayoutPart()); 721 ASSERT_TRUE(layout_object->IsLayoutPart());
722 722
723 LayoutPart* layout_part = ToLayoutPart(layout_object); 723 LayoutPart* layout_part = ToLayoutPart(layout_object);
724 ASSERT_TRUE(layout_part); 724 ASSERT_TRUE(layout_part);
725 ASSERT_TRUE(layout_part->GetFrameViewBase());
726 ASSERT_TRUE(layout_part->GetFrameViewBase()->IsFrameView());
727 725
728 FrameView* inner_frame_view = ToFrameView(layout_part->GetFrameViewBase()); 726 FrameView* inner_frame_view = layout_part->ChildFrameView();
727 ASSERT_TRUE(inner_frame_view);
728
729 LayoutViewItem inner_layout_view_item = inner_frame_view->GetLayoutViewItem(); 729 LayoutViewItem inner_layout_view_item = inner_frame_view->GetLayoutViewItem();
730 ASSERT_FALSE(inner_layout_view_item.IsNull()); 730 ASSERT_FALSE(inner_layout_view_item.IsNull());
731 731
732 PaintLayerCompositor* inner_compositor = inner_layout_view_item.Compositor(); 732 PaintLayerCompositor* inner_compositor = inner_layout_view_item.Compositor();
733 ASSERT_TRUE(inner_compositor->InCompositingMode()); 733 ASSERT_TRUE(inner_compositor->InCompositingMode());
734 734
735 GraphicsLayer* scroll_layer = 735 GraphicsLayer* scroll_layer =
736 inner_frame_view->LayoutViewportScrollableArea()->LayerForScrolling(); 736 inner_frame_view->LayoutViewportScrollableArea()->LayerForScrolling();
737 ASSERT_TRUE(scroll_layer); 737 ASSERT_TRUE(scroll_layer);
738 ASSERT_EQ(inner_frame_view->LayoutViewportScrollableArea(), 738 ASSERT_EQ(inner_frame_view->LayoutViewportScrollableArea(),
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 893
894 Element* iframe = GetFrame()->GetDocument()->GetElementById("iframe"); 894 Element* iframe = GetFrame()->GetDocument()->GetElementById("iframe");
895 ASSERT_TRUE(iframe); 895 ASSERT_TRUE(iframe);
896 896
897 LayoutObject* layout_object = iframe->GetLayoutObject(); 897 LayoutObject* layout_object = iframe->GetLayoutObject();
898 ASSERT_TRUE(layout_object); 898 ASSERT_TRUE(layout_object);
899 ASSERT_TRUE(layout_object->IsLayoutPart()); 899 ASSERT_TRUE(layout_object->IsLayoutPart());
900 900
901 LayoutPart* layout_part = ToLayoutPart(layout_object); 901 LayoutPart* layout_part = ToLayoutPart(layout_object);
902 ASSERT_TRUE(layout_part); 902 ASSERT_TRUE(layout_part);
903 ASSERT_TRUE(layout_part->GetFrameViewBase());
904 ASSERT_TRUE(layout_part->GetFrameViewBase()->IsFrameView());
905 903
906 FrameView* inner_frame_view = ToFrameView(layout_part->GetFrameViewBase()); 904 FrameView* inner_frame_view = layout_part->ChildFrameView();
905 ASSERT_TRUE(inner_frame_view);
906
907 LayoutViewItem inner_layout_view_item = inner_frame_view->GetLayoutViewItem(); 907 LayoutViewItem inner_layout_view_item = inner_frame_view->GetLayoutViewItem();
908 ASSERT_FALSE(inner_layout_view_item.IsNull()); 908 ASSERT_FALSE(inner_layout_view_item.IsNull());
909 909
910 PaintLayerCompositor* inner_compositor = inner_layout_view_item.Compositor(); 910 PaintLayerCompositor* inner_compositor = inner_layout_view_item.Compositor();
911 ASSERT_TRUE(inner_compositor->InCompositingMode()); 911 ASSERT_TRUE(inner_compositor->InCompositingMode());
912 912
913 GraphicsLayer* scroll_layer = 913 GraphicsLayer* scroll_layer =
914 inner_frame_view->LayoutViewportScrollableArea()->LayerForScrolling(); 914 inner_frame_view->LayoutViewportScrollableArea()->LayerForScrolling();
915 ASSERT_TRUE(scroll_layer); 915 ASSERT_TRUE(scroll_layer);
916 ASSERT_EQ(inner_frame_view->LayoutViewportScrollableArea(), 916 ASSERT_EQ(inner_frame_view->LayoutViewportScrollableArea(),
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
1233 ForceFullCompositingUpdate(); 1233 ForceFullCompositingUpdate();
1234 PaintLayerScrollableArea* scrollable_area2 = 1234 PaintLayerScrollableArea* scrollable_area2 =
1235 ToLayoutBoxModelObject(container2->GetLayoutObject()) 1235 ToLayoutBoxModelObject(container2->GetLayoutObject())
1236 ->GetScrollableArea(); 1236 ->GetScrollableArea();
1237 ASSERT_TRUE(scrollable_area2); 1237 ASSERT_TRUE(scrollable_area2);
1238 EXPECT_TRUE(scrollable_area2->GetNonCompositedMainThreadScrollingReasons() & 1238 EXPECT_TRUE(scrollable_area2->GetNonCompositedMainThreadScrollingReasons() &
1239 MainThreadScrollingReason::kHasBorderRadius); 1239 MainThreadScrollingReason::kHasBorderRadius);
1240 } 1240 }
1241 1241
1242 } // namespace blink 1242 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698