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

Side by Side Diff: sky/engine/core/dom/StyleElement.cpp

Issue 723583002: Make the parser an implementation detail of the Document (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rename textPosition to parserPosition Created 6 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
« no previous file with comments | « sky/engine/core/dom/Document.cpp ('k') | sky/engine/core/html/imports/HTMLImportLoader.cpp » ('j') | 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) 2006, 2007 Rob Buis 2 * Copyright (C) 2006, 2007 Rob Buis
3 * Copyright (C) 2008 Apple, Inc. All rights reserved. 3 * Copyright (C) 2008 Apple, Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 29 matching lines...) Expand all
40 { 40 {
41 return type.isEmpty() || (element->isHTMLElement() ? equalIgnoringCase(type, "text/css") : (type == "text/css")); 41 return type.isEmpty() || (element->isHTMLElement() ? equalIgnoringCase(type, "text/css") : (type == "text/css"));
42 } 42 }
43 43
44 StyleElement::StyleElement(Document* document, bool createdByParser) 44 StyleElement::StyleElement(Document* document, bool createdByParser)
45 : m_createdByParser(createdByParser) 45 : m_createdByParser(createdByParser)
46 , m_loading(false) 46 , m_loading(false)
47 , m_registeredAsCandidate(false) 47 , m_registeredAsCandidate(false)
48 , m_startPosition(TextPosition::belowRangePosition()) 48 , m_startPosition(TextPosition::belowRangePosition())
49 { 49 {
50 if (createdByParser && document && document->scriptableDocumentParser()) 50 if (createdByParser)
51 m_startPosition = document->scriptableDocumentParser()->textPosition(); 51 m_startPosition = document->parserPosition();
52 } 52 }
53 53
54 StyleElement::~StyleElement() 54 StyleElement::~StyleElement()
55 { 55 {
56 #if !ENABLE(OILPAN) 56 #if !ENABLE(OILPAN)
57 if (m_sheet) 57 if (m_sheet)
58 clearSheet(); 58 clearSheet();
59 #endif 59 #endif
60 } 60 }
61 61
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 document.styleResolverMayHaveChanged(); 164 document.styleResolverMayHaveChanged();
165 } 165 }
166 166
167 void StyleElement::trace(Visitor* visitor) 167 void StyleElement::trace(Visitor* visitor)
168 { 168 {
169 visitor->trace(m_sheet); 169 visitor->trace(m_sheet);
170 } 170 }
171 171
172 } 172 }
OLDNEW
« no previous file with comments | « sky/engine/core/dom/Document.cpp ('k') | sky/engine/core/html/imports/HTMLImportLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698