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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 String Internals::address(Node* node) | 262 String Internals::address(Node* node) |
263 { | 263 { |
264 char buf[32]; | 264 char buf[32]; |
265 sprintf(buf, "%p", node); | 265 sprintf(buf, "%p", node); |
266 | 266 |
267 return String(buf); | 267 return String(buf); |
268 } | 268 } |
269 | 269 |
270 GCObservation* Internals::observeGC(ScriptValue scriptValue) | 270 GCObservation* Internals::observeGC(ScriptValue scriptValue) |
271 { | 271 { |
272 v8::Handle<v8::Value> observedValue = scriptValue.v8Value(); | 272 v8::Local<v8::Value> observedValue = scriptValue.v8Value(); |
273 ASSERT(!observedValue.IsEmpty()); | 273 ASSERT(!observedValue.IsEmpty()); |
274 if (observedValue->IsNull() || observedValue->IsUndefined()) { | 274 if (observedValue->IsNull() || observedValue->IsUndefined()) { |
275 V8ThrowException::throwTypeError(v8::Isolate::GetCurrent(), "value to ob
serve is null or undefined"); | 275 V8ThrowException::throwTypeError(v8::Isolate::GetCurrent(), "value to ob
serve is null or undefined"); |
276 return nullptr; | 276 return nullptr; |
277 } | 277 } |
278 | 278 |
279 return GCObservation::create(observedValue); | 279 return GCObservation::create(observedValue); |
280 } | 280 } |
281 | 281 |
282 unsigned Internals::updateStyleAndReturnAffectedElementCount(ExceptionState& exc
eptionState) const | 282 unsigned Internals::updateStyleAndReturnAffectedElementCount(ExceptionState& exc
eptionState) const |
(...skipping 1800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2083 return; | 2083 return; |
2084 } | 2084 } |
2085 | 2085 |
2086 return toHTMLInputElement(*element).setShouldRevealPassword(reveal); | 2086 return toHTMLInputElement(*element).setShouldRevealPassword(reveal); |
2087 } | 2087 } |
2088 | 2088 |
2089 namespace { | 2089 namespace { |
2090 | 2090 |
2091 class AddOneFunction : public ScriptFunction { | 2091 class AddOneFunction : public ScriptFunction { |
2092 public: | 2092 public: |
2093 static v8::Handle<v8::Function> createFunction(ScriptState* scriptState) | 2093 static v8::Local<v8::Function> createFunction(ScriptState* scriptState) |
2094 { | 2094 { |
2095 AddOneFunction* self = new AddOneFunction(scriptState); | 2095 AddOneFunction* self = new AddOneFunction(scriptState); |
2096 return self->bindToV8Function(); | 2096 return self->bindToV8Function(); |
2097 } | 2097 } |
2098 | 2098 |
2099 private: | 2099 private: |
2100 explicit AddOneFunction(ScriptState* scriptState) | 2100 explicit AddOneFunction(ScriptState* scriptState) |
2101 : ScriptFunction(scriptState) | 2101 : ScriptFunction(scriptState) |
2102 { | 2102 { |
2103 } | 2103 } |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2366 | 2366 |
2367 ClientRectList* Internals::focusRingRects(Element* element) | 2367 ClientRectList* Internals::focusRingRects(Element* element) |
2368 { | 2368 { |
2369 Vector<LayoutRect> rects; | 2369 Vector<LayoutRect> rects; |
2370 if (element && element->layoutObject()) | 2370 if (element && element->layoutObject()) |
2371 element->layoutObject()->addFocusRingRects(rects, LayoutPoint()); | 2371 element->layoutObject()->addFocusRingRects(rects, LayoutPoint()); |
2372 return ClientRectList::create(rects); | 2372 return ClientRectList::create(rects); |
2373 } | 2373 } |
2374 | 2374 |
2375 } // namespace blink | 2375 } // namespace blink |
OLD | NEW |