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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp

Issue 1668553003: Fix server-side image map click location with "Open link in new tab" Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: appendServerMapMousePosition function made static Created 4 years, 10 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
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 * (C) 2000 Simon Hausmann <hausmann@kde.org> 4 * (C) 2000 Simon Hausmann <hausmann@kde.org>
5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
6 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 ASSERT(document().isActive()); 100 ASSERT(document().isActive());
101 101
102 if (isFocusable() && Element::supportsFocus()) 102 if (isFocusable() && Element::supportsFocus())
103 return HTMLElement::isKeyboardFocusable(); 103 return HTMLElement::isKeyboardFocusable();
104 104
105 if (isLink() && !document().frameHost()->chromeClient().tabsToLinks()) 105 if (isLink() && !document().frameHost()->chromeClient().tabsToLinks())
106 return false; 106 return false;
107 return HTMLElement::isKeyboardFocusable(); 107 return HTMLElement::isKeyboardFocusable();
108 } 108 }
109 109
110 static void appendServerMapMousePosition(StringBuilder& url, Event* event) 110 void HTMLAnchorElement::appendServerMapMousePosition(StringBuilder& url, Event* event)
tkent 2016/02/05 02:05:47 The |event| argument should be |const Event*| or |
JakeYoon 2016/02/05 04:04:49 Could you explain to me the reason that argument s
tkent 2016/02/05 06:00:45 It ensures the Event object is not modified in the
JakeYoon 2016/02/05 07:28:34 Okay I change params type, |*| to |const *|
111 { 111 {
112 if (!event->isMouseEvent()) 112 if (!event->isMouseEvent())
113 return; 113 return;
114 114
115 ASSERT(event->target()); 115 ASSERT(event->target());
116 Node* target = event->target()->toNode(); 116 Node* target = event->target()->toNode();
117 ASSERT(target); 117 ASSERT(target);
118 if (!isHTMLImageElement(*target)) 118 if (!isHTMLImageElement(*target))
119 return; 119 return;
120 120
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 } 383 }
384 384
385 Node::InsertionNotificationRequest HTMLAnchorElement::insertedInto(ContainerNode * insertionPoint) 385 Node::InsertionNotificationRequest HTMLAnchorElement::insertedInto(ContainerNode * insertionPoint)
386 { 386 {
387 InsertionNotificationRequest request = HTMLElement::insertedInto(insertionPo int); 387 InsertionNotificationRequest request = HTMLElement::insertedInto(insertionPo int);
388 logAddElementIfIsolatedWorldAndInDocument("a", hrefAttr); 388 logAddElementIfIsolatedWorldAndInDocument("a", hrefAttr);
389 return request; 389 return request;
390 } 390 }
391 391
392 } // namespace blink 392 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698