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

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

Powered by Google App Engine
This is Rietveld 408576698