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

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: Created 6 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
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 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after
1220 if (!styleFromMatchedRules->getPropertyCSSValue(CSSPropertyFloat) && get IdentifierValue(m_mutableStyle.get(), CSSPropertyFloat) == CSSValueNone) 1220 if (!styleFromMatchedRules->getPropertyCSSValue(CSSPropertyFloat) && get IdentifierValue(m_mutableStyle.get(), CSSPropertyFloat) == CSSValueNone)
1221 m_mutableStyle->removeProperty(CSSPropertyFloat); 1221 m_mutableStyle->removeProperty(CSSPropertyFloat);
1222 } 1222 }
1223 } 1223 }
1224 1224
1225 void EditingStyle::removePropertiesInElementDefaultStyle(Element* element) 1225 void EditingStyle::removePropertiesInElementDefaultStyle(Element* element)
1226 { 1226 {
1227 if (!m_mutableStyle || m_mutableStyle->isEmpty()) 1227 if (!m_mutableStyle || m_mutableStyle->isEmpty())
1228 return; 1228 return;
1229 1229
1230 RefPtr<StylePropertySet> defaultStyle = styleFromMatchedRulesForElement(elem ent, StyleResolver::UAAndUserCSSRules); 1230 RefPtrWillBeRawPtr<StylePropertySet> defaultStyle = styleFromMatchedRulesFor Element(element, StyleResolver::UAAndUserCSSRules);
1231 1231
1232 removePropertiesInStyle(m_mutableStyle.get(), defaultStyle.get()); 1232 removePropertiesInStyle(m_mutableStyle.get(), defaultStyle.get());
1233 } 1233 }
1234 1234
1235 void EditingStyle::forceInline() 1235 void EditingStyle::forceInline()
1236 { 1236 {
1237 if (!m_mutableStyle) 1237 if (!m_mutableStyle)
1238 m_mutableStyle = MutableStylePropertySet::create(); 1238 m_mutableStyle = MutableStylePropertySet::create();
1239 const bool propertyIsImportant = true; 1239 const bool propertyIsImportant = true;
1240 m_mutableStyle->setProperty(CSSPropertyDisplay, CSSValueInline, propertyIsIm portant); 1240 m_mutableStyle->setProperty(CSSPropertyDisplay, CSSValueInline, propertyIsIm portant);
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
1655 { 1655 {
1656 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { 1656 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) {
1657 RefPtrWillBeRawPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSCompu tedStyleDeclaration::create(ancestor); 1657 RefPtrWillBeRawPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSCompu tedStyleDeclaration::create(ancestor);
1658 if (!hasTransparentBackgroundColor(ancestorStyle.get())) 1658 if (!hasTransparentBackgroundColor(ancestorStyle.get()))
1659 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor ); 1659 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor );
1660 } 1660 }
1661 return nullptr; 1661 return nullptr;
1662 } 1662 }
1663 1663
1664 } 1664 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698