[WebSocket]The minimal number of bytes MUST be used to encode the length
https://bugs.webkit.org/show_bug.cgi?id=81443

Patch by Li Yin <li.yin@intel.com> on 2012-03-22
Reviewed by Kent Tamura.

Source/WebCore:

From RFC 6455 http://tools.ietf.org/html/rfc6455#section-5.2
the minimal number of bytes MUST be used to encode the length

New test case : http/tests/websocket/tests/hybi/invalid-encode-length.html

* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::parseFrame):

LayoutTests:

* http/tests/websocket/tests/hybi/invalid-encode-length-expected.txt: Added.
* http/tests/websocket/tests/hybi/invalid-encode-length.html: Added.
* http/tests/websocket/tests/hybi/invalid-encode-length_wsh.py: Added.
(web_socket_do_extra_handshake):
(web_socket_transfer_data):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111828 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: A client MUST close a connection if it detects a masked frame
https://bugs.webkit.org/show_bug.cgi?id=81361

Patch by Li Yin <li.yin@intel.com> on 2012-03-22
Reviewed by Kent Tamura.

A server must not mask any frames that it sends to the client.
Change the test case, not mask the frames from server to client.

Test: http/tests/websocket/tests/hybi/invalid-masked-frames-from-server.html

* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::processFrame):

LayoutTests: [WebSocket]A client must close a connection if it detects a masked frame
https://bugs.webkit.org/show_bug.cgi?id=81361

Patch by Li Yin <li.yin@intel.com> on 2012-03-22
Reviewed by Kent Tamura.

* http/tests/websocket/tests/hybi/invalid-masked-frames-from-server-expected.txt: Added.
* http/tests/websocket/tests/hybi/invalid-masked-frames-from-server.html: Added.
* http/tests/websocket/tests/hybi/invalid-masked-frames-from-server_wsh.py: Added.
* http/tests/websocket/tests/hybi/unmasked-frames-expected.txt: Renamed from LayoutTests/http/tests/websocket/tests/hybi/masked-frames-expected.txt.
* http/tests/websocket/tests/hybi/unmasked-frames.html: Renamed from LayoutTests/http/tests/websocket/tests/hybi/masked-frames.html.
* http/tests/websocket/tests/hybi/unmasked-frames_wsh.py: Renamed from LayoutTests/http/tests/websocket/tests/hybi/masked-frames_wsh.py.
(web_socket_do_extra_handshake):
(web_socket_transfer_data):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111829 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Forms][CSS] The option element should not match pseudo class :valid
https://bugs.webkit.org/show_bug.cgi?id=80088

Patch by Yoshifumi Inoue <yosin@chromium.org> on 2012-03-22
Reviewed by Kent Tamura.

This patch added an assertion for checking the "option" element
doesn't match to CSS pseudo class "valid". This behavior was fixed
by r111659.

* fast/css/pseudo-valid-unapplied-expected.txt:
* fast/css/pseudo-valid-unapplied.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111830 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Added Mac WebKit2 expected results for this test. The fact that it is failing is tracked by
<http://webkit.org/b/82020>.

* platform/mac-wk2/plugins/netscape-dom-access-and-reload-expected.txt: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111831 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move Notifications APIs from DOMWindow.idl to DOMWindowNotifications.idl (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=82015

Reviewed by Kentaro Hara.

This patch moves DOMWindow.webkitNotifications from DOMWindow.idl to
DOMWindowNotificiations.idl in preparation for moving notificiations
into Modules.

A future patch will remove DOMWindow::resetNotificaitions in favor of
more general mechanisms.

* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* notifications/DOMWindowNotifications.cpp: Added.
(WebCore):
(WebCore::DOMWindowNotifications::DOMWindowNotifications):
(WebCore::DOMWindowNotifications::~DOMWindowNotifications):
(WebCore::DOMWindowNotifications::from):
(WebCore::DOMWindowNotifications::webkitNotifications):
(WebCore::DOMWindowNotifications::reset):
(WebCore::DOMWindowNotifications::supplementName):
* notifications/DOMWindowNotifications.h: Added.
(WebCore):
(DOMWindowNotifications):
* notifications/DOMWindowNotifications.idl: Added.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::~DOMWindow):
(WebCore):
(WebCore::DOMWindow::resetNotifications):
* page/DOMWindow.h:
(WebCore):
(DOMWindow):
* page/DOMWindow.idl:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111832 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Added fast/events/remove-target-with-shadow-in-drag.html to the Mac WebKit2 skip list, since
it relies on dragging using EventSender, which doesn’t work in WebKitTestRunner.
<http://webkit.org/b/68552> tracks this issue.

