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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 ////////////////////////////////////////// | 294 ////////////////////////////////////////// |
295 private: | 295 private: |
296 #if ENABLE(ASSERT) | 296 #if ENABLE(ASSERT) |
297 bool isSetNeedsLayoutForbidden() const { return m_setNeedsLayoutForbidden; } | 297 bool isSetNeedsLayoutForbidden() const { return m_setNeedsLayoutForbidden; } |
298 void setNeedsLayoutIsForbidden(bool flag) { m_setNeedsLayoutForbidden = flag
; } | 298 void setNeedsLayoutIsForbidden(bool flag) { m_setNeedsLayoutForbidden = flag
; } |
299 #endif | 299 #endif |
300 | 300 |
301 void addAbsoluteRectForLayer(LayoutRect& result); | 301 void addAbsoluteRectForLayer(LayoutRect& result); |
302 bool requiresAnonymousTableWrappers(const RenderObject*) const; | 302 bool requiresAnonymousTableWrappers(const RenderObject*) const; |
303 | 303 |
| 304 // This renderer has column-span:all, but is it really a valid column spanne
r? |
| 305 bool isValidColumnSpanAll() const; |
| 306 |
304 // Gets pseudoStyle from Shadow host(in case of input elements) | 307 // Gets pseudoStyle from Shadow host(in case of input elements) |
305 // or from Parent element. | 308 // or from Parent element. |
306 PassRefPtr<RenderStyle> getUncachedPseudoStyleFromParentOrShadowHost() const
; | 309 PassRefPtr<RenderStyle> getUncachedPseudoStyleFromParentOrShadowHost() const
; |
307 | 310 |
308 bool skipInvalidationWhenLaidOutChildren() const; | 311 bool skipInvalidationWhenLaidOutChildren() const; |
309 | 312 |
310 public: | 313 public: |
311 #ifndef NDEBUG | 314 #ifndef NDEBUG |
312 void showTreeForThis() const; | 315 void showTreeForThis() const; |
313 void showRenderTreeForThis() const; | 316 void showRenderTreeForThis() const; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 bool isMeter() const { return isOfType(RenderObjectMeter); } | 354 bool isMeter() const { return isOfType(RenderObjectMeter); } |
352 bool isProgress() const { return isOfType(RenderObjectProgress); } | 355 bool isProgress() const { return isOfType(RenderObjectProgress); } |
353 bool isQuote() const { return isOfType(RenderObjectQuote); } | 356 bool isQuote() const { return isOfType(RenderObjectQuote); } |
354 bool isRenderButton() const { return isOfType(RenderObjectRenderButton); } | 357 bool isRenderButton() const { return isOfType(RenderObjectRenderButton); } |
355 bool isRenderFullScreen() const { return isOfType(RenderObjectRenderFullScre
en); } | 358 bool isRenderFullScreen() const { return isOfType(RenderObjectRenderFullScre
en); } |
356 bool isRenderFullScreenPlaceholder() const { return isOfType(RenderObjectRen
derFullScreenPlaceholder); } | 359 bool isRenderFullScreenPlaceholder() const { return isOfType(RenderObjectRen
derFullScreenPlaceholder); } |
357 bool isRenderGrid() const { return isOfType(RenderObjectRenderGrid); } | 360 bool isRenderGrid() const { return isOfType(RenderObjectRenderGrid); } |
358 bool isRenderIFrame() const { return isOfType(RenderObjectRenderIFrame); } | 361 bool isRenderIFrame() const { return isOfType(RenderObjectRenderIFrame); } |
359 bool isRenderImage() const { return isOfType(RenderObjectRenderImage); } | 362 bool isRenderImage() const { return isOfType(RenderObjectRenderImage); } |
360 bool isRenderMultiColumnSet() const { return isOfType(RenderObjectRenderMult
iColumnSet); } | 363 bool isRenderMultiColumnSet() const { return isOfType(RenderObjectRenderMult
iColumnSet); } |
| 364 bool isRenderMultiColumnSpannerSet() const { return isOfType(RenderObjectRen
derMultiColumnSpannerSet); } |
361 bool isRenderRegion() const { return isOfType(RenderObjectRenderRegion); } | 365 bool isRenderRegion() const { return isOfType(RenderObjectRenderRegion); } |
362 bool isRenderScrollbarPart() const { return isOfType(RenderObjectRenderScrol
lbarPart); } | 366 bool isRenderScrollbarPart() const { return isOfType(RenderObjectRenderScrol
lbarPart); } |
363 bool isRenderTableCol() const { return isOfType(RenderObjectRenderTableCol);
} | 367 bool isRenderTableCol() const { return isOfType(RenderObjectRenderTableCol);
} |
364 bool isRenderView() const { return isOfType(RenderObjectRenderView); } | 368 bool isRenderView() const { return isOfType(RenderObjectRenderView); } |
365 bool isReplica() const { return isOfType(RenderObjectReplica); } | 369 bool isReplica() const { return isOfType(RenderObjectReplica); } |
366 bool isRuby() const { return isOfType(RenderObjectRuby); } | 370 bool isRuby() const { return isOfType(RenderObjectRuby); } |
367 bool isRubyBase() const { return isOfType(RenderObjectRubyBase); } | 371 bool isRubyBase() const { return isOfType(RenderObjectRubyBase); } |
368 bool isRubyRun() const { return isOfType(RenderObjectRubyRun); } | 372 bool isRubyRun() const { return isOfType(RenderObjectRubyRun); } |
369 bool isRubyText() const { return isOfType(RenderObjectRubyText); } | 373 bool isRubyText() const { return isOfType(RenderObjectRubyText); } |
370 bool isSlider() const { return isOfType(RenderObjectSlider); } | 374 bool isSlider() const { return isOfType(RenderObjectSlider); } |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 return true; | 505 return true; |
502 } | 506 } |
503 | 507 |
504 bool isAnonymous() const { return m_bitfields.isAnonymous(); } | 508 bool isAnonymous() const { return m_bitfields.isAnonymous(); } |
505 bool isAnonymousBlock() const | 509 bool isAnonymousBlock() const |
506 { | 510 { |
507 // This function is kept in sync with anonymous block creation condition
s in | 511 // This function is kept in sync with anonymous block creation condition
s in |
508 // RenderBlock::createAnonymousBlock(). This includes creating an anonym
ous | 512 // RenderBlock::createAnonymousBlock(). This includes creating an anonym
ous |
509 // RenderBlock having a BLOCK or BOX display. Other classes such as Rend
erTextFragment | 513 // RenderBlock having a BLOCK or BOX display. Other classes such as Rend
erTextFragment |
510 // are not RenderBlocks and will return false. See https://bugs.webkit.o
rg/show_bug.cgi?id=56709. | 514 // are not RenderBlocks and will return false. See https://bugs.webkit.o
rg/show_bug.cgi?id=56709. |
511 return isAnonymous() && (style()->display() == BLOCK || style()->display
() == BOX) && style()->styleType() == NOPSEUDO && isRenderBlock() && !isListMark
er() && !isRenderFlowThread() | 515 return isAnonymous() && (style()->display() == BLOCK || style()->display
() == BOX) && style()->styleType() == NOPSEUDO && isRenderBlock() && !isListMark
er() && !isRenderFlowThread() && !isRenderMultiColumnSet() |
512 && !isRenderFullScreen() | 516 && !isRenderFullScreen() |
513 && !isRenderFullScreenPlaceholder(); | 517 && !isRenderFullScreenPlaceholder(); |
514 } | 518 } |
515 bool isAnonymousColumnsBlock() const { return style()->specifiesColumns() &&
isAnonymousBlock(); } | 519 bool isAnonymousColumnsBlock() const { return style()->specifiesColumns() &&
isAnonymousBlock(); } |
516 bool isAnonymousColumnSpanBlock() const { return style()->columnSpan() && is
AnonymousBlock(); } | 520 bool isAnonymousColumnSpanBlock() const { return style()->columnSpan() && is
AnonymousBlock(); } |
517 bool isElementContinuation() const { return node() && node()->renderer() !=
this; } | 521 bool isElementContinuation() const { return node() && node()->renderer() !=
this; } |
518 bool isInlineElementContinuation() const { return isElementContinuation() &&
isInline(); } | 522 bool isInlineElementContinuation() const { return isElementContinuation() &&
isInline(); } |
519 virtual RenderBoxModelObject* virtualContinuation() const { return 0; } | 523 virtual RenderBoxModelObject* virtualContinuation() const { return 0; } |
520 | 524 |
521 bool isFloating() const { return m_bitfields.floating(); } | 525 bool isFloating() const { return m_bitfields.floating(); } |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 void clearNode() { m_node = nullptr; } | 627 void clearNode() { m_node = nullptr; } |
624 | 628 |
625 // Returns the styled node that caused the generation of this renderer. | 629 // Returns the styled node that caused the generation of this renderer. |
626 // This is the same as node() except for renderers of :before, :after and | 630 // This is the same as node() except for renderers of :before, :after and |
627 // :first-letter pseudo elements for which their parent node is returned. | 631 // :first-letter pseudo elements for which their parent node is returned. |
628 Node* generatingNode() const { return isPseudoElement() ? node()->parentOrSh
adowHostNode() : node(); } | 632 Node* generatingNode() const { return isPseudoElement() ? node()->parentOrSh
adowHostNode() : node(); } |
629 | 633 |
630 Document& document() const { return m_node->document(); } | 634 Document& document() const { return m_node->document(); } |
631 LocalFrame* frame() const { return document().frame(); } | 635 LocalFrame* frame() const { return document().frame(); } |
632 | 636 |
| 637 bool isColumnSpanAll() const { return style()->columnSpan() == ColumnSpanAll
&& isValidColumnSpanAll(); } |
| 638 |
633 // Returns the object containing this one. Can be different from parent for
positioned elements. | 639 // Returns the object containing this one. Can be different from parent for
positioned elements. |
634 // If paintInvalidationContainer and paintInvalidationContainerSkipped are n
ot null, on return *paintInvalidationContainerSkipped | 640 // If paintInvalidationContainer and paintInvalidationContainerSkipped are n
ot null, on return *paintInvalidationContainerSkipped |
635 // is true if the renderer returned is an ancestor of paintInvalidationConta
iner. | 641 // is true if the renderer returned is an ancestor of paintInvalidationConta
iner. |
636 RenderObject* container(const RenderLayerModelObject* paintInvalidationConta
iner = 0, bool* paintInvalidationContainerSkipped = 0) const; | 642 RenderObject* container(const RenderLayerModelObject* paintInvalidationConta
iner = 0, bool* paintInvalidationContainerSkipped = 0) const; |
637 RenderBlock* containerForFixedPosition(const RenderLayerModelObject* paintIn
validationContainer = 0, bool* paintInvalidationContainerSkipped = 0) const; | 643 RenderBlock* containerForFixedPosition(const RenderLayerModelObject* paintIn
validationContainer = 0, bool* paintInvalidationContainerSkipped = 0) const; |
638 | 644 |
639 virtual RenderObject* hoverAncestor() const { return parent(); } | 645 virtual RenderObject* hoverAncestor() const { return parent(); } |
640 | 646 |
641 Element* offsetParent() const; | 647 Element* offsetParent() const; |
642 | 648 |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1073 RenderObjectQuote, | 1079 RenderObjectQuote, |
1074 RenderObjectRenderButton, | 1080 RenderObjectRenderButton, |
1075 RenderObjectRenderFlowThread, | 1081 RenderObjectRenderFlowThread, |
1076 RenderObjectRenderFullScreen, | 1082 RenderObjectRenderFullScreen, |
1077 RenderObjectRenderFullScreenPlaceholder, | 1083 RenderObjectRenderFullScreenPlaceholder, |
1078 RenderObjectRenderGrid, | 1084 RenderObjectRenderGrid, |
1079 RenderObjectRenderIFrame, | 1085 RenderObjectRenderIFrame, |
1080 RenderObjectRenderImage, | 1086 RenderObjectRenderImage, |
1081 RenderObjectRenderInline, | 1087 RenderObjectRenderInline, |
1082 RenderObjectRenderMultiColumnSet, | 1088 RenderObjectRenderMultiColumnSet, |
| 1089 RenderObjectRenderMultiColumnSpannerSet, |
1083 RenderObjectRenderPart, | 1090 RenderObjectRenderPart, |
1084 RenderObjectRenderRegion, | 1091 RenderObjectRenderRegion, |
1085 RenderObjectRenderScrollbarPart, | 1092 RenderObjectRenderScrollbarPart, |
1086 RenderObjectRenderTableCol, | 1093 RenderObjectRenderTableCol, |
1087 RenderObjectRenderView, | 1094 RenderObjectRenderView, |
1088 RenderObjectReplica, | 1095 RenderObjectReplica, |
1089 RenderObjectRuby, | 1096 RenderObjectRuby, |
1090 RenderObjectRubyBase, | 1097 RenderObjectRubyBase, |
1091 RenderObjectRubyRun, | 1098 RenderObjectRubyRun, |
1092 RenderObjectRubyText, | 1099 RenderObjectRubyText, |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1610 void showTree(const blink::RenderObject*); | 1617 void showTree(const blink::RenderObject*); |
1611 void showLineTree(const blink::RenderObject*); | 1618 void showLineTree(const blink::RenderObject*); |
1612 void showRenderTree(const blink::RenderObject* object1); | 1619 void showRenderTree(const blink::RenderObject* object1); |
1613 // We don't make object2 an optional parameter so that showRenderTree | 1620 // We don't make object2 an optional parameter so that showRenderTree |
1614 // can be called from gdb easily. | 1621 // can be called from gdb easily. |
1615 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec
t* object2); | 1622 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec
t* object2); |
1616 | 1623 |
1617 #endif | 1624 #endif |
1618 | 1625 |
1619 #endif // RenderObject_h | 1626 #endif // RenderObject_h |
OLD | NEW |