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

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

Issue 1115353002: Update renderer to layoutObject in core/html. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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/html/HTMLLIElement.cpp ('k') | Source/core/html/HTMLMeterElement.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 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 725
726 bool mediaQueryMatches = true; 726 bool mediaQueryMatches = true;
727 LocalFrame* frame = loadingFrame(); 727 LocalFrame* frame = loadingFrame();
728 if (!m_owner->media().isEmpty() && frame && frame->document()) { 728 if (!m_owner->media().isEmpty() && frame && frame->document()) {
729 RefPtr<ComputedStyle> documentStyle = StyleResolver::styleForDocumen t(*frame->document()); 729 RefPtr<ComputedStyle> documentStyle = StyleResolver::styleForDocumen t(*frame->document());
730 RefPtrWillBeRawPtr<MediaQuerySet> media = MediaQuerySet::create(m_ow ner->media()); 730 RefPtrWillBeRawPtr<MediaQuerySet> media = MediaQuerySet::create(m_ow ner->media());
731 MediaQueryEvaluator evaluator(frame); 731 MediaQueryEvaluator evaluator(frame);
732 mediaQueryMatches = evaluator.eval(media.get()); 732 mediaQueryMatches = evaluator.eval(media.get());
733 } 733 }
734 734
735 // Don't hold up render tree construction and script execution on styles heets 735 // Don't hold up layout tree construction and script execution on styles heets
736 // that are not needed for the rendering at the moment. 736 // that are not needed for the layout at the moment.
737 bool blocking = mediaQueryMatches && !m_owner->isAlternate(); 737 bool blocking = mediaQueryMatches && !m_owner->isAlternate();
738 addPendingSheet(blocking ? Blocking : NonBlocking); 738 addPendingSheet(blocking ? Blocking : NonBlocking);
739 739
740 // Load stylesheets that are not needed for the rendering immediately wi th low priority. 740 // Load stylesheets that are not needed for the layout immediately with low priority.
741 FetchRequest request = builder.build(blocking); 741 FetchRequest request = builder.build(blocking);
742 AtomicString crossOriginMode = m_owner->fastGetAttribute(HTMLNames::cros soriginAttr); 742 AtomicString crossOriginMode = m_owner->fastGetAttribute(HTMLNames::cros soriginAttr);
743 if (!crossOriginMode.isNull()) { 743 if (!crossOriginMode.isNull()) {
744 request.setCrossOriginAccessControl(document().securityOrigin(), cro ssOriginMode); 744 request.setCrossOriginAccessControl(document().securityOrigin(), cro ssOriginMode);
745 setFetchFollowingCORS(); 745 setFetchFollowingCORS();
746 } 746 }
747 setResource(document().fetcher()->fetchCSSStyleSheet(request)); 747 setResource(document().fetcher()->fetchCSSStyleSheet(request));
748 748
749 if (!resource()) { 749 if (!resource()) {
750 // The request may have been denied if (for example) the stylesheet is local and the document is remote, or if there was a Content Security Policy F ailure. 750 // The request may have been denied if (for example) the stylesheet is local and the document is remote, or if there was a Content Security Policy F ailure.
(...skipping 24 matching lines...) Expand all
775 removePendingSheet(); 775 removePendingSheet();
776 } 776 }
777 777
778 DEFINE_TRACE(LinkStyle) 778 DEFINE_TRACE(LinkStyle)
779 { 779 {
780 visitor->trace(m_sheet); 780 visitor->trace(m_sheet);
781 LinkResource::trace(visitor); 781 LinkResource::trace(visitor);
782 } 782 }
783 783
784 } // namespace blink 784 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/HTMLLIElement.cpp ('k') | Source/core/html/HTMLMeterElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698