Ms2ger
03d4bacc05
Use num-traits in script.
2016-04-20 15:23:43 +02:00
Rizky Luthfianto
5ad312cb8e
Fix Document#elementFromPoint no viewport available test
2016-04-16 17:16:27 +07:00
Rizky Luthfianto
5a3ce597d3
Fix Document#elementsFromPoint no viewport available test
2016-04-16 01:05:32 +07:00
Simon Sapin
6889f37d9e
Remove the url! plugin.
...
In rust-url 1.0 the `Url` struct is going to have private fields, and there
is no way to to create an aribitrary one without going through the parser.
The plugin never had a clear demonstrated performance benefit,
it was made mostly because it was possible and relatively easy at the time.
2016-04-14 15:35:28 +02:00
Josh Matthews
90454c279d
Use origin when manipulating cookies.
2016-04-13 12:07:05 +02:00
Josh Matthews
fa42b452a0
Use origin for document.domain.
2016-04-13 12:07:04 +02:00
Josh Matthews
a8233a135e
Implement origin concept.
2016-04-13 10:37:55 +02:00
Zhen Zhang
7169a08a34
fix performance timing precision and navigation_start unit; add LoadEventStart and LoadEventEnd timing
2016-04-13 01:30:02 +08:00
Corey Farwell
11a3ce1257
Remove get_*
on getters as per RFC 0344.
...
https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md#gettersetter-apis
https://github.com/servo/servo/issues/6224
2016-04-10 22:49:35 -04:00
shubham_jain
6626c5cfd4
issue #10141 : Document::location set null for documents without a browsing context. r=Ms2ger
2016-04-09 22:54:07 +05:30
Rahul Sharma
2caa9a2a76
refactors entities from script_thread into script_runtime
2016-04-06 12:46:49 +05:30
Paul Rouget
df6e7394d4
forcetouch events support
...
This enables Apple forcetouch DOM events. It requires the preference dom.forcetouch.enabled.
The DOM events are described here:
- https://developer.apple.com/library/mac/documentation/AppleApplications/Conceptual/SafariJSProgTopics/RespondingtoForceTouchEventsfromJavaScript.html
The Cocoa mechanism is documented here:
- 20000016
-SW274
2016-04-05 18:42:28 +08:00
bors-servo
b568b72d76
Auto merge of #10391 - autrilla:inline-content-changed, r=Ms2ger
...
Inlined content_changed
cc @Ms2ger
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg " height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10391 )
<!-- Reviewable:end -->
2016-04-05 01:37:55 +05:30
bors-servo
a29da7b48e
Auto merge of #10365 - emilio:warnings, r=Wafflespeanut
...
servo: Clean up unused variables and imports
<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg " height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10365 )
<!-- Reviewable:end -->
2016-04-04 23:39:31 +05:30
Adrian Utrilla
bc1b8ef4c6
Inlined content_changed
2016-04-04 11:33:37 +02:00
Rizky Luthfianto
07584b9f29
Implement Document#elementsFromPoint
2016-04-03 21:44:01 +07:00
Emilio Cobos Álvarez
a57aa561c1
servo: Clean up unused variables and imports
2016-04-02 16:30:18 +02:00
bors-servo
0760e56bb6
Auto merge of #10327 - frewsxcv:get-prefix, r=ms2ger
...
Remove `get_*` on getters as per RFC 0344.
https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md#gettersetter-apis
https://github.com/servo/servo/issues/6224
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg " height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10327 )
<!-- Reviewable:end -->
2016-04-02 14:19:39 +05:30
bors-servo
7d79df4a05
Auto merge of #10304 - Ms2ger:cookie-averse, r=nox
...
Implement Document::cookie correctly for cookie-averse documents.
<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg " height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10304 )
<!-- Reviewable:end -->
2016-04-01 22:51:51 +05:30
Corey Farwell
bf4db405e4
Remove get_*
on getters as per RFC 0344.
...
https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md#gettersetter-apis
https://github.com/servo/servo/issues/6224
2016-03-31 21:12:38 -04:00
bors-servo
f335586ff5
Auto merge of #10292 - jdm:cssom, r=jdm
...
Initial steps for CSSOM
Squashed and rebased #10133 .
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg " height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10292 )
<!-- Reviewable:end -->
2016-04-01 04:29:08 +05:30
Mohamed Albashir
b7a57ef487
Initial steps for CSSOM API
2016-03-31 18:17:30 -04:00
Connor Brewster
f727444a14
Added a mapping between nodes and stylesheets
...
Changed stylesheets into_iter to iter
2016-03-31 08:22:00 -06:00
Ms2ger
3c6cc642ee
Implement Document::cookie correctly for cookie-averse documents.
2016-03-31 10:40:10 +02:00
Ms2ger
231208a522
Include square brackets for IPv6 addresses in Document::domain.
...
The specification changed out from under us.
It's unfortunately impossible to write a test for this right now.
2016-03-30 16:45:13 +02:00
Ms2ger
b1cd28e9c6
Store the encoding in the Document rather than its name.
2016-03-18 16:22:52 +01:00
bors-servo
f2f6787189
Auto merge of #9930 - rebstar6:htmlclick, r=jdm
...
Remove activatable element filter within HTMLElement#click()
Address https://github.com/servo/servo/issues/6542
Ensure that click() calls are not limited to activatable elements. Also makes the isTrusted attribute false when synthetic click activation are called from a click() method (as per spec).
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg " height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9930 )
<!-- Reviewable:end -->
2016-03-11 10:06:24 +05:30
Rebecca
d6678a184b
Call synthetic_click_activation for all clicks
...
Moved synthetic_click_actiavtion out of Activatable trait so it can be
called by all elements (not just activatable). Calls appropriately
from click. Also updates the isdisabled check in click to check for all
types of elements
2016-03-10 14:43:33 -05:00
Keith Yeung
3f2cbf0025
Add task_source directory
...
Use DOMManipulationTaskSource whenever possible
2016-03-10 01:05:53 -05:00
Jack Moffitt
2507bfb2cf
Suppress reflows before RefreshTick or FirstLoad
...
This fixes a bug where partially loaded content is displayed to the user
before it should be, usually before stylesheets have loaded. This commit
supresses reflows until either FirstLoad or RefreshTick, whichever comes
first.
Unfortunately, hit_test and mouse_over did not do reflows if they were
necessary, and so by suppressing the initial spurious reflows, these
methods started to panic without a display list to query. This patch
also transforms these into queries similar to the other existing
queries.
2016-03-03 15:17:46 -07:00
Emilio Cobos Álvarez
3662491d8f
Refactor mouseover code to be more performant
...
This increases mouseover/out performance drastically on my machine.
2016-03-02 20:14:15 +01:00
Emilio Cobos Álvarez
48dee6413d
script/layout: Refactor mouse_over since it now basically uses hit_test
2016-03-02 20:14:15 +01:00
Emilio Cobos Álvarez
c3786437a3
script: Fix mouseover
/mouseout
dispatching.
2016-03-02 20:01:41 +01:00
Emilio Cobos Álvarez
b1f0581637
script: Fix MouseOver handling
...
Now we only query for the topmost node, and apply the hover state to all
of the parent elements.
This fixes things like #9705 , where the hover state was applied only to
the children.
This also makes us more conformant with other browsers in the case of
taking in account margins and paddings.
For example, prior to this PR, when your mouse was over the inner
element, in the bottom part, `hover` styles didn't apply to the parent.
```html
<style>
div {
padding: 10px;
margin: 10px;
height: 15px;
background: blue;
}
div:hover {
background: red;
}
</style>
<div>
<div></div>
</div>
```
Fixes #9705
2016-03-02 20:01:41 +01:00
Anthony Ramine
1d87f61350
Use a BTreeMap for Document::animation_frame_list ( fixes #9834 )
...
The callbacks must stay ordered.
2016-03-02 16:53:06 +01:00
bors-servo
4bcdbe6d56
Auto merge of #8932 - rilut:add-elementfrompoint, r=nox
...
Implement Document#elementFromPoint
Related to #8666 . I haven't implemented elementsFromPoint, because from my past discussion with jdm, [it's not good yet](dbfa25214b (commitcomment-14668959)
) to implement elementsFromPoint because it may cause GC hazards.
By the way, I also have to include the test for this, right? I've found this [1]. So, is all I have to do is just to put this into `tests/wpt/web-platform-tests/cssom-view/elementFromPoint.html`?
[1] http://test.csswg.org/suites/cssom-view-1_dev/nightly-unstable/html/elementFromPosition.htm
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8932 )
<!-- Reviewable:end -->
2016-03-01 03:01:50 +05:30
Rizky Luthfianto
76678bbdae
Implement Document#elementFromPoint
2016-03-01 02:23:07 +07:00
bors-servo
42f1712846
Auto merge of #9740 - paulrouget:mozbrowserconnected, r=jdm
...
Support Browser API event mozbrowserconnected
Fixes https://github.com/servo/servo/issues/9382
This new event is not yet documented. If this lands, I will add documentation to MDN.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg " height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9740 )
<!-- Reviewable:end -->
2016-02-25 15:56:24 +05:30
Paul Rouget
3ecc907767
Support Browser API event mozbrowserconnected
2016-02-24 18:45:07 +01:00
Anthony Ramine
0adfb08089
Implement From<DOMString> for Atom
2016-02-24 17:52:17 +01:00
Anthony Ramine
f7fb035188
Optimise local name cloning in Document::CreateAttribute
2016-02-24 17:52:15 +01:00
Anthony Ramine
cc030df36e
Make use of From<String> for Atom
2016-02-24 17:52:13 +01:00
Josh Matthews
f5b5079e2a
Use the browsing context from the document where appropriate.
...
This should not change behaviour.
2016-02-20 18:47:11 +01:00
bors-servo
ee158cc65f
Auto merge of #9603 - Ms2ger:document-bc, r=jdm
...
Store a pointer to the browsing context in the Document.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg " height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9603 )
<!-- Reviewable:end -->
2016-02-19 12:49:35 +05:30
bors-servo
d8ffa3d0b8
Auto merge of #9529 - paulrouget:focusEvents, r=asajeffrey
...
Implement focus, blur, focusin and focusout events
Based on https://github.com/servo/servo/pull/7985
Fixes https://github.com/servo/servo/issues/7981
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg " height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9529 )
<!-- Reviewable:end -->
2016-02-18 09:03:42 +05:30
Paul Rouget
c7195cb456
Implement focus and blur events
2016-02-18 03:49:31 +01:00
Peter
e39e59ef18
#1716 The indicated part of the document.
...
Interactive test for fragid resolution.
Added HTML tests for scrolling to fragid
Applied algorithm from whatwg spec
https://html.spec.whatwg.org/multipage/#the-indicated-part-of-the-document
Changes following code review
2016-02-17 00:51:46 +00:00
Emilio Cobos Álvarez
dd503dfacb
Refactor style to be completely backend-independent
...
This commit refactors the style crate to be completely independent of
the actual implementation and pseudo-elements supported.
This also adds a gecko backend which introduces parsing for the
anonymous box pseudo-elements[1], although there's still no way of
querying them.
https://mxr.mozilla.org/mozilla-central/source/layout/style/nsCSSAnonBoxList.h
2016-02-13 16:05:14 +01:00
Ms2ger
152cec69eb
Store a pointer to the browsing context in the Document.
2016-02-11 13:08:11 +01:00
Josh Matthews
047bb060c1
Improve documentation for new methods.
2016-02-10 09:20:06 -05:00