Commit graph

28547 commits

Author SHA1 Message Date
Bobby Holley
653107d6c4 Avoid recursion in clear_descendant_data.
MozReview-Commit-ID: LeMhhcKoLr9
2017-08-15 23:24:17 -07:00
Brian Birtles
9ecb0aa7fa Don't allow interpolating 'fill:none' with 'fill:none'
In SMIL we don't expect the 'none' value of the 'fill' property to be
additive and hence the following animation should have no effect:

  <rect width="100" height="100" y="100" fill="blue">
    <animate attributeName="fill" dur="3s" from="red" by="none"/>
  </rect>

Although SMIL doesn't make this entirely clear, [1] says that "by
animation" and "from-by animation" may only be used "with attributes
that support addition (e.g.  most numeric attributes)" and [2] says that
<paint>s are "only additive if each value can be converted to an RGB
color". As a result, the animation above should have no effect.

By extrapolation, animating from 'none' by 'none' should also have no
effect:

  <rect width="100" height="100" y="100" fill="blue">
    <animate attributeName="fill" dur="3s" from="none" by="none"/>
  </rect>

However, in Servo's interpolation of <paint>s we special case the
interpolation and addition of 'none' such that if both values are 'none'
it is allowed.

We should disallow this in order to produce the expected behavior and in
order to match Gecko's behavior.

[1] https://www.w3.org/TR/smil-animation/#AnimFuncValues
[2] https://www.w3.org/TR/SVG11/animate.html#AnimationAttributesAndProperties
2017-08-16 15:01:44 +09:00
Hiroyuki Ikezoe
41cbd2fa62 Implement distance for shadow list. 2017-08-16 14:25:30 +09:00
bors-servo
dc654c9912 Auto merge of #18099 - KuoE0:make-empty-rule-can-be-inserted-into-rule-tree, r=emilio
Make emtpy rule can be inserted into rule tree

<!-- Please describe your changes on the following line: -->
We really want to ensure empty rule nodes appear in the rule tree for devtools, this condition ensures that if we find an empty rule node, we insert it at the normal level.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1384802](https://bugzilla.mozilla.org/show_bug.cgi?id=1384802)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because of the test cases are in Gecko.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18099)
<!-- Reviewable:end -->
2017-08-15 23:11:04 -05:00
bors-servo
736e963efd Auto merge of #18100 - jryans:stylo-linux32, r=Manishearth
Fix up Stylo return types for Linux 32-bit ABI

https://bugzilla.mozilla.org/show_bug.cgi?id=1390691

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18100)
<!-- Reviewable:end -->
2017-08-15 22:11:50 -05:00
J. Ryan Stinnett
711adba0ce Update Stylo bindings 2017-08-15 22:09:08 -05:00
KuoE0
a6ceafe3da Make emtpy rule can be inserted into rule tree 2017-08-16 11:08:49 +08:00
J. Ryan Stinnett
25d2b70252 Fix up Servo_StyleSet_MediumFeaturesChanged for Linux 32-bit ABI
Bindgen bitfield enums don't work as return values with the Linux 32-bit ABI at
the moment because they wrap the value in a struct.

This causes the Rust side to believe the caller will pass along space for the
struct return value, while C++ believes it's just an integer value.

MozReview-Commit-ID: LY6z7lEKgOp
2017-08-15 21:10:55 -05:00
J. Ryan Stinnett
22e794bbd8 Fix up Servo_TakeChangeHint for Linux 32-bit ABI
Bindgen bitfield enums don't work as return values with the Linux 32-bit ABI at
the moment because they wrap the value in a struct.

This causes the Rust side to believe the caller will pass along space for the
struct return value, while C++ believes it's just an integer value.

MozReview-Commit-ID: 6qqVVfU8Mb2
2017-08-15 21:10:48 -05:00
J. Ryan Stinnett
d4b364200a Fix up Gecko_CalcStyleDifference for Linux 32-bit ABI
Bindgen bitfield enums don't work as return values with the Linux 32-bit ABI at
the moment because they wrap the value in a struct.

This causes the Rust side to believe the callee expects space for the struct
return value, while C++ believes it's just an integer value.

