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

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

Issue 1433103002: Use FocusParams in FocusController::setFocusedElement and Document::setFocusedElement arguments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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, 2010 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserv ed.
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 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 243
244 void HTMLTextAreaElement::updateFocusAppearance(SelectionBehaviorOnFocus selecti onBehavior) 244 void HTMLTextAreaElement::updateFocusAppearance(SelectionBehaviorOnFocus selecti onBehavior)
245 { 245 {
246 switch (selectionBehavior) { 246 switch (selectionBehavior) {
247 case SelectionBehaviorOnFocus::Reset: 247 case SelectionBehaviorOnFocus::Reset:
248 setSelectionRange(0, 0, SelectionHasNoDirection, NotDispatchSelectEvent) ; 248 setSelectionRange(0, 0, SelectionHasNoDirection, NotDispatchSelectEvent) ;
249 break; 249 break;
250 case SelectionBehaviorOnFocus::Restore: 250 case SelectionBehaviorOnFocus::Restore:
251 restoreCachedSelection(); 251 restoreCachedSelection();
252 break; 252 break;
253 case SelectionBehaviorOnFocus::None:
254 // |None| is used only for FocusController::setFocusedElement and
255 // Document::setFocusedElement, and they don't call
256 // updateFocusAppearance().
257 ASSERT_NOT_REACHED();
253 } 258 }
254 if (document().frame()) 259 if (document().frame())
255 document().frame()->selection().revealSelection(); 260 document().frame()->selection().revealSelection();
256 } 261 }
257 262
258 void HTMLTextAreaElement::defaultEventHandler(Event* event) 263 void HTMLTextAreaElement::defaultEventHandler(Event* event)
259 { 264 {
260 if (layoutObject() && (event->isMouseEvent() || event->isDragEvent() || even t->hasInterface(EventNames::WheelEvent) || event->type() == EventTypeNames::blur )) 265 if (layoutObject() && (event->isMouseEvent() || event->isDragEvent() || even t->hasInterface(EventNames::WheelEvent) || event->type() == EventTypeNames::blur ))
261 forwardEvent(event); 266 forwardEvent(event);
262 else if (layoutObject() && event->isBeforeTextInsertedEvent()) 267 else if (layoutObject() && event->isBeforeTextInsertedEvent())
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 654
650 void HTMLTextAreaElement::copyNonAttributePropertiesFromElement(const Element& s ource) 655 void HTMLTextAreaElement::copyNonAttributePropertiesFromElement(const Element& s ource)
651 { 656 {
652 const HTMLTextAreaElement& sourceElement = static_cast<const HTMLTextAreaEle ment&>(source); 657 const HTMLTextAreaElement& sourceElement = static_cast<const HTMLTextAreaEle ment&>(source);
653 setValueCommon(sourceElement.value(), DispatchNoEvent, SetSeletion); 658 setValueCommon(sourceElement.value(), DispatchNoEvent, SetSeletion);
654 m_isDirty = sourceElement.m_isDirty; 659 m_isDirty = sourceElement.m_isDirty;
655 HTMLTextFormControlElement::copyNonAttributePropertiesFromElement(source); 660 HTMLTextFormControlElement::copyNonAttributePropertiesFromElement(source);
656 } 661 }
657 662
658 } // namespace blink 663 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLInputElement.cpp ('k') | third_party/WebKit/Source/core/html/forms/RadioInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698