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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 ////////////////////////////////////////// | 313 ////////////////////////////////////////// |
314 private: | 314 private: |
315 #if ENABLE(ASSERT) | 315 #if ENABLE(ASSERT) |
316 bool isSetNeedsLayoutForbidden() const { return m_setNeedsLayoutForbidden; } | 316 bool isSetNeedsLayoutForbidden() const { return m_setNeedsLayoutForbidden; } |
317 void setNeedsLayoutIsForbidden(bool flag) { m_setNeedsLayoutForbidden = flag
; } | 317 void setNeedsLayoutIsForbidden(bool flag) { m_setNeedsLayoutForbidden = flag
; } |
318 #endif | 318 #endif |
319 | 319 |
320 void addAbsoluteRectForLayer(LayoutRect& result); | 320 void addAbsoluteRectForLayer(LayoutRect& result); |
321 bool requiresAnonymousTableWrappers(const RenderObject*) const; | 321 bool requiresAnonymousTableWrappers(const RenderObject*) const; |
322 | 322 |
| 323 // This renderer has column-span:all, but is it really a valid column spanne
r? |
| 324 bool isValidColumnSpanAll() const; |
| 325 |
323 // Gets pseudoStyle from Shadow host(in case of input elements) | 326 // Gets pseudoStyle from Shadow host(in case of input elements) |
324 // or from Parent element. | 327 // or from Parent element. |
325 PassRefPtr<RenderStyle> getUncachedPseudoStyleFromParentOrShadowHost() const
; | 328 PassRefPtr<RenderStyle> getUncachedPseudoStyleFromParentOrShadowHost() const
; |
326 | 329 |
327 public: | 330 public: |
328 #ifndef NDEBUG | 331 #ifndef NDEBUG |
329 void showTreeForThis() const; | 332 void showTreeForThis() const; |
330 void showRenderTreeForThis() const; | 333 void showRenderTreeForThis() const; |
331 void showLineTreeForThis() const; | 334 void showLineTreeForThis() const; |
332 | 335 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 virtual bool isRenderBlockFlow() const { return false; } | 378 virtual bool isRenderBlockFlow() const { return false; } |
376 virtual bool isRenderButton() const { return false; } | 379 virtual bool isRenderButton() const { return false; } |
377 virtual bool isRenderFlowThread() const { return false; } | 380 virtual bool isRenderFlowThread() const { return false; } |
378 virtual bool isRenderFullScreen() const { return false; } | 381 virtual bool isRenderFullScreen() const { return false; } |
379 virtual bool isRenderFullScreenPlaceholder() const { return false; } | 382 virtual bool isRenderFullScreenPlaceholder() const { return false; } |
380 virtual bool isRenderGrid() const { return false; } | 383 virtual bool isRenderGrid() const { return false; } |
381 virtual bool isRenderIFrame() const { return false; } | 384 virtual bool isRenderIFrame() const { return false; } |
382 virtual bool isRenderImage() const { return false; } | 385 virtual bool isRenderImage() const { return false; } |
383 virtual bool isRenderInline() const { return false; } | 386 virtual bool isRenderInline() const { return false; } |
384 virtual bool isRenderMultiColumnSet() const { return false; } | 387 virtual bool isRenderMultiColumnSet() const { return false; } |
| 388 virtual bool isRenderMultiColumnSpannerSet() const { return false; } |
385 virtual bool isRenderPart() const { return false; } | 389 virtual bool isRenderPart() const { return false; } |
386 virtual bool isRenderRegion() const { return false; } | 390 virtual bool isRenderRegion() const { return false; } |
387 virtual bool isRenderScrollbarPart() const { return false; } | 391 virtual bool isRenderScrollbarPart() const { return false; } |
388 virtual bool isRenderTableCol() const { return false; } | 392 virtual bool isRenderTableCol() const { return false; } |
389 virtual bool isRenderView() const { return false; } | 393 virtual bool isRenderView() const { return false; } |
390 virtual bool isReplica() const { return false; } | 394 virtual bool isReplica() const { return false; } |
391 virtual bool isRuby() const { return false; } | 395 virtual bool isRuby() const { return false; } |
392 virtual bool isRubyBase() const { return false; } | 396 virtual bool isRubyBase() const { return false; } |
393 virtual bool isRubyRun() const { return false; } | 397 virtual bool isRubyRun() const { return false; } |
394 virtual bool isRubyText() const { return false; } | 398 virtual bool isRubyText() const { return false; } |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 return true; | 520 return true; |
517 } | 521 } |
518 | 522 |
519 bool isAnonymous() const { return m_bitfields.isAnonymous(); } | 523 bool isAnonymous() const { return m_bitfields.isAnonymous(); } |
520 bool isAnonymousBlock() const | 524 bool isAnonymousBlock() const |
521 { | 525 { |
522 // This function is kept in sync with anonymous block creation condition
s in | 526 // This function is kept in sync with anonymous block creation condition
s in |
523 // RenderBlock::createAnonymousBlock(). This includes creating an anonym
ous | 527 // RenderBlock::createAnonymousBlock(). This includes creating an anonym
ous |
524 // RenderBlock having a BLOCK or BOX display. Other classes such as Rend
erTextFragment | 528 // RenderBlock having a BLOCK or BOX display. Other classes such as Rend
erTextFragment |
525 // are not RenderBlocks and will return false. See https://bugs.webkit.o
rg/show_bug.cgi?id=56709. | 529 // are not RenderBlocks and will return false. See https://bugs.webkit.o
rg/show_bug.cgi?id=56709. |
526 return isAnonymous() && (style()->display() == BLOCK || style()->display
() == BOX) && style()->styleType() == NOPSEUDO && isRenderBlock() && !isListMark
er() && !isRenderFlowThread() | 530 return isAnonymous() && (style()->display() == BLOCK || style()->display
() == BOX) && style()->styleType() == NOPSEUDO && isRenderBlock() && !isListMark
er() && !isRenderFlowThread() && !isRenderMultiColumnSet() |
527 && !isRenderFullScreen() | 531 && !isRenderFullScreen() |
528 && !isRenderFullScreenPlaceholder(); | 532 && !isRenderFullScreenPlaceholder(); |
529 } | 533 } |
530 bool isAnonymousColumnsBlock() const { return style()->specifiesColumns() &&
isAnonymousBlock(); } | 534 bool isAnonymousColumnsBlock() const { return style()->specifiesColumns() &&
isAnonymousBlock(); } |
531 bool isAnonymousColumnSpanBlock() const { return style()->columnSpan() && is
AnonymousBlock(); } | 535 bool isAnonymousColumnSpanBlock() const { return style()->columnSpan() && is
AnonymousBlock(); } |
532 bool isElementContinuation() const { return node() && node()->renderer() !=
this; } | 536 bool isElementContinuation() const { return node() && node()->renderer() !=
this; } |
533 bool isInlineElementContinuation() const { return isElementContinuation() &&
isInline(); } | 537 bool isInlineElementContinuation() const { return isElementContinuation() &&
isInline(); } |
534 virtual RenderBoxModelObject* virtualContinuation() const { return 0; } | 538 virtual RenderBoxModelObject* virtualContinuation() const { return 0; } |
535 | 539 |
536 bool isFloating() const { return m_bitfields.floating(); } | 540 bool isFloating() const { return m_bitfields.floating(); } |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
638 void clearNode() { m_node = nullptr; } | 642 void clearNode() { m_node = nullptr; } |
639 | 643 |
640 // Returns the styled node that caused the generation of this renderer. | 644 // Returns the styled node that caused the generation of this renderer. |
641 // This is the same as node() except for renderers of :before and :after | 645 // This is the same as node() except for renderers of :before and :after |
642 // pseudo elements for which their parent node is returned. | 646 // pseudo elements for which their parent node is returned. |
643 Node* generatingNode() const { return isPseudoElement() ? node()->parentOrSh
adowHostNode() : node(); } | 647 Node* generatingNode() const { return isPseudoElement() ? node()->parentOrSh
adowHostNode() : node(); } |
644 | 648 |
645 Document& document() const { return m_node->document(); } | 649 Document& document() const { return m_node->document(); } |
646 LocalFrame* frame() const { return document().frame(); } | 650 LocalFrame* frame() const { return document().frame(); } |
647 | 651 |
| 652 bool isColumnSpanAll() const { return style()->columnSpan() == ColumnSpanAll
&& isValidColumnSpanAll(); } |
| 653 |
648 // Returns the object containing this one. Can be different from parent for
positioned elements. | 654 // Returns the object containing this one. Can be different from parent for
positioned elements. |
649 // If paintInvalidationContainer and paintInvalidationContainerSkipped are n
ot null, on return *paintInvalidationContainerSkipped | 655 // If paintInvalidationContainer and paintInvalidationContainerSkipped are n
ot null, on return *paintInvalidationContainerSkipped |
650 // is true if the renderer returned is an ancestor of paintInvalidationConta
iner. | 656 // is true if the renderer returned is an ancestor of paintInvalidationConta
iner. |
651 RenderObject* container(const RenderLayerModelObject* paintInvalidationConta
iner = 0, bool* paintInvalidationContainerSkipped = 0) const; | 657 RenderObject* container(const RenderLayerModelObject* paintInvalidationConta
iner = 0, bool* paintInvalidationContainerSkipped = 0) const; |
652 RenderBlock* containerForFixedPosition(const RenderLayerModelObject* paintIn
validationContainer = 0, bool* paintInvalidationContainerSkipped = 0) const; | 658 RenderBlock* containerForFixedPosition(const RenderLayerModelObject* paintIn
validationContainer = 0, bool* paintInvalidationContainerSkipped = 0) const; |
653 | 659 |
654 virtual RenderObject* hoverAncestor() const { return parent(); } | 660 virtual RenderObject* hoverAncestor() const { return parent(); } |
655 | 661 |
656 Element* offsetParent() const; | 662 Element* offsetParent() const; |
657 | 663 |
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1557 void showTree(const blink::RenderObject*); | 1563 void showTree(const blink::RenderObject*); |
1558 void showLineTree(const blink::RenderObject*); | 1564 void showLineTree(const blink::RenderObject*); |
1559 void showRenderTree(const blink::RenderObject* object1); | 1565 void showRenderTree(const blink::RenderObject* object1); |
1560 // We don't make object2 an optional parameter so that showRenderTree | 1566 // We don't make object2 an optional parameter so that showRenderTree |
1561 // can be called from gdb easily. | 1567 // can be called from gdb easily. |
1562 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec
t* object2); | 1568 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec
t* object2); |
1563 | 1569 |
1564 #endif | 1570 #endif |
1565 | 1571 |
1566 #endif // RenderObject_h | 1572 #endif // RenderObject_h |
OLD | NEW |