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

Side by Side Diff: Source/core/css/CSSParser-in.cpp

Issue 66483002: fontSelector should be reset when removing stylesheets which has @font-face rule. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing Created 7 years, 1 month 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) 2003 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. 8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
9 * Copyright (C) 2012 Intel Corporation. All rights reserved. 9 * Copyright (C) 2012 Intel Corporation. All rights reserved.
10 * 10 *
(...skipping 11226 matching lines...) Expand 10 before | Expand all | Expand 10 after
11237 endRuleBody(true); 11237 endRuleBody(true);
11238 return 0; 11238 return 0;
11239 } 11239 }
11240 } 11240 }
11241 RefPtr<StyleRuleFontFace> rule = StyleRuleFontFace::create(); 11241 RefPtr<StyleRuleFontFace> rule = StyleRuleFontFace::create();
11242 rule->setProperties(createStylePropertySet()); 11242 rule->setProperties(createStylePropertySet());
11243 clearProperties(); 11243 clearProperties();
11244 StyleRuleFontFace* result = rule.get(); 11244 StyleRuleFontFace* result = rule.get();
11245 m_parsedRules.append(rule.release()); 11245 m_parsedRules.append(rule.release());
11246 endRuleBody(); 11246 endRuleBody();
11247 if (m_styleSheet)
11248 m_styleSheet->setHasFontFaceRule(true);
11247 return result; 11249 return result;
11248 } 11250 }
11249 11251
11250 StyleRuleBase* CSSParser::createHostRule(RuleList* rules) 11252 StyleRuleBase* CSSParser::createHostRule(RuleList* rules)
11251 { 11253 {
11252 m_allowImportRules = m_allowNamespaceDeclarations = false; 11254 m_allowImportRules = m_allowNamespaceDeclarations = false;
11253 RefPtr<StyleRuleHost> rule; 11255 RefPtr<StyleRuleHost> rule;
11254 if (rules) 11256 if (rules)
11255 rule = StyleRuleHost::create(*rules); 11257 rule = StyleRuleHost::create(*rules);
11256 else { 11258 else {
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
11918 { 11920 {
11919 // The tokenizer checks for the construct of an+b. 11921 // The tokenizer checks for the construct of an+b.
11920 // However, since the {ident} rule precedes the {nth} rule, some of those 11922 // However, since the {ident} rule precedes the {nth} rule, some of those
11921 // tokens are identified as string literal. Furthermore we need to accept 11923 // tokens are identified as string literal. Furthermore we need to accept
11922 // "odd" and "even" which does not match to an+b. 11924 // "odd" and "even" which does not match to an+b.
11923 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") 11925 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even")
11924 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); 11926 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n");
11925 } 11927 }
11926 11928
11927 } 11929 }
OLDNEW
« no previous file with comments | « LayoutTests/fast/css/remove-style-after-remove-font-face-expected.html ('k') | Source/core/css/StyleSheetContents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698