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

Side by Side Diff: Source/core/svg/SVGAElement.cpp

Issue 339593005: Set the target type when creating the request for main resource (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Switched to constructors 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 | « Source/core/page/DragController.cpp ('k') | Source/core/svg/graphics/SVGImage.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) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2007 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) 2010 Apple Inc. All rights reserved. 5 * Copyright (C) 2010 Apple 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 } 154 }
155 155
156 AtomicString target(m_svgTarget->currentValue()->value()); 156 AtomicString target(m_svgTarget->currentValue()->value());
157 if (target.isEmpty() && fastGetAttribute(XLinkNames::showAttr) == "n ew") 157 if (target.isEmpty() && fastGetAttribute(XLinkNames::showAttr) == "n ew")
158 target = AtomicString("_blank", AtomicString::ConstructFromLiter al); 158 target = AtomicString("_blank", AtomicString::ConstructFromLiter al);
159 event->setDefaultHandled(); 159 event->setDefaultHandled();
160 160
161 LocalFrame* frame = document().frame(); 161 LocalFrame* frame = document().frame();
162 if (!frame) 162 if (!frame)
163 return; 163 return;
164 FrameLoadRequest frameRequest(&document(), ResourceRequest(document( ).completeURL(url)), target); 164 ResourceRequest request = ResourceRequest(document().completeURL(url ), frame->isMainFrame());
165 FrameLoadRequest frameRequest(&document(), request, target);
165 frameRequest.setTriggeringEvent(event); 166 frameRequest.setTriggeringEvent(event);
166 frame->loader().load(frameRequest); 167 frame->loader().load(frameRequest);
167 return; 168 return;
168 } 169 }
169 } 170 }
170 171
171 SVGGraphicsElement::defaultEventHandler(event); 172 SVGGraphicsElement::defaultEventHandler(event);
172 } 173 }
173 174
174 short SVGAElement::tabIndex() const 175 short SVGAElement::tabIndex() const
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 return SVGElement::canStartSelection(); 217 return SVGElement::canStartSelection();
217 return rendererIsEditable(); 218 return rendererIsEditable();
218 } 219 }
219 220
220 bool SVGAElement::willRespondToMouseClickEvents() 221 bool SVGAElement::willRespondToMouseClickEvents()
221 { 222 {
222 return isLink() || SVGGraphicsElement::willRespondToMouseClickEvents(); 223 return isLink() || SVGGraphicsElement::willRespondToMouseClickEvents();
223 } 224 }
224 225
225 } // namespace WebCore 226 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/DragController.cpp ('k') | Source/core/svg/graphics/SVGImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698