Anthony Ramine
72c0771299
Make a bunch of LayoutDocumentHelpers be safe
...
The other methods are actually unsafe.
2020-03-31 21:39:45 +02:00
Anthony Ramine
fbc3e430ab
Make a bunch or trivial LayoutElementHelpers safe
2020-03-31 20:37:57 +02:00
Anthony Ramine
5ff931d171
Introduce <LayoutDom<Element>>::attrs()
...
This safe method is the basic block to access element attributes from layout.
We reuse it in the other attr-related layout methods to remove a pretty big
source of rampant unsafe code between script and layout.
2020-03-31 18:46:49 +02:00
Anthony Ramine
0bda174823
Merge RawLayoutElementHelpers into LayoutElementHelpers
2020-03-31 18:30:42 +02:00
Anthony Ramine
6fe294fa5b
Make LayoutNodeHelpers::text_content return a cow
2020-03-31 15:02:13 +02:00
Anthony Ramine
409bd3d989
Make LayoutCharacterDataHelpers::data_for_layout be safe
2020-03-31 14:57:44 +02:00
Anthony Ramine
86296b84ff
Clean up LayoutShadowRootHelpers::get_style_data_for_layout
...
Parameter E is unused and the result should be bound by 'dom.
2020-03-30 13:07:25 +02:00
Anthony Ramine
dba6a635e5
Give a lifetime parameter to LayoutDom
2020-03-28 15:37:57 +01:00
Anthony Ramine
60ca98b753
Pass pending restyles instead of draining them from layout
2020-03-28 15:37:56 +01:00
Anthony Ramine
400c7012b1
Make ServoLayoutNode::new return a free lifetime value
...
Binding the scope of the ServoLayoutNode value to the originating
TrustedNodeAddress is just theater.
2020-03-28 14:06:08 +01:00
Anthony Ramine
df0118dd10
Move PendingRestyle to the style_layout_interface crate
2020-03-28 14:00:53 +01:00
Anthony Ramine
04af32128c
Add a 'dom lifetime to GetLayoutData
2020-03-26 13:17:46 +01:00
Patrick Shaughnessy
8ca4db2cd6
:defined works
2020-01-30 10:09:51 -05:00
Emilio Cobos Álvarez
226c9807df
style: Fix servo build.
2019-11-30 20:45:08 +01:00
Fernando Jiménez Moreno
a3d0d95b61
Moar detach shadow improvements
2019-07-22 17:40:17 +02:00
Fernando Jiménez Moreno
1f3c879a85
Detach shadow clean up
2019-07-22 17:40:16 +02:00
Fernando Jiménez Moreno
e344203c11
Only allow UA widgets as children of media elements
...
Do not allow pseudo-elements for replaced elements
2019-07-22 17:40:15 +02:00
Emilio Cobos Álvarez
add08518cd
Fix style system build with recent changes.
2019-06-25 13:11:32 +02:00
Evgeniy Reizner
6f1df517e0
style: Do not use borrowed types in the selectors::Element trait.
...
Closes #22972
Closes #23463
2019-06-04 01:04:03 -04:00
Emilio Cobos Álvarez
66056bd4d5
script: Fix Servo build.
2019-05-29 16:14:36 +02:00
Emilio Cobos Álvarez
0000e4cec2
layout: fix Servo build.
2019-05-07 12:56:10 +02:00
Fernando Jiménez Moreno
68bee1c771
Final nits; fix custom elements rare data usage; s/owner_s_r/containing_s_r
...
Clarify special case for containing_shadow_root and add it to layout
accessor
2019-04-29 12:02:04 +02:00
Fernando Jiménez Moreno
59c634b259
Set dirty descendants if node is connected
2019-04-26 12:00:26 +02:00
Fernando Jiménez Moreno
5a165c6bd8
Move is_connected function from style to layout, where it is used
2019-04-26 11:42:38 +02:00
Fernando Jiménez Moreno
bdd2f32c0f
Minor tweaks: rename composed_parent_node_ref, remove or update outdated comments...
2019-04-26 11:42:37 +02:00
Fernando Jiménez Moreno
0313e38074
Tweak list of shadow roots attached to doc
2019-04-26 11:42:37 +02:00
Fernando Jiménez Moreno
3e63655018
Make ServoShadowRoot.flush_stylesheets unsafe
2019-04-26 11:31:18 +02:00
Fernando Jiménez Moreno
2674a3e717
Flush shadow roots stylesheets only if they changed
2019-04-26 11:31:17 +02:00
Fernando Jiménez Moreno
a841c713d6
Minor layout thread cleanups:
...
- lifetime naming
- unrequired reference removal
- containing_shadow_host getter simplification
- use stylist.device getter where possible
2019-04-26 11:31:17 +02:00
Fernando Jiménez Moreno
00178aff4d
Derive PartialEq for ServoShadowRoot
2019-04-26 11:31:17 +02:00
Fernando Jiménez Moreno
d7b6a6f509
Do not set dirty out-of-doc nodes
2019-04-26 11:31:16 +02:00
Fernando Jiménez Moreno
519cc2c317
Invalidate and flush shadow tree stylesheets where needed
2019-04-26 10:17:47 +02:00
Fernando Jiménez Moreno
cd07574235
Expose a way to flush shadow root stylesheets from layout
2019-04-26 10:17:47 +02:00
Fernando Jiménez Moreno
e9f0e76d3c
Implement TShadowRoot::style_data
2019-04-26 10:17:47 +02:00
Fernando Jiménez Moreno
d2e1a3ab33
Adapt traversals for shadow dom
2019-04-26 10:17:46 +02:00
Fernando Jiménez Moreno
7c9e8aa4cc
First bits of shadow dom layout
2019-04-26 10:17:46 +02:00
Fernando Jiménez Moreno
441357b74e
Add is_connected flag to node and use it to replace most uses of is_in_doc
2019-04-26 10:17:45 +02:00
Ian Moody
8d7fe68ac3
Remove :-servo-case-sensitive-type-attr()
...
No longer needed now that the case-sensitive flag for attributes selectors is
supported.
Update user-agent CSS sheet to use the standard flag.
Fixes #23227
2019-04-18 13:46:59 +01:00
George Roman
4b8282b3b1
Implement CDATASection interface and createCDATASection method
2019-03-14 21:41:02 +02:00
Jan Andre Ikenmeyer
1d6fe65401
Update MPL license to https (part 4)
2018-11-19 14:47:27 +01:00
Pyfisch
9e92eb205a
Reorder imports
2018-11-06 22:35:07 +01:00
Pyfisch
cb07debcb6
Format remaining files
2018-11-06 22:30:31 +01:00
Josh Matthews
49d2ea4f74
Make layout use available image data before querying the image cache.
2018-10-12 21:55:09 -04:00
Fernando Jiménez Moreno
3fbeb398d4
Revert import style format
2018-10-08 16:12:02 +02:00
Víctor Manuel Jáquez Leal
e1a031e447
layout: add media_data() to ServoThreadSafeLayoutNode implementation
2018-10-08 16:12:00 +02:00
Emilio Cobos Álvarez
60e28c61e5
Fix Servo build.
2018-09-18 11:52:39 +02:00
paavininanda
25027e476c
Current-pixel-density tests passing
2018-09-13 00:23:09 +05:30
bors-servo
d05cebdc6b
Auto merge of #21613 - pyfisch:layout_thread-fmt, r=Manishearth
...
Rustfmt layout_thread crate
Part of #21373 . Checked all changes looks good. 🎉 Manually removed two optional semicolons within unsafe so that it is formatted in one line.
<!-- 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/21613 )
<!-- Reviewable:end -->
2018-09-05 06:33:16 -04:00
Pyfisch
840e696ad9
Rustfmt layout_thread crate
2018-09-05 10:11:10 +02:00
Emilio Cobos Álvarez
5d8545d2b4
Fix other parts of the Servo build.
2018-09-03 13:09:10 +02:00