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

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

Issue 2266273002: Use LayoutUnit where previously LayoutUnits were implicitly converted to int (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2937 matching lines...) Expand 10 before | Expand all | Expand 10 after
2948 layoutView->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidatio n(LayoutInvalidationReason::PrintingChanged); 2948 layoutView->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidatio n(LayoutInvalidationReason::PrintingChanged);
2949 layout(); 2949 layout();
2950 2950
2951 const LayoutRect& updatedDocumentRect = LayoutRect(layoutView->docum entRect()); 2951 const LayoutRect& updatedDocumentRect = LayoutRect(layoutView->docum entRect());
2952 LayoutUnit docLogicalHeight = horizontalWritingMode ? updatedDocumen tRect.height() : updatedDocumentRect.width(); 2952 LayoutUnit docLogicalHeight = horizontalWritingMode ? updatedDocumen tRect.height() : updatedDocumentRect.width();
2953 LayoutUnit docLogicalTop = horizontalWritingMode ? updatedDocumentRe ct.y() : updatedDocumentRect.x(); 2953 LayoutUnit docLogicalTop = horizontalWritingMode ? updatedDocumentRe ct.y() : updatedDocumentRect.x();
2954 LayoutUnit docLogicalRight = horizontalWritingMode ? updatedDocument Rect.maxX() : updatedDocumentRect.maxY(); 2954 LayoutUnit docLogicalRight = horizontalWritingMode ? updatedDocument Rect.maxX() : updatedDocumentRect.maxY();
2955 LayoutUnit clippedLogicalLeft; 2955 LayoutUnit clippedLogicalLeft;
2956 if (!layoutView->style()->isLeftToRightDirection()) 2956 if (!layoutView->style()->isLeftToRightDirection())
2957 clippedLogicalLeft = LayoutUnit(docLogicalRight - pageLogicalWid th); 2957 clippedLogicalLeft = LayoutUnit(docLogicalRight - pageLogicalWid th);
2958 // TODO(crbug.com/638981): Are the conversions to int intentional? 2958 LayoutRect overflow(clippedLogicalLeft, docLogicalTop, LayoutUnit(pa geLogicalWidth), docLogicalHeight);
2959 LayoutRect overflow(clippedLogicalLeft.toInt(), docLogicalTop.toInt( ), pageLogicalWidth, docLogicalHeight.toInt());
2960 2959
2961 if (!horizontalWritingMode) 2960 if (!horizontalWritingMode)
2962 overflow = overflow.transposedRect(); 2961 overflow = overflow.transposedRect();
2963 layoutView->clearLayoutOverflow(); 2962 layoutView->clearLayoutOverflow();
2964 layoutView->addLayoutOverflow(overflow); // This is how we clip in c ase we overflow again. 2963 layoutView->addLayoutOverflow(overflow); // This is how we clip in c ase we overflow again.
2965 } 2964 }
2966 } 2965 }
2967 2966
2968 adjustViewSizeAndLayout(); 2967 adjustViewSizeAndLayout();
2969 } 2968 }
(...skipping 1367 matching lines...) Expand 10 before | Expand all | Expand 10 after
4337 } 4336 }
4338 4337
4339 bool FrameView::canThrottleRendering() const 4338 bool FrameView::canThrottleRendering() const
4340 { 4339 {
4341 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) 4340 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled())
4342 return false; 4341 return false;
4343 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling); 4342 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling);
4344 } 4343 }
4345 4344
4346 } // namespace blink 4345 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698