MozReview-Commit-ID: FRBqlZuMiAR
2017-08-15 21:10:37 -05:00
J. Ryan Stinnett
2d65fc899e Fix up Servo_StyleSet_Init for Linux 32-bit ABI
Rust was treating this as returning an `Owned` types which uses a struct, while
C++ saw it as just a pointer.

This disagreement violates the Linux 32-bit ABI, and also the pointer was deemed
to be more correct anyway.

MozReview-Commit-ID: AQJkdU02vfh
2017-08-15 21:10:29 -05:00
bors-servo
eba896157e Auto merge of #18095 - emilio:unused, r=bholley
stylo: Remove some unused FFI functions.

Bug: 1390650
Reviewed-by: bholley
MozReview-Commit-ID: K9fXGRmgkr4

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18095)
<!-- Reviewable:end -->
2017-08-15 19:29:45 -05:00
bors-servo
1c4076a759 Auto merge of #18040 - atouchet:user-agent, r=jdm
Update Firefox version in user agent

<!-- Please describe your changes on the following line: -->
GitHub has started throwing warnings about using an outdated version of Firefox when loaded with Servo. I am assuming that this is due to Servo using Firefox 37.0 in its user agent which was set in 2015 and hasn't been updated since then. I don't know if updating this should cause any site compatibility issues or not.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18040)
<!-- Reviewable:end -->
2017-08-15 18:21:51 -05:00
bors-servo
99b4b7e960 Auto merge of #18094 - bholley:ancestor_reconstruct, r=emilio
Avoid leaving stale ANCESTOR_WAS_RECONSTRUCTED bits in the tree

https://bugzilla.mozilla.org/show_bug.cgi?id=1390179

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18094)
<!-- Reviewable:end -->
2017-08-15 17:07:20 -05:00
Emilio Cobos Álvarez
6b6ab991fd
stylo: Remove some unused FFI functions.
Bug: 1390650
Reviewed-by: bholley
MozReview-Commit-ID: K9fXGRmgkr4
2017-08-15 23:57:59 +02:00
Bobby Holley
8a3761972d Bonus fix: Be more robust about clearing descendants bits under display:none subtrees.
MozReview-Commit-ID: 9KQVOpdEjwF
2017-08-15 14:25:50 -07:00
Bobby Holley
05a1b682bb Avoid leaving stale ANCESTOR_WAS_RECONSTRUCTED bits in the tree.
MozReview-Commit-ID: 76q5XxK2o2a
2017-08-15 14:25:50 -07:00
bors-servo
90f55ea458 Auto merge of #17891 - MortimerGoro:webgl_move, r=glennw,emilio
Improved WebGL architecture

<!-- Please describe your changes on the following line: -->

Info about the big picture and the goals of the WebGL refactor in this thread: https://groups.google.com/forum/#!topic/mozilla.dev.servo/0WMGz60kKzQ

I tried to reduce this PR as much as possible as requested in the thread. I'll do separate PRs for other features (e.g.: Batch messages or use shared memory to improve frame times) or fixes.

