Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove most of the things in layout 2020 #23896

Merged
merged 3 commits into from Aug 1, 2019
Merged

Conversation

@nox
Copy link
Member

nox commented Jul 31, 2019

We keep mostly the query system. There is probably more to delete but
that's a good start I think.


This change is Reviewable

@highfive
Copy link

highfive commented Jul 31, 2019

Heads up! This PR modifies the following files:

  • @emilio: components/layout/display_list/builder.rs
@highfive
Copy link

highfive commented Jul 31, 2019

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!
  • These commits modify layout code, but no tests are modified. Please consider adding a test!
@nox nox force-pushed the nox:layout-2020 branch from 78cd420 to 07e1fa5 Jul 31, 2019
nox added 2 commits Jul 23, 2019
We keep mostly the query system. There is probably more to delete but
that's a good start I think.
@nox nox force-pushed the nox:layout-2020 branch 2 times, most recently from bbdd135 to e5e0ec5 Jul 31, 2019
@nox
Copy link
Member Author

nox commented Jul 31, 2019

@bors-servo r=SimonSapin

@bors-servo
Copy link
Contributor

bors-servo commented Jul 31, 2019

📌 Commit e5e0ec5 has been approved by SimonSapin

@bors-servo
Copy link
Contributor

bors-servo commented Jul 31, 2019

Testing commit e5e0ec5 with merge ac6e0f9...

bors-servo added a commit that referenced this pull request Jul 31, 2019
Remove most of the things in layout 2020

We keep mostly the query system. There is probably more to delete but
that's a good start I think.

<!-- 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/23896)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jul 31, 2019

💔 Test failed - status-taskcluster

@CYBAI
Copy link
Collaborator

CYBAI commented Aug 1, 2019

Needs ./mach fmt 👀

Diff in /repo/components/layout_2020/display_list/items.rs at line 6:
 use gfx_traits;
 use std::collections::HashMap;
 use std::f32;
