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 4927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4938 m_ranges.add(range); | 4938 m_ranges.add(range); |
4939 } | 4939 } |
4940 | 4940 |
4941 void Document::detachRange(Range* range) | 4941 void Document::detachRange(Range* range) |
4942 { | 4942 { |
4943 // We don't ASSERT m_ranges.contains(range) to allow us to call this | 4943 // We don't ASSERT m_ranges.contains(range) to allow us to call this |
4944 // unconditionally to fix: https://bugs.webkit.org/show_bug.cgi?id=26044 | 4944 // unconditionally to fix: https://bugs.webkit.org/show_bug.cgi?id=26044 |
4945 m_ranges.remove(range); | 4945 m_ranges.remove(range); |
4946 } | 4946 } |
4947 | 4947 |
4948 void Document::getCSSCanvasContext(const String& type, const String& name, int w
idth, int height, bool& is2d, RefPtrWillBeRawPtr<CanvasRenderingContext2D>& cont
ext2d, bool& is3d, RefPtrWillBeRawPtr<WebGLRenderingContext>& context3d) | 4948 void Document::getCSSCanvasContext(const String& type, const String& name, int w
idth, int height, RefPtrWillBeRawPtr<CanvasRenderingContext2D>& context2d, RefPt
rWillBeRawPtr<WebGLRenderingContext>& context3d) |
4949 { | 4949 { |
4950 HTMLCanvasElement& element = getCSSCanvasElement(name); | 4950 HTMLCanvasElement& element = getCSSCanvasElement(name); |
4951 element.setSize(IntSize(width, height)); | 4951 element.setSize(IntSize(width, height)); |
4952 CanvasRenderingContext* context = element.getContext(type); | 4952 CanvasRenderingContext* context = element.getContext(type); |
4953 if (!context) | 4953 if (!context) |
4954 return; | 4954 return; |
4955 | 4955 |
4956 if (context->is2d()) { | 4956 if (context->is2d()) { |
4957 is2d = true; | |
4958 context2d = toCanvasRenderingContext2D(context); | 4957 context2d = toCanvasRenderingContext2D(context); |
4959 } else if (context->is3d()) { | 4958 } else if (context->is3d()) { |
4960 is3d = true; | |
4961 context3d = toWebGLRenderingContext(context); | 4959 context3d = toWebGLRenderingContext(context); |
4962 } | 4960 } |
4963 } | 4961 } |
4964 | 4962 |
4965 HTMLCanvasElement& Document::getCSSCanvasElement(const String& name) | 4963 HTMLCanvasElement& Document::getCSSCanvasElement(const String& name) |
4966 { | 4964 { |
4967 RefPtrWillBeMember<HTMLCanvasElement>& element = m_cssCanvasElements.add(nam
e, nullptr).storedValue->value; | 4965 RefPtrWillBeMember<HTMLCanvasElement>& element = m_cssCanvasElements.add(nam
e, nullptr).storedValue->value; |
4968 if (!element) { | 4966 if (!element) { |
4969 element = HTMLCanvasElement::create(*this); | 4967 element = HTMLCanvasElement::create(*this); |
4970 element->setAccelerationDisabled(true); | 4968 element->setAccelerationDisabled(true); |
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5796 using namespace blink; | 5794 using namespace blink; |
5797 void showLiveDocumentInstances() | 5795 void showLiveDocumentInstances() |
5798 { | 5796 { |
5799 WeakDocumentSet& set = liveDocumentSet(); | 5797 WeakDocumentSet& set = liveDocumentSet(); |
5800 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5798 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5801 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it
) { | 5799 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it
) { |
5802 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut
f8().data()); | 5800 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut
f8().data()); |
5803 } | 5801 } |
5804 } | 5802 } |
5805 #endif | 5803 #endif |
OLD | NEW |