OLD | NEW |
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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 if (ownElementDisabled()) | 324 if (ownElementDisabled()) |
325 return true; | 325 return true; |
326 if (Element* parent = parentElement()) | 326 if (Element* parent = parentElement()) |
327 return isHTMLOptGroupElement(*parent) && parent->isDisabledFormControl()
; | 327 return isHTMLOptGroupElement(*parent) && parent->isDisabledFormControl()
; |
328 return false; | 328 return false; |
329 } | 329 } |
330 | 330 |
331 Node::InsertionNotificationRequest HTMLOptionElement::insertedInto(ContainerNode
* insertionPoint) | 331 Node::InsertionNotificationRequest HTMLOptionElement::insertedInto(ContainerNode
* insertionPoint) |
332 { | 332 { |
333 HTMLElement::insertedInto(insertionPoint); | 333 HTMLElement::insertedInto(insertionPoint); |
| 334 return InsertionShouldCallDidNotifySubtreeInsertions; |
| 335 } |
| 336 |
| 337 void HTMLOptionElement::didNotifySubtreeInsertionsToDocument() |
| 338 { |
334 if (HTMLSelectElement* select = ownerSelectElement()) { | 339 if (HTMLSelectElement* select = ownerSelectElement()) { |
335 select->setRecalcListItems(); | 340 select->setRecalcListItems(); |
336 select->optionInserted(*this, m_isSelected); | 341 select->optionInserted(*this, m_isSelected); |
337 } | 342 } |
338 return InsertionDone; | |
339 } | 343 } |
340 | 344 |
341 void HTMLOptionElement::removedFrom(ContainerNode* insertionPoint) | 345 void HTMLOptionElement::removedFrom(ContainerNode* insertionPoint) |
342 { | 346 { |
343 if (HTMLSelectElement* select = Traversal<HTMLSelectElement>::firstAncestorO
rSelf(*insertionPoint)) { | 347 if (HTMLSelectElement* select = Traversal<HTMLSelectElement>::firstAncestorO
rSelf(*insertionPoint)) { |
344 select->setRecalcListItems(); | 348 select->setRecalcListItems(); |
345 select->optionRemoved(*this); | 349 select->optionRemoved(*this); |
346 } | 350 } |
347 HTMLElement::removedFrom(insertionPoint); | 351 HTMLElement::removedFrom(insertionPoint); |
348 } | 352 } |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 ASSERT(parent); | 405 ASSERT(parent); |
402 if (isHTMLOptGroupElement(*parent)) { | 406 if (isHTMLOptGroupElement(*parent)) { |
403 RenderStyle* parentStyle = parent->renderStyle() ? parent->renderSty
le() : parent->computedStyle(); | 407 RenderStyle* parentStyle = parent->renderStyle() ? parent->renderSty
le() : parent->computedStyle(); |
404 return !parentStyle || parentStyle->display() == NONE; | 408 return !parentStyle || parentStyle->display() == NONE; |
405 } | 409 } |
406 } | 410 } |
407 return m_style->display() == NONE; | 411 return m_style->display() == NONE; |
408 } | 412 } |
409 | 413 |
410 } // namespace blink | 414 } // namespace blink |
OLD | NEW |