| 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 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 removePendingSheet(); | 654 removePendingSheet(); |
| 655 clearResource(); | 655 clearResource(); |
| 656 clearFetchFollowingCORS(); | 656 clearFetchFollowingCORS(); |
| 657 } | 657 } |
| 658 | 658 |
| 659 if (!m_owner->shouldLoadLink()) | 659 if (!m_owner->shouldLoadLink()) |
| 660 return; | 660 return; |
| 661 | 661 |
| 662 m_loading = true; | 662 m_loading = true; |
| 663 | 663 |
| 664 String title = m_owner->title(); |
| 665 if (!title.isEmpty() && !m_owner->isAlternate() && m_disabledState != En
abledViaScript) |
| 666 document().styleEngine().setPreferredStylesheetSetNameIfNotSet(title
); |
| 667 |
| 664 bool mediaQueryMatches = true; | 668 bool mediaQueryMatches = true; |
| 665 LocalFrame* frame = loadingFrame(); | 669 LocalFrame* frame = loadingFrame(); |
| 666 if (!m_owner->media().isEmpty() && frame && frame->document()) { | 670 if (!m_owner->media().isEmpty() && frame && frame->document()) { |
| 667 RefPtr<ComputedStyle> documentStyle = StyleResolver::styleForDocumen
t(*frame->document()); | 671 RefPtr<ComputedStyle> documentStyle = StyleResolver::styleForDocumen
t(*frame->document()); |
| 668 MediaQuerySet* media = MediaQuerySet::create(m_owner->media()); | 672 MediaQuerySet* media = MediaQuerySet::create(m_owner->media()); |
| 669 MediaQueryEvaluator evaluator(frame); | 673 MediaQueryEvaluator evaluator(frame); |
| 670 mediaQueryMatches = evaluator.eval(media); | 674 mediaQueryMatches = evaluator.eval(media); |
| 671 } | 675 } |
| 672 | 676 |
| 673 // Don't hold up layout tree construction and script execution on styles
heets | 677 // Don't hold up layout tree construction and script execution on styles
heets |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 } | 722 } |
| 719 | 723 |
| 720 DEFINE_TRACE(LinkStyle) | 724 DEFINE_TRACE(LinkStyle) |
| 721 { | 725 { |
| 722 visitor->trace(m_sheet); | 726 visitor->trace(m_sheet); |
| 723 LinkResource::trace(visitor); | 727 LinkResource::trace(visitor); |
| 724 ResourceOwner<StyleSheetResource>::trace(visitor); | 728 ResourceOwner<StyleSheetResource>::trace(visitor); |
| 725 } | 729 } |
| 726 | 730 |
| 727 } // namespace blink | 731 } // namespace blink |
| OLD | NEW |