Граф коммитов

844 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 18f790ca50 servo: Merge #10815 - style: Support anonymous box pseudo-elements (from emilio:anonbox-gcs); r=SimonSapin,bholley
This is a work-in-progress that:

 * Adds support for some pseudo-elements to skip the cascade entirely, in an analogous way to Gecko's anonymous box pseudo-elements.
 * Takes rid of `StylistWrapper`, and uses `Arc::get_mut` instead.
 * Uses the first bullet to precompute the `-servo-details-content` pseudo's style.

I'd like @bholley to take a look before following, do you think that the aproach is the correct?
Also, @SimonSapin could want to put some eyes on it.

Depends on https://github.com/servo/rust-selectors/pull/81

Source-Repo: https://github.com/servo/servo
Source-Revision: 407f991c8aba5dcf5312bb2c34a3dd4fe12e5471
2016-04-29 14:27:16 -07:00
Yoav Alon 45ed58f663 servo: Merge #10834 - added support for :read-only and :read-write pseudo-classes (from yoava333:master); r=SimonSapin
partial fix for https://github.com/servo/servo/issues/10732

It's not a full fix because:
1. there's a bug in wpt-test https://github.com/w3c/web-platform-tests/issues/2889#issuecomment-214144420
2. we don't fully support all input types (namely image, color, hidden and range), which are defaulted to input text. this means that :read-write which is applicable to input text is mis-handled in those cases.
3. we don't support contenteditable, which is also possibly :read-write

Source-Repo: https://github.com/servo/servo
Source-Revision: ac8406f4aebe1e8571319a1d56fc627ea5782e60
2016-04-29 08:12:18 -07:00
Matt Brubeck 22979e08c6 servo: Merge #10895 - Use byte indices instead of char indices for text runs (from mbrubeck:byteindex); r=pcwalton
Replace character indices with UTF-8 byte offsets throughout all code dealing with text runs.  This eliminates a lot of complexity when converting from one to the other, and interoperates better with the rest of the Rust ecosystem.

For most code this is just a simple replacement of char indices with byte indices.  In a few places like glyph storage and text fragment scanning, it also lets us get rid of code that existed only to map between bytes and chars.

Also includes some related fixes to text shaping, discovered while working on this conversion.  See the commit messages for details.

r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: cf121ad8dff90b8fa55558ca9bdcbfe29512a617
2016-04-28 20:22:09 -07:00
Patrick Walton 40dea43a70 servo: Merge #10623 - layout: Reset values appropriately for floats flowing out of blocks with nonzero inline margins (from pcwalton:reddit-float-fix); r=mbrubeck
These two commits correctly position the hamburger menu icons on http://reddit.com/r/rust.

Source-Repo: https://github.com/servo/servo
Source-Revision: fcb1352e97ece3574eb9bfe6e08d3b97d39e1eba
2016-04-28 10:24:38 -07:00
Daosheng Mu 2ebd1ffdc6 servo: Merge #10871 - Fix issue #10755 Canvas without contexts (from daoshengmu:canvasWithoutContexts); r=jdm
While canvas without contexts, we just need to return the function without drawing any pixel.

Fixes #10755.

Source-Repo: https://github.com/servo/servo
Source-Revision: 14de06aef077e57ca7fdccaae72551919b7748c4
2016-04-27 16:40:43 -07:00
Simon Sapin 2f882b0cfb servo: Merge #10857 - Simplify TOML syntax (from servo:toml); r=nox
* Sections like `[dependencies.foo]` can be entries in a `[dependencies]` section with the `{key = value}` syntax.
* Per-target dependencies can be expressed with more general `cfg(…)` conditions instead of exact target triples: https://github.com/rust-lang/cargo/pull/2328

Source-Repo: https://github.com/servo/servo
Source-Revision: 2729864af73d62719ea0fd55cef417c43bdd951e
2016-04-26 15:46:37 -07:00
Michael Howell dba4e0e71d servo: Merge #10722 - layout: Add support for vertical alignment within table cells (from notriddle:table_cell_valign); r=SimonSapin
Fixes #10621

