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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 1447273003: Make the FloatSize constructor from an IntSize explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 3532 matching lines...) Expand 10 before | Expand all | Expand 10 after
3543 { 3543 {
3544 if (!graphicsLayer || !scrollbar) 3544 if (!graphicsLayer || !scrollbar)
3545 return; 3545 return;
3546 3546
3547 IntRect scrollbarRect = scrollbar->frameRect(); 3547 IntRect scrollbarRect = scrollbar->frameRect();
3548 graphicsLayer->setPosition(scrollbarRect.location()); 3548 graphicsLayer->setPosition(scrollbarRect.location());
3549 3549
3550 if (scrollbarRect.size() == graphicsLayer->size()) 3550 if (scrollbarRect.size() == graphicsLayer->size())
3551 return; 3551 return;
3552 3552
3553 graphicsLayer->setSize(scrollbarRect.size()); 3553 graphicsLayer->setSize(FloatSize(scrollbarRect.size()));
3554 3554
3555 if (graphicsLayer->hasContentsLayer()) { 3555 if (graphicsLayer->hasContentsLayer()) {
3556 graphicsLayer->setContentsRect(IntRect(0, 0, scrollbarRect.width(), scro llbarRect.height())); 3556 graphicsLayer->setContentsRect(IntRect(0, 0, scrollbarRect.width(), scro llbarRect.height()));
3557 return; 3557 return;
3558 } 3558 }
3559 3559
3560 graphicsLayer->setDrawsContent(true); 3560 graphicsLayer->setDrawsContent(true);
3561 graphicsLayer->setNeedsDisplay(); 3561 graphicsLayer->setNeedsDisplay();
3562 } 3562 }
3563 3563
3564 static void positionScrollCornerLayer(GraphicsLayer* graphicsLayer, const IntRec t& cornerRect) 3564 static void positionScrollCornerLayer(GraphicsLayer* graphicsLayer, const IntRec t& cornerRect)
3565 { 3565 {
3566 if (!graphicsLayer) 3566 if (!graphicsLayer)
3567 return; 3567 return;
3568 graphicsLayer->setDrawsContent(!cornerRect.isEmpty()); 3568 graphicsLayer->setDrawsContent(!cornerRect.isEmpty());
3569 graphicsLayer->setPosition(cornerRect.location()); 3569 graphicsLayer->setPosition(cornerRect.location());
3570 if (cornerRect.size() != graphicsLayer->size()) 3570 if (cornerRect.size() != graphicsLayer->size())
3571 graphicsLayer->setNeedsDisplay(); 3571 graphicsLayer->setNeedsDisplay();
3572 graphicsLayer->setSize(cornerRect.size()); 3572 graphicsLayer->setSize(FloatSize(cornerRect.size()));
3573 } 3573 }
3574 3574
3575 void FrameView::positionScrollbarLayers() 3575 void FrameView::positionScrollbarLayers()
3576 { 3576 {
3577 positionScrollbarLayer(layerForHorizontalScrollbar(), horizontalScrollbar()) ; 3577 positionScrollbarLayer(layerForHorizontalScrollbar(), horizontalScrollbar()) ;
3578 positionScrollbarLayer(layerForVerticalScrollbar(), verticalScrollbar()); 3578 positionScrollbarLayer(layerForVerticalScrollbar(), verticalScrollbar());
3579 positionScrollCornerLayer(layerForScrollCorner(), scrollCornerRect()); 3579 positionScrollCornerLayer(layerForScrollCorner(), scrollCornerRect());
3580 } 3580 }
3581 3581
3582 bool FrameView::userInputScrollable(ScrollbarOrientation orientation) const 3582 bool FrameView::userInputScrollable(ScrollbarOrientation orientation) const
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
3977 return m_hiddenForThrottling && m_crossOriginForThrottling; 3977 return m_hiddenForThrottling && m_crossOriginForThrottling;
3978 } 3978 }
3979 3979
3980 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const 3980 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const
3981 { 3981 {
3982 ASSERT(layoutView()); 3982 ASSERT(layoutView());
3983 return *layoutView(); 3983 return *layoutView();
3984 } 3984 }
3985 3985
3986 } // namespace blink 3986 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/VisibleUnits.cpp ('k') | third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698