OLD | NEW |
1 /* | 1 /* |
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
735 result.uncheckedAppend(')'); | 735 result.uncheckedAppend(')'); |
736 | 736 |
737 text = String::adopt(result); | 737 text = String::adopt(result); |
738 break; | 738 break; |
739 } | 739 } |
740 case CSS_COUNTER_NAME: | 740 case CSS_COUNTER_NAME: |
741 text = "counter("; | 741 text = "counter("; |
742 text += m_value.string; | 742 text += m_value.string; |
743 text += ")"; | 743 text += ")"; |
744 break; | 744 break; |
745 case CSS_COUNTER: | 745 case CSS_COUNTER: { |
746 text = "counter("; | 746 String separator = m_value.counter->separator(); |
747 text += String::number(m_value.num); | 747 text = separator.isEmpty() ? "counter(" : "counters("; |
| 748 text += m_value.counter->identifier(); |
| 749 if (!separator.isEmpty()) { |
| 750 text += ", "; |
| 751 text += quoteCSSStringIfNeeded(separator); |
| 752 } |
| 753 const char* listStyleName = getValueName(m_value.counter->listStyleN
umber() + CSSValueDisc); |
| 754 if (listStyleName) { |
| 755 text += ", "; |
| 756 text += listStyleName; |
| 757 } |
748 text += ")"; | 758 text += ")"; |
749 // FIXME: Add list-style and separator | |
750 break; | 759 break; |
| 760 } |
751 case CSS_RECT: { | 761 case CSS_RECT: { |
752 DEFINE_STATIC_LOCAL(const String, rectParen, ("rect(")); | 762 DEFINE_STATIC_LOCAL(const String, rectParen, ("rect(")); |
753 | 763 |
754 Rect* rectVal = getRectValue(); | 764 Rect* rectVal = getRectValue(); |
755 Vector<UChar> result; | 765 Vector<UChar> result; |
756 result.reserveInitialCapacity(32); | 766 result.reserveInitialCapacity(32); |
757 append(result, rectParen); | 767 append(result, rectParen); |
758 | 768 |
759 append(result, rectVal->top()->cssText()); | 769 append(result, rectVal->top()->cssText()); |
760 result.append(' '); | 770 result.append(' '); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
862 return text; | 872 return text; |
863 } | 873 } |
864 | 874 |
865 void CSSPrimitiveValue::addSubresourceStyleURLs(ListHashSet<KURL>& urls, const C
SSStyleSheet* styleSheet) | 875 void CSSPrimitiveValue::addSubresourceStyleURLs(ListHashSet<KURL>& urls, const C
SSStyleSheet* styleSheet) |
866 { | 876 { |
867 if (m_type == CSS_URI) | 877 if (m_type == CSS_URI) |
868 addSubresourceURL(urls, styleSheet->completeURL(m_value.string)); | 878 addSubresourceURL(urls, styleSheet->completeURL(m_value.string)); |
869 } | 879 } |
870 | 880 |
871 } // namespace WebCore | 881 } // namespace WebCore |
OLD | NEW |