Commit graph

2169 commits

Author SHA1 Message Date
Manish Goregaokar
6b0d3902de Factor out ClipRect type into values; use Either for clip
MozReview-Commit-ID: C3R1erJdiID
2017-02-09 15:09:35 -08:00
Pu Xingyu
31ad3b2949 layout: Fix integer overflow when computing size of replace elements 2017-02-09 17:08:13 +08:00
bors-servo
368af6f861 Auto merge of #15357 - dashed:gh-15207, r=Wafflespeanut,emilio
Refactor outline-style to accept "auto" value in addition to border-style values.

Fixes https://github.com/servo/servo/issues/15207

Refactored as per https://github.com/servo/servo/issues/15207#issuecomment-275171590 .

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

- [x] Correct refactor? I'd appreciate any feedback on this.
- [x] ~~~proper borderstyle value for `outline-style: auto;`?~~~ ~~~(EDIT: deferred to a `FIXME`)~~~ (EDIT2: it is now solid for behaviour parity with firefox)
- [x] squash pending PR review
- [x] mako code review

---
<!-- 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 #15207 (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes

<!-- 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/15357)
<!-- Reviewable:end -->
2017-02-08 21:10:57 -08:00
Alberto Leal
09d4751054 Refactor outline-style to accept "auto" value in addition to border-style values.
Fixes https://github.com/servo/servo/issues/15207
2017-02-08 23:13:20 -05:00
Bobby Holley
9e860df9df Bug 1336646 - Apply selector flags during traversal. r=emilio 2017-02-08 19:21:05 -08:00
Bobby Holley
8915e53cee Move rust-selectors in-tree. 2017-02-07 22:53:10 -08:00
bors-servo
f7e75fd001 Auto merge of #15440 - KiChjang:selectors, r=KiChjang
Update selectors to 0.17

Closes #15434.
2017-02-07 20:36:59 -08:00
Anthony Ramine
55b2c5c1bd Update selectors to 0.17 2017-02-07 20:33:35 -08:00
bors-servo
e2b494b1d0 Auto merge of #15417 - stshine:column-flexbox, r=emilio
layout: Remove cached thread local context from LayoutContext, and use LayoutContext for assign_inline_sizes()

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

According to https://github.com/servo/servo/pull/3069 the cached thread local context is introduced for green threads. Now green threads has gone, and the existence of cache force us to create a `LayoutContext`, an `AssignISizes` and an `AssignBSizes` for each flow during parallel layout, so the pull request tries to remove it. And it also switch `assign_inline_sizes()` to accept a `LayoutContext` parameter, as according to my current design we need to do full layout to some flex items for column flexbox during assign isize traversal.

Part of #14123.

---
<!-- 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 refactoring

<!-- 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/15417)
<!-- Reviewable:end -->
2017-02-07 17:16:05 -08:00
Pu Xingyu
336aa795b4 Remove cached thread local context from LayoutContext
Remove cached thread local context from LayoutContext, use LayoutContext for
assign_inline_sizes(), and simplify the parallel flow traversal code.
2017-02-08 08:47:54 +08:00
Glenn Watson
f1558b1c7b Update WR.
- Subpixel positioning improvements.
- Clipping fixes and optimizations.
- Fix panic when transform can't be inverted.
- Support multiple filters on single stacking context.
- Optimize gradients, support unlimited stops.
- Add external image + texture cache support.
- Support error path on shader compile error.
- Optimize border handling in texture atlas.
- Preliminary work towards clip/scroll root changes.
2017-02-07 17:19:16 +10:00
Anthony Ramine
db3e5be878 Update core-foundation-sys to 0.3 2017-02-07 14:35:30 +10:00
Pu Xingyu
f07bfaa974 Remove redundant style_context() method of LayoutContext 2017-02-06 00:44:11 +08:00
Glenn Watson
4cbefe82b5 Update WR (radial gradients, subpixel positioning, tiling changes). 2017-02-01 05:40:44 +10:00
bors-servo
fdf0833ec2 Auto merge of #15271 - mbrubeck:root, r=notriddle
Initialize block_container_inline_size for non-block root flows

Fixes #14948. Fixes #14945.  Needs a try run.  r? @notriddle

<!-- 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/15271)
<!-- Reviewable:end -->
2017-01-28 19:18:53 -08:00
Matt Brubeck
b3820c1296 Convert text-orientation to a Gecko-only property
Remove incomplete and buggy support for text-orientation in Servo.
Make the property values align with Gecko and the latest draft of CSS
Writing Modes Level 3.
2017-01-27 21:12:38 -08:00
Matt Brubeck
39826f817e Initialize block_container_inline_size for non-block root flows
Fixes #14948.
2017-01-27 12:34:00 -08:00
bors-servo
2b623fcc7a Auto merge of #15186 - servo:re-revert, r=mbrubeck
Re revert the backed out PRs

