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

Side by Side Diff: sky/engine/core/css/CSSComputedStyleDeclaration.cpp

Issue 780483002: Remove the CSSOM. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « sky/engine/core/css/CSSComputedStyleDeclaration.h ('k') | sky/engine/core/css/CSSFilterRule.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) 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. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. 6 * Copyright (C) 2011 Sencha, Inc. 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 Lesser General Public 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 2343 matching lines...) Expand 10 before | Expand all | Expand 10 after
2354 Vector<CSSProperty, 256> list; 2354 Vector<CSSProperty, 256> list;
2355 list.reserveInitialCapacity(properties.size()); 2355 list.reserveInitialCapacity(properties.size());
2356 for (unsigned i = 0; i < properties.size(); ++i) { 2356 for (unsigned i = 0; i < properties.size(); ++i) {
2357 RefPtr<CSSValue> value = getPropertyCSSValue(properties[i]); 2357 RefPtr<CSSValue> value = getPropertyCSSValue(properties[i]);
2358 if (value) 2358 if (value)
2359 list.append(CSSProperty(properties[i], value.release(), false)); 2359 list.append(CSSProperty(properties[i], value.release(), false));
2360 } 2360 }
2361 return MutableStylePropertySet::create(list.data(), list.size()); 2361 return MutableStylePropertySet::create(list.data(), list.size());
2362 } 2362 }
2363 2363
2364 CSSRule* CSSComputedStyleDeclaration::parentRule() const
2365 {
2366 return 0;
2367 }
2368
2369 PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(const Stri ng& propertyName) 2364 PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(const Stri ng& propertyName)
2370 { 2365 {
2371 CSSPropertyID propertyID = cssPropertyID(propertyName); 2366 CSSPropertyID propertyID = cssPropertyID(propertyName);
2372 if (!propertyID) 2367 if (!propertyID)
2373 return nullptr; 2368 return nullptr;
2374 RefPtr<CSSValue> value = getPropertyCSSValue(propertyID); 2369 RefPtr<CSSValue> value = getPropertyCSSValue(propertyID);
2375 return value ? value->cloneForCSSOM() : nullptr; 2370 return value ? value->cloneForCSSOM() : nullptr;
2376 } 2371 }
2377 2372
2378 String CSSComputedStyleDeclaration::getPropertyValue(const String& propertyName) 2373 String CSSComputedStyleDeclaration::getPropertyValue(const String& propertyName)
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
2434 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin, 2429 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin,
2435 CSSPropertyB ackgroundClip }; 2430 CSSPropertyB ackgroundClip };
2436 2431
2437 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); 2432 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
2438 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash Seperator)))); 2433 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash Seperator))));
2439 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe perator)))); 2434 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe perator))));
2440 return list.release(); 2435 return list.release();
2441 } 2436 }
2442 2437
2443 } // namespace blink 2438 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/css/CSSComputedStyleDeclaration.h ('k') | sky/engine/core/css/CSSFilterRule.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698