Changeset 128095 in webkit
- Timestamp:
- Sep 10, 2012 1:21:33 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r128094 r128095 1 2012-09-10 Adam Barth <abarth@chromium.org> 2 3 [V8] V8HTMLDocument::write and friends should not indirect through Frame 4 https://bugs.webkit.org/show_bug.cgi?id=96289 5 6 Reviewed by Eric Seidel. 7 8 There is no reason why document.write and friends need to indirect 9 through the Frame to find the active document. This patch makes these 10 functions work the same as the JSC versions. 11 12 * bindings/v8/BindingState.cpp: 13 * bindings/v8/BindingState.h: 14 - This patch removes the last callers of activeFrame, so we can 15 remove the function entirely. 16 * bindings/v8/custom/V8HTMLDocumentCustom.cpp: 17 (WebCore::V8HTMLDocument::writeCallback): 18 (WebCore::V8HTMLDocument::writelnCallback): 19 (WebCore::V8HTMLDocument::openCallback): 20 1 21 2012-09-10 Adam Barth <abarth@chromium.org> 2 22 -
trunk/Source/WebCore/bindings/v8/BindingState.cpp
r126249 r128095 67 67 } 68 68 69 Frame* activeFrame(BindingState*)70 {71 v8::Handle<v8::Context> context = activeContext();72 if (context.IsEmpty())73 return 0;74 return toFrameIfNotDetached(context);75 }76 77 69 Frame* firstFrame(BindingState*) 78 70 { -
trunk/Source/WebCore/bindings/v8/BindingState.h
r126249 r128095 50 50 DOMWindow* firstDOMWindow(BindingState*); 51 51 52 Frame* activeFrame(BindingState*);53 52 Frame* firstFrame(BindingState*); 54 53 -
trunk/Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp
r127946 r128095 120 120 INC_STATS("DOM.HTMLDocument.write()"); 121 121 HTMLDocument* htmlDocument = V8HTMLDocument::toNative(args.Holder()); 122 Frame* frame = activeFrame(BindingState::instance()); 123 htmlDocument->write(writeHelperGetString(args), frame ? frame->document() : NULL); 122 htmlDocument->write(writeHelperGetString(args), activeDOMWindow(BindingState::instance())->document()); 124 123 return v8::Undefined(); 125 124 } … … 129 128 INC_STATS("DOM.HTMLDocument.writeln()"); 130 129 HTMLDocument* htmlDocument = V8HTMLDocument::toNative(args.Holder()); 131 Frame* frame = activeFrame(BindingState::instance()); 132 htmlDocument->writeln(writeHelperGetString(args), frame ? frame->document() : NULL); 130 htmlDocument->writeln(writeHelperGetString(args), activeDOMWindow(BindingState::instance())->document()); 133 131 return v8::Undefined(); 134 132 } … … 161 159 } 162 160 163 Frame* frame = activeFrame(BindingState::instance()); 164 htmlDocument->open(frame ? frame->document() : NULL); 165 // Return the document. 161 htmlDocument->open(activeDOMWindow(BindingState::instance())->document()); 166 162 return args.Holder(); 167 163 }
Note: See TracChangeset
for help on using the changeset viewer.