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

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

Issue 2730773003: Rename FrameViewBase fields and methods *Widget* to ...FrameViewBase... (Closed)
Patch Set: Created 3 years, 9 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) 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 3538 matching lines...) Expand 10 before | Expand all | Expand 10 after
3549 IntPoint FrameView::convertToLayoutItem(const LayoutItem& layoutItem, 3549 IntPoint FrameView::convertToLayoutItem(const LayoutItem& layoutItem,
3550 const IntPoint& framePoint) const { 3550 const IntPoint& framePoint) const {
3551 IntPoint point = framePoint; 3551 IntPoint point = framePoint;
3552 3552
3553 // Convert from FrameView coords into page ("absolute") coordinates. 3553 // Convert from FrameView coords into page ("absolute") coordinates.
3554 point += IntSize(scrollX(), scrollY()); 3554 point += IntSize(scrollX(), scrollY());
3555 3555
3556 return roundedIntPoint(layoutItem.absoluteToLocal(point, UseTransforms)); 3556 return roundedIntPoint(layoutItem.absoluteToLocal(point, UseTransforms));
3557 } 3557 }
3558 3558
3559 IntRect FrameView::convertToContainingWidget(const IntRect& localRect) const { 3559 IntRect FrameView::convertToContainingFrameViewBase(
3560 const IntRect& localRect) const {
3560 if (const FrameView* parentView = toFrameView(parent())) { 3561 if (const FrameView* parentView = toFrameView(parent())) {
3561 // Get our layoutObject in the parent view 3562 // Get our layoutObject in the parent view
3562 LayoutPartItem layoutItem = m_frame->ownerLayoutItem(); 3563 LayoutPartItem layoutItem = m_frame->ownerLayoutItem();
3563 if (layoutItem.isNull()) 3564 if (layoutItem.isNull())
3564 return localRect; 3565 return localRect;
3565 3566
3566 IntRect rect(localRect); 3567 IntRect rect(localRect);
3567 // Add borders and padding?? 3568 // Add borders and padding??
3568 rect.move((layoutItem.borderLeft() + layoutItem.paddingLeft()).toInt(), 3569 rect.move((layoutItem.borderLeft() + layoutItem.paddingLeft()).toInt(),
3569 (layoutItem.borderTop() + layoutItem.paddingTop()).toInt()); 3570 (layoutItem.borderTop() + layoutItem.paddingTop()).toInt());
3570 return parentView->convertFromLayoutItem(layoutItem, rect); 3571 return parentView->convertFromLayoutItem(layoutItem, rect);
3571 } 3572 }
3572 3573
3573 return localRect; 3574 return localRect;
3574 } 3575 }
3575 3576
3576 IntRect FrameView::convertFromContainingWidget( 3577 IntRect FrameView::convertFromContainingFrameViewBase(
3577 const IntRect& parentRect) const { 3578 const IntRect& parentRect) const {
3578 if (const FrameView* parentView = toFrameView(parent())) { 3579 if (const FrameView* parentView = toFrameView(parent())) {
3579 // Get our layoutObject in the parent view 3580 // Get our layoutObject in the parent view
3580 LayoutPartItem layoutItem = m_frame->ownerLayoutItem(); 3581 LayoutPartItem layoutItem = m_frame->ownerLayoutItem();
3581 if (layoutItem.isNull()) 3582 if (layoutItem.isNull())
3582 return parentRect; 3583 return parentRect;
3583 3584
3584 IntRect rect = parentView->convertToLayoutItem(layoutItem, parentRect); 3585 IntRect rect = parentView->convertToLayoutItem(layoutItem, parentRect);
3585 // Subtract borders and padding 3586 // Subtract borders and padding
3586 rect.move((-layoutItem.borderLeft() - layoutItem.paddingLeft()).toInt(), 3587 rect.move((-layoutItem.borderLeft() - layoutItem.paddingLeft()).toInt(),
3587 (-layoutItem.borderTop() - layoutItem.paddingTop()).toInt()); 3588 (-layoutItem.borderTop() - layoutItem.paddingTop()).toInt());
3588 return rect; 3589 return rect;
3589 } 3590 }
3590 3591
3591 return parentRect; 3592 return parentRect;
3592 } 3593 }
3593 3594
3594 IntPoint FrameView::convertToContainingWidget( 3595 IntPoint FrameView::convertToContainingFrameViewBase(
3595 const IntPoint& localPoint) const { 3596 const IntPoint& localPoint) const {
3596 if (const FrameView* parentView = toFrameView(parent())) { 3597 if (const FrameView* parentView = toFrameView(parent())) {
3597 // Get our layoutObject in the parent view 3598 // Get our layoutObject in the parent view
3598 LayoutPartItem layoutItem = m_frame->ownerLayoutItem(); 3599 LayoutPartItem layoutItem = m_frame->ownerLayoutItem();
3599 if (layoutItem.isNull()) 3600 if (layoutItem.isNull())
3600 return localPoint; 3601 return localPoint;
3601 3602
3602 IntPoint point(localPoint); 3603 IntPoint point(localPoint);
3603 3604
3604 // Add borders and padding 3605 // Add borders and padding
3605 point.move((layoutItem.borderLeft() + layoutItem.paddingLeft()).toInt(), 3606 point.move((layoutItem.borderLeft() + layoutItem.paddingLeft()).toInt(),
3606 (layoutItem.borderTop() + layoutItem.paddingTop()).toInt()); 3607 (layoutItem.borderTop() + layoutItem.paddingTop()).toInt());
3607 return parentView->convertFromLayoutItem(layoutItem, point); 3608 return parentView->convertFromLayoutItem(layoutItem, point);
3608 } 3609 }
3609 3610
3610 return localPoint; 3611 return localPoint;
3611 } 3612 }
3612 3613
3613 IntPoint FrameView::convertFromContainingWidget( 3614 IntPoint FrameView::convertFromContainingFrameViewBase(
3614 const IntPoint& parentPoint) const { 3615 const IntPoint& parentPoint) const {
3615 if (const FrameView* parentView = toFrameView(parent())) { 3616 if (const FrameView* parentView = toFrameView(parent())) {
3616 // Get our layoutObject in the parent view 3617 // Get our layoutObject in the parent view
3617 LayoutPartItem layoutItem = m_frame->ownerLayoutItem(); 3618 LayoutPartItem layoutItem = m_frame->ownerLayoutItem();
3618 if (layoutItem.isNull()) 3619 if (layoutItem.isNull())
3619 return parentPoint; 3620 return parentPoint;
3620 3621
3621 IntPoint point = parentView->convertToLayoutItem(layoutItem, parentPoint); 3622 IntPoint point = parentView->convertToLayoutItem(layoutItem, parentPoint);
3622 // Subtract borders and padding 3623 // Subtract borders and padding
3623 point.move((-layoutItem.borderLeft() - layoutItem.paddingLeft()).toInt(), 3624 point.move((-layoutItem.borderLeft() - layoutItem.paddingLeft()).toInt(),
(...skipping 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after
5249 void FrameView::setAnimationHost( 5250 void FrameView::setAnimationHost(
5250 std::unique_ptr<CompositorAnimationHost> host) { 5251 std::unique_ptr<CompositorAnimationHost> host) {
5251 m_animationHost = std::move(host); 5252 m_animationHost = std::move(host);
5252 } 5253 }
5253 5254
5254 LayoutUnit FrameView::caretWidth() const { 5255 LayoutUnit FrameView::caretWidth() const {
5255 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); 5256 return LayoutUnit(getHostWindow()->windowToViewportScalar(1));
5256 } 5257 }
5257 5258
5258 } // namespace blink 5259 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.h ('k') | third_party/WebKit/Source/platform/FrameViewBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698