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

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

Issue 170283019: Change various helper classes to transition types to get CSSValue entirely onto the gc heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase and revert member to persistent in StorageEvent Created 6 years, 9 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
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 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698