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

Unified Diff: third_party/WebKit/Source/platform/scroll/Scrollbar.cpp

Issue 2855523002: Deleted Widget/FrameViewBase (Closed)
Patch Set: removed FrameViewBase.h file now that dependent CL submitted 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/scroll/Scrollbar.cpp
diff --git a/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp b/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp
index 774f3dfe8d2c157cf501eaa7d3fc96685ec5f8c5..4c6c488fb3806a37972f39bed3cca1d035ab2336 100644
--- a/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp
+++ b/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp
@@ -63,8 +63,7 @@ Scrollbar::Scrollbar(ScrollableArea* scrollable_area,
&Scrollbar::AutoscrollTimerFired),
elastic_overscroll_(0),
track_needs_repaint_(true),
- thumb_needs_repaint_(true),
- parent_(nullptr) {
+ thumb_needs_repaint_(true) {
theme_.RegisterScrollbar(*this);
// FIXME: This is ugly and would not be necessary if we fix cross-platform
@@ -87,7 +86,6 @@ Scrollbar::~Scrollbar() {
DEFINE_TRACE(Scrollbar) {
visitor->Trace(scrollable_area_);
visitor->Trace(chrome_client_);
- visitor->Trace(parent_);
}
void Scrollbar::SetFrameRect(const IntRect& frame_rect) {
@@ -575,12 +573,11 @@ bool Scrollbar::IsWindowActive() const {
IntPoint Scrollbar::ConvertFromRootFrame(
const IntPoint& point_in_root_frame) const {
- if (const FrameViewBase* parent = Parent()) {
- IntPoint parent_point = parent->ConvertFromRootFrame(point_in_root_frame);
- if (scrollable_area_) {
- return scrollable_area_->ConvertFromContainingFrameViewBaseToScrollbar(
- *this, parent_point);
- }
+ if (scrollable_area_) {
+ IntPoint parent_point =
+ scrollable_area_->ConvertFromRootFrame(point_in_root_frame);
+ return scrollable_area_->ConvertFromContainingFrameViewBaseToScrollbar(
+ *this, parent_point);
}
return point_in_root_frame;

Powered by Google App Engine
This is Rietveld 408576698