| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
|
|
|
| |
This merges import blocks that were reported by tidy as unmerged.
|
|
|
|
| |
fixup! Make use of FromStr and Default traits in lib canvas
|
|
|
|
|
| |
This fixes lines that were reported to have missing
space after a comma.
|
|
|
|
|
| |
Prior to #7416 and #7401, many of these `impl` sections were not
identical
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
closes #7357
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit implements WebGL's:
* cullFace
* frontFace
* enable
* disable
* depthMask
* colorMask
* clearDepth
* clearStencil
* depthFunc
* depthRange
* hint
* lineWidth
* pixelStorei
* polygonOffset
* texParameteri
* texParameterf
* texImage2D (partially)
It inlines a lot of OpenGL calls to keep the file
`components/canvas/webgl_paint_task.rs` as small as possible while
keeping readability.
It also improves error detection on previous calls, and sets node damage
on the canvas in the drawing calls.
It adds a `TexImage2D` reftest, even though it's not enabled because:
* WebGL paints the image when it loads (asynchronously), so the reftest doesn't wait for it and it finishes early
* If we change the source for the base64 src of the image it works as expected in non-headless mode, but the test harness locks
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Clean up and fix PutImageData
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7092)
<!-- Reviewable:end -->
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix createImageData with sizes < 1 pixel
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6974)
<!-- Reviewable:end -->
|
| | |
|
|/ |
|
| |
|
|
|
|
|
| |
This necessitated getting rid of the boxed trait object that was being
be passed between the script task and the image cache task.
|
|
|
|
|
|
| |
To actually make the multiprocess communication work, we'll need to
reroute the task creation to the pipeline or the compositor. But this
works as a first step.
|
| |
|
|
|
|
| |
fixes #6524
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Check invalid values for the shadow attributes.
I left out checking invalid values when setting the shadows attributes.
r? @nox @pcwalton
cc @yichoi
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6413)
<!-- Reviewable:end -->
|
| | |
|
| | |
|
|/ |
|
|
|
|
| |
https://github.com/servo/rust-geom/pull/81
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
CanvasContextState.
The fillStyle and strokeStyle attributes can be either
strings(color), CanvasGradients, or CanvasPatterns.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
r? @jdm
I couldn't add the `getContextAttributes` method since `CodegenRust`
doesn't know how to return a dictionary value, I'll take a look at it ASAP.
I think the helper functions can return directly the renderer, since they're used just for that, but I wanted to hear your opinions about this.
By the way I'm interested in adding more serious tests for WebGL, and I think the [khronos conformance suit](https://github.com/KhronosGroup/WebGL/tree/master/conformance-suites/1.0.3) should be the best option.
Should I try to integrate it in wpt, or making a `tests/webgl` directory (or similar) inside the servo tree? (Maybe this question should be for @Ms2ger)
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6183)
<!-- Reviewable:end -->
|
| |
| |
| |
| |
| |
| |
| | |
This commit also:
* Allows to return non-rootable dictionaries from
Codegen.
* Merges the two context types in an enum type.
|
|/ |
|
|
|
|
| |
Part of https://github.com/servo/servo/issues/6041
|
|\
| |
| |
| |
| |
| |
| |
| | |
r? @jdm
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5586)
<!-- Reviewable:end -->
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
image fragments.
This also changes the way the placeholder is handled in the image cache
task to decode it up front instead of each time an image fails to load,
both because it was more convenient to implement that way and because
it saves CPU cycles to do so.
This matches the behavior of Gecko and WebKit. It improves the look of
our cached copy of Wikipedia.
|
|/
|
|
|
|
|
| |
Note that this keeps using readback right now, `NativeSurface` painting
will be implemented soon.
Also see https://github.com/servo/servo/issues/6142
|
|\
| |
| |
| |
| |
| |
| |
| | |
With this patch, it is now possible to create nice animations using the canvas.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5949)
<!-- Reviewable:end -->
|
| | |
|
| | |
|
|\ \
| |/
|/|
| |
| |
| | |
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5945)
<!-- Reviewable:end -->
|
| | |
|