| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 #include "platform/graphics/GraphicsLayer.h" | 138 #include "platform/graphics/GraphicsLayer.h" |
| 139 #include "platform/heap/Handle.h" | 139 #include "platform/heap/Handle.h" |
| 140 #include "platform/inspector_protocol/FrontendChannel.h" | 140 #include "platform/inspector_protocol/FrontendChannel.h" |
| 141 #include "platform/scroll/ProgrammaticScrollAnimator.h" | 141 #include "platform/scroll/ProgrammaticScrollAnimator.h" |
| 142 #include "platform/weborigin/SchemeRegistry.h" | 142 #include "platform/weborigin/SchemeRegistry.h" |
| 143 #include "public/platform/Platform.h" | 143 #include "public/platform/Platform.h" |
| 144 #include "public/platform/WebConnectionType.h" | 144 #include "public/platform/WebConnectionType.h" |
| 145 #include "public/platform/WebGraphicsContext3DProvider.h" | 145 #include "public/platform/WebGraphicsContext3DProvider.h" |
| 146 #include "public/platform/WebLayer.h" | 146 #include "public/platform/WebLayer.h" |
| 147 #include "wtf/InstanceCounter.h" | 147 #include "wtf/InstanceCounter.h" |
| 148 #include "wtf/PassOwnPtr.h" | 148 #include "wtf/PtrUtil.h" |
| 149 #include "wtf/dtoa.h" | 149 #include "wtf/dtoa.h" |
| 150 #include "wtf/text/StringBuffer.h" | 150 #include "wtf/text/StringBuffer.h" |
| 151 #include <deque> | 151 #include <deque> |
| 152 #include <memory> |
| 152 #include <v8.h> | 153 #include <v8.h> |
| 153 | 154 |
| 154 namespace blink { | 155 namespace blink { |
| 155 | 156 |
| 156 namespace { | 157 namespace { |
| 157 | 158 |
| 158 class InternalsIterationSource final : public ValueIterable<int>::IterationSourc
e { | 159 class InternalsIterationSource final : public ValueIterable<int>::IterationSourc
e { |
| 159 public: | 160 public: |
| 160 bool next(ScriptState* scriptState, int& value, ExceptionState& exceptionSta
te) override | 161 bool next(ScriptState* scriptState, int& value, ExceptionState& exceptionSta
te) override |
| 161 { | 162 { |
| (...skipping 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1466 } | 1467 } |
| 1467 | 1468 |
| 1468 AtomicString Internals::htmlNamespace() | 1469 AtomicString Internals::htmlNamespace() |
| 1469 { | 1470 { |
| 1470 return HTMLNames::xhtmlNamespaceURI; | 1471 return HTMLNames::xhtmlNamespaceURI; |
| 1471 } | 1472 } |
| 1472 | 1473 |
| 1473 Vector<AtomicString> Internals::htmlTags() | 1474 Vector<AtomicString> Internals::htmlTags() |
| 1474 { | 1475 { |
| 1475 Vector<AtomicString> tags(HTMLNames::HTMLTagsCount); | 1476 Vector<AtomicString> tags(HTMLNames::HTMLTagsCount); |
| 1476 OwnPtr<const HTMLQualifiedName*[]> qualifiedNames = HTMLNames::getHTMLTags()
; | 1477 std::unique_ptr<const HTMLQualifiedName*[]> qualifiedNames = HTMLNames::getH
TMLTags(); |
| 1477 for (size_t i = 0; i < HTMLNames::HTMLTagsCount; ++i) | 1478 for (size_t i = 0; i < HTMLNames::HTMLTagsCount; ++i) |
| 1478 tags[i] = qualifiedNames[i]->localName(); | 1479 tags[i] = qualifiedNames[i]->localName(); |
| 1479 return tags; | 1480 return tags; |
| 1480 } | 1481 } |
| 1481 | 1482 |
| 1482 AtomicString Internals::svgNamespace() | 1483 AtomicString Internals::svgNamespace() |
| 1483 { | 1484 { |
| 1484 return SVGNames::svgNamespaceURI; | 1485 return SVGNames::svgNamespaceURI; |
| 1485 } | 1486 } |
| 1486 | 1487 |
| 1487 Vector<AtomicString> Internals::svgTags() | 1488 Vector<AtomicString> Internals::svgTags() |
| 1488 { | 1489 { |
| 1489 Vector<AtomicString> tags(SVGNames::SVGTagsCount); | 1490 Vector<AtomicString> tags(SVGNames::SVGTagsCount); |
| 1490 OwnPtr<const SVGQualifiedName*[]> qualifiedNames = SVGNames::getSVGTags(); | 1491 std::unique_ptr<const SVGQualifiedName*[]> qualifiedNames = SVGNames::getSVG
Tags(); |
| 1491 for (size_t i = 0; i < SVGNames::SVGTagsCount; ++i) | 1492 for (size_t i = 0; i < SVGNames::SVGTagsCount; ++i) |
| 1492 tags[i] = qualifiedNames[i]->localName(); | 1493 tags[i] = qualifiedNames[i]->localName(); |
| 1493 return tags; | 1494 return tags; |
| 1494 } | 1495 } |
| 1495 | 1496 |
| 1496 StaticNodeList* Internals::nodesFromRect(Document* document, int centerX, int ce
nterY, unsigned topPadding, unsigned rightPadding, | 1497 StaticNodeList* Internals::nodesFromRect(Document* document, int centerX, int ce
nterY, unsigned topPadding, unsigned rightPadding, |
| 1497 unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allo
wChildFrameContent, ExceptionState& exceptionState) const | 1498 unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allo
wChildFrameContent, ExceptionState& exceptionState) const |
| 1498 { | 1499 { |
| 1499 ASSERT(document); | 1500 ASSERT(document); |
| 1500 if (!document->frame() || !document->frame()->view()) { | 1501 if (!document->frame() || !document->frame()->view()) { |
| (...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2212 } | 2213 } |
| 2213 | 2214 |
| 2214 void Internals::resetTypeAheadSession(HTMLSelectElement* select) | 2215 void Internals::resetTypeAheadSession(HTMLSelectElement* select) |
| 2215 { | 2216 { |
| 2216 ASSERT(select); | 2217 ASSERT(select); |
| 2217 select->resetTypeAheadSessionForTesting(); | 2218 select->resetTypeAheadSessionForTesting(); |
| 2218 } | 2219 } |
| 2219 | 2220 |
| 2220 bool Internals::loseSharedGraphicsContext3D() | 2221 bool Internals::loseSharedGraphicsContext3D() |
| 2221 { | 2222 { |
| 2222 OwnPtr<WebGraphicsContext3DProvider> sharedProvider = adoptPtr(Platform::cur
rent()->createSharedOffscreenGraphicsContext3DProvider()); | 2223 std::unique_ptr<WebGraphicsContext3DProvider> sharedProvider = wrapUnique(Pl
atform::current()->createSharedOffscreenGraphicsContext3DProvider()); |
| 2223 if (!sharedProvider) | 2224 if (!sharedProvider) |
| 2224 return false; | 2225 return false; |
| 2225 gpu::gles2::GLES2Interface* sharedGL = sharedProvider->contextGL(); | 2226 gpu::gles2::GLES2Interface* sharedGL = sharedProvider->contextGL(); |
| 2226 sharedGL->LoseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_EXT, GL_INNOCENT_CONTE
XT_RESET_EXT); | 2227 sharedGL->LoseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_EXT, GL_INNOCENT_CONTE
XT_RESET_EXT); |
| 2227 // To prevent tests that call loseSharedGraphicsContext3D from being | 2228 // To prevent tests that call loseSharedGraphicsContext3D from being |
| 2228 // flaky, we call finish so that the context is guaranteed to be lost | 2229 // flaky, we call finish so that the context is guaranteed to be lost |
| 2229 // synchronously (i.e. before returning). | 2230 // synchronously (i.e. before returning). |
| 2230 sharedGL->Finish(); | 2231 sharedGL->Finish(); |
| 2231 return true; | 2232 return true; |
| 2232 } | 2233 } |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2564 } | 2565 } |
| 2565 | 2566 |
| 2566 String Internals::getProgrammaticScrollAnimationState(Node* node) const | 2567 String Internals::getProgrammaticScrollAnimationState(Node* node) const |
| 2567 { | 2568 { |
| 2568 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) | 2569 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) |
| 2569 return scrollableArea->programmaticScrollAnimator().runStateAsText(); | 2570 return scrollableArea->programmaticScrollAnimator().runStateAsText(); |
| 2570 return String(); | 2571 return String(); |
| 2571 } | 2572 } |
| 2572 | 2573 |
| 2573 } // namespace blink | 2574 } // namespace blink |
| OLD | NEW |