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. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. |
6 * All rights reserved. | 6 * All rights reserved. |
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
10 * (http://www.torchmobile.com/) | 10 * (http://www.torchmobile.com/) |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 // For Shadow DOM V1 | 273 // For Shadow DOM V1 |
274 if (!sharingCandidateAssignedToSameSlot(candidate)) | 274 if (!sharingCandidateAssignedToSameSlot(candidate)) |
275 return false; | 275 return false; |
276 // For Shadow DOM V0 | 276 // For Shadow DOM V0 |
277 if (!sharingCandidateDistributedToSameInsertionPoint(candidate)) | 277 if (!sharingCandidateDistributedToSameInsertionPoint(candidate)) |
278 return false; | 278 return false; |
279 if (candidate.isInTopLayer() != element().isInTopLayer()) | 279 if (candidate.isInTopLayer() != element().isInTopLayer()) |
280 return false; | 280 return false; |
281 | 281 |
282 bool isControl = candidate.isFormControlElement(); | 282 bool isControl = candidate.isFormControlElement(); |
283 ASSERT(isControl == element().isFormControlElement()); | 283 DCHECK_EQ(isControl, element().isFormControlElement()); |
284 if (isControl && !canShareStyleWithControl(candidate)) | 284 if (isControl && !canShareStyleWithControl(candidate)) |
285 return false; | 285 return false; |
286 | 286 |
287 if (isHTMLOptionElement(candidate) && isHTMLOptionElement(element()) && | 287 if (isHTMLOptionElement(candidate) && isHTMLOptionElement(element()) && |
288 (toHTMLOptionElement(candidate).selected() != | 288 (toHTMLOptionElement(candidate).selected() != |
289 toHTMLOptionElement(element()).selected() || | 289 toHTMLOptionElement(element()).selected() || |
290 toHTMLOptionElement(candidate).spatialNavigationFocused() != | 290 toHTMLOptionElement(candidate).spatialNavigationFocused() != |
291 toHTMLOptionElement(element()).spatialNavigationFocused())) | 291 toHTMLOptionElement(element()).spatialNavigationFocused())) |
292 return false; | 292 return false; |
293 | 293 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 if (!element().parentElementOrShadowRoot()->childrenSupportStyleSharing()) { | 413 if (!element().parentElementOrShadowRoot()->childrenSupportStyleSharing()) { |
414 INCREMENT_STYLE_STATS_COUNTER(document().styleEngine(), | 414 INCREMENT_STYLE_STATS_COUNTER(document().styleEngine(), |
415 sharedStyleRejectedByParent, 1); | 415 sharedStyleRejectedByParent, 1); |
416 return nullptr; | 416 return nullptr; |
417 } | 417 } |
418 | 418 |
419 return getElementStyle(*shareElement); | 419 return getElementStyle(*shareElement); |
420 } | 420 } |
421 | 421 |
422 } // namespace blink | 422 } // namespace blink |
OLD | NEW |