OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007-2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2007-2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 24 matching lines...) Expand all Loading... |
35 #include "bindings/v8/BindingState.h" | 35 #include "bindings/v8/BindingState.h" |
36 #include "bindings/v8/V8Binding.h" | 36 #include "bindings/v8/V8Binding.h" |
37 #include "core/html/HTMLFrameElement.h" | 37 #include "core/html/HTMLFrameElement.h" |
38 | 38 |
39 namespace WebCore { | 39 namespace WebCore { |
40 | 40 |
41 using namespace HTMLNames; | 41 using namespace HTMLNames; |
42 | 42 |
43 void V8HTMLFrameElement::locationAttrSetterCustom(v8::Local<v8::String> name, v8
::Local<v8::Value> value, const v8::AccessorInfo& info) | 43 void V8HTMLFrameElement::locationAttrSetterCustom(v8::Local<v8::String> name, v8
::Local<v8::Value> value, const v8::AccessorInfo& info) |
44 { | 44 { |
45 HTMLFrameElement* frame = V8HTMLFrameElement::toNative(info.Holder()); | 45 Handle<HTMLFrameElement> frame = adoptRawResult(V8HTMLFrameElement::toNative
(info.Holder())); |
46 String locationValue = toWebCoreStringWithNullCheck(value); | 46 String locationValue = toWebCoreStringWithNullCheck(value); |
47 | 47 |
48 if (!BindingSecurity::allowSettingFrameSrcToJavascriptUrl(BindingState::inst
ance(), frame, locationValue)) | 48 if (!BindingSecurity::allowSettingFrameSrcToJavascriptUrl(BindingState::inst
ance(), frame, locationValue)) |
49 return; | 49 return; |
50 | 50 |
51 frame->setLocation(locationValue); | 51 frame->setLocation(locationValue); |
52 } | 52 } |
53 | 53 |
54 } // namespace WebCore | 54 } // namespace WebCore |
OLD | NEW |