diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-24 16:36:50 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-24 16:36:50 +0100 |
commit | ad0d549d4cc13433f77c1ac8f0ab379c83d93f28 (patch) | |
tree | b34b0daceb7c8e7fdde4b4ec43650ab7caadb0a9 /Source/WebCore/html/HTMLSelectElement.cpp | |
parent | 03e12282df9aa1e1fb05a8b90f1cfc2e08764cec (diff) | |
download | qtwebkit-ad0d549d4cc13433f77c1ac8f0ab379c83d93f28.tar.gz |
Imported WebKit commit bb52bf3c0119e8a128cd93afe5572413a8617de9 (http://svn.webkit.org/repository/webkit/trunk@108790)
Diffstat (limited to 'Source/WebCore/html/HTMLSelectElement.cpp')
-rw-r--r-- | Source/WebCore/html/HTMLSelectElement.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/Source/WebCore/html/HTMLSelectElement.cpp b/Source/WebCore/html/HTMLSelectElement.cpp index 1b96d226f..a2c31dcda 100644 --- a/Source/WebCore/html/HTMLSelectElement.cpp +++ b/Source/WebCore/html/HTMLSelectElement.cpp @@ -42,6 +42,7 @@ #include "HTMLOptionsCollection.h" #include "KeyboardEvent.h" #include "MouseEvent.h" +#include "NodeRenderingContext.h" #include "Page.h" #include "RenderListBox.h" #include "RenderMenuList.h" @@ -256,6 +257,17 @@ void HTMLSelectElement::setValue(const String &value) setSelectedIndex(-1); } +bool HTMLSelectElement::isPresentationAttribute(Attribute* attr) const +{ + if (attr->name() == alignAttr) { + // Don't map 'align' attribute. This matches what Firefox, Opera and IE do. + // See http://bugs.webkit.org/show_bug.cgi?id=12072 + return false; + } + + return HTMLFormControlElementWithState::isPresentationAttribute(attr); +} + void HTMLSelectElement::parseAttribute(Attribute* attr) { if (attr->name() == sizeAttr) { @@ -282,9 +294,6 @@ void HTMLSelectElement::parseAttribute(Attribute* attr) parseMultipleAttribute(attr); else if (attr->name() == accesskeyAttr) { // FIXME: ignore for the moment. - } else if (attr->name() == alignAttr) { - // Don't map 'align' attribute. This matches what Firefox, Opera and IE do. - // See http://bugs.webkit.org/show_bug.cgi?id=12072 } else if (attr->name() == onchangeAttr) setAttributeEventListener(eventNames().changeEvent, createAttributeEventListener(this, attr)); else @@ -317,6 +326,11 @@ RenderObject* HTMLSelectElement::createRenderer(RenderArena* arena, RenderStyle* return new (arena) RenderListBox(this); } +bool HTMLSelectElement::childShouldCreateRenderer(const NodeRenderingContext& childContext) const +{ + return childContext.isOnEncapsulationBoundary() && HTMLFormControlElementWithState::childShouldCreateRenderer(childContext); +} + HTMLOptionsCollection* HTMLSelectElement::options() { if (!m_optionsCollection) |