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

Side by Side Diff: Source/core/css/CSSImageValue.cpp

Issue 1335183002: Change CSSImageValue's member variables from String to AtomicString (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: (rebase) Created 5 years, 3 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/CSSImageValue.h ('k') | Source/core/css/parser/CSSPropertyParser.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 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 16 matching lines...) Expand all
27 #include "core/fetch/FetchRequest.h" 27 #include "core/fetch/FetchRequest.h"
28 #include "core/fetch/ImageResource.h" 28 #include "core/fetch/ImageResource.h"
29 #include "core/loader/MixedContentChecker.h" 29 #include "core/loader/MixedContentChecker.h"
30 #include "core/style/StyleFetchedImage.h" 30 #include "core/style/StyleFetchedImage.h"
31 #include "core/style/StylePendingImage.h" 31 #include "core/style/StylePendingImage.h"
32 #include "platform/weborigin/KURL.h" 32 #include "platform/weborigin/KURL.h"
33 #include "platform/weborigin/SecurityPolicy.h" 33 #include "platform/weborigin/SecurityPolicy.h"
34 34
35 namespace blink { 35 namespace blink {
36 36
37 CSSImageValue::CSSImageValue(const String& rawValue, const KURL& url, StyleImage * image) 37 CSSImageValue::CSSImageValue(const AtomicString& rawValue, const KURL& url, Styl eImage* image)
38 : CSSValue(ImageClass) 38 : CSSValue(ImageClass)
39 , m_relativeURL(rawValue) 39 , m_relativeURL(rawValue)
40 , m_absoluteURL(url.string()) 40 , m_absoluteURL(url.string())
41 , m_image(image) 41 , m_image(image)
42 , m_accessedImage(image) 42 , m_accessedImage(image)
43 { 43 {
44 } 44 }
45 45
46 CSSImageValue::~CSSImageValue() 46 CSSImageValue::~CSSImageValue()
47 { 47 {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 DEFINE_TRACE_AFTER_DISPATCH(CSSImageValue) 119 DEFINE_TRACE_AFTER_DISPATCH(CSSImageValue)
120 { 120 {
121 visitor->trace(m_image); 121 visitor->trace(m_image);
122 CSSValue::traceAfterDispatch(visitor); 122 CSSValue::traceAfterDispatch(visitor);
123 } 123 }
124 124
125 void CSSImageValue::reResolveURL(const Document& document) 125 void CSSImageValue::reResolveURL(const Document& document)
126 { 126 {
127 KURL url = document.completeURL(m_relativeURL); 127 KURL url = document.completeURL(m_relativeURL);
128 if (url == m_absoluteURL) 128 AtomicString urlString(url.string());
129 if (urlString == m_absoluteURL)
129 return; 130 return;
130 m_absoluteURL = url.string(); 131 m_absoluteURL = urlString;
131 m_accessedImage = false; 132 m_accessedImage = false;
132 m_image.clear(); 133 m_image.clear();
133 } 134 }
134 135
135 } // namespace blink 136 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/CSSImageValue.h ('k') | Source/core/css/parser/CSSPropertyParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698