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

Side by Side Diff: Source/core/editing/EditingStyle.cpp

Issue 273843003: [Oilpan]: Make StylePropertySet fully garbage collected. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review feedback Created 6 years, 5 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 | « Source/core/dom/PresentationAttributeStyle.cpp ('k') | Source/core/html/HTMLTableElement.cpp » ('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) 2007, 2008, 2009 Apple Computer, Inc. 2 * Copyright (C) 2007, 2008, 2009 Apple Computer, Inc.
3 * Copyright (C) 2010, 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2010, 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1221 if (!styleFromMatchedRules->getPropertyCSSValue(CSSPropertyFloat) && get IdentifierValue(m_mutableStyle.get(), CSSPropertyFloat) == CSSValueNone) 1221 if (!styleFromMatchedRules->getPropertyCSSValue(CSSPropertyFloat) && get IdentifierValue(m_mutableStyle.get(), CSSPropertyFloat) == CSSValueNone)
1222 m_mutableStyle->removeProperty(CSSPropertyFloat); 1222 m_mutableStyle->removeProperty(CSSPropertyFloat);
1223 } 1223 }
1224 } 1224 }
1225 1225
1226 void EditingStyle::removePropertiesInElementDefaultStyle(Element* element) 1226 void EditingStyle::removePropertiesInElementDefaultStyle(Element* element)
1227 { 1227 {
1228 if (!m_mutableStyle || m_mutableStyle->isEmpty()) 1228 if (!m_mutableStyle || m_mutableStyle->isEmpty())
1229 return; 1229 return;
1230 1230
1231 RefPtr<StylePropertySet> defaultStyle = styleFromMatchedRulesForElement(elem ent, StyleResolver::UAAndUserCSSRules); 1231 RefPtrWillBeRawPtr<StylePropertySet> defaultStyle = styleFromMatchedRulesFor Element(element, StyleResolver::UAAndUserCSSRules);
1232 1232
1233 removePropertiesInStyle(m_mutableStyle.get(), defaultStyle.get()); 1233 removePropertiesInStyle(m_mutableStyle.get(), defaultStyle.get());
1234 } 1234 }
1235 1235
1236 void EditingStyle::forceInline() 1236 void EditingStyle::forceInline()
1237 { 1237 {
1238 if (!m_mutableStyle) 1238 if (!m_mutableStyle)
1239 m_mutableStyle = MutableStylePropertySet::create(); 1239 m_mutableStyle = MutableStylePropertySet::create();
1240 const bool propertyIsImportant = true; 1240 const bool propertyIsImportant = true;
1241 m_mutableStyle->setProperty(CSSPropertyDisplay, CSSValueInline, propertyIsIm portant); 1241 m_mutableStyle->setProperty(CSSPropertyDisplay, CSSValueInline, propertyIsIm portant);
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
1661 { 1661 {
1662 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { 1662 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) {
1663 RefPtrWillBeRawPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSCompu tedStyleDeclaration::create(ancestor); 1663 RefPtrWillBeRawPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSCompu tedStyleDeclaration::create(ancestor);
1664 if (!hasTransparentBackgroundColor(ancestorStyle.get())) 1664 if (!hasTransparentBackgroundColor(ancestorStyle.get()))
1665 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor ); 1665 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor );
1666 } 1666 }
1667 return nullptr; 1667 return nullptr;
1668 } 1668 }
1669 1669
1670 } 1670 }
OLDNEW
« no previous file with comments | « Source/core/dom/PresentationAttributeStyle.cpp ('k') | Source/core/html/HTMLTableElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698