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

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

Issue 1227793003: Perf Tryjob: CSSValue refactor step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: CL for perf tryjob on mac Created 5 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
« 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 3020 matching lines...) Expand 10 before | Expand all | Expand 10 after
3031 { 3031 {
3032 if (oldDocument == newDocument) 3032 if (oldDocument == newDocument)
3033 return false; 3033 return false;
3034 if (oldDocument.baseURL() == newDocument.baseURL()) 3034 if (oldDocument.baseURL() == newDocument.baseURL())
3035 return false; 3035 return false;
3036 const StylePropertySet* style = element.inlineStyle(); 3036 const StylePropertySet* style = element.inlineStyle();
3037 if (!style) 3037 if (!style)
3038 return false; 3038 return false;
3039 for (unsigned i = 0; i < style->propertyCount(); ++i) { 3039 for (unsigned i = 0; i < style->propertyCount(); ++i) {
3040 // FIXME: Should handle all URL-based properties: CSSImageSetValue, CSSC ursorImageValue, etc. 3040 // FIXME: Should handle all URL-based properties: CSSImageSetValue, CSSC ursorImageValue, etc.
3041 if (style->propertyAt(i).value()->isImageValue()) 3041 if (style->propertyAt(i).value().isImageValue())
3042 return true; 3042 return true;
3043 } 3043 }
3044 return false; 3044 return false;
3045 } 3045 }
3046 3046
3047 static void reResolveURLsInInlineStyle(const Document& document, MutableStylePro pertySet& style) 3047 static void reResolveURLsInInlineStyle(const Document& document, MutableStylePro pertySet& style)
3048 { 3048 {
3049 for (unsigned i = 0; i < style.propertyCount(); ++i) { 3049 for (unsigned i = 0; i < style.propertyCount(); ++i) {
3050 StylePropertySet::PropertyReference property = style.propertyAt(i); 3050 StylePropertySet::PropertyReference property = style.propertyAt(i);
3051 // FIXME: Should handle all URL-based properties: CSSImageSetValue, CSSC ursorImageValue, etc. 3051 // FIXME: Should handle all URL-based properties: CSSImageSetValue, CSSC ursorImageValue, etc.
3052 if (property.value()->isImageValue()) 3052 if (property.value().isImageValue())
3053 toCSSImageValue(property.value())->reResolveURL(document); 3053 toCSSImageValue(property.value()).reResolveURL(document);
3054 } 3054 }
3055 } 3055 }
3056 3056
3057 void Element::didMoveToNewDocument(Document& oldDocument) 3057 void Element::didMoveToNewDocument(Document& oldDocument)
3058 { 3058 {
3059 Node::didMoveToNewDocument(oldDocument); 3059 Node::didMoveToNewDocument(oldDocument);
3060 3060
3061 // If the documents differ by quirks mode then they differ by case sensitivi ty 3061 // If the documents differ by quirks mode then they differ by case sensitivi ty
3062 // for class and id names so we need to go through the attribute change logi c 3062 // for class and id names so we need to go through the attribute change logi c
3063 // to pick up the new casing in the ElementData. 3063 // to pick up the new casing in the ElementData.
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
3442 { 3442 {
3443 #if ENABLE(OILPAN) 3443 #if ENABLE(OILPAN)
3444 if (hasRareData()) 3444 if (hasRareData())
3445 visitor->trace(elementRareData()); 3445 visitor->trace(elementRareData());
3446 visitor->trace(m_elementData); 3446 visitor->trace(m_elementData);
3447 #endif 3447 #endif
3448 ContainerNode::trace(visitor); 3448 ContainerNode::trace(visitor);
3449 } 3449 }
3450 3450
3451 } // namespace blink 3451 } // 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