[Webkit-unassigned] [Bug 27756] [HTML5][Forms] Support for HTMLInputElement::list and HTMLInputElement::selectedOption
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jul 29 09:33:49 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=27756
Eric Seidel <eric at webkit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #33694|review? |review-
Flag| |
--- Comment #5 from Eric Seidel <eric at webkit.org> 2009-07-29 09:33:47 PDT ---
(From update of attachment 33694)
You can just check here for dataListTag and cast directly to an
HTMLDataListElement:
742 if (element && element->isHTMLElement() &&
element->hasTagName(datalistTag))
1743 return static_cast<HTMLElement*>(element)
Not required but slightly cleaner.
isEmpty() checks null:
697 m_hasNonEmptyList = !attr->isNull() && !attr->isEmpty();
This sseems like the long way around:
bool hadNonEmptyList = m_hasNonEmptyList;
697 m_hasNonEmptyList = !attr->isNull() && !attr->isEmpty();
698 if (hadNonEmptyList != m_hasNonEmptyList && attached()) {
699 // Re-create a renderer because m_hasNonEmptyList affects UI.
700 detach();
701 attach();
702 }
Do you really need to attach/detach every time? Can't you do a layout or a
style recalc? What does the list do to the renderer?
list() clearly should return a HTMLDataListElement*, or? Otherwise you
certainly shouldn't be blindly casting to one in callers of list()
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list