OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) | 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 void EventHandler::selectClosestMisspellingFromHitTestResult(const HitTestResult
& result, AppendTrailingWhitespace appendTrailingWhitespace) | 373 void EventHandler::selectClosestMisspellingFromHitTestResult(const HitTestResult
& result, AppendTrailingWhitespace appendTrailingWhitespace) |
374 { | 374 { |
375 Node* innerNode = result.targetNode(); | 375 Node* innerNode = result.targetNode(); |
376 VisibleSelection newSelection; | 376 VisibleSelection newSelection; |
377 | 377 |
378 if (innerNode && innerNode->renderer()) { | 378 if (innerNode && innerNode->renderer()) { |
379 VisiblePosition pos(innerNode->renderer()->positionForPoint(result.local
Point())); | 379 VisiblePosition pos(innerNode->renderer()->positionForPoint(result.local
Point())); |
380 Position start = pos.deepEquivalent(); | 380 Position start = pos.deepEquivalent(); |
381 Position end = pos.deepEquivalent(); | 381 Position end = pos.deepEquivalent(); |
382 if (pos.isNotNull()) { | 382 if (pos.isNotNull()) { |
383 Vector<DocumentMarker*> markers = innerNode->document().markers().ma
rkersInRange(makeRange(pos, pos).get(), DocumentMarker::MisspellingMarkers()); | 383 WillBeHeapVector<DocumentMarker*> markers = innerNode->document().ma
rkers().markersInRange(makeRange(pos, pos).get(), DocumentMarker::MisspellingMar
kers()); |
384 if (markers.size() == 1) { | 384 if (markers.size() == 1) { |
385 start.moveToOffset(markers[0]->startOffset()); | 385 start.moveToOffset(markers[0]->startOffset()); |
386 end.moveToOffset(markers[0]->endOffset()); | 386 end.moveToOffset(markers[0]->endOffset()); |
387 newSelection = VisibleSelection(start, end); | 387 newSelection = VisibleSelection(start, end); |
388 } | 388 } |
389 } | 389 } |
390 | 390 |
391 if (appendTrailingWhitespace == ShouldAppendTrailingWhitespace && newSel
ection.isRange()) | 391 if (appendTrailingWhitespace == ShouldAppendTrailingWhitespace && newSel
ection.isRange()) |
392 newSelection.appendTrailingWhitespace(); | 392 newSelection.appendTrailingWhitespace(); |
393 | 393 |
(...skipping 3336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3730 unsigned EventHandler::accessKeyModifiers() | 3730 unsigned EventHandler::accessKeyModifiers() |
3731 { | 3731 { |
3732 #if OS(MACOSX) | 3732 #if OS(MACOSX) |
3733 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 3733 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
3734 #else | 3734 #else |
3735 return PlatformEvent::AltKey; | 3735 return PlatformEvent::AltKey; |
3736 #endif | 3736 #endif |
3737 } | 3737 } |
3738 | 3738 |
3739 } // namespace WebCore | 3739 } // namespace WebCore |
OLD | NEW |