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 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 if (!m_owner->shouldLoadLink()) | 577 if (!m_owner->shouldLoadLink()) |
578 return; | 578 return; |
579 | 579 |
580 m_loading = true; | 580 m_loading = true; |
581 | 581 |
582 bool mediaQueryMatches = true; | 582 bool mediaQueryMatches = true; |
583 if (!m_owner->media().isEmpty()) { | 583 if (!m_owner->media().isEmpty()) { |
584 LocalFrame* frame = loadingFrame(); | 584 LocalFrame* frame = loadingFrame(); |
585 if (Document* document = loadingFrame()->document()) { | 585 if (Document* document = loadingFrame()->document()) { |
586 RefPtr<RenderStyle> documentStyle = StyleResolver::styleForDocum
ent(*document); | 586 RefPtr<RenderStyle> documentStyle = StyleResolver::styleForDocum
ent(*document); |
587 RefPtr<MediaQuerySet> media = MediaQuerySet::create(m_owner->med
ia()); | 587 RefPtrWillBeRawPtr<MediaQuerySet> media = MediaQuerySet::create(
m_owner->media()); |
588 MediaQueryEvaluator evaluator(frame->view()->mediaType(), frame,
documentStyle.get()); | 588 MediaQueryEvaluator evaluator(frame->view()->mediaType(), frame,
documentStyle.get()); |
589 mediaQueryMatches = evaluator.eval(media.get()); | 589 mediaQueryMatches = evaluator.eval(media.get()); |
590 } | 590 } |
591 } | 591 } |
592 | 592 |
593 // Don't hold up render tree construction and script execution on styles
heets | 593 // Don't hold up render tree construction and script execution on styles
heets |
594 // that are not needed for the rendering at the moment. | 594 // that are not needed for the rendering at the moment. |
595 bool blocking = mediaQueryMatches && !m_owner->isAlternate(); | 595 bool blocking = mediaQueryMatches && !m_owner->isAlternate(); |
596 addPendingSheet(blocking ? Blocking : NonBlocking); | 596 addPendingSheet(blocking ? Blocking : NonBlocking); |
597 | 597 |
(...skipping 28 matching lines...) Expand all Loading... |
626 void LinkStyle::ownerRemoved() | 626 void LinkStyle::ownerRemoved() |
627 { | 627 { |
628 if (m_sheet) | 628 if (m_sheet) |
629 clearSheet(); | 629 clearSheet(); |
630 | 630 |
631 if (styleSheetIsLoading()) | 631 if (styleSheetIsLoading()) |
632 removePendingSheet(RemovePendingSheetNotifyLater); | 632 removePendingSheet(RemovePendingSheetNotifyLater); |
633 } | 633 } |
634 | 634 |
635 } // namespace WebCore | 635 } // namespace WebCore |
OLD | NEW |