| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
| 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
| (...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1223 | 1223 |
| 1224 return body; | 1224 return body; |
| 1225 } | 1225 } |
| 1226 | 1226 |
| 1227 return documentElement(); | 1227 return documentElement(); |
| 1228 } | 1228 } |
| 1229 | 1229 |
| 1230 return body(); | 1230 return body(); |
| 1231 } | 1231 } |
| 1232 | 1232 |
| 1233 VisualViewport* Document::visualViewport() |
| 1234 { |
| 1235 if (FrameHost* host = frameHost()) |
| 1236 return &host->visualViewport(); |
| 1237 return nullptr; |
| 1238 } |
| 1239 |
| 1233 /* | 1240 /* |
| 1234 * Performs three operations: | 1241 * Performs three operations: |
| 1235 * 1. Convert control characters to spaces | 1242 * 1. Convert control characters to spaces |
| 1236 * 2. Trim leading and trailing spaces | 1243 * 2. Trim leading and trailing spaces |
| 1237 * 3. Collapse internal whitespace. | 1244 * 3. Collapse internal whitespace. |
| 1238 */ | 1245 */ |
| 1239 template <typename CharacterType> | 1246 template <typename CharacterType> |
| 1240 static inline String canonicalizedTitle(Document* document, const String& title) | 1247 static inline String canonicalizedTitle(Document* document, const String& title) |
| 1241 { | 1248 { |
| 1242 unsigned length = title.length(); | 1249 unsigned length = title.length(); |
| (...skipping 2768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4011 RawPtr<Event> event = Event::create(EventTypeNames::resize); | 4018 RawPtr<Event> event = Event::create(EventTypeNames::resize); |
| 4012 event->setTarget(domWindow()); | 4019 event->setTarget(domWindow()); |
| 4013 ensureScriptedAnimationController().enqueuePerFrameEvent(event.release()); | 4020 ensureScriptedAnimationController().enqueuePerFrameEvent(event.release()); |
| 4014 } | 4021 } |
| 4015 | 4022 |
| 4016 void Document::enqueueMediaQueryChangeListeners(HeapVector<Member<MediaQueryList
Listener>>& listeners) | 4023 void Document::enqueueMediaQueryChangeListeners(HeapVector<Member<MediaQueryList
Listener>>& listeners) |
| 4017 { | 4024 { |
| 4018 ensureScriptedAnimationController().enqueueMediaQueryChangeListeners(listene
rs); | 4025 ensureScriptedAnimationController().enqueueMediaQueryChangeListeners(listene
rs); |
| 4019 } | 4026 } |
| 4020 | 4027 |
| 4028 void Document::enqueueVisualViewportChangedEvent() |
| 4029 { |
| 4030 RawPtr<Event> event = Event::create(EventTypeNames::visualviewportchanged); |
| 4031 event->setTarget(this); |
| 4032 ensureScriptedAnimationController().enqueuePerFrameEvent(event.release()); |
| 4033 } |
| 4034 |
| 4021 void Document::dispatchEventsForPrinting() | 4035 void Document::dispatchEventsForPrinting() |
| 4022 { | 4036 { |
| 4023 if (!m_scriptedAnimationController) | 4037 if (!m_scriptedAnimationController) |
| 4024 return; | 4038 return; |
| 4025 m_scriptedAnimationController->dispatchEventsAndCallbacksForPrinting(); | 4039 m_scriptedAnimationController->dispatchEventsAndCallbacksForPrinting(); |
| 4026 } | 4040 } |
| 4027 | 4041 |
| 4028 Document::EventFactorySet& Document::eventFactories() | 4042 Document::EventFactorySet& Document::eventFactories() |
| 4029 { | 4043 { |
| 4030 DEFINE_STATIC_LOCAL(EventFactorySet, s_eventFactory, ()); | 4044 DEFINE_STATIC_LOCAL(EventFactorySet, s_eventFactory, ()); |
| (...skipping 1999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6030 #ifndef NDEBUG | 6044 #ifndef NDEBUG |
| 6031 using namespace blink; | 6045 using namespace blink; |
| 6032 void showLiveDocumentInstances() | 6046 void showLiveDocumentInstances() |
| 6033 { | 6047 { |
| 6034 Document::WeakDocumentSet& set = Document::liveDocumentSet(); | 6048 Document::WeakDocumentSet& set = Document::liveDocumentSet(); |
| 6035 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6049 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6036 for (Document* document : set) | 6050 for (Document* document : set) |
| 6037 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get
String().utf8().data()); | 6051 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get
String().utf8().data()); |
| 6038 } | 6052 } |
| 6039 #endif | 6053 #endif |
| OLD | NEW |