Ms2ger
bea96f60e3
Introduce PartialStyleAndLayoutData.
2016-06-20 19:02:39 +02:00
Ms2ger
6aaf3e6a01
Move OpaqueStyleAndLayoutData to script_layout_interface.
2016-06-20 19:02:38 +02:00
Ms2ger
5c03dd8eb1
Introduce a script_layout_interface crate and move RestyleDamage to it.
2016-06-20 19:02:36 +02:00
Ms2ger
e723d72570
Move the initialize_data method out of the TNode trait.
...
This reduces the dependency of TNode implementations on layout types.
2016-06-13 15:21:29 +01:00
Ms2ger
172aa226cc
Use Ref/RefMut::map rather than transmute for ServoLayoutNode.
2016-06-13 12:29:14 +01:00
Ms2ger
6a1722e18d
Make layout only depend on script::layout_interface.
2016-06-07 13:46:49 +02:00
Ms2ger
684510bc94
Stop re-exporting AttrValue.
2016-06-07 13:15:23 +02:00
Ms2ger
858ea2eb9a
Move the definition of ServoThreadSafeLayoutNode::iframe_pipeline_id to script.
2016-06-07 11:39:28 +02:00
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