[Chromium] Improve SocketStreamHandle::send() stability
https://bugs.webkit.org/show_bug.cgi?id=98459

Reviewed by Yuta Kitamura.

Avoid null dereference in SocketStreamHandleInternal::send().
No changes in behavior.

* src/SocketStreamHandle.cpp:
(WebCore::SocketStreamHandleInternal::send):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130468 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<input> size attribute should throw INDEX_SIZE_ERR when set to 0
https://bugs.webkit.org/show_bug.cgi?id=61675

Patch by Kunihiko Sakamoto <ksakamoto@chromium.org> on 2012-10-04
Reviewed by Kent Tamura.

Source/WebCore:

According to the spec, the size IDL attribute of input elements is limited
to only non-negative numbers greater than zero. It should throw INDEX_SIZE_ERR
exception when set to 0. New behavior matches both Firefox and IE.
Spec: http://www.w3.org/TR/html5/common-input-element-attributes.html#the-size-attribute

Test: fast/dom/HTMLInputElement/input-size-attribute.html

* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setSize):
* html/HTMLInputElement.h:
(HTMLInputElement):
* html/HTMLInputElement.idl:

LayoutTests:

Added test case to verify that input.size throws INDEX_SIZE_ERR when set to 0.

Updated fast/forms/number/number-size.html to reflect new behavior.

* fast/dom/HTMLInputElement/input-size-attribute-expected.txt:
* fast/dom/HTMLInputElement/input-size-attribute.html:
* fast/forms/number/number-size.html:
* fast/forms/number/number-size-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130469 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] ewk_web_error_free is not a public API
https://bugs.webkit.org/show_bug.cgi?id=98482

Reviewed by Gyuyoung Kim.

Because Ewk_Web_Error is just passed as a parameter of callback function
and maintained internally, ewk_web_error_free should not be a public API.

This patch moves ewk_web_error_free from public header to private header.

* UIProcess/API/efl/ewk_context_download_client.cpp:
* UIProcess/API/efl/ewk_view_loader_client.cpp:
* UIProcess/API/efl/ewk_view_resource_load_client.cpp:
* UIProcess/API/efl/ewk_web_error.cpp:
* UIProcess/API/efl/ewk_web_error.h:
* UIProcess/API/efl/ewk_web_error_private.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130470 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WebSocket] ExtensionParser should have its own file
https://bugs.webkit.org/show_bug.cgi?id=98475

Reviewed by Yuta Kitamura.

Source/WebCore:

Factor out ExtensionParser from WebSocketExtensionDispatcher and rename it as WebSocketExtensionParser.
WebSocketExtensionParser has its own file.

No changes in behavior. Added a test case for parsing Sec-WebSocket-Extensions field as a chromium unit test.

* CMakeLists.txt: Added WebSocketExtensionParser.
* GNUmakefile.list.am: Ditto.
* Modules/websockets/WebSocketExtensionDispatcher.cpp:
(WebCore::WebSocketExtensionDispatcher::processHeaderValue):
Use WebSocketExtensionParser::parseExtension() to parser extension header value.
* Modules/websockets/WebSocketExtensionParser.cpp: Added.
(WebCore):
(WebCore::WebSocketExtensionParser::finished): Moved from ExtensionParser.
(WebCore::WebSocketExtensionParser::parsedSuccessfully): Ditto.
(WebCore::isSeparator): Ditto.
(WebCore::WebSocketExtensionParser::skipSpaces): Ditto.
(WebCore::WebSocketExtensionParser::consumeToken): Ditto.
(WebCore::WebSocketExtensionParser::consumeQuotedString): Ditto.
(WebCore::WebSocketExtensionParser::consumeQuotedStringOrToken): Ditto.
(WebCore::WebSocketExtensionParser::consumeCharacter): Ditto.
(WebCore::WebSocketExtensionParser::parseExtension): Moved from WebSocketExtensionDispatcher.
* Modules/websockets/WebSocketExtensionParser.h: Added.
(WebCore):
(WebSocketExtensionParser):
(WebCore::WebSocketExtensionParser::WebSocketExtensionParser):
(WebCore::WebSocketExtensionParser::currentToken):
* Target.pri: Added WebSocketExtensionParser.
* WebCore.gypi: Ditto.
* WebCore.vcproj/WebCore.vcproj: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.

