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

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

Issue 1660863002: Force all LayoutUnit construction to be explicit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix multicol Created 4 years, 10 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 2749 matching lines...) Expand 10 before | Expand all | Expand 10 after
2760 layoutView->setPageLogicalHeight(flooredPageLogicalHeight); 2760 layoutView->setPageLogicalHeight(flooredPageLogicalHeight);
2761 layoutView->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidatio n(LayoutInvalidationReason::PrintingChanged); 2761 layoutView->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidatio n(LayoutInvalidationReason::PrintingChanged);
2762 layout(); 2762 layout();
2763 2763
2764 const LayoutRect& updatedDocumentRect = LayoutRect(layoutView->docum entRect()); 2764 const LayoutRect& updatedDocumentRect = LayoutRect(layoutView->docum entRect());
2765 LayoutUnit docLogicalHeight = horizontalWritingMode ? updatedDocumen tRect.height() : updatedDocumentRect.width(); 2765 LayoutUnit docLogicalHeight = horizontalWritingMode ? updatedDocumen tRect.height() : updatedDocumentRect.width();
2766 LayoutUnit docLogicalTop = horizontalWritingMode ? updatedDocumentRe ct.y() : updatedDocumentRect.x(); 2766 LayoutUnit docLogicalTop = horizontalWritingMode ? updatedDocumentRe ct.y() : updatedDocumentRect.x();
2767 LayoutUnit docLogicalRight = horizontalWritingMode ? updatedDocument Rect.maxX() : updatedDocumentRect.maxY(); 2767 LayoutUnit docLogicalRight = horizontalWritingMode ? updatedDocument Rect.maxX() : updatedDocumentRect.maxY();
2768 LayoutUnit clippedLogicalLeft; 2768 LayoutUnit clippedLogicalLeft;
2769 if (!layoutView->style()->isLeftToRightDirection()) 2769 if (!layoutView->style()->isLeftToRightDirection())
2770 clippedLogicalLeft = docLogicalRight - pageLogicalWidth; 2770 clippedLogicalLeft = LayoutUnit(docLogicalRight - pageLogicalWid th);
2771 LayoutRect overflow(clippedLogicalLeft, docLogicalTop, pageLogicalWi dth, docLogicalHeight); 2771 LayoutRect overflow(clippedLogicalLeft, docLogicalTop, pageLogicalWi dth, docLogicalHeight);
2772 2772
2773 if (!horizontalWritingMode) 2773 if (!horizontalWritingMode)
2774 overflow = overflow.transposedRect(); 2774 overflow = overflow.transposedRect();
2775 layoutView->clearLayoutOverflow(); 2775 layoutView->clearLayoutOverflow();
2776 layoutView->addLayoutOverflow(overflow); // This is how we clip in c ase we overflow again. 2776 layoutView->addLayoutOverflow(overflow); // This is how we clip in c ase we overflow again.
2777 } 2777 }
2778 } 2778 }
2779 2779
2780 adjustViewSize(); 2780 adjustViewSize();
(...skipping 1315 matching lines...) Expand 10 before | Expand all | Expand 10 after
4096 return m_hiddenForThrottling && m_crossOriginForThrottling; 4096 return m_hiddenForThrottling && m_crossOriginForThrottling;
4097 } 4097 }
4098 4098
4099 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const 4099 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const
4100 { 4100 {
4101 ASSERT(layoutView()); 4101 ASSERT(layoutView());
4102 return *layoutView(); 4102 return *layoutView();
4103 } 4103 }
4104 4104
4105 } // namespace blink 4105 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698