Chromium Code Reviews| 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()) | |
|
keishi
2014/07/01 05:06:35
This makes fast/forms/select-initial-position.html
| |
| 245 && toHTMLOptionElement(candidate).selected() != toHTMLOptionElement(elem ent()).selected()) | |
| 246 return false; | |
| 247 | |
| 244 // FIXME: This line is surprisingly hot, we may wish to inline hasDirectionA uto into StyleResolver. | 248 // FIXME: This line is surprisingly hot, we may wish to inline hasDirectionA uto into StyleResolver. |
| 245 if (candidate.isHTMLElement() && toHTMLElement(candidate).hasDirectionAuto() ) | 249 if (candidate.isHTMLElement() && toHTMLElement(candidate).hasDirectionAuto() ) |
| 246 return false; | 250 return false; |
| 247 | 251 |
| 248 if (candidate.isLink() && m_context.elementLinkState() != style->insideLink( )) | 252 if (candidate.isLink() && m_context.elementLinkState() != style->insideLink( )) |
| 249 return false; | 253 return false; |
| 250 | 254 |
| 251 if (candidate.isUnresolvedCustomElement() != element().isUnresolvedCustomEle ment()) | 255 if (candidate.isUnresolvedCustomElement() != element().isUnresolvedCustomEle ment()) |
| 252 return false; | 256 return false; |
| 253 | 257 |
| (...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. | 339 // 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()) { | 340 if (!element().parentElementOrShadowRoot()->childrenSupportStyleSharing()) { |
| 337 INCREMENT_STYLE_STATS_COUNTER(m_styleResolver, sharedStyleRejectedByPare nt); | 341 INCREMENT_STYLE_STATS_COUNTER(m_styleResolver, sharedStyleRejectedByPare nt); |
| 338 return 0; | 342 return 0; |
| 339 } | 343 } |
| 340 | 344 |
| 341 return shareElement->renderStyle(); | 345 return shareElement->renderStyle(); |
| 342 } | 346 } |
| 343 | 347 |
| 344 } | 348 } |
| OLD | NEW |