| Index: sky/engine/core/dom/Document.cpp
|
| diff --git a/sky/engine/core/dom/Document.cpp b/sky/engine/core/dom/Document.cpp
|
| index 2b37f28f7ecafc4db297bfb9f6979456130dc959..c643fe8964fec30a4991619b81adc57e52299c2d 100644
|
| --- a/sky/engine/core/dom/Document.cpp
|
| +++ b/sky/engine/core/dom/Document.cpp
|
| @@ -253,6 +253,7 @@ Document::Document(const DocumentInit& initializer)
|
| , m_templateDocumentHost(nullptr)
|
| , m_hasViewportUnits(false)
|
| , m_styleRecalcElementCounter(0)
|
| + , m_frameView(nullptr)
|
| {
|
| setClient(this);
|
|
|
| @@ -332,13 +333,6 @@ Document::~Document()
|
| InspectorCounters::decrementCounter(InspectorCounters::DocumentCounter);
|
| }
|
|
|
| -PassRefPtr<Document> Document::create(Document& document)
|
| -{
|
| - DocumentInit init = DocumentInit::fromContext(document.contextDocument())
|
| - .withElementRegistry(document.elementRegistry());
|
| - return adoptRef(new Document(init));
|
| -}
|
| -
|
| #if !ENABLE(OILPAN)
|
| void Document::dispose()
|
| {
|
| @@ -415,6 +409,11 @@ PassRefPtr<Element> Document::createElement(const AtomicString& name, ExceptionS
|
| return HTMLElementFactory::createElement(name, *this, false);
|
| }
|
|
|
| +PassRefPtr<Text> Document::createText(const String& text)
|
| +{
|
| + return Text::create(*this, text);
|
| +}
|
| +
|
| void Document::registerElement(const AtomicString& name, PassRefPtr<DartValue> type, ExceptionState& es)
|
| {
|
| m_elementRegistry->RegisterElement(name, type);
|
| @@ -829,6 +828,8 @@ void Document::setStateForNewFormElements(const Vector<String>& stateVector)
|
|
|
| FrameView* Document::view() const
|
| {
|
| + if (m_frameView)
|
| + return m_frameView;
|
| return m_frame ? m_frame->view() : 0;
|
| }
|
|
|
| @@ -904,7 +905,8 @@ void Document::scheduleRenderTreeUpdate()
|
|
|
| void Document::scheduleVisualUpdate()
|
| {
|
| - page()->animator().scheduleVisualUpdate();
|
| + if (page())
|
| + page()->animator().scheduleVisualUpdate();
|
| }
|
|
|
| void Document::updateDistributionIfNeeded()
|
|
|