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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
371 | 371 |
372 // FIXME: This function needs a better name and may belong in a different class. It's not | 372 // FIXME: This function needs a better name and may belong in a different class. It's not |
373 // really isContentEditable(); it's more like needsEditingContextMenu(). In many ways, this | 373 // really isContentEditable(); it's more like needsEditingContextMenu(). In many ways, this |
374 // function would make more sense in the ContextMenu class, except that WebEleme ntDictionary | 374 // function would make more sense in the ContextMenu class, except that WebEleme ntDictionary |
375 // hooks into it. Anyway, we should architect this better. | 375 // hooks into it. Anyway, we should architect this better. |
376 bool HitTestResult::isContentEditable() const | 376 bool HitTestResult::isContentEditable() const |
377 { | 377 { |
378 if (!m_innerNonSharedNode) | 378 if (!m_innerNonSharedNode) |
379 return false; | 379 return false; |
380 | 380 |
381 if (m_innerNonSharedNode->isElementNode()) { | |
382 Element* innerElement = toElement(m_innerNonSharedNode); | |
383 if (innerElement->isFormControlElement()) { | |
yosin_UTC9
2014/04/25 01:07:20
It seems description and this change aren't matche
| |
384 HTMLFormControlElement* formControlElement = toHTMLFormControlElemen t(m_innerNonSharedNode); | |
385 if (formControlElement->isDisabledOrReadOnly()) | |
386 return false; | |
387 } | |
388 } | |
389 | |
381 if (isHTMLTextAreaElement(*m_innerNonSharedNode)) | 390 if (isHTMLTextAreaElement(*m_innerNonSharedNode)) |
382 return true; | 391 return true; |
383 | 392 |
384 if (isHTMLInputElement(*m_innerNonSharedNode)) | 393 if (isHTMLInputElement(*m_innerNonSharedNode)) |
385 return toHTMLInputElement(*m_innerNonSharedNode).isTextField(); | 394 return toHTMLInputElement(*m_innerNonSharedNode).isTextField(); |
386 | 395 |
387 return m_innerNonSharedNode->rendererIsEditable(); | 396 return m_innerNonSharedNode->rendererIsEditable(); |
388 } | 397 } |
389 | 398 |
390 bool HitTestResult::addNodeToRectBasedTestResult(Node* node, const HitTestReques t& request, const HitTestLocation& locationInContainer, const LayoutRect& rect) | 399 bool HitTestResult::addNodeToRectBasedTestResult(Node* node, const HitTestReques t& request, const HitTestLocation& locationInContainer, const LayoutRect& rect) |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
485 { | 494 { |
486 for (Node* node = m_innerNode.get(); node; node = NodeRenderingTraversal::pa rent(node)) { | 495 for (Node* node = m_innerNode.get(); node; node = NodeRenderingTraversal::pa rent(node)) { |
487 if (node->isElementNode()) | 496 if (node->isElementNode()) |
488 return toElement(node); | 497 return toElement(node); |
489 } | 498 } |
490 | 499 |
491 return 0; | 500 return 0; |
492 } | 501 } |
493 | 502 |
494 } // namespace WebCore | 503 } // namespace WebCore |
OLD | NEW |