| 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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 newSelection = VisibleSelection(pos); | 510 newSelection = VisibleSelection(pos); |
| 511 newSelection.expandUsingGranularity(ParagraphGranularity); | 511 newSelection.expandUsingGranularity(ParagraphGranularity); |
| 512 } | 512 } |
| 513 | 513 |
| 514 return updateSelectionForMouseDownDispatchingSelectStart(innerNode, expandSe
lectionToRespectUserSelectAll(innerNode, newSelection), ParagraphGranularity); | 514 return updateSelectionForMouseDownDispatchingSelectStart(innerNode, expandSe
lectionToRespectUserSelectAll(innerNode, newSelection), ParagraphGranularity); |
| 515 } | 515 } |
| 516 | 516 |
| 517 static int textDistance(const Position& start, const Position& end) | 517 static int textDistance(const Position& start, const Position& end) |
| 518 { | 518 { |
| 519 RefPtrWillBeRawPtr<Range> range = Range::create(*start.document(), start, en
d); | 519 RefPtrWillBeRawPtr<Range> range = Range::create(*start.document(), start, en
d); |
| 520 return TextIterator::rangeLength(range.get(), true); | 520 return TextIterator::rangeLength(range->startPosition(), range->endPosition(
), true); |
| 521 } | 521 } |
| 522 | 522 |
| 523 bool EventHandler::handleMousePressEventSingleClick(const MouseEventWithHitTestR
esults& event) | 523 bool EventHandler::handleMousePressEventSingleClick(const MouseEventWithHitTestR
esults& event) |
| 524 { | 524 { |
| 525 TRACE_EVENT0("blink", "EventHandler::handleMousePressEventSingleClick"); | 525 TRACE_EVENT0("blink", "EventHandler::handleMousePressEventSingleClick"); |
| 526 | 526 |
| 527 m_frame->document()->updateLayoutIgnorePendingStylesheets(); | 527 m_frame->document()->updateLayoutIgnorePendingStylesheets(); |
| 528 Node* innerNode = event.innerNode(); | 528 Node* innerNode = event.innerNode(); |
| 529 if (!(innerNode && innerNode->layoutObject() && m_mouseDownMayStartSelect)) | 529 if (!(innerNode && innerNode->layoutObject() && m_mouseDownMayStartSelect)) |
| 530 return false; | 530 return false; |
| (...skipping 3463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3994 unsigned EventHandler::accessKeyModifiers() | 3994 unsigned EventHandler::accessKeyModifiers() |
| 3995 { | 3995 { |
| 3996 #if OS(MACOSX) | 3996 #if OS(MACOSX) |
| 3997 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 3997 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
| 3998 #else | 3998 #else |
| 3999 return PlatformEvent::AltKey; | 3999 return PlatformEvent::AltKey; |
| 4000 #endif | 4000 #endif |
| 4001 } | 4001 } |
| 4002 | 4002 |
| 4003 } // namespace blink | 4003 } // namespace blink |
| OLD | NEW |