* platform/mac-wk2/Skipped:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111833 268f45cc-cd09-0410-ab3c-d52691b4dbfc
BitVector::resizeOutOfLine doesn't memset when converting an inline buffer
https://bugs.webkit.org/show_bug.cgi?id=82012

Reviewed by Filip Pizlo.

Initialize out-of-line buffers while extending an inline buffer. Also export symbols to be used in WebCore.

* wtf/BitVector.cpp:
(WTF::BitVector::resizeOutOfLine):
* wtf/BitVector.h:
(BitVector):
(OutOfLineBits):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111834 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][DRT] Implement LayoutTestController's methods related with editing.
https://bugs.webkit.org/show_bug.cgi?id=80136

Patch by Grzegorz Czajkowski <g.czajkowski@samsung.com> on 2012-03-23
Reviewed by Ryosuke Niwa.

Source/WebKit/efl:

Implements DumpRenderTreeSupportEfl's and EditorClientEfl's methods related with editing.

* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
(DumpRenderTreeSupportEfl::setSmartInsertDeleteEnabled): New function.
(DumpRenderTreeSupportEfl::setSelectTrailingWhitespaceEnabled): New function.
* WebCoreSupport/DumpRenderTreeSupportEfl.h:
* WebCoreSupport/EditorClientEfl.cpp:
(WebCore::EditorClientEfl::setSmartInsertDeleteEnabled): New function.
(WebCore):
(WebCore::EditorClientEfl::smartInsertDeleteEnabled): Add implementation.
(WebCore::EditorClientEfl::setSelectTrailingWhitespaceEnabled): New function.
(WebCore::EditorClientEfl::isSelectTrailingWhitespaceEnabled): Add implementation.
(WebCore::EditorClientEfl::EditorClientEfl):
* WebCoreSupport/EditorClientEfl.h:
(EditorClientEfl):

Tools:

Implements EFL's LayoutTestController methods e.i. setSmartInsertDeleteEnabled,
setSelectTrailingWhitespaceEnabled.

* DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
(LayoutTestController::setSmartInsertDeleteEnabled):
(LayoutTestController::setSelectTrailingWhitespaceEnabled):

LayoutTests:

Enables tests connected with setSelectTrailingWhitespaceEnabled and setSmartInsertDeleteEnabled.
Tests related with spelling can not be enabled in this patch because WebKit-Efl doesn't
support spell checking (missing TextCheckerClient implementation).

* platform/efl/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111835 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move Notifications APIs from DOMWindow.idl to DOMWindowNotifications.idl (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=82026

Reviewed by Kentaro Hara.

This patch removes DOMWindow::resetNotifications, which was unneeded
special-case logic for clearing the notifications center.  The previous
patch that tried to accomplish the same thing did not override
willDetachPage, which is why it caused crashes.

There's actually a cleaner way to handle these cases, which will let us
implement reconnectFrame, but that will need to wait for the next
patch.

* notifications/DOMWindowNotifications.cpp:
(WebCore::DOMWindowNotifications::DOMWindowNotifications):
(WebCore::DOMWindowNotifications::from):
(WebCore::DOMWindowNotifications::webkitNotifications):
(WebCore):
(WebCore::DOMWindowNotifications::disconnectFrame):
(WebCore::DOMWindowNotifications::willDetachPage):
(WebCore::DOMWindowNotifications::reset):
* notifications/DOMWindowNotifications.h:
(DOMWindowNotifications):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::willDetachPage):
(WebCore::DOMWindow::disconnectDOMWindowProperties):
(WebCore::DOMWindow::clearDOMWindowProperties):
* page/DOMWindow.h:
(DOMWindow):
* page/Frame.cpp:
(WebCore::Frame::willDetachPage):


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