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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 } | 369 } |
370 } | 370 } |
371 return; | 371 return; |
372 } | 372 } |
373 | 373 |
374 m_value = normalizedValue; | 374 m_value = normalizedValue; |
375 setInnerEditorValue(m_value); | 375 setInnerEditorValue(m_value); |
376 if (eventBehavior == DispatchNoEvent) | 376 if (eventBehavior == DispatchNoEvent) |
377 setLastChangeWasNotUserEdit(); | 377 setLastChangeWasNotUserEdit(); |
378 updatePlaceholderVisibility(false); | 378 updatePlaceholderVisibility(false); |
379 setNeedsStyleRecalc(SubtreeStyleChange); | 379 setNeedsStyleRecalc(StyleChangeReasonForTracing::ControlValue, SubtreeStyleC
hange); |
380 m_suggestedValue = String(); | 380 m_suggestedValue = String(); |
381 setNeedsValidityCheck(); | 381 setNeedsValidityCheck(); |
382 if (isFinishedParsingChildren()) { | 382 if (isFinishedParsingChildren()) { |
383 // Set the caret to the end of the text value except for initialize. | 383 // Set the caret to the end of the text value except for initialize. |
384 unsigned endOfString = m_value.length(); | 384 unsigned endOfString = m_value.length(); |
385 setSelectionRange(endOfString, endOfString, SelectionHasNoDirection, Not
ChangeSelection); | 385 setSelectionRange(endOfString, endOfString, SelectionHasNoDirection, Not
ChangeSelection); |
386 } | 386 } |
387 | 387 |
388 notifyFormStateChanged(); | 388 notifyFormStateChanged(); |
389 if (eventBehavior == DispatchNoEvent) { | 389 if (eventBehavior == DispatchNoEvent) { |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 | 461 |
462 void HTMLTextAreaElement::setSuggestedValue(const String& value) | 462 void HTMLTextAreaElement::setSuggestedValue(const String& value) |
463 { | 463 { |
464 m_suggestedValue = value; | 464 m_suggestedValue = value; |
465 | 465 |
466 if (!value.isNull()) | 466 if (!value.isNull()) |
467 setInnerEditorValue(m_suggestedValue); | 467 setInnerEditorValue(m_suggestedValue); |
468 else | 468 else |
469 setInnerEditorValue(m_value); | 469 setInnerEditorValue(m_value); |
470 updatePlaceholderVisibility(false); | 470 updatePlaceholderVisibility(false); |
471 setNeedsStyleRecalc(SubtreeStyleChange); | 471 setNeedsStyleRecalc(StyleChangeReasonForTracing::ControlValue, SubtreeStyleC
hange); |
472 } | 472 } |
473 | 473 |
474 String HTMLTextAreaElement::validationMessage() const | 474 String HTMLTextAreaElement::validationMessage() const |
475 { | 475 { |
476 if (!willValidate()) | 476 if (!willValidate()) |
477 return String(); | 477 return String(); |
478 | 478 |
479 if (customError()) | 479 if (customError()) |
480 return customValidationMessage(); | 480 return customValidationMessage(); |
481 | 481 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 { | 564 { |
565 return true; | 565 return true; |
566 } | 566 } |
567 | 567 |
568 bool HTMLTextAreaElement::supportsAutofocus() const | 568 bool HTMLTextAreaElement::supportsAutofocus() const |
569 { | 569 { |
570 return true; | 570 return true; |
571 } | 571 } |
572 | 572 |
573 } | 573 } |
OLD | NEW |