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 16 matching lines...) Expand all Loading... |
27 | 27 |
28 #include "config.h" | 28 #include "config.h" |
29 #include "core/dom/Document.h" | 29 #include "core/dom/Document.h" |
30 | 30 |
31 #include "bindings/core/v8/CustomElementConstructorBuilder.h" | 31 #include "bindings/core/v8/CustomElementConstructorBuilder.h" |
32 #include "bindings/core/v8/DOMDataStore.h" | 32 #include "bindings/core/v8/DOMDataStore.h" |
33 #include "bindings/core/v8/ExceptionMessages.h" | 33 #include "bindings/core/v8/ExceptionMessages.h" |
34 #include "bindings/core/v8/ExceptionState.h" | 34 #include "bindings/core/v8/ExceptionState.h" |
35 #include "bindings/core/v8/ExceptionStatePlaceholder.h" | 35 #include "bindings/core/v8/ExceptionStatePlaceholder.h" |
36 #include "bindings/core/v8/ScriptController.h" | 36 #include "bindings/core/v8/ScriptController.h" |
| 37 #include "bindings/core/v8/UnionTypesCore.h" |
37 #include "bindings/core/v8/V8DOMWrapper.h" | 38 #include "bindings/core/v8/V8DOMWrapper.h" |
38 #include "bindings/core/v8/WindowProxy.h" | 39 #include "bindings/core/v8/WindowProxy.h" |
39 #include "core/HTMLElementFactory.h" | 40 #include "core/HTMLElementFactory.h" |
40 #include "core/HTMLNames.h" | 41 #include "core/HTMLNames.h" |
41 #include "core/SVGElementFactory.h" | 42 #include "core/SVGElementFactory.h" |
42 #include "core/SVGNames.h" | 43 #include "core/SVGNames.h" |
43 #include "core/XMLNSNames.h" | 44 #include "core/XMLNSNames.h" |
44 #include "core/XMLNames.h" | 45 #include "core/XMLNames.h" |
45 #include "core/accessibility/AXObjectCache.h" | 46 #include "core/accessibility/AXObjectCache.h" |
46 #include "core/animation/AnimationTimeline.h" | 47 #include "core/animation/AnimationTimeline.h" |
(...skipping 4880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4927 m_ranges.add(range); | 4928 m_ranges.add(range); |
4928 } | 4929 } |
4929 | 4930 |
4930 void Document::detachRange(Range* range) | 4931 void Document::detachRange(Range* range) |
4931 { | 4932 { |
4932 // We don't ASSERT m_ranges.contains(range) to allow us to call this | 4933 // We don't ASSERT m_ranges.contains(range) to allow us to call this |
4933 // unconditionally to fix: https://bugs.webkit.org/show_bug.cgi?id=26044 | 4934 // unconditionally to fix: https://bugs.webkit.org/show_bug.cgi?id=26044 |
4934 m_ranges.remove(range); | 4935 m_ranges.remove(range); |
4935 } | 4936 } |
4936 | 4937 |
4937 void Document::getCSSCanvasContext(const String& type, const String& name, int w
idth, int height, RefPtrWillBeRawPtr<CanvasRenderingContext2D>& context2d, RefPt
rWillBeRawPtr<WebGLRenderingContext>& context3d) | 4938 void Document::getCSSCanvasContext(const String& type, const String& name, int w
idth, int height, CanvasRenderingContext2DOrWebGLRenderingContext& returnValue) |
4938 { | 4939 { |
4939 HTMLCanvasElement& element = getCSSCanvasElement(name); | 4940 HTMLCanvasElement& element = getCSSCanvasElement(name); |
4940 element.setSize(IntSize(width, height)); | 4941 element.setSize(IntSize(width, height)); |
4941 CanvasRenderingContext* context = element.getContext(type); | 4942 CanvasRenderingContext* context = element.getContext(type); |
4942 if (!context) | 4943 if (!context) |
4943 return; | 4944 return; |
4944 | 4945 |
4945 if (context->is2d()) { | 4946 if (context->is2d()) { |
4946 context2d = toCanvasRenderingContext2D(context); | 4947 returnValue.setCanvasRenderingContext2D(toCanvasRenderingContext2D(conte
xt)); |
4947 } else if (context->is3d()) { | 4948 } else if (context->is3d()) { |
4948 context3d = toWebGLRenderingContext(context); | 4949 returnValue.setWebGLRenderingContext(toWebGLRenderingContext(context)); |
4949 } | 4950 } |
4950 } | 4951 } |
4951 | 4952 |
4952 HTMLCanvasElement& Document::getCSSCanvasElement(const String& name) | 4953 HTMLCanvasElement& Document::getCSSCanvasElement(const String& name) |
4953 { | 4954 { |
4954 RefPtrWillBeMember<HTMLCanvasElement>& element = m_cssCanvasElements.add(nam
e, nullptr).storedValue->value; | 4955 RefPtrWillBeMember<HTMLCanvasElement>& element = m_cssCanvasElements.add(nam
e, nullptr).storedValue->value; |
4955 if (!element) { | 4956 if (!element) { |
4956 element = HTMLCanvasElement::create(*this); | 4957 element = HTMLCanvasElement::create(*this); |
4957 element->setAccelerationDisabled(true); | 4958 element->setAccelerationDisabled(true); |
4958 } | 4959 } |
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5817 #ifndef NDEBUG | 5818 #ifndef NDEBUG |
5818 using namespace blink; | 5819 using namespace blink; |
5819 void showLiveDocumentInstances() | 5820 void showLiveDocumentInstances() |
5820 { | 5821 { |
5821 WeakDocumentSet& set = liveDocumentSet(); | 5822 WeakDocumentSet& set = liveDocumentSet(); |
5822 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5823 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5823 for (Document* document : set) | 5824 for (Document* document : set) |
5824 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); | 5825 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); |
5825 } | 5826 } |
5826 #endif | 5827 #endif |
OLD | NEW |