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 Peter Kelly (pmk@post.com) | 4 * (C) 2001 Peter Kelly (pmk@post.com) |
5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
6 * (C) 2007 David Smith (catfish.man@gmail.com) | 6 * (C) 2007 David Smith (catfish.man@gmail.com) |
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. | 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. |
8 * (C) 2007 Eric Seidel (eric@webkit.org) | 8 * (C) 2007 Eric Seidel (eric@webkit.org) |
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 3325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3336 // Active and hovered elements always make a chain towards the document node | 3336 // Active and hovered elements always make a chain towards the document node |
3337 // and no siblings or cousins will have the same state. | 3337 // and no siblings or cousins will have the same state. |
3338 if (hovered()) | 3338 if (hovered()) |
3339 return false; | 3339 return false; |
3340 if (active()) | 3340 if (active()) |
3341 return false; | 3341 return false; |
3342 if (focused()) | 3342 if (focused()) |
3343 return false; | 3343 return false; |
3344 if (!parentOrShadowHostElement()->childrenSupportStyleSharing()) | 3344 if (!parentOrShadowHostElement()->childrenSupportStyleSharing()) |
3345 return false; | 3345 return false; |
3346 if (hasScopedHTMLStyleChild()) | |
3347 return false; | |
3348 if (this == document().cssTarget()) | 3346 if (this == document().cssTarget()) |
3349 return false; | 3347 return false; |
3350 if (isHTMLElement() && toHTMLElement(this)->hasDirectionAuto()) | 3348 if (isHTMLElement() && toHTMLElement(this)->hasDirectionAuto()) |
3351 return false; | 3349 return false; |
3352 if (hasActiveAnimations()) | 3350 if (hasActiveAnimations()) |
3353 return false; | 3351 return false; |
3354 // Turn off style sharing for elements that can gain layers for reasons outs
ide of the style system. | 3352 // Turn off style sharing for elements that can gain layers for reasons outs
ide of the style system. |
3355 // See comments in RenderObject::setStyle(). | 3353 // See comments in RenderObject::setStyle(). |
3356 // FIXME: Why does gaining a layer from outside the style system require dis
abling sharing? | 3354 // FIXME: Why does gaining a layer from outside the style system require dis
abling sharing? |
3357 if (isHTMLFrameElementBase(*this) | 3355 if (isHTMLFrameElementBase(*this) |
3358 || isHTMLEmbedElement(*this) | 3356 || isHTMLEmbedElement(*this) |
3359 || isHTMLObjectElement(*this) | 3357 || isHTMLObjectElement(*this) |
3360 || isHTMLAppletElement(*this) | 3358 || isHTMLAppletElement(*this) |
3361 || isHTMLCanvasElement(*this)) | 3359 || isHTMLCanvasElement(*this)) |
3362 return false; | 3360 return false; |
3363 // FIXME: We should share style for option and optgroup whenever possible. | 3361 // FIXME: We should share style for option and optgroup whenever possible. |
3364 // Before doing so, we need to resolve issues in HTMLSelectElement::recalcLi
stItems | 3362 // Before doing so, we need to resolve issues in HTMLSelectElement::recalcLi
stItems |
3365 // and RenderMenuList::setText. See also https://bugs.webkit.org/show_bug.cg
i?id=88405 | 3363 // and RenderMenuList::setText. See also https://bugs.webkit.org/show_bug.cg
i?id=88405 |
3366 if (isHTMLOptionElement(*this) || isHTMLOptGroupElement(*this)) | 3364 if (isHTMLOptionElement(*this) || isHTMLOptGroupElement(*this)) |
3367 return false; | 3365 return false; |
3368 if (FullscreenElementStack::isActiveFullScreenElement(this)) | 3366 if (FullscreenElementStack::isActiveFullScreenElement(this)) |
3369 return false; | 3367 return false; |
3370 return true; | 3368 return true; |
3371 } | 3369 } |
3372 | 3370 |
3373 } // namespace WebCore | 3371 } // namespace WebCore |
OLD | NEW |