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

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

Issue 148823002: *** DO NOT LAND *** Measure the size and complexity of the old multicol implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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/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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 return adjustLogicalRightOffsetForLine(logicalRightFloatOffsetForLine(lo gicalTop, fixedOffset, logicalHeight), applyTextIndent); 249 return adjustLogicalRightOffsetForLine(logicalRightFloatOffsetForLine(lo gicalTop, fixedOffset, logicalHeight), applyTextIndent);
250 } 250 }
251 LayoutUnit logicalLeftOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedO ffset, bool applyTextIndent, LayoutUnit logicalHeight = 0) const 251 LayoutUnit logicalLeftOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedO ffset, bool applyTextIndent, LayoutUnit logicalHeight = 0) const
252 { 252 {
253 return adjustLogicalLeftOffsetForLine(logicalLeftFloatOffsetForLine(logi calTop, fixedOffset, logicalHeight), applyTextIndent); 253 return adjustLogicalLeftOffsetForLine(logicalLeftFloatOffsetForLine(logi calTop, fixedOffset, logicalHeight), applyTextIndent);
254 } 254 }
255 255
256 virtual void insertedIntoTree() OVERRIDE; 256 virtual void insertedIntoTree() OVERRIDE;
257 virtual void willBeDestroyed() OVERRIDE; 257 virtual void willBeDestroyed() OVERRIDE;
258 private: 258 private:
259 void layoutBlockFlow(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0 ); 259 void layoutBlockFlow(bool relayoutChildren);
260 void layoutBlockChildren(bool relayoutChildren, LayoutUnit& maxFloatLogicalB ottom, SubtreeLayoutScope&, LayoutUnit beforeEdge, LayoutUnit afterEdge); 260 void layoutBlockChildren(bool relayoutChildren, LayoutUnit& maxFloatLogicalB ottom, SubtreeLayoutScope&, LayoutUnit beforeEdge, LayoutUnit afterEdge);
261 261
262 void layoutBlockChild(RenderBox* child, MarginInfo&, LayoutUnit& previousFlo atLogicalBottom, LayoutUnit& maxFloatLogicalBottom); 262 void layoutBlockChild(RenderBox* child, MarginInfo&, LayoutUnit& previousFlo atLogicalBottom, LayoutUnit& maxFloatLogicalBottom);
263 void adjustPositionedBlock(RenderBox* child, const MarginInfo&); 263 void adjustPositionedBlock(RenderBox* child, const MarginInfo&);
264 void adjustFloatingBlock(const MarginInfo&); 264 void adjustFloatingBlock(const MarginInfo&);
265 265
266 LayoutPoint flipFloatForWritingModeForChild(const FloatingObject*, const Lay outPoint&) const; 266 LayoutPoint flipFloatForWritingModeForChild(const FloatingObject*, const Lay outPoint&) const;
267 267
268 LayoutUnit xPositionForFloatIncludingMargin(const FloatingObject* child) con st 268 LayoutUnit xPositionForFloatIncludingMargin(const FloatingObject* child) con st
269 { 269 {
(...skipping 16 matching lines...) Expand all
286 FloatingObject* insertFloatingObject(RenderBox*); 286 FloatingObject* insertFloatingObject(RenderBox*);
287 void removeFloatingObject(RenderBox*); 287 void removeFloatingObject(RenderBox*);
288 void removeFloatingObjectsBelow(FloatingObject*, int logicalOffset); 288 void removeFloatingObjectsBelow(FloatingObject*, int logicalOffset);
289 289
290 // Called from lineWidth, to position the floats added in the last line. 290 // Called from lineWidth, to position the floats added in the last line.
291 // Returns true if and only if it has positioned any floats. 291 // Returns true if and only if it has positioned any floats.
292 bool positionNewFloats(); 292 bool positionNewFloats();
293 293
294 LayoutUnit getClearDelta(RenderBox* child, LayoutUnit yPos); 294 LayoutUnit getClearDelta(RenderBox* child, LayoutUnit yPos);
295 295
296 bool hasOverhangingFloats() { return parent() && !hasColumns() && containsFl oats() && lowestFloatLogicalBottom() > logicalHeight(); } 296 bool hasOverhangingFloats() { return parent() && containsFloats() && lowestF loatLogicalBottom() > logicalHeight(); }
297 bool hasOverhangingFloat(RenderBox*); 297 bool hasOverhangingFloat(RenderBox*);
298 void addIntrudingFloats(RenderBlockFlow* prev, LayoutUnit xoffset, LayoutUni t yoffset); 298 void addIntrudingFloats(RenderBlockFlow* prev, LayoutUnit xoffset, LayoutUni t yoffset);
299 LayoutUnit addOverhangingFloats(RenderBlockFlow* child, bool makeChildPaintO therFloats); 299 LayoutUnit addOverhangingFloats(RenderBlockFlow* child, bool makeChildPaintO therFloats);
300 300
301 LayoutUnit lowestFloatLogicalBottom(FloatingObject::Type = FloatingObject::F loatLeftRight) const; 301 LayoutUnit lowestFloatLogicalBottom(FloatingObject::Type = FloatingObject::F loatLeftRight) const;
302 LayoutUnit nextFloatLogicalBottomBelow(LayoutUnit, ShapeOutsideFloatOffsetMo de = ShapeOutsideFloatMarginBoxOffset) const; 302 LayoutUnit nextFloatLogicalBottomBelow(LayoutUnit, ShapeOutsideFloatOffsetMo de = ShapeOutsideFloatMarginBoxOffset) const;
303 303
304 virtual bool hitTestFloats(const HitTestRequest&, HitTestResult&, const HitT estLocation& locationInContainer, const LayoutPoint& accumulatedOffset) OVERRIDE FINAL; 304 virtual bool hitTestFloats(const HitTestRequest&, HitTestResult&, const HitT estLocation& locationInContainer, const LayoutPoint& accumulatedOffset) OVERRIDE FINAL;
305 305
306 virtual void repaintOverhangingFloats(bool paintAllDescendants) OVERRIDE FIN AL; 306 virtual void repaintOverhangingFloats(bool paintAllDescendants) OVERRIDE FIN AL;
307 virtual void repaintOverflow() OVERRIDE FINAL; 307 virtual void repaintOverflow() OVERRIDE FINAL;
308 virtual void paintFloats(PaintInfo&, const LayoutPoint&, bool preservePhase = false) OVERRIDE FINAL; 308 virtual void paintFloats(PaintInfo&, const LayoutPoint&, bool preservePhase = false) OVERRIDE FINAL;
309 virtual void clipOutFloatingObjects(RenderBlock*, const PaintInfo*, const La youtPoint&, const LayoutSize&) OVERRIDE; 309 virtual void clipOutFloatingObjects(RenderBlock*, const PaintInfo*, const La youtPoint&, const LayoutSize&) OVERRIDE;
310 void clearFloats(EClear); 310 void clearFloats(EClear);
311 311
312 LayoutUnit logicalRightFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, LayoutUnit logicalHeight) const; 312 LayoutUnit logicalRightFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, LayoutUnit logicalHeight) const;
313 LayoutUnit logicalLeftFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit f ixedOffset, LayoutUnit logicalHeight) const; 313 LayoutUnit logicalLeftFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit f ixedOffset, LayoutUnit logicalHeight) const;
314 314
315 LayoutUnit logicalRightOffsetForPositioningFloat(LayoutUnit logicalTop, Layo utUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining) const; 315 LayoutUnit logicalRightOffsetForPositioningFloat(LayoutUnit logicalTop, Layo utUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining) const;
316 LayoutUnit logicalLeftOffsetForPositioningFloat(LayoutUnit logicalTop, Layou tUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining) const; 316 LayoutUnit logicalLeftOffsetForPositioningFloat(LayoutUnit logicalTop, Layou tUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining) const;
317 317
318 LayoutUnit adjustLogicalRightOffsetForLine(LayoutUnit offsetFromFloats, bool applyTextIndent) const; 318 LayoutUnit adjustLogicalRightOffsetForLine(LayoutUnit offsetFromFloats, bool applyTextIndent) const;
319 LayoutUnit adjustLogicalLeftOffsetForLine(LayoutUnit offsetFromFloats, bool applyTextIndent) const; 319 LayoutUnit adjustLogicalLeftOffsetForLine(LayoutUnit offsetFromFloats, bool applyTextIndent) const;
320 320
321 virtual void adjustForBorderFit(LayoutUnit x, LayoutUnit& left, LayoutUnit& right) const OVERRIDE; // Helper function for borderFitAdjust 321 virtual void adjustForBorderFit(LayoutUnit x, LayoutUnit& left, LayoutUnit& right) const OVERRIDE; // Helper function for borderFitAdjust
322 322
323 virtual RootInlineBox* createRootInlineBox(); // Subclassed by SVG 323 virtual RootInlineBox* createRootInlineBox(); // Subclassed by SVG
324 324
325 void updateLogicalWidthForAlignment(const ETextAlign&, const RootInlineBox*, BidiRun* trailingSpaceRun, float& logicalLeft, float& totalLogicalWidth, float& availableLogicalWidth, int expansionOpportunityCount); 325 void updateLogicalWidthForAlignment(const ETextAlign&, const RootInlineBox*, BidiRun* trailingSpaceRun, float& logicalLeft, float& totalLogicalWidth, float& availableLogicalWidth, int expansionOpportunityCount);
326 virtual bool relayoutForPagination(bool hasSpecifiedPageLogicalHeight, Layou tUnit pageLogicalHeight, LayoutStateMaintainer&); 326 virtual bool relayoutForPagination(bool hasSpecifiedPageLogicalHeight, Layou tUnit pageLogicalHeight, LayoutStateMaintainer&) { return false; }
327 public: 327 public:
328 struct FloatWithRect { 328 struct FloatWithRect {
329 FloatWithRect(RenderBox* f) 329 FloatWithRect(RenderBox* f)
330 : object(f) 330 : object(f)
331 , rect(LayoutRect(f->x() - f->marginLeft(), f->y() - f->marginTop(), f->width() + f->marginWidth(), f->height() + f->marginHeight())) 331 , rect(LayoutRect(f->x() - f->marginLeft(), f->y() - f->marginTop(), f->width() + f->marginWidth(), f->height() + f->marginHeight()))
332 , everHadLayout(f->everHadLayout()) 332 , everHadLayout(f->everHadLayout())
333 { 333 {
334 } 334 }
335 335
336 RenderBox* object; 336 RenderBox* object;
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 520
521 // END METHODS DEFINED IN RenderBlockLineLayout 521 // END METHODS DEFINED IN RenderBlockLineLayout
522 522
523 }; 523 };
524 524
525 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlockFlow, isRenderBlockFlow()); 525 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlockFlow, isRenderBlockFlow());
526 526
527 } // namespace WebCore 527 } // namespace WebCore
528 528
529 #endif // RenderBlockFlow_h 529 #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