| 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 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
| 6 * Copyright (C) 2009 Rob Buis (rwlbuis@gmail.com) | 6 * Copyright (C) 2009 Rob Buis (rwlbuis@gmail.com) |
| 7 * Copyright (C) 2011 Google Inc. All rights reserved. | 7 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 m_resource = 0; | 593 m_resource = 0; |
| 594 } | 594 } |
| 595 | 595 |
| 596 if (!m_owner->shouldLoadLink()) | 596 if (!m_owner->shouldLoadLink()) |
| 597 return; | 597 return; |
| 598 | 598 |
| 599 m_loading = true; | 599 m_loading = true; |
| 600 | 600 |
| 601 bool mediaQueryMatches = true; | 601 bool mediaQueryMatches = true; |
| 602 if (!m_owner->media().isEmpty()) { | 602 if (!m_owner->media().isEmpty()) { |
| 603 RefPtr<RenderStyle> documentStyle = StyleResolver::styleForDocument(
&document()); | 603 RefPtr<RenderStyle> documentStyle = StyleResolver::styleForDocument(
document()); |
| 604 RefPtr<MediaQuerySet> media = MediaQuerySet::create(m_owner->media()
); | 604 RefPtr<MediaQuerySet> media = MediaQuerySet::create(m_owner->media()
); |
| 605 MediaQueryEvaluator evaluator(document().frame()->view()->mediaType(
), document().frame(), documentStyle.get()); | 605 MediaQueryEvaluator evaluator(document().frame()->view()->mediaType(
), document().frame(), documentStyle.get()); |
| 606 mediaQueryMatches = evaluator.eval(media.get()); | 606 mediaQueryMatches = evaluator.eval(media.get()); |
| 607 } | 607 } |
| 608 | 608 |
| 609 // Don't hold up render tree construction and script execution on styles
heets | 609 // Don't hold up render tree construction and script execution on styles
heets |
| 610 // that are not needed for the rendering at the moment. | 610 // that are not needed for the rendering at the moment. |
| 611 bool blocking = mediaQueryMatches && !m_owner->isAlternate(); | 611 bool blocking = mediaQueryMatches && !m_owner->isAlternate(); |
| 612 addPendingSheet(blocking ? Blocking : NonBlocking); | 612 addPendingSheet(blocking ? Blocking : NonBlocking); |
| 613 | 613 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 639 void LinkStyle::ownerRemoved() | 639 void LinkStyle::ownerRemoved() |
| 640 { | 640 { |
| 641 if (m_sheet) | 641 if (m_sheet) |
| 642 clearSheet(); | 642 clearSheet(); |
| 643 | 643 |
| 644 if (styleSheetIsLoading()) | 644 if (styleSheetIsLoading()) |
| 645 removePendingSheet(RemovePendingSheetNotifyLater); | 645 removePendingSheet(RemovePendingSheetNotifyLater); |
| 646 } | 646 } |
| 647 | 647 |
| 648 } // namespace WebCore | 648 } // namespace WebCore |
| OLD | NEW |