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

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

Issue 7833032: Merge 94543 - Style not propagated to anonymous boxes and anonymous (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 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 Apple Inc. All rights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights 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 bool isRoot() const { return document()->documentElement() == m_node; } 319 bool isRoot() const { return document()->documentElement() == m_node; }
320 bool isBody() const; 320 bool isBody() const;
321 bool isHR() const; 321 bool isHR() const;
322 bool isLegend() const; 322 bool isLegend() const;
323 323
324 bool isHTMLMarquee() const; 324 bool isHTMLMarquee() const;
325 325
326 inline bool isBeforeContent() const; 326 inline bool isBeforeContent() const;
327 inline bool isAfterContent() const; 327 inline bool isAfterContent() const;
328 inline bool isBeforeOrAfterContent() const;
328 static inline bool isBeforeContent(const RenderObject* obj) { return obj && obj->isBeforeContent(); } 329 static inline bool isBeforeContent(const RenderObject* obj) { return obj && obj->isBeforeContent(); }
329 static inline bool isAfterContent(const RenderObject* obj) { return obj && o bj->isAfterContent(); } 330 static inline bool isAfterContent(const RenderObject* obj) { return obj && o bj->isAfterContent(); }
331 static inline bool isBeforeOrAfterContent(const RenderObject* obj) { return obj && obj->isBeforeOrAfterContent(); }
330 332
331 bool childrenInline() const { return m_childrenInline; } 333 bool childrenInline() const { return m_childrenInline; }
332 void setChildrenInline(bool b = true) { m_childrenInline = b; } 334 void setChildrenInline(bool b = true) { m_childrenInline = b; }
333 bool hasColumns() const { return m_hasColumns; } 335 bool hasColumns() const { return m_hasColumns; }
334 void setHasColumns(bool b = true) { m_hasColumns = b; } 336 void setHasColumns(bool b = true) { m_hasColumns = b; }
335 337
336 virtual bool requiresForcedStyleRecalcPropagation() const { return false; } 338 virtual bool requiresForcedStyleRecalcPropagation() const { return false; }
337 339
338 #if ENABLE(MATHML) 340 #if ENABLE(MATHML)
339 virtual bool isRenderMathMLBlock() const { return false; } 341 virtual bool isRenderMathMLBlock() const { return false; }
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 IntRect absoluteOutlineBounds() const 790 IntRect absoluteOutlineBounds() const
789 { 791 {
790 return outlineBoundsForRepaint(0); 792 return outlineBoundsForRepaint(0);
791 } 793 }
792 794
793 protected: 795 protected:
794 // Overrides should call the superclass at the end 796 // Overrides should call the superclass at the end
795 virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle); 797 virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle);
796 // Overrides should call the superclass at the start 798 // Overrides should call the superclass at the start
797 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); 799 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
800 void propagateStyleToAnonymousChildren();
798 801
799 void drawLineForBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2, Bo xSide, 802 void drawLineForBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2, Bo xSide,
800 Color, EBorderStyle, int adjbw1, int adjbw2, bool an tialias = false); 803 Color, EBorderStyle, int adjbw1, int adjbw2, bool an tialias = false);
801 804
802 void paintFocusRing(GraphicsContext*, const LayoutPoint&, RenderStyle*); 805 void paintFocusRing(GraphicsContext*, const LayoutPoint&, RenderStyle*);
803 void paintOutline(GraphicsContext*, const LayoutRect&); 806 void paintOutline(GraphicsContext*, const LayoutRect&);
804 void addPDFURLRect(GraphicsContext*, const IntRect&); 807 void addPDFURLRect(GraphicsContext*, const IntRect&);
805 808
806 virtual IntRect viewRect() const; 809 virtual IntRect viewRect() const;
807 810
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 inline bool RenderObject::isAfterContent() const 930 inline bool RenderObject::isAfterContent() const
928 { 931 {
929 if (style()->styleType() != AFTER) 932 if (style()->styleType() != AFTER)
930 return false; 933 return false;
931 // Text nodes don't have their own styles, so ignore the style on a text nod e. 934 // Text nodes don't have their own styles, so ignore the style on a text nod e.
932 if (isText() && !isBR()) 935 if (isText() && !isBR())
933 return false; 936 return false;
934 return true; 937 return true;
935 } 938 }
936 939
940 inline bool RenderObject::isBeforeOrAfterContent() const
941 {
942 return isBeforeContent() || isAfterContent();
943 }
944
937 inline void RenderObject::setNeedsLayout(bool b, bool markParents) 945 inline void RenderObject::setNeedsLayout(bool b, bool markParents)
938 { 946 {
939 bool alreadyNeededLayout = m_needsLayout; 947 bool alreadyNeededLayout = m_needsLayout;
940 m_needsLayout = b; 948 m_needsLayout = b;
941 if (b) { 949 if (b) {
942 ASSERT(!isSetNeedsLayoutForbidden()); 950 ASSERT(!isSetNeedsLayoutForbidden());
943 if (!alreadyNeededLayout) { 951 if (!alreadyNeededLayout) {
944 if (markParents) 952 if (markParents)
945 markContainingBlocksForLayout(); 953 markContainingBlocksForLayout();
946 if (hasLayer()) 954 if (hasLayer())
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 // Outside the WebCore namespace for ease of invocation from gdb. 1125 // Outside the WebCore namespace for ease of invocation from gdb.
1118 void showTree(const WebCore::RenderObject*); 1126 void showTree(const WebCore::RenderObject*);
1119 void showLineTree(const WebCore::RenderObject*); 1127 void showLineTree(const WebCore::RenderObject*);
1120 void showRenderTree(const WebCore::RenderObject* object1); 1128 void showRenderTree(const WebCore::RenderObject* object1);
1121 // We don't make object2 an optional parameter so that showRenderTree 1129 // We don't make object2 an optional parameter so that showRenderTree
1122 // can be called from gdb easily. 1130 // can be called from gdb easily.
1123 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO bject* object2); 1131 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO bject* object2);
1124 #endif 1132 #endif
1125 1133
1126 #endif // RenderObject_h 1134 #endif // RenderObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698