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

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

Powered by Google App Engine
This is Rietveld 408576698