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

Side by Side Diff: third_party/WebKit/Source/core/css/StyleMedia.cpp

Issue 2755493004: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in core/css/ (Closed)
Patch Set: All windows error are Resolved now. Created 3 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 30 matching lines...) Expand all
41 return view->mediaType(); 41 return view->mediaType();
42 42
43 return nullAtom; 43 return nullAtom;
44 } 44 }
45 45
46 bool StyleMedia::matchMedium(const String& query) const { 46 bool StyleMedia::matchMedium(const String& query) const {
47 if (!frame()) 47 if (!frame())
48 return false; 48 return false;
49 49
50 Document* document = frame()->document(); 50 Document* document = frame()->document();
51 ASSERT(document); 51 DCHECK(document);
52 Element* documentElement = document->documentElement(); 52 Element* documentElement = document->documentElement();
53 if (!documentElement) 53 if (!documentElement)
54 return false; 54 return false;
55 55
56 MediaQuerySet* media = MediaQuerySet::create(); 56 MediaQuerySet* media = MediaQuerySet::create();
57 if (!media->set(query)) 57 if (!media->set(query))
58 return false; 58 return false;
59 59
60 MediaQueryEvaluator screenEval(frame()); 60 MediaQueryEvaluator screenEval(frame());
61 return screenEval.eval(media); 61 return screenEval.eval(media);
62 } 62 }
63 63
64 DEFINE_TRACE(StyleMedia) { 64 DEFINE_TRACE(StyleMedia) {
65 ContextClient::trace(visitor); 65 ContextClient::trace(visitor);
66 } 66 }
67 67
68 } // namespace blink 68 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/StyleColor.h ('k') | third_party/WebKit/Source/core/css/StylePropertySet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698