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

Side by Side Diff: Source/WebCore/rendering/RenderMenuList.cpp

Issue 10446087: Merge 117976 - Chromium AX: Crash when menulist adds selected option via document.write (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 6 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 | « LayoutTests/platform/chromium/accessibility/add-to-menu-list-crashes-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 * This file is part of the select element renderer in WebCore. 2 * This file is part of the select element renderer in WebCore.
3 * 3 *
4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
5 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
6 * 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 6 * 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 innerStyle->setDirection(m_optionStyle->direction()); 112 innerStyle->setDirection(m_optionStyle->direction());
113 innerStyle->setUnicodeBidi(m_optionStyle->unicodeBidi()); 113 innerStyle->setUnicodeBidi(m_optionStyle->unicodeBidi());
114 } 114 }
115 } 115 }
116 116
117 void RenderMenuList::addChild(RenderObject* newChild, RenderObject* beforeChild) 117 void RenderMenuList::addChild(RenderObject* newChild, RenderObject* beforeChild)
118 { 118 {
119 createInnerBlock(); 119 createInnerBlock();
120 m_innerBlock->addChild(newChild, beforeChild); 120 m_innerBlock->addChild(newChild, beforeChild);
121 ASSERT(m_innerBlock == firstChild()); 121 ASSERT(m_innerBlock == firstChild());
122
123 if (AXObjectCache::accessibilityEnabled())
124 document()->axObjectCache()->childrenChanged(this);
122 } 125 }
123 126
124 void RenderMenuList::removeChild(RenderObject* oldChild) 127 void RenderMenuList::removeChild(RenderObject* oldChild)
125 { 128 {
126 if (oldChild == m_innerBlock || !m_innerBlock) { 129 if (oldChild == m_innerBlock || !m_innerBlock) {
127 RenderDeprecatedFlexibleBox::removeChild(oldChild); 130 RenderDeprecatedFlexibleBox::removeChild(oldChild);
128 m_innerBlock = 0; 131 m_innerBlock = 0;
129 } else 132 } else
130 m_innerBlock->removeChild(oldChild); 133 m_innerBlock->removeChild(oldChild);
131 } 134 }
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 { 576 {
574 setTextFromOption(toHTMLSelectElement(node())->listToOptionIndex(listIndex)) ; 577 setTextFromOption(toHTMLSelectElement(node())->listToOptionIndex(listIndex)) ;
575 } 578 }
576 579
577 FontSelector* RenderMenuList::fontSelector() const 580 FontSelector* RenderMenuList::fontSelector() const
578 { 581 {
579 return document()->styleResolver()->fontSelector(); 582 return document()->styleResolver()->fontSelector();
580 } 583 }
581 584
582 } 585 }
OLDNEW
« no previous file with comments | « LayoutTests/platform/chromium/accessibility/add-to-menu-list-crashes-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698