OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2008 Apple 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 // We can't scroll if we've hit the beginning or end. | 232 // We can't scroll if we've hit the beginning or end. |
233 ScrollDirectionPhysical dir = pressedPartScrollDirectionPhysical(); | 233 ScrollDirectionPhysical dir = pressedPartScrollDirectionPhysical(); |
234 if (dir == ScrollUp || dir == ScrollLeft) { | 234 if (dir == ScrollUp || dir == ScrollLeft) { |
235 if (m_currentPos == 0) | 235 if (m_currentPos == 0) |
236 return; | 236 return; |
237 } else { | 237 } else { |
238 if (m_currentPos == maximum()) | 238 if (m_currentPos == maximum()) |
239 return; | 239 return; |
240 } | 240 } |
241 | 241 |
242 m_scrollTimer.startOneShot(delay, FROM_HERE); | 242 m_scrollTimer.startOneShot(delay, BLINK_FROM_HERE); |
243 } | 243 } |
244 | 244 |
245 void Scrollbar::stopTimerIfNeeded() | 245 void Scrollbar::stopTimerIfNeeded() |
246 { | 246 { |
247 if (m_scrollTimer.isActive()) | 247 if (m_scrollTimer.isActive()) |
248 m_scrollTimer.stop(); | 248 m_scrollTimer.stop(); |
249 } | 249 } |
250 | 250 |
251 ScrollDirectionPhysical Scrollbar::pressedPartScrollDirectionPhysical() | 251 ScrollDirectionPhysical Scrollbar::pressedPartScrollDirectionPhysical() |
252 { | 252 { |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 if (!m_scrollableArea) | 556 if (!m_scrollableArea) |
557 return 0; | 557 return 0; |
558 | 558 |
559 if (m_orientation == HorizontalScrollbar) | 559 if (m_orientation == HorizontalScrollbar) |
560 return m_scrollableArea->scrollPosition().x() - m_scrollableArea->minimu
mScrollPosition().x(); | 560 return m_scrollableArea->scrollPosition().x() - m_scrollableArea->minimu
mScrollPosition().x(); |
561 | 561 |
562 return m_scrollableArea->scrollPosition().y() - m_scrollableArea->minimumScr
ollPosition().y(); | 562 return m_scrollableArea->scrollPosition().y() - m_scrollableArea->minimumScr
ollPosition().y(); |
563 } | 563 } |
564 | 564 |
565 } // namespace blink | 565 } // namespace blink |
OLD | NEW |