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

Side by Side Diff: Source/core/html/HTMLElement.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/HTMLCanvasElement.cpp ('k') | Source/core/html/HTMLImageElement.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) 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 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
5 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 5 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
6 * Copyright (C) 2011 Motorola Mobility. All rights reserved. 6 * Copyright (C) 2011 Motorola Mobility. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 673
674 short HTMLElement::tabIndex() const 674 short HTMLElement::tabIndex() const
675 { 675 {
676 if (supportsFocus()) 676 if (supportsFocus())
677 return Element::tabIndex(); 677 return Element::tabIndex();
678 return -1; 678 return -1;
679 } 679 }
680 680
681 void HTMLElement::setTabIndex(int value) 681 void HTMLElement::setTabIndex(int value)
682 { 682 {
683 setAttribute(tabindexAttr, String::number(value)); 683 setIntegralAttribute(tabindexAttr, value);
684 } 684 }
685 685
686 TranslateAttributeMode HTMLElement::translateAttributeMode() const 686 TranslateAttributeMode HTMLElement::translateAttributeMode() const
687 { 687 {
688 const AtomicString& value = getAttribute(translateAttr); 688 const AtomicString& value = getAttribute(translateAttr);
689 689
690 if (value == nullAtom) 690 if (value == nullAtom)
691 return TranslateAttributeInherit; 691 return TranslateAttributeInherit;
692 if (equalIgnoringCase(value, "yes") || equalIgnoringCase(value, "")) 692 if (equalIgnoringCase(value, "yes") || equalIgnoringCase(value, ""))
693 return TranslateAttributeYes; 693 return TranslateAttributeYes;
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
1072 #ifndef NDEBUG 1072 #ifndef NDEBUG
1073 1073
1074 // For use in the debugger 1074 // For use in the debugger
1075 void dumpInnerHTML(WebCore::HTMLElement*); 1075 void dumpInnerHTML(WebCore::HTMLElement*);
1076 1076
1077 void dumpInnerHTML(WebCore::HTMLElement* element) 1077 void dumpInnerHTML(WebCore::HTMLElement* element)
1078 { 1078 {
1079 printf("%s\n", element->innerHTML().ascii().data()); 1079 printf("%s\n", element->innerHTML().ascii().data());
1080 } 1080 }
1081 #endif 1081 #endif
OLDNEW
« no previous file with comments | « Source/core/html/HTMLCanvasElement.cpp ('k') | Source/core/html/HTMLImageElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698