| OLD | NEW |
| 1 /** | 1 /** |
| 2 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 2 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 3 * | 3 * |
| 4 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 4 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 5 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 5 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 6 * (C) 2000 Simon Hausmann <hausmann@kde.org> | 6 * (C) 2000 Simon Hausmann <hausmann@kde.org> |
| 7 * Copyright (C) 2003, 2006, 2007, 2008 Apple Inc. All rights reserved. | 7 * Copyright (C) 2003, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 8 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 8 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 { | 94 { |
| 95 if (!isFocusable()) | 95 if (!isFocusable()) |
| 96 return false; | 96 return false; |
| 97 | 97 |
| 98 if (!document()->frame()) | 98 if (!document()->frame()) |
| 99 return false; | 99 return false; |
| 100 | 100 |
| 101 if (!document()->frame()->eventHandler()->tabsToLinks(event)) | 101 if (!document()->frame()->eventHandler()->tabsToLinks(event)) |
| 102 return false; | 102 return false; |
| 103 | 103 |
| 104 if (!renderer() || !renderer()->isBoxModelObject()) |
| 105 return false; |
| 106 |
| 104 // Before calling absoluteRects, check for the common case where the rendere
r | 107 // Before calling absoluteRects, check for the common case where the rendere
r |
| 105 // is non-empty, since this is a faster check and almost always returns true
. | 108 // is non-empty, since this is a faster check and almost always returns true
. |
| 106 RenderBox* box = toRenderBox(renderer()); | 109 RenderBoxModelObject* box = toRenderBoxModelObject(renderer()); |
| 107 if (!box->borderBoundingBox().isEmpty()) | 110 if (!box->borderBoundingBox().isEmpty()) |
| 108 return true; | 111 return true; |
| 109 | 112 |
| 110 Vector<IntRect> rects; | 113 Vector<IntRect> rects; |
| 111 FloatPoint absPos = renderer()->localToAbsolute(); | 114 FloatPoint absPos = renderer()->localToAbsolute(); |
| 112 renderer()->absoluteRects(rects, absPos.x(), absPos.y()); | 115 renderer()->absoluteRects(rects, absPos.x(), absPos.y()); |
| 113 size_t n = rects.size(); | 116 size_t n = rects.size(); |
| 114 for (size_t i = 0; i < n; ++i) | 117 for (size_t i = 0; i < n; ++i) |
| 115 if (!rects[i].isEmpty()) | 118 if (!rects[i].isEmpty()) |
| 116 return true; | 119 return true; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 172 |
| 170 String WMLAElement::target() const | 173 String WMLAElement::target() const |
| 171 { | 174 { |
| 172 return getAttribute(HTMLNames::targetAttr); | 175 return getAttribute(HTMLNames::targetAttr); |
| 173 } | 176 } |
| 174 | 177 |
| 175 } | 178 } |
| 176 | 179 |
| 177 #endif | 180 #endif |
| 178 | 181 |
| OLD | NEW |