Ms2ger
5859109197
Move the definition of ServoThreadSafeLayoutNode::canvas_data to script.
2016-06-07 11:10:40 +02:00
Ms2ger
ef3c6a7773
Move the definition of ServoThreadSafeLayoutNode::image_url to script.
2016-06-07 10:57:20 +02:00
Ms2ger
093b7b7710
Move the definition of ServoThreadSafeLayoutNode::selection to script.
2016-06-07 10:30:52 +02:00
Anthony Ramine
ff899dc703
Implement :placeholder-shown ( fixes #10561 )
2016-06-03 14:45:14 +02:00
Josh Matthews
3cb8af20c2
Remove empty lines following braces.
2016-05-27 13:32:05 -04:00
Bobby Holley
b521c293dc
Add string_cache override for geckolib based on gecko atoms.
...
The work in these patches is based on Ms2ger's gecko-atom crate.
2016-05-18 11:33:38 -07:00
Per Lundberg
2f7ed1d73e
Removed unused imports
...
This fixes #11185 .
2016-05-15 22:24:26 +03:00
Ms2ger
a5be5a82c1
Move some code from ServoThreadSafeLayoutNode::text_content into script.
2016-05-09 14:26:30 +02:00
Emilio Cobos Álvarez
aacf67afcd
layout: use debug!
instead of warn!
for the expected ThreadSafeLayoutElement methods
2016-05-04 00:34:05 +02:00
Emilio Cobos Álvarez
a87bf7c776
style: Minor documentation tweaks about lazy pseudo-elements
2016-05-04 00:34:00 +02:00
Emilio Cobos Álvarez
028f9b6cd2
style: layout: Allow a lazy pseudo-element implementation in Servo.
2016-05-04 00:33:58 +02:00
Emilio Cobos Álvarez
9caaa6004e
style: Support lazy pseudo-elements
...
These can't be supported in Servo as of right now, because I'm not
totally sure the accesses that should be done in layout would be
thread-safe.
It can be revisited later though.
2016-05-03 19:01:54 +02:00
Emilio Cobos Álvarez
9c44062836
layout: be clearer about resolved_style
2016-04-29 22:54:52 +02:00
Emilio Cobos Álvarez
5577a083ec
layout: Simplify ThreadSafeLayout::text_content
2016-04-29 22:54:50 +02: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
979c3a54b9
layout: Tidy a bit style pseudo-elements stuff
2016-04-29 22:54:47 +02:00
Emilio Cobos Álvarez
5a43c7e3cd
style: Allow inheritance when computing anonymous box styles
...
This is used a lot by Gecko, not still for servo though.
2016-04-29 22:54:46 +02:00
Emilio Cobos Álvarez
3563ecb770
style: Use precomputation for the -servo-details-content pseudo-element
2016-04-29 22:54:45 +02:00
Emilio Cobos Álvarez
b6402a81d0
style: Add infrastructure for non-eagerly-cascaded pseudo-elements
...
This commit also removes StylistWrapper and uses Arc::get_mut instead.
2016-04-29 22:54:45 +02:00
bors-servo
ac8406f4ae
Auto merge of #10834 - yoava333:master, r=SimonSapin
...
added support for :read-only and :read-write pseudo-classes
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
<!-- 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/10834 )
<!-- Reviewable:end -->
2016-04-29 08:12:18 -07:00
Matt Brubeck
c4872d9544
Replace range::Range with std::ops::Range in script
2016-04-28 14:54:07 -07:00
Matt Brubeck
659305fe0a
Use byte indices instead of char indices for text runs
...
Replace character indices with UTF-8 byte offsets throughout the code dealing
with text shaping and breaking. This eliminates a lot of complexity when
converting from one to the other, and interoperates better with the rest of
the Rust ecosystem.
2016-04-28 14:32:14 -07:00
Yoav Alon
9bf909ac2f
added support for :read-only and :read-write pseudo-classes
...
partial fix for https://github.com/servo/servo/issues/10732
2016-04-27 01:38:58 +03:00
Michael Howell
5a90c8f2bd
Do not render the contents of block-level replaced elements.
...
Fixes #10733
2016-04-22 22:24:09 -07:00
Zhen Zhang
fefdaf76de
Implement ScrollTop and ScrollLeft getters:
...
Add new compositor message to get scroll_offset;
Add new layout query for computed value of overflow-x/y;
Implement layer_id method for ThreadSafeLayoutNode;
Add new layout query for layer_id;
Implement script interface for getting scrollTop and scrollLeft, as well as relavant helper functions.
2016-04-19 12:27:35 +08:00
Keith Yeung
c9193eaeca
Remove get_ prefix for functions in LayoutHTMLInputElementHelpers
2016-04-11 09:17:04 -04:00
Mauricio Collares
841aef06e0
Move CSS content property from Box to Counters
2016-04-05 00:21:47 -03:00
Emilio Cobos Álvarez
92f39ea5cf
Implement ::selection pseudo-element
2016-03-30 14:28:11 +02:00
Per Lundberg
4cb4cc93e4
Renamed TComputedValues to ComputedValues
...
This is a followup to #10210 , and a continuation of #10185 .
2016-03-29 23:30:13 +03:00
Per Lundberg
c2ad084713
ComputedValues is now ServoComputedValues
...
This is the first part of #10185 . More to follow. I have built this locally with both servo and geckolib without errors; let's see if it succeeds on all platforms as well.
2016-03-27 10:55:43 +03:00
bors-servo
bed91b3334
Auto merge of #10176 - mbrubeck:selection-range, r=pcwalton
...
Highlight selected text in input fields
Fixes #9993 . This does not yet allow stylesheets to set the selection colors; instead it uses a hard-coded orange background and white foreground.
r? @pcwalton
<!-- 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/10176 )
<!-- Reviewable:end -->
2016-03-26 08:16:20 +05:30
Matt Brubeck
6171000875
Highlight selected text in input fields
...
Fixes #9993 . This does not yet allow stylesheets to set the selection colors;
instead it uses a hard-coded orange background and white foreground.
2016-03-24 18:33:26 -07:00
Bobby Holley
c2daea2c9c
Parameterize the rest of the style system on TNode.
2016-03-24 11:50:57 -07: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
Bobby Holley
539f839958
Remove lifetimes from LayoutNode and friends.
2016-03-14 14:31:57 -07:00
Bobby Holley
b1878bd925
Remove lifetimes from T{Node,Element,Document}.
2016-03-14 14:31:57 -07:00
Matt Brubeck
973918967f
Dirty elements whose selectors are affected by sibling changes
...
This fixes incremental layout of nodes that match pseudo-class selectors such
as :first-child, :nth-child, :last-child, :first-of-type, etc.
* Fixes #8191
* Fixes #9063
* Fixes #9303
* Fixes #9448
This code is based on the following flags from Gecko:
https://hg.mozilla.org/mozilla-central/file/e1cf617a1f28/dom/base/nsINode.h#l134
2016-02-23 17:31:38 -08:00
Emilio Cobos Álvarez
61e04df266
style: Refactor the per_pseudo map from StyleData to avoid having an option value type.
...
This make the layout code way clearer.
2016-02-13 16:05:17 +01:00
Emilio Cobos Álvarez
dd503dfacb
Refactor style to be completely backend-independent
...
This commit refactors the style crate to be completely independent of
the actual implementation and pseudo-elements supported.
This also adds a gecko backend which introduces parsing for the
anonymous box pseudo-elements[1], although there's still no way of
querying them.
https://mxr.mozilla.org/mozilla-central/source/layout/style/nsCSSAnonBoxList.h
2016-02-13 16:05:14 +01:00
Emilio Cobos Álvarez
a1c830f1c1
Update rust-selectors
...
This commits updates rust-selectors to use the generic parser, and as
such it moves the element state into the style crate.
2016-02-03 02:11:31 +01:00
Simon Sapin
9abbd1b5d1
Sequentialize assign_block_size for flows that can be fragmented.
...
Fragmentation will be intertwined with block size calculation.
2016-01-28 09:42:17 +01:00
Simon Sapin
da2b4ab381
Disable incremental reflow for multicol and their descendants.
...
Fragmentation with dynamic updates is hard.
2016-01-27 17:33:12 +01:00
Bobby Holley
84f24a04a4
Basic wrappers and glue for GeckoLib.
2016-01-13 12:14:00 -08:00
Bobby Holley
77b1027646
Hoist style() and unstyle() into TNode.
2016-01-12 13:16:05 -08:00
bors-servo
099beee85c
Auto merge of #8983 - Manishearth:cursors, r=jdm
...
Various textinput fixes
- Currently the cursor sticks around if you click elsewhere. Now the text inputs are relayout-ed on blur.
- Currently whitespace gets collapsed in text input (https://github.com/servo/servo/issues/8772 ). Not anymore.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8983 )
<!-- Reviewable:end -->
2016-01-11 23:21:03 +05:30
rohan.prinja
1f02c4ebbb
task -> thread
2016-01-10 17:58:13 +09:00
Bobby Holley
ebc5eb1b98
Make parallel DOM traversal and style calculation operate on TNode instead of LayoutNode.
2016-01-06 17:58:53 -08:00
Bobby Holley
27987c3bb4
Introduce a concept of restyle damage to the style system.
...
We can't hoist RestyleDamage itself, because it's very layout-dependent. But this
should be enough to let us hoist the things we need.
2016-01-04 09:38:04 -08:00
Manish Goregaokar
23e7dfa57b
Relayout text input elements on blur
2016-01-03 13:18:24 +05:30