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

Side by Side Diff: Source/core/html/HTMLPlugInImageElement.cpp

Issue 23886003: Have HTMLElements / SVGElements constructors take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Another Android build fix Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLPlugInImageElement.h ('k') | Source/core/html/HTMLPreElement.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) 2008, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 typedef Vector<RefPtr<HTMLPlugInImageElement> > HTMLPlugInImageElementList; 46 typedef Vector<RefPtr<HTMLPlugInImageElement> > HTMLPlugInImageElementList;
47 47
48 static const int sizingTinyDimensionThreshold = 40; 48 static const int sizingTinyDimensionThreshold = 40;
49 static const int sizingSmallWidthThreshold = 250; 49 static const int sizingSmallWidthThreshold = 250;
50 static const int sizingMediumWidthThreshold = 450; 50 static const int sizingMediumWidthThreshold = 450;
51 static const int sizingMediumHeightThreshold = 300; 51 static const int sizingMediumHeightThreshold = 300;
52 static const float sizingFullPageAreaRatioThreshold = 0.96; 52 static const float sizingFullPageAreaRatioThreshold = 0.96;
53 static const float autostartSoonAfterUserGestureThreshold = 5.0; 53 static const float autostartSoonAfterUserGestureThreshold = 5.0;
54 54
55 HTMLPlugInImageElement::HTMLPlugInImageElement(const QualifiedName& tagName, Doc ument* document, bool createdByParser, PreferPlugInsForImagesOption preferPlugIn sForImagesOption) 55 HTMLPlugInImageElement::HTMLPlugInImageElement(const QualifiedName& tagName, Doc ument& document, bool createdByParser, PreferPlugInsForImagesOption preferPlugIn sForImagesOption)
56 : HTMLPlugInElement(tagName, document) 56 : HTMLPlugInElement(tagName, document)
57 // m_needsWidgetUpdate(!createdByParser) allows HTMLObjectElement to delay 57 // m_needsWidgetUpdate(!createdByParser) allows HTMLObjectElement to delay
58 // widget updates until after all children are parsed. For HTMLEmbedElement 58 // widget updates until after all children are parsed. For HTMLEmbedElement
59 // this delay is unnecessary, but it is simpler to make both classes share 59 // this delay is unnecessary, but it is simpler to make both classes share
60 // the same codepath in this class. 60 // the same codepath in this class.
61 , m_needsWidgetUpdate(!createdByParser) 61 , m_needsWidgetUpdate(!createdByParser)
62 , m_shouldPreferPlugInsForImages(preferPlugInsForImagesOption == ShouldPrefe rPlugInsForImages) 62 , m_shouldPreferPlugInsForImages(preferPlugInsForImagesOption == ShouldPrefe rPlugInsForImages)
63 , m_createdDuringUserGesture(ScriptController::processingUserGesture()) 63 , m_createdDuringUserGesture(ScriptController::processingUserGesture())
64 { 64 {
65 setHasCustomStyleCallbacks(); 65 setHasCustomStyleCallbacks();
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 renderEmbeddedObject()->setPluginUnavailabilityReason(RenderEmbeddedObje ct::PluginBlockedByContentSecurityPolicy); 322 renderEmbeddedObject()->setPluginUnavailabilityReason(RenderEmbeddedObje ct::PluginBlockedByContentSecurityPolicy);
323 return false; 323 return false;
324 } 324 }
325 325
326 if (frame->loader() && !frame->loader()->mixedContentChecker()->canRunInsecu reContent(document().securityOrigin(), url)) 326 if (frame->loader() && !frame->loader()->mixedContentChecker()->canRunInsecu reContent(document().securityOrigin(), url))
327 return false; 327 return false;
328 return true; 328 return true;
329 } 329 }
330 330
331 } // namespace WebCore 331 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLPlugInImageElement.h ('k') | Source/core/html/HTMLPreElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698