Commit bb2428bc authored by mifenton@rim.com's avatar mifenton@rim.com

[BlackBerry] Add additional datalist support.

https://bugs.webkit.org/show_bug.cgi?id=114883

Reviewed by Rob Buis.

PR 210083.

Source/WebCore:

Extend support for datalist to include all non-popup input types.

Re-enabling fast/forms/datalist/input-list

Internally Reviewed by Otto Cheung.

* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore::RenderThemeBlackBerry::supportsDataListUI):

Source/WebKit/blackberry:

Properly set state when opening a Date/Time popup and simplify
the logic for showing datalist options.

Internally Reviewed by Otto Cheung.

* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::openDatePopup):
(BlackBerry::WebKit::InputHandler::showTextInputTypeSuggestionBox):

LayoutTests:

Fix results for fast/forms/datalist/input-list.

Internally Reviewed by Otto Cheung.

* platform/blackberry/fast/forms/datalist/input-list-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148879 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 066219f9
2013-04-22 Mike Fenton <mifenton@rim.com>
[BlackBerry] Add additional datalist support.
https://bugs.webkit.org/show_bug.cgi?id=114883
Reviewed by Rob Buis.
PR 210083.
Fix results for fast/forms/datalist/input-list.
Internally Reviewed by Otto Cheung.
* platform/blackberry/fast/forms/datalist/input-list-expected.txt: Added.
2013-04-22 Andrei Bucur <abucur@adobe.com>
[CSS Regions] Add tests for lists and counters
Test for the list attribute.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS input.list is null
PASS input.list is null
PASS input.list is null
PASS datalist.className is "former"
PASS document.getElementById("text").list is document.getElementById("dl1")
PASS document.getElementById("search").list is document.getElementById("dl1")
PASS document.getElementById("url").list is document.getElementById("dl1")
PASS document.getElementById("telephone").list is document.getElementById("dl1")
PASS document.getElementById("email").list is document.getElementById("dl1")
FAIL document.getElementById("datetime").list should be [object HTMLDataListElement]. Was null.
FAIL document.getElementById("date").list should be [object HTMLDataListElement]. Was null.
FAIL document.getElementById("month").list should be [object HTMLDataListElement]. Was null.
FAIL document.getElementById("week").list should be [object HTMLDataListElement]. Was null.
FAIL document.getElementById("time").list should be [object HTMLDataListElement]. Was null.
FAIL document.getElementById("datetime-local").list should be [object HTMLDataListElement]. Was null.
PASS document.getElementById("number").list is document.getElementById("dl1")
PASS document.getElementById("range").list is document.getElementById("dl1")
FAIL document.getElementById("color").list should be [object HTMLDataListElement]. Was null.
PASS document.getElementById("hidden").list is null
PASS document.getElementById("password").list is null
PASS document.getElementById("checkbox").list is null
PASS document.getElementById("radio").list is null
PASS document.getElementById("file").list is null
PASS document.getElementById("submit").list is null
PASS document.getElementById("image").list is null
PASS document.getElementById("reset").list is null
PASS document.getElementById("button").list is null
PASS successfullyParsed is true
TEST COMPLETE
2013-04-22 Mike Fenton <mifenton@rim.com>
[BlackBerry] Add additional datalist support.
https://bugs.webkit.org/show_bug.cgi?id=114883
Reviewed by Rob Buis.
PR 210083.
Extend support for datalist to include all non-popup input types.
Re-enabling fast/forms/datalist/input-list
Internally Reviewed by Otto Cheung.
* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore::RenderThemeBlackBerry::supportsDataListUI):
2013-04-22 Alberto Garcia <agarcia@igalia.com>
[BlackBerry] Add dummy implementations of DragData::droppedFileSystemId()
......@@ -1090,8 +1090,14 @@ Color RenderThemeBlackBerry::platformInactiveTextSearchHighlightColor() const
bool RenderThemeBlackBerry::supportsDataListUI(const AtomicString& type) const
{
// TODO: support other input types in the future.
return type == InputTypeNames::text();
#if ENABLE(DATALIST_ELEMENT)
// We support all non-popup driven types.
return type == InputTypeNames::text() || type == InputTypeNames::search() || type == InputTypeNames::url()
|| type == InputTypeNames::telephone() || type == InputTypeNames::email() || type == InputTypeNames::number()
|| type == InputTypeNames::range();
#else
return false;
#endif
}
#if ENABLE(DATALIST_ELEMENT)
......
2013-04-22 Mike Fenton <mifenton@rim.com>
[BlackBerry] Add additional datalist support.
https://bugs.webkit.org/show_bug.cgi?id=114883
Reviewed by Rob Buis.
PR 210083.
Properly set state when opening a Date/Time popup and simplify
the logic for showing datalist options.
Internally Reviewed by Otto Cheung.
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::openDatePopup):
(BlackBerry::WebKit::InputHandler::showTextInputTypeSuggestionBox):
2013-04-19 Andy Chen <andchen@blackberry.com>
[BlackBerry] Find-on-page should do the scoping again when highlight policy changed
......
......@@ -1203,6 +1203,9 @@ bool InputHandler::openDatePopup(HTMLInputElement* element, BlackBerryInputType
if (isActiveTextEdit())
clearCurrentFocusElement();
m_currentFocusElement = element;
m_currentFocusElementType = TextPopup;
switch (type) {
case BlackBerry::Platform::InputTypeDate:
case BlackBerry::Platform::InputTypeTime:
......@@ -2611,10 +2614,10 @@ void InputHandler::restoreViewState()
void InputHandler::showTextInputTypeSuggestionBox(bool allowEmptyPrefix)
{
HTMLInputElement* focusedInputElement = static_cast<HTMLInputElement*>(m_currentFocusElement->toInputElement());
if (!focusedInputElement || !focusedInputElement->isTextField())
if (!isActiveTextEdit())
return;
HTMLInputElement* focusedInputElement = static_cast<HTMLInputElement*>(m_currentFocusElement->toInputElement());
if (!focusedInputElement)
return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment