| Index: third_party/WebKit/Source/core/html/parser/HTMLSrcsetParser.h
|
| diff --git a/third_party/WebKit/Source/core/html/parser/HTMLSrcsetParser.h b/third_party/WebKit/Source/core/html/parser/HTMLSrcsetParser.h
|
| index 16492ee1c58b5f9af60161b893e3b278a74e4150..7d41831c77aa389de4b2aae9a93b889a2c60cd02 100644
|
| --- a/third_party/WebKit/Source/core/html/parser/HTMLSrcsetParser.h
|
| +++ b/third_party/WebKit/Source/core/html/parser/HTMLSrcsetParser.h
|
| @@ -86,21 +86,22 @@ public:
|
| }
|
|
|
| ImageCandidate(const String& source, unsigned start, unsigned length, const DescriptorParsingResult& result, OriginAttribute originAttribute)
|
| - : m_string(source.createView(start, length))
|
| - , m_density(result.hasDensity()?result.density():UninitializedDescriptor)
|
| - , m_resourceWidth(result.hasWidth()?result.getResourceWidth():UninitializedDescriptor)
|
| + : m_source(source)
|
| + , m_string(source, start, length)
|
| + , m_density(result.hasDensity() ? result.density() : UninitializedDescriptor)
|
| + , m_resourceWidth(result.hasWidth() ? result.getResourceWidth() : UninitializedDescriptor)
|
| , m_originAttribute(originAttribute)
|
| {
|
| }
|
|
|
| String toString() const
|
| {
|
| - return String(m_string.toString());
|
| + return m_string.toString();
|
| }
|
|
|
| AtomicString url() const
|
| {
|
| - return AtomicString(m_string.toString());
|
| + return AtomicString(toString());
|
| }
|
|
|
| void setDensity(float factor)
|
| @@ -129,6 +130,7 @@ public:
|
| }
|
|
|
| private:
|
| + String m_source; // Keep the StringView buffer alive.
|
| StringView m_string;
|
| float m_density;
|
| int m_resourceWidth;
|
|
|