Title: [98557] trunk/Source/WebCore
- Revision
- 98557
- Author
- [email protected]
- Date
- 2011-10-27 06:02:42 -0700 (Thu, 27 Oct 2011)
Log Message
Fix the build if NO_LISTBOX_RENDERING is enabled
https://bugs.webkit.org/show_bug.cgi?id=71009
Reviewed by Kenneth Rohde Christiansen.
If NO_LISTBOX_RENDERING is enabled RenderMenuList::listBoxSelectItem uses the
HTMLSelectElement::listBoxSelectItem function which was accidentally removed in r97533.
Reintroduce HTMLSelectElement::listBoxSelectItem with a NO_LISTBOX_RENDERING guard to unbreak this setup.
This is covered by:
Source/WebCore/manual-tests/no-listbox-rendering.html
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::listBoxSelectItem): Reintroduce.
* html/HTMLSelectElement.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (98556 => 98557)
--- trunk/Source/WebCore/ChangeLog 2011-10-27 12:52:16 UTC (rev 98556)
+++ trunk/Source/WebCore/ChangeLog 2011-10-27 13:02:42 UTC (rev 98557)
@@ -1,3 +1,21 @@
+2011-10-27 Andras Becsi <[email protected]>
+
+ Fix the build if NO_LISTBOX_RENDERING is enabled
+ https://bugs.webkit.org/show_bug.cgi?id=71009
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ If NO_LISTBOX_RENDERING is enabled RenderMenuList::listBoxSelectItem uses the
+ HTMLSelectElement::listBoxSelectItem function which was accidentally removed in r97533.
+ Reintroduce HTMLSelectElement::listBoxSelectItem with a NO_LISTBOX_RENDERING guard to unbreak this setup.
+
+ This is covered by:
+ Source/WebCore/manual-tests/no-listbox-rendering.html
+
+ * html/HTMLSelectElement.cpp:
+ (WebCore::HTMLSelectElement::listBoxSelectItem): Reintroduce.
+ * html/HTMLSelectElement.h:
+
2011-10-27 Shinya Kawanaka <[email protected]>
Implement legacy text check emulation in unified text check interface.
Modified: trunk/Source/WebCore/html/HTMLSelectElement.cpp (98556 => 98557)
--- trunk/Source/WebCore/html/HTMLSelectElement.cpp 2011-10-27 12:52:16 UTC (rev 98556)
+++ trunk/Source/WebCore/html/HTMLSelectElement.cpp 2011-10-27 13:02:42 UTC (rev 98557)
@@ -167,6 +167,20 @@
return firstSelectionIndex < 0 || (!firstSelectionIndex && hasPlaceholderLabelOption());
}
+#if ENABLE(NO_LISTBOX_RENDERING)
+void HTMLSelectElement::listBoxSelectItem(int listIndex, bool allowMultiplySelections, bool shift, bool fireOnChangeNow)
+{
+ if (!multiple())
+ setSelectedIndexByUser(listToOptionIndex(listIndex), true, fireOnChangeNow);
+ else {
+ updateSelectedState(listIndex, allowMultiplySelections, shift);
+ setNeedsValidityCheck();
+ if (fireOnChangeNow)
+ listBoxOnChange();
+ }
+}
+#endif
+
int HTMLSelectElement::activeSelectionStartListIndex() const
{
if (m_activeSelectionAnchorIndex >= 0)
Modified: trunk/Source/WebCore/html/HTMLSelectElement.h (98556 => 98557)
--- trunk/Source/WebCore/html/HTMLSelectElement.h 2011-10-27 12:52:16 UTC (rev 98556)
+++ trunk/Source/WebCore/html/HTMLSelectElement.h 2011-10-27 13:02:42 UTC (rev 98557)
@@ -87,6 +87,10 @@
void scrollToSelection();
+#if ENABLE(NO_LISTBOX_RENDERING)
+ void listBoxSelectItem(int listIndex, bool allowMultiplySelections, bool shift, bool fireOnChangeNow = true);
+#endif
+
bool canSelectAll() const;
void selectAll();
int listToOptionIndex(int listIndex) const;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes