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 310793002: Oilpan: trace HTMLConstructionSite::PendingText part object. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 | « Source/core/html/HTMLElement.cpp ('k') | Source/core/html/HTMLScriptElement.cpp » ('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) 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // the empty string the same as an element with no label attribute at all. 114 // the empty string the same as an element with no label attribute at all.
115 // Is that correct? If it is, then should the label function work the same w ay? 115 // Is that correct? If it is, then should the label function work the same w ay?
116 if (text.isEmpty()) 116 if (text.isEmpty())
117 text = collectOptionInnerText(); 117 text = collectOptionInnerText();
118 118
119 return text.stripWhiteSpace(isHTMLSpace<UChar>).simplifyWhiteSpace(isHTMLSpa ce<UChar>); 119 return text.stripWhiteSpace(isHTMLSpace<UChar>).simplifyWhiteSpace(isHTMLSpa ce<UChar>);
120 } 120 }
121 121
122 void HTMLOptionElement::setText(const String &text, ExceptionState& exceptionSta te) 122 void HTMLOptionElement::setText(const String &text, ExceptionState& exceptionSta te)
123 { 123 {
124 RefPtr<Node> protectFromMutationEvents(this); 124 RefPtrWillBeRawPtr<Node> protectFromMutationEvents(this);
125 125
126 // Changing the text causes a recalc of a select's items, which will reset t he selected 126 // Changing the text causes a recalc of a select's items, which will reset t he selected
127 // index to the first item if the select is single selection with a menu lis t. We attempt to 127 // index to the first item if the select is single selection with a menu lis t. We attempt to
128 // preserve the selected item. 128 // preserve the selected item.
129 RefPtrWillBeRawPtr<HTMLSelectElement> select = ownerSelectElement(); 129 RefPtrWillBeRawPtr<HTMLSelectElement> select = ownerSelectElement();
130 bool selectIsMenuList = select && select->usesMenuList(); 130 bool selectIsMenuList = select && select->usesMenuList();
131 int oldSelectedIndex = selectIsMenuList ? select->selectedIndex() : -1; 131 int oldSelectedIndex = selectIsMenuList ? select->selectedIndex() : -1;
132 132
133 // Handle the common special case where there's exactly 1 child node, and it 's a text node. 133 // Handle the common special case where there's exactly 1 child node, and it 's a text node.
134 Node* child = firstChild(); 134 Node* child = firstChild();
(...skipping 237 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
« no previous file with comments | « Source/core/html/HTMLElement.cpp ('k') | Source/core/html/HTMLScriptElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698