OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) | 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. |
4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 1507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1518 return isLeftToRightDirection() ? borderTop() : borderBottom(); | 1518 return isLeftToRightDirection() ? borderTop() : borderBottom(); |
1519 } | 1519 } |
1520 | 1520 |
1521 const BorderValue& ComputedStyle::borderEnd() const | 1521 const BorderValue& ComputedStyle::borderEnd() const |
1522 { | 1522 { |
1523 if (isHorizontalWritingMode()) | 1523 if (isHorizontalWritingMode()) |
1524 return isLeftToRightDirection() ? borderRight() : borderLeft(); | 1524 return isLeftToRightDirection() ? borderRight() : borderLeft(); |
1525 return isLeftToRightDirection() ? borderBottom() : borderTop(); | 1525 return isLeftToRightDirection() ? borderBottom() : borderTop(); |
1526 } | 1526 } |
1527 | 1527 |
1528 unsigned short ComputedStyle::borderBeforeWidth() const | 1528 int ComputedStyle::borderBeforeWidth() const |
1529 { | 1529 { |
1530 switch (writingMode()) { | 1530 switch (writingMode()) { |
1531 case TopToBottomWritingMode: | 1531 case TopToBottomWritingMode: |
1532 return borderTopWidth(); | 1532 return borderTopWidth(); |
1533 case BottomToTopWritingMode: | 1533 case BottomToTopWritingMode: |
1534 return borderBottomWidth(); | 1534 return borderBottomWidth(); |
1535 case LeftToRightWritingMode: | 1535 case LeftToRightWritingMode: |
1536 return borderLeftWidth(); | 1536 return borderLeftWidth(); |
1537 case RightToLeftWritingMode: | 1537 case RightToLeftWritingMode: |
1538 return borderRightWidth(); | 1538 return borderRightWidth(); |
1539 } | 1539 } |
1540 ASSERT_NOT_REACHED(); | 1540 ASSERT_NOT_REACHED(); |
1541 return borderTopWidth(); | 1541 return borderTopWidth(); |
1542 } | 1542 } |
1543 | 1543 |
1544 unsigned short ComputedStyle::borderAfterWidth() const | 1544 int ComputedStyle::borderAfterWidth() const |
1545 { | 1545 { |
1546 switch (writingMode()) { | 1546 switch (writingMode()) { |
1547 case TopToBottomWritingMode: | 1547 case TopToBottomWritingMode: |
1548 return borderBottomWidth(); | 1548 return borderBottomWidth(); |
1549 case BottomToTopWritingMode: | 1549 case BottomToTopWritingMode: |
1550 return borderTopWidth(); | 1550 return borderTopWidth(); |
1551 case LeftToRightWritingMode: | 1551 case LeftToRightWritingMode: |
1552 return borderRightWidth(); | 1552 return borderRightWidth(); |
1553 case RightToLeftWritingMode: | 1553 case RightToLeftWritingMode: |
1554 return borderLeftWidth(); | 1554 return borderLeftWidth(); |
1555 } | 1555 } |
1556 ASSERT_NOT_REACHED(); | 1556 ASSERT_NOT_REACHED(); |
1557 return borderBottomWidth(); | 1557 return borderBottomWidth(); |
1558 } | 1558 } |
1559 | 1559 |
1560 unsigned short ComputedStyle::borderStartWidth() const | 1560 int ComputedStyle::borderStartWidth() const |
1561 { | 1561 { |
1562 if (isHorizontalWritingMode()) | 1562 if (isHorizontalWritingMode()) |
1563 return isLeftToRightDirection() ? borderLeftWidth() : borderRightWidth()
; | 1563 return isLeftToRightDirection() ? borderLeftWidth() : borderRightWidth()
; |
1564 return isLeftToRightDirection() ? borderTopWidth() : borderBottomWidth(); | 1564 return isLeftToRightDirection() ? borderTopWidth() : borderBottomWidth(); |
1565 } | 1565 } |
1566 | 1566 |
1567 unsigned short ComputedStyle::borderEndWidth() const | 1567 int ComputedStyle::borderEndWidth() const |
1568 { | 1568 { |
1569 if (isHorizontalWritingMode()) | 1569 if (isHorizontalWritingMode()) |
1570 return isLeftToRightDirection() ? borderRightWidth() : borderLeftWidth()
; | 1570 return isLeftToRightDirection() ? borderRightWidth() : borderLeftWidth()
; |
1571 return isLeftToRightDirection() ? borderBottomWidth() : borderTopWidth(); | 1571 return isLeftToRightDirection() ? borderBottomWidth() : borderTopWidth(); |
1572 } | 1572 } |
1573 | 1573 |
1574 void ComputedStyle::setMarginStart(const Length& margin) | 1574 void ComputedStyle::setMarginStart(const Length& margin) |
1575 { | 1575 { |
1576 if (isHorizontalWritingMode()) { | 1576 if (isHorizontalWritingMode()) { |
1577 if (isLeftToRightDirection()) | 1577 if (isLeftToRightDirection()) |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1744 } | 1744 } |
1745 | 1745 |
1746 void ComputedStyle::copyChildDependentFlagsFrom(const ComputedStyle& other) | 1746 void ComputedStyle::copyChildDependentFlagsFrom(const ComputedStyle& other) |
1747 { | 1747 { |
1748 setEmptyState(other.emptyState()); | 1748 setEmptyState(other.emptyState()); |
1749 if (other.hasExplicitlyInheritedProperties()) | 1749 if (other.hasExplicitlyInheritedProperties()) |
1750 setHasExplicitlyInheritedProperties(); | 1750 setHasExplicitlyInheritedProperties(); |
1751 } | 1751 } |
1752 | 1752 |
1753 } // namespace blink | 1753 } // namespace blink |
OLD | NEW |