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

Side by Side Diff: Source/core/html/parser/HTMLToken.h

Issue 1306413003: Make classes and structures in core/html fast-allocated. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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 | « Source/core/html/parser/HTMLSrcsetParser.h ('k') | Source/core/html/parser/HTMLTokenizer.h » ('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) 2013 Google, Inc. All Rights Reserved. 2 * Copyright (C) 2013 Google, Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 16 matching lines...) Expand all
27 #define HTMLToken_h 27 #define HTMLToken_h
28 28
29 #include "core/dom/Attribute.h" 29 #include "core/dom/Attribute.h"
30 #include "wtf/PassOwnPtr.h" 30 #include "wtf/PassOwnPtr.h"
31 #include "wtf/RefCounted.h" 31 #include "wtf/RefCounted.h"
32 #include "wtf/RefPtr.h" 32 #include "wtf/RefPtr.h"
33 33
34 namespace blink { 34 namespace blink {
35 35
36 class DoctypeData { 36 class DoctypeData {
37 WTF_MAKE_FAST_ALLOCATED(DoctypeData);
37 WTF_MAKE_NONCOPYABLE(DoctypeData); 38 WTF_MAKE_NONCOPYABLE(DoctypeData);
38 public: 39 public:
39 DoctypeData() 40 DoctypeData()
40 : m_hasPublicIdentifier(false) 41 : m_hasPublicIdentifier(false)
41 , m_hasSystemIdentifier(false) 42 , m_hasSystemIdentifier(false)
42 , m_forceQuirks(false) 43 , m_forceQuirks(false)
43 { 44 {
44 } 45 }
45 46
46 bool m_hasPublicIdentifier; 47 bool m_hasPublicIdentifier;
(...skipping 20 matching lines...) Expand all
67 Uninitialized, 68 Uninitialized,
68 DOCTYPE, 69 DOCTYPE,
69 StartTag, 70 StartTag,
70 EndTag, 71 EndTag,
71 Comment, 72 Comment,
72 Character, 73 Character,
73 EndOfFile, 74 EndOfFile,
74 }; 75 };
75 76
76 class Attribute { 77 class Attribute {
78 ALLOW_ONLY_INLINE_ALLOCATION();
77 public: 79 public:
78 class Range { 80 class Range {
81 DISALLOW_ALLOCATION();
79 public: 82 public:
80 int start; 83 int start;
81 int end; 84 int end;
82 }; 85 };
83 86
84 Range nameRange; 87 Range nameRange;
85 Range valueRange; 88 Range valueRange;
86 Vector<UChar, 32> name; 89 Vector<UChar, 32> name;
87 Vector<UChar, 32> value; 90 Vector<UChar, 32> value;
88 }; 91 };
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 // A pointer into m_attributes used during lexing. 452 // A pointer into m_attributes used during lexing.
450 Attribute* m_currentAttribute; 453 Attribute* m_currentAttribute;
451 454
452 // For DOCTYPE 455 // For DOCTYPE
453 OwnPtr<DoctypeData> m_doctypeData; 456 OwnPtr<DoctypeData> m_doctypeData;
454 }; 457 };
455 458
456 } 459 }
457 460
458 #endif 461 #endif
OLDNEW
« no previous file with comments | « Source/core/html/parser/HTMLSrcsetParser.h ('k') | Source/core/html/parser/HTMLTokenizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698