Commit graph

59 commits

Author SHA1 Message Date
Glenn Watson
e265b6b15b Remove unused subpage field from page 2015-03-11 14:13:30 +10:00
Josh Matthews
c816975750 Documentation and cleanup. 2015-03-03 16:25:40 -05:00
Josh Matthews
e2c4f5ed67 Move everything unrelated to the frame tree out of Page and into Document or Window. Reduce the API surface of Page to a bare minimum to allow for easier future removal. 2015-03-03 16:25:40 -05:00
Josh Matthews
d9f04180a5 Split page load into separate network and parsing stages. Delay Page creation until the load is finished. Make session history traversal simply activate existing pipelines, rather than potentially loading them from the network. 2015-03-03 16:25:40 -05:00
Glenn Watson
451512aa29 Fixes a number of issues with setting hover state, and simplifies the code.
Specifically:
 - Use inclusive_ancestors instead of ancestors, to detect hover on elements like divs.
 - Send the mousemove event after all the hover states have been set correctly.
 - Correctly handle removing hover state from elements when mouse is not over any elements.
 - Correctly detect when a reflow is required (previous code failed in several edge cases).
2015-02-19 09:39:11 +10:00
Ms2ger
a7154e1305 Use if-let in join_layout. 2015-02-12 23:56:38 +01:00
Ms2ger
79914e560f Cleanup join_layout a little bit. 2015-02-12 22:42:06 +01:00
Ms2ger
a09a912178 Import net as net rather than servo_net. 2015-02-10 12:55:24 +01:00
Ms2ger
b2fcc2397e Import msg as msg rather than servo_msg. 2015-02-10 11:40:36 +01:00
Sagar Muchhal
6699738cae Add console message support to devtools. Does not actually cause logging to occur in the remote console. 2015-02-05 21:44:07 +00:00
Sagar Muchhal
5345edf51e Add flag to send live updates to devtools. 2015-02-05 19:26:59 +00:00
Alexandru Cojocaru
685fee02a0 add unwrap to send/recv calls 2015-02-03 16:05:13 +01:00
Diego Marcos
7b9c902a0a Adds borrow_for_script_deallocation and unsafe_mut_js_info method to avoid 'DOMRefCell already mutably borrowed' messages. This is just a temporary fix until the Rust standard library allows borrowing already-borrowed RefCell values during unwinding.
It also removes LiveDOMReferences destructor that it's a no-op but it contains an assert that was being violated causing an endless cycle of destructor calls ending up in a stack overflow.
2015-01-30 12:07:53 -08:00
Ms2ger
bfddd1ec53 Replace the 'GlobalStaticData' free function by a 'new' static member function. 2015-01-29 18:27:31 +01:00
Ms2ger
505159a464 Import the util crate as util rather than servo_util.
This used to conflict with the util crate from the standard library, which
has long since been removed.

The import in layout has not been changed because of a conflict with the
util mod there.
2015-01-29 12:16:41 +01:00
Josh Matthews
95fc29fa0d Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev. 2015-01-28 10:16:49 +10:00
Ms2ger
1dad710063 Replace Root::deref() calls by Root::r() calls where possible.
This changes those calls that were already sound.
2015-01-01 20:36:43 +01:00
Tetsuharu OHZEKI
a7bb436177 script: Remove glob imports added in #4405 2014-12-19 04:52:48 +09:00
Ms2ger
466faac2a5 Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d. 2014-12-17 15:19:45 -05:00
Patrick Walton
d101c1dd91 script: Improve dirty propagation and fix script-layout synchronization.
This fixes race conditions whereby layout and script could be running
simultaneously.
2014-12-15 14:16:04 -08:00
Ms2ger
949e7918e0 Reindent in should_move_clip_rect. 2014-12-11 11:26:33 +01:00
Ms2ger
205b4e3f39 Avoid some Option::unwrap calls in page.rs. 2014-12-11 11:26:23 +01:00
Patrick Walton
8b2aadc30b ports/cef: Implement accelerated compositing for the CEF port. 2014-12-10 08:35:47 -08:00
Ms2ger
8fe798d439 Cleanup PageIterator::next. 2014-12-10 16:24:13 +01:00
Ms2ger
adc493ccce Remove comment that hasn't been true since Document became a Node.
The panic was removed in 99a36cbeb6.
2014-12-10 16:24:13 +01:00
Ms2ger
6fa39497b8 Cleanup Page::remove. 2014-12-10 16:24:12 +01:00
Tamir Duberstein
b916974f78 should_move_clip_rect is a bare function
`self` is never used, so there's no need for this to be a method.
Fixes #4261.
2014-12-05 20:11:02 -08:00
nkdalmia
f6fb9f862d Implement Window.sessionStorage: Storage Task, Storage Methods (excluding Storage event, QuotaExceededError) 2014-12-03 18:31:50 -05:00
Ms2ger
86d609abaf Use RefCell in DOMRefCell to reduce duplicated code. 2014-11-14 21:18:43 +01:00
Jack Moffitt
d1b433a3b3 Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
Martin Robinson
c7327450ef Clip display list based on frame viewport
Instead of creating a display list for the entire page, only create one
for an area that expands around the viewport. On my machine this makes
incremental layout of http://timecube.com 50% faster.
2014-11-11 08:46:16 -08:00
Patrick Walton
10f7b49cf7 Invert control flow, fix resizing, and improve checkerboarding
significantly by giving tiles some time to paint before we render
unrendered content.
2014-11-04 13:51:56 -08:00
Martin Robinson
2d72f00ccf Have ContentBox(es)Queries consult the flow tree
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.
2014-11-03 10:30:28 -08:00
Tetsuharu OHZEKI
f1c840de64 Use DOMRefCell for Page. 2014-10-22 10:01:01 +09:00
Tim Taubert
da7590d108 Privatize Window 2014-10-13 13:25:44 +02:00
Clark Gaebel
d12c6e7383 Incremental Style Recalc
This patch puts in the initial framework for incremental reflow. Nodes' styles
are no longer recalculated unless the node has changed.

