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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 class HitTestLocation; | 50 class HitTestLocation; |
51 class HitTestResult; | 51 class HitTestResult; |
52 class InlineBox; | 52 class InlineBox; |
53 class InlineFlowBox; | 53 class InlineFlowBox; |
54 class Path; | 54 class Path; |
55 class Position; | 55 class Position; |
56 class PseudoStyleRequest; | 56 class PseudoStyleRequest; |
57 class RenderBoxModelObject; | 57 class RenderBoxModelObject; |
58 class RenderInline; | 58 class RenderInline; |
59 class RenderBlock; | 59 class RenderBlock; |
60 class RenderFlowThread; | |
61 class RenderGeometryMap; | 60 class RenderGeometryMap; |
62 class RenderLayer; | 61 class RenderLayer; |
63 class RenderLayerModelObject; | 62 class RenderLayerModelObject; |
64 class RenderNamedFlowThread; | |
65 class RenderSVGResourceContainer; | 63 class RenderSVGResourceContainer; |
66 class RenderTable; | 64 class RenderTable; |
67 class RenderTheme; | 65 class RenderTheme; |
68 class RenderView; | 66 class RenderView; |
69 class ResourceLoadPriorityOptimizer; | 67 class ResourceLoadPriorityOptimizer; |
70 class TransformState; | 68 class TransformState; |
71 | 69 |
72 struct PaintInfo; | 70 struct PaintInfo; |
73 | 71 |
74 enum CursorDirective { | 72 enum CursorDirective { |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 | 194 |
197 // Scrolling is a RenderBox concept, however some code just cares about recu
rsively scrolling our enclosing ScrollableArea(s). | 195 // Scrolling is a RenderBox concept, however some code just cares about recu
rsively scrolling our enclosing ScrollableArea(s). |
198 bool scrollRectToVisible(const LayoutRect&, const ScrollAlignment& alignX =
ScrollAlignment::alignCenterIfNeeded, const ScrollAlignment& alignY = ScrollAlig
nment::alignCenterIfNeeded); | 196 bool scrollRectToVisible(const LayoutRect&, const ScrollAlignment& alignX =
ScrollAlignment::alignCenterIfNeeded, const ScrollAlignment& alignY = ScrollAlig
nment::alignCenterIfNeeded); |
199 | 197 |
200 // Convenience function for getting to the nearest enclosing box of a Render
Object. | 198 // Convenience function for getting to the nearest enclosing box of a Render
Object. |
201 RenderBox* enclosingBox() const; | 199 RenderBox* enclosingBox() const; |
202 RenderBoxModelObject* enclosingBoxModelObject() const; | 200 RenderBoxModelObject* enclosingBoxModelObject() const; |
203 | 201 |
204 RenderBox* enclosingScrollableBox() const; | 202 RenderBox* enclosingScrollableBox() const; |
205 | 203 |
206 // Function to return our enclosing flow thread if we are contained inside o
ne. This | |
207 // function follows the containing block chain. | |
208 RenderFlowThread* flowThreadContainingBlock() const | |
209 { | |
210 if (flowThreadState() == NotInsideFlowThread) | |
211 return 0; | |
212 return locateFlowThreadContainingBlock(); | |
213 } | |
214 | |
215 RenderNamedFlowThread* renderNamedFlowThreadWrapper() const; | |
216 | |
217 virtual bool isEmpty() const { return firstChild() == 0; } | 204 virtual bool isEmpty() const { return firstChild() == 0; } |
218 | 205 |
219 #ifndef NDEBUG | 206 #ifndef NDEBUG |
220 void setHasAXObject(bool flag) { m_hasAXObject = flag; } | 207 void setHasAXObject(bool flag) { m_hasAXObject = flag; } |
221 bool hasAXObject() const { return m_hasAXObject; } | 208 bool hasAXObject() const { return m_hasAXObject; } |
222 | 209 |
223 // Helper class forbidding calls to setNeedsLayout() during its lifetime. | 210 // Helper class forbidding calls to setNeedsLayout() during its lifetime. |
224 class SetLayoutNeededForbiddenScope { | 211 class SetLayoutNeededForbiddenScope { |
225 public: | 212 public: |
226 explicit SetLayoutNeededForbiddenScope(RenderObject*); | 213 explicit SetLayoutNeededForbiddenScope(RenderObject*); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 ////////////////////////////////////////// | 253 ////////////////////////////////////////// |
267 | 254 |
268 protected: | 255 protected: |
269 ////////////////////////////////////////// | 256 ////////////////////////////////////////// |
270 // Helper functions. Dangerous to use! | 257 // Helper functions. Dangerous to use! |
271 void setPreviousSibling(RenderObject* previous) { m_previous = previous; } | 258 void setPreviousSibling(RenderObject* previous) { m_previous = previous; } |
272 void setNextSibling(RenderObject* next) { m_next = next; } | 259 void setNextSibling(RenderObject* next) { m_next = next; } |
273 void setParent(RenderObject* parent) | 260 void setParent(RenderObject* parent) |
274 { | 261 { |
275 m_parent = parent; | 262 m_parent = parent; |
276 | |
277 // Only update if our flow thread state is different from our new parent
and if we're not a RenderFlowThread. | |
278 // A RenderFlowThread is always considered to be inside itself, so it ne
ver has to change its state | |
279 // in response to parent changes. | |
280 FlowThreadState newState = parent ? parent->flowThreadState() : NotInsid
eFlowThread; | |
281 if (newState != flowThreadState() && !isRenderFlowThread()) | |
282 setFlowThreadStateIncludingDescendants(newState); | |
283 } | 263 } |
284 | 264 |
285 ////////////////////////////////////////// | 265 ////////////////////////////////////////// |
286 private: | 266 private: |
287 #ifndef NDEBUG | 267 #ifndef NDEBUG |
288 bool isSetNeedsLayoutForbidden() const { return m_setNeedsLayoutForbidden; } | 268 bool isSetNeedsLayoutForbidden() const { return m_setNeedsLayoutForbidden; } |
289 void setNeedsLayoutIsForbidden(bool flag) { m_setNeedsLayoutForbidden = flag
; } | 269 void setNeedsLayoutIsForbidden(bool flag) { m_setNeedsLayoutForbidden = flag
; } |
290 #endif | 270 #endif |
291 | 271 |
292 void addAbsoluteRectForLayer(LayoutRect& result); | 272 void addAbsoluteRectForLayer(LayoutRect& result); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 virtual bool isMenuList() const { return false; } | 318 virtual bool isMenuList() const { return false; } |
339 virtual bool isMeter() const { return false; } | 319 virtual bool isMeter() const { return false; } |
340 virtual bool isProgress() const { return false; } | 320 virtual bool isProgress() const { return false; } |
341 virtual bool isRenderBlock() const { return false; } | 321 virtual bool isRenderBlock() const { return false; } |
342 virtual bool isRenderBlockFlow() const { return false; } | 322 virtual bool isRenderBlockFlow() const { return false; } |
343 virtual bool isRenderButton() const { return false; } | 323 virtual bool isRenderButton() const { return false; } |
344 virtual bool isRenderIFrame() const { return false; } | 324 virtual bool isRenderIFrame() const { return false; } |
345 virtual bool isRenderImage() const { return false; } | 325 virtual bool isRenderImage() const { return false; } |
346 virtual bool isRenderInline() const { return false; } | 326 virtual bool isRenderInline() const { return false; } |
347 virtual bool isRenderPart() const { return false; } | 327 virtual bool isRenderPart() const { return false; } |
348 virtual bool isRenderRegion() const { return false; } | |
349 virtual bool isRenderNamedFlowFragment() const { return false; } | |
350 virtual bool isRenderView() const { return false; } | 328 virtual bool isRenderView() const { return false; } |
351 virtual bool isReplica() const { return false; } | 329 virtual bool isReplica() const { return false; } |
352 | 330 |
353 virtual bool isRuby() const { return false; } | 331 virtual bool isRuby() const { return false; } |
354 virtual bool isRubyBase() const { return false; } | 332 virtual bool isRubyBase() const { return false; } |
355 virtual bool isRubyRun() const { return false; } | 333 virtual bool isRubyRun() const { return false; } |
356 virtual bool isRubyText() const { return false; } | 334 virtual bool isRubyText() const { return false; } |
357 | 335 |
358 virtual bool isSlider() const { return false; } | 336 virtual bool isSlider() const { return false; } |
359 virtual bool isSliderThumb() const { return false; } | 337 virtual bool isSliderThumb() const { return false; } |
360 virtual bool isTable() const { return false; } | 338 virtual bool isTable() const { return false; } |
361 virtual bool isTableCell() const { return false; } | 339 virtual bool isTableCell() const { return false; } |
362 virtual bool isRenderTableCol() const { return false; } | 340 virtual bool isRenderTableCol() const { return false; } |
363 virtual bool isTableCaption() const { return false; } | 341 virtual bool isTableCaption() const { return false; } |
364 virtual bool isTableRow() const { return false; } | 342 virtual bool isTableRow() const { return false; } |
365 virtual bool isTableSection() const { return false; } | 343 virtual bool isTableSection() const { return false; } |
366 virtual bool isTextControl() const { return false; } | 344 virtual bool isTextControl() const { return false; } |
367 virtual bool isTextArea() const { return false; } | 345 virtual bool isTextArea() const { return false; } |
368 virtual bool isTextField() const { return false; } | 346 virtual bool isTextField() const { return false; } |
369 virtual bool isVideo() const { return false; } | 347 virtual bool isVideo() const { return false; } |
370 virtual bool isWidget() const { return false; } | 348 virtual bool isWidget() const { return false; } |
371 virtual bool isCanvas() const { return false; } | 349 virtual bool isCanvas() const { return false; } |
372 virtual bool isRenderFullScreen() const { return false; } | 350 virtual bool isRenderFullScreen() const { return false; } |
373 virtual bool isRenderFullScreenPlaceholder() const { return false; } | 351 virtual bool isRenderFullScreenPlaceholder() const { return false; } |
374 | 352 |
375 virtual bool isRenderGrid() const { return false; } | 353 virtual bool isRenderGrid() const { return false; } |
376 | 354 |
377 virtual bool isRenderFlowThread() const { return false; } | |
378 virtual bool isRenderNamedFlowThread() const { return false; } | |
379 bool isInFlowRenderFlowThread() const { return isRenderFlowThread() && !isOu
tOfFlowPositioned(); } | |
380 bool isOutOfFlowRenderFlowThread() const { return isRenderFlowThread() && is
OutOfFlowPositioned(); } | |
381 bool isRenderNamedFlowFragmentContainer() const; | |
382 | |
383 virtual bool isRenderMultiColumnBlock() const { return false; } | |
384 virtual bool isRenderMultiColumnSet() const { return false; } | |
385 | |
386 virtual bool isRenderScrollbarPart() const { return false; } | 355 virtual bool isRenderScrollbarPart() const { return false; } |
387 | 356 |
388 bool isRoot() const { return document().documentElement() == m_node; } | 357 bool isRoot() const { return document().documentElement() == m_node; } |
389 bool isBody() const; | 358 bool isBody() const; |
390 bool isHR() const; | 359 bool isHR() const; |
391 bool isLegend() const; | 360 bool isLegend() const; |
392 | 361 |
393 bool isTablePart() const { return isTableCell() || isRenderTableCol() || isT
ableCaption() || isTableRow() || isTableSection(); } | 362 bool isTablePart() const { return isTableCell() || isRenderTableCol() || isT
ableCaption() || isTableRow() || isTableSection(); } |
394 | 363 |
395 inline bool isBeforeContent() const; | 364 inline bool isBeforeContent() const; |
(...skipping 11 matching lines...) Expand all Loading... |
407 void setHasColumns(bool b = true) { m_bitfields.setHasColumns(b); } | 376 void setHasColumns(bool b = true) { m_bitfields.setHasColumns(b); } |
408 | 377 |
409 bool ancestorLineBoxDirty() const { return m_bitfields.ancestorLineBoxDirty(
); } | 378 bool ancestorLineBoxDirty() const { return m_bitfields.ancestorLineBoxDirty(
); } |
410 void setAncestorLineBoxDirty(bool value = true) | 379 void setAncestorLineBoxDirty(bool value = true) |
411 { | 380 { |
412 m_bitfields.setAncestorLineBoxDirty(value); | 381 m_bitfields.setAncestorLineBoxDirty(value); |
413 if (value) | 382 if (value) |
414 setNeedsLayout(); | 383 setNeedsLayout(); |
415 } | 384 } |
416 | 385 |
417 enum FlowThreadState { | |
418 NotInsideFlowThread = 0, | |
419 InsideOutOfFlowThread = 1, | |
420 InsideInFlowThread = 2, | |
421 }; | |
422 | |
423 void setFlowThreadStateIncludingDescendants(FlowThreadState); | |
424 | |
425 FlowThreadState flowThreadState() const { return m_bitfields.flowThreadState
(); } | |
426 void setFlowThreadState(FlowThreadState state) { m_bitfields.setFlowThreadSt
ate(state); } | |
427 | |
428 // FIXME: Until all SVG renders can be subclasses of RenderSVGModelObject we
have | 386 // FIXME: Until all SVG renders can be subclasses of RenderSVGModelObject we
have |
429 // to add SVG renderer methods to RenderObject with an ASSERT_NOT_REACHED()
default implementation. | 387 // to add SVG renderer methods to RenderObject with an ASSERT_NOT_REACHED()
default implementation. |
430 virtual bool isSVG() const { return false; } | 388 virtual bool isSVG() const { return false; } |
431 virtual bool isSVGRoot() const { return false; } | 389 virtual bool isSVGRoot() const { return false; } |
432 virtual bool isSVGContainer() const { return false; } | 390 virtual bool isSVGContainer() const { return false; } |
433 virtual bool isSVGTransformableContainer() const { return false; } | 391 virtual bool isSVGTransformableContainer() const { return false; } |
434 virtual bool isSVGViewportContainer() const { return false; } | 392 virtual bool isSVGViewportContainer() const { return false; } |
435 virtual bool isSVGGradientStop() const { return false; } | 393 virtual bool isSVGGradientStop() const { return false; } |
436 virtual bool isSVGHiddenContainer() const { return false; } | 394 virtual bool isSVGHiddenContainer() const { return false; } |
437 virtual bool isSVGPath() const { return false; } | 395 virtual bool isSVGPath() const { return false; } |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 return true; | 443 return true; |
486 } | 444 } |
487 | 445 |
488 bool isAnonymous() const { return m_bitfields.isAnonymous(); } | 446 bool isAnonymous() const { return m_bitfields.isAnonymous(); } |
489 bool isAnonymousBlock() const | 447 bool isAnonymousBlock() const |
490 { | 448 { |
491 // This function is kept in sync with anonymous block creation condition
s in | 449 // This function is kept in sync with anonymous block creation condition
s in |
492 // RenderBlock::createAnonymousBlock(). This includes creating an anonym
ous | 450 // RenderBlock::createAnonymousBlock(). This includes creating an anonym
ous |
493 // RenderBlock having a BLOCK or BOX display. Other classes such as Rend
erTextFragment | 451 // 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. | 452 // 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() | 453 return isAnonymous() && (style()->display() == BLOCK || style()->display
() == BOX) && style()->styleType() == NOPSEUDO && isRenderBlock() && !isListMark
er() |
496 && !isRenderFullScreen() | 454 && !isRenderFullScreen() |
497 && !isRenderFullScreenPlaceholder(); | 455 && !isRenderFullScreenPlaceholder(); |
498 } | 456 } |
499 bool isAnonymousColumnsBlock() const { return style()->specifiesColumns() &&
isAnonymousBlock(); } | 457 bool isAnonymousColumnsBlock() const { return style()->specifiesColumns() &&
isAnonymousBlock(); } |
500 bool isAnonymousColumnSpanBlock() const { return style()->columnSpan() && is
AnonymousBlock(); } | 458 bool isAnonymousColumnSpanBlock() const { return style()->columnSpan() && is
AnonymousBlock(); } |
501 bool isElementContinuation() const { return node() && node()->renderer() !=
this; } | 459 bool isElementContinuation() const { return node() && node()->renderer() !=
this; } |
502 bool isInlineElementContinuation() const { return isElementContinuation() &&
isInline(); } | 460 bool isInlineElementContinuation() const { return isElementContinuation() &&
isInline(); } |
503 virtual RenderBoxModelObject* virtualContinuation() const { return 0; } | 461 virtual RenderBoxModelObject* virtualContinuation() const { return 0; } |
504 | 462 |
505 bool isFloating() const { return m_bitfields.floating(); } | 463 bool isFloating() const { return m_bitfields.floating(); } |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 | 671 |
714 // Updates only the local style ptr of the object. Does not update the stat
e of the object, | 672 // Updates only the local style ptr of the object. Does not update the stat
e of the object, |
715 // and so only should be called when the style is known not to have changed
(or from setStyle). | 673 // and so only should be called when the style is known not to have changed
(or from setStyle). |
716 void setStyleInternal(PassRefPtr<RenderStyle> style) { m_style = style; } | 674 void setStyleInternal(PassRefPtr<RenderStyle> style) { m_style = style; } |
717 | 675 |
718 // returns the containing block level element for this element. | 676 // returns the containing block level element for this element. |
719 RenderBlock* containingBlock() const; | 677 RenderBlock* containingBlock() const; |
720 | 678 |
721 bool canContainFixedPositionObjects() const | 679 bool canContainFixedPositionObjects() const |
722 { | 680 { |
723 return isRenderView() || (hasTransform() && isRenderBlock()) || isSVGFor
eignObject() || isOutOfFlowRenderFlowThread(); | 681 return isRenderView() || (hasTransform() && isRenderBlock()) || isSVGFor
eignObject(); |
724 } | 682 } |
725 bool canContainAbsolutePositionObjects() const | 683 bool canContainAbsolutePositionObjects() const |
726 { | 684 { |
727 return isRenderView() || (hasTransform() && isRenderBlock()) || isSVGFor
eignObject(); | 685 return isRenderView() || (hasTransform() && isRenderBlock()) || isSVGFor
eignObject(); |
728 } | 686 } |
729 | 687 |
730 // Convert the given local point to absolute coordinates | 688 // Convert the given local point to absolute coordinates |
731 // FIXME: Temporary. If UseTransforms is true, take transforms into account.
Eventually localToAbsolute() will always be transform-aware. | 689 // FIXME: Temporary. If UseTransforms is true, take transforms into account.
Eventually localToAbsolute() will always be transform-aware. |
732 FloatPoint localToAbsolute(const FloatPoint& localPoint = FloatPoint(), MapC
oordinatesFlags = 0) const; | 690 FloatPoint localToAbsolute(const FloatPoint& localPoint = FloatPoint(), MapC
oordinatesFlags = 0) const; |
733 FloatPoint absoluteToLocal(const FloatPoint&, MapCoordinatesFlags = 0) const
; | 691 FloatPoint absoluteToLocal(const FloatPoint&, MapCoordinatesFlags = 0) const
; |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1042 // skipped. | 1000 // skipped. |
1043 virtual void addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* cur
rentLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) cons
t; | 1001 virtual void addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* cur
rentLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) cons
t; |
1044 | 1002 |
1045 // Add hit-test rects for this renderer only to the provided list. layerOffs
et is the offset | 1003 // Add hit-test rects for this renderer only to the provided list. layerOffs
et is the offset |
1046 // of this renderer within the current layer that should be used for each re
sult. | 1004 // of this renderer within the current layer that should be used for each re
sult. |
1047 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint&
layerOffset) const { }; | 1005 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint&
layerOffset) const { }; |
1048 | 1006 |
1049 private: | 1007 private: |
1050 RenderBlock* containerForFixedPosition(const RenderLayerModelObject* repaint
Container = 0, bool* repaintContainerSkipped = 0) const; | 1008 RenderBlock* containerForFixedPosition(const RenderLayerModelObject* repaint
Container = 0, bool* repaintContainerSkipped = 0) const; |
1051 | 1009 |
1052 RenderFlowThread* locateFlowThreadContainingBlock() const; | |
1053 void removeFromRenderFlowThread(); | |
1054 void removeFromRenderFlowThreadRecursive(RenderFlowThread*); | |
1055 | |
1056 bool shouldRepaintForStyleDifference(StyleDifference) const; | 1010 bool shouldRepaintForStyleDifference(StyleDifference) const; |
1057 bool hasImmediateNonWhitespaceTextChildOrPropertiesDependentOnColor() const; | 1011 bool hasImmediateNonWhitespaceTextChildOrPropertiesDependentOnColor() const; |
1058 | 1012 |
1059 RenderStyle* cachedFirstLineStyle() const; | 1013 RenderStyle* cachedFirstLineStyle() const; |
1060 StyleDifference adjustStyleDifference(StyleDifference, unsigned contextSensi
tiveProperties) const; | 1014 StyleDifference adjustStyleDifference(StyleDifference, unsigned contextSensi
tiveProperties) const; |
1061 | 1015 |
1062 Color selectionColor(int colorProperty) const; | 1016 Color selectionColor(int colorProperty) const; |
1063 | 1017 |
1064 void removeShapeImageClient(ShapeValue*); | 1018 void removeShapeImageClient(ShapeValue*); |
1065 | 1019 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1123 , m_hasTransform(false) | 1077 , m_hasTransform(false) |
1124 , m_hasReflection(false) | 1078 , m_hasReflection(false) |
1125 , m_hasCounterNodeMap(false) | 1079 , m_hasCounterNodeMap(false) |
1126 , m_everHadLayout(false) | 1080 , m_everHadLayout(false) |
1127 , m_ancestorLineBoxDirty(false) | 1081 , m_ancestorLineBoxDirty(false) |
1128 , m_childrenInline(false) | 1082 , m_childrenInline(false) |
1129 , m_hasColumns(false) | 1083 , m_hasColumns(false) |
1130 , m_layoutDidGetCalled(false) | 1084 , m_layoutDidGetCalled(false) |
1131 , m_positionedState(IsStaticallyPositioned) | 1085 , m_positionedState(IsStaticallyPositioned) |
1132 , m_selectionState(SelectionNone) | 1086 , m_selectionState(SelectionNone) |
1133 , m_flowThreadState(NotInsideFlowThread) | |
1134 , m_boxDecorationState(NoBoxDecorations) | 1087 , m_boxDecorationState(NoBoxDecorations) |
1135 { | 1088 { |
1136 } | 1089 } |
1137 | 1090 |
1138 // 32 bits have been used in the first word, and 2 in the second. | 1091 // 32 bits have been used in the first word, and 2 in the second. |
1139 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout); | 1092 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout); |
1140 ADD_BOOLEAN_BITFIELD(shouldDoFullRepaintAfterLayout, ShouldDoFullRepaint
AfterLayout); | 1093 ADD_BOOLEAN_BITFIELD(shouldDoFullRepaintAfterLayout, ShouldDoFullRepaint
AfterLayout); |
1141 ADD_BOOLEAN_BITFIELD(shouldRepaintOverflowIfNeeded, ShouldRepaintOverflo
wIfNeeded); | 1094 ADD_BOOLEAN_BITFIELD(shouldRepaintOverflowIfNeeded, ShouldRepaintOverflo
wIfNeeded); |
1142 ADD_BOOLEAN_BITFIELD(needsPositionedMovementLayout, NeedsPositionedMovem
entLayout); | 1095 ADD_BOOLEAN_BITFIELD(needsPositionedMovementLayout, NeedsPositionedMovem
entLayout); |
1143 ADD_BOOLEAN_BITFIELD(normalChildNeedsLayout, NormalChildNeedsLayout); | 1096 ADD_BOOLEAN_BITFIELD(normalChildNeedsLayout, NormalChildNeedsLayout); |
(...skipping 21 matching lines...) Expand all Loading... |
1165 | 1118 |
1166 // from RenderBlock | 1119 // from RenderBlock |
1167 ADD_BOOLEAN_BITFIELD(childrenInline, ChildrenInline); | 1120 ADD_BOOLEAN_BITFIELD(childrenInline, ChildrenInline); |
1168 ADD_BOOLEAN_BITFIELD(hasColumns, HasColumns); | 1121 ADD_BOOLEAN_BITFIELD(hasColumns, HasColumns); |
1169 | 1122 |
1170 ADD_BOOLEAN_BITFIELD(layoutDidGetCalled, LayoutDidGetCalled); | 1123 ADD_BOOLEAN_BITFIELD(layoutDidGetCalled, LayoutDidGetCalled); |
1171 | 1124 |
1172 private: | 1125 private: |
1173 unsigned m_positionedState : 2; // PositionedState | 1126 unsigned m_positionedState : 2; // PositionedState |
1174 unsigned m_selectionState : 3; // SelectionState | 1127 unsigned m_selectionState : 3; // SelectionState |
1175 unsigned m_flowThreadState : 2; // FlowThreadState | |
1176 unsigned m_boxDecorationState : 2; // BoxDecorationState | 1128 unsigned m_boxDecorationState : 2; // BoxDecorationState |
1177 | 1129 |
1178 public: | 1130 public: |
1179 bool isOutOfFlowPositioned() const { return m_positionedState == IsOutOf
FlowPositioned; } | 1131 bool isOutOfFlowPositioned() const { return m_positionedState == IsOutOf
FlowPositioned; } |
1180 bool isRelPositioned() const { return m_positionedState == IsRelativelyP
ositioned; } | 1132 bool isRelPositioned() const { return m_positionedState == IsRelativelyP
ositioned; } |
1181 bool isStickyPositioned() const { return m_positionedState == IsStickyPo
sitioned; } | 1133 bool isStickyPositioned() const { return m_positionedState == IsStickyPo
sitioned; } |
1182 bool isPositioned() const { return m_positionedState != IsStaticallyPosi
tioned; } | 1134 bool isPositioned() const { return m_positionedState != IsStaticallyPosi
tioned; } |
1183 | 1135 |
1184 void setPositionedState(int positionState) | 1136 void setPositionedState(int positionState) |
1185 { | 1137 { |
1186 // This mask maps FixedPosition and AbsolutePosition to IsOutOfFlowP
ositioned, saving one bit. | 1138 // This mask maps FixedPosition and AbsolutePosition to IsOutOfFlowP
ositioned, saving one bit. |
1187 m_positionedState = static_cast<PositionedState>(positionState & 0x3
); | 1139 m_positionedState = static_cast<PositionedState>(positionState & 0x3
); |
1188 } | 1140 } |
1189 void clearPositionedState() { m_positionedState = StaticPosition; } | 1141 void clearPositionedState() { m_positionedState = StaticPosition; } |
1190 | 1142 |
1191 ALWAYS_INLINE SelectionState selectionState() const { return static_cast
<SelectionState>(m_selectionState); } | 1143 ALWAYS_INLINE SelectionState selectionState() const { return static_cast
<SelectionState>(m_selectionState); } |
1192 ALWAYS_INLINE void setSelectionState(SelectionState selectionState) { m_
selectionState = selectionState; } | 1144 ALWAYS_INLINE void setSelectionState(SelectionState selectionState) { m_
selectionState = selectionState; } |
1193 | 1145 |
1194 ALWAYS_INLINE FlowThreadState flowThreadState() const { return static_ca
st<FlowThreadState>(m_flowThreadState); } | |
1195 ALWAYS_INLINE void setFlowThreadState(FlowThreadState flowThreadState) {
m_flowThreadState = flowThreadState; } | |
1196 | |
1197 ALWAYS_INLINE BoxDecorationState boxDecorationState() const { return sta
tic_cast<BoxDecorationState>(m_boxDecorationState); } | 1146 ALWAYS_INLINE BoxDecorationState boxDecorationState() const { return sta
tic_cast<BoxDecorationState>(m_boxDecorationState); } |
1198 ALWAYS_INLINE void setBoxDecorationState(BoxDecorationState boxDecoratio
nState) { m_boxDecorationState = boxDecorationState; } | 1147 ALWAYS_INLINE void setBoxDecorationState(BoxDecorationState boxDecoratio
nState) { m_boxDecorationState = boxDecorationState; } |
1199 }; | 1148 }; |
1200 | 1149 |
1201 #undef ADD_BOOLEAN_BITFIELD | 1150 #undef ADD_BOOLEAN_BITFIELD |
1202 | 1151 |
1203 RenderObjectBitfields m_bitfields; | 1152 RenderObjectBitfields m_bitfields; |
1204 | 1153 |
1205 void setSelfNeedsLayout(bool b) { m_bitfields.setSelfNeedsLayout(b); } | 1154 void setSelfNeedsLayout(bool b) { m_bitfields.setSelfNeedsLayout(b); } |
1206 void setNeedsPositionedMovementLayout(bool b) { m_bitfields.setNeedsPosition
edMovementLayout(b); } | 1155 void setNeedsPositionedMovementLayout(bool b) { m_bitfields.setNeedsPosition
edMovementLayout(b); } |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1412 void showTree(const WebCore::RenderObject*); | 1361 void showTree(const WebCore::RenderObject*); |
1413 void showLineTree(const WebCore::RenderObject*); | 1362 void showLineTree(const WebCore::RenderObject*); |
1414 void showRenderTree(const WebCore::RenderObject* object1); | 1363 void showRenderTree(const WebCore::RenderObject* object1); |
1415 // We don't make object2 an optional parameter so that showRenderTree | 1364 // We don't make object2 an optional parameter so that showRenderTree |
1416 // can be called from gdb easily. | 1365 // can be called from gdb easily. |
1417 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO
bject* object2); | 1366 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO
bject* object2); |
1418 | 1367 |
1419 #endif | 1368 #endif |
1420 | 1369 |
1421 #endif // RenderObject_h | 1370 #endif // RenderObject_h |
OLD | NEW |