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

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

Issue 21006006: Add forEach() to CSSVariablesMap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Python code generator changes Created 7 years, 4 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 * (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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 { 312 {
313 ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled()); 313 ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled());
314 StyleAttributeMutationScope mutationScope(this); 314 StyleAttributeMutationScope mutationScope(this);
315 willMutate(); 315 willMutate();
316 bool changed = m_propertySet->clearVariables(); 316 bool changed = m_propertySet->clearVariables();
317 didMutate(changed ? PropertyChanged : NoChanges); 317 didMutate(changed ? PropertyChanged : NoChanges);
318 if (changed) 318 if (changed)
319 mutationScope.enqueueMutationRecord(); 319 mutationScope.enqueueMutationRecord();
320 } 320 }
321 321
322 PassRefPtr<CSSVariablesIterator> PropertySetCSSStyleDeclaration::variablesIterat or() const
323 {
324 return m_propertySet->variablesIterator();
325 }
326
322 CSSValue* PropertySetCSSStyleDeclaration::cloneAndCacheForCSSOM(CSSValue* intern alValue) 327 CSSValue* PropertySetCSSStyleDeclaration::cloneAndCacheForCSSOM(CSSValue* intern alValue)
323 { 328 {
324 if (!internalValue) 329 if (!internalValue)
325 return 0; 330 return 0;
326 331
327 // The map is here to maintain the object identity of the CSSValues over mul tiple invocations. 332 // The map is here to maintain the object identity of the CSSValues over mul tiple invocations.
328 // FIXME: It is likely that the identity is not important for web compatibil ity and this code should be removed. 333 // FIXME: It is likely that the identity is not important for web compatibil ity and this code should be removed.
329 if (!m_cssomCSSValueClones) 334 if (!m_cssomCSSValueClones)
330 m_cssomCSSValueClones = adoptPtr(new HashMap<CSSValue*, RefPtr<CSSValue> >); 335 m_cssomCSSValueClones = adoptPtr(new HashMap<CSSValue*, RefPtr<CSSValue> >);
331 336
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 m_parentElement->invalidateStyleAttribute(); 424 m_parentElement->invalidateStyleAttribute();
420 StyleAttributeMutationScope(this).didInvalidateStyleAttr(); 425 StyleAttributeMutationScope(this).didInvalidateStyleAttr();
421 } 426 }
422 427
423 CSSStyleSheet* InlineCSSStyleDeclaration::parentStyleSheet() const 428 CSSStyleSheet* InlineCSSStyleDeclaration::parentStyleSheet() const
424 { 429 {
425 return m_parentElement ? m_parentElement->document()->elementSheet() : 0; 430 return m_parentElement ? m_parentElement->document()->elementSheet() : 0;
426 } 431 }
427 432
428 } // namespace WebCore 433 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698