| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2008, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008, 2011 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 if (LayoutObject* layoutObject = m_innerNode->layoutObject()) | 234 if (LayoutObject* layoutObject = m_innerNode->layoutObject()) |
| 235 dir = layoutObject->style()->direction(); | 235 dir = layoutObject->style()->direction(); |
| 236 return marker->description(); | 236 return marker->description(); |
| 237 } | 237 } |
| 238 | 238 |
| 239 String HitTestResult::title(TextDirection& dir) const | 239 String HitTestResult::title(TextDirection& dir) const |
| 240 { | 240 { |
| 241 dir = LTR; | 241 dir = LTR; |
| 242 // Find the title in the nearest enclosing DOM node. | 242 // Find the title in the nearest enclosing DOM node. |
| 243 // For <area> tags in image maps, walk the tree for the <area>, not the <img
> using it. | 243 // For <area> tags in image maps, walk the tree for the <area>, not the <img
> using it. |
| 244 if (m_innerNode.get()) |
| 245 m_innerNode->updateDistribution(); |
| 244 for (Node* titleNode = m_innerNode.get(); titleNode; titleNode = ComposedTre
eTraversal::parent(*titleNode)) { | 246 for (Node* titleNode = m_innerNode.get(); titleNode; titleNode = ComposedTre
eTraversal::parent(*titleNode)) { |
| 245 if (titleNode->isElementNode()) { | 247 if (titleNode->isElementNode()) { |
| 246 String title = toElement(titleNode)->title(); | 248 String title = toElement(titleNode)->title(); |
| 247 if (!title.isNull()) { | 249 if (!title.isNull()) { |
| 248 if (LayoutObject* layoutObject = titleNode->layoutObject()) | 250 if (LayoutObject* layoutObject = titleNode->layoutObject()) |
| 249 dir = layoutObject->style()->direction(); | 251 dir = layoutObject->style()->direction(); |
| 250 return title; | 252 return title; |
| 251 } | 253 } |
| 252 } | 254 } |
| 253 } | 255 } |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 else if (isHTMLMapElement(m_innerNode)) | 511 else if (isHTMLMapElement(m_innerNode)) |
| 510 imageMapImageElement = toHTMLMapElement(m_innerNode)->imageElement(); | 512 imageMapImageElement = toHTMLMapElement(m_innerNode)->imageElement(); |
| 511 | 513 |
| 512 if (!imageMapImageElement) | 514 if (!imageMapImageElement) |
| 513 return m_innerNode.get(); | 515 return m_innerNode.get(); |
| 514 | 516 |
| 515 return imageMapImageElement; | 517 return imageMapImageElement; |
| 516 } | 518 } |
| 517 | 519 |
| 518 } // namespace blink | 520 } // namespace blink |
| OLD | NEW |