Commit graph

37 commits

Author SHA1 Message Date
bors-servo
a3e8199c97 Auto merge of #12388 - kilobtye:textarea2, r=pcwalton
Let textarea wrap lines

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

<!-- 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/12388)
<!-- Reviewable:end -->
2016-07-26 08:31:49 -05:00
kilobtye
0a86543e6d Let textarea wrap lines 2016-07-26 20:38:11 +08:00
kilobtye
b9f8df1776 Make textarea scrollable 2016-07-16 12:56:35 +08:00
Connor Brewster
50096c21b0 Use proper comment syntax in servo.css 2016-06-30 11:12:01 -06:00
Zhen Zhang
6a5a4f2de5 add button for file-type input element 2016-06-26 10:22:07 +08:00
Tara
526e795f1c Change the font-size property for input and textarea
Change the `font-size` property for `input` and `textarea` from 0.7em
to 0.8333em.
2016-06-01 04:09:54 -05:00
Per Lundberg
d2469f0cde Reformatted servo.css
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.
2016-05-15 00:27:49 +03:00
Zaggy1024
f3f1504003 Changed cursor for labels to "default" so their text doesn't use the text cursor. 2016-05-08 02:29:19 -05:00
bors-servo
e65009f317 Auto merge of #10809 - perlun:sendoushi-master, r=jdm
Fixed line-height for input and textarea + use correct font

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.)

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10809)
<!-- Reviewable:end -->
2016-05-01 16:22:17 -07:00
Per Lundberg
220722e321 Fixed test failures. 2016-05-01 22:37:40 +03:00
Emilio Cobos Álvarez
cf5c090576
layout: Don't force to overwrite display for pseudo-elements. 2016-04-29 22:54:49 +02:00
Emilio Cobos Álvarez
2a499d5a0b
layout: Stop storing PrecomputedStyleData in LayoutNode
Use the SharedStyleContext instead.
2016-04-29 22:54:48 +02:00
Emilio Cobos Álvarez
3563ecb770
style: Use precomputation for the -servo-details-content pseudo-element 2016-04-29 22:54:45 +02:00
Joel Santos
adf68626bd Fixed line-height for input and textarea + use correct font
* [fix] Input line height and styling
* [new] Input line height ref test
* [fix] Test for input in manifest
* Updated CSS tests with new expected failures.
2016-04-29 23:25:26 +03:00
Arpad Borsos
606b11c0ec do not render svg children, fixes #10646 2016-04-25 14:28:43 +02:00
bors-servo
0397e2a24d Auto merge of #10299 - mbrubeck:selection-style, r=jdm
Set a default ::selection style

Since we no longer have a hard-coded default after #10252.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10299)
<!-- Reviewable:end -->
2016-04-01 20:15:32 +05:30
Matt Brubeck
53250b3827 Set a default ::selection style 2016-03-30 18:05:34 -07:00
Nazım Can Altınova
c13ea8a253 Make input elements not inherit parent containers alignment
Added a reftest for input element's alignment

Added float: left beacause text-align: center centers the input's itself.

Removed 'rtl' alignment
2016-03-31 01:35:36 +03:00
Michael Howell
9d9c5398a8 Get the fundamentals of the HTMLDetailsElement rendering stuff working.
Still need to implement the style invalidation.

Part of #9395
2016-03-19 16:02:11 -07:00
Simon Sapin
79656278f2 Hide overflow of <input>, fix #9477 2016-03-04 19:48:19 +01:00
Simon Sapin
428dab1069 Use cursor: text in text input areas
… not just over text.

Fix #9486.
2016-03-04 15:44:39 +01:00
Jan-Erik Rediger
dbe43237cc Move inline-block styling to user-agent and add button
Fixes #8064
2015-10-25 18:35:42 +01:00
bors-servo
ab42ca4296 Auto merge of #7825 - eefriedman:div-align, r=mbrubeck
Fully implement the "align descendants" rule for div.

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.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7825)
<!-- Reviewable:end -->
2015-10-08 12:20:55 -06:00
Josh Matthews
9ed0ae4a7a Style <select multiple> appropriately. 2015-10-04 14:35:17 -04:00
Eli Friedman
69ca066802 Fully implement the "align descendants" rule for div.
This adds -servo-left and -servo-right to complement -servo-center.

This intentionally doesn't try to address issue #7301.
2015-10-02 12:53:20 -07:00
Patrick Walton
4e0fb1ed61 resources: Improve the look of form widgets a bit.
* 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.
2015-08-22 12:19:28 -07:00
Patrick Walton
4b9cd4e65d layout: Implement <table width> and <center>.
Improves Hacker News.
2015-05-11 12:53:45 -07:00
Patrick Walton
79336d21b5 style: Disregard the size attribute for input elements other than text
or password fields.

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.
2015-04-24 17:33:53 -07:00
Patrick Walton
7371e0b8e3 compositing: Implement cursor per CSS3-UI § 8.1.1 in the CEF/Mac port.
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).
2014-12-17 22:58:52 -08:00
Matthew Rasmus
504f968b20 Implements :indeterminate pseudo-class
Addresses reviews
2014-12-16 11:34:04 -08:00
Matthew Rasmus
1b84bd22b8 Implements the :checked pseudo-class for inputs
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.
2014-12-08 08:40:15 -08:00
Matthew Rasmus
e520cfd86b servo.css: Style <button> like <input type=button> 2014-12-07 13:00:04 -08:00
Matthew Rasmus
29241699fd Implements multi line text input for TextArea 2014-12-05 12:21:31 -08:00
donaldpipowitch
033992348c wide form buttons fixes #3972 2014-11-18 12:16:17 +01:00
Patrick Walton
5f8d3f72d8 layout: Introduce support for legacy presentational attributes to selector
matching, and use it for `<input size>` and `<td width>`.

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.
2014-10-14 12:44:09 -07:00
Simon Sapin
68b11a4447 Update reftests for UA stylesheet changes. 2014-10-13 12:38:07 +01:00
Simon Sapin
e9ebfb74fc Rewrite the user-agent stysheet(s)
Based on https://html.spec.whatwg.org/multipage/rendering.html
rather than http://dev.w3.org/csswg/css2/grammar.html
2014-10-10 17:27:38 +01:00