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

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

Issue 23890025: WIP (Introduce WTF::NonNullPtr<T>.) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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/HTMLDocument.cpp ('k') | Source/core/html/HTMLFormControlElement.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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 { 288 {
289 if (isIdAttributeName(name) || name == classAttr || name == styleAttr) 289 if (isIdAttributeName(name) || name == classAttr || name == styleAttr)
290 return Element::parseAttribute(name, value); 290 return Element::parseAttribute(name, value);
291 291
292 if (name == dirAttr) 292 if (name == dirAttr)
293 dirAttributeChanged(value); 293 dirAttributeChanged(value);
294 else if (name == tabindexAttr) { 294 else if (name == tabindexAttr) {
295 int tabindex = 0; 295 int tabindex = 0;
296 if (value.isEmpty()) { 296 if (value.isEmpty()) {
297 clearTabIndexExplicitlyIfNeeded(); 297 clearTabIndexExplicitlyIfNeeded();
298 if (treeScope().adjustedFocusedElement() == this) { 298 if (treeScope()->adjustedFocusedElement() == this) {
299 // We might want to call blur(), but it's dangerous to dispatch 299 // We might want to call blur(), but it's dangerous to dispatch
300 // events here. 300 // events here.
301 document().setNeedsFocusedElementCheck(); 301 document().setNeedsFocusedElementCheck();
302 } 302 }
303 } else if (parseHTMLInteger(value, tabindex)) { 303 } else if (parseHTMLInteger(value, tabindex)) {
304 // Clamp tabindex to the range of 'short' to match Firefox's behavio r. 304 // Clamp tabindex to the range of 'short' to match Firefox's behavio r.
305 setTabIndexExplicitly(max(static_cast<int>(std::numeric_limits<short >::min()), min(tabindex, static_cast<int>(std::numeric_limits<short>::max())))); 305 setTabIndexExplicitly(max(static_cast<int>(std::numeric_limits<short >::min()), min(tabindex, static_cast<int>(std::numeric_limits<short>::max()))));
306 } 306 }
307 } else { 307 } else {
308 AtomicString eventName = eventNameForAttributeName(name); 308 AtomicString eventName = eventNameForAttributeName(name);
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after
1102 #ifndef NDEBUG 1102 #ifndef NDEBUG
1103 1103
1104 // For use in the debugger 1104 // For use in the debugger
1105 void dumpInnerHTML(WebCore::HTMLElement*); 1105 void dumpInnerHTML(WebCore::HTMLElement*);
1106 1106
1107 void dumpInnerHTML(WebCore::HTMLElement* element) 1107 void dumpInnerHTML(WebCore::HTMLElement* element)
1108 { 1108 {
1109 printf("%s\n", element->innerHTML().ascii().data()); 1109 printf("%s\n", element->innerHTML().ascii().data());
1110 } 1110 }
1111 #endif 1111 #endif
OLDNEW
« no previous file with comments | « Source/core/html/HTMLDocument.cpp ('k') | Source/core/html/HTMLFormControlElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698