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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 #include "core/html/HTMLCanvasElement.h" | 134 #include "core/html/HTMLCanvasElement.h" |
135 #include "core/html/HTMLCollection.h" | 135 #include "core/html/HTMLCollection.h" |
136 #include "core/html/HTMLDialogElement.h" | 136 #include "core/html/HTMLDialogElement.h" |
137 #include "core/html/HTMLDocument.h" | 137 #include "core/html/HTMLDocument.h" |
138 #include "core/html/HTMLFrameOwnerElement.h" | 138 #include "core/html/HTMLFrameOwnerElement.h" |
139 #include "core/html/HTMLHeadElement.h" | 139 #include "core/html/HTMLHeadElement.h" |
140 #include "core/html/HTMLHtmlElement.h" | 140 #include "core/html/HTMLHtmlElement.h" |
141 #include "core/html/HTMLIFrameElement.h" | 141 #include "core/html/HTMLIFrameElement.h" |
142 #include "core/html/HTMLInputElement.h" | 142 #include "core/html/HTMLInputElement.h" |
143 #include "core/html/HTMLLinkElement.h" | 143 #include "core/html/HTMLLinkElement.h" |
| 144 #include "core/html/HTMLMediaElement.h" |
144 #include "core/html/HTMLMetaElement.h" | 145 #include "core/html/HTMLMetaElement.h" |
145 #include "core/html/HTMLScriptElement.h" | 146 #include "core/html/HTMLScriptElement.h" |
146 #include "core/html/HTMLStyleElement.h" | 147 #include "core/html/HTMLStyleElement.h" |
147 #include "core/html/HTMLTemplateElement.h" | 148 #include "core/html/HTMLTemplateElement.h" |
148 #include "core/html/HTMLTitleElement.h" | 149 #include "core/html/HTMLTitleElement.h" |
149 #include "core/html/PluginDocument.h" | 150 #include "core/html/PluginDocument.h" |
150 #include "core/html/WindowNameCollection.h" | 151 #include "core/html/WindowNameCollection.h" |
151 #include "core/html/canvas/CanvasContextCreationAttributes.h" | 152 #include "core/html/canvas/CanvasContextCreationAttributes.h" |
152 #include "core/html/canvas/CanvasRenderingContext.h" | 153 #include "core/html/canvas/CanvasRenderingContext.h" |
153 #include "core/html/canvas/CanvasRenderingContext2D.h" | 154 #include "core/html/canvas/CanvasRenderingContext2D.h" |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 return *m_mediaQueryMatcher; | 666 return *m_mediaQueryMatcher; |
666 } | 667 } |
667 | 668 |
668 void Document::mediaQueryAffectingValueChanged() | 669 void Document::mediaQueryAffectingValueChanged() |
669 { | 670 { |
670 m_evaluateMediaQueriesOnStyleRecalc = true; | 671 m_evaluateMediaQueriesOnStyleRecalc = true; |
671 styleEngine().clearMediaQueryRuleSetStyleSheets(); | 672 styleEngine().clearMediaQueryRuleSetStyleSheets(); |
672 InspectorInstrumentation::mediaQueryResultChanged(this); | 673 InspectorInstrumentation::mediaQueryResultChanged(this); |
673 } | 674 } |
674 | 675 |
| 676 void Document::registerForTextTracksVisibilityChangedCallback(HTMLMediaElement*
mediaElement) |
| 677 { |
| 678 if (!mediaElement) |
| 679 return; |
| 680 if (m_textTracksVisibilityChangedElements.contains(mediaElement)) |
| 681 return; |
| 682 m_textTracksVisibilityChangedElements.append(mediaElement); |
| 683 } |
| 684 |
| 685 void Document::unregisterFromTextTracksVisibilityChangedCallback(HTMLMediaElemen
t* mediaElement) |
| 686 { |
| 687 size_t index = m_textTracksVisibilityChangedElements.find(mediaElement); |
| 688 if (index != kNotFound) |
| 689 m_textTracksVisibilityChangedElements.remove(index); |
| 690 } |
| 691 |
| 692 void Document::textTracksVisibilityChanged(bool visible) |
| 693 { |
| 694 for (Vector<HTMLMediaElement*>::iterator it = m_textTracksVisibilityChangedE
lements.begin(); |
| 695 it != m_textTracksVisibilityChangedElements.end(); ++it) { |
| 696 (*it)->setClosedCaptionsVisible(visible); |
| 697 } |
| 698 } |
| 699 |
675 void Document::setCompatibilityMode(CompatibilityMode mode) | 700 void Document::setCompatibilityMode(CompatibilityMode mode) |
676 { | 701 { |
677 if (m_compatibilityModeLocked || mode == m_compatibilityMode) | 702 if (m_compatibilityModeLocked || mode == m_compatibilityMode) |
678 return; | 703 return; |
679 m_compatibilityMode = mode; | 704 m_compatibilityMode = mode; |
680 selectorQueryCache().invalidate(); | 705 selectorQueryCache().invalidate(); |
681 } | 706 } |
682 | 707 |
683 String Document::compatMode() const | 708 String Document::compatMode() const |
684 { | 709 { |
(...skipping 5023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5708 #ifndef NDEBUG | 5733 #ifndef NDEBUG |
5709 using namespace blink; | 5734 using namespace blink; |
5710 void showLiveDocumentInstances() | 5735 void showLiveDocumentInstances() |
5711 { | 5736 { |
5712 WeakDocumentSet& set = liveDocumentSet(); | 5737 WeakDocumentSet& set = liveDocumentSet(); |
5713 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5738 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5714 for (Document* document : set) | 5739 for (Document* document : set) |
5715 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); | 5740 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); |
5716 } | 5741 } |
5717 #endif | 5742 #endif |
OLD | NEW |