| 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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 void EventHandler::selectClosestMisspellingFromHitTestResult(const HitTestResult
& result, AppendTrailingWhitespace appendTrailingWhitespace) | 444 void EventHandler::selectClosestMisspellingFromHitTestResult(const HitTestResult
& result, AppendTrailingWhitespace appendTrailingWhitespace) |
| 445 { | 445 { |
| 446 Node* innerNode = result.targetNode(); | 446 Node* innerNode = result.targetNode(); |
| 447 VisibleSelection newSelection; | 447 VisibleSelection newSelection; |
| 448 | 448 |
| 449 if (innerNode && innerNode->renderer()) { | 449 if (innerNode && innerNode->renderer()) { |
| 450 VisiblePosition pos(innerNode->renderer()->positionForPoint(result.local
Point())); | 450 VisiblePosition pos(innerNode->renderer()->positionForPoint(result.local
Point())); |
| 451 Position start = pos.deepEquivalent(); | 451 Position start = pos.deepEquivalent(); |
| 452 Position end = pos.deepEquivalent(); | 452 Position end = pos.deepEquivalent(); |
| 453 if (pos.isNotNull()) { | 453 if (pos.isNotNull()) { |
| 454 Vector<DocumentMarker*> markers = innerNode->document().markers()->m
arkersInRange(makeRange(pos, pos).get(), DocumentMarker::MisspellingMarkers()); | 454 Vector<DocumentMarker*> markers = innerNode->document().markers().ma
rkersInRange(makeRange(pos, pos).get(), DocumentMarker::MisspellingMarkers()); |
| 455 if (markers.size() == 1) { | 455 if (markers.size() == 1) { |
| 456 start.moveToOffset(markers[0]->startOffset()); | 456 start.moveToOffset(markers[0]->startOffset()); |
| 457 end.moveToOffset(markers[0]->endOffset()); | 457 end.moveToOffset(markers[0]->endOffset()); |
| 458 newSelection = VisibleSelection(start, end); | 458 newSelection = VisibleSelection(start, end); |
| 459 } | 459 } |
| 460 } | 460 } |
| 461 | 461 |
| 462 if (appendTrailingWhitespace == ShouldAppendTrailingWhitespace && newSel
ection.isRange()) | 462 if (appendTrailingWhitespace == ShouldAppendTrailingWhitespace && newSel
ection.isRange()) |
| 463 newSelection.appendTrailingWhitespace(); | 463 newSelection.appendTrailingWhitespace(); |
| 464 | 464 |
| (...skipping 3550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4015 unsigned EventHandler::accessKeyModifiers() | 4015 unsigned EventHandler::accessKeyModifiers() |
| 4016 { | 4016 { |
| 4017 #if OS(MACOSX) | 4017 #if OS(MACOSX) |
| 4018 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 4018 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
| 4019 #else | 4019 #else |
| 4020 return PlatformEvent::AltKey; | 4020 return PlatformEvent::AltKey; |
| 4021 #endif | 4021 #endif |
| 4022 } | 4022 } |
| 4023 | 4023 |
| 4024 } // namespace WebCore | 4024 } // namespace WebCore |
| OLD | NEW |