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

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

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