Source/WebKit/chromium:

Add a test for parsing Sec-WebSocket-Extensions field.

* tests/WebSocketExtensionDispatcherTest.cpp:
(WebCore):
(WebCore::TEST_F):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130471 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Fix destination path when download with suggested filename on the Minibrowser
https://bugs.webkit.org/show_bug.cgi?id=98334

Patch by KyungTae Kim <ktf.kim@samsung.com> on 2012-10-04
Reviewed by Gyuyoung Kim.

Add callback functions for download requests to Minibrowser to set the destination path for download.
Set the destination path with suggested file name as (destination folder) + (suggested file name).
The 'destination folder' should be a specific folder user selected, but is set to '/tmp' for now.

Additionally, for printing out the download status,
use the info macro and set the verbose variable to 1 to enable it.

* MiniBrowser/efl/main.c:
(on_download_request):
(on_download_finished):
(on_download_failed):
(browserCreate):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130472 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Fix window resizing / moving in WK1 and WKTR
https://bugs.webkit.org/show_bug.cgi?id=98486

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-10-05
Reviewed by Gyuyoung Kim.

Source/WebKit/efl:

Fix ChromeClientEfl::windowRect() code to use
ecore_evas_request_geometry_get() instead of
evas_object_geometry_get() and therefore avoid
returning incorrect values when the engine has
not processed a call to ecore_evas_move_resize()
yet. This fixes a couple of layout tests.

The code was also refactored a bit for
consistency with the WebKit2 EFL implementation.

* WebCoreSupport/ChromeClientEfl.cpp:
(WebCore::ChromeClientEfl::windowRect):
(WebCore::ChromeClientEfl::setWindowRect):

Tools:

Fix PlatformWebView::windowFrame() and
PlatformWebView::setWindowFrame() in EFL's WKTR so
that it resizes / moves the window, not the view.

The new code matches the implementation in EwkView's
UIClient.

* WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
(WTR::PlatformWebView::windowFrame):
(WTR::PlatformWebView::setWindowFrame):

LayoutTests:

Unskip 2 window resizing / moving tests now that
the implementation for those has been fixed in
WebKit1 EFL.

* platform/efl-wk1/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130473 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Gardening, skip some failing test.

Patch by Nandor Huszka <hnandor@inf.u-szeged.hu> on 2012-10-05
Reviewed by Csaba Osztrogonác.

* platform/qt-5.0-wk2/TestExpectations:
* platform/qt/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2][WTR] Unskip parser-tests-110.html test case.
https://bugs.webkit.org/show_bug.cgi?id=98484

Unreviewed EFL gardening.

fast/encoding/parser-tests-110.html test case has been passed consistently.

Patch by Kangil Han <kangil.han@samsung.com> on 2012-10-05

* platform/efl-wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130475 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Improve spelling and performance of Localizer.cpp
https://bugs.webkit.org/show_bug.cgi?id=98485

Reviewed by Kentaro Hara.

Some improvements pointed in webkit.org/b/98229#c5.

No new tests because of no behavior change.

* platform/text/Localizer.h:
(Localizer):
 - Rename dateTimeFormatWithSecond to dateTimeFormatWithSeconds
 - Rename dateTimeFormatWithoutSecond to dateTimeFormatWithoutSeconds
 - Add data members: m_dateTimeFormatWithSeconds and m_dateTimeFormatWithoutSeconds.
* platform/text/Localizer.cpp:
(WebCore::Localizer::timeFormat): Check isNull instead of isEmpty
(WebCore::Localizer::shortTimeFormat): Ditto.
(WebCore::Localizer::dateTimeFormatWithSeconds):
- Renamed.
- Cache the concatenation result to a data member.
(WebCore::Localizer::dateTimeFormatWithoutSeconds): Ditto.

* html/DateTimeInputType.cpp:
(WebCore::DateTimeInputType::setupLayoutParameters): Follow the renaming.
* html/DateTimeLocalInputType.cpp:
(WebCore::DateTimeLocalInputType::setupLayoutParameters): Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130476 268f45cc-cd09-0410-ab3c-d52691b4dbfc