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

35 Коммитов

Автор SHA1 Сообщение Дата
Pu Xingyu 9dbfd77cb1 servo: Merge #16265 - Inherit 'text-overflow' and 'overflow' in text fragment (from stshine:oh-box-model); r=emilio
This is an implementation detail that is necessary for 'text-overflow'
to work properly.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 1e6bd4a134a2cc0ebaef4af771fa8f4368426af2

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 91901414fe722f1c8bc59a83b70f181610c08983
2017-04-05 15:09:14 -05:00
Pu Xingyu 6f26be4ea1 servo: Merge #16096 - Use Servo-specific pseudo elements for anonymous box and text (from stshine:die-modify-style-die); r=emilio
<!-- Please describe your changes on the following line: -->

Use some fake pseudo elements to style servo-specific boxes in servo. Also, Since for nested inline elements non-inheritable properties are properly stored in the inline context of an inline fragment, so get
rid of them on the style using empty pseudo to do cascading.

---
<!-- 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 #5625 (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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 449758ef5dd399f7e1a5a9550dcdd614056cee9e

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : cd55c9aba7e57bf92d9c386fc8a17fd5fafe95b3
2017-04-01 06:02:08 -05:00
Patrick Walton dff6bf022d servo: Merge #13870 - layout: Rewrite anonymous table code, simplify and fix table intrinsic width calculation, and improve safety of flexbox code (from pcwalton:anonymous-table-rewrite); r=mbrubeck
Closes #13782.

Source-Repo: https://github.com/servo/servo
Source-Revision: 6b40f97289c4c5a20b539992c3d511b3bf470f28
2016-10-26 20:14:04 -05:00
Patrick Walton e87bbe3700 servo: Merge #13602 - layout: Rewrite Servo's `vertical-align` support to match CSS 2.1 § 10.8, and implement `vertical-align: middle` per CSS 2.1 § 10.8.1 (from pcwalton:vertical-align-middle); r=mbrubeck
`InlineMetrics` has been split into `InlineMetrics` for fragments and
`LineMetrics` for lines. Both structures' fields have been renamed in
order to more clearly delineate the difference between *space* and
*content*. Vertical positioning of fragments has been reworked to take
margins and borders into account only for replaced content.

This patch fixes the `vertical_align_super_a.html` reftest. Servo now
matches the rendering that Gecko and WebKit produce.

Additionally, this includes a test for the popular inline-block
centering technique described here:
https://s.codepen.io/shshaw/fullpage/gEiDt?#Inline-Block

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: 768a699fa5d822173b2247d6348413d09951a8bb
2016-10-11 15:33:47 -05:00
Patrick Walton b3b313caef servo: Merge #13445 - resources: Give button elements `white-space: normal` again (from pcwalton:button-whitespace); r=mbrubeck
Fixes Twitter.

Originally regressed in 0a86543e6decf02860a5a98c46e01940e79af6fa.

r? @metajack

Source-Repo: https://github.com/servo/servo
Source-Revision: 6693c92c03c9bfffaa748246416d4db795a6a988
2016-09-30 13:16:56 -05:00
Jonathan Schuster 6f807dc02b servo: Merge #13354 - Style input-text pseudo with user-agent CSS (from schuster:input-text-style); r=pcwalton
This changes the input-text pseudo-element to be styled with user-agent CSS rather than having a hard-coded style, as part of #8570

---
<!-- 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 they're a refactoring of existing functionality

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 28ebab43987b0f9829a03a3c043e621cae2db1fe
2016-09-23 21:08:19 -05:00
kilobtye 790945c8c7 servo: Merge #12388 - Let textarea wrap lines (from kilobtye:textarea2); r=pcwalton
<!-- Please describe your changes on the following line: -->
1. Change textarea's style from white-space: pre to white-space: pre-wrap.
2. Display insertion point when a line is wrapped.

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

<!-- Either: -->
- [ ] 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: a3e8199c97fc0cb61f199d2bda218fe695f04b8c
2016-07-26 08:31:49 -05:00
kilobtye 7bf9bf9fc8 servo: Merge #12364 - Make textarea scrollable (from kilobtye:textarea); r=jdm
<!-- 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 #10058 (github issue number if applicable).

