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

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

Issue 1675163002: Rename ComposedTree to FlatTree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wip Created 4 years, 10 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
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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 && endPosition.anchorNode()->shadowHost() == this); 377 && endPosition.anchorNode()->shadowHost() == this);
378 } 378 }
379 #endif // ENABLE(ASSERT) 379 #endif // ENABLE(ASSERT)
380 VisibleSelection newSelection; 380 VisibleSelection newSelection;
381 if (direction == SelectionHasBackwardDirection) 381 if (direction == SelectionHasBackwardDirection)
382 newSelection.setWithoutValidation(endPosition, startPosition); 382 newSelection.setWithoutValidation(endPosition, startPosition);
383 else 383 else
384 newSelection.setWithoutValidation(startPosition, endPosition); 384 newSelection.setWithoutValidation(startPosition, endPosition);
385 newSelection.setIsDirectional(direction != SelectionHasNoDirection); 385 newSelection.setIsDirectional(direction != SelectionHasNoDirection);
386 386
387 frame->selection().setSelection(newSelection, FrameSelection::DoNotAdjustInC omposedTree | FrameSelection::CloseTyping | FrameSelection::ClearTypingStyle | ( selectionOption == ChangeSelectionAndFocus ? 0 : FrameSelection::DoNotSetFocus)) ; 387 frame->selection().setSelection(newSelection, FrameSelection::DoNotAdjustInF latTree | FrameSelection::CloseTyping | FrameSelection::ClearTypingStyle | (sele ctionOption == ChangeSelectionAndFocus ? 0 : FrameSelection::DoNotSetFocus));
388 if (eventBehaviour == DispatchSelectEvent) 388 if (eventBehaviour == DispatchSelectEvent)
389 scheduleSelectEvent(); 389 scheduleSelectEvent();
390 } 390 }
391 391
392 VisiblePosition HTMLTextFormControlElement::visiblePositionForIndex(int index) c onst 392 VisiblePosition HTMLTextFormControlElement::visiblePositionForIndex(int index) c onst
393 { 393 {
394 if (index <= 0) 394 if (index <= 0)
395 return createVisiblePosition(firstPositionInNode(innerEditorElement())); 395 return createVisiblePosition(firstPositionInNode(innerEditorElement()));
396 Position start, end; 396 Position start, end;
397 bool selected = Range::selectNodeContents(innerEditorElement(), start, end); 397 bool selected = Range::selectNodeContents(innerEditorElement(), start, end);
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 } 1009 }
1010 1010
1011 void HTMLTextFormControlElement::copyNonAttributePropertiesFromElement(const Ele ment& source) 1011 void HTMLTextFormControlElement::copyNonAttributePropertiesFromElement(const Ele ment& source)
1012 { 1012 {
1013 const HTMLTextFormControlElement& sourceElement = static_cast<const HTMLText FormControlElement&>(source); 1013 const HTMLTextFormControlElement& sourceElement = static_cast<const HTMLText FormControlElement&>(source);
1014 m_lastChangeWasUserEdit = sourceElement.m_lastChangeWasUserEdit; 1014 m_lastChangeWasUserEdit = sourceElement.m_lastChangeWasUserEdit;
1015 HTMLFormControlElement::copyNonAttributePropertiesFromElement(source); 1015 HTMLFormControlElement::copyNonAttributePropertiesFromElement(source);
1016 } 1016 }
1017 1017
1018 } // namespace blink 1018 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698