Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(524)

Side by Side Diff: Source/core/html/HTMLLinkElement.cpp

Issue 23601011: Have StyleResolver / StyleResolverState deal with Document references, not pointers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update StyleResolverState as well Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/inspector/InspectorCSSAgent.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/inspector/InspectorCSSAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698