Some tips to ease the review process:
- Most changes in DOM objects follow the same pattern (remove CanvasMsg wrapper and use the new sender method).
- WebGLCommands are the same ones as before (moved from webrender_api). So those lines are already reviewed.
- See WebGL traits in [components/canvas_traits/webgl.rs](https://github.com/servo/servo/pull/17891/files#diff-8701045d01505418701d0631d4d45562)
- See WebGLThread and WR External Image bridge in [components/canvas/webgl_thread.rs](https://github.com/servo/servo/pull/17891/files#diff-281554879f39a2a041f7a69d442a5d2e)
- The implementation submitted in this PR creates a single `WebGLThread` for all ScriptThread/Pipelines. See that in [components/canvas/webgl_mode/inprocess.rs](https://github.com/servo/servo/pull/17891/files#diff-250070c6c5a38c7f9fa0f5b3c101f68b)

The conformance tests will help to guarantee that we don't miss anything.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17891)
<!-- Reviewable:end -->
2017-08-15 16:00:10 -05:00
Imanol Fernandez
703962fe61 Improve WebGL architecture. 2017-08-15 22:14:32 +02:00
Connor Brewster
0b6fa8f0f3 Only run update steps if token was found 2017-08-15 14:44:16 -05:00
bors-servo
2e60b27a21 Auto merge of #18088 - emilio:unused-doc-comments, r=jdm
style: Remove a few comments on statements.

These warn with `unused_doc_comments` on nightly.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18088)
<!-- Reviewable:end -->
2017-08-15 11:34:33 -05:00
bors-servo
e9cbbc58cc Auto merge of #18090 - MortimerGoro:offscreen_11_1, r=emilio
Update offscreen_gl_context to 0.11.1

<!-- Please describe your changes on the following line: -->

Required to land https://github.com/emilio/rust-offscreen-rendering-context/pull/105

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18090)
<!-- Reviewable:end -->
2017-08-15 10:03:10 -05:00
bors-servo
7d9b82b9ef Auto merge of #18046 - servo:rustup, r=emilio
Upgrade to rustc 1.21.0-nightly (13d94d5fa 2017-08-10)

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18046)
<!-- Reviewable:end -->
2017-08-15 07:31:04 -05:00
Imanol Fernandez
d8e17b2a32 Update offscreen_gl_context to 0.11.1 2017-08-15 14:21:58 +02:00
Simon Sapin
b5a4b8d6a0 Upgrade to rustc 1.21.0-nightly (13d94d5fa 2017-08-10) 2017-08-15 14:10:44 +02:00
bors-servo
41fb10c589 Auto merge of #18085 - dadaa:make-content-animatable, r=hiro
Make content animatable

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [X] There are tests for these changes. The test codes are patch part 3 and 4 in https://bugzilla.mozilla.org/show_bug.cgi?id=1382136

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18085)
<!-- Reviewable:end -->
2017-08-15 05:50:15 -05:00
bors-servo
526d573e07 Auto merge of #18084 - hiikezoe:currentcolor-for-box-shadow-animation, r=xidorn
Currentcolor for box shadow animation

<!-- Please describe your changes on the following line: -->
https://bugzilla.mozilla.org/show_bug.cgi?id=1388220
---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18084)
<!-- Reviewable:end -->
2017-08-15 04:37:44 -05:00
Emilio Cobos Álvarez
0eeb734921
style: Remove a few comments on statements.
These warn with `unused_doc_comments` on nightly.
2017-08-15 11:23:59 +02:00
bors-servo
87c872a7f7 Auto merge of #18081 - hiikezoe:interpolation-with-auto, r=birtles,boris,mantaroh
Fix interpolation between auto and other values

<!-- Please describe your changes on the following line: -->
https://bugzilla.mozilla.org/show_bug.cgi?id=1387939

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18081)
<!-- Reviewable:end -->
2017-08-15 03:28:21 -05:00
bors-servo
74558990b2 Auto merge of #17425 - paulrouget:attach-pipeline-2, r=asajeffrey
cleanup embedder/compositor/constellation/script messages

Fix: #17226 #17200 #17201

This is work in progress. Some tests still fail.
I'd like to get early feedback as it's a pretty large PR.

There is nothing fundamentally new. Basically, I added TopLevelBrowsingContrextId to the relevant messages between the embedder, the compositor and the constellation, and enforced the PipelineId to be attached to each ScriptMsg (see #17201).

I unaliased all the ScriptMsg. It was getting difficult to understand the nature of the message as ScriptMsg was used aliased CompositorMsg sometimes (CompositorMsg is an actually type of message already). I renamed constellation_chan to script_to_constellation_chan, again, for clarification.

This cleanup code is necessary for #15934 and for tabs support.

/cc @asajeffrey can I ask you to look at this? No need for a formal review, I need feedback at this stage.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17425)
<!-- Reviewable:end -->
2017-08-15 02:20:10 -05:00
Daisuke Akatsuka
87c932dff6 Make content animatable 2017-08-15 15:25:06 +09:00
Daisuke Akatsuka
c05baa2327 Implement clone_content method 2017-08-15 15:25:05 +09:00
Paul Rouget
10b52669d7 Use BrowserId and rename Browser to Servo in ports/ 2017-08-15 08:22:15 +02:00
Paul Rouget
d9e7bdd7f6 Event to make a browser visible 2017-08-15 08:22:13 +02:00
Paul Rouget
6876e42d66 rename Browser to Servo as we support multiple browsers 2017-08-15 08:22:11 +02:00
Paul Rouget
d241389129 make use of ScriptToConstellationChan 2017-08-15 08:22:09 +02:00
Hiroyuki Ikezoe
95994bd710 Convert gecko's currentcolor to servo one. 2017-08-15 15:19:47 +09:00
Hiroyuki Ikezoe
4665d6dd15 Reuse to_simple_shadow() for box-shadow as well. 2017-08-15 15:19:31 +09:00
bors-servo
fff50acd81 Auto merge of #18083 - emilio:ruby-text, r=upsuper
style: Simplify the ruby text adjustment.

