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 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
792 LayoutRect paintingRootRect(LayoutRect& topLevelRect); | 792 LayoutRect paintingRootRect(LayoutRect& topLevelRect); |
793 | 793 |
794 virtual LayoutUnit minPreferredLogicalWidth() const { return 0; } | 794 virtual LayoutUnit minPreferredLogicalWidth() const { return 0; } |
795 virtual LayoutUnit maxPreferredLogicalWidth() const { return 0; } | 795 virtual LayoutUnit maxPreferredLogicalWidth() const { return 0; } |
796 | 796 |
797 RenderStyle* style() const { return m_style.get(); } | 797 RenderStyle* style() const { return m_style.get(); } |
798 | 798 |
799 // m_style can only be nullptr before the first style is set, thus most | 799 // m_style can only be nullptr before the first style is set, thus most |
800 // callers will never see a nullptr style and should use styleRef(). | 800 // callers will never see a nullptr style and should use styleRef(). |
801 // FIXME: It would be better if style() returned a const reference. | 801 // FIXME: It would be better if style() returned a const reference. |
802 const RenderStyle& styleRef() const { ASSERT(m_style); return *m_style; } | 802 const RenderStyle& styleRef() const { return mutableStyleRef(); } |
| 803 RenderStyle& mutableStyleRef() const { ASSERT(m_style); return *m_style; } |
803 | 804 |
804 /* The following methods are inlined in RenderObjectInlines.h */ | 805 /* The following methods are inlined in RenderObjectInlines.h */ |
805 RenderStyle* firstLineStyle() const; | 806 RenderStyle* firstLineStyle() const; |
806 RenderStyle* style(bool firstLine) const; | 807 RenderStyle* style(bool firstLine) const; |
807 const RenderStyle& styleRef(bool firstLine) const; | 808 const RenderStyle& styleRef(bool firstLine) const; |
808 | 809 |
809 static inline Color resolveColor(const RenderStyle& styleToUse, int colorPro
perty) | 810 static inline Color resolveColor(const RenderStyle& styleToUse, int colorPro
perty) |
810 { | 811 { |
811 return styleToUse.visitedDependentColor(colorProperty); | 812 return styleToUse.visitedDependentColor(colorProperty); |
812 } | 813 } |
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1612 void showTree(const blink::RenderObject*); | 1613 void showTree(const blink::RenderObject*); |
1613 void showLineTree(const blink::RenderObject*); | 1614 void showLineTree(const blink::RenderObject*); |
1614 void showRenderTree(const blink::RenderObject* object1); | 1615 void showRenderTree(const blink::RenderObject* object1); |
1615 // We don't make object2 an optional parameter so that showRenderTree | 1616 // We don't make object2 an optional parameter so that showRenderTree |
1616 // can be called from gdb easily. | 1617 // can be called from gdb easily. |
1617 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec
t* object2); | 1618 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec
t* object2); |
1618 | 1619 |
1619 #endif | 1620 #endif |
1620 | 1621 |
1621 #endif // RenderObject_h | 1622 #endif // RenderObject_h |
OLD | NEW |