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/Position.h" | 32 #include "core/dom/Position.h" |
32 #include "core/dom/StyleEngine.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" |
42 #include "core/rendering/style/StyleInheritedData.h" | 42 #include "core/rendering/style/StyleInheritedData.h" |
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
758 | 758 |
759 static FloatRect absoluteBoundingBoxRectForRange(const Range*); | 759 static FloatRect absoluteBoundingBoxRectForRange(const Range*); |
760 | 760 |
761 // the rect that will be painted if this object is passed as the paintingRoo
t | 761 // the rect that will be painted if this object is passed as the paintingRoo
t |
762 LayoutRect paintingRootRect(LayoutRect& topLevelRect); | 762 LayoutRect paintingRootRect(LayoutRect& topLevelRect); |
763 | 763 |
764 virtual LayoutUnit minPreferredLogicalWidth() const { return 0; } | 764 virtual LayoutUnit minPreferredLogicalWidth() const { return 0; } |
765 virtual LayoutUnit maxPreferredLogicalWidth() const { return 0; } | 765 virtual LayoutUnit maxPreferredLogicalWidth() const { return 0; } |
766 | 766 |
767 RenderStyle* style() const { return m_style.get(); } | 767 RenderStyle* style() const { return m_style.get(); } |
768 RenderStyle* firstLineStyle() const { return document().styleEngine()->usesF
irstLineRules() ? cachedFirstLineStyle() : style(); } | 768 RenderStyle* firstLineStyle() const; |
769 RenderStyle* style(bool firstLine) const { return firstLine ? firstLineStyle
() : style(); } | 769 RenderStyle* style(bool firstLine) const; |
770 | 770 |
771 inline Color resolveColor(const RenderStyle* styleToUse, int colorProperty)
const | 771 inline Color resolveColor(const RenderStyle* styleToUse, int colorProperty)
const |
772 { | 772 { |
773 return styleToUse->visitedDependentColor(colorProperty); | 773 return styleToUse->visitedDependentColor(colorProperty); |
774 } | 774 } |
775 | 775 |
776 inline Color resolveColor(int colorProperty) const | 776 inline Color resolveColor(int colorProperty) const |
777 { | 777 { |
778 return style()->visitedDependentColor(colorProperty); | 778 return style()->visitedDependentColor(colorProperty); |
779 } | 779 } |
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1472 void showTree(const WebCore::RenderObject*); | 1472 void showTree(const WebCore::RenderObject*); |
1473 void showLineTree(const WebCore::RenderObject*); | 1473 void showLineTree(const WebCore::RenderObject*); |
1474 void showRenderTree(const WebCore::RenderObject* object1); | 1474 void showRenderTree(const WebCore::RenderObject* object1); |
1475 // We don't make object2 an optional parameter so that showRenderTree | 1475 // We don't make object2 an optional parameter so that showRenderTree |
1476 // can be called from gdb easily. | 1476 // can be called from gdb easily. |
1477 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO
bject* object2); | 1477 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO
bject* object2); |
1478 | 1478 |
1479 #endif | 1479 #endif |
1480 | 1480 |
1481 #endif // RenderObject_h | 1481 #endif // RenderObject_h |
OLD | NEW |