| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 Settings* settings = document_->GetSettings(); | 72 Settings* settings = document_->GetSettings(); |
| 73 if (settings) | 73 if (settings) |
| 74 return settings->GetGenericFontFamilySettings().Standard(); | 74 return settings->GetGenericFontFamilySettings().Standard(); |
| 75 return AtomicString(); | 75 return AtomicString(); |
| 76 } | 76 } |
| 77 | 77 |
| 78 AtomicString FontBuilder::GenericFontFamilyName( | 78 AtomicString FontBuilder::GenericFontFamilyName( |
| 79 FontDescription::GenericFamilyType generic_family) const { | 79 FontDescription::GenericFamilyType generic_family) const { |
| 80 switch (generic_family) { | 80 switch (generic_family) { |
| 81 default: | 81 default: |
| 82 ASSERT_NOT_REACHED(); | 82 NOTREACHED(); |
| 83 case FontDescription::kNoFamily: | 83 case FontDescription::kNoFamily: |
| 84 return AtomicString(); | 84 return AtomicString(); |
| 85 case FontDescription::kStandardFamily: | 85 case FontDescription::kStandardFamily: |
| 86 return StandardFontFamilyName(); | 86 return StandardFontFamilyName(); |
| 87 case FontDescription::kSerifFamily: | 87 case FontDescription::kSerifFamily: |
| 88 return FontFamilyNames::webkit_serif; | 88 return FontFamilyNames::webkit_serif; |
| 89 case FontDescription::kSansSerifFamily: | 89 case FontDescription::kSansSerifFamily: |
| 90 return FontFamilyNames::webkit_sans_serif; | 90 return FontFamilyNames::webkit_sans_serif; |
| 91 case FontDescription::kMonospaceFamily: | 91 case FontDescription::kMonospaceFamily: |
| 92 return FontFamilyNames::webkit_monospace; | 92 return FontFamilyNames::webkit_monospace; |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 return FontOrientation::kHorizontal; | 242 return FontOrientation::kHorizontal; |
| 243 | 243 |
| 244 switch (style.GetTextOrientation()) { | 244 switch (style.GetTextOrientation()) { |
| 245 case kTextOrientationMixed: | 245 case kTextOrientationMixed: |
| 246 return FontOrientation::kVerticalMixed; | 246 return FontOrientation::kVerticalMixed; |
| 247 case kTextOrientationUpright: | 247 case kTextOrientationUpright: |
| 248 return FontOrientation::kVerticalUpright; | 248 return FontOrientation::kVerticalUpright; |
| 249 case kTextOrientationSideways: | 249 case kTextOrientationSideways: |
| 250 return FontOrientation::kVerticalRotated; | 250 return FontOrientation::kVerticalRotated; |
| 251 default: | 251 default: |
| 252 ASSERT_NOT_REACHED(); | 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)); |
| 260 } | 260 } |
| 261 | 261 |
| 262 void FontBuilder::CheckForGenericFamilyChange( | 262 void FontBuilder::CheckForGenericFamilyChange( |
| (...skipping 157 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 |