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

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

Issue 2274103002: setSelectionRange() for INPUT and TEXTAREA should not set "none" direction on non-macOS platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) 7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org)
8 * Copyright (C) 2010 Google Inc. All rights reserved. 8 * Copyright (C) 2010 Google Inc. All rights reserved.
9 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 9 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
10 * Copyright (C) 2012 Samsung Electronics. All rights reserved. 10 * Copyright (C) 2012 Samsung Electronics. All rights reserved.
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 } 580 }
581 HTMLTextFormControlElement::setSelectionDirection(direction); 581 HTMLTextFormControlElement::setSelectionDirection(direction);
582 } 582 }
583 583
584 void HTMLInputElement::setSelectionRangeForBinding(int start, int end, Exception State& exceptionState) 584 void HTMLInputElement::setSelectionRangeForBinding(int start, int end, Exception State& exceptionState)
585 { 585 {
586 if (!m_inputType->supportsSelectionAPI()) { 586 if (!m_inputType->supportsSelectionAPI()) {
587 exceptionState.throwDOMException(InvalidStateError, "The input element's type ('" + m_inputType->formControlType() + "') does not support selection."); 587 exceptionState.throwDOMException(InvalidStateError, "The input element's type ('" + m_inputType->formControlType() + "') does not support selection.");
588 return; 588 return;
589 } 589 }
590 HTMLTextFormControlElement::setSelectionRange(start, end); 590 HTMLTextFormControlElement::setSelectionRangeForBinding(start, end);
591 } 591 }
592 592
593 void HTMLInputElement::setSelectionRangeForBinding(int start, int end, const Str ing& direction, ExceptionState& exceptionState) 593 void HTMLInputElement::setSelectionRangeForBinding(int start, int end, const Str ing& direction, ExceptionState& exceptionState)
594 { 594 {
595 if (!m_inputType->supportsSelectionAPI()) { 595 if (!m_inputType->supportsSelectionAPI()) {
596 exceptionState.throwDOMException(InvalidStateError, "The input element's type ('" + m_inputType->formControlType() + "') does not support selection."); 596 exceptionState.throwDOMException(InvalidStateError, "The input element's type ('" + m_inputType->formControlType() + "') does not support selection.");
597 return; 597 return;
598 } 598 }
599 HTMLTextFormControlElement::setSelectionRange(start, end, direction); 599 HTMLTextFormControlElement::setSelectionRangeForBinding(start, end, directio n);
600 } 600 }
601 601
602 void HTMLInputElement::accessKeyAction(bool sendMouseEvents) 602 void HTMLInputElement::accessKeyAction(bool sendMouseEvents)
603 { 603 {
604 m_inputTypeView->accessKeyAction(sendMouseEvents); 604 m_inputTypeView->accessKeyAction(sendMouseEvents);
605 } 605 }
606 606
607 bool HTMLInputElement::isPresentationAttribute(const QualifiedName& name) const 607 bool HTMLInputElement::isPresentationAttribute(const QualifiedName& name) const
608 { 608 {
609 // FIXME: Remove type check. 609 // FIXME: Remove type check.
(...skipping 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after
1912 { 1912 {
1913 return m_inputTypeView->hasFallbackContent(); 1913 return m_inputTypeView->hasFallbackContent();
1914 } 1914 }
1915 1915
1916 void HTMLInputElement::setFilesFromPaths(const Vector<String>& paths) 1916 void HTMLInputElement::setFilesFromPaths(const Vector<String>& paths)
1917 { 1917 {
1918 return m_inputType->setFilesFromPaths(paths); 1918 return m_inputType->setFilesFromPaths(paths);
1919 } 1919 }
1920 1920
1921 } // namespace blink 1921 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698