servo: Merge #597 - Fix regression on clicking links (from eric93:diplaylist-refactor); r=jdm
authorEric Atkinson <eatkinson@mozilla.com>
Wed, 17 Jul 2013 17:00:42 -0700
changeset 333521 5d28d0d019c11172cc5f89cff87192bb0e6f93a5
parent 333520 18ed9188f1ef77c3bc4bf8566025a528ad9ee5c6
child 333522 54dca980c892feed5be1e63f5db098ca24a07e08
push id31307
push usergszorc@mozilla.com
push dateSat, 04 Feb 2017 00:59:06 +0000
treeherdermozilla-central@94079d43835f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdm
servo: Merge #597 - Fix regression on clicking links (from eric93:diplaylist-refactor); r=jdm Source-Repo: https://github.com/servo/servo Source-Revision: e5fc6484cedfeb29e2d42d819e6406d076fbd333
servo/src/components/main/layout/layout_task.rs
--- a/servo/src/components/main/layout/layout_task.rs
+++ b/servo/src/components/main/layout/layout_task.rs
@@ -236,18 +236,18 @@ impl LayoutTask {
                 let builder = DisplayListBuilder {
                     ctx: &layout_ctx,
                 };
 
                 let display_list = @Cell::new(DisplayList::new());
 
                 // TODO: Set options on the builder before building.
                 // TODO: Be smarter about what needs painting.
-                for layout_root.traverse_preorder |flow| {
-                    flow.build_display_list(&builder, &layout_root.position(), display_list);
+                do layout_root.partially_traverse_preorder |flow| {
+                    flow.build_display_list(&builder, &layout_root.position(), display_list)
                 }
 
                 let root_size = do layout_root.with_base |base| {
                     base.position.size
                 };
 
                 let render_layer = RenderLayer {
                     display_list: display_list.take(),
@@ -344,19 +344,23 @@ impl LayoutTask {
                     }
                     Some(flow) => {
                         let layout_ctx = self.build_layout_context();
                         let builder = DisplayListBuilder {
                             ctx: &layout_ctx,
                         };
                         let display_list: @Cell<DisplayList<RenderBox>> =
                             @Cell::new(DisplayList::new());
-                        flow.build_display_list(&builder,
-                                                &flow.position(),
-                                                display_list);
+                        
+                        do flow.partially_traverse_preorder |this_flow| {
+                            this_flow.build_display_list(&builder,
+                                                    &flow.position(),
+                                                    display_list)
+                            
+                        }
                         let (x, y) = (Au::from_frac_px(point.x as float),
                                       Au::from_frac_px(point.y as float));
                         let mut resp = Err(());
                         let display_list = &display_list.take().list;
                         // iterate in reverse to ensure we have the most recently painted render box
                         for display_list.rev_iter().advance |display_item| {
                             let bounds = display_item.bounds();
                             // TODO this check should really be performed by a method of DisplayItem