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

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

Issue 2046243002: Removed the non-const version of PropertyReference::value() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@make_csscursorimagevalue_reresolveurl_const
Patch Set: Rebase Created 4 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
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 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after
1214 1214
1215 // The property value, if it's a percentage, may not reflect the actual comp uted value. 1215 // The property value, if it's a percentage, may not reflect the actual comp uted value.
1216 // For example: style="height: 1%; overflow: visible;" in quirksmode 1216 // For example: style="height: 1%; overflow: visible;" in quirksmode
1217 // FIXME: There are others like this, see <rdar://problem/5195123> Slashdot copy/paste fidelity problem 1217 // FIXME: There are others like this, see <rdar://problem/5195123> Slashdot copy/paste fidelity problem
1218 CSSComputedStyleDeclaration* computedStyleForElement = CSSComputedStyleDecla ration::create(element); 1218 CSSComputedStyleDeclaration* computedStyleForElement = CSSComputedStyleDecla ration::create(element);
1219 MutableStylePropertySet* fromComputedStyle = MutableStylePropertySet::create (HTMLQuirksMode); 1219 MutableStylePropertySet* fromComputedStyle = MutableStylePropertySet::create (HTMLQuirksMode);
1220 { 1220 {
1221 unsigned propertyCount = m_mutableStyle->propertyCount(); 1221 unsigned propertyCount = m_mutableStyle->propertyCount();
1222 for (unsigned i = 0; i < propertyCount; ++i) { 1222 for (unsigned i = 0; i < propertyCount; ++i) {
1223 StylePropertySet::PropertyReference property = m_mutableStyle->prope rtyAt(i); 1223 StylePropertySet::PropertyReference property = m_mutableStyle->prope rtyAt(i);
1224 CSSValue* value = property.value(); 1224 const CSSValue* value = property.value();
1225 if (!value->isPrimitiveValue()) 1225 if (!value->isPrimitiveValue())
1226 continue; 1226 continue;
1227 if (toCSSPrimitiveValue(value)->isPercentage()) { 1227 if (toCSSPrimitiveValue(value)->isPercentage()) {
1228 if (const CSSValue* computedPropertyValue = computedStyleForElem ent->getPropertyCSSValue(property.id())) 1228 if (const CSSValue* computedPropertyValue = computedStyleForElem ent->getPropertyCSSValue(property.id()))
1229 fromComputedStyle->addRespectingCascade(CSSProperty(property .id(), *computedPropertyValue)); 1229 fromComputedStyle->addRespectingCascade(CSSProperty(property .id(), *computedPropertyValue));
1230 } 1230 }
1231 } 1231 }
1232 } 1232 }
1233 m_mutableStyle->mergeAndOverrideOnConflict(fromComputedStyle); 1233 m_mutableStyle->mergeAndOverrideOnConflict(fromComputedStyle);
1234 } 1234 }
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
1757 { 1757 {
1758 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { 1758 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) {
1759 CSSComputedStyleDeclaration* ancestorStyle = CSSComputedStyleDeclaration ::create(ancestor); 1759 CSSComputedStyleDeclaration* ancestorStyle = CSSComputedStyleDeclaration ::create(ancestor);
1760 if (!hasTransparentBackgroundColor(ancestorStyle)) 1760 if (!hasTransparentBackgroundColor(ancestorStyle))
1761 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor ); 1761 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor );
1762 } 1762 }
1763 return nullptr; 1763 return nullptr;
1764 } 1764 }
1765 1765
1766 } // namespace blink 1766 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698