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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 #include "core/css/Counter.h" | 43 #include "core/css/Counter.h" |
44 #include "core/css/Pair.h" | 44 #include "core/css/Pair.h" |
45 #include "core/css/Rect.h" | 45 #include "core/css/Rect.h" |
46 #include "core/layout/LayoutBlock.h" | 46 #include "core/layout/LayoutBlock.h" |
47 #include "core/layout/LayoutBox.h" | 47 #include "core/layout/LayoutBox.h" |
48 #include "core/layout/LayoutGrid.h" | 48 #include "core/layout/LayoutGrid.h" |
49 #include "core/layout/LayoutObject.h" | 49 #include "core/layout/LayoutObject.h" |
50 #include "core/style/ContentData.h" | 50 #include "core/style/ContentData.h" |
51 #include "core/style/ComputedStyle.h" | 51 #include "core/style/ComputedStyle.h" |
52 #include "core/style/PathStyleMotionPath.h" | 52 #include "core/style/PathStyleMotionPath.h" |
| 53 #include "core/style/QuotesData.h" |
53 #include "core/style/ShadowList.h" | 54 #include "core/style/ShadowList.h" |
54 #include "platform/LengthFunctions.h" | 55 #include "platform/LengthFunctions.h" |
55 | 56 |
56 namespace blink { | 57 namespace blink { |
57 | 58 |
58 inline static bool isFlexOrGrid(Node* element) | 59 inline static bool isFlexOrGrid(Node* element) |
59 { | 60 { |
60 return element && element->ensureComputedStyle() | 61 return element && element->ensureComputedStyle() |
61 && element->ensureComputedStyle()->isDisplayFlexibleOrGridBox(); | 62 && element->ensureComputedStyle()->isDisplayFlexibleOrGridBox(); |
62 } | 63 } |
(...skipping 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1904 return cssValuePool().createValue(style.pageBreakBefore()); | 1905 return cssValuePool().createValue(style.pageBreakBefore()); |
1905 case CSSPropertyPageBreakInside: { | 1906 case CSSPropertyPageBreakInside: { |
1906 EPageBreak pageBreak = style.pageBreakInside(); | 1907 EPageBreak pageBreak = style.pageBreakInside(); |
1907 ASSERT(pageBreak != PBALWAYS); | 1908 ASSERT(pageBreak != PBALWAYS); |
1908 if (pageBreak == PBALWAYS) | 1909 if (pageBreak == PBALWAYS) |
1909 return nullptr; | 1910 return nullptr; |
1910 return cssValuePool().createValue(style.pageBreakInside()); | 1911 return cssValuePool().createValue(style.pageBreakInside()); |
1911 } | 1912 } |
1912 case CSSPropertyPosition: | 1913 case CSSPropertyPosition: |
1913 return cssValuePool().createValue(style.position()); | 1914 return cssValuePool().createValue(style.position()); |
| 1915 case CSSPropertyQuotes: |
| 1916 if (!style.quotes()) { |
| 1917 // TODO(ramya.v): We should return the quote values that we're actua
lly using. |
| 1918 return nullptr; |
| 1919 } |
| 1920 if (style.quotes()->size()) { |
| 1921 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSep
arated(); |
| 1922 for (int i = 0; i < style.quotes()->size(); i++) { |
| 1923 list->append(cssValuePool().createValue(style.quotes()->getOpenQ
uote(i), CSSPrimitiveValue::CSS_STRING)); |
| 1924 list->append(cssValuePool().createValue(style.quotes()->getClose
Quote(i), CSSPrimitiveValue::CSS_STRING)); |
| 1925 } |
| 1926 return list.release(); |
| 1927 } |
| 1928 return cssValuePool().createIdentifierValue(CSSValueNone); |
1914 case CSSPropertyRight: | 1929 case CSSPropertyRight: |
1915 return valueForPositionOffset(style, CSSPropertyRight, layoutObject); | 1930 return valueForPositionOffset(style, CSSPropertyRight, layoutObject); |
1916 case CSSPropertyWebkitRubyPosition: | 1931 case CSSPropertyWebkitRubyPosition: |
1917 return cssValuePool().createValue(style.rubyPosition()); | 1932 return cssValuePool().createValue(style.rubyPosition()); |
1918 case CSSPropertyScrollBehavior: | 1933 case CSSPropertyScrollBehavior: |
1919 return cssValuePool().createValue(style.scrollBehavior()); | 1934 return cssValuePool().createValue(style.scrollBehavior()); |
1920 case CSSPropertyScrollBlocksOn: | 1935 case CSSPropertyScrollBlocksOn: |
1921 return scrollBlocksOnFlagsToCSSValue(style.scrollBlocksOn()); | 1936 return scrollBlocksOnFlagsToCSSValue(style.scrollBlocksOn()); |
1922 case CSSPropertyTableLayout: | 1937 case CSSPropertyTableLayout: |
1923 return cssValuePool().createValue(style.tableLayout()); | 1938 return cssValuePool().createValue(style.tableLayout()); |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2475 ASSERT_NOT_REACHED(); | 2490 ASSERT_NOT_REACHED(); |
2476 return nullptr; | 2491 return nullptr; |
2477 | 2492 |
2478 // Unimplemented @font-face properties. | 2493 // Unimplemented @font-face properties. |
2479 case CSSPropertySrc: | 2494 case CSSPropertySrc: |
2480 case CSSPropertyUnicodeRange: | 2495 case CSSPropertyUnicodeRange: |
2481 return nullptr; | 2496 return nullptr; |
2482 | 2497 |
2483 // Other unimplemented properties. | 2498 // Other unimplemented properties. |
2484 case CSSPropertyPage: // for @page | 2499 case CSSPropertyPage: // for @page |
2485 case CSSPropertyQuotes: // FIXME: needs implementation | |
2486 case CSSPropertySize: // for @page | 2500 case CSSPropertySize: // for @page |
2487 return nullptr; | 2501 return nullptr; |
2488 | 2502 |
2489 // Unimplemented -webkit- properties. | 2503 // Unimplemented -webkit- properties. |
2490 case CSSPropertyWebkitMarginCollapse: | 2504 case CSSPropertyWebkitMarginCollapse: |
2491 case CSSPropertyWebkitMask: | 2505 case CSSPropertyWebkitMask: |
2492 case CSSPropertyWebkitMaskRepeatX: | 2506 case CSSPropertyWebkitMaskRepeatX: |
2493 case CSSPropertyWebkitMaskRepeatY: | 2507 case CSSPropertyWebkitMaskRepeatY: |
2494 case CSSPropertyWebkitPerspectiveOriginX: | 2508 case CSSPropertyWebkitPerspectiveOriginX: |
2495 case CSSPropertyWebkitPerspectiveOriginY: | 2509 case CSSPropertyWebkitPerspectiveOriginY: |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2691 case CSSPropertyAll: | 2705 case CSSPropertyAll: |
2692 return nullptr; | 2706 return nullptr; |
2693 default: | 2707 default: |
2694 break; | 2708 break; |
2695 } | 2709 } |
2696 ASSERT_NOT_REACHED(); | 2710 ASSERT_NOT_REACHED(); |
2697 return nullptr; | 2711 return nullptr; |
2698 } | 2712 } |
2699 | 2713 |
2700 } | 2714 } |
OLD | NEW |