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

Side by Side Diff: Source/platform/scroll/Scrollbar.cpp

Issue 260353003: isActiveFocus() is a more meaningful name (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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
« no previous file with comments | « Source/platform/scroll/ScrollableArea.h ('k') | Source/web/ScrollbarGroup.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) 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 } 114 }
115 115
116 void Scrollbar::getTickmarks(Vector<IntRect>& tickmarks) const 116 void Scrollbar::getTickmarks(Vector<IntRect>& tickmarks) const
117 { 117 {
118 if (m_scrollableArea) 118 if (m_scrollableArea)
119 m_scrollableArea->getTickmarks(tickmarks); 119 m_scrollableArea->getTickmarks(tickmarks);
120 } 120 }
121 121
122 bool Scrollbar::isScrollableAreaActive() const 122 bool Scrollbar::isScrollableAreaActive() const
123 { 123 {
124 return m_scrollableArea && m_scrollableArea->isActive(); 124 return m_scrollableArea && m_scrollableArea->isActiveFocus();
125 } 125 }
126 126
127 bool Scrollbar::isScrollViewScrollbar() const 127 bool Scrollbar::isScrollViewScrollbar() const
128 { 128 {
129 return parent() && parent()->isFrameView() && toScrollView(parent())->isScro llViewScrollbar(this); 129 return parent() && parent()->isFrameView() && toScrollView(parent())->isScro llViewScrollbar(this);
130 } 130 }
131 131
132 bool Scrollbar::isLeftSideVerticalScrollbar() const 132 bool Scrollbar::isLeftSideVerticalScrollbar() const
133 { 133 {
134 if (m_orientation == VerticalScrollbar && m_scrollableArea) 134 if (m_orientation == VerticalScrollbar && m_scrollableArea)
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 bool Scrollbar::shouldParticipateInHitTesting() 541 bool Scrollbar::shouldParticipateInHitTesting()
542 { 542 {
543 // Non-overlay scrollbars should always participate in hit testing. 543 // Non-overlay scrollbars should always participate in hit testing.
544 if (!isOverlayScrollbar()) 544 if (!isOverlayScrollbar())
545 return true; 545 return true;
546 return m_scrollableArea->scrollAnimator()->shouldScrollbarParticipateInHitTe sting(this); 546 return m_scrollableArea->scrollAnimator()->shouldScrollbarParticipateInHitTe sting(this);
547 } 547 }
548 548
549 bool Scrollbar::isWindowActive() const 549 bool Scrollbar::isWindowActive() const
550 { 550 {
551 return m_scrollableArea && m_scrollableArea->isActive(); 551 return m_scrollableArea && m_scrollableArea->isActiveFocus();
552 } 552 }
553 553
554 void Scrollbar::invalidateRect(const IntRect& rect) 554 void Scrollbar::invalidateRect(const IntRect& rect)
555 { 555 {
556 if (suppressInvalidation()) 556 if (suppressInvalidation())
557 return; 557 return;
558 558
559 if (m_scrollableArea) 559 if (m_scrollableArea)
560 m_scrollableArea->invalidateScrollbar(this, rect); 560 m_scrollableArea->invalidateScrollbar(this, rect);
561 } 561 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 if (!m_scrollableArea) 597 if (!m_scrollableArea)
598 return 0; 598 return 0;
599 599
600 if (m_orientation == HorizontalScrollbar) 600 if (m_orientation == HorizontalScrollbar)
601 return m_scrollableArea->scrollPosition().x() - m_scrollableArea->minimu mScrollPosition().x(); 601 return m_scrollableArea->scrollPosition().x() - m_scrollableArea->minimu mScrollPosition().x();
602 602
603 return m_scrollableArea->scrollPosition().y() - m_scrollableArea->minimumScr ollPosition().y(); 603 return m_scrollableArea->scrollPosition().y() - m_scrollableArea->minimumScr ollPosition().y();
604 } 604 }
605 605
606 } // namespace WebCore 606 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/platform/scroll/ScrollableArea.h ('k') | Source/web/ScrollbarGroup.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698