OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. |
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 return false; | 234 return false; |
235 | 235 |
236 bool isControl = candidate.isFormControlElement(); | 236 bool isControl = candidate.isFormControlElement(); |
237 | 237 |
238 if (isControl != element().isFormControlElement()) | 238 if (isControl != element().isFormControlElement()) |
239 return false; | 239 return false; |
240 | 240 |
241 if (isControl && !canShareStyleWithControl(candidate)) | 241 if (isControl && !canShareStyleWithControl(candidate)) |
242 return false; | 242 return false; |
243 | 243 |
| 244 if (isHTMLOptionElement(candidate) && isHTMLOptionElement(element()) |
| 245 && (toHTMLOptionElement(candidate).selected() != toHTMLOptionElement(ele
ment()).selected() |
| 246 || toHTMLOptionElement(candidate).spatialNavigationFocused() != toHTMLOp
tionElement(element()).spatialNavigationFocused())) |
| 247 return false; |
| 248 |
244 // FIXME: This line is surprisingly hot, we may wish to inline hasDirectionA
uto into StyleResolver. | 249 // FIXME: This line is surprisingly hot, we may wish to inline hasDirectionA
uto into StyleResolver. |
245 if (candidate.isHTMLElement() && toHTMLElement(candidate).hasDirectionAuto()
) | 250 if (candidate.isHTMLElement() && toHTMLElement(candidate).hasDirectionAuto()
) |
246 return false; | 251 return false; |
247 | 252 |
248 if (candidate.isLink() && m_context.elementLinkState() != style->insideLink(
)) | 253 if (candidate.isLink() && m_context.elementLinkState() != style->insideLink(
)) |
249 return false; | 254 return false; |
250 | 255 |
251 if (candidate.isUnresolvedCustomElement() != element().isUnresolvedCustomEle
ment()) | 256 if (candidate.isUnresolvedCustomElement() != element().isUnresolvedCustomEle
ment()) |
252 return false; | 257 return false; |
253 | 258 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 // Tracking child index requires unique style for each node. This may get se
t by the sibling rule match above. | 340 // Tracking child index requires unique style for each node. This may get se
t by the sibling rule match above. |
336 if (!element().parentElementOrShadowRoot()->childrenSupportStyleSharing()) { | 341 if (!element().parentElementOrShadowRoot()->childrenSupportStyleSharing()) { |
337 INCREMENT_STYLE_STATS_COUNTER(m_styleResolver, sharedStyleRejectedByPare
nt); | 342 INCREMENT_STYLE_STATS_COUNTER(m_styleResolver, sharedStyleRejectedByPare
nt); |
338 return 0; | 343 return 0; |
339 } | 344 } |
340 | 345 |
341 return shareElement->renderStyle(); | 346 return shareElement->renderStyle(); |
342 } | 347 } |
343 | 348 |
344 } | 349 } |
OLD | NEW |