Commit graph

411 commits

Author SHA1 Message Date
Ronak Nisher
cbed366bea added ErrorEvent WebIDL and errorevent.rs 2014-12-04 21:22:15 -08:00
Shanil Puri
72a5ae7210 Implemeneted ModifyAttribute handler to update DOM elements. 2014-12-03 18:58:44 -08:00
nkdalmia
f6fb9f862d Implement Window.sessionStorage: Storage Task, Storage Methods (excluding Storage event, QuotaExceededError) 2014-12-03 18:31:50 -05:00
Michael Booth
2cbf5a3671 Updated reflect_dom_object to be passed by value 2014-11-30 19:47:52 +00:00
aakashjain
fab09a5137 Fixes #4123 2014-11-29 15:06:17 +05:30
bors-servo
1ac79c64da auto merge of #4000 : t29/servo/mime-sniffing, r=jdm
Issue: #3144

This PR addresses the second step of the ticket. i.e. move from a 1:1 sniffer:request task model to a shared sniffer task.
2014-11-28 10:51:44 -07:00
Kshitij Parajuli
f5e9ae17cf Shared Sniffer Task
- Added TargetedLoadResponse and ResponseSenders
- LoadData constructor contains the next consumer which means
  SnifferManager doesn't need the next consumer to start
- New SnifferTask is created at new resource_task creation
- Update Unit Tests
2014-11-28 12:35:49 -05:00
bors-servo
2d904f7080 auto merge of #4132 : jtuchsen/servo/issue-4131, r=jdm
A slight refactor.
2014-11-28 10:27:43 -07:00
bors-servo
82050d1e53 auto merge of #4130 : saneyuki/servo/cast, r=Manishearth
Fix #4124

This also introduce `BarCast::from_actual()` which is used for up-cast for dom's actual data types (non JS pointer values).
2014-11-28 09:24:44 -07:00
bors-servo
12ae541302 auto merge of #4129 : aakashjain/servo/HTMLElement#hidden, r=Manishearth 2014-11-28 05:33:48 -07:00
aakashjain
5a30bd00cb Implemented hidden, removed corresponding passed tests 2014-11-28 17:39:30 +05:30
Jesse Tuchsen
db885f04ee Fixes #4131
A slight refactor.
2014-11-27 15:16:09 -08:00
Tetsuharu OHZEKI
1305ac4dd0 Remove Element.node(). 2014-11-28 06:05:45 +09:00
Tetsuharu OHZEKI
d53ce7f8d2 Remove Node.eventtarget(). 2014-11-28 06:02:21 +09:00
Tetsuharu OHZEKI
106b7a3924 Remove HTMLElement.element(). 2014-11-28 06:02:03 +09:00
Tetsuharu OHZEKI
2502c692f3 Remove UIEvent.event(). 2014-11-28 06:01:43 +09:00
Tetsuharu OHZEKI
3681628936 Make callers of ${Derived}::${base}() use casts instead. 2014-11-28 06:00:23 +09:00
Jesse Tuchsen
b664ee88e7 Fixes #3962
Bad HTTP responses now have a 0 status code instead of 200 OK.
2014-11-27 11:55:31 -08:00
bors-servo
184a3346ab auto merge of #4113 : payload/servo/issue-4110, r=jdm
The attribute `value` and the underlying model `TextInput` are not connected to each other, so I just pulled the value out of `TextInput`.
2014-11-26 16:15:38 -07:00
Gilbert Röhrbein
b3f9c8667c fixes #4110, can input text without 'value' attribute present 2014-11-26 23:39:10 +01:00
Hinali Marfatia
b1d6041420 Implement a basic WebSocket interface. 2014-11-25 15:43:22 +01:00
Ms2ger
449aaec5c2 Panic if DOMTokenList#contains is called for an unparsed attribute.
Previously, if the attribute was not parsed into a token list, and the
tokens() method returned None, DOMTokenList#contains would silently return
false. This issue was encountered in
<https://github.com/servo/servo/pull/4076> and took quite some time to
figure out.
2014-11-24 11:11:05 +01:00
bors-servo
6e19955129 auto merge of #4081 : achals/servo/master, r=jdm
https://github.com/servo/servo/issues/3994
2014-11-24 02:03:34 -07:00
Achal Shah
23ed1f705b Implement HTML{Anchor,Area,Link}Element.relList.
https://github.com/servo/servo/issues/3994
2014-11-23 23:37:13 -08:00
bors-servo
60dfb65ab2 auto merge of #4068 : Manishearth/servo/atomify, r=jdm 2014-11-23 22:00:40 -07:00
bors-servo
90007ee781 auto merge of #4064 : trevorriles/servo/isintervalenum, r=jdm
Created an `IsInterval` enum to improve readability and remove the need for `true // is_interval`

I'm still fairly new to rust. I briefly looked for a way to implement boolean comparisons of the enum but didn't figure out a way. 

