| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All | 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
| 6 * rights reserved. | 6 * rights reserved. |
| 7 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 * is preferable to: | 510 * is preferable to: |
| 511 * BorderWidths getBorderWidths(); | 511 * BorderWidths getBorderWidths(); |
| 512 * | 512 * |
| 513 * Utility functions should go in a separate section at the end of the | 513 * Utility functions should go in a separate section at the end of the |
| 514 * class, and be kept to a minimum. | 514 * class, and be kept to a minimum. |
| 515 */ | 515 */ |
| 516 | 516 |
| 517 // Non-Inherited properties. | 517 // Non-Inherited properties. |
| 518 | 518 |
| 519 // Content alignment properties. | 519 // Content alignment properties. |
| 520 static StyleContentAlignmentData initialContentAlignment() { | |
| 521 return StyleContentAlignmentData(ContentPositionNormal, | |
| 522 ContentDistributionDefault, | |
| 523 OverflowAlignmentDefault); | |
| 524 } | |
| 525 | 520 |
| 526 // align-content (aka -webkit-align-content) | 521 // align-content (aka -webkit-align-content) |
| 522 static StyleContentAlignmentData initialAlignContent() { |
| 523 return StyleContentAlignmentData( |
| 524 ContentPositionNormal, RuntimeEnabledFeatures::cssGridLayoutEnabled() |
| 525 ? ContentDistributionDefault |
| 526 : ContentDistributionStretch, |
| 527 OverflowAlignmentDefault); |
| 528 } |
| 527 const StyleContentAlignmentData& alignContent() const { | 529 const StyleContentAlignmentData& alignContent() const { |
| 528 return m_rareNonInheritedData->m_alignContent; | 530 return m_rareNonInheritedData->m_alignContent; |
| 529 } | 531 } |
| 530 void setAlignContent(const StyleContentAlignmentData& data) { | 532 void setAlignContent(const StyleContentAlignmentData& data) { |
| 531 SET_VAR(m_rareNonInheritedData, m_alignContent, data); | 533 SET_VAR(m_rareNonInheritedData, m_alignContent, data); |
| 532 } | 534 } |
| 533 | 535 |
| 534 // justify-content (aka -webkit-justify-content) | 536 // justify-content (aka -webkit-justify-content) |
| 537 static StyleContentAlignmentData initialJustifyContent() { |
| 538 return StyleContentAlignmentData( |
| 539 RuntimeEnabledFeatures::cssGridLayoutEnabled() |
| 540 ? ContentPositionNormal |
| 541 : ContentPositionFlexStart, |
| 542 ContentDistributionDefault, OverflowAlignmentDefault); |
| 543 } |
| 535 const StyleContentAlignmentData& justifyContent() const { | 544 const StyleContentAlignmentData& justifyContent() const { |
| 536 return m_rareNonInheritedData->m_justifyContent; | 545 return m_rareNonInheritedData->m_justifyContent; |
| 537 } | 546 } |
| 538 void setJustifyContent(const StyleContentAlignmentData& data) { | 547 void setJustifyContent(const StyleContentAlignmentData& data) { |
| 539 SET_VAR(m_rareNonInheritedData, m_justifyContent, data); | 548 SET_VAR(m_rareNonInheritedData, m_justifyContent, data); |
| 540 } | 549 } |
| 541 | 550 |
| 542 // Default-Alignment properties. | 551 // Default-Alignment properties. |
| 543 static StyleSelfAlignmentData initialDefaultAlignment() { | 552 static StyleSelfAlignmentData initialDefaultAlignment() { |
| 544 return StyleSelfAlignmentData(RuntimeEnabledFeatures::cssGridLayoutEnabled() | 553 return StyleSelfAlignmentData(RuntimeEnabledFeatures::cssGridLayoutEnabled() |
| (...skipping 3549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4094 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); | 4103 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); |
| 4095 } | 4104 } |
| 4096 | 4105 |
| 4097 inline bool ComputedStyle::hasPseudoElementStyle() const { | 4106 inline bool ComputedStyle::hasPseudoElementStyle() const { |
| 4098 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; | 4107 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; |
| 4099 } | 4108 } |
| 4100 | 4109 |
| 4101 } // namespace blink | 4110 } // namespace blink |
| 4102 | 4111 |
| 4103 #endif // ComputedStyle_h | 4112 #endif // ComputedStyle_h |
| OLD | NEW |