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 1317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1328 m_caretRectDirty = true; | 1328 m_caretRectDirty = true; |
1329 | 1329 |
1330 scheduleVisualUpdate(); | 1330 scheduleVisualUpdate(); |
1331 } | 1331 } |
1332 | 1332 |
1333 void FrameSelection::scheduleVisualUpdate() const | 1333 void FrameSelection::scheduleVisualUpdate() const |
1334 { | 1334 { |
1335 if (!m_frame) | 1335 if (!m_frame) |
1336 return; | 1336 return; |
1337 if (Page* page = m_frame->page()) | 1337 if (Page* page = m_frame->page()) |
1338 page->animator().scheduleVisualUpdate(); | 1338 page->animator().scheduleVisualUpdate(m_frame->localFrameRoot()); |
1339 } | 1339 } |
1340 | 1340 |
1341 bool FrameSelection::selectWordAroundPosition(const VisiblePosition& position) | 1341 bool FrameSelection::selectWordAroundPosition(const VisiblePosition& position) |
1342 { | 1342 { |
1343 static const EWordSide wordSideList[2] = { RightWordIfOnBoundary, LeftWordIf
OnBoundary }; | 1343 static const EWordSide wordSideList[2] = { RightWordIfOnBoundary, LeftWordIf
OnBoundary }; |
1344 for (EWordSide wordSide : wordSideList) { | 1344 for (EWordSide wordSide : wordSideList) { |
1345 VisiblePosition start = startOfWord(position, wordSide); | 1345 VisiblePosition start = startOfWord(position, wordSide); |
1346 VisiblePosition end = endOfWord(position, wordSide); | 1346 VisiblePosition end = endOfWord(position, wordSide); |
1347 String text = plainText(EphemeralRange(start.deepEquivalent(), end.deepE
quivalent())); | 1347 String text = plainText(EphemeralRange(start.deepEquivalent(), end.deepE
quivalent())); |
1348 if (!text.isEmpty() && !isSeparator(text.characterStartingAt(0))) { | 1348 if (!text.isEmpty() && !isSeparator(text.characterStartingAt(0))) { |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1409 | 1409 |
1410 void showTree(const blink::FrameSelection* sel) | 1410 void showTree(const blink::FrameSelection* sel) |
1411 { | 1411 { |
1412 if (sel) | 1412 if (sel) |
1413 sel->showTreeForThis(); | 1413 sel->showTreeForThis(); |
1414 else | 1414 else |
1415 fprintf(stderr, "Cannot showTree for (nil) FrameSelection.\n"); | 1415 fprintf(stderr, "Cannot showTree for (nil) FrameSelection.\n"); |
1416 } | 1416 } |
1417 | 1417 |
1418 #endif | 1418 #endif |
OLD | NEW |