[BlackBerry] Crash due to an assert running test editing/execCommand/indent-paragraphs.html
https://bugs.webkit.org/show_bug.cgi?id=114944

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-05-16
Reviewed by Rob Buis.

It crashes in network platform code when trying to save an
invalid URL in the disk cache. That test contains references to
empty URLs like http://. Those empty URLs, are parsed as http:/ by
KURL and considered valid. BlackBerry network platform uses GURL
which considers those URLs invalid. We needed to check that the
URLs are valid for our platform before starting the network
operation.

Fixes a crash running test
editing/execCommand/indent-paragraphs.html.

* platform/network/blackberry/NetworkManager.cpp:
(WebCore::NetworkManager::startJob): Check if the request URL is
valid from the platform point of view right after creating the
platform network request and return early if the URL is invalid
with StatusErrorInvalidUrl error.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150224 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WebSocket] Update pywebsocket to r760
https://bugs.webkit.org/show_bug.cgi?id=115863

Patch by Lamarque V. Souza <Lamarque.Souza@basyskom.com> on 2013-05-16
Reviewed by Alexey Proskuryakov.

Tools:

Version r760 supports a newer draft of message compression.
We need this update to finish the permessage compression patch in
bug 98840. This patch also fixes failing unit tests after the update.

* Scripts/webkitpy/thirdparty/mod_pywebsocket/_stream_base.py:
(StreamBase._read):
(StreamBase._read.of):
(StreamBase._write):
(StreamBase.receive_bytes):
(StreamBase._read_until):
* Scripts/webkitpy/thirdparty/mod_pywebsocket/_stream_hybi.py:
(parse_frame):
(StreamOptions.__init__):
(Stream.__init__):
(Stream._receive_frame_as_frame_object):
(Stream._get_message_from_frame):
(Stream._process_close_message):
(Stream.close_connection):
(Stream.get_last_received_opcode):
* Scripts/webkitpy/thirdparty/mod_pywebsocket/common.py:
* Scripts/webkitpy/thirdparty/mod_pywebsocket/dispatch.py:
(Dispatcher.do_extra_handshake):
(Dispatcher.transfer_data):
* Scripts/webkitpy/thirdparty/mod_pywebsocket/extensions.py:
(ExtensionProcessorInterface.__init__):
(ExtensionProcessorInterface.request):
(ExtensionProcessorInterface):
(ExtensionProcessorInterface.name):
(ExtensionProcessorInterface.check_consistency_with_other_processors):
(ExtensionProcessorInterface.set_active):
(ExtensionProcessorInterface.is_active):
(ExtensionProcessorInterface._get_extension_response_internal):
(ExtensionProcessorInterface.get_extension_response):
(ExtensionProcessorInterface._setup_stream_options_internal):
(ExtensionProcessorInterface.setup_stream_options):
(_log_outgoing_compression_ratio):
(_log_incoming_compression_ratio):
(_parse_window_bits):
(_AverageRatioCalculator):
(_AverageRatioCalculator.__init__):
(_AverageRatioCalculator.add_original_bytes):
(_AverageRatioCalculator.add_result_bytes):
(_AverageRatioCalculator.get_average_ratio):
(DeflateFrameExtensionProcessor):
(DeflateFrameExtensionProcessor.__init__):
(DeflateFrameExtensionProcessor._get_extension_response_internal):
(DeflateFrameExtensionProcessor._setup_stream_options_internal):
(DeflateFrameExtensionProcessor._outgoing_filter):
(DeflateFrameExtensionProcessor._incoming_filter):
(CompressionExtensionProcessorBase.for):
(CompressionExtensionProcessorBase.__init__):
(CompressionExtensionProcessorBase._get_extension_response_internal):
(CompressionExtensionProcessorBase._setup_stream_options_internal):
(PerFrameCompressExtensionProcessor):
(PerMessageDeflateExtensionProcessor):
(PerMessageDeflateExtensionProcessor.__init__):
(PerMessageDeflateExtensionProcessor._get_extension_response_internal):
(PerMessageDeflateExtensionProcessor._setup_stream_options_internal):
(PerMessageDeflateExtensionProcessor.set_c2s_max_window_bits):
(PerMessageDeflateExtensionProcessor.set_c2s_max_window_bits.adds):
(PerMessageDeflateExtensionProcessor.set_c2s_no_context_takeover):
(PerMessageDeflateExtensionProcessor.set_c2s_no_context_takeover.adds):
(PerMessageDeflateExtensionProcessor.set_bfinal):
(PerMessageDeflateExtensionProcessor.enable_outgoing_compression):
(PerMessageDeflateExtensionProcessor.disable_outgoing_compression):
(_PerMessageDeflateFramer):
(_PerMessageDeflateFramer.__init__):
(_PerMessageDeflateFramer.set_compress_outgoing_enabled):
(_PerMessageDeflateFramer._process_incoming_message):
(_PerMessageDeflateFramer._process_outgoing_message):
(_PerMessageDeflateFramer.setup_stream_options):
(_PerMessageDeflateFramer.setup_stream_options._OutgoingMessageFilter):
(_PerMessageDeflateFramer.setup_stream_options._OutgoingMessageFilter.__init__):
(_PerMessageDeflateFramer.setup_stream_options._OutgoingMessageFilter.filter):
(_PerMessageDeflateFramer.setup_stream_options._IncomingMessageFilter):
(_PerMessageDeflateFramer.setup_stream_options._IncomingMessageFilter.__init__):
(_PerMessageDeflateFramer.setup_stream_options._IncomingMessageFilter.decompress_next_message):
(_PerMessageDeflateFramer.setup_stream_options._IncomingMessageFilter.filter):
(_PerMessageDeflateFramer.setup_stream_options._OutgoingFrameFilter):
(_PerMessageDeflateFramer.setup_stream_options._OutgoingFrameFilter.__init__):
(_PerMessageDeflateFramer.setup_stream_options._OutgoingFrameFilter.set_compression_bit):
(_PerMessageDeflateFramer.setup_stream_options._OutgoingFrameFilter.filter):
(_PerMessageDeflateFramer.setup_stream_options._IncomingFrameFilter):
(_PerMessageDeflateFramer.setup_stream_options._IncomingFrameFilter.__init__):
(_PerMessageDeflateFramer.setup_stream_options._IncomingFrameFilter.filter):
(PerMessageCompressExtensionProcessor):
(PerMessageCompressExtensionProcessor._lookup_compression_processor):
(MuxExtensionProcessor.__init__):
(MuxExtensionProcessor.check_consistency_with_other_processors):
(MuxExtensionProcessor):
(MuxExtensionProcessor._get_extension_response_internal):
(MuxExtensionProcessor._setup_stream_options_internal):
(MuxExtensionProcessor.set_quota):
(MuxExtensionProcessor.quota):
(MuxExtensionProcessor.set_extensions):
(MuxExtensionProcessor.extensions):
(is_compression_extension):
* Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/_base.py:
(validate_subprotocol):
(parse_host_header):
(format_header):
(check_request_line):
* Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/hybi.py:
(Handshaker.do_handshake):
(Handshaker._create_handshake_response):
* Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/hybi00.py:
(_validate_subprotocol):
(_check_header_lines):
(_build_location):
(Handshaker.do_handshake):
(Handshaker._set_subprotocol):
(Handshaker._set_location):
* Scripts/webkitpy/thirdparty/mod_pywebsocket/headerparserhandler.py:
(_create_dispatcher):
(headerparserhandler):
* Scripts/webkitpy/thirdparty/mod_pywebsocket/mux.py:
(_create_add_channel_response):
(_create_drop_channel):
(_create_flow_control):
(_create_new_channel_slot):
(_create_fallback_new_channel_slot):
(_MuxFramePayloadParser._read_number):
(_MuxFramePayloadParser._read_size_and_contents):
(_MuxFramePayloadParser._read_flow_control):
(_MuxFramePayloadParser._read_new_channel_slot):
(_LogicalConnection.__init__):
(_LogicalConnection.write):
(_LogicalConnection.on_write_data_done):
(_LogicalConnection):
(_LogicalConnection.on_writer_done):
(_InnerMessage):
(_InnerMessage.__init__):
(_InnerMessageBuilder):
(_InnerMessageBuilder.that):
(_InnerMessageBuilder.__init__):
(_InnerMessageBuilder._handle_first):
(_InnerMessageBuilder._process_first_fragmented_control):
(_InnerMessageBuilder._process_first_fragmented_message):
(_InnerMessageBuilder._handle_fragmented_control):
(_InnerMessageBuilder._reassemble_fragmented_control):
(_InnerMessageBuilder._handle_fragmented_message):
(_InnerMessageBuilder._reassemble_fragmented_message):
(_InnerMessageBuilder.build):
(_LogicalStream.__init__):
(_LogicalStream._create_inner_frame):
(_LogicalStream._write_inner_frame):
(_LogicalStream.replenish_send_quota):
(_LogicalStream.send_message):
(_LogicalStream._receive_frame):
(_LogicalStream._get_message_from_frame):
(_LogicalStream.stop_sending):
(_PhysicalConnectionWriter.__init__):
(_PhysicalConnectionWriter._write_data):
(_PhysicalConnectionWriter.run):
(_PhysicalConnectionWriter.stop):
(_Worker.run):
(_MuxHandshaker.__init__):
(_MuxHandshaker._create_stream):
(_MuxHandshaker._create_handshake_response):
(_HandshakeDeltaBase.create_headers):
(_MuxHandler.start):
(_MuxHandler.wait_until_done):
(_MuxHandler.notify_write_data_done):
(_MuxHandler._process_drop_channel):
(_MuxHandler._process_logical_frame):
(_MuxHandler.notify_reader_done):
(_MuxHandler):
(_MuxHandler.notify_writer_done):
(_MuxHandler.fail_physical_connection):
(_MuxHandler.fail_logical_channel):
(use_mux):
* Scripts/webkitpy/thirdparty/mod_pywebsocket/standalone.py:
(_StandaloneRequest.get_uri):
(_StandaloneRequest.get_unparsed_uri):
(_StandaloneRequest):
(_StandaloneRequest.is_https):
(_import_ssl):
(_import_pyopenssl):
(_StandaloneSSLConnection.for):
(_StandaloneSSLConnection):
(_StandaloneSSLConnection.__getattribute__):
(_StandaloneSSLConnection.__setattr__):
(_StandaloneSSLConnection.makefile):
(_StandaloneSSLConnection.shutdown):
(_StandaloneSSLConnection.recv):
(WebSocketServer.__init__):
(WebSocketServer._create_sockets):
(WebSocketServer.handle_error):
(WebSocketServer.get_request):
(WebSocketServer.get_request.default_callback):
(WebSocketRequestHandler.parse_request):
(_build_option_parser):
(_main):
(_main.if):
* Scripts/webkitpy/thirdparty/mod_pywebsocket/util.py:
(RepeatedXorMasker.__init__):
(RepeatedXorMasker._mask_using_swig):
(RepeatedXorMasker):
(RepeatedXorMasker._mask_using_array):
(_Deflater.compress_and_finish):
(_RFC1979Deflater.filter):
(DeflateSocket.send):

