| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
| 3 * Copyright (C) 2010 Google Inc. All rights reserved. | 3 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 4 * Copyright (C) 2012 Samsung Electronics. All rights reserved. | 4 * Copyright (C) 2012 Samsung Electronics. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 if (ShadowRoot* root = element().userAgentShadowRoot()) | 264 if (ShadowRoot* root = element().userAgentShadowRoot()) |
| 265 root->removeChildren(); | 265 root->removeChildren(); |
| 266 createShadowSubtree(); | 266 createShadowSubtree(); |
| 267 } | 267 } |
| 268 | 268 |
| 269 void ImageInputType::ensurePrimaryContent() | 269 void ImageInputType::ensurePrimaryContent() |
| 270 { | 270 { |
| 271 if (!m_useFallbackContent) | 271 if (!m_useFallbackContent) |
| 272 return; | 272 return; |
| 273 m_useFallbackContent = false; | 273 m_useFallbackContent = false; |
| 274 if (ShadowRoot* root = element().userAgentShadowRoot()) |
| 275 root->removeChildren(); |
| 276 createShadowSubtree(); |
| 274 reattachFallbackContent(); | 277 reattachFallbackContent(); |
| 275 } | 278 } |
| 276 | 279 |
| 277 void ImageInputType::reattachFallbackContent() | 280 void ImageInputType::reattachFallbackContent() |
| 278 { | 281 { |
| 279 // This can happen inside of attach() in the middle of a recalcStyle so we n
eed to | 282 // This can happen inside of attach() in the middle of a recalcStyle so we n
eed to |
| 280 // reattach synchronously here. | 283 // reattach synchronously here. |
| 281 if (element().document().inStyleRecalc()) | 284 if (element().document().inStyleRecalc()) |
| 282 element().reattach(); | 285 element().reattach(); |
| 283 else | 286 else |
| (...skipping 11 matching lines...) Expand all Loading... |
| 295 | 298 |
| 296 PassRefPtr<ComputedStyle> ImageInputType::customStyleForLayoutObject(PassRefPtr<
ComputedStyle> newStyle) | 299 PassRefPtr<ComputedStyle> ImageInputType::customStyleForLayoutObject(PassRefPtr<
ComputedStyle> newStyle) |
| 297 { | 300 { |
| 298 if (!m_useFallbackContent) | 301 if (!m_useFallbackContent) |
| 299 return newStyle; | 302 return newStyle; |
| 300 | 303 |
| 301 return HTMLImageFallbackHelper::customStyleForAltText(element(), newStyle); | 304 return HTMLImageFallbackHelper::customStyleForAltText(element(), newStyle); |
| 302 } | 305 } |
| 303 | 306 |
| 304 } // namespace blink | 307 } // namespace blink |
| OLD | NEW |