| OLD | NEW |
| 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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 virtual void styleWillChange(StyleDifference, const RenderStyle& newStyle) O
VERRIDE; | 322 virtual void styleWillChange(StyleDifference, const RenderStyle& newStyle) O
VERRIDE; |
| 323 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV
ERRIDE; | 323 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV
ERRIDE; |
| 324 | 324 |
| 325 virtual bool hasLineIfEmpty() const; | 325 virtual bool hasLineIfEmpty() const; |
| 326 | 326 |
| 327 bool simplifiedLayout(); | 327 bool simplifiedLayout(); |
| 328 virtual void simplifiedNormalFlowLayout(); | 328 virtual void simplifiedNormalFlowLayout(); |
| 329 | 329 |
| 330 void setDesiredColumnCountAndWidth(int, LayoutUnit); | 330 void setDesiredColumnCountAndWidth(int, LayoutUnit); |
| 331 | 331 |
| 332 bool avoidsOrIgnoresFloats() { return isFloatingOrOutOfFlowPositioned() || a
voidsFloats(); } |
| 332 public: | 333 public: |
| 333 virtual void computeOverflow(LayoutUnit oldClientAfterEdge, bool = false); | 334 virtual void computeOverflow(LayoutUnit oldClientAfterEdge, bool = false); |
| 334 protected: | 335 protected: |
| 335 virtual void addOverflowFromChildren(); | 336 virtual void addOverflowFromChildren(); |
| 336 void addOverflowFromPositionedObjects(); | 337 void addOverflowFromPositionedObjects(); |
| 337 void addOverflowFromBlockChildren(); | 338 void addOverflowFromBlockChildren(); |
| 338 void addVisualOverflowFromTheme(); | 339 void addVisualOverflowFromTheme(); |
| 339 | 340 |
| 340 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& addition
alOffset, const RenderLayerModelObject* paintContainer = 0) OVERRIDE; | 341 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& addition
alOffset, const RenderLayerModelObject* paintContainer = 0) OVERRIDE; |
| 341 | 342 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend
erBlockFlow | 386 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend
erBlockFlow |
| 386 virtual void paintFloats(PaintInfo&, const LayoutPoint&, bool) { } | 387 virtual void paintFloats(PaintInfo&, const LayoutPoint&, bool) { } |
| 387 void paintContents(PaintInfo&, const LayoutPoint&); | 388 void paintContents(PaintInfo&, const LayoutPoint&); |
| 388 void paintColumnContents(PaintInfo&, const LayoutPoint&, bool paintFloats =
false); | 389 void paintColumnContents(PaintInfo&, const LayoutPoint&, bool paintFloats =
false); |
| 389 void paintColumnRules(PaintInfo&, const LayoutPoint&); | 390 void paintColumnRules(PaintInfo&, const LayoutPoint&); |
| 390 void paintSelection(PaintInfo&, const LayoutPoint&); | 391 void paintSelection(PaintInfo&, const LayoutPoint&); |
| 391 void paintCarets(PaintInfo&, const LayoutPoint&); | 392 void paintCarets(PaintInfo&, const LayoutPoint&); |
| 392 | 393 |
| 393 bool hasCaret() const; | 394 bool hasCaret() const; |
| 394 | 395 |
| 395 virtual bool avoidsFloats() const OVERRIDE; | |
| 396 | |
| 397 bool hitTestColumns(const HitTestRequest&, HitTestResult&, const HitTestLoca
tion& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction); | 396 bool hitTestColumns(const HitTestRequest&, HitTestResult&, const HitTestLoca
tion& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction); |
| 398 bool hitTestContents(const HitTestRequest&, HitTestResult&, const HitTestLoc
ation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction)
; | 397 bool hitTestContents(const HitTestRequest&, HitTestResult&, const HitTestLoc
ation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction)
; |
| 399 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend
erBlockFlow | 398 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend
erBlockFlow |
| 400 virtual bool hitTestFloats(const HitTestRequest&, HitTestResult&, const HitT
estLocation&, const LayoutPoint&) { return false; } | 399 virtual bool hitTestFloats(const HitTestRequest&, HitTestResult&, const HitT
estLocation&, const LayoutPoint&) { return false; } |
| 401 | 400 |
| 402 virtual bool isPointInOverflowControl(HitTestResult&, const LayoutPoint& loc
ationInContainer, const LayoutPoint& accumulatedOffset); | 401 virtual bool isPointInOverflowControl(HitTestResult&, const LayoutPoint& loc
ationInContainer, const LayoutPoint& accumulatedOffset); |
| 403 | 402 |
| 404 void computeBlockPreferredLogicalWidths(LayoutUnit& minLogicalWidth, LayoutU
nit& maxLogicalWidth) const; | 403 void computeBlockPreferredLogicalWidths(LayoutUnit& minLogicalWidth, LayoutU
nit& maxLogicalWidth) const; |
| 405 | 404 |
| 406 // Obtains the nearest enclosing block (including this block) that contribut
es a first-line style to our inline | 405 // 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 Loading... |
| 467 | 466 |
| 468 protected: | 467 protected: |
| 469 // 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, | 468 // 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, |
| 470 // then nextPageLogicalTop with ExcludePageBoundary will still move to the t
op of the next page. nextPageLogicalTop with | 469 // then nextPageLogicalTop with ExcludePageBoundary will still move to the t
op of the next page. nextPageLogicalTop with |
| 471 // IncludePageBoundary set will not. | 470 // IncludePageBoundary set will not. |
| 472 // | 471 // |
| 473 // 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. | 472 // 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. |
| 474 enum PageBoundaryRule { ExcludePageBoundary, IncludePageBoundary }; | 473 enum PageBoundaryRule { ExcludePageBoundary, IncludePageBoundary }; |
| 475 LayoutUnit nextPageLogicalTop(LayoutUnit logicalOffset, PageBoundaryRule = E
xcludePageBoundary) const; | 474 LayoutUnit nextPageLogicalTop(LayoutUnit logicalOffset, PageBoundaryRule = E
xcludePageBoundary) const; |
| 476 | 475 |
| 477 bool createsBlockFormattingContext() const; | |
| 478 | |
| 479 public: | 476 public: |
| 480 LayoutUnit pageLogicalTopForOffset(LayoutUnit offset) const; | 477 LayoutUnit pageLogicalTopForOffset(LayoutUnit offset) const; |
| 481 LayoutUnit pageLogicalHeightForOffset(LayoutUnit offset) const; | 478 LayoutUnit pageLogicalHeightForOffset(LayoutUnit offset) const; |
| 482 LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit offset, PageBounda
ryRule = IncludePageBoundary) const; | 479 LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit offset, PageBounda
ryRule = IncludePageBoundary) const; |
| 483 | 480 |
| 484 protected: | 481 protected: |
| 485 // 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. |
| 486 void setPageBreak(LayoutUnit offset, LayoutUnit spaceShortage); | 483 void setPageBreak(LayoutUnit offset, LayoutUnit spaceShortage); |
| 487 | 484 |
| 488 // 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 // FIXME: This is temporary as we move code that accesses block flow | 546 // FIXME: This is temporary as we move code that accesses block flow |
| 550 // member variables out of RenderBlock and into RenderBlockFlow. | 547 // member variables out of RenderBlock and into RenderBlockFlow. |
| 551 friend class RenderBlockFlow; | 548 friend class RenderBlockFlow; |
| 552 }; | 549 }; |
| 553 | 550 |
| 554 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); | 551 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); |
| 555 | 552 |
| 556 } // namespace WebCore | 553 } // namespace WebCore |
| 557 | 554 |
| 558 #endif // RenderBlock_h | 555 #endif // RenderBlock_h |
| OLD | NEW |