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

Side by Side Diff: Source/WebCore/html/HTMLSelectElement.cpp

Issue 10694124: Merge 122082 - Heap-use-after-free in WebCore::RenderObject::destroyAndCleanupAnonymousWrappers (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Patch Set: Created 8 years, 5 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 | « Source/WebCore/html/HTMLFormControlElement.cpp ('k') | Source/WebCore/html/ValidationMessage.h » ('j') | 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) 2010 Nokia Corporation and/or its subsidiary(-ies). 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
4 * (C) 1999 Antti Koivisto (koivisto@kde.org) 4 * (C) 1999 Antti Koivisto (koivisto@kde.org)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved.
7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
8 * Copyright (C) 2010 Google Inc. All rights reserved. 8 * Copyright (C) 2010 Google Inc. All rights reserved.
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
10 * 10 *
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 339
340 RenderObject* HTMLSelectElement::createRenderer(RenderArena* arena, RenderStyle* ) 340 RenderObject* HTMLSelectElement::createRenderer(RenderArena* arena, RenderStyle* )
341 { 341 {
342 if (usesMenuList()) 342 if (usesMenuList())
343 return new (arena) RenderMenuList(this); 343 return new (arena) RenderMenuList(this);
344 return new (arena) RenderListBox(this); 344 return new (arena) RenderListBox(this);
345 } 345 }
346 346
347 bool HTMLSelectElement::childShouldCreateRenderer(const NodeRenderingContext& ch ildContext) const 347 bool HTMLSelectElement::childShouldCreateRenderer(const NodeRenderingContext& ch ildContext) const
348 { 348 {
349 return childContext.isOnUpperEncapsulationBoundary() && HTMLFormControlEleme ntWithState::childShouldCreateRenderer(childContext); 349 if (!HTMLFormControlElementWithState::childShouldCreateRenderer(childContext ))
350 return false;
351 if (!usesMenuList())
352 return true;
353 return validationMessageShadowTreeContains(childContext.node());
350 } 354 }
351 355
352 HTMLOptionsCollection* HTMLSelectElement::options() 356 HTMLOptionsCollection* HTMLSelectElement::options()
353 { 357 {
354 if (!m_optionsCollection) 358 if (!m_optionsCollection)
355 m_optionsCollection = HTMLOptionsCollection::create(this); 359 m_optionsCollection = HTMLOptionsCollection::create(this);
356 return m_optionsCollection.get(); 360 return m_optionsCollection.get();
357 } 361 }
358 362
359 void HTMLSelectElement::updateListItemSelectedStates() 363 void HTMLSelectElement::updateListItemSelectedStates()
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after
1543 1547
1544 const HTMLSelectElement* toHTMLSelectElement(const Node* node) 1548 const HTMLSelectElement* toHTMLSelectElement(const Node* node)
1545 { 1549 {
1546 ASSERT(!node || node->hasTagName(selectTag)); 1550 ASSERT(!node || node->hasTagName(selectTag));
1547 return static_cast<const HTMLSelectElement*>(node); 1551 return static_cast<const HTMLSelectElement*>(node);
1548 } 1552 }
1549 1553
1550 #endif 1554 #endif
1551 1555
1552 } // namespace 1556 } // namespace
OLDNEW
« no previous file with comments | « Source/WebCore/html/HTMLFormControlElement.cpp ('k') | Source/WebCore/html/ValidationMessage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698