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

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

Issue 1858753003: Remove RawPtr from core/css (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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) 2014, Google Inc. All rights reserved. 2 * Copyright (c) 2014, Google 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 CSSTestHelper::CSSTestHelper() 46 CSSTestHelper::CSSTestHelper()
47 { 47 {
48 m_document = Document::create(); 48 m_document = Document::create();
49 TextPosition position; 49 TextPosition position;
50 m_styleSheet = CSSStyleSheet::createInline(m_document.get(), KURL(), positio n, "UTF-8"); 50 m_styleSheet = CSSStyleSheet::createInline(m_document.get(), KURL(), positio n, "UTF-8");
51 } 51 }
52 52
53 CSSRuleList* CSSTestHelper::cssRules() 53 CSSRuleList* CSSTestHelper::cssRules()
54 { 54 {
55 return m_styleSheet->cssRules().get(); 55 return m_styleSheet->cssRules();
56 } 56 }
57 57
58 RuleSet& CSSTestHelper::ruleSet() 58 RuleSet& CSSTestHelper::ruleSet()
59 { 59 {
60 RuleSet& ruleSet = m_styleSheet->contents()->ensureRuleSet(MediaQueryEvaluat or(), RuleHasNoSpecialState); 60 RuleSet& ruleSet = m_styleSheet->contents()->ensureRuleSet(MediaQueryEvaluat or(), RuleHasNoSpecialState);
61 ruleSet.compactRulesIfNeeded(); 61 ruleSet.compactRulesIfNeeded();
62 return ruleSet; 62 return ruleSet;
63 } 63 }
64 64
65 void CSSTestHelper::addCSSRules(const char* cssText) 65 void CSSTestHelper::addCSSRules(const char* cssText)
66 { 66 {
67 TextPosition position; 67 TextPosition position;
68 unsigned sheetLength = m_styleSheet->length(); 68 unsigned sheetLength = m_styleSheet->length();
69 m_styleSheet->contents()->parseStringAtPosition(cssText, position); 69 m_styleSheet->contents()->parseStringAtPosition(cssText, position);
70 ASSERT_TRUE(m_styleSheet->length() > sheetLength); 70 ASSERT_TRUE(m_styleSheet->length() > sheetLength);
71 } 71 }
72 72
73 } // namespace blink 73 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSSupportsRule.h ('k') | third_party/WebKit/Source/core/css/CSSTimingFunctionValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698