r? anyone

<!-- 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/15186)
<!-- Reviewable:end -->
2017-01-25 02:36:15 -08:00
bors-servo
1b1557839a Auto merge of #15156 - mbrubeck:border-collapse, r=notriddle
WIP: Fix missing borders in tables with border-collapse

This fixes a pair of bugs that caused some borders to be ignored by the border-collapse code. r? @notriddle

I haven't done a full test run with this change yet. After a `try` build I will update test expectations and/or add a new test.

---

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #14834 (github issue number if applicable).

- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/15156)
<!-- Reviewable:end -->
2017-01-24 20:06:18 -08:00
bors-servo
1934a33875 Auto merge of #15160 - emilio:expose-traversal-kind, r=bholley
style: Expose the traversal kind to the style system.

This way we'll be able to take different paths for the sequential and parallel
traversals in some concrete cases.

This is a preliminar patch to fix bug 1332525.

r? @bholley

<!-- 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/15160)
<!-- Reviewable:end -->
2017-01-24 17:02:41 -08:00
Matt Brubeck
258162fbee Fix block-direction border collapsing calculation
Previously the block-start collapsed borders from rows/cells were
written to `preliminary_collapsed_borders` but never read.  This fixes
the block-direction part of #14834.
2017-01-24 16:03:12 -08:00
Matt Brubeck
e315e2e167 Fix provenance of first cell's inline collapsed border
This fixes the inline-direction part of #14834.
2017-01-24 16:01:03 -08:00
Emilio Cobos Álvarez
4639940dfe
Revert "Revert "frame-resize refactor""
This reverts commit 6ead3952a3.
2017-01-24 22:20:39 +01:00
bors-servo
185759f87a Auto merge of #15164 - mbrubeck:revert, r=emilio
Revert several changes that broke tests

This is based on #15158 by @aneeshusa, with additional reverts.

This reverts #15064, which is causing many tests not to run, and #15129 and #15155 which landed while tests were not running and may have caused some new failures in iframe tests.

<!-- 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/15164)
<!-- Reviewable:end -->
2017-01-24 11:14:28 -08:00
bors-servo
2ff4246215 Auto merge of #15154 - servo:rustup, r=SimonSapin
Update rustc to 1.16.0-nightly (7821a9b99 2017-01-23).

<!-- 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/15154)
<!-- Reviewable:end -->
2017-01-24 06:11:40 -08:00
Ms2ger
14fe337866 Update rustc to 1.16.0-nightly (7821a9b99 2017-01-23). 2017-01-24 11:02:51 +01:00
Emilio Cobos Álvarez
f00b628c3a
style: Expose the traversal kind to the style system.
This way we'll be able to take different paths for the sequential and parallel
traversals in some concrete cases.

This is a preliminar patch to fix bug 1332525.
2017-01-24 08:41:29 +01:00
Matt Brubeck
6ead3952a3 Revert "frame-resize refactor"
This reverts commit bca565a1a3.
2017-01-23 16:44:56 -08:00
bors-servo
b0f91193fd Auto merge of #13681 - gpoesia:master, r=mbrubeck
Fix margin size calculation for TableWrapper

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

Fixes inline size calculation for TableWrapper. The table's width was always reaching the inline size equation solver as a specified variable, which was causing the system to be overdetermined when there was a margin specified for the table, and this caused the overflow reported in #12748. The fix consists in handling three cases when the table's width is not specified: if the preferred size of all columns fits, it is returned; if the minimum size does not fit, it is returned instead (it will overflow), otherwise, it is returned as a free variable (that should be solved together with the margin to some value above the minimum width and below the preferred width).

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12748
- [X] There are tests for these changes

<!-- 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/13681)

<!-- Reviewable:end -->
2017-01-23 08:55:44 -08:00
bors-servo
7e2329ea4e Auto merge of #15129 - cynicaldevil:iframe-resize, r=emilio
Refactor to send iframe resize messages directly from layout thread to constellation

<!-- 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
- [X] These changes fix #14682.
<!-- Either: -->

r? @jdm
passing tests:
tests/wpt/mozilla/tests/css/matchMedia.html, tests/wpt/mozilla/tests/mozilla/window_resize_not_triggered_on_load.html, tests/wpt/mozilla/tests/mozilla/iframe/resize_after_load.html, tests/wpt/mozilla/tests/css/meta_viewport_resize.html

<!-- 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/15129)
<!-- Reviewable:end -->
2017-01-23 06:08:02 -08:00
Nikhil Shagrithaya
bca565a1a3 frame-resize refactor 2017-01-23 19:12:16 +05:30
Boris Chiou
9360beb03c Update selectors to 0.15.1
selectors 0.15.1 supports AFFECTED_BY_ANIMATIONS and
AFFECTED_BY_TRANSITIONS, which are used by stylo animations.
2017-01-23 14:51:10 +08:00
bors-servo
c75946c3ed Auto merge of #14978 - shinglyu:inline-flex, r=notriddle
Implemented display: inline-flex