LayoutTests:

Fix failing tests.

* http/tests/websocket/tests/handler_map.txt:
* http/tests/websocket/tests/hybi/echo-host_wsh.py: Copied from LayoutTests/http/tests/websocket/tests/hybi/echo-location_wsh.py.
(web_socket_do_extra_handshake):
(web_socket_transfer_data):
* http/tests/websocket/tests/hybi/echo-path_wsh.py: Renamed from LayoutTests/http/tests/websocket/tests/hybi/echo-location_wsh.py.
(web_socket_do_extra_handshake):
(web_socket_transfer_data):
* http/tests/websocket/tests/hybi/url-no-trailing-slash-expected.txt:
* http/tests/websocket/tests/hybi/url-no-trailing-slash.html:
* http/tests/websocket/tests/hybi/url-with-credential-expected.txt:
* http/tests/websocket/tests/hybi/url-with-credential.html:
* http/tests/websocket/tests/hybi/url-with-empty-query-expected.txt:
* http/tests/websocket/tests/hybi/url-with-empty-query.html:
* http/tests/websocket/tests/hybi/url-with-query-expected.txt:
* http/tests/websocket/tests/hybi/url-with-query.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150225 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Make Ewk_Context_Menu Ewk_Object
https://bugs.webkit.org/show_bug.cgi?id=116097

