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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 bool nodeAtPoint(HitTestResult&, const HitTestLocation& locationInContainer,
const LayoutPoint& accumulatedOffset, HitTestAction) override; | 249 bool nodeAtPoint(HitTestResult&, const HitTestLocation& locationInContainer,
const LayoutPoint& accumulatedOffset, HitTestAction) override; |
250 | 250 |
251 virtual void scrollbarsChanged(bool /*horizontalScrollbarChanged*/, bool /*v
erticalScrollbarChanged*/) { } | 251 virtual void scrollbarsChanged(bool /*horizontalScrollbarChanged*/, bool /*v
erticalScrollbarChanged*/) { } |
252 | 252 |
253 LayoutUnit availableLogicalWidthForContent() const { return max<LayoutUnit>(
0, logicalRightOffsetForContent() - logicalLeftOffsetForContent()); } | 253 LayoutUnit availableLogicalWidthForContent() const { return max<LayoutUnit>(
0, logicalRightOffsetForContent() - logicalLeftOffsetForContent()); } |
254 LayoutUnit logicalLeftOffsetForContent() const { return isHorizontalWritingM
ode() ? borderLeft() + paddingLeft() : borderTop() + paddingTop(); } | 254 LayoutUnit logicalLeftOffsetForContent() const { return isHorizontalWritingM
ode() ? borderLeft() + paddingLeft() : borderTop() + paddingTop(); } |
255 LayoutUnit logicalRightOffsetForContent() const { return logicalLeftOffsetFo
rContent() + availableLogicalWidth(); } | 255 LayoutUnit logicalRightOffsetForContent() const { return logicalLeftOffsetFo
rContent() + availableLogicalWidth(); } |
256 LayoutUnit startOffsetForContent() const { return style()->isLeftToRightDire
ction() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetFor
Content(); } | 256 LayoutUnit startOffsetForContent() const { return style()->isLeftToRightDire
ction() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetFor
Content(); } |
257 LayoutUnit endOffsetForContent() const { return !style()->isLeftToRightDirec
tion() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetForC
ontent(); } | 257 LayoutUnit endOffsetForContent() const { return !style()->isLeftToRightDirec
tion() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetForC
ontent(); } |
258 | 258 |
259 bool needsRecalcLogicalWidthAfterLayoutChildren() const { return m_needsReca
lcLogicalWidthAfterLayoutChildren; } | |
260 void setNeedsRecalcLogicalWidthAfterLayoutChildren() { m_needsRecalcLogicalW
idthAfterLayoutChildren = true; } | |
261 void clearNeedsRecalcLogicalWidthAfterLayoutChildren() { m_needsRecalcLogica
lWidthAfterLayoutChildren = false; } | |
262 | |
263 virtual LayoutUnit logicalLeftSelectionOffset(const LayoutBlock* rootBlock,
LayoutUnit position) const; | 259 virtual LayoutUnit logicalLeftSelectionOffset(const LayoutBlock* rootBlock,
LayoutUnit position) const; |
264 virtual LayoutUnit logicalRightSelectionOffset(const LayoutBlock* rootBlock,
LayoutUnit position) const; | 260 virtual LayoutUnit logicalRightSelectionOffset(const LayoutBlock* rootBlock,
LayoutUnit position) const; |
265 | 261 |
266 #if ENABLE(ASSERT) | 262 #if ENABLE(ASSERT) |
267 void checkPositionedObjectsNeedLayout(); | 263 void checkPositionedObjectsNeedLayout(); |
268 #endif | 264 #endif |
269 #ifndef NDEBUG | 265 #ifndef NDEBUG |
270 void showLineTreeAndMark(const InlineBox* = nullptr, const char* = nullptr,
const InlineBox* = nullptr, const char* = nullptr, const LayoutObject* = nullptr
) const; | 266 void showLineTreeAndMark(const InlineBox* = nullptr, const char* = nullptr,
const InlineBox* = nullptr, const char* = nullptr, const LayoutObject* = nullptr
) const; |
271 #endif | 267 #endif |
272 | 268 |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 LayoutObjectChildList m_children; | 480 LayoutObjectChildList m_children; |
485 LineBoxList m_lineBoxes; // All of the root line boxes created for this bloc
k flow. For example, <div>Hello<br>world.</div> will have two total lines for t
he <div>. | 481 LineBoxList m_lineBoxes; // All of the root line boxes created for this bloc
k flow. For example, <div>Hello<br>world.</div> will have two total lines for t
he <div>. |
486 | 482 |
487 unsigned m_hasMarginBeforeQuirk : 1; // Note these quirk values can't be put
in LayoutBlockRareData since they are set too frequently. | 483 unsigned m_hasMarginBeforeQuirk : 1; // Note these quirk values can't be put
in LayoutBlockRareData since they are set too frequently. |
488 unsigned m_hasMarginAfterQuirk : 1; | 484 unsigned m_hasMarginAfterQuirk : 1; |
489 unsigned m_beingDestroyed : 1; | 485 unsigned m_beingDestroyed : 1; |
490 unsigned m_hasMarkupTruncation : 1; | 486 unsigned m_hasMarkupTruncation : 1; |
491 unsigned m_widthAvailableToChildrenChanged : 1; | 487 unsigned m_widthAvailableToChildrenChanged : 1; |
492 mutable unsigned m_hasOnlySelfCollapsingChildren : 1; | 488 mutable unsigned m_hasOnlySelfCollapsingChildren : 1; |
493 mutable unsigned m_descendantsWithFloatsMarkedForLayout : 1; | 489 mutable unsigned m_descendantsWithFloatsMarkedForLayout : 1; |
494 mutable unsigned m_needsRecalcLogicalWidthAfterLayoutChildren : 1; | |
495 | 490 |
496 unsigned m_hasPositionedObjects : 1; | 491 unsigned m_hasPositionedObjects : 1; |
497 unsigned m_hasPercentHeightDescendants : 1; | 492 unsigned m_hasPercentHeightDescendants : 1; |
498 | 493 |
499 // LayoutRubyBase objects need to be able to split and merge, moving their c
hildren around | 494 // LayoutRubyBase objects need to be able to split and merge, moving their c
hildren around |
500 // (calling moveChildTo, moveAllChildrenTo, and makeChildrenNonInline). | 495 // (calling moveChildTo, moveAllChildrenTo, and makeChildrenNonInline). |
501 friend class LayoutRubyBase; | 496 friend class LayoutRubyBase; |
502 // FIXME-BLOCKFLOW: Remove this when the line layout stuff has all moved out
of LayoutBlock | 497 // FIXME-BLOCKFLOW: Remove this when the line layout stuff has all moved out
of LayoutBlock |
503 friend class LineBreaker; | 498 friend class LineBreaker; |
504 | 499 |
505 // FIXME: This is temporary as we move code that accesses block flow | 500 // FIXME: This is temporary as we move code that accesses block flow |
506 // member variables out of LayoutBlock and into LayoutBlockFlow. | 501 // member variables out of LayoutBlock and into LayoutBlockFlow. |
507 friend class LayoutBlockFlow; | 502 friend class LayoutBlockFlow; |
508 }; | 503 }; |
509 | 504 |
510 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock()); | 505 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock()); |
511 | 506 |
512 } // namespace blink | 507 } // namespace blink |
513 | 508 |
514 #endif // LayoutBlock_h | 509 #endif // LayoutBlock_h |
OLD | NEW |