Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/Document.cpp |
| diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp |
| index 3ae652d4a77fd109b1f91e9e93388b5ee049fd44..fd18957add20e3d040ac93821ed18a90500061c9 100644 |
| --- a/third_party/WebKit/Source/core/dom/Document.cpp |
| +++ b/third_party/WebKit/Source/core/dom/Document.cpp |
| @@ -1228,6 +1228,13 @@ Element* Document::scrollingElement() |
| return body(); |
| } |
| +VisualViewport* Document::visualViewport() |
| +{ |
| + if (FrameHost* host = frameHost()) |
| + return &host->visualViewport(); |
|
esprehn
2016/03/31 05:15:37
does your spec say that a document without a view
bokan
2016/03/31 15:23:54
That seems correct to me. I've added the wording i
|
| + return nullptr; |
| +} |
| + |
| /* |
| * Performs three operations: |
| * 1. Convert control characters to spaces |
| @@ -4006,6 +4013,13 @@ void Document::enqueueMediaQueryChangeListeners(WillBeHeapVector<RefPtrWillBeMem |
| ensureScriptedAnimationController().enqueueMediaQueryChangeListeners(listeners); |
| } |
| +void Document::enqueueVisualViewportChangedEvent() |
| +{ |
| + RefPtrWillBeRawPtr<Event> event = Event::create(EventTypeNames::visualviewportchanged); |
| + event->setTarget(this); |
| + ensureScriptedAnimationController().enqueuePerFrameEvent(event.release()); |
| +} |
| + |
| void Document::dispatchEventsForPrinting() |
| { |
| if (!m_scriptedAnimationController) |