Source-Repo: https://github.com/servo/servo
Source-Revision: 31a440867db54f5387aca3bd8ce2f644de84c5e1
2016-04-26 11:04:41 -07:00
Martin Robinson 2b99437a80 servo: Merge #10810 - Merge DisplayListEntry into DisplayItem (from mrobinson:displayitem); r=pcwalton
We don't really need two levels of abstraction for every element in the
DisplayList. This simplifies the complexity of the data structure in
preparation for providing documentation and properly handling scrolling
roots.

Source-Repo: https://github.com/servo/servo
Source-Revision: 1fee7185a77424915d517a64685d6f7be40fbd3c
2016-04-26 10:13:00 -07:00
Daniel Robertson cec88d61d7 servo: Merge #10817 - Add style property for flex-basis (from danlrobertson:flex-basis); r=mbrubeck
Add the style property for flex-basis. The property should allow all
values acceptable for `width` or `height` with the addition of `content`.

I also disabled the tests that I expect to pass. I am confused by [flexbox_computedstyle-flex-basis-0percent:20](https://github.com/servo/servo/blob/master/tests/wpt/css-tests/css-flexbox-1_dev/html/flexbox_computedstyle_flex-basis-0percent.htm#L20). Should that be `0%` instead of `0px`?

Source-Repo: https://github.com/servo/servo
Source-Revision: 20dd8ba7ecb459d1d6acd7a2c5a3631a5731da09
2016-04-24 23:34:37 -07:00
Simon Sapin 15f5299fe5 servo: Merge #9840 - Update to rust-url 1.0 (from servo:url-1.0); r=asajeffrey
**Do not merge yet:** rust-url 1.0 is not published yet and may still get breaking changes. The goal of this PR for now is to demonstrate API usage.

Depends on:

* <s>https://github.com/servo/rust-url/pull/176</s>
* <s>https://github.com/alexcrichton/cookie-rs/pull/42</s>
* <s>https://github.com/hyperium/hyper/pull/740</s>
* https://github.com/cyderize/rust-websocket/pull/70
* https://github.com/jgraham/webdriver-rust/pull/28

Source-Repo: https://github.com/servo/servo
Source-Revision: 84ab7e9fe8f4a6528995eff3eb6e814cb724c364
2016-04-23 11:28:31 -07:00
Michael Howell e355acb5bf servo: Merge #10770 - Do not render the contents of block-level replaced elements (from notriddle:canvas_placeholder_block); r=mbrubeck
Fixes #10733

Source-Repo: https://github.com/servo/servo
Source-Revision: 5a5e928cb9a0ab4f6556c63c70a88f5e7ade4f10
2016-04-22 22:32:37 -07:00
Zbynek Winkler 170606fd25 servo: Merge #10706 - Turn on unused-extern-crates warning (from zwn:unused-extern-crates); r=nox
As discussed in #9256. It should solve second half of the issue.

Source-Repo: https://github.com/servo/servo
Source-Revision: 0a3a50a1293e4e8f3e04161014d03802765140c7
2016-04-22 13:40:38 -07:00
Zbynek Winkler c70e781908 servo: Merge #10751 - Report lines starting with && in tidy (from zwn:tidy-start-operator); r=Wafflespeanut
Partial implementation of the issue #10692 (the easy part).

Source-Repo: https://github.com/servo/servo
Source-Revision: d926b5d3762a101d5280266f806f2b979f73b695
2016-04-22 10:40:06 -07:00
Josh Matthews 9da0393626 servo: Merge #10727 - Use DOM width/height for canvas display list item (from jdm:canvas_panic); r=pcwalton
Fixes #10705.

r? @glennw

Source-Repo: https://github.com/servo/servo
Source-Revision: 0e0e902edd200359db6ae06cd149fb1b0a97fcc6
2016-04-21 20:50:27 -07:00
Zhen Zhang f136b02391 servo: Merge #9968 - Implement scroll, scrollLeft, scrollTop and friends, addressing issue #9650 (from izgzhen:scroll); r=asajeffrey
This is a work in progress to solve https://github.com/servo/servo/issues/9650. Thanks a lot for helping the review.

- [x] scroll
- [x] scrollTo
- [x] scrollBy
- [x] scrollTop (setter and getter)
- [x] scrollLeft (setter and getter)

The setters will be implemented in another PR after this is merged.

Source-Repo: https://github.com/servo/servo
Source-Revision: 8d988f20c12e0a5267e79650a90310951c66ca77
2016-04-20 18:11:26 +05:01
Patrick Walton 9d60fb7977 servo: Merge #10717 - layout: Implement support for `overflow: scroll` in WebRender (from pcwalton:wr-overflow-scroll); r=glennw
Requires a WebRender upgrade.

r? @glennw

Source-Repo: https://github.com/servo/servo
Source-Revision: 64b0dafde8f65ef4aceeb85436c547a1581c619f
2016-04-20 02:26:44 +05:01
Alan Jeffrey 0dd4afb363 servo: Merge #10641 - Dedicated panic channel (from asajeffrey:dedicated-panic-channel); r=Manishearth
Added a dedicated panic channel, and removed the panic messages for the script and layout threads. This is needed so that other threads can report panics, which is part of #10334.

Note that this PR includes the commit from #10572, so should land after it lands.

r? @Manishearth

Source-Repo: https://github.com/servo/servo
Source-Revision: bd4b3a66a2aa57ab6fa881e3cc11091edc494a68
2016-04-19 21:29:07 +05:01
Martin Robinson 2728e5cc53 servo: Merge #10678 - WebRender no longer needs StackingLevel information (from mrobinson:remove-stackinglevel-from-webrender); r=pcwalton
Since the display list is already sorted before it is passed to
WebRender, we don't need to pass the stacking level information any
longer. Update webrender, webrender_traits, and gleam.

Source-Repo: https://github.com/servo/servo
Source-Revision: 062d933e4fb4a58d9dc319ec2b462f3c1d504d8a
2016-04-19 10:00:21 +05:01
Peter ee38b14a80 servo: Merge #10667 - Updated euclid to version 0.6.5 (from peterjoel:euclid_0.6.5); r=frewsxcv
And updated existing usages of Matrix4 to use Matrix4D<T>

This version is necessary to complete DOMMatrix implementation.

Source-Repo: https://github.com/servo/servo
Source-Revision: 6056ecd8519f574c2ea9037a919a63edba17d032
2016-04-18 22:48:14 +05:01
Matt Brubeck 9d107fde9d servo: Merge #10655 - Update margins when merging inline fragments (from mbrubeck:merge-margin); r=SimonSapin
Fixes #10633.  r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: fd994c457eabc9163dfef4c97f757dca97af76ff
2016-04-17 07:49:04 +05:01
Matt Brubeck e0e04db4c0 servo: Merge #10643 - Fix handling of borders and padding for empty/stripped inline flows (from mbrubeck:empty-span-border); r=pcwalton
This forces fragment generation for empty inline flows, if they have borders or padding.  Fixes #10533 and #2001.  Also includes fixes for other bugs that were uncovered by this change; see the individual commit messages for detailed explanations.  r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: 15e76eb6e2c00ba26b65df73f1954ccada7509cf
2016-04-17 03:02:12 +05:01
Patrick Walton 135a9937aa servo: Merge #10644 - layout: Make absolutely-positioned blocks not generate {ib} splits (from pcwalton:absolute-ib-split); r=mbrubeck
Improves YouTube.

Closes #10642.

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: 86778a0d714e4e9d2696d54ec422aede47ba3cb9
2016-04-16 06:29:47 +05:01
Michael Howell c0999c0262 servo: Merge #10637 - layout: Do not propagate floats in or out of absolutely positioned flows (from notriddle:absolute_float_line_height); r=pcwalton
Fixes #10625

Source-Repo: https://github.com/servo/servo
Source-Revision: 812c4ad69916e29fe2743cee02ab71b000050987
2016-04-16 04:56:12 +05:01
Patrick Walton c2118ff4b1 servo: Merge #10458 - layout: Disallow margins from collapsing through block formatting contexts per CSS 2.1 § 8.3.1 (from pcwalton:block-formatting-context-margin-collapse); r=mbrubeck
Closes #10449.

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: 7d7404333d75cfd1aab3df07597304d5e78617b5
2016-04-15 05:31:28 +05:01
Alan Jeffrey d466d33083 servo: Merge #10587 - Added panic message to failures (from asajeffrey:add-failure-panic-message); r=Manishearth
Added the panic message to failures. This is a step towards #10334, since it gives us access to the panic error message when we fire a `mozbrowsererror` event. The remaining steps are also to record the backtrace, and to report the failure in the event.

Source-Repo: https://github.com/servo/servo
Source-Revision: 2b910678db8b461dc50919832044bd95cdecb53e
2016-04-14 19:26:17 +05:01
Michael Howell 4c2a5b0394 servo: Merge #10579 - Propogate transformed clipping regions to nested flows (from notriddle:overflow_premature_clip); r=pcwalton
Fixes #10559

Source-Repo: https://github.com/servo/servo
Source-Revision: 84f01d1d7b1b1b893cbb28097b65c21c5fada8b3
2016-04-14 03:03:33 +05:01
Emilio Cobos Álvarez 2650824e41 servo: Merge #10557 - layout: Take in account max and min inline size for inline fragments (from emilio:inline-block-max-width); r=pcwalton
Improves MDN.

r? @mbrubeck or @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: 66c20b2ced7e982197f83bfe92ca6c12db8afba3
2016-04-13 23:40:52 +05:01
Michael Howell 0bb050408c servo: Merge #10486 - Take transform:translate into account when computing clipping regions (from notriddle:overflow_premature_clip); r=pcwalton
Note that this only works for translation; a more general fix would
require major changes to how display lists work.

Closes #10431?

Source-Repo: https://github.com/servo/servo
Source-Revision: 7e63c1be63716e6f190416b512caa12afb4cda52
2016-04-13 06:43:38 +05:01
Patrick Walton 46e11f6e68 servo: Merge #10529 - layout: Make child stacking contexts of fixed position stacking contexts also fixed position (from pcwalton:nested-fixed-position-webrender); r=glennw
Improves YouTube.
Improves the Washington Post.

Closes #10526.

r? @glennw

Source-Repo: https://github.com/servo/servo
Source-Revision: 150338503dce8f2ba7f2a6850dca253733a636a1
2016-04-12 10:09:11 +05:01
Keith Yeung 36fd3b91c3 servo: Merge #10522 - Various cleanups in HTMLInputElement (from KiChjang:input-cleanup); r=frewsxcv
Source-Repo: https://github.com/servo/servo
Source-Revision: 934ae41fc982058048f460a77687ab026c9a909f
2016-04-12 07:27:38 +05:01
Arnaud Marant 1257225e1e servo: Merge #10505 - Issue #10491 add HTMLInputElement attributes that reflect content ide… (from amarant:10491-HTMLInputElement-attr); r=KiChjang
…ntically

it uses a new version of string-cache https://github.com/servo/string-cache/pull/148

Source-Repo: https://github.com/servo/servo
Source-Revision: 61865f66b515503971146b472ae0f8b747569fd0
2016-04-12 05:29:16 +05:01
Daniel Robertson 53fc411e5c servo: Merge #10178 - Implement flexbox reordering (from danlrobertson:flex-order); r=SimonSapin
Add style property for `order` and implement reordering by this property
in flex flow. Based on previous work by @zentner-kyle.

Fixes: #9957
Source-Repo: https://github.com/servo/servo
Source-Revision: df21bb47d414a1ff068623b55e9da644d7239731
2016-04-12 02:48:50 +05:01
Daniel Robertson 54a79a1113 servo: Merge #10490 - Add tests and clean up `FlexFlow::(block|inline)_mode_assign_inline_sizes` (from danlrobertson:correct-size); r=SimonSapin
Clean up `block_mode_assign_inline_sizes` and `inline_mode_assign_inline_sizes` and add extra css tests.

r? @SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: 608533cb4ad31358269cfa8039077767f325f3be
2016-04-11 21:42:07 +05:01
Patrick Walton 356b5034b1 servo: Merge #10494 - layout: Make inner scroll wrappers acquire the overflow region of their contents (from pcwalton:overflow-scroll-nested-fixed-height); r=mbrubeck
Makes Twitter pages show up when scrolling, if WebRender is not in use.
WebRender does not yet support overflow:scroll.

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: 269eeeddd204cd13ed5a0bf80deefcb46a259b3c

--HG--
rename : servo/tests/html/percentage-body-height.html => servo/tests/html/overflow_scroll_with_nested_fixed_height.html
2016-04-09 06:22:21 +05:01
malayaleecoder 643c9837e8 servo: Merge #10320 - Rename imm_child_iter() and child_iter() (from malayaleecoder:master); r=KiChjang
Fixes #10286

Source-Repo: https://github.com/servo/servo
Source-Revision: 0a1efe4578e43c4ffc2f90ff0118660899a83ac4
2016-04-09 03:25:40 +05:01
Per Lundberg c03ec4e764 servo: Merge #10324 - Renamed the style structs (from perlun:rename-style-structs); r=bholley
Renamed style structs.

The idea is to rename all style structs from Foo to ServoFoo, as described out in #10185.

Source-Repo: https://github.com/servo/servo
Source-Revision: 4da38cdd7c26d24d6c9de75d3f3509ae372dd25b
2016-04-09 00:55:28 +05:01
Daniel Robertson e1c09d0f05 servo: Merge #10444 - Correct x and y input for origin_rect (from danlrobertson:fix9824); r=asajeffrey
Fix error in construction of the `origin_rect` for `UnioningFragmentBorderBoxIterator`.

r? @asajeffrey

Source-Repo: https://github.com/servo/servo
Source-Revision: a026e8626731bbc638f84fcd5747134eb153ac6a
2016-04-08 20:06:32 +05:01
Matt Brubeck 90eddfedb0 servo: Merge #10469 - Some minor layout cleanups (from mbrubeck:layout-misc); r=pcwalton
* Prevent unnecessary copying in `strip_leading_whitespace_if_necessary`
* Remove unused argument to `adjust_clipping_region_for_children` (silences a compiler warning)

r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: bd2051d06a4b5f5a261b1c816c5ce9960d3e9b23
2016-04-08 09:41:11 +05:01
Matt Brubeck 8d80646e3b servo: Merge #10361 - Fixes for insertion point caret rendering (from mbrubeck:empty-caret); r=pcwalton
This contains several fixes for the code to position and render the insertion point.  The main effect is that the insertion point is now rendered correctly when in an empty input field.  See the individual commit messages for more detais.  r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: c191dff04e182e2fc38e9df3e8ba353b8d697827
2016-04-08 05:32:17 +05:01
Matt Brubeck 20d2c7fa57 servo: Merge #10402 - Avoid unnecessary Arc::clone and Arc::make_mut (from mbrubeck:make_mut); r=pcwalton
r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: 39ab006c8f71404d2fcd81f7715b7b9e47d5aead
2016-04-07 22:53:37 +05:01
Patrick Walton 3b41027007 servo: Merge #10450 - layout: Allow non-absolutely-positioned elements with `overflow: scroll` set to be scrolled (from pcwalton:overflow-scroll-non-positioned); r=mbrubeck
This makes them establish stacking contexts, which is a CSS 2.1 spec
violation. However, we were already violating the spec here for
absolutely-positioned elements with `overflow: scroll`. It will probably
be easier to fix this spec violation once we either switch entirely to
WebRender or we have multiple layers per stacking context.

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: e66e437ae66346883cb2cc700f84d06c44962be1
2016-04-07 21:01:13 +05:01
Mauricio Collares 14d64f2465 servo: Merge #10407 - Move some CSS properties to match Gecko's representation (from mauricioc:issue10403); r=bholley
Fixes #10403. Animation had an extra transition-delay property, which was also moved to Box. Let me know if I should squash the commits.

Source-Repo: https://github.com/servo/servo
Source-Revision: 256b865055c10082731b218f41373d47ad632062
2016-04-07 02:49:15 +05:01
Michael Howell b55c60ea5b servo: Merge #10419 - Whitespace stripping should not result in a dangling, open border (from notriddle:whitespace_border); r=mbrubeck
No open issue (found it while working on #7681).

Source-Repo: https://github.com/servo/servo
Source-Revision: cb943b016f77b9d670291c5026b8566b5c0d5edf
2016-04-06 15:01:51 +05:01
Mauricio Collares 84d58f50b6 servo: Merge #10406 - Move CSS image-rendering property from Effects to InheritedBox (from mauricioc:issue10404); r=bholley
Fixes #10404

Source-Repo: https://github.com/servo/servo
Source-Revision: 0d0e08638da02922353fb165c4d4f3aff59c2ab0
2016-04-06 01:03:03 +05:01
Daniel Robertson 85586d4677 servo: Merge #10330 - Compute available main and cross size of flex containers (from danlrobertson:flex-axes); r=SimonSapin
Compute the available main and cross size of flex containers, and add a helper for min/main constraints. Currently, this should only impact inline sizing. I wanted to get some feedback before I made more changes. Will probably need to be rebased if #10178 is merged first or visa versa.

Specs:
https://drafts.csswg.org/css-flexbox/#line-sizing
https://drafts.csswg.org/css2/visudet.html#min-max-widths
https://drafts.csswg.org/css2/visudet.html#min-max-heights

Source-Repo: https://github.com/servo/servo
Source-Revision: 2477cfc9b4ef7529c57806c91e5993d5734fd66b
2016-04-04 20:49:45 +05:01
Rizky Luthfianto 629a825885 servo: Merge #10034 - Implement Document#elementsFromPoint (from rilut:implement-elementsfrompoint); r=emilio
Fixes #9859.

I'm trying to implement Document#elementsFromPoint, which I need to reuse the `get_nodes_under_mouse` and `mouse_over` function which have been removed a days ago in #9715. So I added it back while I'm not sure if my implementation is correct. Any advice will be greatly appreciated.

Source-Repo: https://github.com/servo/servo
Source-Revision: 241518a7d2c26da421d0273f101550215576c5a7
2016-04-04 12:19:39 +05:01
Emilio Cobos Álvarez 6a77e7f71e servo: Merge #10252 - Implement ::selection pseudo-element (from emilio:selection); r=mbrubeck
It only supports `color` and `background`, for now, but it shouldn't be hard to add more properties (like text-shadow).

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: 723989b9dddeb9bcdc28dc7d640fd6fd7247a27f
2016-03-31 00:18:07 +05:01
Michael Howell 7a54015497 servo: Merge #10279 - Fix #10258 (from notriddle:issue_10258); r=mbrubeck
Respect border-box when computing the relative sizes of children.

Source-Repo: https://github.com/servo/servo
Source-Revision: 77444d00be7b6346b632385cb0c1f5e858ff50a2
2016-03-30 12:19:40 +05:01
Per Lundberg 206f878009 servo: Merge #10277 - Renamed TComputedValues to ComputedValues (from perlun:rename-tcomputedvalues-to-computedvalues); r=SimonSapin
This is a followup to #10210, and a continuation of #10185.

Source-Repo: https://github.com/servo/servo
Source-Revision: 0ec96ac02a6c40ffda98e1074ceb9874dd1fb3cb
2016-03-30 10:35:57 +05:01
Matt Brubeck d6e77ef96b servo: Merge #10255 - Reduce size of layout::fragment::Fragment struct (from mbrubeck:box-unscanned); r=pcwalton
This reduces the size of the SpecificFragmentInfo enum from 48 to 24.

r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: 44b2ba25471e77b89b417161beb312a2985791a1
2016-03-30 07:20:25 +05:01