<!-- 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
- [x] These changes fix #14685 (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes
<!-- 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/14978)
<!-- Reviewable:end -->
2017-01-22 19:57:49 -08:00
Shing Lyu
e31ee04dad Implemented display: inline-flex 2017-01-23 10:30:55 +08:00
bors-servo
b08d4a7d39 Auto merge of #14839 - Permutatrix:iss-12939, r=emilio
Make offset parent queries less buggy.

<!-- Please describe your changes on the following line: -->
Offset parent queries, which are used in the getters for HTMLElement's `offsetParent`, `offsetTop`, `offsetLeft`, `offsetWidth`, and `offsetHeight`, are pretty busted. The most egregious bug is that, as reported in #12939, inline elements are treated as if they're not present in the document. This PR fixes that and all of the other bugs I could trace directly to the offset parent query code, but `offsetTop` and `offsetLeft` are still unreliable in certain circumstances for reasons I haven't looked into (#13708). Inline elements with no content are still treated as not present due to #13982, so #13944 isn't fixed with this PR, either.

---
<!-- 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 #12939 and fix #12595

<!-- Either: -->
- [X] There are tests for these changes

<!-- 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/14839)
<!-- Reviewable:end -->
2017-01-18 10:03:37 -08:00
bors-servo
ba59ee6627 Auto merge of #15053 - emilio:image-width, r=jdm
Return the intrinsic image dimension when the image is not rendered

See individual commits for details.

r? @jdm

<!-- 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/15053)
<!-- Reviewable:end -->
2017-01-18 08:43:19 -08:00
bors-servo
3ab514302f Auto merge of #14979 - mrobinson:scroll-roots-when-necessary, r=emilio
Only create scrolling overflow regions when necessary

Only create scroll roots for overflow regions when the overflow region
is actually larger than the container size. This prevents creating
scrolling roots for elements that do not have overflow scroll as a
side-effect of the way their height and width is defined. For example,
tables should never respect overflow:scroll since their height and
width should always be large enough to prevent overflow. This also
decreases the size and complexity of the display list in many other
circumstances.

As part of this change, transformed overflow calculation is moved from
display list construction to layout. This should mean that overflow is
handled more accurately earlier.

Fixes #14574.

<!-- 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
- [x] These changes fix #14574 (github issue number if applicable).

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

<!-- 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/14979)
<!-- Reviewable:end -->
2017-01-17 07:18:42 -08:00
Martin Robinson
44b24de60f Only create scrolling overflow regions when necessary
Only create scroll roots for overflow regions when the overflow region
is actually larger than the container size. This prevents creating
scrolling roots for elements that do not have overflow scroll as a
side-effect of the way their height and width is defined. For example,
tables should never respect overflow:scroll since their height and
width should always be large enough to prevent overflow. This also
decreases the size and complexity of the display list in many other
circumstances.

As part of this change, transformed overflow calculation is moved from
display list construction to layout. This should mean that overflow is
handled more accurately earlier.

Fixes #14574.
2017-01-17 09:47:43 -05:00
Emilio Cobos Álvarez
485fe874e8
layout: Expose whether the element was rendered in content_box_query to script.
But don't change the API yet.
2017-01-17 13:55:08 +01:00
Emilio Cobos Álvarez
602b45a372
gfx: Don't mutate the same point multiple times while translating it to other stacking context space.
I don't know how neither review or a test caught this.
2017-01-16 14:39:55 +01:00
Permutator
2cd538494d
Don't take measurements from non-primary fragments 2017-01-13 14:35:50 -08:00
Permutator
af633b2778
Use parent padding box, not border box 2017-01-13 14:17:48 -08:00
Permutator
cb0d43a993
Broke up some comment lines that were a bit too long 2017-01-13 11:12:05 -08:00
Permutator
74e34d69f0
Handle hypothetical fragments 2017-01-13 11:08:28 -08:00
Permutator
686d2f8509
Don't use rposition() and unwrap() to find parent info 2017-01-13 09:13:25 -08:00
Permutator
5ef7a0a4d8
Don't store the offset parent's dimensions 2017-01-13 09:13:25 -08:00
Permutator
5be187998f
"above the root node" -> "below the root node" 2017-01-13 09:13:24 -08:00
Permutator
b75dcc0f88
Made assertions more helpful 2017-01-13 09:13:24 -08:00
Permutator
defa7d99a6
Actually, node_position probably won't be needed later.
This is why you shouldn't make assumptions about what you'll need later!
2017-01-13 09:13:23 -08:00
Permutator
4825169fb0
Split 123-character line 2017-01-13 09:13:23 -08:00