OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 int WebAXObject::GenerateAXID() const { | 153 int WebAXObject::GenerateAXID() const { |
154 if (IsDetached()) | 154 if (IsDetached()) |
155 return -1; | 155 return -1; |
156 | 156 |
157 return private_->AxObjectCache().GenerateAXID(); | 157 return private_->AxObjectCache().GenerateAXID(); |
158 } | 158 } |
159 | 159 |
160 bool WebAXObject::UpdateLayoutAndCheckValidity() { | 160 bool WebAXObject::UpdateLayoutAndCheckValidity() { |
161 if (!IsDetached()) { | 161 if (!IsDetached()) { |
162 Document* document = private_->GetDocument(); | 162 Document* document = private_->GetDocument(); |
163 if (!document || !document->View()) | 163 // TODO(szager): Investigate whether/why document->IsDetached() can be |
| 164 // true when this->IsDetached() is false. |
| 165 if (!document || !document->View() || document->IsDetached()) |
164 return false; | 166 return false; |
165 document->View()->UpdateLifecycleToCompositingCleanPlusScrolling(); | 167 document->View()->UpdateLifecycleToCompositingCleanPlusScrolling(); |
166 } | 168 } |
167 | 169 |
168 // Doing a layout can cause this object to be invalid, so check again. | 170 // Doing a layout can cause this object to be invalid, so check again. |
169 return !IsDetached(); | 171 return !IsDetached(); |
170 } | 172 } |
171 | 173 |
172 WebAXDefaultActionVerb WebAXObject::Action() const { | 174 WebAXDefaultActionVerb WebAXObject::Action() const { |
173 if (IsDetached()) | 175 if (IsDetached()) |
(...skipping 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1554 WebAXObject& WebAXObject::operator=(AXObjectImpl* object) { | 1556 WebAXObject& WebAXObject::operator=(AXObjectImpl* object) { |
1555 private_ = object; | 1557 private_ = object; |
1556 return *this; | 1558 return *this; |
1557 } | 1559 } |
1558 | 1560 |
1559 WebAXObject::operator AXObjectImpl*() const { | 1561 WebAXObject::operator AXObjectImpl*() const { |
1560 return private_.Get(); | 1562 return private_.Get(); |
1561 } | 1563 } |
1562 | 1564 |
1563 } // namespace blink | 1565 } // namespace blink |
OLD | NEW |