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, 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 void HTMLTextAreaElement::updateFocusAppearance(SelectionBehaviorOnFocus selecti
onBehavior) | 247 void HTMLTextAreaElement::updateFocusAppearance(SelectionBehaviorOnFocus selecti
onBehavior) |
248 { | 248 { |
249 switch (selectionBehavior) { | 249 switch (selectionBehavior) { |
250 case SelectionBehaviorOnFocus::Reset: // Fallthrough. | 250 case SelectionBehaviorOnFocus::Reset: // Fallthrough. |
251 case SelectionBehaviorOnFocus::Restore: | 251 case SelectionBehaviorOnFocus::Restore: |
252 restoreCachedSelection(); | 252 restoreCachedSelection(); |
253 break; | 253 break; |
254 case SelectionBehaviorOnFocus::None: | 254 case SelectionBehaviorOnFocus::None: |
255 return; | 255 return; |
256 } | 256 } |
257 if (document().frame()) | 257 if (document().frame()) { |
| 258 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesh
eets |
| 259 // needs to be audited. See http://crbug.com/590369 for more details. |
| 260 document().updateStyleAndLayoutIgnorePendingStylesheets(); |
| 261 |
258 document().frame()->selection().revealSelection(); | 262 document().frame()->selection().revealSelection(); |
| 263 } |
259 } | 264 } |
260 | 265 |
261 void HTMLTextAreaElement::defaultEventHandler(Event* event) | 266 void HTMLTextAreaElement::defaultEventHandler(Event* event) |
262 { | 267 { |
263 if (layoutObject() && (event->isMouseEvent() || event->isDragEvent() || even
t->hasInterface(EventNames::WheelEvent) || event->type() == EventTypeNames::blur
)) | 268 if (layoutObject() && (event->isMouseEvent() || event->isDragEvent() || even
t->hasInterface(EventNames::WheelEvent) || event->type() == EventTypeNames::blur
)) |
264 forwardEvent(event); | 269 forwardEvent(event); |
265 else if (layoutObject() && event->isBeforeTextInsertedEvent()) | 270 else if (layoutObject() && event->isBeforeTextInsertedEvent()) |
266 handleBeforeTextInsertedEvent(static_cast<BeforeTextInsertedEvent*>(even
t)); | 271 handleBeforeTextInsertedEvent(static_cast<BeforeTextInsertedEvent*>(even
t)); |
267 | 272 |
268 HTMLTextFormControlElement::defaultEventHandler(event); | 273 HTMLTextFormControlElement::defaultEventHandler(event); |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 | 682 |
678 void HTMLTextAreaElement::copyNonAttributePropertiesFromElement(const Element& s
ource) | 683 void HTMLTextAreaElement::copyNonAttributePropertiesFromElement(const Element& s
ource) |
679 { | 684 { |
680 const HTMLTextAreaElement& sourceElement = static_cast<const HTMLTextAreaEle
ment&>(source); | 685 const HTMLTextAreaElement& sourceElement = static_cast<const HTMLTextAreaEle
ment&>(source); |
681 setValueCommon(sourceElement.value(), DispatchNoEvent, SetSeletion); | 686 setValueCommon(sourceElement.value(), DispatchNoEvent, SetSeletion); |
682 m_isDirty = sourceElement.m_isDirty; | 687 m_isDirty = sourceElement.m_isDirty; |
683 HTMLTextFormControlElement::copyNonAttributePropertiesFromElement(source); | 688 HTMLTextFormControlElement::copyNonAttributePropertiesFromElement(source); |
684 } | 689 } |
685 | 690 |
686 } // namespace blink | 691 } // namespace blink |
OLD | NEW |