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

Side by Side Diff: Source/core/rendering/svg/RenderSVGRoot.cpp

Issue 246933007: Make <iframe> containing SVG behave as every other <iframe> (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add NeedsRebaseline to test for landing Created 6 years, 8 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/rendering/RenderReplaced.h ('k') | no next file » | 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) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2007, 2008, 2009 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2007, 2008, 2009 Rob Buis <buis@kde.org>
4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2009 Google, Inc. 5 * Copyright (C) 2009 Google, Inc.
6 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 bool RenderSVGRoot::isEmbeddedThroughFrameContainingSVGDocument() const 99 bool RenderSVGRoot::isEmbeddedThroughFrameContainingSVGDocument() const
100 { 100 {
101 if (!node()) 101 if (!node())
102 return false; 102 return false;
103 103
104 LocalFrame* frame = node()->document().frame(); 104 LocalFrame* frame = node()->document().frame();
105 if (!frame) 105 if (!frame)
106 return false; 106 return false;
107 107
108 // If our frame has an owner renderer, we're embedded through eg. object/emb ed/iframe, 108 // If our frame has an owner renderer, we're embedded through eg. object/emb ed/iframe,
109 // but we only negotiate if we're in an SVG document. 109 // but we only negotiate if we're in an SVG document inside a embedded objec t (object/embed).
110 if (!frame->ownerRenderer()) 110 if (!frame->ownerRenderer() || !frame->ownerRenderer()->isEmbeddedObject())
111 return false; 111 return false;
112 return frame->document()->isSVGDocument(); 112 return frame->document()->isSVGDocument();
113 } 113 }
114 114
115 static inline LayoutUnit resolveLengthAttributeForSVG(const Length& length, floa t scale, float maxSize) 115 static inline LayoutUnit resolveLengthAttributeForSVG(const Length& length, floa t scale, float maxSize)
116 { 116 {
117 return static_cast<LayoutUnit>(valueForLength(length, maxSize) * (length.isF ixed() ? scale : 1)); 117 return static_cast<LayoutUnit>(valueForLength(length, maxSize) * (length.isF ixed() ? scale : 1));
118 } 118 }
119 119
120 LayoutUnit RenderSVGRoot::computeReplacedLogicalWidth(ShouldComputePreferred sho uldComputePreferred) const 120 LayoutUnit RenderSVGRoot::computeReplacedLogicalWidth(ShouldComputePreferred sho uldComputePreferred) const
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 updateHitTestResult(result, pointInBorderBox); 432 updateHitTestResult(result, pointInBorderBox);
433 if (!result.addNodeToRectBasedTestResult(node(), request, locationIn Container, boundsRect)) 433 if (!result.addNodeToRectBasedTestResult(node(), request, locationIn Container, boundsRect))
434 return true; 434 return true;
435 } 435 }
436 } 436 }
437 437
438 return false; 438 return false;
439 } 439 }
440 440
441 } 441 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderReplaced.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698