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

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: Also fix LayoutRectTest.cpp 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 2750 matching lines...) Expand 10 before | Expand all | Expand 10 after
2761 layoutView->setPageLogicalHeight(flooredPageLogicalHeight); 2761 layoutView->setPageLogicalHeight(flooredPageLogicalHeight);
2762 layoutView->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidatio n(LayoutInvalidationReason::PrintingChanged); 2762 layoutView->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidatio n(LayoutInvalidationReason::PrintingChanged);
2763 layout(); 2763 layout();
2764 2764
2765 const LayoutRect& updatedDocumentRect = LayoutRect(layoutView->docum entRect()); 2765 const LayoutRect& updatedDocumentRect = LayoutRect(layoutView->docum entRect());
2766 LayoutUnit docLogicalHeight = horizontalWritingMode ? updatedDocumen tRect.height() : updatedDocumentRect.width(); 2766 LayoutUnit docLogicalHeight = horizontalWritingMode ? updatedDocumen tRect.height() : updatedDocumentRect.width();
2767 LayoutUnit docLogicalTop = horizontalWritingMode ? updatedDocumentRe ct.y() : updatedDocumentRect.x(); 2767 LayoutUnit docLogicalTop = horizontalWritingMode ? updatedDocumentRe ct.y() : updatedDocumentRect.x();
2768 LayoutUnit docLogicalRight = horizontalWritingMode ? updatedDocument Rect.maxX() : updatedDocumentRect.maxY(); 2768 LayoutUnit docLogicalRight = horizontalWritingMode ? updatedDocument Rect.maxX() : updatedDocumentRect.maxY();
2769 LayoutUnit clippedLogicalLeft; 2769 LayoutUnit clippedLogicalLeft;
2770 if (!layoutView->style()->isLeftToRightDirection()) 2770 if (!layoutView->style()->isLeftToRightDirection())
2771 clippedLogicalLeft = docLogicalRight - pageLogicalWidth; 2771 clippedLogicalLeft = LayoutUnit(docLogicalRight - pageLogicalWid th);
2772 LayoutRect overflow(clippedLogicalLeft, docLogicalTop, pageLogicalWi dth, docLogicalHeight); 2772 LayoutRect overflow(clippedLogicalLeft, docLogicalTop, pageLogicalWi dth, docLogicalHeight);
2773 2773
2774 if (!horizontalWritingMode) 2774 if (!horizontalWritingMode)
2775 overflow = overflow.transposedRect(); 2775 overflow = overflow.transposedRect();
2776 layoutView->clearLayoutOverflow(); 2776 layoutView->clearLayoutOverflow();
2777 layoutView->addLayoutOverflow(overflow); // This is how we clip in c ase we overflow again. 2777 layoutView->addLayoutOverflow(overflow); // This is how we clip in c ase we overflow again.
2778 } 2778 }
2779 } 2779 }
2780 2780
2781 adjustViewSize(); 2781 adjustViewSize();
(...skipping 1315 matching lines...) Expand 10 before | Expand all | Expand 10 after
4097 return m_hiddenForThrottling && m_crossOriginForThrottling; 4097 return m_hiddenForThrottling && m_crossOriginForThrottling;
4098 } 4098 }
4099 4099
4100 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const 4100 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const
4101 { 4101 {
4102 ASSERT(layoutView()); 4102 ASSERT(layoutView());
4103 return *layoutView(); 4103 return *layoutView();
4104 } 4104 }
4105 4105
4106 } // namespace blink 4106 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.cpp ('k') | third_party/WebKit/Source/core/html/HTMLSelectElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698