�[31m-use webrender_api::ExternalScrollId;
�(B�[m use webrender_api::units::LayoutPixel;
�[32m+use webrender_api::ExternalScrollId;
�(B�[m 
 pub use style::dom::OpaqueNode;
 
Diff in /repo/components/layout_2020/display_list/webrender_helpers.rs at line 4:
 
 use crate::display_list::items::DisplayList;
 use msg::constellation_msg::PipelineId;
�[32m+use webrender_api::units::LayoutSize;
�(B�[m use webrender_api::{self, DisplayListBuilder};
�[31m-use webrender_api::units::{LayoutSize};
�(B�[m 
 pub trait WebRenderDisplayListConverter {
     fn convert_to_webrender(&mut self, pipeline_id: PipelineId) -> DisplayListBuilder;
Diff in /repo/components/layout_2020/query.rs at line 358:
     }
 }
 
�[31m-pub fn process_content_box_request(
�(B�[m�[31m-    requested_node: OpaqueNode,
�(B�[m�[31m-) -> Option<Rect<Au>> {
�(B�[m�[32m+pub fn process_content_box_request(requested_node: OpaqueNode) -> Option<Rect<Au>> {
�(B�[m     UnioningFragmentBorderBoxIterator::new(requested_node).rect
 }
 
Diff in /repo/components/layout_2020/query.rs at line 367:
�[31m-pub fn process_content_boxes_request(
�(B�[m�[31m-    requested_node: OpaqueNode,
�(B�[m�[31m-) -> Vec<Rect<Au>> {
�(B�[m�[32m+pub fn process_content_boxes_request(requested_node: OpaqueNode) -> Vec<Rect<Au>> {
�(B�[m     // FIXME(pcwalton): This has not been updated to handle the stacking context relative
     // stuff. So the position is wrong in most cases.
     CollectingFragmentBorderBoxIterator::new(requested_node).rects
Diff in /repo/components/layout_2020/query.rs at line 613:
     }
 }
 
�[31m-pub fn process_node_geometry_request(
�(B�[m�[31m-    requested_node: OpaqueNode,
�(B�[m�[31m-) -> Rect<i32> {
�(B�[m�[32m+pub fn process_node_geometry_request(requested_node: OpaqueNode) -> Rect<i32> {
�(B�[m     FragmentLocatingFragmentIterator::new(requested_node).client_rect
 }
 
Diff in /repo/components/layout_2020/query.rs at line 628:
 }
 
 /// https://drafts.csswg.org/cssom-view/#scrolling-area
�[31m-pub fn process_node_scroll_area_request(
�(B�[m�[31m-    requested_node: OpaqueNode,
�(B�[m�[31m-) -> Rect<i32> {
�(B�[m�[32m+pub fn process_node_scroll_area_request(requested_node: OpaqueNode) -> Rect<i32> {
�(B�[m     let iterator = UnioningFragmentScrollAreaIterator::new(requested_node);
     match iterator.overflow_direction {
         OverflowDirection::RightAndDown => {
Diff in /repo/components/layout_2020/query.rs at line 854:
     }
 }
 
�[31m-pub fn process_offset_parent_query(
�(B�[m�[31m-    requested_node: OpaqueNode,
�(B�[m�[31m-) -> OffsetParentResponse {
�(B�[m�[32m+pub fn process_offset_parent_query(requested_node: OpaqueNode) -> OffsetParentResponse {
�(B�[m     let iterator = ParentOffsetBorderBoxIterator::new(requested_node);
 
     let node_offset_box = iterator.node_offset_box;
Diff in /repo/components/layout_thread_2020/lib.rs at line 57:
 use msg::constellation_msg::{
     BackgroundHangMonitor, BackgroundHangMonitorRegister, HangAnnotation,
 };
�[31m-use msg::constellation_msg::{MonitoredComponentId, TopLevelBrowsingContextId};
�(B�[m use msg::constellation_msg::{LayoutHangAnnotation, MonitoredComponentType, PipelineId};
�[32m+use msg::constellation_msg::{MonitoredComponentId, TopLevelBrowsingContextId};
�(B�[m use net_traits::image_cache::ImageCache;
 use parking_lot::RwLock;
 use profile_traits::mem::{self as profile_mem, Report, ReportKind, ReportsChan};
Diff in /repo/components/layout_thread_2020/lib.rs at line 1372:
         }
 
         self.first_reflow.set(false);
�[31m-        self.respond_to_query_if_necessary(
�(B�[m�[31m-            &data.reflow_goal,
�(B�[m�[31m-            &mut *rw_data,
�(B�[m�[31m-            &mut layout_context,
�(B�[m�[31m-        );
�(B�[m�[32m+        self.respond_to_query_if_necessary(&data.reflow_goal, &mut *rw_data, &mut layout_context);
�(B�[m     }
 
     fn respond_to_query_if_necessary(
Diff in /repo/components/layout_thread_2020/lib.rs at line 1405:
                     rw_data.client_rect_response = process_node_geometry_request(node);
                 },
                 &QueryMsg::NodeScrollGeometryQuery(node) => {
�[31m-                    rw_data.scroll_area_response =
�(B�[m�[31m-                        process_node_scroll_area_request(node);
�(B�[m�[32m+                    rw_data.scroll_area_response = process_node_scroll_area_request(node);
�(B�[m                 },
                 &QueryMsg::NodeScrollIdQuery(node) => {
                     let node = unsafe { ServoLayoutNode::new(&node) };
Diff in /repo/components/layout_thread_2020/lib.rs at line 1435:
                     // particular pipeline, so we need to tell WebRender about that.
                     flags.insert(webrender_api::HitTestFlags::POINT_RELATIVE_TO_PIPELINE_VIEWPORT);
 
�[31m-                    let client_point =
�(B�[m�[31m-                        webrender_api::units::WorldPoint::from_untyped(client_point);
�(B�[m�[32m+                    let client_point = webrender_api::units::WorldPoint::from_untyped(client_point);
�(B�[m                     let results = self.webrender_api.hit_test(
                         self.webrender_document,
                         Some(self.id.to_webrender()),
Diff in /repo/components/layout_thread_2020/lib.rs at line 1534:
             || {},
         );
 
�[31m-        self.perform_post_main_layout_passes(
�(B�[m�[31m-            root_flow,
�(B�[m�[31m-            reflow_goal,
�(B�[m�[31m-            document,
�(B�[m�[31m-            rw_data,
�(B�[m�[31m-        );
�(B�[m�[32m+        self.perform_post_main_layout_passes(root_flow, reflow_goal, document, rw_data);
�(B�[m     }
 
     fn perform_post_main_layout_passes(
Run `./mach fmt` to fix the formatting
It's too complicated to make all the commits in that branch compile properly.
@nox nox force-pushed the nox:layout-2020 branch from e5e0ec5 to f8341da Aug 1, 2019
@nox
Copy link
Member Author

nox commented Aug 1, 2019

@bors-servo r=SimonSapin

@bors-servo
Copy link
Contributor

bors-servo commented Aug 1, 2019

📌 Commit f8341da has been approved by SimonSapin

@bors-servo
Copy link
Contributor

bors-servo commented Aug 1, 2019

Testing commit f8341da with merge 196c511...

bors-servo added a commit that referenced this pull request Aug 1, 2019
Remove most of the things in layout 2020

We keep mostly the query system. There is probably more to delete but
that's a good start I think.

<!-- 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/23896)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Aug 1, 2019

☀️ Test successful - linux-rel-css, linux-rel-wpt, status-taskcluster
Approved by: SimonSapin
Pushing 196c511 to master...

@bors-servo bors-servo merged commit f8341da into servo:master Aug 1, 2019
2 of 3 checks passed
2 of 3 checks passed
continuous-integration/appveyor/pr AppVeyor build failed
Details
Taskcluster (pull_request) TaskGroup: success
Details
homu Test successful
Details
@nox nox deleted the nox:layout-2020 branch Oct 8, 2019
@SimonSapin SimonSapin added this to Done / resolved in Layout 2020 Dec 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Layout 2020
  
Merged / resolved
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.