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

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: 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 3038 matching lines...) Expand 10 before | Expand all | Expand 10 after
3049 { 3049 {
3050 if (oldDocument == newDocument) 3050 if (oldDocument == newDocument)
3051 return false; 3051 return false;
3052 if (oldDocument.baseURL() == newDocument.baseURL()) 3052 if (oldDocument.baseURL() == newDocument.baseURL())
3053 return false; 3053 return false;
3054 const StylePropertySet* style = element.inlineStyle(); 3054 const StylePropertySet* style = element.inlineStyle();
3055 if (!style) 3055 if (!style)
3056 return false; 3056 return false;
3057 for (unsigned i = 0; i < style->propertyCount(); ++i) { 3057 for (unsigned i = 0; i < style->propertyCount(); ++i) {
3058 // FIXME: Should handle all URL-based properties: CSSImageSetValue, CSSC ursorImageValue, etc. 3058 // FIXME: Should handle all URL-based properties: CSSImageSetValue, CSSC ursorImageValue, etc.
3059 if (style->propertyAt(i).value()->isImageValue()) 3059 if (style->propertyAt(i).value().isImageValue())
3060 return true; 3060 return true;
3061 } 3061 }
3062 return false; 3062 return false;
3063 } 3063 }
3064 3064
3065 static void reResolveURLsInInlineStyle(const Document& document, MutableStylePro pertySet& style) 3065 static void reResolveURLsInInlineStyle(const Document& document, MutableStylePro pertySet& style)
3066 { 3066 {
3067 for (unsigned i = 0; i < style.propertyCount(); ++i) { 3067 for (unsigned i = 0; i < style.propertyCount(); ++i) {
3068 StylePropertySet::PropertyReference property = style.propertyAt(i); 3068 StylePropertySet::PropertyReference property = style.propertyAt(i);
3069 // FIXME: Should handle all URL-based properties: CSSImageSetValue, CSSC ursorImageValue, etc. 3069 // FIXME: Should handle all URL-based properties: CSSImageSetValue, CSSC ursorImageValue, etc.
3070 if (property.value()->isImageValue()) 3070 if (property.value().isImageValue())
3071 toCSSImageValue(property.value())->reResolveURL(document); 3071 toCSSImageValue(property.value()).reResolveURL(document);
3072 } 3072 }
3073 } 3073 }
3074 3074
3075 void Element::didMoveToNewDocument(Document& oldDocument) 3075 void Element::didMoveToNewDocument(Document& oldDocument)
3076 { 3076 {
3077 Node::didMoveToNewDocument(oldDocument); 3077 Node::didMoveToNewDocument(oldDocument);
3078 3078
3079 // If the documents differ by quirks mode then they differ by case sensitivi ty 3079 // If the documents differ by quirks mode then they differ by case sensitivi ty
3080 // for class and id names so we need to go through the attribute change logi c 3080 // for class and id names so we need to go through the attribute change logi c
3081 // to pick up the new casing in the ElementData. 3081 // to pick up the new casing in the ElementData.
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
3470 { 3470 {
3471 #if ENABLE(OILPAN) 3471 #if ENABLE(OILPAN)
3472 if (hasRareData()) 3472 if (hasRareData())
3473 visitor->trace(elementRareData()); 3473 visitor->trace(elementRareData());
3474 visitor->trace(m_elementData); 3474 visitor->trace(m_elementData);
3475 #endif 3475 #endif
3476 ContainerNode::trace(visitor); 3476 ContainerNode::trace(visitor);
3477 } 3477 }
3478 3478
3479 } // namespace blink 3479 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698