PassRefPtr<CSSValueList> CSSValueList::copy() { PassRefPtr<CSSValueList> newList = m_isSpaceSeparated ? createSpaceSeparated() : createCommaSeparated(); for (size_t index = 0; index < m_values.size(); index++) newList->append(m_values[index]); return newList; }
PassRefPtr<CSSValueList> CSSValueList::copy() { RefPtr<CSSValueList> newList; switch (m_valueListSeparator) { case SpaceSeparator: newList = createSpaceSeparated(); break; case CommaSeparator: newList = createCommaSeparated(); break; case SlashSeparator: newList = createSlashSeparated(); break; default: ASSERT_NOT_REACHED(); } for (auto& value : m_values) newList->append(value.get()); return newList.release(); }
PassRefPtr<CSSValueList> CSSValueList::copy() { RefPtr<CSSValueList> newList; switch (m_valueListSeparator) { case SpaceSeparator: newList = createSpaceSeparated(); break; case CommaSeparator: newList = createCommaSeparated(); break; case SlashSeparator: newList = createSlashSeparated(); break; default: ASSERT_NOT_REACHED(); } for (size_t index = 0; index < m_values.size(); index++) newList->append(m_values[index]); return newList.release(); }