OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. |
5 * All rights reserved. | 5 * All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 | 223 |
224 const ComputedStyle& parent_style = Parent()->StyleRef(); | 224 const ComputedStyle& parent_style = Parent()->StyleRef(); |
225 LayoutInline* parent_layout_inline = | 225 LayoutInline* parent_layout_inline = |
226 Parent()->IsLayoutInline() ? ToLayoutInline(Parent()) : 0; | 226 Parent()->IsLayoutInline() ? ToLayoutInline(Parent()) : 0; |
227 bool check_fonts = GetDocument().InNoQuirksMode(); | 227 bool check_fonts = GetDocument().InNoQuirksMode(); |
228 bool always_create_line_boxes_new = | 228 bool always_create_line_boxes_new = |
229 (parent_layout_inline && parent_layout_inline->AlwaysCreateLineBoxes()) || | 229 (parent_layout_inline && parent_layout_inline->AlwaysCreateLineBoxes()) || |
230 (parent_layout_inline && | 230 (parent_layout_inline && |
231 parent_style.VerticalAlign() != EVerticalAlign::kBaseline) || | 231 parent_style.VerticalAlign() != EVerticalAlign::kBaseline) || |
232 Style()->VerticalAlign() != EVerticalAlign::kBaseline || | 232 Style()->VerticalAlign() != EVerticalAlign::kBaseline || |
233 Style()->GetTextEmphasisMark() != kTextEmphasisMarkNone || | 233 Style()->GetTextEmphasisMark() != TextEmphasisMark::kNone || |
234 (check_fonts && | 234 (check_fonts && |
235 (!StyleRef().HasIdenticalAscentDescentAndLineGap(parent_style) || | 235 (!StyleRef().HasIdenticalAscentDescentAndLineGap(parent_style) || |
236 parent_style.LineHeight() != StyleRef().LineHeight())); | 236 parent_style.LineHeight() != StyleRef().LineHeight())); |
237 | 237 |
238 if (!always_create_line_boxes_new && check_fonts && | 238 if (!always_create_line_boxes_new && check_fonts && |
239 GetDocument().GetStyleEngine().UsesFirstLineRules()) { | 239 GetDocument().GetStyleEngine().UsesFirstLineRules()) { |
240 // Have to check the first line style as well. | 240 // Have to check the first line style as well. |
241 const ComputedStyle& first_line_parent_style = Parent()->StyleRef(true); | 241 const ComputedStyle& first_line_parent_style = Parent()->StyleRef(true); |
242 const ComputedStyle& child_style = StyleRef(true); | 242 const ComputedStyle& child_style = StyleRef(true); |
243 always_create_line_boxes_new = | 243 always_create_line_boxes_new = |
(...skipping 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1551 paint_invalidator.InvalidateDisplayItemClient(*box, invalidation_reason); | 1551 paint_invalidator.InvalidateDisplayItemClient(*box, invalidation_reason); |
1552 } | 1552 } |
1553 | 1553 |
1554 // TODO(lunalu): Not to just dump 0, 0 as the x and y here | 1554 // TODO(lunalu): Not to just dump 0, 0 as the x and y here |
1555 LayoutRect LayoutInline::DebugRect() const { | 1555 LayoutRect LayoutInline::DebugRect() const { |
1556 IntRect lines_box = EnclosingIntRect(LinesBoundingBox()); | 1556 IntRect lines_box = EnclosingIntRect(LinesBoundingBox()); |
1557 return LayoutRect(IntRect(0, 0, lines_box.Width(), lines_box.Height())); | 1557 return LayoutRect(IntRect(0, 0, lines_box.Width(), lines_box.Height())); |
1558 } | 1558 } |
1559 | 1559 |
1560 } // namespace blink | 1560 } // namespace blink |
OLD | NEW |