| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
| 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 } | 439 } |
| 440 #endif // DCHECK_IS_ON() | 440 #endif // DCHECK_IS_ON() |
| 441 VisibleSelection newSelection; | 441 VisibleSelection newSelection; |
| 442 if (direction == SelectionHasBackwardDirection) | 442 if (direction == SelectionHasBackwardDirection) |
| 443 newSelection.setWithoutValidation(endPosition, startPosition); | 443 newSelection.setWithoutValidation(endPosition, startPosition); |
| 444 else | 444 else |
| 445 newSelection.setWithoutValidation(startPosition, endPosition); | 445 newSelection.setWithoutValidation(startPosition, endPosition); |
| 446 newSelection.setIsDirectional(direction != SelectionHasNoDirection); | 446 newSelection.setIsDirectional(direction != SelectionHasNoDirection); |
| 447 | 447 |
| 448 frame->selection().setSelection( | 448 frame->selection().setSelection( |
| 449 newSelection, | 449 newSelection, HandleVisibility::NotVisible, |
| 450 FrameSelection::DoNotAdjustInFlatTree | FrameSelection::CloseTyping | | 450 FrameSelection::DoNotAdjustInFlatTree | FrameSelection::CloseTyping | |
| 451 FrameSelection::ClearTypingStyle | FrameSelection::DoNotSetFocus); | 451 FrameSelection::ClearTypingStyle | FrameSelection::DoNotSetFocus); |
| 452 return true; | 452 return true; |
| 453 } | 453 } |
| 454 | 454 |
| 455 VisiblePosition TextControlElement::visiblePositionForIndex(int index) const { | 455 VisiblePosition TextControlElement::visiblePositionForIndex(int index) const { |
| 456 if (index <= 0) | 456 if (index <= 0) |
| 457 return VisiblePosition::firstPositionInNode(innerEditorElement()); | 457 return VisiblePosition::firstPositionInNode(innerEditorElement()); |
| 458 Position start, end; | 458 Position start, end; |
| 459 bool selected = Range::selectNodeContents(innerEditorElement(), start, end); | 459 bool selected = Range::selectNodeContents(innerEditorElement(), start, end); |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 901 | 901 |
| 902 void TextControlElement::copyNonAttributePropertiesFromElement( | 902 void TextControlElement::copyNonAttributePropertiesFromElement( |
| 903 const Element& source) { | 903 const Element& source) { |
| 904 const TextControlElement& sourceElement = | 904 const TextControlElement& sourceElement = |
| 905 static_cast<const TextControlElement&>(source); | 905 static_cast<const TextControlElement&>(source); |
| 906 m_lastChangeWasUserEdit = sourceElement.m_lastChangeWasUserEdit; | 906 m_lastChangeWasUserEdit = sourceElement.m_lastChangeWasUserEdit; |
| 907 HTMLFormControlElement::copyNonAttributePropertiesFromElement(source); | 907 HTMLFormControlElement::copyNonAttributePropertiesFromElement(source); |
| 908 } | 908 } |
| 909 | 909 |
| 910 } // namespace blink | 910 } // namespace blink |
| OLD | NEW |