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

Side by Side Diff: sky/engine/platform/scroll/ScrollableArea.cpp

Issue 689283003: Remove scroll corners and resizers. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/platform/scroll/ScrollableArea.h ('k') | sky/engine/platform/scroll/Scrollbar.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) 2010, Google Inc. All rights reserved. 2 * Copyright (c) 2010, Google Inc. All rights reserved.
3 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved. 3 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 } else if (scrollbar == verticalScrollbar()) { 378 } else if (scrollbar == verticalScrollbar()) {
379 if (GraphicsLayer* graphicsLayer = layerForVerticalScrollbar()) { 379 if (GraphicsLayer* graphicsLayer = layerForVerticalScrollbar()) {
380 graphicsLayer->setNeedsDisplay(); 380 graphicsLayer->setNeedsDisplay();
381 graphicsLayer->setContentsNeedsDisplay(); 381 graphicsLayer->setContentsNeedsDisplay();
382 return; 382 return;
383 } 383 }
384 } 384 }
385 invalidateScrollbarRect(scrollbar, rect); 385 invalidateScrollbarRect(scrollbar, rect);
386 } 386 }
387 387
388 void ScrollableArea::invalidateScrollCorner(const IntRect& rect)
389 {
390 if (GraphicsLayer* graphicsLayer = layerForScrollCorner()) {
391 graphicsLayer->setNeedsDisplay();
392 return;
393 }
394 invalidateScrollCornerRect(rect);
395 }
396
397 bool ScrollableArea::hasLayerForHorizontalScrollbar() const 388 bool ScrollableArea::hasLayerForHorizontalScrollbar() const
398 { 389 {
399 return layerForHorizontalScrollbar(); 390 return layerForHorizontalScrollbar();
400 } 391 }
401 392
402 bool ScrollableArea::hasLayerForVerticalScrollbar() const 393 bool ScrollableArea::hasLayerForVerticalScrollbar() const
403 { 394 {
404 return layerForVerticalScrollbar(); 395 return layerForVerticalScrollbar();
405 } 396 }
406 397
407 bool ScrollableArea::hasLayerForScrollCorner() const
408 {
409 return layerForScrollCorner();
410 }
411
412 bool ScrollableArea::scheduleAnimation() 398 bool ScrollableArea::scheduleAnimation()
413 { 399 {
414 WTF_LOG(ScriptedAnimationController, "ScrollableArea::scheduleAnimation: win dow = %d", 400 WTF_LOG(ScriptedAnimationController, "ScrollableArea::scheduleAnimation: win dow = %d",
415 hostWindow() ? 1 : 0); 401 hostWindow() ? 1 : 0);
416 if (HostWindow* window = hostWindow()) { 402 if (HostWindow* window = hostWindow()) {
417 window->scheduleAnimation(); 403 window->scheduleAnimation();
418 return true; 404 return true;
419 } 405 }
420 return false; 406 return false;
421 } 407 }
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 { 461 {
476 return scrollSize(orientation); 462 return scrollSize(orientation);
477 } 463 }
478 464
479 float ScrollableArea::pixelStep(ScrollbarOrientation) const 465 float ScrollableArea::pixelStep(ScrollbarOrientation) const
480 { 466 {
481 return 1; 467 return 1;
482 } 468 }
483 469
484 } // namespace blink 470 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/platform/scroll/ScrollableArea.h ('k') | sky/engine/platform/scroll/Scrollbar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698