Chromium Code Reviews| 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 return nullptr; | |
|
Timothy Loh
2015/06/29 05:27:58
We shouldn't be returning nullptr from here, can w
ramya.v
2015/06/29 05:47:10
For this case, IE behavior is returning null, empt
Timothy Loh
2015/06/29 05:52:37
It looks like we use different quotes depending on
ramya.v
2015/06/29 06:04:06
Done.
| |
| 1918 if (style.quotes()->size()) { | |
| 1919 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSep arated(); | |
| 1920 for (int i = 0; i < style.quotes()->size(); i++) { | |
| 1921 list->append(cssValuePool().createValue(style.quotes()->getOpenQ uote(i), CSSPrimitiveValue::CSS_STRING)); | |
| 1922 list->append(cssValuePool().createValue(style.quotes()->getClose Quote(i), CSSPrimitiveValue::CSS_STRING)); | |
| 1923 } | |
| 1924 return list.release(); | |
| 1925 } | |
| 1926 return cssValuePool().createIdentifierValue(CSSValueNone); | |
| 1914 case CSSPropertyRight: | 1927 case CSSPropertyRight: |
| 1915 return valueForPositionOffset(style, CSSPropertyRight, layoutObject); | 1928 return valueForPositionOffset(style, CSSPropertyRight, layoutObject); |
| 1916 case CSSPropertyWebkitRubyPosition: | 1929 case CSSPropertyWebkitRubyPosition: |
| 1917 return cssValuePool().createValue(style.rubyPosition()); | 1930 return cssValuePool().createValue(style.rubyPosition()); |
| 1918 case CSSPropertyScrollBehavior: | 1931 case CSSPropertyScrollBehavior: |
| 1919 return cssValuePool().createValue(style.scrollBehavior()); | 1932 return cssValuePool().createValue(style.scrollBehavior()); |
| 1920 case CSSPropertyScrollBlocksOn: | 1933 case CSSPropertyScrollBlocksOn: |
| 1921 return scrollBlocksOnFlagsToCSSValue(style.scrollBlocksOn()); | 1934 return scrollBlocksOnFlagsToCSSValue(style.scrollBlocksOn()); |
| 1922 case CSSPropertyTableLayout: | 1935 case CSSPropertyTableLayout: |
| 1923 return cssValuePool().createValue(style.tableLayout()); | 1936 return cssValuePool().createValue(style.tableLayout()); |
| (...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2475 ASSERT_NOT_REACHED(); | 2488 ASSERT_NOT_REACHED(); |
| 2476 return nullptr; | 2489 return nullptr; |
| 2477 | 2490 |
| 2478 // Unimplemented @font-face properties. | 2491 // Unimplemented @font-face properties. |
| 2479 case CSSPropertySrc: | 2492 case CSSPropertySrc: |
| 2480 case CSSPropertyUnicodeRange: | 2493 case CSSPropertyUnicodeRange: |
| 2481 return nullptr; | 2494 return nullptr; |
| 2482 | 2495 |
| 2483 // Other unimplemented properties. | 2496 // Other unimplemented properties. |
| 2484 case CSSPropertyPage: // for @page | 2497 case CSSPropertyPage: // for @page |
| 2485 case CSSPropertyQuotes: // FIXME: needs implementation | |
| 2486 case CSSPropertySize: // for @page | 2498 case CSSPropertySize: // for @page |
| 2487 return nullptr; | 2499 return nullptr; |
| 2488 | 2500 |
| 2489 // Unimplemented -webkit- properties. | 2501 // Unimplemented -webkit- properties. |
| 2490 case CSSPropertyWebkitMarginCollapse: | 2502 case CSSPropertyWebkitMarginCollapse: |
| 2491 case CSSPropertyWebkitMask: | 2503 case CSSPropertyWebkitMask: |
| 2492 case CSSPropertyWebkitMaskRepeatX: | 2504 case CSSPropertyWebkitMaskRepeatX: |
| 2493 case CSSPropertyWebkitMaskRepeatY: | 2505 case CSSPropertyWebkitMaskRepeatY: |
| 2494 case CSSPropertyWebkitPerspectiveOriginX: | 2506 case CSSPropertyWebkitPerspectiveOriginX: |
| 2495 case CSSPropertyWebkitPerspectiveOriginY: | 2507 case CSSPropertyWebkitPerspectiveOriginY: |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2691 case CSSPropertyAll: | 2703 case CSSPropertyAll: |
| 2692 return nullptr; | 2704 return nullptr; |
| 2693 default: | 2705 default: |
| 2694 break; | 2706 break; |
| 2695 } | 2707 } |
| 2696 ASSERT_NOT_REACHED(); | 2708 ASSERT_NOT_REACHED(); |
| 2697 return nullptr; | 2709 return nullptr; |
| 2698 } | 2710 } |
| 2699 | 2711 |
| 2700 } | 2712 } |
| OLD | NEW |