| 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 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 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 737 SelectionNone, // The object is not selected. | 737 SelectionNone, // The object is not selected. |
| 738 SelectionStart, // The object either contains the start of a selection r
un or is the start of a run | 738 SelectionStart, // The object either contains the start of a selection r
un or is the start of a run |
| 739 SelectionInside, // The object is fully encompassed by a selection run | 739 SelectionInside, // The object is fully encompassed by a selection run |
| 740 SelectionEnd, // The object either contains the end of a selection run o
r is the end of a run | 740 SelectionEnd, // The object either contains the end of a selection run o
r is the end of a run |
| 741 SelectionBoth // The object contains an entire run or is the sole select
ed object in that run | 741 SelectionBoth // The object contains an entire run or is the sole select
ed object in that run |
| 742 }; | 742 }; |
| 743 | 743 |
| 744 // The current selection state for an object. For blocks, the state refers
to the state of the leaf | 744 // The current selection state for an object. For blocks, the state refers
to the state of the leaf |
| 745 // descendants (as described above in the SelectionState enum declaration). | 745 // descendants (as described above in the SelectionState enum declaration). |
| 746 SelectionState selectionState() const { return static_cast<SelectionState>(m
_selectionState);; } | 746 SelectionState selectionState() const { return static_cast<SelectionState>(m
_selectionState);; } |
| 747 inline void setSelectionStateIfNeeded(SelectionState); |
| 748 bool canUpdateSelectionOnRootLineBoxes(); |
| 747 | 749 |
| 748 // Sets the selection state for an object. | 750 // Sets the selection state for an object. |
| 749 virtual void setSelectionState(SelectionState state) { m_selectionState = st
ate; } | 751 virtual void setSelectionState(SelectionState state) { m_selectionState = st
ate; } |
| 750 | 752 |
| 751 // A single rectangle that encompasses all of the selected objects within th
is object. Used to determine the tightest | 753 // A single rectangle that encompasses all of the selected objects within th
is object. Used to determine the tightest |
| 752 // possible bounding box for the selection. | 754 // possible bounding box for the selection. |
| 753 LayoutRect selectionRect(bool clipToVisibleContent = true) { return selectio
nRectForRepaint(0, clipToVisibleContent); } | 755 LayoutRect selectionRect(bool clipToVisibleContent = true) { return selectio
nRectForRepaint(0, clipToVisibleContent); } |
| 754 virtual LayoutRect selectionRectForRepaint(RenderBoxModelObject* /*repaintCo
ntainer*/, bool /*clipToVisibleContent*/ = true) { return LayoutRect(); } | 756 virtual LayoutRect selectionRectForRepaint(RenderBoxModelObject* /*repaintCo
ntainer*/, bool /*clipToVisibleContent*/ = true) { return LayoutRect(); } |
| 755 | 757 |
| 756 // Whether or not an object can be part of the leaf elements of the selectio
n. | 758 // Whether or not an object can be part of the leaf elements of the selectio
n. |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1019 inline bool RenderObject::preservesNewline() const | 1021 inline bool RenderObject::preservesNewline() const |
| 1020 { | 1022 { |
| 1021 #if ENABLE(SVG) | 1023 #if ENABLE(SVG) |
| 1022 if (isSVGInlineText()) | 1024 if (isSVGInlineText()) |
| 1023 return false; | 1025 return false; |
| 1024 #endif | 1026 #endif |
| 1025 | 1027 |
| 1026 return style()->preserveNewline(); | 1028 return style()->preserveNewline(); |
| 1027 } | 1029 } |
| 1028 | 1030 |
| 1031 inline void RenderObject::setSelectionStateIfNeeded(SelectionState state) |
| 1032 { |
| 1033 if (selectionState() == state) |
| 1034 return; |
| 1035 |
| 1036 setSelectionState(state); |
| 1037 } |
| 1038 |
| 1029 inline void makeMatrixRenderable(TransformationMatrix& matrix, bool has3DRenderi
ng) | 1039 inline void makeMatrixRenderable(TransformationMatrix& matrix, bool has3DRenderi
ng) |
| 1030 { | 1040 { |
| 1031 #if !ENABLE(3D_RENDERING) | 1041 #if !ENABLE(3D_RENDERING) |
| 1032 UNUSED_PARAM(has3DRendering); | 1042 UNUSED_PARAM(has3DRendering); |
| 1033 matrix.makeAffine(); | 1043 matrix.makeAffine(); |
| 1034 #else | 1044 #else |
| 1035 if (!has3DRendering) | 1045 if (!has3DRendering) |
| 1036 matrix.makeAffine(); | 1046 matrix.makeAffine(); |
| 1037 #endif | 1047 #endif |
| 1038 } | 1048 } |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1074 // Outside the WebCore namespace for ease of invocation from gdb. | 1084 // Outside the WebCore namespace for ease of invocation from gdb. |
| 1075 void showTree(const WebCore::RenderObject*); | 1085 void showTree(const WebCore::RenderObject*); |
| 1076 void showLineTree(const WebCore::RenderObject*); | 1086 void showLineTree(const WebCore::RenderObject*); |
| 1077 void showRenderTree(const WebCore::RenderObject* object1); | 1087 void showRenderTree(const WebCore::RenderObject* object1); |
| 1078 // We don't make object2 an optional parameter so that showRenderTree | 1088 // We don't make object2 an optional parameter so that showRenderTree |
| 1079 // can be called from gdb easily. | 1089 // can be called from gdb easily. |
| 1080 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO
bject* object2); | 1090 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO
bject* object2); |
| 1081 #endif | 1091 #endif |
| 1082 | 1092 |
| 1083 #endif // RenderObject_h | 1093 #endif // RenderObject_h |
| OLD | NEW |