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

Side by Side Diff: third_party/WebKit/WebCore/rendering/RenderObject.h

Issue 21152: WebKit merge 40668:40722 part 1. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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 | Annotate | Revision Log
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 Apple Inc. All rights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 19 matching lines...) Expand all
30 #include "Document.h" 30 #include "Document.h"
31 #include "RenderObjectChildList.h" 31 #include "RenderObjectChildList.h"
32 #include "RenderStyle.h" 32 #include "RenderStyle.h"
33 33
34 namespace WebCore { 34 namespace WebCore {
35 35
36 class AnimationController; 36 class AnimationController;
37 class HitTestResult; 37 class HitTestResult;
38 class InlineBox; 38 class InlineBox;
39 class InlineFlowBox; 39 class InlineFlowBox;
40 class RenderBoxModelObject;
40 class RenderInline; 41 class RenderInline;
41 class RenderBlock; 42 class RenderBlock;
42 class RenderFlow; 43 class RenderFlow;
43 class RenderLayer; 44 class RenderLayer;
44 class VisiblePosition; 45 class VisiblePosition;
45 46
46 /* 47 /*
47 * The painting of a layer occurs in three distinct phases. Each phase involve s 48 * The painting of a layer occurs in three distinct phases. Each phase involve s
48 * a recursive descent into the layer's render objects. The first phase is the background phase. 49 * a recursive descent into the layer's render objects. The first phase is the background phase.
49 * The backgrounds and borders of all blocks are painted. Inlines are not pain ted at all. 50 * The backgrounds and borders of all blocks are painted. Inlines are not pain ted at all.
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 virtual RenderBlock* firstLineBlock() const; 198 virtual RenderBlock* firstLineBlock() const;
198 199
199 // Called when an object that was floating or positioned becomes a normal fl ow object 200 // Called when an object that was floating or positioned becomes a normal fl ow object
200 // again. We have to make sure the render tree updates as needed to accommo date the new 201 // again. We have to make sure the render tree updates as needed to accommo date the new
201 // normal flow object. 202 // normal flow object.
202 void handleDynamicFloatPositionChange(); 203 void handleDynamicFloatPositionChange();
203 204
204 // This function is a convenience helper for creating an anonymous block tha t inherits its 205 // This function is a convenience helper for creating an anonymous block tha t inherits its
205 // style from this RenderObject. 206 // style from this RenderObject.
206 RenderBlock* createAnonymousBlock(); 207 RenderBlock* createAnonymousBlock();
207 208
208 // Whether or not a positioned element requires normal flow x/y to be comput ed
209 // to determine its position.
210 bool hasStaticX() const;
211 bool hasStaticY() const;
212 virtual void setStaticX(int /*staticX*/) { }
213 virtual void setStaticY(int /*staticY*/) { }
214 virtual int staticX() const { return 0; }
215 virtual int staticY() const { return 0; }
216
217 // RenderObject tree manipulation 209 // RenderObject tree manipulation
218 ////////////////////////////////////////// 210 //////////////////////////////////////////
219 virtual bool canHaveChildren() const { return virtualChildren(); } 211 virtual bool canHaveChildren() const { return virtualChildren(); }
220 virtual bool isChildAllowed(RenderObject*, RenderStyle*) const { return true ; } 212 virtual bool isChildAllowed(RenderObject*, RenderStyle*) const { return true ; }
221 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0) ; 213 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0) ;
222 virtual void addChildIgnoringContinuation(RenderObject* newChild, RenderObje ct* beforeChild = 0) { return addChild(newChild, beforeChild); } 214 virtual void addChildIgnoringContinuation(RenderObject* newChild, RenderObje ct* beforeChild = 0) { return addChild(newChild, beforeChild); }
223 virtual void removeChild(RenderObject*); 215 virtual void removeChild(RenderObject*);
224 virtual bool createsAnonymousWrapper() const { return false; } 216 virtual bool createsAnonymousWrapper() const { return false; }
225 ////////////////////////////////////////// 217 //////////////////////////////////////////
226 218
(...skipping 25 matching lines...) Expand all
252 private: 244 private:
253 // The normal operator new is disallowed on all render objects. 245 // The normal operator new is disallowed on all render objects.
254 void* operator new(size_t) throw(); 246 void* operator new(size_t) throw();
255 247
256 public: 248 public:
257 RenderArena* renderArena() const { return document()->renderArena(); } 249 RenderArena* renderArena() const { return document()->renderArena(); }
258 250
259 virtual bool isApplet() const { return false; } 251 virtual bool isApplet() const { return false; }
260 virtual bool isBR() const { return false; } 252 virtual bool isBR() const { return false; }
261 virtual bool isBlockFlow() const { return false; } 253 virtual bool isBlockFlow() const { return false; }
254 virtual bool isBoxModelObject() const { return false; }
262 virtual bool isCounter() const { return false; } 255 virtual bool isCounter() const { return false; }
263 virtual bool isFieldset() const { return false; } 256 virtual bool isFieldset() const { return false; }
264 virtual bool isFrame() const { return false; } 257 virtual bool isFrame() const { return false; }
265 virtual bool isFrameSet() const { return false; } 258 virtual bool isFrameSet() const { return false; }
266 virtual bool isImage() const { return false; } 259 virtual bool isImage() const { return false; }
267 virtual bool isInlineBlockOrInlineTable() const { return false; } 260 virtual bool isInlineBlockOrInlineTable() const { return false; }
268 virtual bool isListBox() const { return false; } 261 virtual bool isListBox() const { return false; }
269 virtual bool isListItem() const { return false; } 262 virtual bool isListItem() const { return false; }
270 virtual bool isListMarker() const { return false; } 263 virtual bool isListMarker() const { return false; }
271 virtual bool isMedia() const { return false; } 264 virtual bool isMedia() const { return false; }
272 virtual bool isMenuList() const { return false; } 265 virtual bool isMenuList() const { return false; }
273 virtual bool isRenderBlock() const { return false; } 266 virtual bool isRenderBlock() const { return false; }
267 virtual bool isRenderButton() const { return false; }
274 virtual bool isRenderImage() const { return false; } 268 virtual bool isRenderImage() const { return false; }
275 virtual bool isRenderInline() const { return false; } 269 virtual bool isRenderInline() const { return false; }
276 virtual bool isRenderPart() const { return false; } 270 virtual bool isRenderPart() const { return false; }
277 virtual bool isRenderView() const { return false; } 271 virtual bool isRenderView() const { return false; }
278 virtual bool isSlider() const { return false; } 272 virtual bool isSlider() const { return false; }
279 virtual bool isTable() const { return false; } 273 virtual bool isTable() const { return false; }
280 virtual bool isTableCell() const { return false; } 274 virtual bool isTableCell() const { return false; }
281 virtual bool isTableCol() const { return false; } 275 virtual bool isTableCol() const { return false; }
282 virtual bool isTableRow() const { return false; } 276 virtual bool isTableRow() const { return false; }
283 virtual bool isTableSection() const { return false; } 277 virtual bool isTableSection() const { return false; }
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 // FIXME: Temporary. If useTransforms is true, take transforms into account. Eventually localToAbsolute() will always be transform-aware. 524 // FIXME: Temporary. If useTransforms is true, take transforms into account. Eventually localToAbsolute() will always be transform-aware.
531 virtual FloatPoint localToAbsolute(FloatPoint localPoint = FloatPoint(), boo l fixed = false, bool useTransforms = false) const; 525 virtual FloatPoint localToAbsolute(FloatPoint localPoint = FloatPoint(), boo l fixed = false, bool useTransforms = false) const;
532 virtual FloatPoint absoluteToLocal(FloatPoint, bool fixed = false, bool useT ransforms = false) const; 526 virtual FloatPoint absoluteToLocal(FloatPoint, bool fixed = false, bool useT ransforms = false) const;
533 527
534 // Convert a local quad to absolute coordinates, taking transforms into acco unt. 528 // Convert a local quad to absolute coordinates, taking transforms into acco unt.
535 FloatQuad localToAbsoluteQuad(const FloatQuad& quad, bool fixed = false) con st 529 FloatQuad localToAbsoluteQuad(const FloatQuad& quad, bool fixed = false) con st
536 { 530 {
537 return localToContainerQuad(quad, 0, fixed); 531 return localToContainerQuad(quad, 0, fixed);
538 } 532 }
539 // Convert a local quad into the coordinate system of container, taking tran sforms into account. 533 // Convert a local quad into the coordinate system of container, taking tran sforms into account.
540 virtual FloatQuad localToContainerQuad(const FloatQuad&, RenderBox* repaintC ontainer, bool fixed = false) const; 534 virtual FloatQuad localToContainerQuad(const FloatQuad&, RenderBoxModelObjec t* repaintContainer, bool fixed = false) const;
541 535
542 // Return the offset from the container() renderer (excluding transforms) 536 // Return the offset from the container() renderer (excluding transforms)
543 virtual IntSize offsetFromContainer(RenderObject*) const; 537 virtual IntSize offsetFromContainer(RenderObject*) const;
544 538
545 virtual void absoluteRectsForRange(Vector<IntRect>&, unsigned startOffset = 0, unsigned endOffset = UINT_MAX, bool useSelectionHeight = false); 539 virtual void absoluteRectsForRange(Vector<IntRect>&, unsigned startOffset = 0, unsigned endOffset = UINT_MAX, bool useSelectionHeight = false);
546 540
547 virtual void absoluteRects(Vector<IntRect>&, int, int, bool = true) { } 541 virtual void absoluteRects(Vector<IntRect>&, int, int, bool = true) { }
548 // FIXME: useTransforms should go away eventually 542 // FIXME: useTransforms should go away eventually
549 IntRect absoluteBoundingBoxRect(bool useTransforms = false); 543 IntRect absoluteBoundingBoxRect(bool useTransforms = false);
550 544
(...skipping 26 matching lines...) Expand all
577 }; 571 };
578 572
579 void drawBorderArc(GraphicsContext*, int x, int y, float thickness, IntSize radius, int angleStart, 573 void drawBorderArc(GraphicsContext*, int x, int y, float thickness, IntSize radius, int angleStart,
580 int angleSpan, BorderSide, Color, const Color& textcolor, EBorderStyle, bool firstCorner); 574 int angleSpan, BorderSide, Color, const Color& textcolor, EBorderStyle, bool firstCorner);
581 void drawBorder(GraphicsContext*, int x1, int y1, int x2, int y2, BorderSide , 575 void drawBorder(GraphicsContext*, int x1, int y1, int x2, int y2, BorderSide ,
582 Color, const Color& textcolor, EBorderStyle, int adjbw1, int adjbw2); 576 Color, const Color& textcolor, EBorderStyle, int adjbw1, int adjbw2);
583 577
584 // Return the RenderBox in the container chain which is responsible for pain ting this object, or 0 578 // Return the RenderBox in the container chain which is responsible for pain ting this object, or 0
585 // if painting is root-relative. This is the container that should be passed to the 'forRepaint' 579 // if painting is root-relative. This is the container that should be passed to the 'forRepaint'
586 // methods. 580 // methods.
587 RenderBox* containerForRepaint() const; 581 RenderBoxModelObject* containerForRepaint() const;
588 // Actually do the repaint of rect r for this object which has been computed in the coordinate space 582 // Actually do the repaint of rect r for this object which has been computed in the coordinate space
589 // of repaintContainer. If repaintContainer is 0, repaint via the view. 583 // of repaintContainer. If repaintContainer is 0, repaint via the view.
590 void repaintUsingContainer(RenderBox* repaintContainer, const IntRect& r, bo ol immediate = false); 584 void repaintUsingContainer(RenderBoxModelObject* repaintContainer, const Int Rect& r, bool immediate = false);
591 585
592 // Repaint the entire object. Called when, e.g., the color of a border chan ges, or when a border 586 // Repaint the entire object. Called when, e.g., the color of a border chan ges, or when a border
593 // style changes. 587 // style changes.
594 void repaint(bool immediate = false); 588 void repaint(bool immediate = false);
595 589
596 // Repaint a specific subrectangle within a given object. The rect |r| is i n the object's coordinate space. 590 // Repaint a specific subrectangle within a given object. The rect |r| is i n the object's coordinate space.
597 void repaintRectangle(const IntRect&, bool immediate = false); 591 void repaintRectangle(const IntRect&, bool immediate = false);
598 592
599 // Repaint only if our old bounds and new bounds are different. 593 // Repaint only if our old bounds and new bounds are different.
600 bool repaintAfterLayoutIfNeeded(RenderBox* repaintContainer, const IntRect& oldBounds, const IntRect& oldOutlineBox); 594 bool repaintAfterLayoutIfNeeded(RenderBoxModelObject* repaintContainer, cons t IntRect& oldBounds, const IntRect& oldOutlineBox);
601 595
602 // Repaint only if the object moved. 596 // Repaint only if the object moved.
603 virtual void repaintDuringLayoutIfMoved(const IntRect& rect); 597 virtual void repaintDuringLayoutIfMoved(const IntRect& rect);
604 598
605 // Called to repaint a block's floats. 599 // Called to repaint a block's floats.
606 virtual void repaintOverhangingFloats(bool paintAllDescendants = false); 600 virtual void repaintOverhangingFloats(bool paintAllDescendants = false);
607 601
608 bool checkForRepaintDuringLayout() const; 602 bool checkForRepaintDuringLayout() const;
609 603
610 // Returns the rect that should be repainted whenever this object changes. The rect is in the view's 604 // Returns the rect that should be repainted whenever this object changes. The rect is in the view's
611 // coordinate space. This method deals with outlines and overflow. 605 // coordinate space. This method deals with outlines and overflow.
612 IntRect absoluteClippedOverflowRect() 606 IntRect absoluteClippedOverflowRect()
613 { 607 {
614 return clippedOverflowRectForRepaint(0); 608 return clippedOverflowRectForRepaint(0);
615 } 609 }
616 virtual IntRect clippedOverflowRectForRepaint(RenderBox* repaintContainer); 610 virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintC ontainer);
617 virtual IntRect rectWithOutlineForRepaint(RenderBox* repaintContainer, int o utlineWidth); 611 virtual IntRect rectWithOutlineForRepaint(RenderBoxModelObject* repaintConta iner, int outlineWidth);
618 612
619 // Given a rect in the object's coordinate space, compute a rect suitable fo r repainting 613 // Given a rect in the object's coordinate space, compute a rect suitable fo r repainting
620 // that rect in view coordinates. 614 // that rect in view coordinates.
621 void computeAbsoluteRepaintRect(IntRect& r, bool fixed = false) 615 void computeAbsoluteRepaintRect(IntRect& r, bool fixed = false)
622 { 616 {
623 return computeRectForRepaint(0, r, fixed); 617 return computeRectForRepaint(0, r, fixed);
624 } 618 }
625 // Given a rect in the object's coordinate space, compute a rect suitable fo r repainting 619 // Given a rect in the object's coordinate space, compute a rect suitable fo r repainting
626 // that rect in the coordinate space of repaintContainer. 620 // that rect in the coordinate space of repaintContainer.
627 virtual void computeRectForRepaint(RenderBox* repaintContainer, IntRect&, bo ol fixed = false); 621 virtual void computeRectForRepaint(RenderBoxModelObject* repaintContainer, I ntRect&, bool fixed = false);
628 622
629 virtual unsigned int length() const { return 1; } 623 virtual unsigned int length() const { return 1; }
630 624
631 bool isFloatingOrPositioned() const { return (isFloating() || isPositioned() ); } 625 bool isFloatingOrPositioned() const { return (isFloating() || isPositioned() ); }
632 virtual bool containsFloats() { return false; } 626 virtual bool containsFloats() { return false; }
633 virtual bool containsFloat(RenderObject*) { return false; } 627 virtual bool containsFloat(RenderObject*) { return false; }
634 virtual bool hasOverhangingFloats() { return false; } 628 virtual bool hasOverhangingFloats() { return false; }
635 629
636 virtual bool avoidsFloats() const; 630 virtual bool avoidsFloats() const;
637 bool shrinkToAvoidFloats() const; 631 bool shrinkToAvoidFloats() const;
(...skipping 23 matching lines...) Expand all
661 // The current selection state for an object. For blocks, the state refers to the state of the leaf 655 // The current selection state for an object. For blocks, the state refers to the state of the leaf
662 // descendants (as described above in the SelectionState enum declaration). 656 // descendants (as described above in the SelectionState enum declaration).
663 SelectionState selectionState() const { return static_cast<SelectionState>(m _selectionState);; } 657 SelectionState selectionState() const { return static_cast<SelectionState>(m _selectionState);; }
664 658
665 // Sets the selection state for an object. 659 // Sets the selection state for an object.
666 virtual void setSelectionState(SelectionState state) { m_selectionState = st ate; } 660 virtual void setSelectionState(SelectionState state) { m_selectionState = st ate; }
667 661
668 // A single rectangle that encompasses all of the selected objects within th is object. Used to determine the tightest 662 // A single rectangle that encompasses all of the selected objects within th is object. Used to determine the tightest
669 // possible bounding box for the selection. 663 // possible bounding box for the selection.
670 IntRect selectionRect(bool clipToVisibleContent = true) { return selectionRe ctForRepaint(0, clipToVisibleContent); } 664 IntRect selectionRect(bool clipToVisibleContent = true) { return selectionRe ctForRepaint(0, clipToVisibleContent); }
671 virtual IntRect selectionRectForRepaint(RenderBox* /*repaintContainer*/, boo l /*clipToVisibleContent*/ = true) { return IntRect(); } 665 virtual IntRect selectionRectForRepaint(RenderBoxModelObject* /*repaintConta iner*/, bool /*clipToVisibleContent*/ = true) { return IntRect(); }
672 666
673 // Whether or not an object can be part of the leaf elements of the selectio n. 667 // Whether or not an object can be part of the leaf elements of the selectio n.
674 virtual bool canBeSelectionLeaf() const { return false; } 668 virtual bool canBeSelectionLeaf() const { return false; }
675 669
676 // Whether or not a block has selected children. 670 // Whether or not a block has selected children.
677 bool hasSelectedChildren() const { return m_selectionState != SelectionNone; } 671 bool hasSelectedChildren() const { return m_selectionState != SelectionNone; }
678 672
679 // Obtains the selection colors that should be used when painting a selectio n. 673 // Obtains the selection colors that should be used when painting a selectio n.
680 Color selectionBackgroundColor() const; 674 Color selectionBackgroundColor() const;
681 Color selectionForegroundColor() const; 675 Color selectionForegroundColor() const;
(...skipping 30 matching lines...) Expand all
712 // Virtual function helpers for CSS3 Flexible Box Layout 706 // Virtual function helpers for CSS3 Flexible Box Layout
713 virtual bool isFlexibleBox() const { return false; } 707 virtual bool isFlexibleBox() const { return false; }
714 virtual bool isFlexingChildren() const { return false; } 708 virtual bool isFlexingChildren() const { return false; }
715 virtual bool isStretchingChildren() const { return false; } 709 virtual bool isStretchingChildren() const { return false; }
716 710
717 virtual int caretMinOffset() const; 711 virtual int caretMinOffset() const;
718 virtual int caretMaxOffset() const; 712 virtual int caretMaxOffset() const;
719 virtual unsigned caretMaxRenderedOffset() const; 713 virtual unsigned caretMaxRenderedOffset() const;
720 714
721 virtual int previousOffset(int current) const; 715 virtual int previousOffset(int current) const;
716 virtual int previousOffsetForBackwardDeletion(int current) const;
722 virtual int nextOffset(int current) const; 717 virtual int nextOffset(int current) const;
723 718
724 virtual void imageChanged(CachedImage*, const IntRect* = 0); 719 virtual void imageChanged(CachedImage*, const IntRect* = 0);
725 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) { } 720 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) { }
726 virtual bool willRenderImage(CachedImage*); 721 virtual bool willRenderImage(CachedImage*);
727 722
728 virtual void selectionStartEnd(int& spos, int& epos) const; 723 virtual void selectionStartEnd(int& spos, int& epos) const;
729 724
730 RenderObject* paintingRootForChildren(PaintInfo& paintInfo) const 725 RenderObject* paintingRootForChildren(PaintInfo& paintInfo) const
731 { 726 {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 void addPDFURLRect(GraphicsContext*, const IntRect&); 765 void addPDFURLRect(GraphicsContext*, const IntRect&);
771 766
772 virtual IntRect viewRect() const; 767 virtual IntRect viewRect() const;
773 768
774 int getVerticalPosition(bool firstLine) const; 769 int getVerticalPosition(bool firstLine) const;
775 770
776 void adjustRectForOutlineAndShadow(IntRect&) const; 771 void adjustRectForOutlineAndShadow(IntRect&) const;
777 772
778 void arenaDelete(RenderArena*, void* objectBase); 773 void arenaDelete(RenderArena*, void* objectBase);
779 774
780 virtual IntRect outlineBoundsForRepaint(RenderBox* /*repaintContainer*/) con st { return IntRect(); } 775 virtual IntRect outlineBoundsForRepaint(RenderBoxModelObject* /*repaintConta iner*/) const { return IntRect(); }
781 776
782 class LayoutRepainter { 777 class LayoutRepainter {
783 public: 778 public:
784 LayoutRepainter(RenderObject& object, bool checkForRepaint, const IntRec t* oldBounds = 0) 779 LayoutRepainter(RenderObject& object, bool checkForRepaint, const IntRec t* oldBounds = 0)
785 : m_object(object) 780 : m_object(object)
786 , m_repaintContainer(0) 781 , m_repaintContainer(0)
787 , m_checkForRepaint(checkForRepaint) 782 , m_checkForRepaint(checkForRepaint)
788 { 783 {
789 if (m_checkForRepaint) { 784 if (m_checkForRepaint) {
790 m_repaintContainer = m_object.containerForRepaint(); 785 m_repaintContainer = m_object.containerForRepaint();
791 m_oldBounds = oldBounds ? *oldBounds : m_object.clippedOverflowR ectForRepaint(m_repaintContainer); 786 m_oldBounds = oldBounds ? *oldBounds : m_object.clippedOverflowR ectForRepaint(m_repaintContainer);
792 m_oldOutlineBox = m_object.outlineBoundsForRepaint(m_repaintCont ainer); 787 m_oldOutlineBox = m_object.outlineBoundsForRepaint(m_repaintCont ainer);
793 } 788 }
794 } 789 }
795 790
796 // Return true if it repainted. 791 // Return true if it repainted.
797 bool repaintAfterLayout() 792 bool repaintAfterLayout()
798 { 793 {
799 return m_checkForRepaint ? m_object.repaintAfterLayoutIfNeeded(m_rep aintContainer, m_oldBounds, m_oldOutlineBox) : false; 794 return m_checkForRepaint ? m_object.repaintAfterLayoutIfNeeded(m_rep aintContainer, m_oldBounds, m_oldOutlineBox) : false;
800 } 795 }
801 796
802 bool checkForRepaint() const { return m_checkForRepaint; } 797 bool checkForRepaint() const { return m_checkForRepaint; }
803 798
804 private: 799 private:
805 RenderObject& m_object; 800 RenderObject& m_object;
806 RenderBox* m_repaintContainer; 801 RenderBoxModelObject* m_repaintContainer;
807 IntRect m_oldBounds; 802 IntRect m_oldBounds;
808 IntRect m_oldOutlineBox; 803 IntRect m_oldOutlineBox;
809 bool m_checkForRepaint; 804 bool m_checkForRepaint;
810 }; 805 };
811 806
812 private: 807 private:
813 RenderStyle* firstLineStyleSlowCase() const; 808 RenderStyle* firstLineStyleSlowCase() const;
814 809
815 RefPtr<RenderStyle> m_style; 810 RefPtr<RenderStyle> m_style;
816 811
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
942 937
943 inline void RenderObject::markContainingBlocksForLayout(bool scheduleRelayout, R enderObject* newRoot) 938 inline void RenderObject::markContainingBlocksForLayout(bool scheduleRelayout, R enderObject* newRoot)
944 { 939 {
945 ASSERT(!scheduleRelayout || !newRoot); 940 ASSERT(!scheduleRelayout || !newRoot);
946 941
947 RenderObject* o = container(); 942 RenderObject* o = container();
948 RenderObject* last = this; 943 RenderObject* last = this;
949 944
950 while (o) { 945 while (o) {
951 if (!last->isText() && (last->style()->position() == FixedPosition || la st->style()->position() == AbsolutePosition)) { 946 if (!last->isText() && (last->style()->position() == FixedPosition || la st->style()->position() == AbsolutePosition)) {
952 if (last->hasStaticY()) { 947 if ((last->style()->top().isAuto() && last->style()->bottom().isAuto ()) || last->style()->top().isStatic()) {
953 RenderObject* parent = last->parent(); 948 RenderObject* parent = last->parent();
954 if (!parent->normalChildNeedsLayout()) { 949 if (!parent->normalChildNeedsLayout()) {
955 parent->setChildNeedsLayout(true, false); 950 parent->setChildNeedsLayout(true, false);
956 if (parent != newRoot) 951 if (parent != newRoot)
957 parent->markContainingBlocksForLayout(scheduleRelayout, newRoot); 952 parent->markContainingBlocksForLayout(scheduleRelayout, newRoot);
958 } 953 }
959 } 954 }
960 if (o->m_posChildNeedsLayout) 955 if (o->m_posChildNeedsLayout)
961 return; 956 return;
962 o->m_posChildNeedsLayout = true; 957 o->m_posChildNeedsLayout = true;
(...skipping 19 matching lines...) Expand all
982 } 977 }
983 978
984 } // namespace WebCore 979 } // namespace WebCore
985 980
986 #ifndef NDEBUG 981 #ifndef NDEBUG
987 // Outside the WebCore namespace for ease of invocation from gdb. 982 // Outside the WebCore namespace for ease of invocation from gdb.
988 void showTree(const WebCore::RenderObject*); 983 void showTree(const WebCore::RenderObject*);
989 #endif 984 #endif
990 985
991 #endif // RenderObject_h 986 #endif // RenderObject_h
OLDNEW
« no previous file with comments | « third_party/WebKit/WebCore/rendering/RenderMedia.h ('k') | third_party/WebKit/WebCore/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698