Commit graph

418 commits

Author SHA1 Message Date
Ravi Shankar
889eec364b sorted the extern crate, mod & use declarations 2015-09-24 02:12:45 +05:30
Brandon Fairchild
de3547e401 Fix reported test-tidy errors for unmerged import blocks
This merges import blocks that were reported by tidy as unmerged.
2015-09-19 12:50:14 -04:00
bors-servo
2879da54f9 Auto merge of #7645 - nox:omtc-types, r=Ms2ger
Introduce structs for compositing and script task constructors' arguments

Extracted from @pcwalton's #4271.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7645)
<!-- Reviewable:end -->
2015-09-16 10:41:10 -06:00
Anthony Ramine
a7738a5eef Introduce InitialScriptState 2015-09-16 18:38:24 +02:00
Ms2ger
b7a0440f91 Emit markers for all events, not just UI events. 2015-09-16 16:29:01 +02:00
bors-servo
ca36779a7e Auto merge of #7547 - connorimes:move_script_profiling, r=jdm
Combine script profiling with profile crates. Fixes #7514.

The script crate had its own built-in profiling which was basically doing the same thing as the profile crate.  This wraps the internal profiling around the main profile functionality.  Script-related tasks are now added to the ProfilerCategory enum.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7547)
<!-- Reviewable:end -->
2015-09-08 09:32:56 -06:00
Connor Imes
d746835344 Combine script profiling with profile crates. Fixes #7514. 2015-09-04 16:09:44 -05:00
Manish Goregaokar
e94df1ed5c Remove needless returns 2015-09-04 09:13:48 +05:30
bors-servo
eaf90c0b1c Auto merge of #7452 - nox:cleanup-attributes, r=nox
Introduce VirtualMethods::attribute_mutated()



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7452)
<!-- Reviewable:end -->
2015-09-02 08:14:33 -06:00
farodin91
f0987380dd Implement viewport functions for window #1718 2015-09-02 00:40:52 +02:00
Anthony Ramine
51418fc348 Replace many uses of Attr::Value() by Attr::value()
The later only borrows the attribute, without copying its value as a string.
2015-08-30 15:30:01 +02:00
Ms2ger
cf55d3191d Send the start and end half of a TimelineMarker to the devtools PullTimelineMarkers thread together. 2015-08-28 20:48:07 +02:00
benshu
1e6a2f08fc Time distribution across script event categories. 2015-08-28 00:52:41 +02:00
Anthony Ramine
2a028f66a2 Remove AttributeHandlers
On components/script/*.rs:

    # Remove imports.
    /^ *use dom::element::\{.*AttributeHandlers/ {
        s/\{AttributeHandlers, /\{/
        s/, AttributeHandlers//g
        s/\{([a-zA-Z]+)\}/\1/
        /\{\}/d
        s/::self;$/;/
    }
    /^ *use dom::element::\{?AttributeHandlers\}?;$/d

    # Remove AttributeHandlers.
    /^pub trait AttributeHandlers \{$/,/^\}$/D

    # Patch AttributeHandlers methods.
    /^impl<'a> AttributeHandlers for &'a Element \{/,/^\}$/ {
        s/^impl<'a> AttributeHandlers for &'a Element \{/impl Element {/
        /^ *fn /s/\(self([,)])/\(\&self\1/
	/^ *fn.*\(&self/s/fn/pub fn/
    }

The few error cases were then fixed by hand.
2015-08-27 16:59:04 +02:00
Anthony Ramine
c831c2c0a5 Remove helper traits
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.
2015-08-27 16:59:02 +02:00
Johann Tuffe
ec07178b6f sort all uses 2015-08-20 20:47:12 +08:00
bors-servo
70b9922eb0 Auto merge of #7260 - notriddle:issue_7169, r=Ms2ger
Navigate to a new page even when there's a fragment.

Closes #7169

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7260)
<!-- Reviewable:end -->
2015-08-19 01:40:28 -06:00
Michael Howell
af31e8ed0f Navigate to a new page even when there's a fragment.
Closes #7169
2015-08-18 17:35:09 -07:00
Manish Goregaokar
94cd004c28 Cleanup script_task 2015-08-18 18:35:47 +05:30
João Oliveira
067a22a868 Replace uses of for foo in bar.iter(),
and `for foo in bar.iter_mut(), and for foo in bar.into_iter()
(continuation of #7197)
2015-08-18 01:46:11 +01:00
Nicholas Nethercote
97e3b24aa6 Fix panics in the script_task memory reporter.
These are caused by page_root being empty.
2015-08-17 04:37:43 -07:00
Josh Matthews
8bb853f643 Fix existing syntactics nits. 2015-08-16 10:30:43 -04:00
vectorijk
270df6bac8 without the explicit dereferencing 2015-08-16 01:34:58 -07:00
vectorijk
7758f81ffd dereference via * instead of RefMut 2015-08-16 01:34:57 -07:00
vectorijk
14ac1ef75a remove ScriptListener
ref #7175
2015-08-16 01:34:55 -07:00
Ravi Shankar
89153116fb Splitting ScriptMsg into various enums; r=jdm 2015-08-15 02:00:48 +05:30
bors-servo
f3b7c5cb4b Auto merge of #7132 - jdm:docenum, r=ms2ger
Document the use and meaning of the devtools control messages. Fixes …

…#6922.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7132)
<!-- Reviewable:end -->
2015-08-13 12:41:48 -06:00
Ms2ger
f62e7be168 Merge the fragment handling into handle_navigate.
This is handled in the 'navigate' algorithm in the specification.
2015-08-12 20:03:18 +02:00
Ms2ger
41ac66112a Store a Sender<ConstellationControlMsg> in Window. 2015-08-12 15:34:41 +02:00
Ms2ger
c05f0906d5 Store a Sender<ConstellationControlMsg> in ScriptTask. 2015-08-12 15:25:31 +02:00
Josh Matthews
e59de75608 Simplify devtools frame marker notification. Record each frame tick based on a single message sent from the script task that ticked. 2015-08-12 00:59:58 -04:00
bors-servo
a5c7508fab Auto merge of #7009 - connorimes:remove-confusing-typedefs, r=Ms2ger
Remove typedefs DevtoolsControlChan and DevtoolsControlPort



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7009)
<!-- Reviewable:end -->
2015-08-07 14:41:37 -06:00
bors-servo
b4e30da3db Auto merge of #7003 - notriddle:master, r=Ms2ger
GC pause reporting

Closes #6968.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7003)
<!-- Reviewable:end -->
2015-08-07 06:14:12 -06:00
Michael Howell
7cb4d77c74 GC profiling.
* Closes #6968.

* Test case for GC profiling thanks to @jdm!
2015-08-06 09:45:11 -07:00
Ms2ger
bf3ecaa901 Create a run_with_memory_reporting method to reduce the boilerplate associated with registering memory reporters. 2015-08-06 15:24:27 +02:00
Connor Imes
8c3cf90e6e Remove typedefs DevtoolsControlChan and DevtoolsControlPort. Fixes #6923. 2015-08-05 13:30:25 -05:00
Ms2ger
d2077dd245 Update Animation Timing links and terminology to the HTML specification. 2015-08-05 09:21:08 +02:00
Josh Matthews
8620fe5995 Start reporting memory usage for Window and all nodes in all DOM trees for frame treese in script tasks. 2015-08-03 23:05:00 -04:00
Ravi Shankar
79b65402d7 Persuading devtools to communicate with the workers; r=jdm 2015-08-01 21:25:49 +05:30
Patrick Walton
61e3a9545e script: Fix test failures. 2015-07-31 15:03:39 -07:00
Patrick Walton
2aa5174246 script: Make the resource task communication use IPC channels. 2015-07-31 11:28:09 -07:00
Patrick Walton
44d13f7fd4 net: Use a thread for each AsyncResponseTarget to avoid having to send
trait objects across process boundaries.
2015-07-31 11:27:49 -07:00
Patrick Walton
9c9d7dc93b net: Make most of the resource task messages serializable. 2015-07-31 11:27:49 -07:00
bors-servo
4837dd9a1c Auto merge of #6850 - servo:rustup_2015-07-30, r=SimonSapin
Upgrade to rustc 1.3.0-dev (87055a68c 2015-07-30)

This builds and passes unit tests.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6850)
<!-- Reviewable:end -->
2015-07-30 14:46:13 -06:00
Bruno de Oliveira Abinader
b3927d5a2d Implement Msg::Status with serialized url upon mouseover
Credits for Mike Blumenkrantz (@zmike), I just rebased against trunk and
fixed the url serialization.

Fixes #6178.
2015-07-30 16:37:54 +03:00
bors-servo
12c46ddd61 Auto merge of #6841 - pcwalton:squash-animation-ticks, r=metajack
script: Squash duplicate animation tick events in the queue.

This prevents them from piling up endlessly if the JS
`requestAnimationFrame()` callback takes a long time to complete.

r? @jdm

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6841)
<!-- Reviewable:end -->
2015-07-30 00:04:17 -06:00
Patrick Walton
01e5c513a9 script: Squash duplicate animation tick events in the queue.
This prevents them from piling up endlessly if the JS
`requestAnimationFrame()` callback takes a long time to complete.
2015-07-29 17:32:21 -07:00
Nicholas Nethercote
187068e2ae Add a kind field to memory reports.
This is used for two memory reporting improvements.

- It's used to distinguish "explicit" memory reports from others. This
  mirrors the same categorization that is used in Firefox, and gives a single
  tree that's the best place to look. It replaces the "pages" tree which
  was always intended to be a temporary stand-in for "explicit".

- It's used to computed "heap-unclassified" values for both the jemalloc
  and system heaps, both of which are placed into the "explicit" tree.

Example output:
```
|  114.99 MiB -- explicit
|      52.34 MiB -- jemalloc-heap-unclassified
|      46.14 MiB -- system-heap-unclassified
|      14.95 MiB -- url(file:///home/njn/moz/servo2/../servo-static-suite/wikipe
dia/Guardians%20of%20the%20Galaxy%20(film)%20-%20Wikipedia,%20the%20free%20encyc
lopedia.html)
|          7.32 MiB -- js
|             3.07 MiB -- malloc-heap
|             3.00 MiB -- gc-heap
|                2.49 MiB -- used
|                0.34 MiB -- decommitted
|                0.09 MiB -- unused
|                0.09 MiB -- admin
|             1.25 MiB -- non-heap
|          1.36 MiB -- layout-worker-3-local-context
|          1.34 MiB -- layout-worker-0-local-context
|          1.24 MiB -- layout-worker-1-local-context
|          1.24 MiB -- layout-worker-4-local-context
|          1.16 MiB -- layout-worker-2-local-context
|          0.89 MiB -- layout-worker-5-local-context
|          0.38 MiB -- layout-task
|             0.31 MiB -- display-list
|             0.07 MiB -- local-context
|       1.56 MiB -- compositor-task
|          0.78 MiB -- surface-map
|          0.78 MiB -- layer-tree
```
The heap-unclassified values dominate the "explicit" tree because reporter
coverage is still quite poor.
2015-07-29 16:11:19 -07:00
Patrick Walton
164e10202c devtools: Convert the developer tools to run over IPC. 2015-07-27 09:10:01 -07:00
Patrick Walton
82b53d83ff script: Make the ImageCacheTask use IPC.
This necessitated getting rid of the boxed trait object that was being
be passed between the script task and the image cache task.
2015-07-26 23:07:44 -07:00