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

Side by Side Diff: Source/web/tests/GraphicsLayerTest.cpp

Issue 23480037: Fix RTL scroll bars being misrendered on Android. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: isLeftSideVerticalScrollbar Created 7 years, 3 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 | Annotate | Revision Log
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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 virtual IntRect scrollCornerRect() const OVERRIDE { return IntRect(); } 123 virtual IntRect scrollCornerRect() const OVERRIDE { return IntRect(); }
124 virtual int visibleWidth() const OVERRIDE { return 10; } 124 virtual int visibleWidth() const OVERRIDE { return 10; }
125 virtual int visibleHeight() const OVERRIDE { return 10; } 125 virtual int visibleHeight() const OVERRIDE { return 10; }
126 virtual IntSize contentsSize() const OVERRIDE { return IntSize(100, 100); } 126 virtual IntSize contentsSize() const OVERRIDE { return IntSize(100, 100); }
127 virtual bool scrollbarsCanBeActive() const OVERRIDE { return false; } 127 virtual bool scrollbarsCanBeActive() const OVERRIDE { return false; }
128 virtual ScrollableArea* enclosingScrollableArea() const OVERRIDE { return 0; } 128 virtual ScrollableArea* enclosingScrollableArea() const OVERRIDE { return 0; }
129 virtual IntRect scrollableAreaBoundingBox() const OVERRIDE { return IntRect( ); } 129 virtual IntRect scrollableAreaBoundingBox() const OVERRIDE { return IntRect( ); }
130 virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&) OVERRIDE { } 130 virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&) OVERRIDE { }
131 virtual void invalidateScrollCornerRect(const IntRect&) OVERRIDE { } 131 virtual void invalidateScrollCornerRect(const IntRect&) OVERRIDE { }
132 virtual bool userInputScrollable(ScrollbarOrientation) const OVERRIDE { retu rn true; } 132 virtual bool userInputScrollable(ScrollbarOrientation) const OVERRIDE { retu rn true; }
133 virtual bool shouldPlaceVerticalScrollbarOnLeft() const OVERRIDE { return fa lse; }
133 virtual int pageStep(ScrollbarOrientation) const OVERRIDE { return 0; } 134 virtual int pageStep(ScrollbarOrientation) const OVERRIDE { return 0; }
134 virtual IntPoint minimumScrollPosition() const OVERRIDE { return IntPoint(); } 135 virtual IntPoint minimumScrollPosition() const OVERRIDE { return IntPoint(); }
135 virtual IntPoint maximumScrollPosition() const OVERRIDE 136 virtual IntPoint maximumScrollPosition() const OVERRIDE
136 { 137 {
137 return IntPoint(contentsSize().width() - visibleWidth(), contentsSize(). height() - visibleHeight()); 138 return IntPoint(contentsSize().width() - visibleWidth(), contentsSize(). height() - visibleHeight());
138 } 139 }
139 140
140 virtual void setScrollOffset(const IntPoint& scrollOffset) OVERRIDE { m_scro llPosition = scrollOffset; } 141 virtual void setScrollOffset(const IntPoint& scrollOffset) OVERRIDE { m_scro llPosition = scrollOffset; }
141 virtual IntPoint scrollPosition() const OVERRIDE { return m_scrollPosition; } 142 virtual IntPoint scrollPosition() const OVERRIDE { return m_scrollPosition; }
142 143
(...skipping 19 matching lines...) Expand all
162 EXPECT_FALSE(m_graphicsLayer->contentsLayer()); 163 EXPECT_FALSE(m_graphicsLayer->contentsLayer());
163 164
164 m_graphicsLayer->setContentsToSolidColor(Color::white); 165 m_graphicsLayer->setContentsToSolidColor(Color::white);
165 EXPECT_TRUE(m_graphicsLayer->contentsLayer()); 166 EXPECT_TRUE(m_graphicsLayer->contentsLayer());
166 167
167 m_graphicsLayer->setContentsToSolidColor(Color()); 168 m_graphicsLayer->setContentsToSolidColor(Color());
168 EXPECT_FALSE(m_graphicsLayer->contentsLayer()); 169 EXPECT_FALSE(m_graphicsLayer->contentsLayer());
169 } 170 }
170 171
171 } // namespace 172 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698