| 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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 return true; | 565 return true; |
| 566 return !m_scrollableArea->scrollbarsHidden(); | 566 return !m_scrollableArea->scrollbarsHidden(); |
| 567 } | 567 } |
| 568 | 568 |
| 569 bool Scrollbar::isWindowActive() const { | 569 bool Scrollbar::isWindowActive() const { |
| 570 return m_scrollableArea && m_scrollableArea->isActive(); | 570 return m_scrollableArea && m_scrollableArea->isActive(); |
| 571 } | 571 } |
| 572 | 572 |
| 573 IntRect Scrollbar::convertToContainingFrameViewBase( | 573 IntRect Scrollbar::convertToContainingFrameViewBase( |
| 574 const IntRect& localRect) const { | 574 const IntRect& localRect) const { |
| 575 if (m_scrollableArea) | 575 if (m_scrollableArea) { |
| 576 return m_scrollableArea->convertFromScrollbarToContainingWidget(*this, | 576 return m_scrollableArea->convertFromScrollbarToContainingFrameViewBase( |
| 577 localRect); | 577 *this, localRect); |
| 578 } |
| 578 | 579 |
| 579 return FrameViewBase::convertToContainingFrameViewBase(localRect); | 580 return FrameViewBase::convertToContainingFrameViewBase(localRect); |
| 580 } | 581 } |
| 581 | 582 |
| 582 IntRect Scrollbar::convertFromContainingFrameViewBase( | 583 IntRect Scrollbar::convertFromContainingFrameViewBase( |
| 583 const IntRect& parentRect) const { | 584 const IntRect& parentRect) const { |
| 584 if (m_scrollableArea) | 585 if (m_scrollableArea) { |
| 585 return m_scrollableArea->convertFromContainingWidgetToScrollbar(*this, | 586 return m_scrollableArea->convertFromContainingFrameViewBaseToScrollbar( |
| 586 parentRect); | 587 *this, parentRect); |
| 588 } |
| 587 | 589 |
| 588 return FrameViewBase::convertFromContainingFrameViewBase(parentRect); | 590 return FrameViewBase::convertFromContainingFrameViewBase(parentRect); |
| 589 } | 591 } |
| 590 | 592 |
| 591 IntPoint Scrollbar::convertToContainingFrameViewBase( | 593 IntPoint Scrollbar::convertToContainingFrameViewBase( |
| 592 const IntPoint& localPoint) const { | 594 const IntPoint& localPoint) const { |
| 593 if (m_scrollableArea) | 595 if (m_scrollableArea) { |
| 594 return m_scrollableArea->convertFromScrollbarToContainingWidget(*this, | 596 return m_scrollableArea->convertFromScrollbarToContainingFrameViewBase( |
| 595 localPoint); | 597 *this, localPoint); |
| 598 } |
| 596 | 599 |
| 597 return FrameViewBase::convertToContainingFrameViewBase(localPoint); | 600 return FrameViewBase::convertToContainingFrameViewBase(localPoint); |
| 598 } | 601 } |
| 599 | 602 |
| 600 IntPoint Scrollbar::convertFromContainingFrameViewBase( | 603 IntPoint Scrollbar::convertFromContainingFrameViewBase( |
| 601 const IntPoint& parentPoint) const { | 604 const IntPoint& parentPoint) const { |
| 602 if (m_scrollableArea) | 605 if (m_scrollableArea) { |
| 603 return m_scrollableArea->convertFromContainingWidgetToScrollbar( | 606 return m_scrollableArea->convertFromContainingFrameViewBaseToScrollbar( |
| 604 *this, parentPoint); | 607 *this, parentPoint); |
| 608 } |
| 605 | 609 |
| 606 return FrameViewBase::convertFromContainingFrameViewBase(parentPoint); | 610 return FrameViewBase::convertFromContainingFrameViewBase(parentPoint); |
| 607 } | 611 } |
| 608 | 612 |
| 609 float Scrollbar::scrollableAreaCurrentPos() const { | 613 float Scrollbar::scrollableAreaCurrentPos() const { |
| 610 if (!m_scrollableArea) | 614 if (!m_scrollableArea) |
| 611 return 0; | 615 return 0; |
| 612 | 616 |
| 613 if (m_orientation == HorizontalScrollbar) { | 617 if (m_orientation == HorizontalScrollbar) { |
| 614 return m_scrollableArea->getScrollOffset().width() - | 618 return m_scrollableArea->getScrollOffset().width() - |
| (...skipping 22 matching lines...) Expand all Loading... |
| 637 invalidParts = AllParts; | 641 invalidParts = AllParts; |
| 638 if (invalidParts & ~ThumbPart) | 642 if (invalidParts & ~ThumbPart) |
| 639 m_trackNeedsRepaint = true; | 643 m_trackNeedsRepaint = true; |
| 640 if (invalidParts & ThumbPart) | 644 if (invalidParts & ThumbPart) |
| 641 m_thumbNeedsRepaint = true; | 645 m_thumbNeedsRepaint = true; |
| 642 if (m_scrollableArea) | 646 if (m_scrollableArea) |
| 643 m_scrollableArea->setScrollbarNeedsPaintInvalidation(orientation()); | 647 m_scrollableArea->setScrollbarNeedsPaintInvalidation(orientation()); |
| 644 } | 648 } |
| 645 | 649 |
| 646 } // namespace blink | 650 } // namespace blink |
| OLD | NEW |