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 |
11 * License as published by the Free Software Foundation; either | 11 * License as published by the Free Software Foundation; either |
12 * version 2 of the License, or (at your option) any later version. | 12 * version 2 of the License, or (at your option) any later version. |
13 * | 13 * |
14 * This library is distributed in the hope that it will be useful, | 14 * This library is distributed in the hope that it will be useful, |
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
17 * Library General Public License for more details. | 17 * Library General Public License for more details. |
18 * | 18 * |
19 * You should have received a copy of the GNU Library General Public License | 19 * You should have received a copy of the GNU Library General Public License |
20 * along with this library; see the file COPYING.LIB. If not, write to | 20 * along with this library; see the file COPYING.LIB. If not, write to |
21 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 21 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
22 * Boston, MA 02110-1301, USA. | 22 * Boston, MA 02110-1301, USA. |
23 * | 23 * |
24 */ | 24 */ |
25 | 25 |
26 #ifndef RenderObject_h | 26 #ifndef RenderObject_h |
27 #define RenderObject_h | 27 #define RenderObject_h |
28 | 28 |
| 29 #include "core/dom/Document.h" |
29 #include "core/dom/DocumentLifecycle.h" | 30 #include "core/dom/DocumentLifecycle.h" |
30 #include "core/dom/Element.h" | 31 #include "core/dom/Element.h" |
31 #include "core/dom/StyleEngine.h" | |
32 #include "core/editing/TextAffinity.h" | 32 #include "core/editing/TextAffinity.h" |
33 #include "core/fetch/ImageResourceClient.h" | 33 #include "core/fetch/ImageResourceClient.h" |
34 #include "core/rendering/HitTestRequest.h" | 34 #include "core/rendering/HitTestRequest.h" |
35 #include "core/rendering/PaintPhase.h" | 35 #include "core/rendering/PaintPhase.h" |
36 #include "core/rendering/RenderObjectChildList.h" | 36 #include "core/rendering/RenderObjectChildList.h" |
37 #include "core/rendering/ScrollAlignment.h" | 37 #include "core/rendering/ScrollAlignment.h" |
38 #include "core/rendering/SubtreeLayoutScope.h" | 38 #include "core/rendering/SubtreeLayoutScope.h" |
39 #include "core/rendering/compositing/CompositingState.h" | 39 #include "core/rendering/compositing/CompositingState.h" |
40 #include "core/rendering/compositing/CompositingTriggers.h" | 40 #include "core/rendering/compositing/CompositingTriggers.h" |
41 #include "core/rendering/style/RenderStyle.h" | 41 #include "core/rendering/style/RenderStyle.h" |
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
770 | 770 |
771 static FloatRect absoluteBoundingBoxRectForRange(const Range*); | 771 static FloatRect absoluteBoundingBoxRectForRange(const Range*); |
772 | 772 |
773 // the rect that will be painted if this object is passed as the paintingRoo
t | 773 // the rect that will be painted if this object is passed as the paintingRoo
t |
774 LayoutRect paintingRootRect(LayoutRect& topLevelRect); | 774 LayoutRect paintingRootRect(LayoutRect& topLevelRect); |
775 | 775 |
776 virtual LayoutUnit minPreferredLogicalWidth() const { return 0; } | 776 virtual LayoutUnit minPreferredLogicalWidth() const { return 0; } |
777 virtual LayoutUnit maxPreferredLogicalWidth() const { return 0; } | 777 virtual LayoutUnit maxPreferredLogicalWidth() const { return 0; } |
778 | 778 |
779 RenderStyle* style() const { return m_style.get(); } | 779 RenderStyle* style() const { return m_style.get(); } |
780 RenderStyle* firstLineStyle() const { return document().styleEngine()->usesF
irstLineRules() ? cachedFirstLineStyle() : style(); } | 780 |
781 RenderStyle* style(bool firstLine) const { return firstLine ? firstLineStyle
() : style(); } | 781 /* The two following methods are inlined in RenderObjectInlines.h */ |
| 782 RenderStyle* firstLineStyle() const; |
| 783 RenderStyle* style(bool firstLine) const; |
782 | 784 |
783 inline Color resolveColor(const RenderStyle* styleToUse, int colorProperty)
const | 785 inline Color resolveColor(const RenderStyle* styleToUse, int colorProperty)
const |
784 { | 786 { |
785 return styleToUse->visitedDependentColor(colorProperty); | 787 return styleToUse->visitedDependentColor(colorProperty); |
786 } | 788 } |
787 | 789 |
788 inline Color resolveColor(int colorProperty) const | 790 inline Color resolveColor(int colorProperty) const |
789 { | 791 { |
790 return style()->visitedDependentColor(colorProperty); | 792 return style()->visitedDependentColor(colorProperty); |
791 } | 793 } |
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1492 void showTree(const WebCore::RenderObject*); | 1494 void showTree(const WebCore::RenderObject*); |
1493 void showLineTree(const WebCore::RenderObject*); | 1495 void showLineTree(const WebCore::RenderObject*); |
1494 void showRenderTree(const WebCore::RenderObject* object1); | 1496 void showRenderTree(const WebCore::RenderObject* object1); |
1495 // We don't make object2 an optional parameter so that showRenderTree | 1497 // We don't make object2 an optional parameter so that showRenderTree |
1496 // can be called from gdb easily. | 1498 // can be called from gdb easily. |
1497 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO
bject* object2); | 1499 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO
bject* object2); |
1498 | 1500 |
1499 #endif | 1501 #endif |
1500 | 1502 |
1501 #endif // RenderObject_h | 1503 #endif // RenderObject_h |
OLD | NEW |