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

Side by Side Diff: Source/web/WebPluginScrollbarImpl.cpp

Issue 23734003: Add the text direction to the WebScrollbar interface. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: less memory 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
« no previous file with comments | « Source/web/WebPluginScrollbarImpl.h ('k') | public/platform/WebScrollbar.h » ('j') | 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 return static_cast<WebScrollbar::ScrollbarOverlayStyle>(m_scrollbar->scrollb arOverlayStyle()); 182 return static_cast<WebScrollbar::ScrollbarOverlayStyle>(m_scrollbar->scrollb arOverlayStyle());
183 } 183 }
184 184
185 WebScrollbar::Orientation WebPluginScrollbarImpl::orientation() const 185 WebScrollbar::Orientation WebPluginScrollbarImpl::orientation() const
186 { 186 {
187 if (m_scrollbar->orientation() == WebCore::HorizontalScrollbar) 187 if (m_scrollbar->orientation() == WebCore::HorizontalScrollbar)
188 return WebScrollbar::Horizontal; 188 return WebScrollbar::Horizontal;
189 return WebScrollbar::Vertical; 189 return WebScrollbar::Vertical;
190 } 190 }
191 191
192 bool WebPluginScrollbarImpl::isRightToLeft() const
193 {
194 return false;
195 }
196
192 bool WebPluginScrollbarImpl::isCustomScrollbar() const 197 bool WebPluginScrollbarImpl::isCustomScrollbar() const
193 { 198 {
194 return m_scrollbar->isCustomScrollbar(); 199 return m_scrollbar->isCustomScrollbar();
195 } 200 }
196 201
197 void WebPluginScrollbarImpl::setLocation(const WebRect& rect) 202 void WebPluginScrollbarImpl::setLocation(const WebRect& rect)
198 { 203 {
199 IntRect oldRect = m_scrollbar->frameRect(); 204 IntRect oldRect = m_scrollbar->frameRect();
200 m_scrollbar->setFrameRect(rect); 205 m_scrollbar->setFrameRect(rect);
201 if (WebRect(oldRect) != rect) 206 if (WebRect(oldRect) != rect)
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 WebCore::ScrollDirection scrollDirection; 365 WebCore::ScrollDirection scrollDirection;
361 WebCore::ScrollGranularity scrollGranularity; 366 WebCore::ScrollGranularity scrollGranularity;
362 if (WebViewImpl::mapKeyCodeForScroll(keyCode, &scrollDirection, &scrollGranu larity)) { 367 if (WebViewImpl::mapKeyCodeForScroll(keyCode, &scrollDirection, &scrollGranu larity)) {
363 // Will return false if scroll direction wasn't compatible with this scr ollbar. 368 // Will return false if scroll direction wasn't compatible with this scr ollbar.
364 return m_group->scroll(scrollDirection, scrollGranularity); 369 return m_group->scroll(scrollDirection, scrollGranularity);
365 } 370 }
366 return false; 371 return false;
367 } 372 }
368 373
369 } // namespace WebKit 374 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/web/WebPluginScrollbarImpl.h ('k') | public/platform/WebScrollbar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698