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 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
686 { | 686 { |
687 RefPtr<CSSValueList> list = valuesForBorderRadiusCorner(radius, style, rende
rer, renderView); | 687 RefPtr<CSSValueList> list = valuesForBorderRadiusCorner(radius, style, rende
rer, renderView); |
688 if (list->item(0)->equals(*list->item(1))) | 688 if (list->item(0)->equals(*list->item(1))) |
689 return list->item(0); | 689 return list->item(0); |
690 return list.release(); | 690 return list.release(); |
691 } | 691 } |
692 | 692 |
693 static PassRefPtr<CSSValueList> valueForBorderRadiusShorthand(const RenderStyle*
style, RenderObject* renderer, RenderView* renderView) | 693 static PassRefPtr<CSSValueList> valueForBorderRadiusShorthand(const RenderStyle*
style, RenderObject* renderer, RenderView* renderView) |
694 { | 694 { |
695 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); | 695 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); |
| 696 |
696 bool showHorizontalBottomLeft = style->borderTopRightRadius().width() != sty
le->borderBottomLeftRadius().width(); | 697 bool showHorizontalBottomLeft = style->borderTopRightRadius().width() != sty
le->borderBottomLeftRadius().width(); |
697 bool showHorizontalBottomRight = style->borderBottomRightRadius().width() !=
style->borderTopLeftRadius().width(); | 698 bool showHorizontalBottomRight = showHorizontalBottomLeft || (style->borderB
ottomRightRadius().width() != style->borderTopLeftRadius().width()); |
698 bool showHorizontalTopRight = style->borderTopRightRadius().width() != style
->borderTopLeftRadius().width(); | 699 bool showHorizontalTopRight = showHorizontalBottomRight || (style->borderTop
RightRadius().width() != style->borderTopLeftRadius().width()); |
699 | 700 |
700 bool showVerticalBottomLeft = style->borderTopRightRadius().height() != styl
e->borderBottomLeftRadius().height(); | 701 bool showVerticalBottomLeft = style->borderTopRightRadius().height() != styl
e->borderBottomLeftRadius().height(); |
701 bool showVerticalBottomRight = (style->borderBottomRightRadius().height() !=
style->borderTopLeftRadius().height()) || showVerticalBottomLeft; | 702 bool showVerticalBottomRight = showVerticalBottomLeft || (style->borderBotto
mRightRadius().height() != style->borderTopLeftRadius().height()); |
702 bool showVerticalTopRight = (style->borderTopRightRadius().height() != style
->borderTopLeftRadius().height()) || showVerticalBottomRight; | 703 bool showVerticalTopRight = showVerticalBottomRight || (style->borderTopRigh
tRadius().height() != style->borderTopLeftRadius().height()); |
703 bool showVerticalTopLeft = (style->borderTopLeftRadius().width() != style->b
orderTopLeftRadius().height()); | 704 bool showVerticalTopLeft = (style->borderTopLeftRadius().width() != style->b
orderTopLeftRadius().height()); |
704 | 705 |
705 RefPtr<CSSValueList> topLeftRadius = valuesForBorderRadiusCorner(style->bord
erTopLeftRadius(), style, renderer, renderView); | 706 RefPtr<CSSValueList> topLeftRadius = valuesForBorderRadiusCorner(style->bord
erTopLeftRadius(), style, renderer, renderView); |
706 RefPtr<CSSValueList> topRightRadius = valuesForBorderRadiusCorner(style->bor
derTopRightRadius(), style, renderer, renderView); | 707 RefPtr<CSSValueList> topRightRadius = valuesForBorderRadiusCorner(style->bor
derTopRightRadius(), style, renderer, renderView); |
707 RefPtr<CSSValueList> bottomRightRadius = valuesForBorderRadiusCorner(style->
borderBottomRightRadius(), style, renderer, renderView); | 708 RefPtr<CSSValueList> bottomRightRadius = valuesForBorderRadiusCorner(style->
borderBottomRightRadius(), style, renderer, renderView); |
708 RefPtr<CSSValueList> bottomLeftRadius = valuesForBorderRadiusCorner(style->b
orderBottomLeftRadius(), style, renderer, renderView); | 709 RefPtr<CSSValueList> bottomLeftRadius = valuesForBorderRadiusCorner(style->b
orderBottomLeftRadius(), style, renderer, renderView); |
709 | 710 |
710 RefPtr<CSSValueList> horizontalRadii = CSSValueList::createSpaceSeparated(); | 711 RefPtr<CSSValueList> horizontalRadii = CSSValueList::createSpaceSeparated(); |
711 horizontalRadii->append(topLeftRadius->item(0)); | 712 horizontalRadii->append(topLeftRadius->item(0)); |
712 if (showHorizontalTopRight) | 713 if (showHorizontalTopRight) |
(...skipping 2482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3195 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB
ackgroundSize, CSSPropertyBackgroundOrigin, | 3196 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB
ackgroundSize, CSSPropertyBackgroundOrigin, |
3196 CSSPropertyB
ackgroundClip }; | 3197 CSSPropertyB
ackgroundClip }; |
3197 | 3198 |
3198 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); | 3199 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); |
3199 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash
Seperator)))); | 3200 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash
Seperator)))); |
3200 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe
perator)))); | 3201 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe
perator)))); |
3201 return list.release(); | 3202 return list.release(); |
3202 } | 3203 } |
3203 | 3204 |
3204 } // namespace WebCore | 3205 } // namespace WebCore |
OLD | NEW |