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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutView.cpp

Issue 2261663002: Disallow cast/implicit conversion from LayoutUnit to int/unsigned (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: - Created 4 years, 4 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 } 827 }
828 828
829 LayoutRect LayoutView::backgroundRect(LayoutBox* backgroundLayoutObject) const 829 LayoutRect LayoutView::backgroundRect(LayoutBox* backgroundLayoutObject) const
830 { 830 {
831 return LayoutRect(documentRect()); 831 return LayoutRect(documentRect());
832 } 832 }
833 833
834 IntSize LayoutView::layoutSize(IncludeScrollbarsInRect scrollbarInclusion) const 834 IntSize LayoutView::layoutSize(IncludeScrollbarsInRect scrollbarInclusion) const
835 { 835 {
836 if (shouldUsePrintingLayout()) 836 if (shouldUsePrintingLayout())
837 return IntSize(size().width(), pageLogicalHeight()); 837 return IntSize(size().width().toInt(), pageLogicalHeight().toInt());
838 838
839 if (!m_frameView) 839 if (!m_frameView)
840 return IntSize(); 840 return IntSize();
841 841
842 IntSize result = m_frameView->layoutSize(IncludeScrollbars); 842 IntSize result = m_frameView->layoutSize(IncludeScrollbars);
843 if (scrollbarInclusion == ExcludeScrollbars) 843 if (scrollbarInclusion == ExcludeScrollbars)
844 result = m_frameView->layoutViewportScrollableArea()->excludeScrollbars( result); 844 result = m_frameView->layoutViewportScrollableArea()->excludeScrollbars( result);
845 return result; 845 return result;
846 } 846 }
847 847
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 // of this override. All frame scrolling should be handled by 988 // of this override. All frame scrolling should be handled by
989 // ViewportScrollCallback. 989 // ViewportScrollCallback.
990 990
991 if (!frameView()) 991 if (!frameView())
992 return ScrollResult(false, false, delta.width(), delta.height()); 992 return ScrollResult(false, false, delta.width(), delta.height());
993 993
994 return frameView()->getScrollableArea()->userScroll(granularity, delta); 994 return frameView()->getScrollableArea()->userScroll(granularity, delta);
995 } 995 }
996 996
997 } // namespace blink 997 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698