OLD | NEW |
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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 return HTMLFormControlElementWithState::isPresentationAttribute(name); | 355 return HTMLFormControlElementWithState::isPresentationAttribute(name); |
356 } | 356 } |
357 | 357 |
358 void HTMLSelectElement::parseAttribute(const QualifiedName& name, const AtomicSt
ring& oldValue, const AtomicString& value) | 358 void HTMLSelectElement::parseAttribute(const QualifiedName& name, const AtomicSt
ring& oldValue, const AtomicString& value) |
359 { | 359 { |
360 if (name == sizeAttr) { | 360 if (name == sizeAttr) { |
361 unsigned oldSize = m_size; | 361 unsigned oldSize = m_size; |
362 // Set the attribute value to a number. | 362 // Set the attribute value to a number. |
363 // This is important since the style rules for this attribute can | 363 // This is important since the style rules for this attribute can |
364 // determine the appearance property. | 364 // determine the appearance property. |
365 unsigned size = value.string().toUInt(); | 365 unsigned size = value.getString().toUInt(); |
366 AtomicString attrSize = AtomicString::number(size); | 366 AtomicString attrSize = AtomicString::number(size); |
367 if (attrSize != value) { | 367 if (attrSize != value) { |
368 // FIXME: This is horribly factored. | 368 // FIXME: This is horribly factored. |
369 if (Attribute* sizeAttribute = ensureUniqueElementData().attributes(
).find(sizeAttr)) | 369 if (Attribute* sizeAttribute = ensureUniqueElementData().attributes(
).find(sizeAttr)) |
370 sizeAttribute->setValue(attrSize); | 370 sizeAttribute->setValue(attrSize); |
371 } | 371 } |
372 size = std::max(size, 0u); | 372 size = std::max(size, 0u); |
373 | 373 |
374 // Ensure that we've determined selectedness of the items at least once | 374 // Ensure that we've determined selectedness of the items at least once |
375 // prior to changing the size. | 375 // prior to changing the size. |
(...skipping 1629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2005 m_popupIsVisible = false; | 2005 m_popupIsVisible = false; |
2006 m_popup = nullptr; | 2006 m_popup = nullptr; |
2007 } | 2007 } |
2008 | 2008 |
2009 void HTMLSelectElement::resetTypeAheadSessionForTesting() | 2009 void HTMLSelectElement::resetTypeAheadSessionForTesting() |
2010 { | 2010 { |
2011 m_typeAhead.resetSession(); | 2011 m_typeAhead.resetSession(); |
2012 } | 2012 } |
2013 | 2013 |
2014 } // namespace blink | 2014 } // namespace blink |
OLD | NEW |