OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 1194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1205 const bool selectionHasDirection = true; | 1205 const bool selectionHasDirection = true; |
1206 setSelection(VisibleSelection(pos.deepEquivalent(), m_selection.extent(), po
s.affinity(), selectionHasDirection), CloseTyping | ClearTypingStyle | userTrigg
ered); | 1206 setSelection(VisibleSelection(pos.deepEquivalent(), m_selection.extent(), po
s.affinity(), selectionHasDirection), CloseTyping | ClearTypingStyle | userTrigg
ered); |
1207 } | 1207 } |
1208 | 1208 |
1209 void FrameSelection::setExtent(const VisiblePosition &pos, EUserTriggered userTr
iggered) | 1209 void FrameSelection::setExtent(const VisiblePosition &pos, EUserTriggered userTr
iggered) |
1210 { | 1210 { |
1211 const bool selectionHasDirection = true; | 1211 const bool selectionHasDirection = true; |
1212 setSelection(VisibleSelection(m_selection.base(), pos.deepEquivalent(), pos.
affinity(), selectionHasDirection), CloseTyping | ClearTypingStyle | userTrigger
ed); | 1212 setSelection(VisibleSelection(m_selection.base(), pos.deepEquivalent(), pos.
affinity(), selectionHasDirection), CloseTyping | ClearTypingStyle | userTrigger
ed); |
1213 } | 1213 } |
1214 | 1214 |
1215 RenderObject* FrameSelection::caretRenderer() const | 1215 RenderBlock* FrameSelection::caretRenderer() const |
1216 { | 1216 { |
1217 return CaretBase::caretRenderer(m_selection.start().deprecatedNode()); | 1217 return CaretBase::caretRenderer(m_selection.start().deprecatedNode()); |
1218 } | 1218 } |
1219 | 1219 |
1220 static bool isNonOrphanedCaret(const VisibleSelection& selection) | 1220 static bool isNonOrphanedCaret(const VisibleSelection& selection) |
1221 { | 1221 { |
1222 return selection.isCaret() && !selection.start().isOrphan() && !selection.en
d().isOrphan(); | 1222 return selection.isCaret() && !selection.start().isOrphan() && !selection.en
d().isOrphan(); |
1223 } | 1223 } |
1224 | 1224 |
1225 LayoutRect FrameSelection::localCaretRect() | 1225 LayoutRect FrameSelection::localCaretRect() |
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1896 sel.showTreeForThis(); | 1896 sel.showTreeForThis(); |
1897 } | 1897 } |
1898 | 1898 |
1899 void showTree(const blink::FrameSelection* sel) | 1899 void showTree(const blink::FrameSelection* sel) |
1900 { | 1900 { |
1901 if (sel) | 1901 if (sel) |
1902 sel->showTreeForThis(); | 1902 sel->showTreeForThis(); |
1903 } | 1903 } |
1904 | 1904 |
1905 #endif | 1905 #endif |
OLD | NEW |