2012-05-29 19:52:43 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2009-10-12 17:08:04 +04:00
|
|
|
|
|
|
|
#include "nsHtml5Speculation.h"
|
|
|
|
|
2015-08-11 18:29:46 +03:00
|
|
|
using namespace mozilla;
|
|
|
|
|
2011-09-28 16:45:17 +04:00
|
|
|
nsHtml5Speculation::nsHtml5Speculation(nsHtml5OwningUTF16Buffer* aBuffer,
|
2018-03-16 18:26:06 +03:00
|
|
|
int32_t aStart,
|
|
|
|
int32_t aStartLineNumber,
|
2009-10-12 17:08:04 +04:00
|
|
|
nsAHtml5TreeBuilderState* aSnapshot)
|
|
|
|
: mBuffer(aBuffer)
|
|
|
|
, mStart(aStart)
|
2009-10-28 16:48:37 +03:00
|
|
|
, mStartLineNumber(aStartLineNumber)
|
2009-10-12 17:08:04 +04:00
|
|
|
, mSnapshot(aSnapshot)
|
|
|
|
{
|
|
|
|
MOZ_COUNT_CTOR(nsHtml5Speculation);
|
|
|
|
}
|
|
|
|
|
|
|
|
nsHtml5Speculation::~nsHtml5Speculation()
|
|
|
|
{
|
|
|
|
MOZ_COUNT_DTOR(nsHtml5Speculation);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2009-11-17 11:52:30 +03:00
|
|
|
nsHtml5Speculation::MoveOpsFrom(nsTArray<nsHtml5TreeOperation>& aOpQueue)
|
2009-10-12 17:08:04 +04:00
|
|
|
{
|
2015-08-11 18:29:46 +03:00
|
|
|
mOpQueue.AppendElements(Move(aOpQueue));
|
2009-10-12 17:08:04 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
nsHtml5Speculation::FlushToSink(nsAHtml5TreeOpSink* aSink)
|
|
|
|
{
|
2009-11-17 11:52:30 +03:00
|
|
|
aSink->MoveOpsFrom(mOpQueue);
|
2009-10-12 17:08:04 +04:00
|
|
|
}
|