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

Side by Side Diff: Source/core/html/shadow/DateTimeFieldElement.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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 float DateTimeFieldElement::maximumWidth(const Font&) 195 float DateTimeFieldElement::maximumWidth(const Font&)
196 { 196 {
197 const float paddingLeftAndRight = 2; // This should match to html.css. 197 const float paddingLeftAndRight = 2; // This should match to html.css.
198 return paddingLeftAndRight; 198 return paddingLeftAndRight;
199 } 199 }
200 200
201 void DateTimeFieldElement::setDisabled() 201 void DateTimeFieldElement::setDisabled()
202 { 202 {
203 // Set HTML attribute disabled to change apperance. 203 // Set HTML attribute disabled to change apperance.
204 setBooleanAttribute(disabledAttr, true); 204 setBooleanAttribute(disabledAttr, true);
205 setNeedsStyleRecalc(SubtreeStyleChange); 205 setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::createW ithExtraData(StyleChangeReason::PseudoClass, StyleChangeExtraData::Disabled));
206 } 206 }
207 207
208 bool DateTimeFieldElement::supportsFocus() const 208 bool DateTimeFieldElement::supportsFocus() const
209 { 209 {
210 return !isDisabled() && !isFieldOwnerDisabled(); 210 return !isDisabled() && !isFieldOwnerDisabled();
211 } 211 }
212 212
213 void DateTimeFieldElement::updateVisibleValue(EventBehavior eventBehavior) 213 void DateTimeFieldElement::updateVisibleValue(EventBehavior eventBehavior)
214 { 214 {
215 Text* const textNode = toText(firstChild()); 215 Text* const textNode = toText(firstChild());
(...skipping 17 matching lines...) Expand all
233 } 233 }
234 234
235 int DateTimeFieldElement::valueForARIAValueNow() const 235 int DateTimeFieldElement::valueForARIAValueNow() const
236 { 236 {
237 return valueAsInteger(); 237 return valueAsInteger();
238 } 238 }
239 239
240 } // namespace blink 240 } // namespace blink
241 241
242 #endif 242 #endif
OLDNEW
« no previous file with comments | « Source/core/html/shadow/DateTimeEditElement.cpp ('k') | Source/core/inspector/InspectorCSSAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698