aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/main/layout/inline.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-12-09 19:39:40 -0800
committerPatrick Walton <pcwalton@mimiga.net>2013-12-09 19:40:08 -0800
commit30bbaa49b700140574c5848955abba4b8d2dc48c (patch)
tree0f1ef97233c8509d2eeb43e00b8f968544376d88 /src/components/main/layout/inline.rs
parente8ffac13d7e0ebc0701b87b774491b2b1b895607 (diff)
downloadservo-30bbaa49b700140574c5848955abba4b8d2dc48c.tar.gz
servo-30bbaa49b700140574c5848955abba4b8d2dc48c.zip
Revert "auto merge of #1356 : ksh8281/servo/remove_@_in_LayoutTask.FontContext, r=pcwalton"
This reverts commit e8ffac13d7e0ebc0701b87b774491b2b1b895607, reversing changes made to db923feffe4ef1f15c34c2a50acdf74a4321e2d4. Reverting this change because FreeType is *not* thread safe. See the documentation here: http://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html "In multi-threaded applications, make sure that the same FT_Library object or any of its children doesn't get accessed in parallel." We will need to use a `MutexArc` instead.
Diffstat (limited to 'src/components/main/layout/inline.rs')
-rw-r--r--src/components/main/layout/inline.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components/main/layout/inline.rs b/src/components/main/layout/inline.rs
index b63b6066d70..11852060d6f 100644
--- a/src/components/main/layout/inline.rs
+++ b/src/components/main/layout/inline.rs
@@ -702,7 +702,7 @@ impl Flow for InlineFlow {
},
ScannedTextBox(ref text_box) => {
let range = &text_box.range;
- let run = text_box.run.get();
+ let run = &text_box.run;
// Compute the height based on the line-height and font size
let text_bounds = run.metrics_for_range(range).bounding_box;
@@ -711,7 +711,7 @@ impl Flow for InlineFlow {
// Find the top and bottom of the content area.
// Those are used in text-top and text-bottom value of 'vertical-align'
- let text_ascent = run.font_metrics.ascent;
+ let text_ascent = text_box.run.font_metrics.ascent;
// Offset from the top of the box is 1/2 of the leading + ascent
let text_offset = text_ascent + (line_height - em_size).scale_by(0.5);