Commit 6c0ffe6c authored by tasak@google.com's avatar tasak@google.com

Make classes and structures in core/html fast-allocated.

Added STATIC_ONLY, STACK_ALLOCATED, DISALLOW_ALLOCATION, or ALLOW_ONLY_INLINE_ALLOCATION
instead of WTF_MAKE_FAST_ALLOCATED(_WILL_BE_REMOVED) if possible.

BUG=523249

Review URL: https://codereview.chromium.org/1306413003

git-svn-id: svn://svn.chromium.org/blink/trunk@201204 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 977eedd6
......@@ -39,6 +39,7 @@
namespace blink {
class HTMLContentSelectFilter : public NoBaseWillBeGarbageCollectedFinalized<HTMLContentSelectFilter> {
WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(HTMLContentSelectFilter);
public:
virtual ~HTMLContentSelectFilter() { }
virtual bool canSelectNode(const WillBeHeapVector<RawPtrWillBeMember<Node>, 32>& siblings, int nth) const = 0;
......
......@@ -32,6 +32,7 @@
#define HTMLDimension_h
#include "core/CoreExport.h"
#include "wtf/Allocator.h"
#include "wtf/Forward.h"
#include "wtf/Vector.h"
......@@ -40,6 +41,7 @@ namespace blink {
// This class corresponds to a dimension as described in HTML5 by the
// "rules for parsing a list of dimensions" (section 2.4.4.6).
class HTMLDimension {
ALLOW_ONLY_INLINE_ALLOCATION();
public:
enum HTMLDimensionType {
Relative, Percentage, Absolute
......
......@@ -159,6 +159,7 @@ inline bool Node::hasTagName(const HTMLQualifiedName& name) const
// Functor used to match HTMLElements with a specific HTML tag when using the ElementTraversal API.
class HasHTMLTagName {
STACK_ALLOCATED();
public:
explicit HasHTMLTagName(const HTMLQualifiedName& tagName): m_tagName(tagName) { }
bool operator() (const HTMLElement& element) const { return element.hasTagName(m_tagName); }
......
......@@ -67,6 +67,7 @@ public:
Widget* ownedWidget() const;
class UpdateSuspendScope {
STACK_ALLOCATED();
public:
UpdateSuspendScope();
~UpdateSuspendScope();
......
......@@ -5,6 +5,7 @@
#ifndef HTMLImageFallbackHelper_h
#define HTMLImageFallbackHelper_h
#include "wtf/Allocator.h"
#include "wtf/PassRefPtr.h"
namespace blink {
......@@ -13,6 +14,7 @@ class Element;
class ComputedStyle;
class HTMLImageFallbackHelper {
STATIC_ONLY(HTMLImageFallbackHelper);
public:
static void createAltTextShadowTree(Element&);
static PassRefPtr<ComputedStyle> customStyleForAltText(Element&, PassRefPtr<ComputedStyle> newStyle);
......
......@@ -34,11 +34,13 @@
#include "core/CoreExport.h"
#include "core/dom/IconURL.h"
#include "wtf/Allocator.h"
#include "wtf/text/WTFString.h"
namespace blink {
class CORE_EXPORT LinkRelAttribute {
DISALLOW_ALLOCATION();
public:
explicit LinkRelAttribute(const String& = "");
......
......@@ -27,6 +27,7 @@
#define MediaFragmentURIParser_h
#include "platform/weborigin/KURL.h"
#include "wtf/Allocator.h"
#include "wtf/Vector.h"
namespace blink {
......@@ -34,6 +35,7 @@ namespace blink {
class KURL;
class MediaFragmentURIParser final {
STACK_ALLOCATED();
public:
MediaFragmentURIParser(const KURL&);
......
......@@ -30,6 +30,7 @@
#include "core/CoreExport.h"
#include "platform/heap/Handle.h"
#include "public/platform/WebTimeRange.h"
#include "wtf/Allocator.h"
#include "wtf/Vector.h"
#include <algorithm>
......@@ -43,6 +44,7 @@ class CORE_EXPORT TimeRanges : public GarbageCollectedFinalized<TimeRanges>, pub
public:
// We consider all the Ranges to be semi-bounded as follow: [start, end[
struct Range {
ALLOW_ONLY_INLINE_ALLOCATION();
public:
Range() { }
Range(double start, double end)
......
......@@ -9,6 +9,7 @@
#include "core/dom/Document.h"
#include "core/html/canvas/CanvasContextCreationAttributes.h"
#include "core/html/canvas/CanvasRenderingContext.h"
#include "wtf/Allocator.h"
#include "wtf/PassRefPtr.h"
namespace blink {
......@@ -16,7 +17,10 @@ namespace blink {
class HTMLCanvasElement;
class CORE_EXPORT CanvasRenderingContextFactory {
WTF_MAKE_FAST_ALLOCATED(CanvasRenderingContextFactory);
WTF_MAKE_NONCOPYABLE(CanvasRenderingContextFactory);
public:
CanvasRenderingContextFactory() = default;
virtual ~CanvasRenderingContextFactory() { }
virtual PassOwnPtrWillBeRawPtr<CanvasRenderingContext> create(HTMLCanvasElement*, const CanvasContextCreationAttributes&, Document&) = 0;
......
......@@ -33,6 +33,7 @@
#include "core/CoreExport.h"
#include "platform/geometry/IntRect.h"
#include "wtf/Allocator.h"
#include "wtf/RefCounted.h"
#include "wtf/text/WTFString.h"
......@@ -41,12 +42,14 @@ namespace blink {
class AXObject;
struct DateTimeSuggestion {
ALLOW_ONLY_INLINE_ALLOCATION();
double value;
String localizedValue;
String label;
};
struct DateTimeChooserParameters {
DISALLOW_ALLOCATION();
AtomicString type;
IntRect anchorRectInRootFrame;
IntRect anchorRectInScreen;
......
......@@ -28,6 +28,8 @@
#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
#include "wtf/Allocator.h"
namespace blink {
class FormControlState;
......@@ -39,6 +41,7 @@ class FormControlState;
// Each field can contain invalid value for date, e.g. day of month field can
// be 30 even if month field is February.
class DateTimeFieldsState {
STACK_ALLOCATED();
public:
enum AMPMValue {
AMPMValueEmpty = -1,
......
......@@ -24,6 +24,7 @@
#include "core/html/forms/RadioButtonGroupScope.h"
#include "platform/heap/Handle.h"
#include "wtf/Allocator.h"
#include "wtf/Forward.h"
#include "wtf/ListHashSet.h"
#include "wtf/Vector.h"
......@@ -37,6 +38,7 @@ class HTMLFormElement;
class SavedFormState;
class FormControlState {
ALLOW_ONLY_INLINE_ALLOCATION();
public:
FormControlState() : m_type(TypeSkip) { }
explicit FormControlState(const String& value) : m_type(TypeRestore) { m_values.append(value); }
......
......@@ -22,6 +22,7 @@
#define StepRange_h
#include "platform/Decimal.h"
#include "wtf/Allocator.h"
#include "wtf/Forward.h"
namespace blink {
......@@ -29,6 +30,7 @@ namespace blink {
enum AnyStepHandling { RejectAny, AnyIsDefaultStep };
class StepRange {
DISALLOW_ALLOCATION();
public:
enum StepValueShouldBe {
StepValueShouldBeReal,
......@@ -101,7 +103,7 @@ public:
}
private:
StepRange& operator =(const StepRange&);
StepRange& operator=(const StepRange&) = delete;
Decimal acceptableError() const;
Decimal roundByStep(const Decimal& value, const Decimal& base) const;
......
......@@ -28,6 +28,7 @@
#include "core/CoreExport.h"
#include "core/dom/DOMTimeStamp.h"
#include "wtf/Allocator.h"
#include "wtf/text/StringBuilder.h"
#include "wtf/text/WTFString.h"
......@@ -45,6 +46,7 @@ public:
};
class TypeAhead {
DISALLOW_ALLOCATION();
public:
TypeAhead(TypeAheadDataSource*);
......
......@@ -33,6 +33,7 @@
#include "core/html/imports/HTMLImportState.h"
#include "platform/heap/Handle.h"
#include "wtf/Allocator.h"
#include "wtf/TreeNode.h"
namespace blink {
......@@ -91,6 +92,7 @@ class HTMLImportLoader;
// The superclass of HTMLImportTreeRoot and HTMLImportChild
// This represents the import tree data structure.
class HTMLImport : public NoBaseWillBeGarbageCollectedFinalized<HTMLImport>, public TreeNode<HTMLImport> {
WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(HTMLImport);
public:
enum SyncMode {
Sync = 0,
......
......@@ -56,6 +56,7 @@ class HTMLImportsController;
//
class HTMLImportLoader final : public NoBaseWillBeGarbageCollectedFinalized<HTMLImportLoader>, public ResourceOwner<RawResource>, public DocumentParserClient {
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLImportLoader);
WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(HTMLImportLoader);
public:
enum State {
StateLoading,
......
......@@ -31,11 +31,13 @@
#ifndef HTMLImportState_h
#define HTMLImportState_h
#include "wtf/Allocator.h"
#include "wtf/Assertions.h"
namespace blink {
class HTMLImportState {
DISALLOW_ALLOCATION();
public:
enum Value {
BlockingScriptExecution = 0,
......
......@@ -30,12 +30,14 @@
#include "core/dom/Attribute.h"
#include "core/html/parser/CompactHTMLToken.h"
#include "core/html/parser/HTMLToken.h"
#include "wtf/Allocator.h"
#include "wtf/RefCounted.h"
#include "wtf/RefPtr.h"
namespace blink {
class AtomicHTMLToken {
STACK_ALLOCATED();
WTF_MAKE_NONCOPYABLE(AtomicHTMLToken);
public:
......
......@@ -27,6 +27,7 @@
#define BackgroundHTMLInputStream_h
#include "platform/text/SegmentedString.h"
#include "wtf/Allocator.h"
#include "wtf/Vector.h"
#include "wtf/text/WTFString.h"
......@@ -35,6 +36,7 @@ namespace blink {
typedef size_t HTMLInputCheckpoint;
class BackgroundHTMLInputStream {
DISALLOW_ALLOCATION();
WTF_MAKE_NONCOPYABLE(BackgroundHTMLInputStream);
public:
BackgroundHTMLInputStream();
......
......@@ -46,8 +46,11 @@ class WebScheduler;
class BackgroundHTMLParser {
WTF_MAKE_FAST_ALLOCATED(BackgroundHTMLParser);
WTF_MAKE_NONCOPYABLE(BackgroundHTMLParser);
public:
struct Configuration {
WTF_MAKE_FAST_ALLOCATED(Configuration);
public:
Configuration();
HTMLParserOptions options;
WeakPtr<HTMLDocumentParser> parser;
......@@ -63,6 +66,8 @@ public:
static void start(PassRefPtr<WeakReference<BackgroundHTMLParser>>, PassOwnPtr<Configuration>, WebScheduler*);
struct Checkpoint {
WTF_MAKE_FAST_ALLOCATED(CheckPoint);
public:
WeakPtr<HTMLDocumentParser> parser;
OwnPtr<HTMLToken> token;
OwnPtr<HTMLTokenizer> tokenizer;
......
......@@ -36,6 +36,7 @@ namespace blink {
class SegmentedString;
class CSSPreloadScanner {
DISALLOW_ALLOCATION();
WTF_MAKE_NONCOPYABLE(CSSPreloadScanner);
public:
CSSPreloadScanner();
......
......@@ -27,6 +27,7 @@
#define CompactHTMLToken_h
#include "core/html/parser/HTMLToken.h"
#include "wtf/Allocator.h"
#include "wtf/Vector.h"
#include "wtf/text/TextPosition.h"
#include "wtf/text/WTFString.h"
......@@ -36,8 +37,10 @@ namespace blink {
class QualifiedName;
class CompactHTMLToken {
ALLOW_ONLY_INLINE_ALLOCATION();
public:
struct Attribute {
ALLOW_ONLY_INLINE_ALLOCATION();
Attribute(const String& name, const String& value)
: name(name)
, value(value)
......
......@@ -202,6 +202,7 @@ public:
ParserContentPolicy parserContentPolicy() { return m_parserContentPolicy; }
class RedirectToFosterParentGuard {
STACK_ALLOCATED();
WTF_MAKE_NONCOPYABLE(RedirectToFosterParentGuard);
public:
RedirectToFosterParentGuard(HTMLConstructionSite& tree)
......
......@@ -92,6 +92,8 @@ public:
void resumeScheduledTasks() final;
struct ParsedChunk {
WTF_MAKE_FAST_ALLOCATED(ParsedChunk);
public:
OwnPtr<CompactHTMLTokenStream> tokens;
PreloadRequestStream preloads;
XSSInfoStream xssInfos;
......
......@@ -28,10 +28,12 @@
#define HTMLEntityParser_h
#include "platform/text/SegmentedString.h"
#include "wtf/Allocator.h"
namespace blink {
class DecodedHTMLEntity {
STACK_ALLOCATED();
private:
// HTML entities contain at most four UTF-16 code units.
static const unsigned kMaxLength = 4;
......
......@@ -26,6 +26,7 @@
#ifndef HTMLEntitySearch_h
#define HTMLEntitySearch_h
#include "wtf/Allocator.h"
#include "wtf/text/WTFString.h"
namespace blink {
......@@ -33,6 +34,7 @@ namespace blink {
struct HTMLEntityTableEntry;
class HTMLEntitySearch {
STACK_ALLOCATED();
public:
HTMLEntitySearch();
......
......@@ -26,12 +26,14 @@
#ifndef HTMLEntityTable_h
#define HTMLEntityTable_h
#include "wtf/Allocator.h"
#include "wtf/text/WTFString.h"
namespace blink {
// Member order to optimize packing. There will be thousands of these objects.
struct HTMLEntityTableEntry {
DISALLOW_ALLOCATION();
LChar lastCharacter() const;
UChar32 firstValue;
......@@ -41,6 +43,7 @@ struct HTMLEntityTableEntry {
};
class HTMLEntityTable {
STATIC_ONLY(HTMLEntityTable);
public:
static const HTMLEntityTableEntry* firstEntry();
static const HTMLEntityTableEntry* lastEntry();
......
......@@ -84,6 +84,7 @@ public:
};
class Bookmark {
STACK_ALLOCATED();
public:
explicit Bookmark(Entry* entry)
: m_hasBeenMoved(false)
......
......@@ -28,6 +28,7 @@
#include "core/html/parser/InputStreamPreprocessor.h"
#include "platform/text/SegmentedString.h"
#include "wtf/Allocator.h"
namespace blink {
......@@ -49,6 +50,7 @@ namespace blink {
// The network adds data at the end of the InputStream, which appends
// them to the "last" string.
class HTMLInputStream {
DISALLOW_ALLOCATION();
WTF_MAKE_NONCOPYABLE(HTMLInputStream);
public:
HTMLInputStream()
......@@ -124,6 +126,7 @@ private:
};
class InsertionPointRecord {
STACK_ALLOCATED();
WTF_MAKE_NONCOPYABLE(InsertionPointRecord);
public:
explicit InsertionPointRecord(HTMLInputStream& inputStream)
......
......@@ -27,12 +27,14 @@
#define HTMLParserOptions_h
#include "core/CoreExport.h"
#include "wtf/Allocator.h"
namespace blink {
class Document;
class CORE_EXPORT HTMLParserOptions {
DISALLOW_ALLOCATION();
public:
bool scriptEnabled;
bool pluginsEnabled;
......
......@@ -28,6 +28,7 @@
#include "core/html/parser/NestingLevelIncrementer.h"
#include "platform/scheduler/CancellableTaskFactory.h"
#include "wtf/Allocator.h"
#include "wtf/PassOwnPtr.h"
#include "wtf/RefPtr.h"
......@@ -54,6 +55,7 @@ public:
};
class SpeculationsPumpSession : public ActiveParserSession {
STACK_ALLOCATED();
public:
SpeculationsPumpSession(unsigned& nestingLevel, Document*);
~SpeculationsPumpSession();
......
......@@ -33,6 +33,7 @@
#include "core/CoreExport.h"
#include "platform/WebThreadSupportingGC.h"
#include "wtf/Allocator.h"
#include "wtf/Functional.h"
#include "wtf/OwnPtr.h"
#include "wtf/PassOwnPtr.h"
......@@ -40,6 +41,7 @@
namespace blink {
class CORE_EXPORT HTMLParserThread {
WTF_MAKE_FAST_ALLOCATED(HTMLParserThread);
public:
static void init();
static void shutdown();
......
......@@ -46,6 +46,8 @@ class HTMLTokenizer;
class SegmentedString;
struct CORE_EXPORT CachedDocumentParameters {
WTF_MAKE_FAST_ALLOCATED(CachedDocumentParameters);
public:
static PassOwnPtr<CachedDocumentParameters> create(Document* document, PassRefPtrWillBeRawPtr<MediaValues> mediaValues = nullptr)
{
return adoptPtr(new CachedDocumentParameters(document, mediaValues));
......
......@@ -28,12 +28,14 @@
#include "core/html/parser/HTMLToken.h"
#include "platform/text/SegmentedString.h"
#include "wtf/Allocator.h"
namespace blink {
class HTMLTokenizer;
class HTMLSourceTracker {
DISALLOW_ALLOCATION();
WTF_MAKE_NONCOPYABLE(HTMLSourceTracker);
public:
HTMLSourceTracker();
......
......@@ -33,6 +33,7 @@
#define HTMLSrcsetParser_h
#include "core/CoreExport.h"
#include "wtf/Allocator.h"
#include "wtf/text/WTFString.h"
namespace blink {
......@@ -42,6 +43,7 @@ class Document;
enum { UninitializedDescriptor = -1 };
class DescriptorParsingResult {
STACK_ALLOCATED();
public:
DescriptorParsingResult()
: m_density(UninitializedDescriptor)
......@@ -69,6 +71,7 @@ private:
};
class ImageCandidate {
ALLOW_ONLY_INLINE_ALLOCATION();
public:
enum OriginAttribute {
SrcsetOrigin,
......
......@@ -34,6 +34,7 @@
namespace blink {
class DoctypeData {
WTF_MAKE_FAST_ALLOCATED(DoctypeData);
WTF_MAKE_NONCOPYABLE(DoctypeData);
public:
DoctypeData()
......@@ -74,8 +75,10 @@ public:
};
class Attribute {
ALLOW_ONLY_INLINE_ALLOCATION();
public:
class Range {
DISALLOW_ALLOCATION();
public:
int start;
int end;
......
......@@ -122,6 +122,7 @@ public:
};
struct Checkpoint {
STACK_ALLOCATED();
HTMLParserOptions options;
State state;
UChar additionalAllowedCharacter;
......
......@@ -29,6 +29,7 @@
#define InputStreamPreprocessor_h
#include "platform/text/SegmentedString.h"
#include "wtf/Allocator.h"
#include "wtf/Noncopyable.h"
namespace blink {
......@@ -38,6 +39,7 @@ const LChar kEndOfFileMarker = 0;
// http://www.whatwg.org/specs/web-apps/current-work/#preprocessing-the-input-stream
template <typename Tokenizer>
class InputStreamPreprocessor {
DISALLOW_ALLOCATION();
WTF_MAKE_NONCOPYABLE(InputStreamPreprocessor);
public:
InputStreamPreprocessor(Tokenizer* tokenizer)
......
......@@ -9,6 +9,7 @@
#include "core/fetch/FetchRequest.h"
#include "core/fetch/Resource.h"
#include "platform/weborigin/SecurityPolicy.h"
#include "wtf/Allocator.h"
#include "wtf/text/TextPosition.h"
namespace blink {
......@@ -16,6 +17,7 @@ namespace blink {
class Document;
class PreloadRequest {
WTF_MAKE_FAST_ALLOCATED(PreloadRequest);
public:
enum RequestType { RequestTypePreload, RequestTypePreconnect };
......
......@@ -32,6 +32,8 @@ namespace blink {
class HTMLMetaCharsetParser;
class CORE_EXPORT TextResourceDecoder {
WTF_MAKE_FAST_ALLOCATED(TextResourceDecoder);
WTF_MAKE_NONCOPYABLE(TextResourceDecoder);
public:
enum EncodingSource {
DefaultEncoding,
......
......@@ -30,6 +30,7 @@
#include "platform/network/HTTPParsers.h"
#include "platform/text/SuffixTree.h"
#include "platform/weborigin/KURL.h"
#include "wtf/Allocator.h"
#include "wtf/PassOwnPtr.h"
#include "wtf/text/TextEncoding.h"
......@@ -41,6 +42,7 @@ class XSSInfo;
class XSSAuditorDelegate;
struct FilterTokenRequest {
STACK_ALLOCATED();
FilterTokenRequest(HTMLToken& token, HTMLSourceTracker& sourceTracker, bool shouldAllowCDATA)
: token(token)
, sourceTracker(sourceTracker)
......@@ -53,6 +55,7 @@ struct FilterTokenRequest {
};
class XSSAuditor {
WTF_MAKE_FAST_ALLOCATED(XSSAuditor);
WTF_MAKE_NONCOPYABLE(XSSAuditor);
public:
XSSAuditor();
......
......@@ -40,6 +40,8 @@ class Document;
class FormData;
class XSSInfo {
WTF_MAKE_FAST_ALLOCATED(XSSInfo);
WTF_MAKE_NONCOPYABLE(XSSInfo);
public:
static PassOwnPtr<XSSInfo> create(const String& originalURL, bool didBlockEntirePage, bool didSendXSSProtectionHeader, bool didSendCSPHeader)
{
......
......@@ -30,6 +30,7 @@
#include "core/html/forms/StepRange.h"
#include "core/html/shadow/DateTimeFieldElement.h"
#include "platform/DateComponents.h"
#include "wtf/Allocator.h"
namespace blink {
......@@ -62,6 +63,7 @@ public:
};
struct LayoutParameters {
STACK_ALLOCATED();
String dateTimeFormat;
String fallbackDateTimeFormat;
Locale& locale;
......
......@@ -29,6 +29,7 @@
#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
#include "core/html/shadow/DateTimeNumericFieldElement.h"
#include "core/html/shadow/DateTimeSymbolicFieldElement.h"
#include "wtf/Allocator.h"
namespace blink {
......@@ -226,6 +227,7 @@ class DateTimeYearFieldElement final : public DateTimeNumericFieldElement {
public:
struct Parameters {
STACK_ALLOCATED();
int minimumYear;
int maximumYear;
bool minIsSpecified;
......
......@@ -29,6 +29,7 @@
#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
#include "core/html/shadow/DateTimeFieldElement.h"
#include "wtf/Allocator.h"
#include "wtf/text/StringBuilder.h"
#include "wtf/text/WTFString.h"
......@@ -46,12 +47,14 @@ class DateTimeNumericFieldElement : public DateTimeFieldElement {
public:
struct Step {
DISALLOW_ALLOCATION();
Step(int step = 1, int stepBase = 0) : step(step), stepBase(stepBase) { }
int step;
int stepBase;
};
struct Range {
DISALLOW_ALLOCATION();
Range(int minimum, int maximum) : minimum(minimum), maximum(maximum) { }
int clampValue(int) const;
bool isInRange(int) const;
......
......@@ -7,6 +7,7 @@
#include "core/html/track/TextTrackKindUserPreference.h"
#include "platform/heap/Handle.h"
#include "wtf/Allocator.h"
namespace blink {
......@@ -17,6 +18,7 @@ class AutomaticTrackSelection {
STACK_ALLOCATED();
public:
struct Configuration {
DISALLOW_ALLOCATION();
Configuration()
: disableCurrentlyEnabledTracks(false)
, forceEnableSubtitleOrCaptionTrack(false)
......
......@@ -28,7 +28,8 @@ typedef Vector<CueInterval> CueList;
// This class manages the timeline and rendering updates of cues associated
// with TextTracks. Owned by a HTMLMediaElement.
class CueTimeline : public NoBaseWillBeGarbageCollectedFinalized<CueTimeline> {
class CueTimeline final : public NoBaseWillBeGarbageCollectedFinalized<CueTimeline> {
WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(CueTimeline);
public:
CueTimeline(HTMLMediaElement&);
......
......@@ -33,6 +33,7 @@
#include "core/CoreExport.h"
#include "platform/text/SegmentedString.h"
#include "wtf/Allocator.h"
#include "wtf/text/StringBuilder.h"
namespace blink {
......@@ -44,6 +45,7 @@ namespace blink {
// to 'REPLACEMENT CHARACTER' (U+FFFD) and does not return the linebreaks as
// part of the result.
class CORE_EXPORT BufferedLineReader {
DISALLOW_ALLOCATION();
WTF_MAKE_NONCOPYABLE(BufferedLineReader);
public:
BufferedLineReader()
......
......@@ -32,6 +32,7 @@
#include "core/html/track/TextTrackCue.h"
#include "platform/heap/Handle.h"
#include "wtf/Allocator.h"
namespace blink {
......@@ -42,6 +43,7 @@ class VTTCue;
class VTTScanner;
struct VTTDisplayParameters {
STACK_ALLOCATED();
VTTDisplayParameters();
FloatPoint position;
......
......@@ -32,6 +32,7 @@
#include "core/CoreExport.h"
#include "platform/ParsingUtilities.h"
#include "wtf/Allocator.h"
#include "wtf/text/WTFString.h"
namespace blink {
......@@ -48,6 +49,7 @@ namespace blink {
// The 'scan' operation performs a 'match', and if the match is successful it
// advance the input pointer past the matched sequence.
class CORE_EXPORT VTTScanner {
STACK_ALLOCATED();
WTF_MAKE_NONCOPYABLE(VTTScanner);
public:
explicit VTTScanner(const String& line);
......@@ -55,6 +57,7 @@ public:
typedef const LChar* Position;
class Run {
STACK_ALLOCATED();
public:
Run(Position start, Position end, bool is8Bit)
: m_start(start), m_end(end), m_is8Bit(is8Bit) { }
......
......@@ -31,9 +31,12 @@
#ifndef VTTToken_h
#define VTTToken_h
#include "wtf/Allocator.h"
namespace blink {
class VTTTokenTypes {
STATIC_ONLY(VTTTokenTypes);
public:
enum Type {
Uninitialized,
......@@ -45,6 +48,7 @@ public:
};
class VTTToken {
STACK_ALLOCATED();
public:
typedef VTTTokenTypes Type;
......
......@@ -33,10 +33,12 @@
#include "core/html/parser/InputStreamPreprocessor.h"
#include "core/html/track/vtt/VTTToken.h"
#include "wtf/Allocator.h"
namespace blink {
class VTTTokenizer {
DISALLOW_ALLOCATION();
WTF_MAKE_NONCOPYABLE(VTTTokenizer);
public:
explicit VTTTokenizer(const String& input);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment