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

Side by Side Diff: third_party/WebKit/Source/core/page/AutoscrollController.cpp

Issue 2873213002: Add PlatformFrameView class. (Closed)
Patch Set: #include PlatformFrameView inside platform.dll 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights 3 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights
4 * reserved. 4 * reserved.
5 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) 6 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies)
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 result = ToLayoutBox(layout_object)->Scroll(kScrollByPixel, delta); 359 result = ToLayoutBox(layout_object)->Scroll(kScrollByPixel, delta);
360 } 360 }
361 if (result.DidScroll()) { 361 if (result.DidScroll()) {
362 did_latch_for_middle_click_autoscroll_ = true; 362 did_latch_for_middle_click_autoscroll_ = true;
363 autoscroll_layout_object_ = ToLayoutBox(layout_object); 363 autoscroll_layout_object_ = ToLayoutBox(layout_object);
364 } 364 }
365 break; 365 break;
366 } 366 }
367 if (autoscroll_type_ != kNoAutoscroll && autoscroll_layout_object_) { 367 if (autoscroll_type_ != kNoAutoscroll && autoscroll_layout_object_) {
368 page_->GetChromeClient().ScheduleAnimation( 368 page_->GetChromeClient().ScheduleAnimation(
369 autoscroll_layout_object_->GetFrame()); 369 autoscroll_layout_object_->GetFrame()->View());
370 } 370 }
371 } 371 }
372 372
373 void AutoscrollController::StartAutoscroll() { 373 void AutoscrollController::StartAutoscroll() {
374 page_->GetChromeClient().ScheduleAnimation( 374 page_->GetChromeClient().ScheduleAnimation(
375 autoscroll_layout_object_->GetFrame()); 375 autoscroll_layout_object_->GetFrame()->View());
376 } 376 }
377 377
378 void AutoscrollController::UpdateMiddleClickAutoscrollState( 378 void AutoscrollController::UpdateMiddleClickAutoscrollState(
379 FrameView* view, 379 FrameView* view,
380 const IntPoint& last_known_mouse_position) { 380 const IntPoint& last_known_mouse_position) {
381 DCHECK(RuntimeEnabledFeatures::middleClickAutoscrollEnabled()); 381 DCHECK(RuntimeEnabledFeatures::middleClickAutoscrollEnabled());
382 // At the original click location we draw a 4 arrowed icon. Over this icon 382 // At the original click location we draw a 4 arrowed icon. Over this icon
383 // there won't be any scroll, So don't change the cursor over this area. 383 // there won't be any scroll, So don't change the cursor over this area.
384 bool east = middle_click_autoscroll_start_pos_.X() < 384 bool east = middle_click_autoscroll_start_pos_.X() <
385 (last_known_mouse_position.X() - kNoMiddleClickAutoscrollRadius); 385 (last_known_mouse_position.X() - kNoMiddleClickAutoscrollRadius);
(...skipping 25 matching lines...) Expand all
411 } else if (east) { 411 } else if (east) {
412 view->SetCursor(EastPanningCursor()); 412 view->SetCursor(EastPanningCursor());
413 } else if (west) { 413 } else if (west) {
414 view->SetCursor(WestPanningCursor()); 414 view->SetCursor(WestPanningCursor());
415 } else { 415 } else {
416 view->SetCursor(MiddlePanningCursor()); 416 view->SetCursor(MiddlePanningCursor());
417 } 417 }
418 } 418 }
419 419
420 } // namespace blink 420 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/EmptyClients.h ('k') | third_party/WebKit/Source/core/page/PageAnimator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698