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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 | 498 |
499 bool requiresColumns(int desiredColumnCount) const; | 499 bool requiresColumns(int desiredColumnCount) const; |
500 | 500 |
501 virtual bool updateLogicalWidthAndColumnWidth(); | 501 virtual bool updateLogicalWidthAndColumnWidth(); |
502 | 502 |
503 virtual bool canCollapseAnonymousBlockChild() const { return true; } | 503 virtual bool canCollapseAnonymousBlockChild() const { return true; } |
504 | 504 |
505 public: | 505 public: |
506 virtual LayoutUnit offsetFromLogicalTopOfFirstPage() const OVERRIDE FINAL; | 506 virtual LayoutUnit offsetFromLogicalTopOfFirstPage() const OVERRIDE FINAL; |
507 | 507 |
508 void invalidateLineHeight() { m_lineHeight = -1; } | |
509 | |
510 public: | 508 public: |
511 | 509 |
512 // Allocated only when some of these fields have non-default values | 510 // Allocated only when some of these fields have non-default values |
513 struct RenderBlockRareData { | 511 struct RenderBlockRareData { |
514 WTF_MAKE_NONCOPYABLE(RenderBlockRareData); WTF_MAKE_FAST_ALLOCATED; | 512 WTF_MAKE_NONCOPYABLE(RenderBlockRareData); WTF_MAKE_FAST_ALLOCATED; |
515 public: | 513 public: |
516 RenderBlockRareData() | 514 RenderBlockRareData() |
517 : m_paginationStrut(0) | 515 : m_paginationStrut(0) |
518 , m_pageLogicalOffset(0) | 516 , m_pageLogicalOffset(0) |
519 , m_lineBreakToAvoidWidow(-1) | 517 , m_lineBreakToAvoidWidow(-1) |
520 , m_didBreakAtLineToAvoidWidow(false) | 518 , m_didBreakAtLineToAvoidWidow(false) |
521 { | 519 { |
522 } | 520 } |
523 | 521 |
524 LayoutUnit m_paginationStrut; | 522 LayoutUnit m_paginationStrut; |
525 LayoutUnit m_pageLogicalOffset; | 523 LayoutUnit m_pageLogicalOffset; |
526 | 524 |
527 int m_lineBreakToAvoidWidow : 31; | 525 int m_lineBreakToAvoidWidow : 31; |
528 unsigned m_didBreakAtLineToAvoidWidow : 1; | 526 unsigned m_didBreakAtLineToAvoidWidow : 1; |
529 }; | 527 }; |
530 | 528 |
531 protected: | 529 protected: |
532 OwnPtr<RenderBlockRareData> m_rareData; | 530 OwnPtr<RenderBlockRareData> m_rareData; |
533 | 531 |
534 RenderObjectChildList m_children; | 532 RenderObjectChildList m_children; |
535 RenderLineBoxList m_lineBoxes; // All of the root line boxes created for t
his block flow. For example, <div>Hello<br>world.</div> will have two total lin
es for the <div>. | 533 RenderLineBoxList m_lineBoxes; // All of the root line boxes created for t
his block flow. For example, <div>Hello<br>world.</div> will have two total lin
es for the <div>. |
536 | 534 |
537 mutable signed m_lineHeight : 26; | 535 // WARNING: Don't add any bits here until we are comfortable that removing m
_lineHeight has not regressed performance. See http://crrev.com/260073005 for mo
re information. |
538 unsigned m_hasMarginBeforeQuirk : 1; // Note these quirk values can't be put
in RenderBlockRareData since they are set too frequently. | 536 unsigned m_hasMarginBeforeQuirk : 1; // Note these quirk values can't be put
in RenderBlockRareData since they are set too frequently. |
539 unsigned m_hasMarginAfterQuirk : 1; | 537 unsigned m_hasMarginAfterQuirk : 1; |
540 unsigned m_beingDestroyed : 1; | 538 unsigned m_beingDestroyed : 1; |
541 unsigned m_hasMarkupTruncation : 1; | 539 unsigned m_hasMarkupTruncation : 1; |
542 unsigned m_hasBorderOrPaddingLogicalWidthChanged : 1; | 540 unsigned m_hasBorderOrPaddingLogicalWidthChanged : 1; |
543 mutable unsigned m_hasOnlySelfCollapsingChildren : 1; | 541 mutable unsigned m_hasOnlySelfCollapsingChildren : 1; |
544 | 542 |
545 // RenderRubyBase objects need to be able to split and merge, moving their c
hildren around | 543 // RenderRubyBase objects need to be able to split and merge, moving their c
hildren around |
546 // (calling moveChildTo, moveAllChildrenTo, and makeChildrenNonInline). | 544 // (calling moveChildTo, moveAllChildrenTo, and makeChildrenNonInline). |
547 friend class RenderRubyBase; | 545 friend class RenderRubyBase; |
548 // FIXME-BLOCKFLOW: Remove this when the line layout stuff has all moved out
of RenderBlock | 546 // FIXME-BLOCKFLOW: Remove this when the line layout stuff has all moved out
of RenderBlock |
549 friend class LineBreaker; | 547 friend class LineBreaker; |
550 | 548 |
551 // FIXME: This is temporary as we move code that accesses block flow | 549 // FIXME: This is temporary as we move code that accesses block flow |
552 // member variables out of RenderBlock and into RenderBlockFlow. | 550 // member variables out of RenderBlock and into RenderBlockFlow. |
553 friend class RenderBlockFlow; | 551 friend class RenderBlockFlow; |
554 }; | 552 }; |
555 | 553 |
556 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); | 554 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); |
557 | 555 |
558 } // namespace WebCore | 556 } // namespace WebCore |
559 | 557 |
560 #endif // RenderBlock_h | 558 #endif // RenderBlock_h |
OLD | NEW |