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

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

Issue 717933002: Clean up after getPropertyCSSValue (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase / fix debug compile? Created 6 years, 1 month 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 | « Source/core/css/CSSComputedStyleDeclaration.h ('k') | Source/core/css/CSSFilterValue.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 2916 matching lines...) Expand 10 before | Expand all | Expand 10 after
2927 list.append(CSSProperty(properties[i], value.release(), false)); 2927 list.append(CSSProperty(properties[i], value.release(), false));
2928 } 2928 }
2929 return MutableStylePropertySet::create(list.data(), list.size()); 2929 return MutableStylePropertySet::create(list.data(), list.size());
2930 } 2930 }
2931 2931
2932 CSSRule* CSSComputedStyleDeclaration::parentRule() const 2932 CSSRule* CSSComputedStyleDeclaration::parentRule() const
2933 { 2933 {
2934 return 0; 2934 return 0;
2935 } 2935 }
2936 2936
2937 PassRefPtrWillBeRawPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValu e(const String& propertyName)
2938 {
2939 CSSPropertyID propertyID = cssPropertyID(propertyName);
2940 if (!propertyID)
2941 return nullptr;
2942 RefPtrWillBeRawPtr<CSSValue> value = getPropertyCSSValue(propertyID);
2943 return value ? value->cloneForCSSOM() : nullptr;
2944 }
2945
2946 String CSSComputedStyleDeclaration::getPropertyValue(const String& propertyName) 2937 String CSSComputedStyleDeclaration::getPropertyValue(const String& propertyName)
2947 { 2938 {
2948 CSSPropertyID propertyID = cssPropertyID(propertyName); 2939 CSSPropertyID propertyID = cssPropertyID(propertyName);
2949 if (!propertyID) 2940 if (!propertyID)
2950 return String(); 2941 return String();
2951 ASSERT(CSSPropertyMetadata::isEnabledProperty(propertyID)); 2942 ASSERT(CSSPropertyMetadata::isEnabledProperty(propertyID));
2952 return getPropertyValue(propertyID); 2943 return getPropertyValue(propertyID);
2953 } 2944 }
2954 2945
2955 String CSSComputedStyleDeclaration::getPropertyPriority(const String&) 2946 String CSSComputedStyleDeclaration::getPropertyPriority(const String&)
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
3008 return list.release(); 2999 return list.release();
3009 } 3000 }
3010 3001
3011 void CSSComputedStyleDeclaration::trace(Visitor* visitor) 3002 void CSSComputedStyleDeclaration::trace(Visitor* visitor)
3012 { 3003 {
3013 visitor->trace(m_node); 3004 visitor->trace(m_node);
3014 CSSStyleDeclaration::trace(visitor); 3005 CSSStyleDeclaration::trace(visitor);
3015 } 3006 }
3016 3007
3017 } // namespace blink 3008 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/CSSComputedStyleDeclaration.h ('k') | Source/core/css/CSSFilterValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698