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, 2006, 2007, 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2006, 2007, 2012 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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
397 } | 397 } |
398 | 398 |
399 void CSSStyleSheet::clearChildRuleCSSOMWrappers() | 399 void CSSStyleSheet::clearChildRuleCSSOMWrappers() |
400 { | 400 { |
401 m_childRuleCSSOMWrappers.clear(); | 401 m_childRuleCSSOMWrappers.clear(); |
402 } | 402 } |
403 | 403 |
404 bool CSSStyleSheet::sheetLoaded() | 404 bool CSSStyleSheet::sheetLoaded() |
405 { | 405 { |
406 ASSERT(m_ownerNode); | 406 ASSERT(m_ownerNode); |
407 m_loadCompleted = m_ownerNode->sheetLoaded(); | 407 setLoadCompleted(m_ownerNode->sheetLoaded()); |
408 return m_loadCompleted; | 408 return m_loadCompleted; |
409 } | 409 } |
410 | 410 |
411 void CSSStyleSheet::startLoadingDynamicSheet() | 411 void CSSStyleSheet::startLoadingDynamicSheet() |
412 { | 412 { |
413 m_loadCompleted = false; | 413 setLoadCompleted(false); |
414 m_ownerNode->startLoadingDynamicSheet(); | 414 m_ownerNode->startLoadingDynamicSheet(); |
415 } | 415 } |
416 | 416 |
417 void CSSStyleSheet::setLoadCompleted(bool completed) | |
418 { | |
419 if (completed != m_loadCompleted) { | |
tasak
2014/03/13 01:29:31
Nit: I think, blink loves early return.
Mads Ager (chromium)
2014/03/13 09:08:23
Done.
| |
420 m_loadCompleted = completed; | |
421 if (completed) | |
422 m_contents->clientLoadCompleted(this); | |
423 else | |
424 m_contents->clientLoadStarted(this); | |
425 } | |
426 } | |
427 | |
417 void CSSStyleSheet::trace(Visitor* visitor) | 428 void CSSStyleSheet::trace(Visitor* visitor) |
418 { | 429 { |
419 visitor->trace(m_contents); | 430 visitor->trace(m_contents); |
420 visitor->trace(m_mediaQueries); | 431 visitor->trace(m_mediaQueries); |
421 visitor->trace(m_ownerRule); | 432 visitor->trace(m_ownerRule); |
422 visitor->trace(m_mediaCSSOMWrapper); | 433 visitor->trace(m_mediaCSSOMWrapper); |
423 visitor->trace(m_childRuleCSSOMWrappers); | 434 visitor->trace(m_childRuleCSSOMWrappers); |
424 } | 435 } |
425 | 436 |
426 } | 437 } |
OLD | NEW |