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

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

Issue 2774443004: Fix overflow rect calculation for float in rtl container. (Closed)
Patch Set: Created 3 years, 9 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/LayoutBlockFlow.h ('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 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/PaintLayerScrollableArea.h" 5 #include "core/paint/PaintLayerScrollableArea.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/paint/PaintLayer.h" 10 #include "core/paint/PaintLayer.h"
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 document().view()->updateAllLifecyclePhases(); 589 document().view()->updateAllLifecyclePhases();
590 Element* outerDiv = document().getElementById("outerDiv"); 590 Element* outerDiv = document().getElementById("outerDiv");
591 ASSERT_TRUE(outerDiv); 591 ASSERT_TRUE(outerDiv);
592 outerDiv->layoutObject()->setNeedsLayout("test"); 592 outerDiv->layoutObject()->setNeedsLayout("test");
593 document().view()->updateAllLifecyclePhases(); 593 document().view()->updateAllLifecyclePhases();
594 PaintLayerScrollableArea* scrollableArea = 594 PaintLayerScrollableArea* scrollableArea =
595 toLayoutBoxModelObject(outerDiv->layoutObject())->getScrollableArea(); 595 toLayoutBoxModelObject(outerDiv->layoutObject())->getScrollableArea();
596 ASSERT_TRUE(scrollableArea); 596 ASSERT_TRUE(scrollableArea);
597 EXPECT_TRUE(scrollableArea->hasVerticalScrollbar()); 597 EXPECT_TRUE(scrollableArea->hasVerticalScrollbar());
598 } 598 }
599
600 TEST_F(PaintLayerScrollableAreaTest, FloatOverflowInRtlContainer) {
601 RuntimeEnabledFeatures::setOverlayScrollbarsEnabled(false);
602 setBodyInnerHTML(
603 "<!DOCTYPE html>"
604 "<style>"
605 "#container {"
606 " width: 200px;"
607 " overflow-x: auto;"
608 " overflow-y: scroll;"
609 " direction: rtl;"
610 "}"
611 "</style>"
612 "<div id='container'>"
613 " <div style='float:left'>"
614 "lorem ipsum"
615 " </div>"
616 "</div>");
617 document().view()->updateAllLifecyclePhases();
618 Element* container = document().getElementById("container");
619 ASSERT_TRUE(container);
620 PaintLayerScrollableArea* scrollableArea =
621 toLayoutBoxModelObject(container->layoutObject())->getScrollableArea();
622 ASSERT_TRUE(scrollableArea);
623 EXPECT_FALSE(scrollableArea->hasHorizontalScrollbar());
599 } 624 }
625 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlockFlow.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698