StyleAdjuster keeps a reference to the parent style, so no need to get it as an
argument.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18083)
<!-- Reviewable:end -->
2017-08-15 01:08:56 -05:00
Emilio Cobos Álvarez
3e2d87d8db
style: Simplify the ruby text adjustment.
StyleBuilder keeps a reference to the parent style, so no need to get it as an
argument.
2017-08-15 07:49:54 +02:00
bors-servo
e0b834033d Auto merge of #18079 - hiikezoe:moz-image-region, r=boris
Don't convert zero component value to 'auto' in clone__moz_image_region.

Currently Gecko treats 'auto' component value as zero for animation.

<!-- Please describe your changes on the following line: -->

https://bugzilla.mozilla.org/show_bug.cgi?id=1387951

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18079)
<!-- Reviewable:end -->
2017-08-14 23:31:19 -05:00
Hiroyuki Ikezoe
08ebc524cf Round halfway values toward positive infinity for integer type of animation.
From the spec[1];

 `with values halfway between a pair of integers rounded towards positive infinity.`

[1] https://drafts.csswg.org/css-transitions/#animtype-integer
2017-08-15 13:05:15 +09:00
Hiroyuki Ikezoe
bff67d8272 Don't fallback to discrete animation within add_weighted() for Either<>.
For CSS Transitions we want this case to return Err() so we know that the two
values are not interpolable.

For CSS Animations/Web Animations we implement discrete animation as the
fallback behavior when Err() is returned.
2017-08-15 13:04:07 +09:00
Hiroyuki Ikezoe
fa3b62746d ComputedPositiveInteger is an integer greater than or equal to 1. 2017-08-15 13:03:54 +09:00
Hiroyuki Ikezoe
19d498f01e Make assertion for colum-count more accurate.
column-count should be greater than or equal to 1. Also it should be less than
or equal to nsStyleColumn_kMaxColumnCount since we limit it in
set_column_count().
2017-08-15 13:03:33 +09:00
Hiroyuki Ikezoe
f6b8fb177c Check interpolatable to tell whether transition is created or not. 2017-08-15 13:03:18 +09:00
Hiroyuki Ikezoe
6d49d8151c Don't convert zero component value to 'auto' in clone__moz_image_region.
Currently Gecko treats 'auto' component value as zero for animation.
2017-08-15 12:34:45 +09:00
bors-servo
0aba7442a6 Auto merge of #18078 - hiikezoe:vertical-align-animation, r=boris
Make vertical-align animatable between percentage and percentage or l…

…ength.

<!-- Please describe your changes on the following line: -->
https://bugzilla.mozilla.org/show_bug.cgi?id=1387949

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18078)
<!-- Reviewable:end -->
2017-08-14 22:07:31 -05:00
bors-servo
4771e6ea1e Auto merge of #18076 - upsuper:fullscreen-pref, r=TYLin
Check pref when parsing :fullscreen pseudo-class

This is the Servo side change of [bug 1374902](https://bugzilla.mozilla.org/show_bug.cgi?id=1374902).

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18076)
<!-- Reviewable:end -->
2017-08-14 20:12:31 -05:00
Hiroyuki Ikezoe
03c5462cf5 Make vertical-align animatable between percentage and percentage or length. 2017-08-15 09:58:48 +09:00