<!-- Either: -->
- [ ] 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 8c1be9b07ce2dbdd1fe696e3315bc4528846b419
2016-07-17 13:52:46 -07:00
Connor Brewster cd3a3c90c6 servo: Merge #11964 - Use proper comment syntax in servo.css (from cbrewster:fix_ua_comment); r=asajeffrey
<!-- 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 #11963 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because using proper comment syntax in css.

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 0ae07e07e6c75e630ba0a5eaf95fa1046c6737c2
2016-06-30 23:19:28 -07:00
Zhen Zhang cab9f7ac05 servo: Merge #11869 - add button for file-type input element (from izgzhen:button-input-file); r=Manishearth
---
<!-- 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 #__ (github issue number if applicable).

- [x] These changes do not require tests because it is UI code

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 3a453a4a8bbe0292eaed5c82001453289bf8a853
2016-06-28 06:10:44 -05:00
Tara d31ded6ecc servo: Merge #11540 - Change the font-size property for input and textarea (from taravancil:input-text-size); r=mbrubeck
Change the `font-size` property for `input` and `textarea` from 0.7em to 0.8333em.

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

- [ ] There are tests for these changes OR
- [X] These changes do not require tests because the issue has the label `C-has-test` Forgive me if I'm wrong; this is my first time contributing to Servo!

Source-Repo: https://github.com/servo/servo
Source-Revision: 592842ccc3884d72d3a62d02334b2c80746c5722
2016-06-02 10:49:50 -05:00
Per Lundberg 7a4ddaa1cd servo: Merge #11186 - Reformatted servo.css (from perlun:reformat-servo-css); r=Wafflespeanut
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes do not require tests because it doesn't introduce new functionality.

----

As discussed in #10553, we should consider splitting the long lines in this file onto separate lines (one per css attribute), to make it more readable and maintainable in general.

I also added blank lines where I felt it was applicable.

Source-Repo: https://github.com/servo/servo
Source-Revision: c193af8c32e87c146f5a45d06d3c6086f56be820
2016-05-15 01:21:29 -07:00
Zaggy1024 d396e5615b servo: Merge #11079 - Changed cursor for labels to "default" so their text doesn't use the text cursor (from Zaggy1024:label-cursor); r=pcwalton
The cursor in Firefox and Chrome for labels is always the default cursor rather than changing to the text cursor on text. In Edge, however, this only applies to the text of the actual label element.

This PR changes Servo to match Firefox and Chrome.

A convenient example of an element that this style applies to (and has different behavior between Firefox and Edge) is the "This repository" label for the search input at the top on Github.

Source-Repo: https://github.com/servo/servo
Source-Revision: 03465ad8c77f03ae2f538d046ae1e1dc86f04723
2016-05-12 19:45:38 -07:00
Per Lundberg 02045779f3 servo: Merge #10809 - Fixed line-height for input and textarea + use correct font (from perlun:sendoushi-master); r=jdm
Fixes #10532.

Replaces #10553 since @Sendoushi had problems getting a proper rebase locally, so helping him out to get this merged.

