| 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 16 matching lines...) Expand all Loading... |
| 27 #include "XLinkNames.h" | 27 #include "XLinkNames.h" |
| 28 #include "core/dom/DocumentMarkerController.h" | 28 #include "core/dom/DocumentMarkerController.h" |
| 29 #include "core/dom/NodeRenderingTraversal.h" | 29 #include "core/dom/NodeRenderingTraversal.h" |
| 30 #include "core/dom/shadow/ShadowRoot.h" | 30 #include "core/dom/shadow/ShadowRoot.h" |
| 31 #include "core/editing/FrameSelection.h" | 31 #include "core/editing/FrameSelection.h" |
| 32 #include "core/html/HTMLAnchorElement.h" | 32 #include "core/html/HTMLAnchorElement.h" |
| 33 #include "core/html/HTMLAreaElement.h" | 33 #include "core/html/HTMLAreaElement.h" |
| 34 #include "core/html/HTMLImageElement.h" | 34 #include "core/html/HTMLImageElement.h" |
| 35 #include "core/html/HTMLInputElement.h" | 35 #include "core/html/HTMLInputElement.h" |
| 36 #include "core/html/HTMLMediaElement.h" | 36 #include "core/html/HTMLMediaElement.h" |
| 37 #include "core/html/HTMLTextAreaElement.h" |
| 37 #include "core/html/HTMLVideoElement.h" | 38 #include "core/html/HTMLVideoElement.h" |
| 38 #include "core/html/parser/HTMLParserIdioms.h" | 39 #include "core/html/parser/HTMLParserIdioms.h" |
| 39 #include "core/loader/cache/CachedImage.h" | 40 #include "core/loader/cache/CachedImage.h" |
| 40 #include "core/page/Frame.h" | 41 #include "core/page/Frame.h" |
| 41 #include "core/page/FrameTree.h" | 42 #include "core/page/FrameTree.h" |
| 42 #include "core/platform/Scrollbar.h" | 43 #include "core/platform/Scrollbar.h" |
| 43 #include "core/rendering/HitTestLocation.h" | 44 #include "core/rendering/HitTestLocation.h" |
| 44 #include "core/rendering/RenderImage.h" | 45 #include "core/rendering/RenderImage.h" |
| 45 | 46 |
| 46 namespace WebCore { | 47 namespace WebCore { |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 | 379 |
| 379 // FIXME: This function needs a better name and may belong in a different class.
It's not | 380 // FIXME: This function needs a better name and may belong in a different class.
It's not |
| 380 // really isContentEditable(); it's more like needsEditingContextMenu(). In many
ways, this | 381 // really isContentEditable(); it's more like needsEditingContextMenu(). In many
ways, this |
| 381 // function would make more sense in the ContextMenu class, except that WebEleme
ntDictionary | 382 // function would make more sense in the ContextMenu class, except that WebEleme
ntDictionary |
| 382 // hooks into it. Anyway, we should architect this better. | 383 // hooks into it. Anyway, we should architect this better. |
| 383 bool HitTestResult::isContentEditable() const | 384 bool HitTestResult::isContentEditable() const |
| 384 { | 385 { |
| 385 if (!m_innerNonSharedNode) | 386 if (!m_innerNonSharedNode) |
| 386 return false; | 387 return false; |
| 387 | 388 |
| 388 if (m_innerNonSharedNode->hasTagName(textareaTag)) | 389 if (isHTMLTextAreaElement(m_innerNonSharedNode.get())) |
| 389 return true; | 390 return true; |
| 390 | 391 |
| 391 if (m_innerNonSharedNode->hasTagName(inputTag)) | 392 if (m_innerNonSharedNode->hasTagName(inputTag)) |
| 392 return toHTMLInputElement(m_innerNonSharedNode.get())->isTextField(); | 393 return toHTMLInputElement(m_innerNonSharedNode.get())->isTextField(); |
| 393 | 394 |
| 394 return m_innerNonSharedNode->rendererIsEditable(); | 395 return m_innerNonSharedNode->rendererIsEditable(); |
| 395 } | 396 } |
| 396 | 397 |
| 397 bool HitTestResult::addNodeToRectBasedTestResult(Node* node, const HitTestReques
t& request, const HitTestLocation& locationInContainer, const LayoutRect& rect) | 398 bool HitTestResult::addNodeToRectBasedTestResult(Node* node, const HitTestReques
t& request, const HitTestLocation& locationInContainer, const LayoutRect& rect) |
| 398 { | 399 { |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 { | 489 { |
| 489 NodeRenderingTraversal::ParentDetails details; | 490 NodeRenderingTraversal::ParentDetails details; |
| 490 for (Node* node = m_innerNode.get(); node; node = NodeRenderingTraversal::pa
rent(node, &details)) | 491 for (Node* node = m_innerNode.get(); node; node = NodeRenderingTraversal::pa
rent(node, &details)) |
| 491 if (node->isElementNode()) | 492 if (node->isElementNode()) |
| 492 return toElement(node); | 493 return toElement(node); |
| 493 | 494 |
| 494 return 0; | 495 return 0; |
| 495 } | 496 } |
| 496 | 497 |
| 497 } // namespace WebCore | 498 } // namespace WebCore |
| OLD | NEW |