Patch by Michał Pakuła vel Rutka <m.pakula@samsung.com> on 2013-05-16
Reviewed by Gyuyoung Kim.

Changed Ewk_Context_Menu to be an Ewk_Object so pointer to menu
object can be shared between different modules.

* UIProcess/API/efl/EwkView.cpp:
(EwkView::showContextMenu):
* UIProcess/API/efl/EwkView.h:
(EwkView):
* UIProcess/API/efl/ewk_context_menu.cpp:
(EwkContextMenu::appendItem):
(EwkContextMenu::removeItem):
(ewk_context_menu_new):
(ewk_context_menu_new_with_items):
(ewk_context_menu_item_append):
(ewk_context_menu_item_remove):
(ewk_context_menu_hide):
(ewk_context_menu_items_get):
(ewk_context_menu_item_select):
* UIProcess/API/efl/ewk_context_menu_item.cpp:
(EwkContextMenuItem::EwkContextMenuItem):
(ewk_context_menu_item_new_with_submenu):
* UIProcess/API/efl/ewk_context_menu_item_private.h:
(EwkContextMenuItem):
* UIProcess/API/efl/ewk_context_menu_private.h:
(EwkContextMenu):
(EwkContextMenu::create):
* UIProcess/API/efl/ewk_defines.h:

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