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

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

Issue 99333011: Make sure getAttribute() / setAttribute() callers use AtomicStrings (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
« no previous file with comments | « Source/core/html/HTMLPlugInElement.cpp ('k') | Source/core/html/HTMLSourceElement.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 Nokia Corporation and/or its subsidiary(-ies). 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
4 * (C) 1999 Antti Koivisto (koivisto@kde.org) 4 * (C) 1999 Antti Koivisto (koivisto@kde.org)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved.
7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
8 * Copyright (C) 2010 Google Inc. All rights reserved. 8 * Copyright (C) 2010 Google Inc. All rights reserved.
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
10 * 10 *
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 void HTMLSelectElement::accessKeyAction(bool sendMouseEvents) 383 void HTMLSelectElement::accessKeyAction(bool sendMouseEvents)
384 { 384 {
385 focus(); 385 focus();
386 dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEv ents); 386 dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEv ents);
387 } 387 }
388 388
389 void HTMLSelectElement::setMultiple(bool multiple) 389 void HTMLSelectElement::setMultiple(bool multiple)
390 { 390 {
391 bool oldMultiple = this->multiple(); 391 bool oldMultiple = this->multiple();
392 int oldSelectedIndex = selectedIndex(); 392 int oldSelectedIndex = selectedIndex();
393 setAttribute(multipleAttr, multiple ? "" : 0); 393 setAttribute(multipleAttr, multiple ? emptyAtom : nullAtom);
394 394
395 // Restore selectedIndex after changing the multiple flag to preserve 395 // Restore selectedIndex after changing the multiple flag to preserve
396 // selection as single-line and multi-line has different defaults. 396 // selection as single-line and multi-line has different defaults.
397 if (oldMultiple != this->multiple()) 397 if (oldMultiple != this->multiple())
398 setSelectedIndex(oldSelectedIndex); 398 setSelectedIndex(oldSelectedIndex);
399 } 399 }
400 400
401 void HTMLSelectElement::setSize(int size) 401 void HTMLSelectElement::setSize(int size)
402 { 402 {
403 setIntegralAttribute(sizeAttr, size); 403 setIntegralAttribute(sizeAttr, size);
(...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after
1578 remove(index); 1578 remove(index);
1579 return true; 1579 return true;
1580 } 1580 }
1581 1581
1582 bool HTMLSelectElement::isInteractiveContent() const 1582 bool HTMLSelectElement::isInteractiveContent() const
1583 { 1583 {
1584 return true; 1584 return true;
1585 } 1585 }
1586 1586
1587 } // namespace 1587 } // namespace
OLDNEW
« no previous file with comments | « Source/core/html/HTMLPlugInElement.cpp ('k') | Source/core/html/HTMLSourceElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698