| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 | 136 |
| 137 int oldThumbPosition = theme()->thumbPosition(this); | 137 int oldThumbPosition = theme()->thumbPosition(this); |
| 138 m_currentPos = position; | 138 m_currentPos = position; |
| 139 updateThumbPosition(); | 139 updateThumbPosition(); |
| 140 if (m_pressedPart == ThumbPart) | 140 if (m_pressedPart == ThumbPart) |
| 141 setPressedPos(m_pressedPos + theme()->thumbPosition(this) - oldThumbPosi
tion); | 141 setPressedPos(m_pressedPos + theme()->thumbPosition(this) - oldThumbPosi
tion); |
| 142 } | 142 } |
| 143 | 143 |
| 144 void Scrollbar::disconnectFromScrollableArea() | 144 void Scrollbar::disconnectFromScrollableArea() |
| 145 { | 145 { |
| 146 #if !ENABLE(OILPAN) | |
| 147 // TODO(Oilpan): remove method once transitioned. | |
| 148 m_scrollableArea = nullptr; | 146 m_scrollableArea = nullptr; |
| 149 #endif | |
| 150 } | 147 } |
| 151 | 148 |
| 152 void Scrollbar::setProportion(int visibleSize, int totalSize) | 149 void Scrollbar::setProportion(int visibleSize, int totalSize) |
| 153 { | 150 { |
| 154 if (visibleSize == m_visibleSize && totalSize == m_totalSize) | 151 if (visibleSize == m_visibleSize && totalSize == m_totalSize) |
| 155 return; | 152 return; |
| 156 | 153 |
| 157 m_visibleSize = visibleSize; | 154 m_visibleSize = visibleSize; |
| 158 m_totalSize = totalSize; | 155 m_totalSize = totalSize; |
| 159 | 156 |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 if (!m_scrollableArea) | 550 if (!m_scrollableArea) |
| 554 return 0; | 551 return 0; |
| 555 | 552 |
| 556 if (m_orientation == HorizontalScrollbar) | 553 if (m_orientation == HorizontalScrollbar) |
| 557 return m_scrollableArea->scrollPosition().x() - m_scrollableArea->minimu
mScrollPosition().x(); | 554 return m_scrollableArea->scrollPosition().x() - m_scrollableArea->minimu
mScrollPosition().x(); |
| 558 | 555 |
| 559 return m_scrollableArea->scrollPosition().y() - m_scrollableArea->minimumScr
ollPosition().y(); | 556 return m_scrollableArea->scrollPosition().y() - m_scrollableArea->minimumScr
ollPosition().y(); |
| 560 } | 557 } |
| 561 | 558 |
| 562 } // namespace blink | 559 } // namespace blink |
| OLD | NEW |