OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r
ights reserved. |
7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 && !isLayoutFullScreen() | 499 && !isLayoutFullScreen() |
500 && !isLayoutFullScreenPlaceholder(); | 500 && !isLayoutFullScreenPlaceholder(); |
501 } | 501 } |
502 bool isElementContinuation() const { return node() && node()->layoutObject()
!= this; } | 502 bool isElementContinuation() const { return node() && node()->layoutObject()
!= this; } |
503 bool isInlineElementContinuation() const { return isElementContinuation() &&
isInline(); } | 503 bool isInlineElementContinuation() const { return isElementContinuation() &&
isInline(); } |
504 virtual LayoutBoxModelObject* virtualContinuation() const { return nullptr;
} | 504 virtual LayoutBoxModelObject* virtualContinuation() const { return nullptr;
} |
505 | 505 |
506 bool isFloating() const { return m_bitfields.floating(); } | 506 bool isFloating() const { return m_bitfields.floating(); } |
507 | 507 |
508 bool isOutOfFlowPositioned() const { return m_bitfields.isOutOfFlowPositione
d(); } // absolute or fixed positioning | 508 bool isOutOfFlowPositioned() const { return m_bitfields.isOutOfFlowPositione
d(); } // absolute or fixed positioning |
| 509 bool isInFlowPositioned() const { return m_bitfields.isInFlowPositioned(); }
// relative or sticky positioning |
509 bool isRelPositioned() const { return m_bitfields.isRelPositioned(); } // re
lative positioning | 510 bool isRelPositioned() const { return m_bitfields.isRelPositioned(); } // re
lative positioning |
| 511 bool isStickyPositioned() const { return m_bitfields.isStickyPositioned(); }
// sticky positioning |
510 bool isPositioned() const { return m_bitfields.isPositioned(); } | 512 bool isPositioned() const { return m_bitfields.isPositioned(); } |
511 | 513 |
512 bool isText() const { return m_bitfields.isText(); } | 514 bool isText() const { return m_bitfields.isText(); } |
513 bool isBox() const { return m_bitfields.isBox(); } | 515 bool isBox() const { return m_bitfields.isBox(); } |
514 bool isInline() const { return m_bitfields.isInline(); } // inline object | 516 bool isInline() const { return m_bitfields.isInline(); } // inline object |
515 bool isDragging() const { return m_bitfields.isDragging(); } | 517 bool isDragging() const { return m_bitfields.isDragging(); } |
516 bool isReplaced() const { return m_bitfields.isReplaced(); } // a "replaced"
element (see CSS) | 518 bool isReplaced() const { return m_bitfields.isReplaced(); } // a "replaced"
element (see CSS) |
517 bool isHorizontalWritingMode() const { return m_bitfields.horizontalWritingM
ode(); } | 519 bool isHorizontalWritingMode() const { return m_bitfields.horizontalWritingM
ode(); } |
518 bool hasFlippedBlocksWritingMode() const | 520 bool hasFlippedBlocksWritingMode() const |
519 { | 521 { |
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1272 unsigned m_##name : 1;\ | 1274 unsigned m_##name : 1;\ |
1273 public:\ | 1275 public:\ |
1274 bool name() const { return m_##name; }\ | 1276 bool name() const { return m_##name; }\ |
1275 void set##Name(bool name) { m_##name = name; }\ | 1277 void set##Name(bool name) { m_##name = name; }\ |
1276 | 1278 |
1277 class LayoutObjectBitfields { | 1279 class LayoutObjectBitfields { |
1278 enum PositionedState { | 1280 enum PositionedState { |
1279 IsStaticallyPositioned = 0, | 1281 IsStaticallyPositioned = 0, |
1280 IsRelativelyPositioned = 1, | 1282 IsRelativelyPositioned = 1, |
1281 IsOutOfFlowPositioned = 2, | 1283 IsOutOfFlowPositioned = 2, |
| 1284 IsStickyPositioned = 3, |
1282 }; | 1285 }; |
1283 | 1286 |
1284 public: | 1287 public: |
1285 LayoutObjectBitfields(Node* node) | 1288 LayoutObjectBitfields(Node* node) |
1286 : m_selfNeedsLayout(false) | 1289 : m_selfNeedsLayout(false) |
1287 , m_shouldInvalidateOverflowForPaint(false) | 1290 , m_shouldInvalidateOverflowForPaint(false) |
1288 // FIXME: We should remove mayNeedPaintInvalidation once we are able
to | 1291 // FIXME: We should remove mayNeedPaintInvalidation once we are able
to |
1289 // use the other layout flags to detect the same cases. crbug.com/37
0118 | 1292 // use the other layout flags to detect the same cases. crbug.com/37
0118 |
1290 , m_mayNeedPaintInvalidation(false) | 1293 , m_mayNeedPaintInvalidation(false) |
1291 , m_shouldInvalidateSelection(false) | 1294 , m_shouldInvalidateSelection(false) |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1381 | 1384 |
1382 private: | 1385 private: |
1383 unsigned m_positionedState : 2; // PositionedState | 1386 unsigned m_positionedState : 2; // PositionedState |
1384 unsigned m_selectionState : 3; // SelectionState | 1387 unsigned m_selectionState : 3; // SelectionState |
1385 unsigned m_boxDecorationBackgroundState : 2; // BoxDecorationBackgroundS
tate | 1388 unsigned m_boxDecorationBackgroundState : 2; // BoxDecorationBackgroundS
tate |
1386 unsigned m_fullPaintInvalidationReason : 5; // PaintInvalidationReason | 1389 unsigned m_fullPaintInvalidationReason : 5; // PaintInvalidationReason |
1387 | 1390 |
1388 public: | 1391 public: |
1389 bool isOutOfFlowPositioned() const { return m_positionedState == IsOutOf
FlowPositioned; } | 1392 bool isOutOfFlowPositioned() const { return m_positionedState == IsOutOf
FlowPositioned; } |
1390 bool isRelPositioned() const { return m_positionedState == IsRelativelyP
ositioned; } | 1393 bool isRelPositioned() const { return m_positionedState == IsRelativelyP
ositioned; } |
| 1394 bool isStickyPositioned() const { return m_positionedState == IsStickyPo
sitioned; } |
| 1395 bool isInFlowPositioned() const { return m_positionedState == IsRelative
lyPositioned || m_positionedState == IsStickyPositioned; } |
1391 bool isPositioned() const { return m_positionedState != IsStaticallyPosi
tioned; } | 1396 bool isPositioned() const { return m_positionedState != IsStaticallyPosi
tioned; } |
1392 | 1397 |
1393 void setPositionedState(int positionState) | 1398 void setPositionedState(int positionState) |
1394 { | 1399 { |
1395 // This mask maps FixedPosition and AbsolutePosition to IsOutOfFlowP
ositioned, saving one bit. | 1400 // This mask maps FixedPosition and AbsolutePosition to IsOutOfFlowP
ositioned, saving one bit. |
1396 m_positionedState = static_cast<PositionedState>(positionState & 0x3
); | 1401 m_positionedState = static_cast<PositionedState>(positionState & 0x3
); |
1397 } | 1402 } |
1398 void clearPositionedState() { m_positionedState = StaticPosition; } | 1403 void clearPositionedState() { m_positionedState = StaticPosition; } |
1399 | 1404 |
1400 ALWAYS_INLINE SelectionState selectionState() const { return static_cast
<SelectionState>(m_selectionState); } | 1405 ALWAYS_INLINE SelectionState selectionState() const { return static_cast
<SelectionState>(m_selectionState); } |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1657 void showTree(const blink::LayoutObject*); | 1662 void showTree(const blink::LayoutObject*); |
1658 void showLineTree(const blink::LayoutObject*); | 1663 void showLineTree(const blink::LayoutObject*); |
1659 void showLayoutTree(const blink::LayoutObject* object1); | 1664 void showLayoutTree(const blink::LayoutObject* object1); |
1660 // We don't make object2 an optional parameter so that showLayoutTree | 1665 // We don't make object2 an optional parameter so that showLayoutTree |
1661 // can be called from gdb easily. | 1666 // can be called from gdb easily. |
1662 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec
t* object2); | 1667 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec
t* object2); |
1663 | 1668 |
1664 #endif | 1669 #endif |
1665 | 1670 |
1666 #endif // LayoutObject_h | 1671 #endif // LayoutObject_h |
OLD | NEW |