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

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

Issue 19510005: [oilpan] Completely move HTMLFormControlElement's hierarchy to the managed heap Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/NumberInputType.h ('k') | Source/core/html/PasswordInputType.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // In case of "123.456" 89 // In case of "123.456"
90 return RealNumberRenderSize(sizeOfSign + sizeBeforeDecimalPoint, sizeOfD igits - sizeBeforeDecimalPoint); 90 return RealNumberRenderSize(sizeOfSign + sizeBeforeDecimalPoint, sizeOfD igits - sizeBeforeDecimalPoint);
91 } 91 }
92 92
93 // In case of "0.00012345" 93 // In case of "0.00012345"
94 const unsigned sizeOfZero = 1; 94 const unsigned sizeOfZero = 1;
95 const unsigned numberOfZeroAfterDecimalPoint = -sizeBeforeDecimalPoint; 95 const unsigned numberOfZeroAfterDecimalPoint = -sizeBeforeDecimalPoint;
96 return RealNumberRenderSize(sizeOfSign + sizeOfZero , numberOfZeroAfterDecim alPoint + sizeOfDigits); 96 return RealNumberRenderSize(sizeOfSign + sizeOfZero , numberOfZeroAfterDecim alPoint + sizeOfDigits);
97 } 97 }
98 98
99 PassOwnPtr<InputType> NumberInputType::create(HTMLInputElement* element) 99 PassOwnPtr<InputType> NumberInputType::create(Handle<HTMLInputElement> element)
100 { 100 {
101 return adoptPtr(new NumberInputType(element)); 101 return adoptPtr(new NumberInputType(element));
102 } 102 }
103 103
104 void NumberInputType::attach() 104 void NumberInputType::attach()
105 { 105 {
106 TextFieldInputType::attach(); 106 TextFieldInputType::attach();
107 observeFeatureIfVisible(UseCounter::InputTypeNumber); 107 observeFeatureIfVisible(UseCounter::InputTypeNumber);
108 } 108 }
109 109
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 300
301 void NumberInputType::stepAttributeChanged() 301 void NumberInputType::stepAttributeChanged()
302 { 302 {
303 InputType::stepAttributeChanged(); 303 InputType::stepAttributeChanged();
304 304
305 if (element()->renderer()) 305 if (element()->renderer())
306 element()->renderer()->setNeedsLayoutAndPrefWidthsRecalc(); 306 element()->renderer()->setNeedsLayoutAndPrefWidthsRecalc();
307 } 307 }
308 308
309 } // namespace WebCore 309 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/NumberInputType.h ('k') | Source/core/html/PasswordInputType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698