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

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

Issue 566973002: Constify the rendering/ selection code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderBlock.cpp ('k') | Source/core/rendering/RenderBlockFlow.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-2013 Apple Inc. All rights reserved. 5 * Copyright (C) 2003-2013 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * Copyright (C) 2013 Google Inc. All rights reserved. 7 * Copyright (C) 2013 Google Inc. All rights reserved.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions are 10 * modification, are permitted provided that the following conditions are
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } 88 }
89 89
90 // FIXME-BLOCKFLOW: Move this into RenderBlockFlow once there are no calls 90 // FIXME-BLOCKFLOW: Move this into RenderBlockFlow once there are no calls
91 // in RenderBlock. http://crbug.com/393945, http://crbug.com/302024 91 // in RenderBlock. http://crbug.com/393945, http://crbug.com/302024
92 using RenderBlock::lineBoxes; 92 using RenderBlock::lineBoxes;
93 using RenderBlock::firstLineBox; 93 using RenderBlock::firstLineBox;
94 using RenderBlock::lastLineBox; 94 using RenderBlock::lastLineBox;
95 using RenderBlock::firstRootBox; 95 using RenderBlock::firstRootBox;
96 using RenderBlock::lastRootBox; 96 using RenderBlock::lastRootBox;
97 97
98 virtual LayoutUnit logicalLeftSelectionOffset(RenderBlock* rootBlock, Layout Unit position) OVERRIDE; 98 virtual LayoutUnit logicalLeftSelectionOffset(const RenderBlock* rootBlock, LayoutUnit position) const OVERRIDE;
99 virtual LayoutUnit logicalRightSelectionOffset(RenderBlock* rootBlock, Layou tUnit position) OVERRIDE; 99 virtual LayoutUnit logicalRightSelectionOffset(const RenderBlock* rootBlock, LayoutUnit position) const OVERRIDE;
100 100
101 RootInlineBox* createAndAppendRootInlineBox(); 101 RootInlineBox* createAndAppendRootInlineBox();
102 102
103 void markAllDescendantsWithFloatsForLayout(RenderBox* floatToRemove = 0, boo l inLayout = true); 103 void markAllDescendantsWithFloatsForLayout(RenderBox* floatToRemove = 0, boo l inLayout = true);
104 void markSiblingsWithFloatsForLayout(RenderBox* floatToRemove = 0); 104 void markSiblingsWithFloatsForLayout(RenderBox* floatToRemove = 0);
105 105
106 bool containsFloats() const { return m_floatingObjects && !m_floatingObjects ->set().isEmpty(); } 106 bool containsFloats() const { return m_floatingObjects && !m_floatingObjects ->set().isEmpty(); }
107 bool containsFloat(RenderBox*) const; 107 bool containsFloat(RenderBox*) const;
108 108
109 void removeFloatingObjects(); 109 void removeFloatingObjects();
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 { 171 {
172 if (m_rareData) 172 if (m_rareData)
173 m_rareData->m_multiColumnFlowThread = nullptr; 173 m_rareData->m_multiColumnFlowThread = nullptr;
174 } 174 }
175 175
176 void addOverflowFromInlineChildren(); 176 void addOverflowFromInlineChildren();
177 177
178 // FIXME: This should be const to avoid a const_cast, but can modify child d irty bits and RenderCombineText 178 // FIXME: This should be const to avoid a const_cast, but can modify child d irty bits and RenderCombineText
179 void computeInlinePreferredLogicalWidths(LayoutUnit& minLogicalWidth, Layout Unit& maxLogicalWidth); 179 void computeInlinePreferredLogicalWidths(LayoutUnit& minLogicalWidth, Layout Unit& maxLogicalWidth);
180 180
181 GapRects inlineSelectionGaps(RenderBlock* rootBlock, const LayoutPoint& root BlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, 181 GapRects inlineSelectionGaps(const RenderBlock* rootBlock, const LayoutPoint & rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock,
182 LayoutUnit& lastLogicalTop, LayoutUnit& lastLogicalLeft, LayoutUnit& las tLogicalRight, const PaintInfo*); 182 LayoutUnit& lastLogicalTop, LayoutUnit& lastLogicalLeft, LayoutUnit& las tLogicalRight, const PaintInfo*) const;
183 183
184 LayoutUnit paginationStrut() const { return m_rareData ? m_rareData->m_pagin ationStrut : LayoutUnit(); } 184 LayoutUnit paginationStrut() const { return m_rareData ? m_rareData->m_pagin ationStrut : LayoutUnit(); }
185 void setPaginationStrut(LayoutUnit); 185 void setPaginationStrut(LayoutUnit);
186 186
187 virtual bool avoidsFloats() const OVERRIDE; 187 virtual bool avoidsFloats() const OVERRIDE;
188 188
189 protected: 189 protected:
190 void rebuildFloatsFromIntruding(); 190 void rebuildFloatsFromIntruding();
191 void layoutInlineChildren(bool relayoutChildren, LayoutUnit& paintInvalidati onLogicalTop, LayoutUnit& paintInvalidationLogicalBottom, LayoutUnit afterEdge); 191 void layoutInlineChildren(bool relayoutChildren, LayoutUnit& paintInvalidati onLogicalTop, LayoutUnit& paintInvalidationLogicalBottom, LayoutUnit afterEdge);
192 192
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 void addOverhangingFloats(RenderBlockFlow* child, bool makeChildPaintOtherFl oats); 257 void addOverhangingFloats(RenderBlockFlow* child, bool makeChildPaintOtherFl oats);
258 258
259 LayoutUnit lowestFloatLogicalBottom(FloatingObject::Type = FloatingObject::F loatLeftRight) const; 259 LayoutUnit lowestFloatLogicalBottom(FloatingObject::Type = FloatingObject::F loatLeftRight) const;
260 LayoutUnit nextFloatLogicalBottomBelow(LayoutUnit, ShapeOutsideFloatOffsetMo de = ShapeOutsideFloatMarginBoxOffset) const; 260 LayoutUnit nextFloatLogicalBottomBelow(LayoutUnit, ShapeOutsideFloatOffsetMo de = ShapeOutsideFloatMarginBoxOffset) const;
261 261
262 virtual bool hitTestFloats(const HitTestRequest&, HitTestResult&, const HitT estLocation& locationInContainer, const LayoutPoint& accumulatedOffset) OVERRIDE FINAL; 262 virtual bool hitTestFloats(const HitTestRequest&, HitTestResult&, const HitT estLocation& locationInContainer, const LayoutPoint& accumulatedOffset) OVERRIDE FINAL;
263 263
264 virtual void invalidatePaintForOverhangingFloats(bool paintAllDescendants) O VERRIDE FINAL; 264 virtual void invalidatePaintForOverhangingFloats(bool paintAllDescendants) O VERRIDE FINAL;
265 virtual void invalidatePaintForOverflow() OVERRIDE FINAL; 265 virtual void invalidatePaintForOverflow() OVERRIDE FINAL;
266 virtual void paintFloats(PaintInfo&, const LayoutPoint&, bool preservePhase = false) OVERRIDE FINAL; 266 virtual void paintFloats(PaintInfo&, const LayoutPoint&, bool preservePhase = false) OVERRIDE FINAL;
267 virtual void clipOutFloatingObjects(RenderBlock*, const PaintInfo*, const La youtPoint&, const LayoutSize&) OVERRIDE; 267 virtual void clipOutFloatingObjects(const RenderBlock*, const PaintInfo*, co nst LayoutPoint&, const LayoutSize&) const OVERRIDE;
268 void clearFloats(EClear); 268 void clearFloats(EClear);
269 269
270 LayoutUnit logicalRightFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, LayoutUnit logicalHeight) const; 270 LayoutUnit logicalRightFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, LayoutUnit logicalHeight) const;
271 LayoutUnit logicalLeftFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit f ixedOffset, LayoutUnit logicalHeight) const; 271 LayoutUnit logicalLeftFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit f ixedOffset, LayoutUnit logicalHeight) const;
272 272
273 LayoutUnit logicalRightOffsetForPositioningFloat(LayoutUnit logicalTop, Layo utUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining) const; 273 LayoutUnit logicalRightOffsetForPositioningFloat(LayoutUnit logicalTop, Layo utUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining) const;
274 LayoutUnit logicalLeftOffsetForPositioningFloat(LayoutUnit logicalTop, Layou tUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining) const; 274 LayoutUnit logicalLeftOffsetForPositioningFloat(LayoutUnit logicalTop, Layou tUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining) const;
275 275
276 LayoutUnit adjustLogicalRightOffsetForLine(LayoutUnit offsetFromFloats, bool applyTextIndent) const; 276 LayoutUnit adjustLogicalRightOffsetForLine(LayoutUnit offsetFromFloats, bool applyTextIndent) const;
277 LayoutUnit adjustLogicalLeftOffsetForLine(LayoutUnit offsetFromFloats, bool applyTextIndent) const; 277 LayoutUnit adjustLogicalLeftOffsetForLine(LayoutUnit offsetFromFloats, bool applyTextIndent) const;
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 498
499 // END METHODS DEFINED IN RenderBlockLineLayout 499 // END METHODS DEFINED IN RenderBlockLineLayout
500 500
501 }; 501 };
502 502
503 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlockFlow, isRenderBlockFlow()); 503 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlockFlow, isRenderBlockFlow());
504 504
505 } // namespace blink 505 } // namespace blink
506 506
507 #endif // RenderBlockFlow_h 507 #endif // RenderBlockFlow_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBlock.cpp ('k') | Source/core/rendering/RenderBlockFlow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698