aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/websocket.rs
Commit message (Collapse)AuthorAgeFilesLines
...
| * Fixes #8213: Implement Blob variant of WebSocket.send()Nikki2015-11-041-28/+72
| |
* | Make DOMString a newtype around String, rather than a typedef.Ms2ger2015-11-041-8/+7
| | | | | | | | | | | | | | | | | | | | This should make it somewhat easier to experiment with alternative representations in the future. To reduce churn, this commit leaves the String field public, though. Also, this will allow us to use the default String type to represent the IDL USVString type, which explicitly forbids unpaired surrogates, ans as such is a better match to the Rust String type.
* | Get rid of a bunch of explicit derefsDavid Zbarsky2015-11-031-1/+1
| |
* | merge from masterrohan.prinja2015-11-031-3/+3
|\ \
| * | Remove JSTraceable implementation from RefCell.Eli Friedman2015-11-021-3/+3
| |/ | | | | | | | | The implementation wasn't really right, and we would rather just use DOMRefCell anyway.
* | rearrange imports to be in alphabetical orderrohan.prinja2015-10-301-2/+1
| |
* | more refactoringrohan.prinja2015-10-301-1/+2
| |
* | move Castable into dom::bindings::inheritancerohan.prinja2015-10-301-1/+2
|/
* Clean up the cast callsAnthony Ramine2015-10-211-8/+4
|
* Introduce trait CastableAnthony Ramine2015-10-211-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This trait is used to hold onto the downcast and upcast functions of all castable IDL interfaces. A castable IDL interface is one which either derives from or is derived by other interfaces. The deriving relation is represented by implementations of marker trait DerivedFrom<T: Castable> generated in InheritTypes. /^[ ]*use dom::bindings::codegen::InheritTypes::.*(Base|Cast|Derived)/ { /::[a-zA-Z]+(Base|Cast|Derived);/d s/([{ ])[a-zA-Z]+(Base|Cast|Derived), /\1/g s/([{ ])[a-zA-Z]+(Base|Cast|Derived), /\1/g s/, [a-zA-Z]+(Base|Cast|Derived)([},])/\2/g s/, [a-zA-Z]+(Base|Cast|Derived)([},])/\2/g /\{([a-zA-Z]+(Base|Cast|Derived))?\};$/d s/\{([a-zA-Z_]+)\};$/\1;/ } s/([a-zA-Z]+)Cast::from_ref\(\&?\**([a-zA-Z_]+)(\.r\(\))?\)/\2.upcast::<\1>()/g s/([a-zA-Z]+)Cast::from_ref\(\&?\**([a-zA-Z_]+)(\.[a-zA-Z_]+\(\))?\)/\2\3.upcast::<\1>()/g s/\(([a-zA-Z]+)Cast::from_ref\)/\(Castable::upcast::<\1>\)/g s/([a-zA-Z]+)Cast::from_root/Root::upcast::<\1>/g s/([a-zA-Z]+)Cast::from_layout_js\(\&([a-zA-Z_.]+)\)/\2.upcast::<\1>()/g s/([a-zA-Z]+)Cast::to_ref\(\&?\**([a-zA-Z_]+)(\.r\(\))?\)/\2.downcast::<\1>()/g s/([a-zA-Z]+)Cast::to_ref\(\&?\**([a-zA-Z_]+)(\.[a-zA-Z_]+\(\))?\)/\2\3.downcast::<\1>()/g s/\(([a-zA-Z]+)Cast::to_ref\)/\(Castable::downcast::<\1>\)/g s/([a-zA-Z]+)Cast::to_root/Root::downcast::<\1>/g s/([a-zA-Z]+)Cast::to_layout_js\(&?([a-zA-Z_.]+(\(\))?)\)/\2.downcast::<\1>()/g s/\.is_document\(\)/.is::<Document>()/g s/\.is_htmlanchorelement\(\)/.is::<HTMLAnchorElement>()/g s/\.is_htmlappletelement\(\)/.is::<HTMLAppletElement>()/g s/\.is_htmlareaelement\(\)/.is::<HTMLAreaElement>()/g s/\.is_htmlbodyelement\(\)/.is::<HTMLBodyElement>()/g s/\.is_htmlembedelement\(\)/.is::<HTMLEmbedElement>()/g s/\.is_htmlfieldsetelement\(\)/.is::<HTMLFieldSetElement>()/g s/\.is_htmlformelement\(\)/.is::<HTMLFormElement>()/g s/\.is_htmlframesetelement\(\)/.is::<HTMLFrameSetElement>()/g s/\.is_htmlhtmlelement\(\)/.is::<HTMLHtmlElement>()/g s/\.is_htmlimageelement\(\)/.is::<HTMLImageElement>()/g s/\.is_htmllegendelement\(\)/.is::<HTMLLegendElement>()/g s/\.is_htmloptgroupelement\(\)/.is::<HTMLOptGroupElement>()/g s/\.is_htmloptionelement\(\)/.is::<HTMLOptionElement>()/g s/\.is_htmlscriptelement\(\)/.is::<HTMLScriptElement>()/g s/\.is_htmltabledatacellelement\(\)/.is::<HTMLTableDataCellElement>()/g s/\.is_htmltableheadercellelement\(\)/.is::<HTMLTableHeaderCellElement>()/g s/\.is_htmltablerowelement\(\)/.is::<HTMLTableRowElement>()/g s/\.is_htmltablesectionelement\(\)/.is::<HTMLTableSectionElement>()/g s/\.is_htmltitleelement\(\)/.is::<HTMLTitleElement>()/g
* Adds bufferedAmount to Websocket (fixes #7856).Jim Berlage2015-10-151-2/+43
|
* Auto merge of #7871 - psdh:sendReason, r=jdmbors-servo2015-10-131-1/+4
|\ | | | | | | | | | | | | | | | | | | Send reason in the Websocket close handshake Fixes #7862 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7871) <!-- Reviewable:end -->
| * Send reason in the Websocket close handshakePrabhjyot Singh Sodhi2015-10-051-1/+4
| |
* | Auto merge of #7885 - jimberlage:7858/null-message, r=Ms2gerbors-servo2015-10-091-2/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Creates empty string when passed null This should fix #7858. An empty `USVString` is now used when `data` is `None`. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7885) <!-- Reviewable:end -->
| * | Require the argument to WebSocket#send() (fixes #7858).Jim Berlage2015-10-081-2/+2
| | |
* | | make blacklist as const arrayvectorijk2015-10-061-65/+65
| | |
* | | Fix #7855 Implement port blockingvectorijk2015-10-061-0/+69
| | | | | | | | | | | | For WebSocket connection algorithm
* | | Refactor Error enum usage to consistently be qualifiedAnthony Urena2015-10-061-4/+3
|/ /
* / remove data field from websocketsRoman Klauke2015-10-051-2/+0
|/ | | | | | | The data field is currently not used (no reads/ writes). This commit removes this field. Ref.-Issue: #7859
* fixed the 'as_slice' deprecated warningRavi Shankar2015-09-261-3/+4
|
* sorted the extern crate, mod & use declarationsRavi Shankar2015-09-241-7/+6
|
* Fix reported test-tidy errors for unmerged import blocksBrandon Fairchild2015-09-191-12/+9
| | | | This merges import blocks that were reported by tidy as unmerged.
* Move EventTargetTypeId/NodeTypeId to DOMClassMichael Wu2015-09-121-2/+2
|
* Enforce linking to spec for method implementations via macrosCorey Farwell2015-08-311-0/+7
|
* Time distribution across script event categories.benshu2015-08-281-4/+5
|
* Make the traits for the IDL interfaces take &selfAnthony Ramine2015-08-271-7/+7
|
* Remove helper traitsAnthony Ramine2015-08-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that JSRef<T> is gone, there is no need to have helper traits. On components/script/*.rs: # Remove imports. /^ *use dom::[a-z]+::\{.*Helpers/ { s/\{(Raw[^L]|[^L][^a])[a-zA-Z]+Helpers, /\{/ s/, (Raw[^L]|[^L][^a])[a-zA-Z]+Helpers([,}])/\2/g s/\{([a-zA-Z]+)\}/\1/ /\{\}/d s/::self;$/;/ } /^ *use dom::[a-z]+::\{?(Raw[^L]|[^L][^a])[a-zA-Z]+Helpers\}?;$/d On components/script/dom/*.rs: # Ignore layout things. /^(pub )?(impl|trait).*Layout.* \{/,/^}$/ { P; D; } # Delete helpers traits. /^(pub )?trait ([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? \{$/,/^\}$/D # Patch private helpers. /^impl.*Private.*Helpers/,/^\}$/ { s/^impl<'a> Private([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? for &'a ([^ ]+) \{$/impl \3 {/ /^ *(unsafe )?fn .*\(self.*[<&]'a/ { s/&'a /\&/g s/<'a, /</g } /^ *(unsafe )?fn /s/\(self([,)])/\(\&self\1/ } # Patch public helpers. /^impl.*Helpers/,/^\}$/ { s/^impl(<'a>)? ([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? for (&'a )?([^ ]+) \{$/impl \5 {/ /^ *(unsafe )?fn .*\(self.*[<&]'a/ { s/&'a /\&/g s/<'a, /</g } /^ *(unsafe )?fn .*\(&?self[,)]/s/(unsafe )?fn/pub &/ /^ *pub (unsafe )?fn /s/\(self([,)])/\(\&self\1/ } The few error cases were then fixed by hand.
* make dom_struct derive HeapSizeOf,João Oliveira2015-08-271-1/+0
| | | | closes #7357
* sort all usesJohann Tuffe2015-08-201-9/+9
|
* Cleanup WebGLRenderingContext, Websocker, WorkerGlobalScopeManish Goregaokar2015-08-181-1/+1
|
* Fix existing syntactics nits.Josh Matthews2015-08-161-1/+1
|
* Auto merge of #7214 - tomjakubowski:websocket-binaryType, r=Ms2gerbors-servo2015-08-151-3/+33
|\ | | | | | | | | | | | | | | | | | | Implement WebSocket#binaryType Closes #7098 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7214) <!-- Reviewable:end -->
| * WebSocket: Implement WebSocket#binaryTypeTom Jakubowski2015-08-151-3/+33
| |
* | Splitting ScriptMsg into various enums; r=jdmRavi Shankar2015-08-151-6/+5
| |
* | Measure heap memory usage for more types. Fixes #6951Bogdan Cuza2015-08-131-1/+4
|/
* Implement WebSocket#onmessage.Ms2ger2015-08-081-0/+1
|
* Dispatch message events for WebSocket.Ms2ger2015-08-071-13/+88
|
* Use hosts-replaced URL only when loading resourcesJames Graham2015-08-051-7/+20
|
* Add spec linksBogdan Cuza2015-07-281-0/+4
|
* Move the WebSocket constructor logic out of WebSocket::new.Ms2ger2015-07-231-15/+11
|
* Spawn a thread for WebSocket messages.Ms2ger2015-07-221-44/+35
|
* Set the WebSocket's Sender from the ConnectionEstablishedTask.Ms2ger2015-07-221-2/+4
| | | | | | | | This needs to happen off a task because we won't be able to access the WebSocket object directly once this code moves to a background thread. There is no behaviour change, because we make sure that self.ready_state is not Connecting in Send().
* Remove the receiver field from WebSocket.Ms2ger2015-07-221-5/+1
| | | | | The receiver will be used from another thread than the WebSocket object in the future.
* Split up WebSocketTaskHandler.Ms2ger2015-07-221-37/+17
| | | | | There's no real reason to have internal dynamic dispatch inside a trait object.
* Reject websocket protocol requests that don't match ↵Josh Matthews2015-07-221-3/+29
| | | | https://tools.ietf.org/html/rfc6455#section-4.1 .
* Don't try to send a message in WebSocket#close if the sender isn't present.Ms2ger2015-07-161-1/+3
|
* Handle Send correctly if readyState is not Open.Ms2ger2015-07-161-2/+9
|
* Remove WebSocket::sendCloseFrame.Ms2ger2015-07-161-17/+11
| | | | | | It is a field that is used a function argument. Given that the control flow is not quite the same, and we can't add an argument to Send, I opted for a separate function.
* Remove parse_web_socket_url in favour of functions in rust-websocket.Ms2ger2015-07-151-44/+6
|
* Throw an InvalidStateError from WebSocket#send when it is called too early.Ms2ger2015-07-141-1/+5
|