| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 template <class Run> class BidiRunList; | 48 template <class Run> class BidiRunList; |
| 49 typedef WTF::ListHashSet<RenderBox*, 16> TrackedRendererListHashSet; | 49 typedef WTF::ListHashSet<RenderBox*, 16> TrackedRendererListHashSet; |
| 50 typedef WTF::HashMap<const RenderBlock*, OwnPtr<TrackedRendererListHashSet> > Tr
ackedDescendantsMap; | 50 typedef WTF::HashMap<const RenderBlock*, OwnPtr<TrackedRendererListHashSet> > Tr
ackedDescendantsMap; |
| 51 typedef WTF::HashMap<const RenderBox*, OwnPtr<HashSet<RenderBlock*> > > TrackedC
ontainerMap; | 51 typedef WTF::HashMap<const RenderBox*, OwnPtr<HashSet<RenderBlock*> > > TrackedC
ontainerMap; |
| 52 typedef Vector<WordMeasurement, 64> WordMeasurements; | 52 typedef Vector<WordMeasurement, 64> WordMeasurements; |
| 53 | 53 |
| 54 enum ContainingBlockState { NewContainingBlock, SameContainingBlock }; | 54 enum ContainingBlockState { NewContainingBlock, SameContainingBlock }; |
| 55 | 55 |
| 56 class RenderBlock : public RenderBox { | 56 class RenderBlock : public RenderBox { |
| 57 public: | 57 public: |
| 58 virtual void destroy() OVERRIDE; | |
| 59 virtual void trace(Visitor*) OVERRIDE; | 58 virtual void trace(Visitor*) OVERRIDE; |
| 60 friend class LineLayoutState; | 59 friend class LineLayoutState; |
| 61 | 60 |
| 62 protected: | 61 protected: |
| 63 explicit RenderBlock(ContainerNode*); | 62 explicit RenderBlock(ContainerNode*); |
| 64 virtual ~RenderBlock(); | 63 virtual ~RenderBlock(); |
| 65 | 64 |
| 66 public: | 65 public: |
| 67 RenderObject* firstChild() const { ASSERT(children() == virtualChildren());
return children()->firstChild(); } | 66 RenderObject* firstChild() const { ASSERT(children() == virtualChildren());
return children()->firstChild(); } |
| 68 RenderObject* lastChild() const { ASSERT(children() == virtualChildren()); r
eturn children()->lastChild(); } | 67 RenderObject* lastChild() const { ASSERT(children() == virtualChildren()); r
eturn children()->lastChild(); } |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 void splitFlow(RenderObject* beforeChild, RenderBlock* newBlockBox, | 436 void splitFlow(RenderObject* beforeChild, RenderBlock* newBlockBox, |
| 438 RenderObject* newChild, RenderBoxModelObject* oldCont); | 437 RenderObject* newChild, RenderBoxModelObject* oldCont); |
| 439 RenderBlock* clone() const; | 438 RenderBlock* clone() const; |
| 440 RenderBlock* continuationBefore(RenderObject* beforeChild); | 439 RenderBlock* continuationBefore(RenderObject* beforeChild); |
| 441 RenderBlockFlow* containingColumnsBlock(bool allowAnonymousColumnBlock = tru
e); | 440 RenderBlockFlow* containingColumnsBlock(bool allowAnonymousColumnBlock = tru
e); |
| 442 RenderBlockFlow* columnsBlockForSpanningElement(RenderObject* newChild); | 441 RenderBlockFlow* columnsBlockForSpanningElement(RenderObject* newChild); |
| 443 | 442 |
| 444 // End helper functions and structs used by layoutBlockChildren. | 443 // End helper functions and structs used by layoutBlockChildren. |
| 445 | 444 |
| 446 bool widthAvailableToChildrenHasChanged(); | 445 bool widthAvailableToChildrenHasChanged(); |
| 447 void removeFromGlobalMaps(); | |
| 448 | 446 |
| 449 protected: | 447 protected: |
| 450 // 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, | 448 // 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, |
| 451 // then nextPageLogicalTop with ExcludePageBoundary will still move to the t
op of the next page. nextPageLogicalTop with | 449 // then nextPageLogicalTop with ExcludePageBoundary will still move to the t
op of the next page. nextPageLogicalTop with |
| 452 // IncludePageBoundary set will not. | 450 // IncludePageBoundary set will not. |
| 453 // | 451 // |
| 454 // 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. | 452 // 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. |
| 455 enum PageBoundaryRule { ExcludePageBoundary, IncludePageBoundary }; | 453 enum PageBoundaryRule { ExcludePageBoundary, IncludePageBoundary }; |
| 456 LayoutUnit nextPageLogicalTop(LayoutUnit logicalOffset, PageBoundaryRule = E
xcludePageBoundary) const; | 454 LayoutUnit nextPageLogicalTop(LayoutUnit logicalOffset, PageBoundaryRule = E
xcludePageBoundary) const; |
| 457 | 455 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 // FIXME: This is temporary as we move code that accesses block flow | 506 // FIXME: This is temporary as we move code that accesses block flow |
| 509 // member variables out of RenderBlock and into RenderBlockFlow. | 507 // member variables out of RenderBlock and into RenderBlockFlow. |
| 510 friend class RenderBlockFlow; | 508 friend class RenderBlockFlow; |
| 511 }; | 509 }; |
| 512 | 510 |
| 513 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); | 511 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); |
| 514 | 512 |
| 515 } // namespace blink | 513 } // namespace blink |
| 516 | 514 |
| 517 #endif // RenderBlock_h | 515 #endif // RenderBlock_h |
| OLD | NEW |