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

Side by Side Diff: Source/core/html/shadow/DateTimeEditElement.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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 if (DateTimeFieldElement* field = fieldAt(std::min(focusedFieldIndex, m_ fields.size() - 1))) 690 if (DateTimeFieldElement* field = fieldAt(std::min(focusedFieldIndex, m_ fields.size() - 1)))
691 field->focus(); 691 field->focus();
692 } 692 }
693 693
694 if (lastChildToBeRemoved) { 694 if (lastChildToBeRemoved) {
695 for (Node* childNode = fieldsWrapper->firstChild(); childNode; childNode = fieldsWrapper->firstChild()) { 695 for (Node* childNode = fieldsWrapper->firstChild(); childNode; childNode = fieldsWrapper->firstChild()) {
696 fieldsWrapper->removeChild(childNode); 696 fieldsWrapper->removeChild(childNode);
697 if (childNode == lastChildToBeRemoved) 697 if (childNode == lastChildToBeRemoved)
698 break; 698 break;
699 } 699 }
700 setNeedsStyleRecalc(SubtreeStyleChange); 700 setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::cre ate(StyleChangeReason::Control));
701 } 701 }
702 } 702 }
703 703
704 AtomicString DateTimeEditElement::localeIdentifier() const 704 AtomicString DateTimeEditElement::localeIdentifier() const
705 { 705 {
706 return m_editControlOwner ? m_editControlOwner->localeIdentifier() : nullAto m; 706 return m_editControlOwner ? m_editControlOwner->localeIdentifier() : nullAto m;
707 } 707 }
708 708
709 void DateTimeEditElement::fieldDidChangeValueByKeyboard() 709 void DateTimeEditElement::fieldDidChangeValueByKeyboard()
710 { 710 {
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 { 808 {
809 DateTimeFieldsState dateTimeFieldsState; 809 DateTimeFieldsState dateTimeFieldsState;
810 for (size_t fieldIndex = 0; fieldIndex < m_fields.size(); ++fieldIndex) 810 for (size_t fieldIndex = 0; fieldIndex < m_fields.size(); ++fieldIndex)
811 m_fields[fieldIndex]->populateDateTimeFieldsState(dateTimeFieldsState); 811 m_fields[fieldIndex]->populateDateTimeFieldsState(dateTimeFieldsState);
812 return dateTimeFieldsState; 812 return dateTimeFieldsState;
813 } 813 }
814 814
815 } // namespace blink 815 } // namespace blink
816 816
817 #endif 817 #endif
OLDNEW
« no previous file with comments | « Source/core/html/forms/TextFieldInputType.cpp ('k') | Source/core/html/shadow/DateTimeFieldElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698