| 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 { | 324 { |
| 325 return m_style.get(); | 325 return m_style.get(); |
| 326 } | 326 } |
| 327 | 327 |
| 328 PassRefPtr<ComputedStyle> HTMLOptionElement::customStyleForLayoutObject() | 328 PassRefPtr<ComputedStyle> HTMLOptionElement::customStyleForLayoutObject() |
| 329 { | 329 { |
| 330 updateNonComputedStyle(); | 330 updateNonComputedStyle(); |
| 331 return m_style; | 331 return m_style; |
| 332 } | 332 } |
| 333 | 333 |
| 334 void HTMLOptionElement::didRecalcStyle(StyleRecalcChange change) | |
| 335 { | |
| 336 if (change == NoChange) | |
| 337 return; | |
| 338 | |
| 339 // FIXME: We ask our owner select to repaint regardless of which property ch
anged. | |
| 340 if (HTMLSelectElement* select = ownerSelectElement()) { | |
| 341 if (LayoutObject* layoutObject = select->layoutObject()) | |
| 342 layoutObject->setShouldDoFullPaintInvalidation(); | |
| 343 } | |
| 344 } | |
| 345 | |
| 346 String HTMLOptionElement::textIndentedToRespectGroupLabel() const | 334 String HTMLOptionElement::textIndentedToRespectGroupLabel() const |
| 347 { | 335 { |
| 348 ContainerNode* parent = parentNode(); | 336 ContainerNode* parent = parentNode(); |
| 349 if (parent && isHTMLOptGroupElement(*parent)) | 337 if (parent && isHTMLOptGroupElement(*parent)) |
| 350 return " " + text(); | 338 return " " + text(); |
| 351 return text(); | 339 return text(); |
| 352 } | 340 } |
| 353 | 341 |
| 354 bool HTMLOptionElement::isDisabledFormControl() const | 342 bool HTMLOptionElement::isDisabledFormControl() const |
| 355 { | 343 { |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 ASSERT(parent); | 425 ASSERT(parent); |
| 438 if (isHTMLOptGroupElement(*parent)) { | 426 if (isHTMLOptGroupElement(*parent)) { |
| 439 const ComputedStyle* parentStyle = parent->computedStyle() ? parent-
>computedStyle() : parent->ensureComputedStyle(); | 427 const ComputedStyle* parentStyle = parent->computedStyle() ? parent-
>computedStyle() : parent->ensureComputedStyle(); |
| 440 return !parentStyle || parentStyle->display() == NONE; | 428 return !parentStyle || parentStyle->display() == NONE; |
| 441 } | 429 } |
| 442 } | 430 } |
| 443 return m_style->display() == NONE; | 431 return m_style->display() == NONE; |
| 444 } | 432 } |
| 445 | 433 |
| 446 } // namespace blink | 434 } // namespace blink |
| OLD | NEW |