OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 return m_shadowRootRareData->styleSheets(); | 404 return m_shadowRootRareData->styleSheets(); |
405 } | 405 } |
406 | 406 |
407 bool ShadowRoot::childrenSupportStyleSharing() const | 407 bool ShadowRoot::childrenSupportStyleSharing() const |
408 { | 408 { |
409 if (!m_shadowRootRareData) | 409 if (!m_shadowRootRareData) |
410 return false; | 410 return false; |
411 return !m_shadowRootRareData->childrenAffectedByFirstChildRules() | 411 return !m_shadowRootRareData->childrenAffectedByFirstChildRules() |
412 && !m_shadowRootRareData->childrenAffectedByLastChildRules() | 412 && !m_shadowRootRareData->childrenAffectedByLastChildRules() |
413 && !m_shadowRootRareData->childrenAffectedByDirectAdjacentRules() | 413 && !m_shadowRootRareData->childrenAffectedByDirectAdjacentRules() |
| 414 && !m_shadowRootRareData->childrenAffectedByIndirectAdjacentRules() |
414 && !m_shadowRootRareData->childrenAffectedByForwardPositionalRules() | 415 && !m_shadowRootRareData->childrenAffectedByForwardPositionalRules() |
415 && !m_shadowRootRareData->childrenAffectedByBackwardPositionalRules(); | 416 && !m_shadowRootRareData->childrenAffectedByBackwardPositionalRules(); |
416 } | 417 } |
417 | 418 |
418 bool ShadowRoot::childrenAffectedByPositionalRules() const | 419 bool ShadowRoot::childrenAffectedByPositionalRules() const |
419 { | 420 { |
420 return m_shadowRootRareData && (m_shadowRootRareData->childrenAffectedByForw
ardPositionalRules() || m_shadowRootRareData->childrenAffectedByBackwardPosition
alRules()); | 421 return m_shadowRootRareData && (m_shadowRootRareData->childrenAffectedByForw
ardPositionalRules() || m_shadowRootRareData->childrenAffectedByBackwardPosition
alRules()); |
421 } | 422 } |
422 | 423 |
423 bool ShadowRoot::childrenAffectedByFirstChildRules() const | 424 bool ShadowRoot::childrenAffectedByFirstChildRules() const |
424 { | 425 { |
425 return m_shadowRootRareData && m_shadowRootRareData->childrenAffectedByFirst
ChildRules(); | 426 return m_shadowRootRareData && m_shadowRootRareData->childrenAffectedByFirst
ChildRules(); |
426 } | 427 } |
427 | 428 |
428 bool ShadowRoot::childrenAffectedByLastChildRules() const | 429 bool ShadowRoot::childrenAffectedByLastChildRules() const |
429 { | 430 { |
430 return m_shadowRootRareData && m_shadowRootRareData->childrenAffectedByLastC
hildRules(); | 431 return m_shadowRootRareData && m_shadowRootRareData->childrenAffectedByLastC
hildRules(); |
431 } | 432 } |
432 | 433 |
433 bool ShadowRoot::childrenAffectedByDirectAdjacentRules() const | 434 bool ShadowRoot::childrenAffectedByDirectAdjacentRules() const |
434 { | 435 { |
435 return m_shadowRootRareData && m_shadowRootRareData->childrenAffectedByDirec
tAdjacentRules(); | 436 return m_shadowRootRareData && m_shadowRootRareData->childrenAffectedByDirec
tAdjacentRules(); |
436 } | 437 } |
437 | 438 |
| 439 bool ShadowRoot::childrenAffectedByIndirectAdjacentRules() const |
| 440 { |
| 441 return m_shadowRootRareData && m_shadowRootRareData->childrenAffectedByIndir
ectAdjacentRules(); |
| 442 } |
| 443 |
438 bool ShadowRoot::childrenAffectedByForwardPositionalRules() const | 444 bool ShadowRoot::childrenAffectedByForwardPositionalRules() const |
439 { | 445 { |
440 return m_shadowRootRareData && m_shadowRootRareData->childrenAffectedByForwa
rdPositionalRules(); | 446 return m_shadowRootRareData && m_shadowRootRareData->childrenAffectedByForwa
rdPositionalRules(); |
441 } | 447 } |
442 | 448 |
443 bool ShadowRoot::childrenAffectedByBackwardPositionalRules() const | 449 bool ShadowRoot::childrenAffectedByBackwardPositionalRules() const |
444 { | 450 { |
445 return m_shadowRootRareData && m_shadowRootRareData->childrenAffectedByBackw
ardPositionalRules(); | 451 return m_shadowRootRareData && m_shadowRootRareData->childrenAffectedByBackw
ardPositionalRules(); |
446 } | 452 } |
447 | 453 |
448 void ShadowRoot::setChildrenAffectedByForwardPositionalRules() | 454 void ShadowRoot::setChildrenAffectedByForwardPositionalRules() |
449 { | 455 { |
450 ensureShadowRootRareData()->setChildrenAffectedByForwardPositionalRules(true
); | 456 ensureShadowRootRareData()->setChildrenAffectedByForwardPositionalRules(true
); |
451 } | 457 } |
452 | 458 |
453 void ShadowRoot::setChildrenAffectedByDirectAdjacentRules() | 459 void ShadowRoot::setChildrenAffectedByDirectAdjacentRules() |
454 { | 460 { |
455 ensureShadowRootRareData()->setChildrenAffectedByDirectAdjacentRules(true); | 461 ensureShadowRootRareData()->setChildrenAffectedByDirectAdjacentRules(true); |
456 } | 462 } |
457 | 463 |
| 464 void ShadowRoot::setChildrenAffectedByIndirectAdjacentRules() |
| 465 { |
| 466 ensureShadowRootRareData()->setChildrenAffectedByIndirectAdjacentRules(true)
; |
| 467 } |
| 468 |
458 void ShadowRoot::setChildrenAffectedByBackwardPositionalRules() | 469 void ShadowRoot::setChildrenAffectedByBackwardPositionalRules() |
459 { | 470 { |
460 ensureShadowRootRareData()->setChildrenAffectedByBackwardPositionalRules(tru
e); | 471 ensureShadowRootRareData()->setChildrenAffectedByBackwardPositionalRules(tru
e); |
461 } | 472 } |
462 | 473 |
463 void ShadowRoot::setChildrenAffectedByFirstChildRules() | 474 void ShadowRoot::setChildrenAffectedByFirstChildRules() |
464 { | 475 { |
465 ensureShadowRootRareData()->setChildrenAffectedByFirstChildRules(true); | 476 ensureShadowRootRareData()->setChildrenAffectedByFirstChildRules(true); |
466 } | 477 } |
467 | 478 |
468 void ShadowRoot::setChildrenAffectedByLastChildRules() | 479 void ShadowRoot::setChildrenAffectedByLastChildRules() |
469 { | 480 { |
470 ensureShadowRootRareData()->setChildrenAffectedByLastChildRules(true); | 481 ensureShadowRootRareData()->setChildrenAffectedByLastChildRules(true); |
471 } | 482 } |
472 | 483 |
473 } | 484 } |
OLD | NEW |