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

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

Issue 298913002: Revert of Refactor avoidsFloats() to reflect CSS2.1 spec more clearly (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 | « no previous file | 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 virtual void styleWillChange(StyleDifference, const RenderStyle& newStyle) O VERRIDE; 320 virtual void styleWillChange(StyleDifference, const RenderStyle& newStyle) O VERRIDE;
321 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV ERRIDE; 321 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV ERRIDE;
322 322
323 virtual bool hasLineIfEmpty() const; 323 virtual bool hasLineIfEmpty() const;
324 324
325 bool simplifiedLayout(); 325 bool simplifiedLayout();
326 virtual void simplifiedNormalFlowLayout(); 326 virtual void simplifiedNormalFlowLayout();
327 327
328 void setDesiredColumnCountAndWidth(int, LayoutUnit); 328 void setDesiredColumnCountAndWidth(int, LayoutUnit);
329 329
330 bool avoidsOrIgnoresFloats() { return isFloatingOrOutOfFlowPositioned() || a voidsFloats(); }
331 public: 330 public:
332 virtual void computeOverflow(LayoutUnit oldClientAfterEdge, bool = false); 331 virtual void computeOverflow(LayoutUnit oldClientAfterEdge, bool = false);
333 protected: 332 protected:
334 virtual void addOverflowFromChildren(); 333 virtual void addOverflowFromChildren();
335 void addOverflowFromPositionedObjects(); 334 void addOverflowFromPositionedObjects();
336 void addOverflowFromBlockChildren(); 335 void addOverflowFromBlockChildren();
337 void addVisualOverflowFromTheme(); 336 void addVisualOverflowFromTheme();
338 337
339 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& addition alOffset, const RenderLayerModelObject* paintContainer = 0) OVERRIDE; 338 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& addition alOffset, const RenderLayerModelObject* paintContainer = 0) OVERRIDE;
340 339
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 virtual void paintFloats(PaintInfo&, const LayoutPoint&, bool) { } 382 virtual void paintFloats(PaintInfo&, const LayoutPoint&, bool) { }
384 void paintContents(PaintInfo&, const LayoutPoint&); 383 void paintContents(PaintInfo&, const LayoutPoint&);
385 void paintColumnContents(PaintInfo&, const LayoutPoint&, bool paintFloats = false); 384 void paintColumnContents(PaintInfo&, const LayoutPoint&, bool paintFloats = false);
386 void paintColumnRules(PaintInfo&, const LayoutPoint&); 385 void paintColumnRules(PaintInfo&, const LayoutPoint&);
387 void paintSelection(PaintInfo&, const LayoutPoint&); 386 void paintSelection(PaintInfo&, const LayoutPoint&);
388 void paintCaret(PaintInfo&, const LayoutPoint&, CaretType); 387 void paintCaret(PaintInfo&, const LayoutPoint&, CaretType);
389 388
390 bool hasCaret() const { return hasCaret(CursorCaret) || hasCaret(DragCaret); } 389 bool hasCaret() const { return hasCaret(CursorCaret) || hasCaret(DragCaret); }
391 bool hasCaret(CaretType) const; 390 bool hasCaret(CaretType) const;
392 391
392 virtual bool avoidsFloats() const OVERRIDE;
393
393 bool hitTestColumns(const HitTestRequest&, HitTestResult&, const HitTestLoca tion& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction); 394 bool hitTestColumns(const HitTestRequest&, HitTestResult&, const HitTestLoca tion& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction);
394 bool hitTestContents(const HitTestRequest&, HitTestResult&, const HitTestLoc ation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) ; 395 bool hitTestContents(const HitTestRequest&, HitTestResult&, const HitTestLoc ation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) ;
395 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend erBlockFlow 396 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend erBlockFlow
396 virtual bool hitTestFloats(const HitTestRequest&, HitTestResult&, const HitT estLocation&, const LayoutPoint&) { return false; } 397 virtual bool hitTestFloats(const HitTestRequest&, HitTestResult&, const HitT estLocation&, const LayoutPoint&) { return false; }
397 398
398 virtual bool isPointInOverflowControl(HitTestResult&, const LayoutPoint& loc ationInContainer, const LayoutPoint& accumulatedOffset); 399 virtual bool isPointInOverflowControl(HitTestResult&, const LayoutPoint& loc ationInContainer, const LayoutPoint& accumulatedOffset);
399 400
400 void computeBlockPreferredLogicalWidths(LayoutUnit& minLogicalWidth, LayoutU nit& maxLogicalWidth) const; 401 void computeBlockPreferredLogicalWidths(LayoutUnit& minLogicalWidth, LayoutU nit& maxLogicalWidth) const;
401 402
402 // Obtains the nearest enclosing block (including this block) that contribut es a first-line style to our inline 403 // Obtains the nearest enclosing block (including this block) that contribut es a first-line style to our inline
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 464
464 protected: 465 protected:
465 // Returns the logicalOffset at the top of the next page. If the offset pass ed in is already at the top of the current page, 466 // Returns the logicalOffset at the top of the next page. If the offset pass ed in is already at the top of the current page,
466 // then nextPageLogicalTop with ExcludePageBoundary will still move to the t op of the next page. nextPageLogicalTop with 467 // then nextPageLogicalTop with ExcludePageBoundary will still move to the t op of the next page. nextPageLogicalTop with
467 // IncludePageBoundary set will not. 468 // IncludePageBoundary set will not.
468 // 469 //
469 // For a page height of 800px, the first rule will return 800 if the value p assed in is 0. The second rule will simply return 0. 470 // For a page height of 800px, the first rule will return 800 if the value p assed in is 0. The second rule will simply return 0.
470 enum PageBoundaryRule { ExcludePageBoundary, IncludePageBoundary }; 471 enum PageBoundaryRule { ExcludePageBoundary, IncludePageBoundary };
471 LayoutUnit nextPageLogicalTop(LayoutUnit logicalOffset, PageBoundaryRule = E xcludePageBoundary) const; 472 LayoutUnit nextPageLogicalTop(LayoutUnit logicalOffset, PageBoundaryRule = E xcludePageBoundary) const;
472 473
474 bool createsBlockFormattingContext() const;
475
473 public: 476 public:
474 LayoutUnit pageLogicalTopForOffset(LayoutUnit offset) const; 477 LayoutUnit pageLogicalTopForOffset(LayoutUnit offset) const;
475 LayoutUnit pageLogicalHeightForOffset(LayoutUnit offset) const; 478 LayoutUnit pageLogicalHeightForOffset(LayoutUnit offset) const;
476 LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit offset, PageBounda ryRule = IncludePageBoundary) const; 479 LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit offset, PageBounda ryRule = IncludePageBoundary) const;
477 480
478 protected: 481 protected:
479 // A page break is required at some offset due to space shortage in the curr ent fragmentainer. 482 // A page break is required at some offset due to space shortage in the curr ent fragmentainer.
480 void setPageBreak(LayoutUnit offset, LayoutUnit spaceShortage); 483 void setPageBreak(LayoutUnit offset, LayoutUnit spaceShortage);
481 484
482 // Update minimum page height required to avoid fragmentation where it shoul dn't occur (inside 485 // Update minimum page height required to avoid fragmentation where it shoul dn't occur (inside
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 // FIXME: This is temporary as we move code that accesses block flow 548 // FIXME: This is temporary as we move code that accesses block flow
546 // member variables out of RenderBlock and into RenderBlockFlow. 549 // member variables out of RenderBlock and into RenderBlockFlow.
547 friend class RenderBlockFlow; 550 friend class RenderBlockFlow;
548 }; 551 };
549 552
550 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); 553 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock());
551 554
552 } // namespace WebCore 555 } // namespace WebCore
553 556
554 #endif // RenderBlock_h 557 #endif // RenderBlock_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/RenderBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698