Remove a stale comment and add missed context.rs (LayoutContext)

This commit is contained in:
Brian J. Burg 2012-09-17 18:50:06 -07:00
parent 989a96526b
commit 5e3ea3f872
2 changed files with 14 additions and 7 deletions

View file

@ -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<au>
}

View file

@ -46,13 +46,6 @@ impl @FlowContext : InlineLayout {
let mut min_width = au(0); let mut min_width = au(0);
let mut pref_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| { do self.access_inline |d| {
for d.boxes.each |box| { for d.boxes.each |box| {
min_width = au::max(min_width, box.get_min_width()); min_width = au::max(min_width, box.get_min_width());