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

Side by Side Diff: third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm

Issue 2730773003: Rename FrameViewBase fields and methods *Widget* to ...FrameViewBase... (Closed)
Patch Set: Created 3 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2010, 2011 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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 // moment when its destructor has been called. We should probably de-couple 228 // moment when its destructor has been called. We should probably de-couple
229 // some 229 // some
230 // of the clean-up work in ScrollbarThemeMac::unregisterScrollbar() to avoid 230 // of the clean-up work in ScrollbarThemeMac::unregisterScrollbar() to avoid
231 // this 231 // this
232 // issue. 232 // issue.
233 if (!scrollbar) 233 if (!scrollbar)
234 return NSZeroPoint; 234 return NSZeroPoint;
235 235
236 ASSERT(scrollerImp == scrollbarPainterForScrollbar(*scrollbar)); 236 ASSERT(scrollerImp == scrollbarPainterForScrollbar(*scrollbar));
237 237
238 return scrollbar->convertFromContainingWidget( 238 return scrollbar->convertFromContainingFrameViewBase(
239 blink::IntPoint(pointInContentArea)); 239 blink::IntPoint(pointInContentArea));
240 } 240 }
241 241
242 - (void)scrollerImpPair:(id)scrollerImpPair 242 - (void)scrollerImpPair:(id)scrollerImpPair
243 setContentAreaNeedsDisplayInRect:(NSRect)rect { 243 setContentAreaNeedsDisplayInRect:(NSRect)rect {
244 if (!_scrollableArea) 244 if (!_scrollableArea)
245 return; 245 return;
246 246
247 if (!_scrollableArea->scrollbarsCanBeActive()) 247 if (!_scrollableArea->scrollbarsCanBeActive())
248 return; 248 return;
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 - (NSRect)convertRectFromBacking:(NSRect)aRect { 486 - (NSRect)convertRectFromBacking:(NSRect)aRect {
487 return aRect; 487 return aRect;
488 } 488 }
489 489
490 - (NSPoint)mouseLocationInScrollerForScrollerImp:(id)scrollerImp { 490 - (NSPoint)mouseLocationInScrollerForScrollerImp:(id)scrollerImp {
491 if (!_scrollbar) 491 if (!_scrollbar)
492 return NSZeroPoint; 492 return NSZeroPoint;
493 493
494 DCHECK_EQ(scrollerImp, scrollbarPainterForScrollbar(*_scrollbar)); 494 DCHECK_EQ(scrollerImp, scrollbarPainterForScrollbar(*_scrollbar));
495 495
496 return _scrollbar->convertFromContainingWidget( 496 return _scrollbar->convertFromContainingFrameViewBase(
497 _scrollbar->getScrollableArea()->lastKnownMousePosition()); 497 _scrollbar->getScrollableArea()->lastKnownMousePosition());
498 } 498 }
499 499
500 - (void)setUpAlphaAnimation: 500 - (void)setUpAlphaAnimation:
501 (RetainPtr<BlinkScrollbarPartAnimation>&)scrollbarPartAnimation 501 (RetainPtr<BlinkScrollbarPartAnimation>&)scrollbarPartAnimation
502 scrollerPainter:(ScrollbarPainter)scrollerPainter 502 scrollerPainter:(ScrollbarPainter)scrollerPainter
503 part:(blink::ScrollbarPart)part 503 part:(blink::ScrollbarPart)part
504 animateAlphaTo:(CGFloat)newAlpha 504 animateAlphaTo:(CGFloat)newAlpha
505 duration:(NSTimeInterval)duration { 505 duration:(NSTimeInterval)duration {
506 // If the user has scrolled the page, then the scrollbars must be animated 506 // If the user has scrolled the page, then the scrollbars must be animated
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
1065 m_contentAreaScrolledTimerScrollDelta = ScrollOffset(); 1065 m_contentAreaScrolledTimerScrollDelta = ScrollOffset();
1066 } else 1066 } else
1067 [m_scrollbarPainterController.get() contentAreaScrolled]; 1067 [m_scrollbarPainterController.get() contentAreaScrolled];
1068 } 1068 }
1069 1069
1070 void ScrollAnimatorMac::setVisibleScrollerThumbRect( 1070 void ScrollAnimatorMac::setVisibleScrollerThumbRect(
1071 const IntRect& scrollerThumb) { 1071 const IntRect& scrollerThumb) {
1072 IntRect rectInViewCoordinates = scrollerThumb; 1072 IntRect rectInViewCoordinates = scrollerThumb;
1073 if (Scrollbar* verticalScrollbar = m_scrollableArea->verticalScrollbar()) 1073 if (Scrollbar* verticalScrollbar = m_scrollableArea->verticalScrollbar())
1074 rectInViewCoordinates = 1074 rectInViewCoordinates =
1075 verticalScrollbar->convertToContainingWidget(scrollerThumb); 1075 verticalScrollbar->convertToContainingFrameViewBase(scrollerThumb);
1076 1076
1077 if (rectInViewCoordinates == m_visibleScrollerThumbRect) 1077 if (rectInViewCoordinates == m_visibleScrollerThumbRect)
1078 return; 1078 return;
1079 1079
1080 m_visibleScrollerThumbRect = rectInViewCoordinates; 1080 m_visibleScrollerThumbRect = rectInViewCoordinates;
1081 } 1081 }
1082 1082
1083 } // namespace blink 1083 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/FrameViewBase.cpp ('k') | third_party/WebKit/Source/platform/scroll/ScrollableArea.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698