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

Side by Side Diff: Source/core/rendering/RenderBlock.h

Issue 157553002: Remove the Pagination struct, clean up viewport scroll policy propagation. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase master Created 6 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
« no previous file with comments | « Source/core/rendering/Pagination.cpp ('k') | Source/core/rendering/RenderBlock.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) 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) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r ights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r ights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 static RenderBlockFlow* createAnonymousColumnSpanWithParentRenderer(const Re nderObject*); 202 static RenderBlockFlow* createAnonymousColumnSpanWithParentRenderer(const Re nderObject*);
203 RenderBlock* createAnonymousBlock(EDisplay display = BLOCK) const { return c reateAnonymousWithParentRendererAndDisplay(this, display); } 203 RenderBlock* createAnonymousBlock(EDisplay display = BLOCK) const { return c reateAnonymousWithParentRendererAndDisplay(this, display); }
204 RenderBlockFlow* createAnonymousColumnsBlock() const { return createAnonymou sColumnsWithParentRenderer(this); } 204 RenderBlockFlow* createAnonymousColumnsBlock() const { return createAnonymou sColumnsWithParentRenderer(this); }
205 RenderBlockFlow* createAnonymousColumnSpanBlock() const { return createAnony mousColumnSpanWithParentRenderer(this); } 205 RenderBlockFlow* createAnonymousColumnSpanBlock() const { return createAnony mousColumnSpanWithParentRenderer(this); }
206 206
207 virtual RenderBox* createAnonymousBoxWithSameTypeAs(const RenderObject* pare nt) const OVERRIDE; 207 virtual RenderBox* createAnonymousBoxWithSameTypeAs(const RenderObject* pare nt) const OVERRIDE;
208 208
209 ColumnInfo* columnInfo() const; 209 ColumnInfo* columnInfo() const;
210 int columnGap() const; 210 int columnGap() const;
211 211
212 void updateColumnInfoFromStyle(RenderStyle*);
213
214 // These two functions take the ColumnInfo* to avoid repeated lookups of the info in the global HashMap. 212 // These two functions take the ColumnInfo* to avoid repeated lookups of the info in the global HashMap.
215 unsigned columnCount(ColumnInfo*) const; 213 unsigned columnCount(ColumnInfo*) const;
216 LayoutRect columnRectAt(ColumnInfo*, unsigned) const; 214 LayoutRect columnRectAt(ColumnInfo*, unsigned) const;
217 215
218 LayoutUnit paginationStrut() const { return m_rareData ? m_rareData->m_pagin ationStrut : LayoutUnit(); } 216 LayoutUnit paginationStrut() const { return m_rareData ? m_rareData->m_pagin ationStrut : LayoutUnit(); }
219 void setPaginationStrut(LayoutUnit); 217 void setPaginationStrut(LayoutUnit);
220 218
221 bool shouldBreakAtLineToAvoidWidow() const { return m_rareData && m_rareData ->m_lineBreakToAvoidWidow >= 0; } 219 bool shouldBreakAtLineToAvoidWidow() const { return m_rareData && m_rareData ->m_lineBreakToAvoidWidow >= 0; }
222 void clearShouldBreakAtLineToAvoidWidow() const; 220 void clearShouldBreakAtLineToAvoidWidow() const;
223 int lineBreakToAvoidWidow() const { return m_rareData ? m_rareData->m_lineBr eakToAvoidWidow : -1; } 221 int lineBreakToAvoidWidow() const { return m_rareData ? m_rareData->m_lineBr eakToAvoidWidow : -1; }
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 // Adjust from painting offsets to the local coords of this renderer 558 // Adjust from painting offsets to the local coords of this renderer
561 void offsetForContents(LayoutPoint&) const; 559 void offsetForContents(LayoutPoint&) const;
562 560
563 // This function is called to test a line box that has moved in the block di rection to see if it has ended up in a new 561 // This function is called to test a line box that has moved in the block di rection to see if it has ended up in a new
564 // region/page/column that has a different available line width than the old one. Used to know when you have to dirty a 562 // region/page/column that has a different available line width than the old one. Used to know when you have to dirty a
565 // line, i.e., that it can't be re-used. 563 // line, i.e., that it can't be re-used.
566 bool lineWidthForPaginatedLineChanged(RootInlineBox*, LayoutUnit lineDelta, RenderFlowThread*) const; 564 bool lineWidthForPaginatedLineChanged(RootInlineBox*, LayoutUnit lineDelta, RenderFlowThread*) const;
567 565
568 bool logicalWidthChangedInRegions(RenderFlowThread*) const; 566 bool logicalWidthChangedInRegions(RenderFlowThread*) const;
569 567
570 virtual bool requiresColumns(int desiredColumnCount) const; 568 bool requiresColumns(int desiredColumnCount) const;
571 569
572 virtual bool updateLogicalWidthAndColumnWidth(); 570 virtual bool updateLogicalWidthAndColumnWidth();
573 571
574 virtual bool canCollapseAnonymousBlockChild() const { return true; } 572 virtual bool canCollapseAnonymousBlockChild() const { return true; }
575 573
576 public: 574 public:
577 virtual LayoutUnit offsetFromLogicalTopOfFirstPage() const OVERRIDE FINAL; 575 virtual LayoutUnit offsetFromLogicalTopOfFirstPage() const OVERRIDE FINAL;
578 RenderRegion* regionAtBlockOffset(LayoutUnit) const; 576 RenderRegion* regionAtBlockOffset(LayoutUnit) const;
579 RenderRegion* clampToStartAndEndRegions(RenderRegion*) const; 577 RenderRegion* clampToStartAndEndRegions(RenderRegion*) const;
580 578
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 return false; 635 return false;
638 } 636 }
639 return true; 637 return true;
640 } 638 }
641 639
642 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); 640 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock());
643 641
644 } // namespace WebCore 642 } // namespace WebCore
645 643
646 #endif // RenderBlock_h 644 #endif // RenderBlock_h
OLDNEW
« no previous file with comments | « Source/core/rendering/Pagination.cpp ('k') | Source/core/rendering/RenderBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698