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

Side by Side Diff: Source/WebCore/html/HTMLAnchorElement.cpp

Issue 12310028: Merge 142358 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 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
« no previous file with comments | « LayoutTests/fast/dom/HTMLAnchorElement/anchor-ismap-crash-expected.txt ('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) 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 ASSERT(event->target()); 129 ASSERT(event->target());
130 Node* target = event->target()->toNode(); 130 Node* target = event->target()->toNode();
131 ASSERT(target); 131 ASSERT(target);
132 if (!target->hasTagName(imgTag)) 132 if (!target->hasTagName(imgTag))
133 return; 133 return;
134 134
135 HTMLImageElement* imageElement = static_cast<HTMLImageElement*>(event->targe t()->toNode()); 135 HTMLImageElement* imageElement = static_cast<HTMLImageElement*>(event->targe t()->toNode());
136 if (!imageElement || !imageElement->isServerMap()) 136 if (!imageElement || !imageElement->isServerMap())
137 return; 137 return;
138 138
139 if (!imageElement->renderer() || !imageElement->renderer()->isRenderImage())
140 return;
139 RenderImage* renderer = toRenderImage(imageElement->renderer()); 141 RenderImage* renderer = toRenderImage(imageElement->renderer());
140 if (!renderer)
141 return;
142 142
143 // FIXME: This should probably pass true for useTransforms. 143 // FIXME: This should probably pass true for useTransforms.
144 FloatPoint absolutePosition = renderer->absoluteToLocal(FloatPoint(static_ca st<MouseEvent*>(event)->pageX(), static_cast<MouseEvent*>(event)->pageY())); 144 FloatPoint absolutePosition = renderer->absoluteToLocal(FloatPoint(static_ca st<MouseEvent*>(event)->pageX(), static_cast<MouseEvent*>(event)->pageY()));
145 int x = absolutePosition.x(); 145 int x = absolutePosition.x();
146 int y = absolutePosition.y(); 146 int y = absolutePosition.y();
147 url.append('?'); 147 url.append('?');
148 url.appendNumber(x); 148 url.appendNumber(x);
149 url.append(','); 149 url.append(',');
150 url.appendNumber(y); 150 url.appendNumber(y);
151 } 151 }
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 if (!element) { 619 if (!element) {
620 clearRootEditableElementForSelectionOnMouseDown(); 620 clearRootEditableElementForSelectionOnMouseDown();
621 return; 621 return;
622 } 622 }
623 623
624 rootEditableElementMap().set(this, element); 624 rootEditableElementMap().set(this, element);
625 m_hasRootEditableElementForSelectionOnMouseDown = true; 625 m_hasRootEditableElementForSelectionOnMouseDown = true;
626 } 626 }
627 627
628 } 628 }
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/HTMLAnchorElement/anchor-ismap-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698