OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. | 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. |
4 * All rights reserved. | 4 * All rights reserved. |
5 * Copyright (C) 2013 Google Inc. All rights reserved. | 5 * Copyright (C) 2013 Google Inc. All rights reserved. |
6 * Copyright (C) 2015 Collabora Ltd. All rights reserved. | 6 * Copyright (C) 2015 Collabora Ltd. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 return FontSize::GetComputedSizeFromSpecifiedSize( | 235 return FontSize::GetComputedSizeFromSpecifiedSize( |
236 document_, zoom_factor, font_description.IsAbsoluteSize(), | 236 document_, zoom_factor, font_description.IsAbsoluteSize(), |
237 specified_size); | 237 specified_size); |
238 } | 238 } |
239 | 239 |
240 static FontOrientation ComputeFontOrientation(const ComputedStyle& style) { | 240 static FontOrientation ComputeFontOrientation(const ComputedStyle& style) { |
241 if (style.IsHorizontalWritingMode()) | 241 if (style.IsHorizontalWritingMode()) |
242 return FontOrientation::kHorizontal; | 242 return FontOrientation::kHorizontal; |
243 | 243 |
244 switch (style.GetTextOrientation()) { | 244 switch (style.GetTextOrientation()) { |
245 case TextOrientation::kMixed: | 245 case ETextOrientation::kMixed: |
246 return FontOrientation::kVerticalMixed; | 246 return FontOrientation::kVerticalMixed; |
247 case TextOrientation::kUpright: | 247 case ETextOrientation::kUpright: |
248 return FontOrientation::kVerticalUpright; | 248 return FontOrientation::kVerticalUpright; |
249 case TextOrientation::kSideways: | 249 case ETextOrientation::kSideways: |
250 return FontOrientation::kVerticalRotated; | 250 return FontOrientation::kVerticalRotated; |
251 default: | 251 default: |
252 NOTREACHED(); | 252 NOTREACHED(); |
253 return FontOrientation::kVerticalMixed; | 253 return FontOrientation::kVerticalMixed; |
254 } | 254 } |
255 } | 255 } |
256 | 256 |
257 void FontBuilder::UpdateOrientation(FontDescription& description, | 257 void FontBuilder::UpdateOrientation(FontDescription& description, |
258 const ComputedStyle& style) { | 258 const ComputedStyle& style) { |
259 description.SetOrientation(ComputeFontOrientation(style)); | 259 description.SetOrientation(ComputeFontOrientation(style)); |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 FontDescription::Size(FontSize::InitialKeywordSize(), 0.0f, false)); | 420 FontDescription::Size(FontSize::InitialKeywordSize(), 0.0f, false)); |
421 UpdateSpecifiedSize(font_description, document_style); | 421 UpdateSpecifiedSize(font_description, document_style); |
422 UpdateComputedSize(font_description, document_style); | 422 UpdateComputedSize(font_description, document_style); |
423 | 423 |
424 UpdateOrientation(font_description, document_style); | 424 UpdateOrientation(font_description, document_style); |
425 document_style.SetFontDescription(font_description); | 425 document_style.SetFontDescription(font_description); |
426 document_style.GetFont().Update(font_selector); | 426 document_style.GetFont().Update(font_selector); |
427 } | 427 } |
428 | 428 |
429 } // namespace blink | 429 } // namespace blink |
OLD | NEW |