I'm working on resolving https://github.com/servo/servo/issues/8213 as per the spec online and feedback in the servo channel. Note that currently I cannot build (and thus test) my code, so this is a bit of a rough first draft. I'd still like feedback on my progress, and I hope that there is another way for my code to be tested.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8218)
<!-- Reviewable:end -->
Simplify implementation of '<canvas>' 'width' and 'height' attributes.
Strictly speaking, this affects correctness for extremely large width and height values... but that's unlikely to matter in practice.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8243)
<!-- Reviewable:end -->
This should make it somewhat easier to experiment with alternative
representations in the future. To reduce churn, this commit leaves the String
field public, though.
Also, this will allow us to use the default String type to represent the IDL
USVString type, which explicitly forbids unpaired surrogates, ans as such is
a better match to the Rust String type.
add get_raw_layout_value (HTMLInputElementHelpers)
This resolves#8107
Previously the index of the insetion point for a password input was
calculated using the scrambled string based on the edit point in the
raw string. That could lead to a wrong position of the caret. This
commit changes this behavior to calculate the insertion point using
the raw string.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8265)
<!-- Reviewable:end -->
This resolves#8107
Previously the index of the insetion point for a password input was
calculated using the scrambled string based on the edit point in the
raw string. That could lead to a wrong position of the caret. This
commit changes this behavior to calculate the insertion point using
the raw string.
This is done in
`HTMLInputElementHelpers::get_insertion_point_index_for_layout`
and relies on a 1:1 mapping of the chars in the raw input to the
scrambled chars (currently bullets) in the password input.
Correct event dispatching for multiple simultaneous touch points
Instead of just converting the mouse into a single "touch" input, Servo can now listen for multi-touch events from Glutin, maintain a list of active touch points, and dispatch events for all of them.
r? @glennw (for the compositor changes) and @jdm (for the DOM changes)
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8232)
<!-- Reviewable:end -->
Add destructors to some WebGL objects, remove duplicated glutin dependency and try to enable the webgl reftests
The first commit allows to cleanup the gl resources of the webgl task earlier if they aren't being used.
Right now all resources were cleaned up when the context was destroyed, so I think this is
a slightly better approach.
The second commit bumps rust-offscreen-rendering-context to remove the duplicated glutin dependency.
The third one tries to reenable the webgl reftests.
Since the errored builds are deleted, It's the only way I can try to troubleshoot it.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8291)
<!-- Reviewable:end -->
This allows to cleanup resources earlier if they stop being used. Right
now all resources were cleaned up when the context was destroyed, this is
a slightly better approach.
We ignore the possible failure of the send() call, since we don't keep
track of these resources from the `WebGLRenderingContext` structure, so
a texture could be destroyed after the context and give us problems.
Un-boxed ScriptReflow
As per #8238 I changed `layout_interface::Msg::Reflow` to store `ScriptReflow` rather than `Box<ScriptReflow>`
I ran the tests and believe everything passed but this is my first commit to the project so sorry if I messed up the protocol!
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8290)
<!-- Reviewable:end -->
Implementing activation behavior for <label>
Attempt to resolve#8179
@Manishearth , could you give me some resources having more information about what each function in `Activatable` does? The code compiles on my machine but I guess a lot more is needed
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8260)
<!-- Reviewable:end -->
Made binary files show an info message instead of garbled text.
Content-types with the TopLevel "Application" such as
* application/octet-stream
* application/pdf
now show an info message instead of trying to view binary data as html.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7956)
<!-- Reviewable:end -->