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

Side by Side Diff: Source/core/html/HTMLImageElement.h

Issue 297293004: Adding cache for security origin validations in 2D/WebGL canvases (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: reorganized code Created 6 years, 6 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 | « no previous file | Source/core/html/HTMLImageElement.cpp » ('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 * Copyright (C) 2004, 2008, 2010 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2008, 2010 Apple Inc. All rights reserved.
5 * Copyright (C) 2010 Google Inc. All rights reserved. 5 * Copyright (C) 2010 Google Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 virtual const AtomicString imageSourceURL() const OVERRIDE; 86 virtual const AtomicString imageSourceURL() const OVERRIDE;
87 87
88 virtual HTMLFormElement* formOwner() const OVERRIDE; 88 virtual HTMLFormElement* formOwner() const OVERRIDE;
89 void formRemovedFromTree(const Node& formRoot); 89 void formRemovedFromTree(const Node& formRoot);
90 90
91 // CanvasImageSourceImplementations 91 // CanvasImageSourceImplementations
92 virtual PassRefPtr<Image> getSourceImageForCanvas(SourceImageMode, SourceIma geStatus*) const; 92 virtual PassRefPtr<Image> getSourceImageForCanvas(SourceImageMode, SourceIma geStatus*) const;
93 virtual bool wouldTaintOrigin(SecurityOrigin*) const OVERRIDE; 93 virtual bool wouldTaintOrigin(SecurityOrigin*) const OVERRIDE;
94 virtual FloatSize sourceSize() const OVERRIDE; 94 virtual FloatSize sourceSize() const OVERRIDE;
95 virtual FloatSize defaultDestinationSize() const OVERRIDE; 95 virtual FloatSize defaultDestinationSize() const OVERRIDE;
96 virtual const KURL& sourceURL() const OVERRIDE;
96 97
97 enum UpdateFromElementBehavior { 98 enum UpdateFromElementBehavior {
98 UpdateNormal, 99 UpdateNormal,
99 UpdateIgnorePreviousError 100 UpdateIgnorePreviousError
100 }; 101 };
101 // public so that HTMLPictureElement can call this as well. 102 // public so that HTMLPictureElement can call this as well.
102 void selectSourceURL(UpdateFromElementBehavior); 103 void selectSourceURL(UpdateFromElementBehavior);
103 protected: 104 protected:
104 explicit HTMLImageElement(Document&, HTMLFormElement* = 0, bool createdByPar ser = false); 105 explicit HTMLImageElement(Document&, HTMLFormElement* = 0, bool createdByPar ser = false);
105 106
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 AtomicString m_bestFitImageURL; 145 AtomicString m_bestFitImageURL;
145 AtomicString m_currentSrc; 146 AtomicString m_currentSrc;
146 float m_imageDevicePixelRatio; 147 float m_imageDevicePixelRatio;
147 bool m_formWasSetByParser; 148 bool m_formWasSetByParser;
148 bool m_elementCreatedByParser; 149 bool m_elementCreatedByParser;
149 }; 150 };
150 151
151 } //namespace 152 } //namespace
152 153
153 #endif 154 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/HTMLImageElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698