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 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
765 result.uncheckedAppend(')'); | 765 result.uncheckedAppend(')'); |
766 | 766 |
767 text = String::adopt(result); | 767 text = String::adopt(result); |
768 break; | 768 break; |
769 } | 769 } |
770 case CSS_COUNTER_NAME: | 770 case CSS_COUNTER_NAME: |
771 text = "counter("; | 771 text = "counter("; |
772 text += m_value.string; | 772 text += m_value.string; |
773 text += ")"; | 773 text += ")"; |
774 break; | 774 break; |
775 case CSS_COUNTER: | 775 case CSS_COUNTER: { |
776 text = "counter("; | 776 String separator = m_value.counter->separator(); |
777 text += String::number(m_value.num); | 777 text = separator.isEmpty() ? "counter(" : "counters("; |
| 778 text += m_value.counter->identifier(); |
| 779 if (!separator.isEmpty()) { |
| 780 text += ", "; |
| 781 text += quoteCSSStringIfNeeded(separator); |
| 782 } |
| 783 const char* listStyleName = getValueName(m_value.counter->listStyleN
umber() + CSSValueDisc); |
| 784 if (listStyleName) { |
| 785 text += ", "; |
| 786 text += listStyleName; |
| 787 } |
778 text += ")"; | 788 text += ")"; |
779 // FIXME: Add list-style and separator | |
780 break; | 789 break; |
| 790 } |
781 case CSS_RECT: { | 791 case CSS_RECT: { |
782 DEFINE_STATIC_LOCAL(const String, rectParen, ("rect(")); | 792 DEFINE_STATIC_LOCAL(const String, rectParen, ("rect(")); |
783 | 793 |
784 Rect* rectVal = getRectValue(); | 794 Rect* rectVal = getRectValue(); |
785 Vector<UChar> result; | 795 Vector<UChar> result; |
786 result.reserveInitialCapacity(32); | 796 result.reserveInitialCapacity(32); |
787 append(result, rectParen); | 797 append(result, rectParen); |
788 | 798 |
789 append(result, rectVal->top()->cssText()); | 799 append(result, rectVal->top()->cssText()); |
790 result.append(' '); | 800 result.append(' '); |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
890 return text; | 900 return text; |
891 } | 901 } |
892 | 902 |
893 void CSSPrimitiveValue::addSubresourceStyleURLs(ListHashSet<KURL>& urls, const C
SSStyleSheet* styleSheet) | 903 void CSSPrimitiveValue::addSubresourceStyleURLs(ListHashSet<KURL>& urls, const C
SSStyleSheet* styleSheet) |
894 { | 904 { |
895 if (m_type == CSS_URI) | 905 if (m_type == CSS_URI) |
896 addSubresourceURL(urls, styleSheet->completeURL(m_value.string)); | 906 addSubresourceURL(urls, styleSheet->completeURL(m_value.string)); |
897 } | 907 } |
898 | 908 |
899 } // namespace WebCore | 909 } // namespace WebCore |
OLD | NEW |