| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 static bool isLinkable(const AXObject& object) | 368 static bool isLinkable(const AXObject& object) |
| 369 { | 369 { |
| 370 if (!object.layoutObject()) | 370 if (!object.layoutObject()) |
| 371 return false; | 371 return false; |
| 372 | 372 |
| 373 // See https://wiki.mozilla.org/Accessibility/AT-Windows-API for the element
s | 373 // See https://wiki.mozilla.org/Accessibility/AT-Windows-API for the element
s |
| 374 // Mozilla considers linkable. | 374 // Mozilla considers linkable. |
| 375 return object.isLink() || object.isImage() || object.layoutObject()->isText(
); | 375 return object.isLink() || object.isImage() || object.layoutObject()->isText(
); |
| 376 } | 376 } |
| 377 | 377 |
| 378 // Requires layoutObject to be present because it relies on style |
| 379 // user-modify. Don't move this logic to AXNodeObject. |
| 380 // TODO(nektar): Implement support in AXNodeObject for aria-hidden and canvas. |
| 378 bool AXLayoutObject::isRichlyEditable() const | 381 bool AXLayoutObject::isRichlyEditable() const |
| 379 { | 382 { |
| 380 ASSERT(node()); | 383 if (node() && node()->isContentRichlyEditable()) |
| 381 ASSERT(m_layoutObject); | |
| 382 | |
| 383 // Requires m_layoutObject to be present because it relies on style | |
| 384 // user-modify. Don't move this logic to AXNodeObject. | |
| 385 // TODO(nektar): Implement support in AXNodeObject for aria-hidden and canva
s. | |
| 386 if (node()->isContentRichlyEditable()) | |
| 387 return true; | 384 return true; |
| 388 | 385 |
| 389 if (isWebArea()) { | 386 if (isWebArea()) { |
| 390 Document& document = m_layoutObject->document(); | 387 Document& document = m_layoutObject->document(); |
| 391 HTMLElement* body = document.body(); | 388 HTMLElement* body = document.body(); |
| 392 if (body && body->isContentRichlyEditable()) | 389 if (body && body->isContentRichlyEditable()) |
| 393 return true; | 390 return true; |
| 394 | 391 |
| 395 return document.isContentRichlyEditable(); | 392 return document.isContentRichlyEditable(); |
| 396 } | 393 } |
| (...skipping 2113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2510 if (label && label->layoutObject()) { | 2507 if (label && label->layoutObject()) { |
| 2511 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); | 2508 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); |
| 2512 result.unite(labelRect); | 2509 result.unite(labelRect); |
| 2513 } | 2510 } |
| 2514 } | 2511 } |
| 2515 | 2512 |
| 2516 return result; | 2513 return result; |
| 2517 } | 2514 } |
| 2518 | 2515 |
| 2519 } // namespace blink | 2516 } // namespace blink |
| OLD | NEW |