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

Side by Side Diff: third_party/WebKit/Source/core/css/PropertySetCSSStyleDeclaration.cpp

Issue 2336103003: Convert a few more CFI blacklist entries into DISABLE_CFI_PERF attributes. (Closed)
Patch Set: Created 4 years, 3 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 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. 4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 const CSSValue* AbstractPropertySetCSSStyleDeclaration::getPropertyCSSValueInter nal(AtomicString customPropertyName) 275 const CSSValue* AbstractPropertySetCSSStyleDeclaration::getPropertyCSSValueInter nal(AtomicString customPropertyName)
276 { 276 {
277 return propertySet().getPropertyCSSValue(customPropertyName); 277 return propertySet().getPropertyCSSValue(customPropertyName);
278 } 278 }
279 279
280 String AbstractPropertySetCSSStyleDeclaration::getPropertyValueInternal(CSSPrope rtyID propertyID) 280 String AbstractPropertySetCSSStyleDeclaration::getPropertyValueInternal(CSSPrope rtyID propertyID)
281 { 281 {
282 return propertySet().getPropertyValue(propertyID); 282 return propertySet().getPropertyValue(propertyID);
283 } 283 }
284 284
285 DISABLE_CFI_PERF
285 void AbstractPropertySetCSSStyleDeclaration::setPropertyInternal(CSSPropertyID u nresolvedProperty, const String& customPropertyName, const String& value, bool i mportant, ExceptionState&) 286 void AbstractPropertySetCSSStyleDeclaration::setPropertyInternal(CSSPropertyID u nresolvedProperty, const String& customPropertyName, const String& value, bool i mportant, ExceptionState&)
286 { 287 {
287 StyleAttributeMutationScope mutationScope(this); 288 StyleAttributeMutationScope mutationScope(this);
288 willMutate(); 289 willMutate();
289 290
290 bool changed = false; 291 bool changed = false;
291 if (unresolvedProperty == CSSPropertyVariable) 292 if (unresolvedProperty == CSSPropertyVariable)
292 changed = propertySet().setProperty(AtomicString(customPropertyName), va lue, important, contextStyleSheet()); 293 changed = propertySet().setProperty(AtomicString(customPropertyName), va lue, important, contextStyleSheet());
293 else 294 else
294 changed = propertySet().setProperty(unresolvedProperty, value, important , contextStyleSheet()); 295 changed = propertySet().setProperty(unresolvedProperty, value, important , contextStyleSheet());
295 296
296 didMutate(changed ? PropertyChanged : NoChanges); 297 didMutate(changed ? PropertyChanged : NoChanges);
297 298
298 if (!changed) 299 if (!changed)
299 return; 300 return;
300 301
301 Element* parent = parentElement(); 302 Element* parent = parentElement();
302 if (parent) 303 if (parent)
303 parent->document().styleEngine().attributeChangedForElement(HTMLNames::s tyleAttr, *parent); 304 parent->document().styleEngine().attributeChangedForElement(HTMLNames::s tyleAttr, *parent);
304 mutationScope.enqueueMutationRecord(); 305 mutationScope.enqueueMutationRecord();
305 } 306 }
306 307
308 DISABLE_CFI_PERF
307 StyleSheetContents* AbstractPropertySetCSSStyleDeclaration::contextStyleSheet() const 309 StyleSheetContents* AbstractPropertySetCSSStyleDeclaration::contextStyleSheet() const
308 { 310 {
309 CSSStyleSheet* cssStyleSheet = parentStyleSheet(); 311 CSSStyleSheet* cssStyleSheet = parentStyleSheet();
310 return cssStyleSheet ? cssStyleSheet->contents() : nullptr; 312 return cssStyleSheet ? cssStyleSheet->contents() : nullptr;
311 } 313 }
312 314
313 bool AbstractPropertySetCSSStyleDeclaration::cssPropertyMatches(CSSPropertyID pr opertyID, const CSSValue* propertyValue) const 315 bool AbstractPropertySetCSSStyleDeclaration::cssPropertyMatches(CSSPropertyID pr opertyID, const CSSValue* propertyValue) const
314 { 316 {
315 return propertySet().propertyMatches(propertyID, *propertyValue); 317 return propertySet().propertyMatches(propertyID, *propertyValue);
316 } 318 }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 return m_parentElement ? &m_parentElement->document().elementSheet() : nullp tr; 385 return m_parentElement ? &m_parentElement->document().elementSheet() : nullp tr;
384 } 386 }
385 387
386 DEFINE_TRACE(InlineCSSStyleDeclaration) 388 DEFINE_TRACE(InlineCSSStyleDeclaration)
387 { 389 {
388 visitor->trace(m_parentElement); 390 visitor->trace(m_parentElement);
389 AbstractPropertySetCSSStyleDeclaration::trace(visitor); 391 AbstractPropertySetCSSStyleDeclaration::trace(visitor);
390 } 392 }
391 393
392 } // namespace blink 394 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698