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

Side by Side Diff: Source/core/css/CSSDefaultStyleSheets.cpp

Issue 25856002: @page rule missing from simpleUserAgentStyleSheet. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 7 years, 2 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
« no previous file with comments | « no previous file | no next file » | 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) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r ights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r ights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 RuleSet* CSSDefaultStyleSheets::defaultXHTMLMobileProfileStyle; 50 RuleSet* CSSDefaultStyleSheets::defaultXHTMLMobileProfileStyle;
51 51
52 StyleSheetContents* CSSDefaultStyleSheets::simpleDefaultStyleSheet; 52 StyleSheetContents* CSSDefaultStyleSheets::simpleDefaultStyleSheet;
53 StyleSheetContents* CSSDefaultStyleSheets::defaultStyleSheet; 53 StyleSheetContents* CSSDefaultStyleSheets::defaultStyleSheet;
54 StyleSheetContents* CSSDefaultStyleSheets::quirksStyleSheet; 54 StyleSheetContents* CSSDefaultStyleSheets::quirksStyleSheet;
55 StyleSheetContents* CSSDefaultStyleSheets::svgStyleSheet; 55 StyleSheetContents* CSSDefaultStyleSheets::svgStyleSheet;
56 StyleSheetContents* CSSDefaultStyleSheets::mediaControlsStyleSheet; 56 StyleSheetContents* CSSDefaultStyleSheets::mediaControlsStyleSheet;
57 StyleSheetContents* CSSDefaultStyleSheets::fullscreenStyleSheet; 57 StyleSheetContents* CSSDefaultStyleSheets::fullscreenStyleSheet;
58 58
59 // FIXME: It would be nice to use some mechanism that guarantees this is in sync with the real UA stylesheet. 59 // FIXME: It would be nice to use some mechanism that guarantees this is in sync with the real UA stylesheet.
60 static const char* simpleUserAgentStyleSheet = "html,body,div{display:block}head {display:none}body{margin:8px}div:focus,span:focus,a:focus{outline:auto 5px -web kit-focus-ring-color}a:-webkit-any-link{color:-webkit-link;text-decoration:under line}a:-webkit-any-link:active{color:-webkit-activelink}body:-webkit-seamless-do cument{margin:0}body:-webkit-full-page-media{background-color:black}@viewport{mi n-width:980px}"; 60 static const char* simpleUserAgentStyleSheet = "html,body,div{display:block}head {display:none}body{margin:8px}div:focus,span:focus,a:focus{outline:auto 5px -web kit-focus-ring-color}a:-webkit-any-link{color:-webkit-link;text-decoration:under line}a:-webkit-any-link:active{color:-webkit-activelink}body:-webkit-seamless-do cument{margin:0}body:-webkit-full-page-media{background-color:black}@viewport{mi n-width:980px}@page{size:auto;margin:auto;padding:0;border-width:0}";
61 61
62 static inline bool elementCanUseSimpleDefaultStyle(Element* e) 62 static inline bool elementCanUseSimpleDefaultStyle(Element* e)
63 { 63 {
64 return isHTMLHtmlElement(e) || e->hasTagName(headTag) || e->hasTagName(bodyT ag) || e->hasTagName(divTag) || e->hasTagName(spanTag) || e->hasTagName(brTag) | | isHTMLAnchorElement(e); 64 return isHTMLHtmlElement(e) || e->hasTagName(headTag) || e->hasTagName(bodyT ag) || e->hasTagName(divTag) || e->hasTagName(spanTag) || e->hasTagName(brTag) | | isHTMLAnchorElement(e);
65 } 65 }
66 66
67 static const MediaQueryEvaluator& screenEval() 67 static const MediaQueryEvaluator& screenEval()
68 { 68 {
69 DEFINE_STATIC_LOCAL(const MediaQueryEvaluator, staticScreenEval, ("screen")) ; 69 DEFINE_STATIC_LOCAL(const MediaQueryEvaluator, staticScreenEval, ("screen")) ;
70 return staticScreenEval; 70 return staticScreenEval;
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 defaultStyle->addRulesFromSheet(fullscreenStyleSheet, screenEval()); 193 defaultStyle->addRulesFromSheet(fullscreenStyleSheet, screenEval());
194 defaultQuirksStyle->addRulesFromSheet(fullscreenStyleSheet, screenEval() ); 194 defaultQuirksStyle->addRulesFromSheet(fullscreenStyleSheet, screenEval() );
195 changedDefaultStyle = true; 195 changedDefaultStyle = true;
196 } 196 }
197 197
198 ASSERT(defaultStyle->features().idsInRules.isEmpty()); 198 ASSERT(defaultStyle->features().idsInRules.isEmpty());
199 ASSERT(defaultStyle->features().siblingRules.isEmpty()); 199 ASSERT(defaultStyle->features().siblingRules.isEmpty());
200 } 200 }
201 201
202 } // namespace WebCore 202 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698