Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. |
| 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) |
| 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 9 * Copyright (C) 2013 Google Inc. All rights reserved. | 9 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 10 * | 10 * |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 46 StyleSheetCollectionBase::~StyleSheetCollectionBase() | 46 StyleSheetCollectionBase::~StyleSheetCollectionBase() |
| 47 { | 47 { |
| 48 } | 48 } |
| 49 | 49 |
| 50 void StyleSheetCollectionBase::swap(StyleSheetCollectionBase& other) | 50 void StyleSheetCollectionBase::swap(StyleSheetCollectionBase& other) |
| 51 { | 51 { |
| 52 m_styleSheetsForStyleSheetList.swap(other.m_styleSheetsForStyleSheetList); | 52 m_styleSheetsForStyleSheetList.swap(other.m_styleSheetsForStyleSheetList); |
| 53 m_activeAuthorStyleSheets.swap(other.m_activeAuthorStyleSheets); | 53 m_activeAuthorStyleSheets.swap(other.m_activeAuthorStyleSheets); |
| 54 } | 54 } |
| 55 | 55 |
| 56 void StyleSheetCollectionBase::setSheetsForSheetList(const Vector<RefPtr<StyleSh eet> >& sheets) | |
| 57 { | |
| 58 // Only called for collection of HTML Imports, that never has active sheets. | |
| 59 ASSERT(m_activeAuthorStyleSheets.isEmpty()); | |
| 60 m_styleSheetsForStyleSheetList = sheets; | |
|
esprehn
2014/01/23 07:51:03
swap() I think is what you want, this currently do
Hajime Morrita
2014/01/24 01:25:51
Done.
| |
| 61 } | |
| 62 | |
| 56 void StyleSheetCollectionBase::appendActiveStyleSheets(const Vector<RefPtr<CSSSt yleSheet> >& sheets) | 63 void StyleSheetCollectionBase::appendActiveStyleSheets(const Vector<RefPtr<CSSSt yleSheet> >& sheets) |
| 57 { | 64 { |
| 58 m_activeAuthorStyleSheets.append(sheets); | 65 m_activeAuthorStyleSheets.append(sheets); |
| 59 } | 66 } |
| 60 | 67 |
| 61 void StyleSheetCollectionBase::appendActiveStyleSheet(CSSStyleSheet* sheet) | 68 void StyleSheetCollectionBase::appendActiveStyleSheet(CSSStyleSheet* sheet) |
| 62 { | 69 { |
| 63 m_activeAuthorStyleSheets.append(sheet); | 70 m_activeAuthorStyleSheets.append(sheet); |
| 64 } | 71 } |
| 65 | 72 |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 256 } | 263 } |
| 257 return false; | 264 return false; |
| 258 } | 265 } |
| 259 | 266 |
| 260 void StyleSheetCollection::updateUsesRemUnits() | 267 void StyleSheetCollection::updateUsesRemUnits() |
| 261 { | 268 { |
| 262 m_usesRemUnits = styleSheetsUseRemUnits(m_activeAuthorStyleSheets); | 269 m_usesRemUnits = styleSheetsUseRemUnits(m_activeAuthorStyleSheets); |
| 263 } | 270 } |
| 264 | 271 |
| 265 } | 272 } |
| OLD | NEW |