| 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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 void EventHandler::selectClosestMisspellingFromHitTestResult(const HitTestResult
& result, AppendTrailingWhitespace appendTrailingWhitespace) | 437 void EventHandler::selectClosestMisspellingFromHitTestResult(const HitTestResult
& result, AppendTrailingWhitespace appendTrailingWhitespace) |
| 438 { | 438 { |
| 439 Node* innerNode = result.targetNode(); | 439 Node* innerNode = result.targetNode(); |
| 440 VisibleSelection newSelection; | 440 VisibleSelection newSelection; |
| 441 | 441 |
| 442 if (innerNode && innerNode->renderer()) { | 442 if (innerNode && innerNode->renderer()) { |
| 443 VisiblePosition pos(innerNode->renderer()->positionForPoint(result.local
Point())); | 443 VisiblePosition pos(innerNode->renderer()->positionForPoint(result.local
Point())); |
| 444 Position start = pos.deepEquivalent(); | 444 Position start = pos.deepEquivalent(); |
| 445 Position end = pos.deepEquivalent(); | 445 Position end = pos.deepEquivalent(); |
| 446 if (pos.isNotNull()) { | 446 if (pos.isNotNull()) { |
| 447 Vector<DocumentMarker*> markers = innerNode->document().markers()->m
arkersInRange(makeRange(pos, pos).get(), DocumentMarker::MisspellingMarkers()); | 447 Vector<DocumentMarker*> markers = innerNode->document().markers()->m
arkersInRange(makeRange(pos, pos).get(), DocumentMarker::misspellingMarkers()); |
| 448 if (markers.size() == 1) { | 448 if (markers.size() == 1) { |
| 449 start.moveToOffset(markers[0]->startOffset()); | 449 start.moveToOffset(markers[0]->startOffset()); |
| 450 end.moveToOffset(markers[0]->endOffset()); | 450 end.moveToOffset(markers[0]->endOffset()); |
| 451 newSelection = VisibleSelection(start, end); | 451 newSelection = VisibleSelection(start, end); |
| 452 } | 452 } |
| 453 } | 453 } |
| 454 | 454 |
| 455 if (appendTrailingWhitespace == ShouldAppendTrailingWhitespace && newSel
ection.isRange()) | 455 if (appendTrailingWhitespace == ShouldAppendTrailingWhitespace && newSel
ection.isRange()) |
| 456 newSelection.appendTrailingWhitespace(); | 456 newSelection.appendTrailingWhitespace(); |
| 457 | 457 |
| (...skipping 3388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3846 unsigned EventHandler::accessKeyModifiers() | 3846 unsigned EventHandler::accessKeyModifiers() |
| 3847 { | 3847 { |
| 3848 #if OS(MACOSX) | 3848 #if OS(MACOSX) |
| 3849 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 3849 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
| 3850 #else | 3850 #else |
| 3851 return PlatformEvent::AltKey; | 3851 return PlatformEvent::AltKey; |
| 3852 #endif | 3852 #endif |
| 3853 } | 3853 } |
| 3854 | 3854 |
| 3855 } // namespace WebCore | 3855 } // namespace WebCore |
| OLD | NEW |