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

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

Issue 2836813002: Move ScrollbarManager from core to platform and use as Scrollbar parent (Closed)
Patch Set: Created 3 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
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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 return true; 565 return true;
566 return !scrollable_area_->ScrollbarsHidden(); 566 return !scrollable_area_->ScrollbarsHidden();
567 } 567 }
568 568
569 bool Scrollbar::IsWindowActive() const { 569 bool Scrollbar::IsWindowActive() const {
570 return scrollable_area_ && scrollable_area_->IsActive(); 570 return scrollable_area_ && scrollable_area_->IsActive();
571 } 571 }
572 572
573 IntPoint Scrollbar::ConvertFromRootFrame( 573 IntPoint Scrollbar::ConvertFromRootFrame(
574 const IntPoint& point_in_root_frame) const { 574 const IntPoint& point_in_root_frame) const {
575 if (const FrameViewBase* parent = Parent()) { 575 if (const ScrollbarManager* parent = Parent()) {
576 IntPoint parent_point = parent->ConvertFromRootFrame(point_in_root_frame); 576 IntPoint parent_point = parent->ConvertFromRootFrame(point_in_root_frame);
577 if (scrollable_area_) { 577 if (scrollable_area_) {
578 return scrollable_area_->ConvertFromContainingFrameViewBaseToScrollbar( 578 return scrollable_area_->ConvertFromContainingFrameViewBaseToScrollbar(
579 *this, parent_point); 579 *this, parent_point);
580 } 580 }
581 } 581 }
582 582
583 return point_in_root_frame; 583 return point_in_root_frame;
584 } 584 }
585 585
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 invalid_parts = kAllParts; 634 invalid_parts = kAllParts;
635 if (invalid_parts & ~kThumbPart) 635 if (invalid_parts & ~kThumbPart)
636 track_needs_repaint_ = true; 636 track_needs_repaint_ = true;
637 if (invalid_parts & kThumbPart) 637 if (invalid_parts & kThumbPart)
638 thumb_needs_repaint_ = true; 638 thumb_needs_repaint_ = true;
639 if (scrollable_area_) 639 if (scrollable_area_)
640 scrollable_area_->SetScrollbarNeedsPaintInvalidation(Orientation()); 640 scrollable_area_->SetScrollbarNeedsPaintInvalidation(Orientation());
641 } 641 }
642 642
643 } // namespace blink 643 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/scroll/Scrollbar.h ('k') | third_party/WebKit/Source/platform/scroll/ScrollbarManager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698