| 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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 } | 498 } |
| 499 | 499 |
| 500 bool Scrollbar::shouldParticipateInHitTesting() | 500 bool Scrollbar::shouldParticipateInHitTesting() |
| 501 { | 501 { |
| 502 // Non-overlay scrollbars should always participate in hit testing. | 502 // Non-overlay scrollbars should always participate in hit testing. |
| 503 if (!isOverlayScrollbar()) | 503 if (!isOverlayScrollbar()) |
| 504 return true; | 504 return true; |
| 505 return m_scrollableArea->scrollAnimator()->shouldScrollbarParticipateInHitTe
sting(this); | 505 return m_scrollableArea->scrollAnimator()->shouldScrollbarParticipateInHitTe
sting(this); |
| 506 } | 506 } |
| 507 | 507 |
| 508 void Scrollbar::windowActiveChanged() |
| 509 { |
| 510 if (m_theme && m_theme->invalidateOnWindowActiveChange()) |
| 511 invalidate(); |
| 512 } |
| 513 |
| 508 bool Scrollbar::isWindowActive() const | 514 bool Scrollbar::isWindowActive() const |
| 509 { | 515 { |
| 510 return m_scrollableArea && m_scrollableArea->isActive(); | 516 return m_scrollableArea && m_scrollableArea->isActive(); |
| 511 } | 517 } |
| 512 | 518 |
| 513 void Scrollbar::invalidateRect(const IntRect& rect) | 519 void Scrollbar::invalidateRect(const IntRect& rect) |
| 514 { | 520 { |
| 515 if (suppressInvalidation()) | 521 if (suppressInvalidation()) |
| 516 return; | 522 return; |
| 517 | 523 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 if (!m_scrollableArea) | 562 if (!m_scrollableArea) |
| 557 return 0; | 563 return 0; |
| 558 | 564 |
| 559 if (m_orientation == HorizontalScrollbar) | 565 if (m_orientation == HorizontalScrollbar) |
| 560 return m_scrollableArea->scrollPosition().x() - m_scrollableArea->minimu
mScrollPosition().x(); | 566 return m_scrollableArea->scrollPosition().x() - m_scrollableArea->minimu
mScrollPosition().x(); |
| 561 | 567 |
| 562 return m_scrollableArea->scrollPosition().y() - m_scrollableArea->minimumScr
ollPosition().y(); | 568 return m_scrollableArea->scrollPosition().y() - m_scrollableArea->minimumScr
ollPosition().y(); |
| 563 } | 569 } |
| 564 | 570 |
| 565 } // namespace blink | 571 } // namespace blink |
| OLD | NEW |