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

Side by Side Diff: Source/core/dom/StyleElement.h

Issue 516273002: Move plugin placeholder style to CSS, and allow it to bypass main world CSP. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: whitelist an explicit string Created 6 years, 3 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) 2006, 2007 Rob Buis 2 * Copyright (C) 2006, 2007 Rob Buis
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 bool sheetLoaded(Document&); 47 bool sheetLoaded(Document&);
48 void startLoadingDynamicSheet(Document&); 48 void startLoadingDynamicSheet(Document&);
49 49
50 void processStyleSheet(Document&, Element*); 50 void processStyleSheet(Document&, Element*);
51 void removedFromDocument(Document&, Element*); 51 void removedFromDocument(Document&, Element*);
52 void removedFromDocument(Document&, Element*, ContainerNode* scopingNode, Tr eeScope&); 52 void removedFromDocument(Document&, Element*, ContainerNode* scopingNode, Tr eeScope&);
53 void clearDocumentData(Document&, Element*); 53 void clearDocumentData(Document&, Element*);
54 void childrenChanged(Element*); 54 void childrenChanged(Element*);
55 void finishParsingChildren(Element*); 55 void finishParsingChildren(Element*);
56 56
57 // Authorized a particular string to be used, even if CSP does not permit
58 // inline style.
59 void whitelistSource(const String& source) { m_whitelistedSource = source; }
60
57 RefPtrWillBeMember<CSSStyleSheet> m_sheet; 61 RefPtrWillBeMember<CSSStyleSheet> m_sheet;
58 62
59 private: 63 private:
60 void createSheet(Element*, const String& text = String()); 64 void createSheet(Element*, const String& text = String());
61 void process(Element*); 65 void process(Element*);
62 void clearSheet(Element* ownerElement = 0); 66 void clearSheet(Element* ownerElement = 0);
63 67
64 bool m_createdByParser : 1; 68 bool m_createdByParser : 1;
65 bool m_loading : 1; 69 bool m_loading : 1;
66 bool m_registeredAsCandidate : 1; 70 bool m_registeredAsCandidate : 1;
67 TextPosition m_startPosition; 71 TextPosition m_startPosition;
72 String m_whitelistedSource;
68 }; 73 };
69 74
70 } 75 }
71 76
72 #endif 77 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698