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

Side by Side Diff: Source/core/html/HTMLOptionElement.cpp

Issue 365673002: Pass a struct to ContainerNode::childrenChanged() instead of separate arguments (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove dead code Created 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 5 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
6 * Copyright (C) 2004, 2005, 2006, 2010 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2010 Apple Inc. All rights reserved.
7 * Copyright (C) 2010 Google Inc. All rights reserved. 7 * Copyright (C) 2010 Google Inc. All rights reserved.
8 * Copyright (C) 2011 Motorola Mobility, Inc. All rights reserved. 8 * Copyright (C) 2011 Motorola Mobility, Inc. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 if (m_isSelected == selected) 238 if (m_isSelected == selected)
239 return; 239 return;
240 240
241 m_isSelected = selected; 241 m_isSelected = selected;
242 didAffectSelector(AffectedSelectorChecked); 242 didAffectSelector(AffectedSelectorChecked);
243 243
244 if (HTMLSelectElement* select = ownerSelectElement()) 244 if (HTMLSelectElement* select = ownerSelectElement())
245 select->invalidateSelectedItems(); 245 select->invalidateSelectedItems();
246 } 246 }
247 247
248 void HTMLOptionElement::childrenChanged(bool changedByParser, Node* beforeChange , Node* afterChange, int childCountDelta) 248 void HTMLOptionElement::childrenChanged(const ChildrenChange& change)
249 { 249 {
250 if (HTMLDataListElement* dataList = ownerDataListElement()) 250 if (HTMLDataListElement* dataList = ownerDataListElement())
251 dataList->optionElementChildrenChanged(); 251 dataList->optionElementChildrenChanged();
252 else if (HTMLSelectElement* select = ownerSelectElement()) 252 else if (HTMLSelectElement* select = ownerSelectElement())
253 select->optionElementChildrenChanged(); 253 select->optionElementChildrenChanged();
254 HTMLElement::childrenChanged(changedByParser, beforeChange, afterChange, chi ldCountDelta); 254 HTMLElement::childrenChanged(change);
255 } 255 }
256 256
257 HTMLDataListElement* HTMLOptionElement::ownerDataListElement() const 257 HTMLDataListElement* HTMLOptionElement::ownerDataListElement() const
258 { 258 {
259 return Traversal<HTMLDataListElement>::firstAncestor(*this); 259 return Traversal<HTMLDataListElement>::firstAncestor(*this);
260 } 260 }
261 261
262 HTMLSelectElement* HTMLOptionElement::ownerSelectElement() const 262 HTMLSelectElement* HTMLOptionElement::ownerSelectElement() const
263 { 263 {
264 return Traversal<HTMLSelectElement>::firstAncestor(*this); 264 return Traversal<HTMLSelectElement>::firstAncestor(*this);
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 // Check for parent optgroup having display NONE 372 // Check for parent optgroup having display NONE
373 if (parent && isHTMLOptGroupElement(*parent)) { 373 if (parent && isHTMLOptGroupElement(*parent)) {
374 if (toHTMLOptGroupElement(*parent).isDisplayNone()) 374 if (toHTMLOptGroupElement(*parent).isDisplayNone())
375 return true; 375 return true;
376 } 376 }
377 RenderStyle* style = nonRendererStyle(); 377 RenderStyle* style = nonRendererStyle();
378 return style && style->display() == NONE; 378 return style && style->display() == NONE;
379 } 379 }
380 380
381 } // namespace WebCore 381 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698