Commit graph

1706 commits

Author SHA1 Message Date
Matt Brubeck
25a19343b3 Remove REPAINT damage in Fragment::build_display_list
Previously, the code that called this function was responsible for this.
Some code paths neglected to do it.  This moves the damage removal to one
central location.
2016-06-20 13:39:36 -07:00
Matt Brubeck
8f7cfb1b06 Remove unnecessary mut in TableFlow 2016-06-20 13:19:42 -07:00
Ms2ger
b56821a01f Move CSSErrorReporter to script_layout_interface. 2016-06-20 19:08:13 +02:00
Ms2ger
9e2e0ff98c Move the remainder of layout_interface into script_layout_interface. 2016-06-20 19:08:12 +02:00
Ms2ger
2c50318ee7 Move is_image_data to script_layout_interface. 2016-06-20 19:08:11 +02:00
Ms2ger
65b93c20b7 Remove the layout_wrapper re-exports from layout::wrapper. 2016-06-20 19:08:10 +02:00
Ms2ger
0c506cf1df Remove the wrapper::ServoThreadSafeLayoutNode re-export. 2016-06-20 19:08:09 +02:00
Ms2ger
86bfd2cc9f Move LayoutRPC to script_layout_interface. 2016-06-20 19:08:07 +02:00
Ms2ger
0616a60fd9 Move ServoLayoutNode and related structs to script. 2016-06-20 19:08:05 +02:00
Ms2ger
0c726cfe6b Make RecalcStyleAndConstructFlows generic over the LayoutNode implementation. 2016-06-20 19:08:04 +02:00
Ms2ger
a8bb3d8d22 Make ServoLayoutNode::debug_id() less convoluted. 2016-06-20 19:08:03 +02:00
Ms2ger
7de3d165ad Introduce LayoutJS<Node>::opaque() to replace OpaqueNodeMethods::from_jsmanaged(). 2016-06-20 19:08:02 +02:00
Ms2ger
14a7e9bce1 Remove unused OpaqueNodeMethods::from_script_node. 2016-06-20 19:08:01 +02:00
Ms2ger
0d0b268138 Move LayoutNode and related traits to script_layout_interface. 2016-06-20 19:07:54 +02:00
Ms2ger
000e2de57a Move HTMLCanvasData to script_layout_interface. 2016-06-20 19:04:41 +02:00
Ms2ger
6b847eb93a Introduce LayoutNodeType and LayoutElementType enums. 2016-06-20 19:02:49 +02:00
Ms2ger
afc7118a67 Introduce a ThreadSafeLayoutNodeHelpers trait for methods to stay in layout. 2016-06-20 19:02:48 +02:00
Ms2ger
dac8878467 Introduce ThreadSafeLayoutNode::borrow_layout_data_unchecked. 2016-06-20 19:02:47 +02:00
Ms2ger
1039de8e7d Introduce a node_text_content method. 2016-06-20 19:02:46 +02:00
Ms2ger
16d6555f4d Move some more methods into the LayoutNodeLayoutData trait. 2016-06-20 19:02:45 +02:00
Ms2ger
c910ef2072 Introduce a LayoutNodeLayoutData trait for methods to stay in layout. 2016-06-20 19:02:44 +02:00
Ms2ger
310cb5a326 Introduce get_style_and_layout_data() methods. 2016-06-20 19:02:43 +02:00
Ms2ger
8b05833e52 Split initialize_data into two.
The first one handles the layout-specific part, and calls the second one to
handle the script-specific part.
2016-06-20 19:02:42 +02:00
Ms2ger
d50c166786 Use get_style_data() where possible. 2016-06-20 19:02:41 +02:00
Ms2ger
72632ac16d Implement get_style_data() methods. 2016-06-20 19:02:40 +02:00
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
bors-servo
c270622bfd Auto merge of #11800 - Ms2ger:place_float_if_applicable, r=nox
Remove unused argument to place_float_if_applicable.

<!-- 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/11800)
<!-- Reviewable:end -->
2016-06-20 08:17:13 -05:00
bors-servo
881c02ec89 Auto merge of #11798 - notriddle:input_caret, r=nox
Account for the font of empty input fields

The font of empty fragments is not accounted for in layout. This behavior is incorrect when part of an input field.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #11653
- [X] There are tests for these changes

<!-- 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/11798)
<!-- Reviewable:end -->
2016-06-20 05:58:23 -05:00
Ms2ger
2383cb2eee Remove unused argument to place_float_if_applicable. 2016-06-20 12:37:56 +02:00
Keith Yeung
d66a04ea6c Update string_cache to v0.2.20 2016-06-20 12:17:28 +08:00
Michael Howell
4717cea51c Account for the font of empty input fields
Fixes #11653
2016-06-19 13:06:06 -07:00
Michael Howell
b082dceebc Alignment is wrong. 2016-06-18 11:49:38 -07:00
ddh
5c7943217b Added DoubleEndedIterator for MutFlowListIterator 2016-06-17 14:57:41 +01:00
bors-servo
d2db39634e Auto merge of #11746 - DarinM223:master, r=mbrubeck
Image with height defined in % resizes properly

<!-- Please describe your changes on the following line: -->

Checked the html in the github issue and the image looks like it is resized properly in Servo.
Fixed image resizing when height is specified in percentages.
---
<!-- 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 #11723  (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because this issue is marked with has-test?

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11746)
<!-- Reviewable:end -->
2016-06-16 03:57:38 -05:00
Maciej Skrzypkowski
27b05c58f6 Small performance improvement
node.selection() is not used text_content is equal to 
TextContent::GeneratedContent(content_items)
2016-06-16 08:58:03 +02:00
Darin Minamoto
4a4be1d7e5 Image with height defined in % resizes properly 2016-06-15 16:39:22 -07: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
ae5cb0ceb0 Move the TNode::initialize_data() call from recalc_style_at to its callers.
This will allow us to make it an inherent method.
2016-06-13 15:11:21 +01:00
Ms2ger
172aa226cc Use Ref/RefMut::map rather than transmute for ServoLayoutNode. 2016-06-13 12:29:14 +01:00
mrmiywj
46cadfdd2c use less repetitive name 2016-06-12 12:28:07 +08:00
Patrick Walton
041cfe6d0a script: When using WebRender, keep the DOM-side scroll positions for
elements with `overflow: scroll` up to date, and take them into account
when doing hit testing.

Closes #11648.
2016-06-10 18:43:04 -07:00
Anthony Ramine
b97c7a8c4d Don't load all font faces sources
We stop at the first one we manage to load.
2016-06-10 21:51:06 +02:00
bors-servo
1e3edf3ca4 Auto merge of #11656 - Ms2ger:reduce-dom-exposure, r=nox
Reduce the amount of dom code used outside the script crate.

<!-- 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/11656)
<!-- Reviewable:end -->
2016-06-07 11:09:14 -05: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