Commit graph

33709 commits

Author SHA1 Message Date
Paul Rouget
f1a2862e65 Add asset to AAR 2018-08-11 16:55:19 +08:00
bors-servo
9c24c16d82
Auto merge of #20678 - gterzian:improve_follow_hyperlinks, r=jdm
Implement Window.open and related infrastructure

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

Implement https://html.spec.whatwg.org/multipage/window-object.html#window-open-steps and related infra...

---
<!-- 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 build-geckolib` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix  #20673 fix #13241 fix #20887 fix #20713 (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/20678)
<!-- Reviewable:end -->
2018-08-10 19:46:22 -04:00
Gregory Terzian
e784f5a9f7 Refactor embedder NewBrowser flow 2018-08-11 01:13:11 +02:00
Gregory Terzian
96f75465cf rudimentary handling of tabs 2018-08-11 01:13:11 +02:00
Gregory Terzian
fee5428316 make auxiliary browsing-context script-closeable 2018-08-11 01:13:11 +02:00
Gregory Terzian
a0082c57c8 iframe: use value of name attr to set nested bc name 2018-08-11 01:13:11 +02:00
Gregory Terzian
e27ba16c3f share event-loops based on eTLD+1 2018-08-11 01:13:11 +02:00
Gregory Terzian
21bf5a3a4b implement opener, disowning 2018-08-11 01:13:11 +02:00
Gregory Terzian
f408b798c4 implement window.open, create auxiliary browsing context 2018-08-11 01:12:55 +02:00
bors-servo
3e96a322ae
Auto merge of #21380 - jdm:wpt_update_10-08-2018, r=jdm
WPT sync

<!-- 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/21380)
<!-- Reviewable:end -->
2018-08-10 15:16:31 -04:00
Josh Matthews
b16a6268d9 Fix servodriver server configuration. 2018-08-10 14:45:47 -04:00
WPT Sync Bot
8423a90871 Update web-platform-tests to revision 848ceffad26e92d47ffe790ed8b650906b2c2343 2018-08-10 14:45:43 -04:00
bors-servo
c362ade094
Auto merge of #21376 - JoshBrudnak:master, r=jdm
Add rustfmt command to devenv commands

Added the rustfmt command to devenv commands which runs cargo fmt on a specified directory.

---
<!-- 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 #21374

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they only included a simple command that was added to the devenv_commands python script.

<!-- 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/21376)
<!-- Reviewable:end -->
2018-08-10 14:03:01 -04:00
josh
936ec085fd Remove trailing whitespace in devenv_commands 2018-08-10 13:47:01 -04:00
Josh Brudnak
230f025bc7
Merge branch 'master' into master 2018-08-10 13:11:23 -04:00
bors-servo
e40feab22f
Auto merge of #21366 - jdm:android-ndk-stack, r=paul
Add ndk-stack mach command

This makes it much easier to get usable symbols from logcat output that includes a crash.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #20442
- [x] These changes do not require tests because it's a mach command

<!-- 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/21366)
<!-- Reviewable:end -->
2018-08-10 09:39:44 -04:00
JoshBrudnak
fc0a86c038 Add rustfmt command to devenv commands 2018-08-09 17:26:04 -04:00
bors-servo
0b35a67260
Auto merge of #21367 - servo:rustup, r=mbrubeck
Work around a rustc regression in macro name resolution

https://github.com/rust-lang/rust/issues/53205

<!-- 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/21367)
<!-- Reviewable:end -->
2018-08-09 13:34:45 -04:00
bors-servo
ac7f895204
Auto merge of #21364 - jdm:android-stop, r=paulrouget
Avoid crash when pressing stop button on Android

This doesn't actually implement stopping; it just works around the crash that happens when you press it.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21328
- [x] These changes do not require tests because we have no tests for the android UI

<!-- 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/21364)
<!-- Reviewable:end -->
2018-08-09 12:40:57 -04:00
Josh Matthews
5b36f82c74 jni: Add stop API stub. 2018-08-09 10:21:20 -04:00
bors-servo
78fabb9110
Auto merge of #21361 - paulrouget:fasterBuild, r=MortimerGoro
Compile less

Fix #21332

<!-- 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/21361)
<!-- Reviewable:end -->
2018-08-09 10:06:55 -04:00
Paul Rouget
b79f80d9e5 Compile less 2018-08-09 17:54:35 +08:00
bors-servo
2fc0633f29
Auto merge of #21368 - fabricedesre:bitflags-update, r=jdm
Upgrade bitflags to latest version

<!-- Please describe your changes on the following line: -->
This is a minor update to the `bitflags` crate. That makes syntax like `pub(crate)` work, and I rely on that in a servo embedder.

---
<!-- 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: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because it's backward compatible with current version.

<!-- 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/21368)
<!-- Reviewable:end -->
2018-08-08 21:30:16 -04:00
Fabrice Desré
2c695caf96 Upgrade bitflags to latest version 2018-08-08 14:47:40 -07:00
Simon Sapin
b6b925e509 Move a comment back next to what it was documenting 2018-08-08 23:16:05 +02:00
Simon Sapin
73ba85f3e8 Work around a rustc regression in macro name resolution
https://github.com/rust-lang/rust/issues/53205
2018-08-08 23:16:05 +02:00
bors-servo
8a691f74e7
Auto merge of #21365 - jdm:android-font, r=mbrubeck
Avoid crash using freetype in debug android builds

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21327
- [x] These changes do not require tests because this code is only executed in debug builds

<!-- 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/21365)
<!-- Reviewable:end -->
2018-08-08 16:56:21 -04:00
Josh Matthews
ef66205436 mach: Add ndk-stack command for android crash logs. 2018-08-08 15:34:40 -04:00
Josh Matthews
4f596edcbf gfx: Make FontHandleMethods::family_name return an optional value. 2018-08-08 15:29:22 -04:00
bors-servo
21079ad690
Auto merge of #21360 - paulrouget:fixSurface, r=jdm
Add more methods to ServoSurface and relabel the inner surface class name

<!-- 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/21360)
<!-- Reviewable:end -->
2018-08-08 08:32:44 -04:00
Paul Rouget
7a14dbf5a1 Add more methods to ServoSurface and relabel the inner surface class name 2018-08-08 11:10:52 +02:00
bors-servo
53159770e2
Auto merge of #21346 - georgeroman:unused_bluetooth_dep, r=paulrouget
Remove unused compositing dependency from bluetooth crate

Closes #21176

- [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/21346)
<!-- Reviewable:end -->
2018-08-08 04:24:39 -04:00
bors-servo
8a1c1fa1fe
Auto merge of #21345 - pyfisch:rustdoc-lints, r=jdm
Add --cap-lints warn to rustdoc script

Use --document-private-items instead of
manually specifying passes as this is deprecated.

Closes #21179

<!-- 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/21345)
<!-- Reviewable:end -->
2018-08-07 22:22:19 -04:00
bors-servo
ea86eb64be
Auto merge of #21357 - emilio:gecko-sync, r=emilio
style: Sync changes from mozilla-central.

See each individual commit.

<!-- 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/21357)
<!-- Reviewable:end -->
2018-08-07 20:27:24 -04:00
Josh Matthews
7c32ad7c3d Revert "Fix the build for NLL"
This reverts commit d1733aa502.
2018-08-07 20:24:55 -04:00
Emilio Cobos Álvarez
689293e4fb
Fix Servo build. 2018-08-08 01:34:35 +02:00
Emilio Cobos Álvarez
6c5456b4b6
Appease tidy. 2018-08-08 01:34:35 +02:00
Emilio Cobos Álvarez
8088168f44
Update Cargo.lock 2018-08-08 01:34:35 +02:00
Emilio Cobos Álvarez
ffae32f844
style: Fixup some indentation. 2018-08-08 01:37:57 +02:00
Emilio Cobos Álvarez
0ae47b2659
style: Cleanup invalidation processor constructor.
It used to be this way because of lifetime issues (plus the shadow
datas were in RwLocks at some point IIRC). Now we guarantee that as long as the
element is away the cascade data is as well, so we don't need to thread it
around.

Differential Revision: https://phabricator.services.mozilla.com/D2768
2018-08-08 01:37:50 +02:00
Emilio Cobos Álvarez
bbcd7e414a
style: Remove unused selectors methods.
Differential Revision: https://phabricator.services.mozilla.com/D2767
2018-08-08 01:37:45 +02:00
Emilio Cobos Álvarez
489e224cb6
style: Don't print rerun-if-changed files until binding generation has succeeded.
Otherwise they may clobber useful output.

Differential Revision: https://phabricator.services.mozilla.com/D2783
2018-08-08 01:37:37 +02:00
Olli Pettay
87deddb631
style: Change storage of previous and next children in nsINode. 2018-08-08 01:37:28 +02:00
Emilio Cobos Álvarez
888ad3eabe
style: Restrict XUL tree pseudos on nightly and early-beta.
Differential Revision: https://phabricator.services.mozilla.com/D2598
2018-08-08 01:37:20 +02:00
Emilio Cobos Álvarez
998e6f1797
style: Remove the concept of 'canonical' pseudos.
We only have this so that ::-moz-placeholder keeps serializing as
::-moz-placeholder, but I don't think anybody really cares.

Edge aliases ::-webkit-input-placeholder to ::-ms-input-placeholder at parse
time as well, as can be seen in:

```
let s = document.createElement('style');
s.innerHTML = `input::-webkit-input-placeholder { color: red };`;
document.body.appendChild(s);
document.body.innerHTML = s.sheet.cssRules[0].cssText;
```

And I think this is more consistent with what we do for CSS properties that are
aliases.

Differential Revision: https://phabricator.services.mozilla.com/D2595
2018-08-08 01:37:07 +02:00
Cameron McCormack
62419adaaa
style: Shrink selectors::Component to 24 bytes.
This saves about 37 KiB of memory across the UA style sheets.

Bug: 1475197
Reviewed-by: emilio
2018-08-08 01:36:53 +02:00
Jonathan Watt
b05ace3e4a
style: Add a '-moz-menulist-button' value to '-moz-appearance'.
The '-moz-menulist-button' value currently behavies identically to the
'menulist-button' value.  This is not implemented as an alias because later
patches in this patch series will change the behavior of our pre-existing
'menulist-button' value to more closely match what Chrome does.

Bug: 1428676
Reviewed-by: emilio
2018-08-08 01:36:33 +02:00
Emilio Cobos Álvarez
bee7cbad0d
style: Micro-optimize is_root to avoid poking at the parent in the common case.
We can discard the common case of an element having another element or document
fragment parent, which is the common case.

Then we can discard detached subtrees looking at is_in_document().

The only case where we have a non-content parent is the document case:

  https://searchfox.org/mozilla-central/rev/033d45ca70ff32acf04286244644d19308c359d5/dom/base/Element.cpp#1683

Differential Revision: https://phabricator.services.mozilla.com/D2505
2018-08-08 01:36:25 +02:00
Emilio Cobos Álvarez
eb49995737
style: Convert GetStringValue to use Servo.
And remove gPropertyTable / kCSSRawProperties while at it.

Differential Revision: https://phabricator.services.mozilla.com/D2516
2018-08-08 01:36:18 +02:00
Emilio Cobos Álvarez
694d00eb5e
style: Implement nsCSSProps::LookupProperty using Rust.
Always assume allowed-for-all-content. There are a couple callers which weren't
doing that:

 * A unit test -> removed.

 * ComputeAnimationDistance: Used for testing (in transitions_per_property), and
   for the animation inspector. The animation inspector shouldn't show
   non-enabled properties. The transitions_per_property test already relies on
   getComputedStyle stuff which only uses eForAllContent.

 * GetCSSImageURLs: I added this API for the context menu page and such. It
   doesn't rely on non-enabled-everywhere properties, it was only using
   eInChrome because it was a ChromeOnly API, but it doesn't really need this.

Differential Revision: https://phabricator.services.mozilla.com/D2514
2018-08-08 01:36:10 +02:00