The current code calls as_slice() on the Option, yielding &[DOMString], and
then calls to_string, yielding "[prefix]".
Source-Repo: https://github.com/servo/servo
Source-Revision: 76cc006a40d7242e64c6c12f033127c569914e31
The semantics of has_attribute aren't anywhere close to the ones expected for
Element#hasAttribute, and it fails an assertion when passed non-lower-case
names.
Source-Repo: https://github.com/servo/servo
Source-Revision: b27ec2b2231313055232bf9a55343d581e6ead98
This fixes issue #3630
A short summary of the changes:
* Use atomic generation id to cancel inflight requests
* Handles nested calls to abort, open, send inside handlers
* Adds XHRReleaseMsg to delay freeing XHR object till all
inflight events are processed
* Handles both timeout, errors and abort/open in a symmetric fashion
i.e All inflight events will be cancelled for timeouts, aborts,
errors and on calling open.
* Change the ErroredMsg enum to be more symmetric with the returned
Error enum
I noticed a few possible changes that could make the code for fetch task simpler:
* We can remove the additional timer task and let the fetch task manage
its own timer (or maybe the resource loader can do this.)
* The CORS related steps could also be moved into the resource loader.
* Right now upload events are not support. This requires some support
from resource loader.
Source-Repo: https://github.com/servo/servo
Source-Revision: 4e24e4d8e92528a5a6f7bb571c6557b5bca11ea9
Rust doesn't handle integers as bool on if statements, and defineProperty signature uses *mut instead of *const.
Source-Repo: https://github.com/servo/servo
Source-Revision: c4cfb4aae0491ca8016d3cbae9a39a6488b24739
This is a grab bag of various microoptimizations for script that I came across when profiling our performance on RoboHornet.
r? @jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 69f8b46f362a828ffaefe9623355bc1ad76dc5e0
Instead of looking at the display tree, have ContentBox(es)Query consult
the flow tree. This allow optimizing away parts of the display tree
later. To do this we need to be more careful about how we send reflow
requests, only querying the flow tree when possible.
Fixes#3790.
Source-Repo: https://github.com/servo/servo
Source-Revision: c9089c45c4b7d40419233b48a192d85a8ad71c99
Fixes#3855.
I'm not sure if this is the right place to set `cancelable`. If changing the default value in `Event::new_inherited` is not satisfactory, it will be possible to set the `Cell`'s value to `false` in `Event::new` itself.
Source-Repo: https://github.com/servo/servo
Source-Revision: 9b2dae58fd21d1abab825de299161a2b36106076
Remove ```notify_attribute_{changed,removed}``` in favor of a unified ```notify_content_changed```. In the future, whether we decide to specialize ```document.content_changed()```, it'll be just a matter of adding a param.
Source-Repo: https://github.com/servo/servo
Source-Revision: 4ce185ff11e03c541587177d7e99c9d6bcf0eb82
format!("{}", atom) yields strings like "Atom('span' type=Inline)", which is
not intended here.
Source-Repo: https://github.com/servo/servo
Source-Revision: 7de9ed5fc7a3061676d9fd02dfc788e196c7123c
This function is not particular to the parser, so should live in the DOM.
Source-Repo: https://github.com/servo/servo
Source-Revision: 2c6859937354760f2d175c60bad1daa16bd2ed22
Fixes#3356. This makes script elements fetch their source synchronously and execute immediately by default. It also lays some groundwork for future deferred or async script loading.
(Depends on #3716 to fix a content test failure caused by running script during parsing.)
Source-Repo: https://github.com/servo/servo
Source-Revision: 272ae0cc1beb83c839d5fbd746e67f4ae746db99
We have created parser trait and declared parse_chunk function in this trait. We are yet to implement this parse_chunk for ServoHTMLParser struct.
Source-Repo: https://github.com/servo/servo
Source-Revision: 5858fccf873ce30896def4f58aa8c67d1ddd09f1
During debugging, I found it useful to hook all task creation in a
central location, and util::task was the perfect place for it.
r? @pcwalton (or maybe someone else, I'm kinda sending you a bunch of
reviews today because I don't know who better to give them to)
Source-Repo: https://github.com/servo/servo
Source-Revision: ff06be91ebe770290ba912ee71a303810aa62cea
...itor after the initial parse. Fixes#1720. Fixes#3738.
r? @Ms2ger or @Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: 2df236376a443d8d031ee7a72379f336f2cd8cc4
```JSRef<Attr>``` does not require allocating a ```DOMString``` for value, which are unused in most cases. It also provides more access to ```Attr``` data.
Source-Repo: https://github.com/servo/servo
Source-Revision: 590a93120a26ab6ea787831d7ba08c47423148bc
#3050
Altough LayoutDataRef is touched from layout, we don't use DOMRefCell in it becasuse
it's expected to manipulate in layout task.
Source-Repo: https://github.com/servo/servo
Source-Revision: f5e8df9dac9330f2818906c471ed05f5975828c6
This also tackles some nearby FIXMEs. `traverse_preorder` is used in a LOT of
DOM functions..
r? @pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: 2bc4ffe5cf331fb7bd246af34c5d12e4e03adda9
This corrects and improves the dom/bindings/DESIGN.md document and also
corrects a grammatical error in a tests/reftest.rs message.
Source-Repo: https://github.com/servo/servo
Source-Revision: 65856dd00a7da07ece8d3e1e63bc495943266a24
r? @Ms2ger, @jdm
The parser is now a JS-managed object and we use hooks in html5ever to trace its internal state. This should be memory-safe even if arbitrary JavaScript can run during a parse. Please let me know if you think of a reason it wouldn't be!
I think the likely outcome of a garbage collection during parsing is a dynamic `RefCell` borrow failure, but I'm going to look into that after this lands. It should be safe to trace the parser while it's mutably borrowed, as long as it's not shared between threads, so we can probably switch to `UnsafeCell`.
Source-Repo: https://github.com/servo/servo
Source-Revision: 8d3b107568ab965b518b8003b702a5db993fa7d0
This appears to be a more sensible location for them.
Relevant to #433.
Source-Repo: https://github.com/servo/servo
Source-Revision: 5be4f40bef05c749bdb5353541abae21a826f6b6
`Node.unsafe_get_flags()` returns `*const NodeFlags`, but `NodeFlags` has only `u8` length.
So We should just returns a raw value instead of any pointers.
Source-Repo: https://github.com/servo/servo
Source-Revision: 84b2fe54b9a4f1b04531600492be1b27d3915e05
This fixes#3248.
r? @jdm. Please review for mistakes mercilessly! Also, I got a host of test failures when running the worker tests, not sure if these tests are expected to pass locally or not.
Source-Repo: https://github.com/servo/servo
Source-Revision: a6001329b8186ca655d8c09c29e5167782ad43cb
The tracing setup has ensured that the cycles can be collected for a long time
now.
Source-Repo: https://github.com/servo/servo
Source-Revision: d54fb041ba80350d1ea0fb342d6edb273d30ccf3
This field became unused in commit 99a36cbeb6077976861d94b7af16e9e57994a14d.
Source-Repo: https://github.com/servo/servo
Source-Revision: 08b10a6d7de548304225a8a9c19e3280a8ecbfeb
Replace the manual checks and calls to transmute_copy in /layout/wrapper.rs with calls to to_js/
Fixes#3616
Source-Repo: https://github.com/servo/servo
Source-Revision: f1c050531f3e3669275f1fc50d92724609eba59b
This also hides the not-yet-working parts of incremental reflow behind a runtime
flag. As I get the failing reftests passing, I'll send pull requests for them one
by one.
Source-Repo: https://github.com/servo/servo
Source-Revision: 56989b8dec4aa95a3b484d45f15b23f9b3daaf13
This implements a general framework for legacy presentational attributes
to the DOM and style calculation, so that adding more of them later will
be straightforward.
Source-Repo: https://github.com/servo/servo
Source-Revision: 0aeecfc41d5f0c637960fcddf87cc2db3e5efeea
75% improvement in style recalc for Guardians of the Galaxy.
Source-Repo: https://github.com/servo/servo
Source-Revision: 8077edc0622b04aeb26d42ced86ea285c9cac0e7
This should fix the most frequent intermittent wpt failure.
Source-Repo: https://github.com/servo/servo
Source-Revision: 083bf27b7536a8ae825ce87df4344f9e3cbc1a10
This PR removes public fields from all (hope I didn't miss any) DOM structs. Should |Page| be privatized as well? This PR additionally introduces a #[privatize] lint to ensure nobody accidentally re-introduces a public field.
All changesets compile separately if applied in the same order. Hope that helps reviewing but I can of course squash them before merging.
Source-Repo: https://github.com/servo/servo
Source-Revision: f350879574194bb612eac88e21d0920e9827afa7