| 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 2067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2078 axObjectCache().postNotification(this, | 2078 axObjectCache().postNotification(this, |
| 2079 AXObjectCacheImpl::AXExpandedChanged); | 2079 AXObjectCacheImpl::AXExpandedChanged); |
| 2080 } | 2080 } |
| 2081 } | 2081 } |
| 2082 | 2082 |
| 2083 void AXLayoutObject::textChanged() { | 2083 void AXLayoutObject::textChanged() { |
| 2084 if (!m_layoutObject) | 2084 if (!m_layoutObject) |
| 2085 return; | 2085 return; |
| 2086 | 2086 |
| 2087 Settings* settings = getDocument()->settings(); | 2087 Settings* settings = getDocument()->settings(); |
| 2088 if (settings && settings->inlineTextBoxAccessibilityEnabled() && | 2088 if (settings && settings->getInlineTextBoxAccessibilityEnabled() && |
| 2089 roleValue() == StaticTextRole) | 2089 roleValue() == StaticTextRole) |
| 2090 childrenChanged(); | 2090 childrenChanged(); |
| 2091 | 2091 |
| 2092 // Do this last - AXNodeObject::textChanged posts live region announcements, | 2092 // Do this last - AXNodeObject::textChanged posts live region announcements, |
| 2093 // and we should update the inline text boxes first. | 2093 // and we should update the inline text boxes first. |
| 2094 AXNodeObject::textChanged(); | 2094 AXNodeObject::textChanged(); |
| 2095 } | 2095 } |
| 2096 | 2096 |
| 2097 // | 2097 // |
| 2098 // Text metrics. Most of these should be deprecated, needs major cleanup. | 2098 // Text metrics. Most of these should be deprecated, needs major cleanup. |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2131 return VisiblePosition(); | 2131 return VisiblePosition(); |
| 2132 | 2132 |
| 2133 CharacterIterator it(start, end); | 2133 CharacterIterator it(start, end); |
| 2134 it.advance(index - 1); | 2134 it.advance(index - 1); |
| 2135 return createVisiblePosition(Position(it.currentContainer(), it.endOffset()), | 2135 return createVisiblePosition(Position(it.currentContainer(), it.endOffset()), |
| 2136 TextAffinity::Upstream); | 2136 TextAffinity::Upstream); |
| 2137 } | 2137 } |
| 2138 | 2138 |
| 2139 void AXLayoutObject::addInlineTextBoxChildren(bool force) { | 2139 void AXLayoutObject::addInlineTextBoxChildren(bool force) { |
| 2140 Settings* settings = getDocument()->settings(); | 2140 Settings* settings = getDocument()->settings(); |
| 2141 if (!force && (!settings || !settings->inlineTextBoxAccessibilityEnabled())) | 2141 if (!force && |
| 2142 (!settings || !settings->getInlineTextBoxAccessibilityEnabled())) |
| 2142 return; | 2143 return; |
| 2143 | 2144 |
| 2144 if (!getLayoutObject() || !getLayoutObject()->isText()) | 2145 if (!getLayoutObject() || !getLayoutObject()->isText()) |
| 2145 return; | 2146 return; |
| 2146 | 2147 |
| 2147 if (getLayoutObject()->needsLayout()) { | 2148 if (getLayoutObject()->needsLayout()) { |
| 2148 // If a LayoutText needs layout, its inline text boxes are either | 2149 // If a LayoutText needs layout, its inline text boxes are either |
| 2149 // nonexistent or invalid, so defer until the layout happens and | 2150 // nonexistent or invalid, so defer until the layout happens and |
| 2150 // the layoutObject calls AXObjectCacheImpl::inlineTextBoxesUpdated. | 2151 // the layoutObject calls AXObjectCacheImpl::inlineTextBoxesUpdated. |
| 2151 return; | 2152 return; |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2487 | 2488 |
| 2488 bool AXLayoutObject::elementAttributeValue( | 2489 bool AXLayoutObject::elementAttributeValue( |
| 2489 const QualifiedName& attributeName) const { | 2490 const QualifiedName& attributeName) const { |
| 2490 if (!m_layoutObject) | 2491 if (!m_layoutObject) |
| 2491 return false; | 2492 return false; |
| 2492 | 2493 |
| 2493 return equalIgnoringCase(getAttribute(attributeName), "true"); | 2494 return equalIgnoringCase(getAttribute(attributeName), "true"); |
| 2494 } | 2495 } |
| 2495 | 2496 |
| 2496 } // namespace blink | 2497 } // namespace blink |
| OLD | NEW |