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

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

Issue 1375673004: Keep block pagination struts after layout, and store them before any type of break. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: code review Created 5 years, 2 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 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 1752 matching lines...) Expand 10 before | Expand all | Expand 10 after
1763 ensureRareData().m_spannerPlaceholder = &placeholder; 1763 ensureRareData().m_spannerPlaceholder = &placeholder;
1764 } 1764 }
1765 1765
1766 void LayoutBox::clearSpannerPlaceholder() 1766 void LayoutBox::clearSpannerPlaceholder()
1767 { 1767 {
1768 if (!m_rareData) 1768 if (!m_rareData)
1769 return; 1769 return;
1770 m_rareData->m_spannerPlaceholder = nullptr; 1770 m_rareData->m_spannerPlaceholder = nullptr;
1771 } 1771 }
1772 1772
1773 void LayoutBox::setPaginationStrut(LayoutUnit strut)
1774 {
1775 if (!strut && !m_rareData)
1776 return;
1777 ensureRareData().m_paginationStrut = strut;
1778 }
1779
1773 LayoutRect LayoutBox::clippedOverflowRectForPaintInvalidation(const LayoutBoxMod elObject* paintInvalidationContainer, const PaintInvalidationState* paintInvalid ationState) const 1780 LayoutRect LayoutBox::clippedOverflowRectForPaintInvalidation(const LayoutBoxMod elObject* paintInvalidationContainer, const PaintInvalidationState* paintInvalid ationState) const
1774 { 1781 {
1775 if (style()->visibility() != VISIBLE) { 1782 if (style()->visibility() != VISIBLE) {
1776 PaintLayer* layer = enclosingLayer(); 1783 PaintLayer* layer = enclosingLayer();
1777 layer->updateDescendantDependentFlags(); 1784 layer->updateDescendantDependentFlags();
1778 if (layer->subtreeIsInvisible()) 1785 if (layer->subtreeIsInvisible())
1779 return LayoutRect(); 1786 return LayoutRect();
1780 } 1787 }
1781 1788
1782 LayoutRect r = visualOverflowRect(); 1789 LayoutRect r = visualOverflowRect();
(...skipping 2972 matching lines...) Expand 10 before | Expand all | Expand 10 after
4755 StyleImage* borderImage = style()->borderImage().image(); 4762 StyleImage* borderImage = style()->borderImage().image();
4756 return borderImage && borderImage->canRender(*this, style()->effectiveZoom() ) && borderImage->isLoaded(); 4763 return borderImage && borderImage->canRender(*this, style()->effectiveZoom() ) && borderImage->isLoaded();
4757 } 4764 }
4758 4765
4759 ShapeOutsideInfo* LayoutBox::shapeOutsideInfo() const 4766 ShapeOutsideInfo* LayoutBox::shapeOutsideInfo() const
4760 { 4767 {
4761 return ShapeOutsideInfo::isEnabledFor(*this) ? ShapeOutsideInfo::info(*this) : nullptr; 4768 return ShapeOutsideInfo::isEnabledFor(*this) ? ShapeOutsideInfo::info(*this) : nullptr;
4762 } 4769 }
4763 4770
4764 } // namespace blink 4771 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.h ('k') | third_party/WebKit/Source/core/layout/PaginationTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698