| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |