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

Side by Side Diff: Source/core/dom/Element.cpp

Issue 1164573002: CSSValue Immediates: Change CSSValue to an object instead of a pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase and oilpan feedback Created 5 years, 6 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
8 * (C) 2007 Eric Seidel (eric@webkit.org) 8 * (C) 2007 Eric Seidel (eric@webkit.org)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 2995 matching lines...) Expand 10 before | Expand all | Expand 10 after
3006 { 3006 {
3007 if (oldDocument == newDocument) 3007 if (oldDocument == newDocument)
3008 return false; 3008 return false;
3009 if (oldDocument.baseURL() == newDocument.baseURL()) 3009 if (oldDocument.baseURL() == newDocument.baseURL())
3010 return false; 3010 return false;
3011 const StylePropertySet* style = element.inlineStyle(); 3011 const StylePropertySet* style = element.inlineStyle();
3012 if (!style) 3012 if (!style)
3013 return false; 3013 return false;
3014 for (unsigned i = 0; i < style->propertyCount(); ++i) { 3014 for (unsigned i = 0; i < style->propertyCount(); ++i) {
3015 // FIXME: Should handle all URL-based properties: CSSImageSetValue, CSSC ursorImageValue, etc. 3015 // FIXME: Should handle all URL-based properties: CSSImageSetValue, CSSC ursorImageValue, etc.
3016 if (style->propertyAt(i).value()->isImageValue()) 3016 if (style->propertyAt(i).value().isImageValue())
3017 return true; 3017 return true;
3018 } 3018 }
3019 return false; 3019 return false;
3020 } 3020 }
3021 3021
3022 static void reResolveURLsInInlineStyle(const Document& document, MutableStylePro pertySet& style) 3022 static void reResolveURLsInInlineStyle(const Document& document, MutableStylePro pertySet& style)
3023 { 3023 {
3024 for (unsigned i = 0; i < style.propertyCount(); ++i) { 3024 for (unsigned i = 0; i < style.propertyCount(); ++i) {
3025 StylePropertySet::PropertyReference property = style.propertyAt(i); 3025 StylePropertySet::PropertyReference property = style.propertyAt(i);
3026 // FIXME: Should handle all URL-based properties: CSSImageSetValue, CSSC ursorImageValue, etc. 3026 // FIXME: Should handle all URL-based properties: CSSImageSetValue, CSSC ursorImageValue, etc.
3027 if (property.value()->isImageValue()) 3027 if (property.value().isImageValue())
3028 toCSSImageValue(property.value())->reResolveURL(document); 3028 toCSSImageValue(property.value()).reResolveURL(document);
3029 } 3029 }
3030 } 3030 }
3031 3031
3032 void Element::didMoveToNewDocument(Document& oldDocument) 3032 void Element::didMoveToNewDocument(Document& oldDocument)
3033 { 3033 {
3034 Node::didMoveToNewDocument(oldDocument); 3034 Node::didMoveToNewDocument(oldDocument);
3035 3035
3036 // If the documents differ by quirks mode then they differ by case sensitivi ty 3036 // If the documents differ by quirks mode then they differ by case sensitivi ty
3037 // for class and id names so we need to go through the attribute change logi c 3037 // for class and id names so we need to go through the attribute change logi c
3038 // to pick up the new casing in the ElementData. 3038 // to pick up the new casing in the ElementData.
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
3417 { 3417 {
3418 #if ENABLE(OILPAN) 3418 #if ENABLE(OILPAN)
3419 if (hasRareData()) 3419 if (hasRareData())
3420 visitor->trace(elementRareData()); 3420 visitor->trace(elementRareData());
3421 visitor->trace(m_elementData); 3421 visitor->trace(m_elementData);
3422 #endif 3422 #endif
3423 ContainerNode::trace(visitor); 3423 ContainerNode::trace(visitor);
3424 } 3424 }
3425 3425
3426 } // namespace blink 3426 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698