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 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1108 const TextIteratorBehavior& behavior) const { | 1108 const TextIteratorBehavior& behavior) const { |
1109 return extractSelectedText(*this, behavior); | 1109 return extractSelectedText(*this, behavior); |
1110 } | 1110 } |
1111 | 1111 |
1112 String FrameSelection::selectedText() const { | 1112 String FrameSelection::selectedText() const { |
1113 return selectedText(TextIteratorBehavior()); | 1113 return selectedText(TextIteratorBehavior()); |
1114 } | 1114 } |
1115 | 1115 |
1116 String FrameSelection::selectedTextForClipboard() const { | 1116 String FrameSelection::selectedTextForClipboard() const { |
1117 return extractSelectedText( | 1117 return extractSelectedText( |
1118 *this, TextIteratorBehavior::Builder() | 1118 *this, |
1119 .setEmitsImageAltText( | 1119 TextIteratorBehavior::Builder() |
1120 m_frame->settings() && | 1120 .setEmitsImageAltText( |
1121 m_frame->settings()->getSelectionIncludesAltImageText()) | 1121 m_frame->settings() && |
1122 .build()); | 1122 m_frame->settings()->getSelectionIncludesAltImageText()) |
| 1123 .build()); |
1123 } | 1124 } |
1124 | 1125 |
1125 LayoutRect FrameSelection::bounds() const { | 1126 LayoutRect FrameSelection::bounds() const { |
1126 FrameView* view = m_frame->view(); | 1127 FrameView* view = m_frame->view(); |
1127 if (!view) | 1128 if (!view) |
1128 return LayoutRect(); | 1129 return LayoutRect(); |
1129 | 1130 |
1130 return intersection(unclippedBounds(), | 1131 return intersection(unclippedBounds(), |
1131 LayoutRect(view->visibleContentRect())); | 1132 LayoutRect(view->visibleContentRect())); |
1132 } | 1133 } |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1407 } | 1408 } |
1408 | 1409 |
1409 void showTree(const blink::FrameSelection* sel) { | 1410 void showTree(const blink::FrameSelection* sel) { |
1410 if (sel) | 1411 if (sel) |
1411 sel->showTreeForThis(); | 1412 sel->showTreeForThis(); |
1412 else | 1413 else |
1413 LOG(INFO) << "Cannot showTree for <null> FrameSelection."; | 1414 LOG(INFO) << "Cannot showTree for <null> FrameSelection."; |
1414 } | 1415 } |
1415 | 1416 |
1416 #endif | 1417 #endif |
OLD | NEW |