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

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

Issue 547823002: Track reasons for |Node::SetNeedsStyleRecalc| (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: use AtomicString Created 6 years, 2 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, 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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 } 374 }
375 } 375 }
376 return; 376 return;
377 } 377 }
378 378
379 m_value = normalizedValue; 379 m_value = normalizedValue;
380 setInnerEditorValue(m_value); 380 setInnerEditorValue(m_value);
381 if (eventBehavior == DispatchNoEvent) 381 if (eventBehavior == DispatchNoEvent)
382 setLastChangeWasNotUserEdit(); 382 setLastChangeWasNotUserEdit();
383 updatePlaceholderVisibility(false); 383 updatePlaceholderVisibility(false);
384 setNeedsStyleRecalc(SubtreeStyleChange); 384 setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create( StyleChangeReason::ControlValue));
385 m_suggestedValue = String(); 385 m_suggestedValue = String();
386 setNeedsValidityCheck(); 386 setNeedsValidityCheck();
387 if (isFinishedParsingChildren()) { 387 if (isFinishedParsingChildren()) {
388 // Set the caret to the end of the text value except for initialize. 388 // Set the caret to the end of the text value except for initialize.
389 unsigned endOfString = m_value.length(); 389 unsigned endOfString = m_value.length();
390 setSelectionRange(endOfString, endOfString, SelectionHasNoDirection, Not ChangeSelection); 390 setSelectionRange(endOfString, endOfString, SelectionHasNoDirection, Not ChangeSelection);
391 } 391 }
392 392
393 notifyFormStateChanged(); 393 notifyFormStateChanged();
394 if (eventBehavior == DispatchNoEvent) { 394 if (eventBehavior == DispatchNoEvent) {
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 466
467 void HTMLTextAreaElement::setSuggestedValue(const String& value) 467 void HTMLTextAreaElement::setSuggestedValue(const String& value)
468 { 468 {
469 m_suggestedValue = value; 469 m_suggestedValue = value;
470 470
471 if (!value.isNull()) 471 if (!value.isNull())
472 setInnerEditorValue(m_suggestedValue); 472 setInnerEditorValue(m_suggestedValue);
473 else 473 else
474 setInnerEditorValue(m_value); 474 setInnerEditorValue(m_value);
475 updatePlaceholderVisibility(false); 475 updatePlaceholderVisibility(false);
476 setNeedsStyleRecalc(SubtreeStyleChange); 476 setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create( StyleChangeReason::ControlValue));
477 } 477 }
478 478
479 String HTMLTextAreaElement::validationMessage() const 479 String HTMLTextAreaElement::validationMessage() const
480 { 480 {
481 if (!willValidate()) 481 if (!willValidate())
482 return String(); 482 return String();
483 483
484 if (customError()) 484 if (customError())
485 return customValidationMessage(); 485 return customValidationMessage();
486 486
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 { 576 {
577 return true; 577 return true;
578 } 578 }
579 579
580 bool HTMLTextAreaElement::supportsAutofocus() const 580 bool HTMLTextAreaElement::supportsAutofocus() const
581 { 581 {
582 return true; 582 return true;
583 } 583 }
584 584
585 } 585 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLTableElement.cpp ('k') | Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698