Also I'm not attached to any of the names. Let me know what I can fix :)
2014-11-23 21:36:37 -07:00
Manish Goregaokar
534919327d Use atom! in place of Atom::from_slice where necessary 2014-11-23 22:03:27 +05:30
Rohan Prinja
4b754bd457 implement Document#createAttribute 2014-11-23 14:51:04 +05:30
Trevor Riles
0cba3eec62 remove comments now that we have more descriptive names 2014-11-21 15:12:52 -06:00
Trevor Riles
89f1949913 Use an enum to set set_timeout_or_interval's is_interval field. Fixes #4059 2014-11-21 15:10:27 -06:00
Matthew Rasmus
73721cd189 Implement Attr#nodeValue
Fixes #4047
2014-11-20 13:18:10 -08:00
Achal Shah
712b3d0f5b Stop including the element during Element.getElementsByClassName.
https://github.com/servo/servo/issues/3995
2014-11-18 07:20:07 -08:00
bors-servo
efb4fe4a4a auto merge of #4027 : znewman01/servo/issue4010, r=Ms2ger
Fixes #4010.

This is my first Servo contribution, so let me know if I missed anything!
2014-11-18 07:54:33 -07:00
bors-servo
929671f945 auto merge of #4029 : znewman01/servo/issue4009, r=Ms2ger
Fixes #4009.

Only lower-case the argument to Document#createElement if it's a HTML document.
2014-11-18 07:15:34 -07:00
Zachary Newman
2399a1449d Implement DOMImplementation.hasFeature
Fixes #4010.
2014-11-18 09:00:45 -05:00
Claes 'Letharion' Gyllensvärd
d84c0fc52a Lower case the type attribute before checking if it's JS 2014-11-18 08:39:59 +01:00
Zachary Newman
a8ce3e3366 Update behavior of Document.createElement
Fixes #4009.

Only lower-case the argument to Document#createElement if it's a HTML document.
2014-11-17 21:21:46 -05:00
Rohan Prinja
aad124fce3 key[board]event args for Document#createEvent 2014-11-17 09:37:05 +05:30
Ms2ger
859f14f38b Correct the checks in step 5 of Node::pre_insert. 2014-11-16 12:40:42 +01:00
Mukilan Thiyagarajan
4b2b0d0723 Allow passing arguments to setTimeout/setInterval callbacks 2014-11-15 18:32:12 +05:30
Mukilan Thiyagarajan
05bd182538 Fix binding generation for Callback Functions and Callback Interfaces 2014-11-15 18:29:48 +05:30
Ms2ger
86d609abaf Use RefCell in DOMRefCell to reduce duplicated code. 2014-11-14 21:18:43 +01:00
Ms2ger
c0016c7438 Use Cell::as_unsafe_cell in Reflector::rootable. 2014-11-14 11:56:00 +01:00
bors-servo
85a2f0b66a auto merge of #3953 : neojski/servo/implement-HTMLIFrameElement.contentDocument, r=jdm
Because of #2122 I cannot write test for this right now because it will be failing randomly due to that iframe issue. However, if it doesn't fail due to that issue a test like this:

```html
<html>
  <head>
    <meta charset="utf8" />
    <script src="harness.js"></script>
    <title>Iframe contentDocument test.</title>
  </head>
  <body>
    <iframe src="test_iframe_contentDocument_inner.html" id="iframe"></iframe>
    <script>
      waitForExplicitFinish();

      var timeout = 100;
      var iframe = document.getElementById('iframe');
      function test_contentWindow() {
        if (!iframe.contentWindow) {
          // Iframe not loaded yet, try again.
          // No load event for iframe, insert bug number here.
          setTimeout(test_contentWindow, timeout);
          return;
        }
        is(iframe.contentDocument.getElementById('test').textContent, 'value');
        finish();
      }
      test_contentWindow();
    </script>
  </body>
</html>
```
where inner is simply:
```html
<html><body><div id="test">value</div></body></html>
```
passes.

I have added `SameOrigin` method to the `UrlHelper`. I wanted to reuse it in [`constellation.rs` same_script check](f0184a2d01/components/compositing/constellation.rs (L625)) but I it didn't want to compile saying

```
error: unresolved import `dom::urlhelper::UrlHelper`. Maybe a missing `extern crate dom`?
```

So I didn't include it in this PR for now.

There is more discussion about the cross origin iframes in [another issue](https://github.com/servo/servo/issues/3939). In this PR I just added same origin check.
2014-11-13 23:54:28 -07:00
Tomasz Kołodziejski
af30484f2a Add contentDocument support for HTMLIFrameElement. Fixes #3808. 2014-11-13 22:45:46 -08:00
Manish Goregaokar
cdddf6465c Remove unused arguments from LoadComplete and LoadCompleteMsg 2014-11-14 02:14:00 +05:30
Manish Goregaokar
d5f1bb2df5 Don't overwrite redirected URL in script_task (fixes #3970) 2014-11-14 02:10:04 +05:30
Josh Matthews
c23edf6f5a Short-circuit initFooEvent while dispatching events. 2014-11-13 12:53:54 -05:00
Keegan McAllister
642a3592c7 Fix interfaces test 2014-11-13 12:53:54 -05:00
Josh Matthews
89a27dd11a More documentation. 2014-11-13 12:53:54 -05:00