Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: third_party/WebKit/Source/core/css/StylePropertySet.cpp

Issue 2390373002: Fix setting properties on CSSFontFaceRule (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. 4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved.
5 * Copyright (C) 2013 Intel Corporation. All rights reserved. 5 * Copyright (C) 2013 Intel Corporation. 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 const MutableStylePropertySet* mutableThis = toMutableStylePropertySet(this); 63 const MutableStylePropertySet* mutableThis = toMutableStylePropertySet(this);
64 return ImmutableStylePropertySet::create(mutableThis->m_propertyVector.data(), 64 return ImmutableStylePropertySet::create(mutableThis->m_propertyVector.data(),
65 mutableThis->m_propertyVector.size(), 65 mutableThis->m_propertyVector.size(),
66 cssParserMode()); 66 cssParserMode());
67 } 67 }
68 68
69 MutableStylePropertySet::MutableStylePropertySet(CSSParserMode cssParserMode) 69 MutableStylePropertySet::MutableStylePropertySet(CSSParserMode cssParserMode)
70 : StylePropertySet(cssParserMode) {} 70 : StylePropertySet(cssParserMode) {}
71 71
72 MutableStylePropertySet::MutableStylePropertySet(const CSSProperty* properties, 72 MutableStylePropertySet::MutableStylePropertySet(const CSSProperty* properties,
73 unsigned length) 73 unsigned length,
74 : StylePropertySet(HTMLStandardMode) { 74 CSSParserMode cssParserMode)
75 : StylePropertySet(cssParserMode) {
75 m_propertyVector.reserveInitialCapacity(length); 76 m_propertyVector.reserveInitialCapacity(length);
76 for (unsigned i = 0; i < length; ++i) 77 for (unsigned i = 0; i < length; ++i)
77 m_propertyVector.uncheckedAppend(properties[i]); 78 m_propertyVector.uncheckedAppend(properties[i]);
78 } 79 }
79 80
80 ImmutableStylePropertySet::ImmutableStylePropertySet( 81 ImmutableStylePropertySet::ImmutableStylePropertySet(
81 const CSSProperty* properties, 82 const CSSProperty* properties,
82 unsigned length, 83 unsigned length,
83 CSSParserMode cssParserMode) 84 CSSParserMode cssParserMode)
84 : StylePropertySet(cssParserMode, length) { 85 : StylePropertySet(cssParserMode, length) {
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 } 591 }
591 #endif 592 #endif
592 593
593 MutableStylePropertySet* MutableStylePropertySet::create( 594 MutableStylePropertySet* MutableStylePropertySet::create(
594 CSSParserMode cssParserMode) { 595 CSSParserMode cssParserMode) {
595 return new MutableStylePropertySet(cssParserMode); 596 return new MutableStylePropertySet(cssParserMode);
596 } 597 }
597 598
598 MutableStylePropertySet* MutableStylePropertySet::create( 599 MutableStylePropertySet* MutableStylePropertySet::create(
599 const CSSProperty* properties, 600 const CSSProperty* properties,
600 unsigned count) { 601 unsigned count,
601 return new MutableStylePropertySet(properties, count); 602 CSSParserMode cssParserMode) {
603 return new MutableStylePropertySet(properties, count, cssParserMode);
602 } 604 }
603 605
604 } // namespace blink 606 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698