OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> | 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. |
4 * All rights reserved. | 4 * All rights reserved. |
5 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 5 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
7 * Copyright (C) 2011 Sencha, Inc. All rights reserved. | 7 * Copyright (C) 2011 Sencha, Inc. All rights reserved. |
8 * Copyright (C) 2015 Google Inc. All rights reserved. | 8 * Copyright (C) 2015 Google Inc. All rights reserved. |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 1888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1899 size_and_line_height->Append(*ValueForFontSize(style)); | 1899 size_and_line_height->Append(*ValueForFontSize(style)); |
1900 size_and_line_height->Append(*ValueForLineHeight(style)); | 1900 size_and_line_height->Append(*ValueForLineHeight(style)); |
1901 | 1901 |
1902 CSSValueList* list = CSSValueList::CreateSpaceSeparated(); | 1902 CSSValueList* list = CSSValueList::CreateSpaceSeparated(); |
1903 list->Append(*ValueForFontStyle(style)); | 1903 list->Append(*ValueForFontStyle(style)); |
1904 | 1904 |
1905 // Check that non-initial font-variant subproperties are not conflicting with | 1905 // Check that non-initial font-variant subproperties are not conflicting with |
1906 // this serialization. | 1906 // this serialization. |
1907 CSSValue* ligatures_value = ValueForFontVariantLigatures(style); | 1907 CSSValue* ligatures_value = ValueForFontVariantLigatures(style); |
1908 CSSValue* numeric_value = ValueForFontVariantNumeric(style); | 1908 CSSValue* numeric_value = ValueForFontVariantNumeric(style); |
1909 if (!DataEquivalent<CSSValue>(ligatures_value, | 1909 // FIXME: Use DataEquivalent<CSSValue>(...) once http://crbug.com/729447 is |
1910 CSSIdentifierValue::Create(CSSValueNormal)) || | 1910 // resolved. |
1911 !DataEquivalent<CSSValue>(numeric_value, | 1911 if (!DataEquivalent( |
1912 CSSIdentifierValue::Create(CSSValueNormal))) | 1912 ligatures_value, |
| 1913 static_cast<CSSValue*>(CSSIdentifierValue::Create(CSSValueNormal))) || |
| 1914 !DataEquivalent( |
| 1915 numeric_value, |
| 1916 static_cast<CSSValue*>(CSSIdentifierValue::Create(CSSValueNormal)))) |
1913 return nullptr; | 1917 return nullptr; |
1914 | 1918 |
1915 CSSIdentifierValue* caps_value = ValueForFontVariantCaps(style); | 1919 CSSIdentifierValue* caps_value = ValueForFontVariantCaps(style); |
1916 if (caps_value->GetValueID() != CSSValueNormal && | 1920 if (caps_value->GetValueID() != CSSValueNormal && |
1917 caps_value->GetValueID() != CSSValueSmallCaps) | 1921 caps_value->GetValueID() != CSSValueSmallCaps) |
1918 return nullptr; | 1922 return nullptr; |
1919 list->Append(*caps_value); | 1923 list->Append(*caps_value); |
1920 | 1924 |
1921 list->Append(*ValueForFontWeight(style)); | 1925 list->Append(*ValueForFontWeight(style)); |
1922 list->Append(*ValueForFontStretch(style)); | 1926 list->Append(*ValueForFontStretch(style)); |
(...skipping 1827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3750 case CSSPropertyAll: | 3754 case CSSPropertyAll: |
3751 return nullptr; | 3755 return nullptr; |
3752 default: | 3756 default: |
3753 break; | 3757 break; |
3754 } | 3758 } |
3755 NOTREACHED(); | 3759 NOTREACHED(); |
3756 return nullptr; | 3760 return nullptr; |
3757 } | 3761 } |
3758 | 3762 |
3759 } // namespace blink | 3763 } // namespace blink |
OLD | NEW |