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 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
656 return; | 656 return; |
657 | 657 |
658 m_loading = true; | 658 m_loading = true; |
659 | 659 |
660 String title = m_owner->title(); | 660 String title = m_owner->title(); |
661 if (!title.isEmpty() && !m_owner->isAlternate() && m_disabledState != En
abledViaScript) | 661 if (!title.isEmpty() && !m_owner->isAlternate() && m_disabledState != En
abledViaScript) |
662 document().styleEngine().setPreferredStylesheetSetNameIfNotSet(title
); | 662 document().styleEngine().setPreferredStylesheetSetNameIfNotSet(title
); |
663 | 663 |
664 bool mediaQueryMatches = true; | 664 bool mediaQueryMatches = true; |
665 LocalFrame* frame = loadingFrame(); | 665 LocalFrame* frame = loadingFrame(); |
666 if (!m_owner->media().isEmpty() && frame && frame->document()) { | 666 if (!m_owner->media().isEmpty() && frame) { |
667 RefPtr<ComputedStyle> documentStyle = StyleResolver::styleForDocumen
t(*frame->document()); | |
668 MediaQuerySet* media = MediaQuerySet::create(m_owner->media()); | 667 MediaQuerySet* media = MediaQuerySet::create(m_owner->media()); |
669 MediaQueryEvaluator evaluator(frame); | 668 MediaQueryEvaluator evaluator(frame); |
670 mediaQueryMatches = evaluator.eval(media); | 669 mediaQueryMatches = evaluator.eval(media); |
671 } | 670 } |
672 | 671 |
673 // Don't hold up layout tree construction and script execution on styles
heets | 672 // Don't hold up layout tree construction and script execution on styles
heets |
674 // that are not needed for the layout at the moment. | 673 // that are not needed for the layout at the moment. |
675 bool blocking = mediaQueryMatches && !m_owner->isAlternate() && m_owner-
>isCreatedByParser(); | 674 bool blocking = mediaQueryMatches && !m_owner->isAlternate() && m_owner-
>isCreatedByParser(); |
676 addPendingSheet(blocking ? Blocking : NonBlocking); | 675 addPendingSheet(blocking ? Blocking : NonBlocking); |
677 | 676 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 } | 723 } |
725 | 724 |
726 DEFINE_TRACE(LinkStyle) | 725 DEFINE_TRACE(LinkStyle) |
727 { | 726 { |
728 visitor->trace(m_sheet); | 727 visitor->trace(m_sheet); |
729 LinkResource::trace(visitor); | 728 LinkResource::trace(visitor); |
730 ResourceOwner<StyleSheetResource>::trace(visitor); | 729 ResourceOwner<StyleSheetResource>::trace(visitor); |
731 } | 730 } |
732 | 731 |
733 } // namespace blink | 732 } // namespace blink |
OLD | NEW |