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

Side by Side Diff: Source/core/css/CSSParser.cpp

Issue 16021003: Move StylePropertySet::createImmutable() to ImmutableStylePropertySet. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/css/StylePropertySet.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. 8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
9 * Copyright (C) 2012 Intel Corporation. All rights reserved. 9 * Copyright (C) 2012 Intel Corporation. All rights reserved.
10 * 10 *
(...skipping 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after
1398 size_t unusedEntries = m_parsedProperties.size(); 1398 size_t unusedEntries = m_parsedProperties.size();
1399 Vector<CSSProperty, 256> results(unusedEntries); 1399 Vector<CSSProperty, 256> results(unusedEntries);
1400 1400
1401 // Important properties have higher priority, so add them first. Duplicate d efinitions can then be ignored when found. 1401 // Important properties have higher priority, so add them first. Duplicate d efinitions can then be ignored when found.
1402 HashSet<AtomicString> seenVariables; 1402 HashSet<AtomicString> seenVariables;
1403 filterProperties(true, m_parsedProperties, results, unusedEntries, seenPrope rties, seenVariables); 1403 filterProperties(true, m_parsedProperties, results, unusedEntries, seenPrope rties, seenVariables);
1404 filterProperties(false, m_parsedProperties, results, unusedEntries, seenProp erties, seenVariables); 1404 filterProperties(false, m_parsedProperties, results, unusedEntries, seenProp erties, seenVariables);
1405 if (unusedEntries) 1405 if (unusedEntries)
1406 results.remove(0, unusedEntries); 1406 results.remove(0, unusedEntries);
1407 1407
1408 return StylePropertySet::createImmutable(results.data(), results.size(), m_c ontext.mode); 1408 return ImmutableStylePropertySet::create(results.data(), results.size(), m_c ontext.mode);
1409 } 1409 }
1410 1410
1411 void CSSParser::addPropertyWithPrefixingVariant(CSSPropertyID propId, PassRefPtr <CSSValue> value, bool important, bool implicit) 1411 void CSSParser::addPropertyWithPrefixingVariant(CSSPropertyID propId, PassRefPtr <CSSValue> value, bool important, bool implicit)
1412 { 1412 {
1413 RefPtr<CSSValue> val = value.get(); 1413 RefPtr<CSSValue> val = value.get();
1414 addProperty(propId, value, important, implicit); 1414 addProperty(propId, value, important, implicit);
1415 1415
1416 CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(propId); 1416 CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(propId);
1417 if (prefixingVariant == propId) 1417 if (prefixingVariant == propId)
1418 return; 1418 return;
(...skipping 10318 matching lines...) Expand 10 before | Expand all | Expand 10 after
11737 { 11737 {
11738 // The tokenizer checks for the construct of an+b. 11738 // The tokenizer checks for the construct of an+b.
11739 // However, since the {ident} rule precedes the {nth} rule, some of those 11739 // However, since the {ident} rule precedes the {nth} rule, some of those
11740 // tokens are identified as string literal. Furthermore we need to accept 11740 // tokens are identified as string literal. Furthermore we need to accept
11741 // "odd" and "even" which does not match to an+b. 11741 // "odd" and "even" which does not match to an+b.
11742 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") 11742 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even")
11743 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); 11743 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n");
11744 } 11744 }
11745 11745
11746 } 11746 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/StylePropertySet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698