I've been hacking on the general problem of incremental reflow for the past
couple weeks, and I've yet to get a full implementation that actually passes all
the reftests + wikipedia + cnn. Therefore, I'm going to try to land the different
parts of it one by one.

This patch only does incremental style recalc, without incremental flow
construction, inline-size bubbling, reflow, or display lists. Those will be coming
in that order as I finish them.

At least with this strategy, I can land a working version of incremental reflow,
even if not yet complete.

r? @pcwalton
2014-10-09 12:55:21 -04:00
Tim Taubert
35f8270c64 Remove unnecessary deref()s (fixes #3586) 2014-10-09 15:01:54 +02:00
Manish Goregaokar
707a2870fa Remove Traceable/Untraceable from page.rs 2014-10-05 22:53:50 +05:30
Manish Goregaokar
22567762a0 Remove Traceable/Untraceable from window.rs 2014-10-05 22:39:24 +05:30
Ms2ger
7508ca94b3 Remove the fragment_node field from Page (fixes #3543).
Since Page isn't reflected, it cannot be rooted, and pointers to JS-managed
objects inside it are not guaranteed to be traced. This may cause the pointer
to become dangling.
2014-10-02 15:31:26 +02:00
Ms2ger
5d335fd524 Move find_fragment_node to Document. 2014-10-02 12:04:05 +02:00
Josh Matthews
54fcab61d6 Implement MutNullableJS for mutable, nullable member pointers to DOM objects. 2014-10-01 17:06:23 +02:00
Keegan McAllister
d50114c41d Use string-cache's Namespace type 2014-09-29 21:40:54 -07:00
Manish Goregaokar
6f6a62e967 Address review comments 2014-09-24 19:35:41 +05:30
Manish Goregaokar
cc44a3b064 Use JSTraceable everywhere 2014-09-24 05:44:49 +05:30
Keegan McAllister
dc86e83654 Eliminate warnings 2014-09-20 13:00:55 -07:00
Keegan McAllister
a640a7c5c3 Upgrade to rustc 0.12.0-pre (4d2af3861 2014-09-17 15:51:11 +0000) 2014-09-20 13:00:06 -07:00
Cameron Zwarich
4fa8725111 First steps of &JSRef -> JSRef conversion
Replace &JSRef with JSRef in the bulk of the generated code. This will
remove a level of indirection throughout all DOM code.

This patch doesn't change methods implemented on JSRef<T> to take `self`
rather than `&self`, and it leaves a few other uses of &JSRef, but those
changes can be made incrementally.
2014-09-19 13:39:17 -07:00
Clark Gaebel
1b251db732 Merge pull request #3379 from cgaebel/bucketed-timing
Added more complex profiling metadata.
2014-09-18 09:12:34 -07:00
Josh Matthews
9607b468bc Revert "script: Use atom comparison in more places, especially for attributes." for persistent test failures.
This reverts commit 874db26104.
2014-09-18 09:20:19 -04:00