Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp

Issue 1550113003: Fix crash when cached parent of AXLayoutObject is stale. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/accessibility/insert-adjacent-html-causes-crash-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1621 matching lines...) Expand 10 before | Expand all | Expand 10 after
1632 1632
1633 m_haveChildren = true; 1633 m_haveChildren = true;
1634 1634
1635 if (!canHaveChildren()) 1635 if (!canHaveChildren())
1636 return; 1636 return;
1637 1637
1638 HeapVector<Member<AXObject>> ownedChildren; 1638 HeapVector<Member<AXObject>> ownedChildren;
1639 computeAriaOwnsChildren(ownedChildren); 1639 computeAriaOwnsChildren(ownedChildren);
1640 1640
1641 for (AXObject* obj = rawFirstChild(); obj; obj = obj->rawNextSibling()) { 1641 for (AXObject* obj = rawFirstChild(); obj; obj = obj->rawNextSibling()) {
1642 if (!axObjectCache().isAriaOwned(obj)) 1642 if (!axObjectCache().isAriaOwned(obj)) {
1643 obj->setParent(this);
1643 addChild(obj); 1644 addChild(obj);
1645 }
1644 } 1646 }
1645 1647
1646 addHiddenChildren(); 1648 addHiddenChildren();
1647 addAttachmentChildren(); 1649 addAttachmentChildren();
1648 addPopupChildren(); 1650 addPopupChildren();
1649 addImageMapChildren(); 1651 addImageMapChildren();
1650 addTextFieldChildren(); 1652 addTextFieldChildren();
1651 addCanvasChildren(); 1653 addCanvasChildren();
1652 addRemoteSVGChildren(); 1654 addRemoteSVGChildren();
1653 addInlineTextBoxChildren(false); 1655 addInlineTextBoxChildren(false);
(...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after
2527 if (label && label->layoutObject()) { 2529 if (label && label->layoutObject()) {
2528 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe ct(); 2530 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe ct();
2529 result.unite(labelRect); 2531 result.unite(labelRect);
2530 } 2532 }
2531 } 2533 }
2532 2534
2533 return result; 2535 return result;
2534 } 2536 }
2535 2537
2536 } // namespace blink 2538 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/accessibility/insert-adjacent-html-causes-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698