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

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 Created 5 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
« no previous file with comments | « Source/core/css/resolver/ViewportStyleResolver.cpp ('k') | Source/core/dom/TextLinkColors.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3029 matching lines...) Expand 10 before | Expand all | Expand 10 after
3040 { 3040 {
3041 if (oldDocument == newDocument) 3041 if (oldDocument == newDocument)
3042 return false; 3042 return false;
3043 if (oldDocument.baseURL() == newDocument.baseURL()) 3043 if (oldDocument.baseURL() == newDocument.baseURL())
3044 return false; 3044 return false;
3045 const StylePropertySet* style = element.inlineStyle(); 3045 const StylePropertySet* style = element.inlineStyle();
3046 if (!style) 3046 if (!style)
3047 return false; 3047 return false;
3048 for (unsigned i = 0; i < style->propertyCount(); ++i) { 3048 for (unsigned i = 0; i < style->propertyCount(); ++i) {
3049 // FIXME: Should handle all URL-based properties: CSSImageSetValue, CSSC ursorImageValue, etc. 3049 // FIXME: Should handle all URL-based properties: CSSImageSetValue, CSSC ursorImageValue, etc.
3050 if (style->propertyAt(i).value()->isImageValue()) 3050 if (style->propertyAt(i).value().isImageValue())
3051 return true; 3051 return true;
3052 } 3052 }
3053 return false; 3053 return false;
3054 } 3054 }
3055 3055
3056 static void reResolveURLsInInlineStyle(const Document& document, MutableStylePro pertySet& style) 3056 static void reResolveURLsInInlineStyle(const Document& document, MutableStylePro pertySet& style)
3057 { 3057 {
3058 for (unsigned i = 0; i < style.propertyCount(); ++i) { 3058 for (unsigned i = 0; i < style.propertyCount(); ++i) {
3059 StylePropertySet::PropertyReference property = style.propertyAt(i); 3059 StylePropertySet::PropertyReference property = style.propertyAt(i);
3060 // FIXME: Should handle all URL-based properties: CSSImageSetValue, CSSC ursorImageValue, etc. 3060 // FIXME: Should handle all URL-based properties: CSSImageSetValue, CSSC ursorImageValue, etc.
3061 if (property.value()->isImageValue()) 3061 if (property.value().isImageValue())
3062 toCSSImageValue(property.value())->reResolveURL(document); 3062 toCSSImageValue(property.value()).reResolveURL(document);
3063 } 3063 }
3064 } 3064 }
3065 3065
3066 void Element::didMoveToNewDocument(Document& oldDocument) 3066 void Element::didMoveToNewDocument(Document& oldDocument)
3067 { 3067 {
3068 Node::didMoveToNewDocument(oldDocument); 3068 Node::didMoveToNewDocument(oldDocument);
3069 3069
3070 // If the documents differ by quirks mode then they differ by case sensitivi ty 3070 // If the documents differ by quirks mode then they differ by case sensitivi ty
3071 // for class and id names so we need to go through the attribute change logi c 3071 // for class and id names so we need to go through the attribute change logi c
3072 // to pick up the new casing in the ElementData. 3072 // to pick up the new casing in the ElementData.
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
3451 { 3451 {
3452 #if ENABLE(OILPAN) 3452 #if ENABLE(OILPAN)
3453 if (hasRareData()) 3453 if (hasRareData())
3454 visitor->trace(elementRareData()); 3454 visitor->trace(elementRareData());
3455 visitor->trace(m_elementData); 3455 visitor->trace(m_elementData);
3456 #endif 3456 #endif
3457 ContainerNode::trace(visitor); 3457 ContainerNode::trace(visitor);
3458 } 3458 }
3459 3459
3460 } // namespace blink 3460 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/resolver/ViewportStyleResolver.cpp ('k') | Source/core/dom/TextLinkColors.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698