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 15 matching lines...) Expand all Loading... |
26 | 26 |
27 #include "config.h" | 27 #include "config.h" |
28 #include "core/testing/Internals.h" | 28 #include "core/testing/Internals.h" |
29 | 29 |
30 #include "bindings/core/v8/ExceptionMessages.h" | 30 #include "bindings/core/v8/ExceptionMessages.h" |
31 #include "bindings/core/v8/ExceptionState.h" | 31 #include "bindings/core/v8/ExceptionState.h" |
32 #include "bindings/core/v8/ScriptFunction.h" | 32 #include "bindings/core/v8/ScriptFunction.h" |
33 #include "bindings/core/v8/ScriptPromise.h" | 33 #include "bindings/core/v8/ScriptPromise.h" |
34 #include "bindings/core/v8/ScriptPromiseResolver.h" | 34 #include "bindings/core/v8/ScriptPromiseResolver.h" |
35 #include "bindings/core/v8/SerializedScriptValue.h" | 35 #include "bindings/core/v8/SerializedScriptValue.h" |
| 36 #include "bindings/core/v8/SerializedScriptValueFactory.h" |
36 #include "bindings/core/v8/V8ThrowException.h" | 37 #include "bindings/core/v8/V8ThrowException.h" |
37 #include "core/InternalRuntimeFlags.h" | 38 #include "core/InternalRuntimeFlags.h" |
38 #include "core/animation/AnimationTimeline.h" | 39 #include "core/animation/AnimationTimeline.h" |
39 #include "core/css/StyleSheetContents.h" | 40 #include "core/css/StyleSheetContents.h" |
40 #include "core/css/resolver/StyleResolver.h" | 41 #include "core/css/resolver/StyleResolver.h" |
41 #include "core/css/resolver/StyleResolverStats.h" | 42 #include "core/css/resolver/StyleResolverStats.h" |
42 #include "core/css/resolver/ViewportStyleResolver.h" | 43 #include "core/css/resolver/ViewportStyleResolver.h" |
43 #include "core/dom/ClientRect.h" | 44 #include "core/dom/ClientRect.h" |
44 #include "core/dom/ClientRectList.h" | 45 #include "core/dom/ClientRectList.h" |
45 #include "core/dom/DOMArrayBuffer.h" | 46 #include "core/dom/DOMArrayBuffer.h" |
(...skipping 1931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1977 { | 1978 { |
1978 String stringValue = value->toWireString(); | 1979 String stringValue = value->toWireString(); |
1979 RefPtr<ArrayBuffer> buffer = ArrayBuffer::createUninitialized(stringValue.le
ngth(), sizeof(UChar)); | 1980 RefPtr<ArrayBuffer> buffer = ArrayBuffer::createUninitialized(stringValue.le
ngth(), sizeof(UChar)); |
1980 stringValue.copyTo(static_cast<UChar*>(buffer->data()), 0, stringValue.lengt
h()); | 1981 stringValue.copyTo(static_cast<UChar*>(buffer->data()), 0, stringValue.lengt
h()); |
1981 return DOMArrayBuffer::create(buffer.release()); | 1982 return DOMArrayBuffer::create(buffer.release()); |
1982 } | 1983 } |
1983 | 1984 |
1984 PassRefPtr<SerializedScriptValue> Internals::deserializeBuffer(PassRefPtr<DOMArr
ayBuffer> buffer) const | 1985 PassRefPtr<SerializedScriptValue> Internals::deserializeBuffer(PassRefPtr<DOMArr
ayBuffer> buffer) const |
1985 { | 1986 { |
1986 String value(static_cast<const UChar*>(buffer->data()), buffer->byteLength()
/ sizeof(UChar)); | 1987 String value(static_cast<const UChar*>(buffer->data()), buffer->byteLength()
/ sizeof(UChar)); |
1987 return SerializedScriptValue::createFromWire(value); | 1988 return SerializedScriptValueFactory::factory().createFromWire(value); |
1988 } | 1989 } |
1989 | 1990 |
1990 void Internals::forceReload(bool endToEnd) | 1991 void Internals::forceReload(bool endToEnd) |
1991 { | 1992 { |
1992 frame()->loader().reload(endToEnd ? EndToEndReload : NormalReload); | 1993 frame()->loader().reload(endToEnd ? EndToEndReload : NormalReload); |
1993 } | 1994 } |
1994 | 1995 |
1995 PassRefPtrWillBeRawPtr<ClientRect> Internals::selectionBounds(ExceptionState& ex
ceptionState) | 1996 PassRefPtrWillBeRawPtr<ClientRect> Internals::selectionBounds(ExceptionState& ex
ceptionState) |
1996 { | 1997 { |
1997 Document* document = contextDocument(); | 1998 Document* document = contextDocument(); |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2336 } | 2337 } |
2337 toHTMLPlugInElement(element)->setPlaceholder(DictionaryPluginPlaceholder::cr
eate(element->document(), options)); | 2338 toHTMLPlugInElement(element)->setPlaceholder(DictionaryPluginPlaceholder::cr
eate(element->document(), options)); |
2338 } | 2339 } |
2339 | 2340 |
2340 Iterator* Internals::iterator(ScriptState* scriptState, ExceptionState& exceptio
nState) | 2341 Iterator* Internals::iterator(ScriptState* scriptState, ExceptionState& exceptio
nState) |
2341 { | 2342 { |
2342 return new InternalsIterator; | 2343 return new InternalsIterator; |
2343 } | 2344 } |
2344 | 2345 |
2345 } // namespace blink | 2346 } // namespace blink |
OLD | NEW |