| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> | 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. |
| 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
| 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. | 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. |
| 7 * Copyright (C) 2015 Google Inc. All rights reserved. | 7 * Copyright (C) 2015 Google Inc. All rights reserved. |
| 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 Lesser General Public | 10 * modify it under the terms of the GNU Lesser General Public |
| (...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 649 | 649 |
| 650 static LayoutRect sizingBox(const LayoutObject* layoutObject) | 650 static LayoutRect sizingBox(const LayoutObject* layoutObject) |
| 651 { | 651 { |
| 652 if (!layoutObject->isBox()) | 652 if (!layoutObject->isBox()) |
| 653 return LayoutRect(); | 653 return LayoutRect(); |
| 654 | 654 |
| 655 const LayoutBox* box = toLayoutBox(layoutObject); | 655 const LayoutBox* box = toLayoutBox(layoutObject); |
| 656 return box->style()->boxSizing() == BORDER_BOX ? box->borderBoxRect() : box-
>computedCSSContentBoxRect(); | 656 return box->style()->boxSizing() == BORDER_BOX ? box->borderBoxRect() : box-
>computedCSSContentBoxRect(); |
| 657 } | 657 } |
| 658 | 658 |
| 659 static PassRefPtrWillBeRawPtr<CSSValue> scrollBlocksOnFlagsToCSSValue(WebScrollB
locksOn scrollBlocksOn) | |
| 660 { | |
| 661 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated()
; | |
| 662 | |
| 663 if (scrollBlocksOn == WebScrollBlocksOnNone) | |
| 664 return cssValuePool().createIdentifierValue(CSSValueNone); | |
| 665 | |
| 666 if (scrollBlocksOn & WebScrollBlocksOnStartTouch) | |
| 667 list->append(cssValuePool().createIdentifierValue(CSSValueStartTouch)); | |
| 668 if (scrollBlocksOn & WebScrollBlocksOnWheelEvent) | |
| 669 list->append(cssValuePool().createIdentifierValue(CSSValueWheelEvent)); | |
| 670 if (scrollBlocksOn & WebScrollBlocksOnScrollEvent) | |
| 671 list->append(cssValuePool().createIdentifierValue(CSSValueScrollEvent)); | |
| 672 ASSERT(list->length()); | |
| 673 return list.release(); | |
| 674 } | |
| 675 | |
| 676 static PassRefPtrWillBeRawPtr<CSSValue> renderTextDecorationFlagsToCSSValue(int
textDecoration) | 659 static PassRefPtrWillBeRawPtr<CSSValue> renderTextDecorationFlagsToCSSValue(int
textDecoration) |
| 677 { | 660 { |
| 678 // Blink value is ignored. | 661 // Blink value is ignored. |
| 679 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated()
; | 662 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated()
; |
| 680 if (textDecoration & TextDecorationUnderline) | 663 if (textDecoration & TextDecorationUnderline) |
| 681 list->append(cssValuePool().createIdentifierValue(CSSValueUnderline)); | 664 list->append(cssValuePool().createIdentifierValue(CSSValueUnderline)); |
| 682 if (textDecoration & TextDecorationOverline) | 665 if (textDecoration & TextDecorationOverline) |
| 683 list->append(cssValuePool().createIdentifierValue(CSSValueOverline)); | 666 list->append(cssValuePool().createIdentifierValue(CSSValueOverline)); |
| 684 if (textDecoration & TextDecorationLineThrough) | 667 if (textDecoration & TextDecorationLineThrough) |
| 685 list->append(cssValuePool().createIdentifierValue(CSSValueLineThrough)); | 668 list->append(cssValuePool().createIdentifierValue(CSSValueLineThrough)); |
| (...skipping 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1929 } | 1912 } |
| 1930 return list.release(); | 1913 return list.release(); |
| 1931 } | 1914 } |
| 1932 return cssValuePool().createIdentifierValue(CSSValueNone); | 1915 return cssValuePool().createIdentifierValue(CSSValueNone); |
| 1933 case CSSPropertyRight: | 1916 case CSSPropertyRight: |
| 1934 return valueForPositionOffset(style, CSSPropertyRight, layoutObject); | 1917 return valueForPositionOffset(style, CSSPropertyRight, layoutObject); |
| 1935 case CSSPropertyWebkitRubyPosition: | 1918 case CSSPropertyWebkitRubyPosition: |
| 1936 return cssValuePool().createValue(style.rubyPosition()); | 1919 return cssValuePool().createValue(style.rubyPosition()); |
| 1937 case CSSPropertyScrollBehavior: | 1920 case CSSPropertyScrollBehavior: |
| 1938 return cssValuePool().createValue(style.scrollBehavior()); | 1921 return cssValuePool().createValue(style.scrollBehavior()); |
| 1939 case CSSPropertyScrollBlocksOn: | |
| 1940 return scrollBlocksOnFlagsToCSSValue(style.scrollBlocksOn()); | |
| 1941 case CSSPropertyTableLayout: | 1922 case CSSPropertyTableLayout: |
| 1942 return cssValuePool().createValue(style.tableLayout()); | 1923 return cssValuePool().createValue(style.tableLayout()); |
| 1943 case CSSPropertyTextAlign: | 1924 case CSSPropertyTextAlign: |
| 1944 return cssValuePool().createValue(style.textAlign()); | 1925 return cssValuePool().createValue(style.textAlign()); |
| 1945 case CSSPropertyTextAlignLast: | 1926 case CSSPropertyTextAlignLast: |
| 1946 return cssValuePool().createValue(style.textAlignLast()); | 1927 return cssValuePool().createValue(style.textAlignLast()); |
| 1947 case CSSPropertyTextDecoration: | 1928 case CSSPropertyTextDecoration: |
| 1948 if (RuntimeEnabledFeatures::css3TextDecorationsEnabled()) | 1929 if (RuntimeEnabledFeatures::css3TextDecorationsEnabled()) |
| 1949 return valuesForShorthandProperty(textDecorationShorthand(), style,
layoutObject, styledNode, allowVisitedStyle); | 1930 return valuesForShorthandProperty(textDecorationShorthand(), style,
layoutObject, styledNode, allowVisitedStyle); |
| 1950 // Fall through. | 1931 // Fall through. |
| (...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2709 case CSSPropertyAll: | 2690 case CSSPropertyAll: |
| 2710 return nullptr; | 2691 return nullptr; |
| 2711 default: | 2692 default: |
| 2712 break; | 2693 break; |
| 2713 } | 2694 } |
| 2714 ASSERT_NOT_REACHED(); | 2695 ASSERT_NOT_REACHED(); |
| 2715 return nullptr; | 2696 return nullptr; |
| 2716 } | 2697 } |
| 2717 | 2698 |
| 2718 } | 2699 } |
| OLD | NEW |