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

Side by Side Diff: Source/core/html/shadow/MediaControlElements.cpp

Issue 84713002: Add number() static methods to AtomicString class (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Pass NaN as default argument Created 7 years 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/parser/HTMLParserIdioms.cpp ('k') | Source/core/storage/Storage.cpp » ('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) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google 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 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. 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 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 return inDocument() && document().isActive(); 512 return inDocument() && document().isActive();
513 } 513 }
514 514
515 void MediaControlTimelineElement::setPosition(double currentTime) 515 void MediaControlTimelineElement::setPosition(double currentTime)
516 { 516 {
517 setValue(String::number(currentTime)); 517 setValue(String::number(currentTime));
518 } 518 }
519 519
520 void MediaControlTimelineElement::setDuration(double duration) 520 void MediaControlTimelineElement::setDuration(double duration)
521 { 521 {
522 setAttribute(maxAttr, String::number(std::isfinite(duration) ? duration : 0) ); 522 setFloatingPointAttribute(maxAttr, std::isfinite(duration) ? duration : 0);
523 } 523 }
524 524
525 525
526 const AtomicString& MediaControlTimelineElement::part() const 526 const AtomicString& MediaControlTimelineElement::part() const
527 { 527 {
528 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-timeline", At omicString::ConstructFromLiteral)); 528 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-timeline", At omicString::ConstructFromLiteral));
529 return id; 529 return id;
530 } 530 }
531 531
532 // ---------------------------- 532 // ----------------------------
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 float fontSize = smallestDimension * 0.05f; 769 float fontSize = smallestDimension * 0.05f;
770 if (fontSize != m_fontSize) { 770 if (fontSize != m_fontSize) {
771 m_fontSize = fontSize; 771 m_fontSize = fontSize;
772 setInlineStyleProperty(CSSPropertyFontSize, fontSize, CSSPrimitiveValue: :CSS_PX); 772 setInlineStyleProperty(CSSPropertyFontSize, fontSize, CSSPrimitiveValue: :CSS_PX);
773 } 773 }
774 } 774 }
775 775
776 // ---------------------------- 776 // ----------------------------
777 777
778 } // namespace WebCore 778 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/parser/HTMLParserIdioms.cpp ('k') | Source/core/storage/Storage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698