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

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

Issue 2044023005: Make PropertyReference value() return a const CSSValue& (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_remove_style_property_set_mutable_overload
Patch Set: Rebase Created 4 years, 5 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 3247 matching lines...) Expand 10 before | Expand all | Expand 10 after
3258 { 3258 {
3259 if (oldDocument == newDocument) 3259 if (oldDocument == newDocument)
3260 return false; 3260 return false;
3261 if (oldDocument.baseURL() == newDocument.baseURL()) 3261 if (oldDocument.baseURL() == newDocument.baseURL())
3262 return false; 3262 return false;
3263 const StylePropertySet* style = element.inlineStyle(); 3263 const StylePropertySet* style = element.inlineStyle();
3264 if (!style) 3264 if (!style)
3265 return false; 3265 return false;
3266 for (unsigned i = 0; i < style->propertyCount(); ++i) { 3266 for (unsigned i = 0; i < style->propertyCount(); ++i) {
3267 // FIXME: Should handle all URL-based properties: CSSImageSetValue, CSSC ursorImageValue, etc. 3267 // FIXME: Should handle all URL-based properties: CSSImageSetValue, CSSC ursorImageValue, etc.
3268 if (style->propertyAt(i).value()->isImageValue()) 3268 if (style->propertyAt(i).value().isImageValue())
3269 return true; 3269 return true;
3270 } 3270 }
3271 return false; 3271 return false;
3272 } 3272 }
3273 3273
3274 static void reResolveURLsInInlineStyle(const Document& document, MutableStylePro pertySet& style) 3274 static void reResolveURLsInInlineStyle(const Document& document, MutableStylePro pertySet& style)
3275 { 3275 {
3276 for (unsigned i = 0; i < style.propertyCount(); ++i) { 3276 for (unsigned i = 0; i < style.propertyCount(); ++i) {
3277 StylePropertySet::PropertyReference property = style.propertyAt(i); 3277 StylePropertySet::PropertyReference property = style.propertyAt(i);
3278 // FIXME: Should handle all URL-based properties: CSSImageSetValue, CSSC ursorImageValue, etc. 3278 // FIXME: Should handle all URL-based properties: CSSImageSetValue, CSSC ursorImageValue, etc.
3279 if (property.value()->isImageValue()) 3279 if (property.value().isImageValue())
3280 toCSSImageValue(property.value())->reResolveURL(document); 3280 toCSSImageValue(property.value()).reResolveURL(document);
3281 } 3281 }
3282 } 3282 }
3283 3283
3284 void Element::didMoveToNewDocument(Document& oldDocument) 3284 void Element::didMoveToNewDocument(Document& oldDocument)
3285 { 3285 {
3286 Node::didMoveToNewDocument(oldDocument); 3286 Node::didMoveToNewDocument(oldDocument);
3287 3287
3288 // If the documents differ by quirks mode then they differ by case sensitivi ty 3288 // If the documents differ by quirks mode then they differ by case sensitivi ty
3289 // for class and id names so we need to go through the attribute change logi c 3289 // for class and id names so we need to go through the attribute change logi c
3290 // to pick up the new casing in the ElementData. 3290 // to pick up the new casing in the ElementData.
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
3745 3745
3746 DEFINE_TRACE_WRAPPERS(Element) 3746 DEFINE_TRACE_WRAPPERS(Element)
3747 { 3747 {
3748 if (hasRareData()) { 3748 if (hasRareData()) {
3749 visitor->traceWrappers(elementRareData()); 3749 visitor->traceWrappers(elementRareData());
3750 } 3750 }
3751 ContainerNode::traceWrappers(visitor); 3751 ContainerNode::traceWrappers(visitor);
3752 } 3752 }
3753 3753
3754 } // namespace blink 3754 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp ('k') | third_party/WebKit/Source/core/editing/EditingStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698