(Credits to Sendoushi who did the actual changes; I'm just helping out to getting things into a mergeable state.)

Source-Repo: https://github.com/servo/servo
Source-Revision: e65009f317e64b480bd6f6ff4a09fde54507484f
2016-05-01 16:22:17 -07:00
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
Arpad Borsos f6a1f9d3ab servo: Merge #10684 - do not render svg children, fixes #10646 (from Swatinem:hide_svg); r=Ms2ger
r? jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: 97a45dc30c007af441376493a02eb7604f3e5672
2016-04-25 05:55:42 -07:00
Matt Brubeck fb608acd65 servo: Merge #10299 - Set a default ::selection style (from mbrubeck:selection-style); r=jdm
Since we no longer have a hard-coded default after #10252.

Source-Repo: https://github.com/servo/servo
Source-Revision: 0397e2a24d3e5c988b089ef100002397f4cabdfa
2016-04-01 19:46:32 +05:01
Nazım Can Altınova a843e1077a servo: Merge #10249 - Make input elements not inherit parent containers alignment (from canaltinova:master); r=jdm
Fixes  #10234 .

Source-Repo: https://github.com/servo/servo
Source-Revision: f10c01cd39842e7a98198e8b9edd11fb59306157
2016-03-31 22:21:29 +05:01
Michael Howell 802d6fe7b4 servo: Merge #9586 - Details ui (from notriddle:details_ui); r=SimonSapin
Requires a patch to rust-selectors, and doesn't currently recalculate the styles correctly (which is needed to make actual toggling work correctly).

Still trying to figure out what it takes to get style recalc to do what this needs.

Source-Repo: https://github.com/servo/servo
Source-Revision: 090da52913a47e027a96d4f6a39c56e55b9db811
2016-03-20 12:58:59 +05:01
Simon Sapin 5ec3702057 servo: Merge #9875 - Hide overflow of <input> (from servo:overflow-clip-box); r=mbrubeck
Fix #9477

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: b46d2e2737c174d79681e73f3dbf881624373268
2016-03-05 00:24:33 +05:01
Simon Sapin 396c32bf7e servo: Merge #9872 - Use `cursor: text` in text input areas (from servo:cursor-text); r=nox
… not just over text.

Fix #9486.

Source-Repo: https://github.com/servo/servo
Source-Revision: b4cae84e9e87c5a978274e9ceac540de8a95a5e4
2016-03-04 19:45:56 +05:01
Jan-Erik Rediger 96e291aab5 servo: Merge #8070 - Move inline-block styling to user-agent and add button (from badboy:inline-block-for-button); r=jdm
First Servo PR for me. \o/

Fixes #8064

Source-Repo: https://github.com/servo/servo
Source-Revision: 41df37cf1b2f305a879d6bb1a2be3460f6ad23b6
2015-10-25 12:43:00 -05:00
Eli Friedman 115d4c54e5 servo: Merge #7825 - Fully implement the "align descendants" rule for div (from eefriedman:div-align); r=mbrubeck
This adds -servo-left and -servo-right to complement -servo-center.

~~This intentionally doesn't try to address issue #7301.~~  Commit added to address #7301.

Source-Repo: https://github.com/servo/servo
Source-Revision: ab42ca42967354cba08d1dca83aa99a637bd7a6b
2015-10-08 12:20:55 -06:00
Josh Matthews 19cffaa15a servo: Merge #7847 - Style <select multiple> appropriately (from jdm:selectstyling); r=Manishearth
<img width="216" alt="screen shot 2015-10-04 at 2 33 36 pm" src="https://cloud.githubusercontent.com/assets/27658/10269411/ec1b5bce-6aa4-11e5-8ce8-0f22425ea3d4.png">

Source-Repo: https://github.com/servo/servo
Source-Revision: 460f067b9da42cf7663f22428547b81f43ea60c1
2015-10-04 12:49:26 -06:00
Patrick Walton e5b20e7609 servo: Merge #7314 - resources: Improve the look of form widgets a bit (from pcwalton:minor-form-beautification); r=mbrubeck
* Don't display unselected `<option>` elements inside `<select>`
  dropdowns.

* Use CSS triangles to give `<select>` dropdowns a down arrow in order
  to make them look as intended.

* Use borders instead of `( )` and `[ ]` for radio buttons and check
  boxes, respectively.

Improves facebook.com and IMDB.

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: d78527feb626b72427392fac0f54d8669bc6e00f
2015-08-22 13:20:11 -06:00
Patrick Walton dc52df6960 servo: Merge #5980 - layout: Implement `<table width>` and `<center>` (from pcwalton:table-width-and-center); r=mbrubeck
Improves Hacker News.

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: c1e15e827edeef264afbbf1eae4be46de19fa0ef
2015-05-11 15:25:42 -05:00
Patrick Walton 27d72a281c servo: Merge #5836 - style: Disregard the `size` attribute for input elements other than text or password fields (from pcwalton:input-size); r=mbrubeck
HTML5 § 4.10.5.3.2 doesn't explicitly say to do this, but all other
browser engines seem to do it.

Improves the Google home page.

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: f010c8331304dcdd40f40fe844087399078532d0
2015-04-24 20:06:41 -05:00
Patrick Walton cda269baf7 servo: Merge #4358 - compositing: Implement `cursor` per CSS3-UI § 8.1.1 in the CEF/Mac port (from pcwalton:cursor); r=mbrubeck
I'm not sure how we want to handle Linux cursors, and GLFW has no
ability to set cursors (short of disabling it and managing it yourself).

If you test this in the wild you will probably hit #4357 until that PR lands.

Source-Repo: https://github.com/servo/servo
Source-Revision: e2267e0a0749e27046ee8a26ba514cc6865e0345
2014-12-18 00:24:49 -07:00
Matthew Rasmus 4f922915fe servo: Merge #4133 - Implements basic form resetting (from mttr:form_resetting); r=jdm
We can reset `<input type=text>` fields! I wish I could've done something with checkboxes, but unfortunately, that's it for now.

In addition to that, this PR implements `HTMLInputAttribute.defaultValue`, updates wpt-test to expect passing tests as a result of that implementation, and fixes an index error crash with text inputs.

edit: also includes an html example where one may lazily watch form resets in action: ` tests/html/form_reset_handsfree.html`

Source-Repo: https://github.com/servo/servo
Source-Revision: 5951056973fc0e08e70224214740a274ca8ef20f
2014-12-16 15:03:49 -07:00
Matthew Rasmus 0c6c8fc464 servo: Merge #4190 - Implements the :checked pseudo-class for inputs (from mttr:checked_pseudo_class); r=Manishearth
Relevant spec:
https://html.spec.whatwg.org/multipage/scripting.html#selector-checked

Also modifies HTMLInputElement::SetChecked to no longer modify its
checked content value, instead making use of its internal checkedness
state now that we can match `:checked` properly.

Source-Repo: https://github.com/servo/servo
Source-Revision: f18c18371d2bb5edde9d64e46b74bf01411afab3
2014-12-08 12:01:51 -07:00
Matthew Rasmus 0f1fe27243 servo: Merge #4277 - servo.css: Style <button> like <input type=button> (from mttr:style_button_element); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: 673dc339712ea58bc6a4d4c90d556e5c9e84a65a
2014-12-07 22:22:07 -07:00
Matthew Rasmus a343b1461d servo: Merge #4152 - Implements multi line text input for TextArea (from mttr:textview); r=jdm
Fixes #3918

Can be tested in `tests/html/textarea.html`. Also implemented some content reflecting IDL attributes for HTMLTextAreaElement while I was in there.

There are some major problems with TextInput when Multiple is enabled that I haven't addressed here, but I'm prepared to open up a follow-up issue.

Source-Repo: https://github.com/servo/servo
Source-Revision: a369dcfa01f5ad7634469f3a3b652d7f650129a0
2014-12-05 16:25:07 -07:00
donaldpipowitch 0d92a68737 servo: Merge #4031 - wide form buttons fixes #3972 (from donaldpipowitch:wide-form-buttons); r=jdm
My first pull request to servo \o/

Try to fix https://github.com/servo/servo/issues/3972. Tested with `./mach run tests/html/test-inputs.html`.
Any reasons why this CSS is formatted this way? (All properties on the same line. Looks a little bit _generated_?)

Source-Repo: https://github.com/servo/servo
Source-Revision: 51e1f56ff73f46c65f79ccd07dcabed9d76fd8e9
2014-11-18 09:06:33 -07:00
Patrick Walton 0aeca90f2d servo: Merge #3622 - layout: Introduce support for legacy presentational attributes to selector matching, and use it for `<input size>` and `<td width>` (from pcwalton:html4ever); r=jdm
This implements a general framework for legacy presentational attributes
to the DOM and style calculation, so that adding more of them later will
be straightforward.

Source-Repo: https://github.com/servo/servo
Source-Revision: 0aeecfc41d5f0c637960fcddf87cc2db3e5efeea
2014-10-14 14:06:36 -06:00
Simon Sapin 9e98fa0dba servo: Merge #3635 - Rewrite the user-agent stysheet(s) (from SimonSapin:ua-stylesheet); r=pcwalton
Based on https://html.spec.whatwg.org/multipage/rendering.html rather than http://dev.w3.org/csswg/css2/grammar.html

Fixes #3629.

r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: 6e3c77638723894d5c133bcaec85b442634662f1
2014-10-13 12:21:44 -06:00