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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 inline bool isAfterContent() const; | 396 inline bool isAfterContent() const; |
397 inline bool isBeforeOrAfterContent() const; | 397 inline bool isBeforeOrAfterContent() const; |
398 static inline bool isAfterContent(const RenderObject* obj) { return obj && o
bj->isAfterContent(); } | 398 static inline bool isAfterContent(const RenderObject* obj) { return obj && o
bj->isAfterContent(); } |
399 | 399 |
400 bool hasCounterNodeMap() const { return m_bitfields.hasCounterNodeMap(); } | 400 bool hasCounterNodeMap() const { return m_bitfields.hasCounterNodeMap(); } |
401 void setHasCounterNodeMap(bool hasCounterNodeMap) { m_bitfields.setHasCounte
rNodeMap(hasCounterNodeMap); } | 401 void setHasCounterNodeMap(bool hasCounterNodeMap) { m_bitfields.setHasCounte
rNodeMap(hasCounterNodeMap); } |
402 bool everHadLayout() const { return m_bitfields.everHadLayout(); } | 402 bool everHadLayout() const { return m_bitfields.everHadLayout(); } |
403 | 403 |
404 bool childrenInline() const { return m_bitfields.childrenInline(); } | 404 bool childrenInline() const { return m_bitfields.childrenInline(); } |
405 void setChildrenInline(bool b) { m_bitfields.setChildrenInline(b); } | 405 void setChildrenInline(bool b) { m_bitfields.setChildrenInline(b); } |
406 bool hasColumns() const { return m_bitfields.hasColumns(); } | |
407 void setHasColumns(bool b = true) { m_bitfields.setHasColumns(b); } | |
408 | 406 |
409 bool ancestorLineBoxDirty() const { return m_bitfields.ancestorLineBoxDirty(
); } | 407 bool ancestorLineBoxDirty() const { return m_bitfields.ancestorLineBoxDirty(
); } |
410 void setAncestorLineBoxDirty(bool value = true) | 408 void setAncestorLineBoxDirty(bool value = true) |
411 { | 409 { |
412 m_bitfields.setAncestorLineBoxDirty(value); | 410 m_bitfields.setAncestorLineBoxDirty(value); |
413 if (value) | 411 if (value) |
414 setNeedsLayout(); | 412 setNeedsLayout(); |
415 } | 413 } |
416 | 414 |
417 enum FlowThreadState { | 415 enum FlowThreadState { |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 bool isAnonymousBlock() const | 487 bool isAnonymousBlock() const |
490 { | 488 { |
491 // This function is kept in sync with anonymous block creation condition
s in | 489 // This function is kept in sync with anonymous block creation condition
s in |
492 // RenderBlock::createAnonymousBlock(). This includes creating an anonym
ous | 490 // RenderBlock::createAnonymousBlock(). This includes creating an anonym
ous |
493 // RenderBlock having a BLOCK or BOX display. Other classes such as Rend
erTextFragment | 491 // RenderBlock having a BLOCK or BOX display. Other classes such as Rend
erTextFragment |
494 // are not RenderBlocks and will return false. See https://bugs.webkit.o
rg/show_bug.cgi?id=56709. | 492 // are not RenderBlocks and will return false. See https://bugs.webkit.o
rg/show_bug.cgi?id=56709. |
495 return isAnonymous() && (style()->display() == BLOCK || style()->display
() == BOX) && style()->styleType() == NOPSEUDO && isRenderBlock() && !isListMark
er() && !isRenderFlowThread() | 493 return isAnonymous() && (style()->display() == BLOCK || style()->display
() == BOX) && style()->styleType() == NOPSEUDO && isRenderBlock() && !isListMark
er() && !isRenderFlowThread() |
496 && !isRenderFullScreen() | 494 && !isRenderFullScreen() |
497 && !isRenderFullScreenPlaceholder(); | 495 && !isRenderFullScreenPlaceholder(); |
498 } | 496 } |
499 bool isAnonymousColumnsBlock() const { return style()->specifiesColumns() &&
isAnonymousBlock(); } | |
500 bool isAnonymousColumnSpanBlock() const { return style()->columnSpan() && is
AnonymousBlock(); } | |
501 bool isElementContinuation() const { return node() && node()->renderer() !=
this; } | 497 bool isElementContinuation() const { return node() && node()->renderer() !=
this; } |
502 bool isInlineElementContinuation() const { return isElementContinuation() &&
isInline(); } | 498 bool isInlineElementContinuation() const { return isElementContinuation() &&
isInline(); } |
503 virtual RenderBoxModelObject* virtualContinuation() const { return 0; } | 499 virtual RenderBoxModelObject* virtualContinuation() const { return 0; } |
504 | 500 |
505 bool isFloating() const { return m_bitfields.floating(); } | 501 bool isFloating() const { return m_bitfields.floating(); } |
506 | 502 |
507 bool isOutOfFlowPositioned() const { return m_bitfields.isOutOfFlowPositione
d(); } // absolute or fixed positioning | 503 bool isOutOfFlowPositioned() const { return m_bitfields.isOutOfFlowPositione
d(); } // absolute or fixed positioning |
508 bool isInFlowPositioned() const { return m_bitfields.isRelPositioned() || m_
bitfields.isStickyPositioned(); } // relative or sticky positioning | 504 bool isInFlowPositioned() const { return m_bitfields.isRelPositioned() || m_
bitfields.isStickyPositioned(); } // relative or sticky positioning |
509 bool isRelPositioned() const { return m_bitfields.isRelPositioned(); } // re
lative positioning | 505 bool isRelPositioned() const { return m_bitfields.isRelPositioned(); } // re
lative positioning |
510 bool isStickyPositioned() const { return m_bitfields.isStickyPositioned(); } | 506 bool isStickyPositioned() const { return m_bitfields.isStickyPositioned(); } |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
829 IntRect pixelSnappedAbsoluteClippedOverflowRect() const; | 825 IntRect pixelSnappedAbsoluteClippedOverflowRect() const; |
830 virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObjec
t* repaintContainer) const; | 826 virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObjec
t* repaintContainer) const; |
831 virtual LayoutRect rectWithOutlineForRepaint(const RenderLayerModelObject* r
epaintContainer, LayoutUnit outlineWidth) const; | 827 virtual LayoutRect rectWithOutlineForRepaint(const RenderLayerModelObject* r
epaintContainer, LayoutUnit outlineWidth) const; |
832 virtual LayoutRect outlineBoundsForRepaint(const RenderLayerModelObject* /*r
epaintContainer*/, const RenderGeometryMap* = 0) const { return LayoutRect(); } | 828 virtual LayoutRect outlineBoundsForRepaint(const RenderLayerModelObject* /*r
epaintContainer*/, const RenderGeometryMap* = 0) const { return LayoutRect(); } |
833 | 829 |
834 // Given a rect in the object's coordinate space, compute a rect suitable fo
r repainting | 830 // Given a rect in the object's coordinate space, compute a rect suitable fo
r repainting |
835 // that rect in the coordinate space of repaintContainer. | 831 // that rect in the coordinate space of repaintContainer. |
836 virtual void computeRectForRepaint(const RenderLayerModelObject* repaintCont
ainer, LayoutRect&, bool fixed = false) const; | 832 virtual void computeRectForRepaint(const RenderLayerModelObject* repaintCont
ainer, LayoutRect&, bool fixed = false) const; |
837 virtual void computeFloatRectForRepaint(const RenderLayerModelObject* repain
tContainer, FloatRect& repaintRect, bool fixed = false) const; | 833 virtual void computeFloatRectForRepaint(const RenderLayerModelObject* repain
tContainer, FloatRect& repaintRect, bool fixed = false) const; |
838 | 834 |
839 // If multiple-column layout results in applying an offset to the given poin
t, add the same | |
840 // offset to the given size. | |
841 virtual void adjustForColumns(LayoutSize&, const LayoutPoint&) const { } | |
842 LayoutSize offsetForColumns(const LayoutPoint& point) const | |
843 { | |
844 LayoutSize offset; | |
845 adjustForColumns(offset, point); | |
846 return offset; | |
847 } | |
848 | |
849 virtual unsigned int length() const { return 1; } | 835 virtual unsigned int length() const { return 1; } |
850 | 836 |
851 bool isFloatingOrOutOfFlowPositioned() const { return (isFloating() || isOut
OfFlowPositioned()); } | 837 bool isFloatingOrOutOfFlowPositioned() const { return (isFloating() || isOut
OfFlowPositioned()); } |
852 | 838 |
853 bool isTransparent() const { return style()->opacity() < 1.0f; } | 839 bool isTransparent() const { return style()->opacity() < 1.0f; } |
854 float opacity() const { return style()->opacity(); } | 840 float opacity() const { return style()->opacity(); } |
855 | 841 |
856 bool hasReflection() const { return m_bitfields.hasReflection(); } | 842 bool hasReflection() const { return m_bitfields.hasReflection(); } |
857 | 843 |
858 // Applied as a "slop" to dirty rect checks during the outline painting phas
e's dirty-rect checks. | 844 // Applied as a "slop" to dirty rect checks during the outline painting phas
e's dirty-rect checks. |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1120 , m_horizontalWritingMode(true) | 1106 , m_horizontalWritingMode(true) |
1121 , m_isDragging(false) | 1107 , m_isDragging(false) |
1122 , m_hasLayer(false) | 1108 , m_hasLayer(false) |
1123 , m_hasOverflowClip(false) | 1109 , m_hasOverflowClip(false) |
1124 , m_hasTransform(false) | 1110 , m_hasTransform(false) |
1125 , m_hasReflection(false) | 1111 , m_hasReflection(false) |
1126 , m_hasCounterNodeMap(false) | 1112 , m_hasCounterNodeMap(false) |
1127 , m_everHadLayout(false) | 1113 , m_everHadLayout(false) |
1128 , m_ancestorLineBoxDirty(false) | 1114 , m_ancestorLineBoxDirty(false) |
1129 , m_childrenInline(false) | 1115 , m_childrenInline(false) |
1130 , m_hasColumns(false) | |
1131 , m_layoutDidGetCalled(false) | 1116 , m_layoutDidGetCalled(false) |
1132 , m_positionedState(IsStaticallyPositioned) | 1117 , m_positionedState(IsStaticallyPositioned) |
1133 , m_selectionState(SelectionNone) | 1118 , m_selectionState(SelectionNone) |
1134 , m_flowThreadState(NotInsideFlowThread) | 1119 , m_flowThreadState(NotInsideFlowThread) |
1135 , m_boxDecorationState(NoBoxDecorations) | 1120 , m_boxDecorationState(NoBoxDecorations) |
1136 , m_hasPendingResourceUpdate(false) | 1121 , m_hasPendingResourceUpdate(false) |
1137 { | 1122 { |
1138 } | 1123 } |
1139 | 1124 |
1140 // 32 bits have been used in the first word, and 3 in the second. | 1125 // 32 bits have been used in the first word, and 3 in the second. |
(...skipping 19 matching lines...) Expand all Loading... |
1160 ADD_BOOLEAN_BITFIELD(hasOverflowClip, HasOverflowClip); // Set in the ca
se of overflow:auto/scroll/hidden | 1145 ADD_BOOLEAN_BITFIELD(hasOverflowClip, HasOverflowClip); // Set in the ca
se of overflow:auto/scroll/hidden |
1161 ADD_BOOLEAN_BITFIELD(hasTransform, HasTransform); | 1146 ADD_BOOLEAN_BITFIELD(hasTransform, HasTransform); |
1162 ADD_BOOLEAN_BITFIELD(hasReflection, HasReflection); | 1147 ADD_BOOLEAN_BITFIELD(hasReflection, HasReflection); |
1163 | 1148 |
1164 ADD_BOOLEAN_BITFIELD(hasCounterNodeMap, HasCounterNodeMap); | 1149 ADD_BOOLEAN_BITFIELD(hasCounterNodeMap, HasCounterNodeMap); |
1165 ADD_BOOLEAN_BITFIELD(everHadLayout, EverHadLayout); | 1150 ADD_BOOLEAN_BITFIELD(everHadLayout, EverHadLayout); |
1166 ADD_BOOLEAN_BITFIELD(ancestorLineBoxDirty, AncestorLineBoxDirty); | 1151 ADD_BOOLEAN_BITFIELD(ancestorLineBoxDirty, AncestorLineBoxDirty); |
1167 | 1152 |
1168 // from RenderBlock | 1153 // from RenderBlock |
1169 ADD_BOOLEAN_BITFIELD(childrenInline, ChildrenInline); | 1154 ADD_BOOLEAN_BITFIELD(childrenInline, ChildrenInline); |
1170 ADD_BOOLEAN_BITFIELD(hasColumns, HasColumns); | |
1171 | 1155 |
1172 ADD_BOOLEAN_BITFIELD(layoutDidGetCalled, LayoutDidGetCalled); | 1156 ADD_BOOLEAN_BITFIELD(layoutDidGetCalled, LayoutDidGetCalled); |
1173 | 1157 |
1174 private: | 1158 private: |
1175 unsigned m_positionedState : 2; // PositionedState | 1159 unsigned m_positionedState : 2; // PositionedState |
1176 unsigned m_selectionState : 3; // SelectionState | 1160 unsigned m_selectionState : 3; // SelectionState |
1177 unsigned m_flowThreadState : 2; // FlowThreadState | 1161 unsigned m_flowThreadState : 2; // FlowThreadState |
1178 unsigned m_boxDecorationState : 2; // BoxDecorationState | 1162 unsigned m_boxDecorationState : 2; // BoxDecorationState |
1179 | 1163 |
1180 public: | 1164 public: |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1417 void showTree(const WebCore::RenderObject*); | 1401 void showTree(const WebCore::RenderObject*); |
1418 void showLineTree(const WebCore::RenderObject*); | 1402 void showLineTree(const WebCore::RenderObject*); |
1419 void showRenderTree(const WebCore::RenderObject* object1); | 1403 void showRenderTree(const WebCore::RenderObject* object1); |
1420 // We don't make object2 an optional parameter so that showRenderTree | 1404 // We don't make object2 an optional parameter so that showRenderTree |
1421 // can be called from gdb easily. | 1405 // can be called from gdb easily. |
1422 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO
bject* object2); | 1406 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO
bject* object2); |
1423 | 1407 |
1424 #endif | 1408 #endif |
1425 | 1409 |
1426 #endif // RenderObject_h | 1410 #endif // RenderObject_h |
OLD | NEW |