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

Side by Side Diff: sky/engine/core/html/parser/HTMLElementStack.h

Issue 867963006: Add the <t> element and ignore whitespace outside it. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Do it for a whole subtree. Created 5 years, 11 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) 2010 Google, Inc. All Rights Reserved. 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved.
3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 PassOwnPtr<ElementRecord> releaseNext() { return m_next.release(); } 64 PassOwnPtr<ElementRecord> releaseNext() { return m_next.release(); }
65 void setNext(PassOwnPtr<ElementRecord> next) { m_next = next; } 65 void setNext(PassOwnPtr<ElementRecord> next) { m_next = next; }
66 66
67 private: 67 private:
68 RefPtr<ContainerNode> m_node; 68 RefPtr<ContainerNode> m_node;
69 OwnPtr<ElementRecord> m_next; 69 OwnPtr<ElementRecord> m_next;
70 }; 70 };
71 71
72 unsigned stackDepth() const { return m_stackDepth; } 72 unsigned stackDepth() const { return m_stackDepth; }
73 73
74 bool preserveWhiteSpace() const { return m_preserveWhiteSpaceCount; }
75
74 // Inlining this function is a (small) performance win on the parsing 76 // Inlining this function is a (small) performance win on the parsing
75 // benchmark. 77 // benchmark.
76 Element* top() const 78 Element* top() const
77 { 79 {
78 ASSERT(m_top->element()); 80 ASSERT(m_top->element());
79 return m_top->element(); 81 return m_top->element();
80 } 82 }
81 83
82 ContainerNode* topNode() const 84 ContainerNode* topNode() const
83 { 85 {
(...skipping 16 matching lines...) Expand all
100 102
101 private: 103 private:
102 void popUntil(Element*); 104 void popUntil(Element*);
103 void pushCommon(PassRefPtr<ContainerNode>); 105 void pushCommon(PassRefPtr<ContainerNode>);
104 void popCommon(); 106 void popCommon();
105 107
106 OwnPtr<ElementRecord> m_top; 108 OwnPtr<ElementRecord> m_top;
107 109
108 ContainerNode* m_rootNode; 110 ContainerNode* m_rootNode;
109 unsigned m_stackDepth; 111 unsigned m_stackDepth;
112 unsigned m_preserveWhiteSpaceCount;
110 }; 113 };
111 114
112 } // namespace blink 115 } // namespace blink
113 116
114 #endif // SKY_ENGINE_CORE_HTML_PARSER_HTMLELEMENTSTACK_H_ 117 #endif // SKY_ENGINE_CORE_HTML_PARSER_HTMLELEMENTSTACK_H_
OLDNEW
« no previous file with comments | « sky/engine/core/html/parser/HTMLConstructionSite.cpp ('k') | sky/engine/core/html/parser/HTMLElementStack.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698