From 5e3ea3f8729a51f4572f134787ab4c231b064fee Mon Sep 17 00:00:00 2001 From: "Brian J. Burg" Date: Mon, 17 Sep 2012 18:50:06 -0700 Subject: [PATCH] Remove a stale comment and add missed context.rs (LayoutContext) --- src/servo/layout/context.rs | 14 ++++++++++++++ src/servo/layout/inline.rs | 7 ------- 2 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 src/servo/layout/context.rs diff --git a/src/servo/layout/context.rs b/src/servo/layout/context.rs new file mode 100644 index 00000000000..3f734600787 --- /dev/null +++ b/src/servo/layout/context.rs @@ -0,0 +1,14 @@ +use resource::image_cache_task::ImageCacheTask; +use servo_text::font_cache::FontCache; +use std::net::url::Url; +use geom::rect::Rect; +use au = gfx::geometry::au; + +/* Represents layout task context. */ + +struct LayoutContext { + font_cache: @FontCache, + image_cache: ImageCacheTask, + doc_url: Url, + screen_size: Rect +} \ No newline at end of file diff --git a/src/servo/layout/inline.rs b/src/servo/layout/inline.rs index 4e57bafa6dd..29907d11236 100644 --- a/src/servo/layout/inline.rs +++ b/src/servo/layout/inline.rs @@ -46,13 +46,6 @@ impl @FlowContext : InlineLayout { let mut min_width = au(0); let mut pref_width = au(0); - /* TODO: implement a "line sizes" API. Each inline element - should report its longest possible chunk (i.e., text run) and - shortest chunk (i.e., smallest word or hyphenatable segment). - - Until this exists, pretend that the text is indivisible, just - like a replaced element. */ - do self.access_inline |d| { for d.boxes.each |box| { min_width = au::max(min_width, box.get_min_width());