Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(746)

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp

Issue 2157913002: Text in map.google.com is not revealed after crossing input edge. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/editing/input/caret-selection-after-input-edge.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 } 379 }
380 #endif // ENABLE(ASSERT) 380 #endif // ENABLE(ASSERT)
381 VisibleSelection newSelection; 381 VisibleSelection newSelection;
382 if (direction == SelectionHasBackwardDirection) 382 if (direction == SelectionHasBackwardDirection)
383 newSelection.setWithoutValidation(endPosition, startPosition); 383 newSelection.setWithoutValidation(endPosition, startPosition);
384 else 384 else
385 newSelection.setWithoutValidation(startPosition, endPosition); 385 newSelection.setWithoutValidation(startPosition, endPosition);
386 newSelection.setIsDirectional(direction != SelectionHasNoDirection); 386 newSelection.setIsDirectional(direction != SelectionHasNoDirection);
387 387
388 frame->selection().setSelection(newSelection, FrameSelection::DoNotAdjustInF latTree | FrameSelection::CloseTyping | FrameSelection::ClearTypingStyle | (sele ctionOption == ChangeSelectionAndFocus ? 0 : FrameSelection::DoNotSetFocus)); 388 frame->selection().setSelection(newSelection, FrameSelection::DoNotAdjustInF latTree | FrameSelection::CloseTyping | FrameSelection::ClearTypingStyle | (sele ctionOption == ChangeSelectionAndFocus ? 0 : FrameSelection::DoNotSetFocus));
389 frame->selection().revealSelection();
389 if (eventBehaviour == DispatchSelectEvent) 390 if (eventBehaviour == DispatchSelectEvent)
390 scheduleSelectEvent(); 391 scheduleSelectEvent();
391 } 392 }
392 393
393 VisiblePosition HTMLTextFormControlElement::visiblePositionForIndex(int index) c onst 394 VisiblePosition HTMLTextFormControlElement::visiblePositionForIndex(int index) c onst
394 { 395 {
395 if (index <= 0) 396 if (index <= 0)
396 return VisiblePosition::firstPositionInNode(innerEditorElement()); 397 return VisiblePosition::firstPositionInNode(innerEditorElement());
397 Position start, end; 398 Position start, end;
398 bool selected = Range::selectNodeContents(innerEditorElement(), start, end); 399 bool selected = Range::selectNodeContents(innerEditorElement(), start, end);
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
1028 } 1029 }
1029 1030
1030 void HTMLTextFormControlElement::copyNonAttributePropertiesFromElement(const Ele ment& source) 1031 void HTMLTextFormControlElement::copyNonAttributePropertiesFromElement(const Ele ment& source)
1031 { 1032 {
1032 const HTMLTextFormControlElement& sourceElement = static_cast<const HTMLText FormControlElement&>(source); 1033 const HTMLTextFormControlElement& sourceElement = static_cast<const HTMLText FormControlElement&>(source);
1033 m_lastChangeWasUserEdit = sourceElement.m_lastChangeWasUserEdit; 1034 m_lastChangeWasUserEdit = sourceElement.m_lastChangeWasUserEdit;
1034 HTMLFormControlElement::copyNonAttributePropertiesFromElement(source); 1035 HTMLFormControlElement::copyNonAttributePropertiesFromElement(source);
1035 } 1036 }
1036 1037
1037 } // namespace blink 1038 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/editing/input/caret-selection-after-input-edge.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698