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

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

Issue 2747623002: Avoid clearing a page's layout overflow after paginated layout (Closed)
Patch Set: bug 664235 Created 3 years, 8 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 | « third_party/WebKit/LayoutTests/printing/respect-layout-overflow-from-pagination-expected.html ('k') | no next file » | 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 3494 matching lines...) Expand 10 before | Expand all | Expand 10 after
3505 ? updatedDocumentRect.maxX() 3505 ? updatedDocumentRect.maxX()
3506 : updatedDocumentRect.maxY(); 3506 : updatedDocumentRect.maxY();
3507 LayoutUnit clippedLogicalLeft; 3507 LayoutUnit clippedLogicalLeft;
3508 if (!layoutView->style()->isLeftToRightDirection()) 3508 if (!layoutView->style()->isLeftToRightDirection())
3509 clippedLogicalLeft = LayoutUnit(docLogicalRight - pageLogicalWidth); 3509 clippedLogicalLeft = LayoutUnit(docLogicalRight - pageLogicalWidth);
3510 LayoutRect overflow(clippedLogicalLeft, docLogicalTop, 3510 LayoutRect overflow(clippedLogicalLeft, docLogicalTop,
3511 LayoutUnit(pageLogicalWidth), docLogicalHeight); 3511 LayoutUnit(pageLogicalWidth), docLogicalHeight);
3512 3512
3513 if (!horizontalWritingMode) 3513 if (!horizontalWritingMode)
3514 overflow = overflow.transposedRect(); 3514 overflow = overflow.transposedRect();
3515 adjustViewSizeAndLayout();
3516 // This is how we clip in case we overflow again.
3515 layoutView->clearLayoutOverflow(); 3517 layoutView->clearLayoutOverflow();
3516 layoutView->addLayoutOverflow( 3518 layoutView->addLayoutOverflow(overflow);
3517 overflow); // This is how we clip in case we overflow again. 3519 return;
3518 } 3520 }
3519 } 3521 }
3520 3522
3521 adjustViewSizeAndLayout(); 3523 adjustViewSizeAndLayout();
3522 } 3524 }
3523 3525
3524 IntRect FrameView::convertFromLayoutItem( 3526 IntRect FrameView::convertFromLayoutItem(
3525 const LayoutItem& layoutItem, 3527 const LayoutItem& layoutItem,
3526 const IntRect& layoutObjectRect) const { 3528 const IntRect& layoutObjectRect) const {
3527 // Convert from page ("absolute") to FrameView coordinates. 3529 // Convert from page ("absolute") to FrameView coordinates.
(...skipping 1729 matching lines...) Expand 10 before | Expand all | Expand 10 after
5257 void FrameView::setAnimationHost( 5259 void FrameView::setAnimationHost(
5258 std::unique_ptr<CompositorAnimationHost> host) { 5260 std::unique_ptr<CompositorAnimationHost> host) {
5259 m_animationHost = std::move(host); 5261 m_animationHost = std::move(host);
5260 } 5262 }
5261 5263
5262 LayoutUnit FrameView::caretWidth() const { 5264 LayoutUnit FrameView::caretWidth() const {
5263 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); 5265 return LayoutUnit(getHostWindow()->windowToViewportScalar(1));
5264 } 5266 }
5265 5267
5266 } // namespace blink 5268 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/printing/respect-layout-overflow-from-pagination-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698