Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(504)

Side by Side Diff: Source/core/rendering/RenderObject.h

Issue 584033002: [New Multicolumn] Add support for column-span:all (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 ////////////////////////////////////////// 318 //////////////////////////////////////////
319 private: 319 private:
320 #if ENABLE(ASSERT) 320 #if ENABLE(ASSERT)
321 bool isSetNeedsLayoutForbidden() const { return m_setNeedsLayoutForbidden; } 321 bool isSetNeedsLayoutForbidden() const { return m_setNeedsLayoutForbidden; }
322 void setNeedsLayoutIsForbidden(bool flag) { m_setNeedsLayoutForbidden = flag ; } 322 void setNeedsLayoutIsForbidden(bool flag) { m_setNeedsLayoutForbidden = flag ; }
323 #endif 323 #endif
324 324
325 void addAbsoluteRectForLayer(LayoutRect& result); 325 void addAbsoluteRectForLayer(LayoutRect& result);
326 bool requiresAnonymousTableWrappers(const RenderObject*) const; 326 bool requiresAnonymousTableWrappers(const RenderObject*) const;
327 327
328 // This renderer has column-span:all, but is it really a valid column spanne r?
329 bool isValidColumnSpanAll() const;
330
328 // Gets pseudoStyle from Shadow host(in case of input elements) 331 // Gets pseudoStyle from Shadow host(in case of input elements)
329 // or from Parent element. 332 // or from Parent element.
330 PassRefPtr<RenderStyle> getUncachedPseudoStyleFromParentOrShadowHost() const ; 333 PassRefPtr<RenderStyle> getUncachedPseudoStyleFromParentOrShadowHost() const ;
331 334
332 public: 335 public:
333 #ifndef NDEBUG 336 #ifndef NDEBUG
334 void showTreeForThis() const; 337 void showTreeForThis() const;
335 void showRenderTreeForThis() const; 338 void showRenderTreeForThis() const;
336 void showLineTreeForThis() const; 339 void showLineTreeForThis() const;
337 340
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 virtual bool isRenderBlockFlow() const { return false; } 383 virtual bool isRenderBlockFlow() const { return false; }
381 virtual bool isRenderButton() const { return false; } 384 virtual bool isRenderButton() const { return false; }
382 virtual bool isRenderFlowThread() const { return false; } 385 virtual bool isRenderFlowThread() const { return false; }
383 virtual bool isRenderFullScreen() const { return false; } 386 virtual bool isRenderFullScreen() const { return false; }
384 virtual bool isRenderFullScreenPlaceholder() const { return false; } 387 virtual bool isRenderFullScreenPlaceholder() const { return false; }
385 virtual bool isRenderGrid() const { return false; } 388 virtual bool isRenderGrid() const { return false; }
386 virtual bool isRenderIFrame() const { return false; } 389 virtual bool isRenderIFrame() const { return false; }
387 virtual bool isRenderImage() const { return false; } 390 virtual bool isRenderImage() const { return false; }
388 virtual bool isRenderInline() const { return false; } 391 virtual bool isRenderInline() const { return false; }
389 virtual bool isRenderMultiColumnSet() const { return false; } 392 virtual bool isRenderMultiColumnSet() const { return false; }
393 virtual bool isRenderMultiColumnSpannerSet() const { return false; }
390 virtual bool isRenderPart() const { return false; } 394 virtual bool isRenderPart() const { return false; }
391 virtual bool isRenderRegion() const { return false; } 395 virtual bool isRenderRegion() const { return false; }
392 virtual bool isRenderScrollbarPart() const { return false; } 396 virtual bool isRenderScrollbarPart() const { return false; }
393 virtual bool isRenderTableCol() const { return false; } 397 virtual bool isRenderTableCol() const { return false; }
394 virtual bool isRenderView() const { return false; } 398 virtual bool isRenderView() const { return false; }
395 virtual bool isReplica() const { return false; } 399 virtual bool isReplica() const { return false; }
396 virtual bool isRuby() const { return false; } 400 virtual bool isRuby() const { return false; }
397 virtual bool isRubyBase() const { return false; } 401 virtual bool isRubyBase() const { return false; }
398 virtual bool isRubyRun() const { return false; } 402 virtual bool isRubyRun() const { return false; }
399 virtual bool isRubyText() const { return false; } 403 virtual bool isRubyText() const { return false; }
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 return true; 525 return true;
522 } 526 }
523 527
524 bool isAnonymous() const { return m_bitfields.isAnonymous(); } 528 bool isAnonymous() const { return m_bitfields.isAnonymous(); }
525 bool isAnonymousBlock() const 529 bool isAnonymousBlock() const
526 { 530 {
527 // This function is kept in sync with anonymous block creation condition s in 531 // This function is kept in sync with anonymous block creation condition s in
528 // RenderBlock::createAnonymousBlock(). This includes creating an anonym ous 532 // RenderBlock::createAnonymousBlock(). This includes creating an anonym ous
529 // RenderBlock having a BLOCK or BOX display. Other classes such as Rend erTextFragment 533 // RenderBlock having a BLOCK or BOX display. Other classes such as Rend erTextFragment
530 // are not RenderBlocks and will return false. See https://bugs.webkit.o rg/show_bug.cgi?id=56709. 534 // are not RenderBlocks and will return false. See https://bugs.webkit.o rg/show_bug.cgi?id=56709.
531 return isAnonymous() && (style()->display() == BLOCK || style()->display () == BOX) && style()->styleType() == NOPSEUDO && isRenderBlock() && !isListMark er() && !isRenderFlowThread() 535 return isAnonymous() && (style()->display() == BLOCK || style()->display () == BOX) && style()->styleType() == NOPSEUDO && isRenderBlock() && !isListMark er() && !isRenderFlowThread() && !isRenderMultiColumnSet()
532 && !isRenderFullScreen() 536 && !isRenderFullScreen()
533 && !isRenderFullScreenPlaceholder(); 537 && !isRenderFullScreenPlaceholder();
534 } 538 }
535 bool isAnonymousColumnsBlock() const { return style()->specifiesColumns() && isAnonymousBlock(); } 539 bool isAnonymousColumnsBlock() const { return style()->specifiesColumns() && isAnonymousBlock(); }
536 bool isAnonymousColumnSpanBlock() const { return style()->columnSpan() && is AnonymousBlock(); } 540 bool isAnonymousColumnSpanBlock() const { return style()->columnSpan() && is AnonymousBlock(); }
537 bool isElementContinuation() const { return node() && node()->renderer() != this; } 541 bool isElementContinuation() const { return node() && node()->renderer() != this; }
538 bool isInlineElementContinuation() const { return isElementContinuation() && isInline(); } 542 bool isInlineElementContinuation() const { return isElementContinuation() && isInline(); }
539 virtual RenderBoxModelObject* virtualContinuation() const { return 0; } 543 virtual RenderBoxModelObject* virtualContinuation() const { return 0; }
540 544
541 bool isFloating() const { return m_bitfields.floating(); } 545 bool isFloating() const { return m_bitfields.floating(); }
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 void clearNode() { m_node = nullptr; } 647 void clearNode() { m_node = nullptr; }
644 648
645 // Returns the styled node that caused the generation of this renderer. 649 // Returns the styled node that caused the generation of this renderer.
646 // This is the same as node() except for renderers of :before and :after 650 // This is the same as node() except for renderers of :before and :after
647 // pseudo elements for which their parent node is returned. 651 // pseudo elements for which their parent node is returned.
648 Node* generatingNode() const { return isPseudoElement() ? node()->parentOrSh adowHostNode() : node(); } 652 Node* generatingNode() const { return isPseudoElement() ? node()->parentOrSh adowHostNode() : node(); }
649 653
650 Document& document() const { return m_node->document(); } 654 Document& document() const { return m_node->document(); }
651 LocalFrame* frame() const { return document().frame(); } 655 LocalFrame* frame() const { return document().frame(); }
652 656
657 bool isColumnSpanAll() const { return style()->columnSpan() == ColumnSpanAll && isValidColumnSpanAll(); }
658
653 // Returns the object containing this one. Can be different from parent for positioned elements. 659 // Returns the object containing this one. Can be different from parent for positioned elements.
654 // If paintInvalidationContainer and paintInvalidationContainerSkipped are n ot null, on return *paintInvalidationContainerSkipped 660 // If paintInvalidationContainer and paintInvalidationContainerSkipped are n ot null, on return *paintInvalidationContainerSkipped
655 // is true if the renderer returned is an ancestor of paintInvalidationConta iner. 661 // is true if the renderer returned is an ancestor of paintInvalidationConta iner.
656 RenderObject* container(const RenderLayerModelObject* paintInvalidationConta iner = 0, bool* paintInvalidationContainerSkipped = 0) const; 662 RenderObject* container(const RenderLayerModelObject* paintInvalidationConta iner = 0, bool* paintInvalidationContainerSkipped = 0) const;
657 RenderBlock* containerForFixedPosition(const RenderLayerModelObject* paintIn validationContainer = 0, bool* paintInvalidationContainerSkipped = 0) const; 663 RenderBlock* containerForFixedPosition(const RenderLayerModelObject* paintIn validationContainer = 0, bool* paintInvalidationContainerSkipped = 0) const;
658 664
659 virtual RenderObject* hoverAncestor() const { return parent(); } 665 virtual RenderObject* hoverAncestor() const { return parent(); }
660 666
661 Element* offsetParent() const; 667 Element* offsetParent() const;
662 668
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after
1574 void showTree(const blink::RenderObject*); 1580 void showTree(const blink::RenderObject*);
1575 void showLineTree(const blink::RenderObject*); 1581 void showLineTree(const blink::RenderObject*);
1576 void showRenderTree(const blink::RenderObject* object1); 1582 void showRenderTree(const blink::RenderObject* object1);
1577 // We don't make object2 an optional parameter so that showRenderTree 1583 // We don't make object2 an optional parameter so that showRenderTree
1578 // can be called from gdb easily. 1584 // can be called from gdb easily.
1579 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2); 1585 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2);
1580 1586
1581 #endif 1587 #endif
1582 1588
1583 #endif // RenderObject_h 1589 #endif // RenderObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698