Changeset 93235 in webkit
- Timestamp:
- Aug 17, 2011 12:59:57 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r93229 r93235 1 2011-08-16 Chang Shu <cshu@webkit.org> 2 3 Support reset in WebCore::Internals 4 https://bugs.webkit.org/show_bug.cgi?id=66307 5 6 Reviewed by Dimitri Glazkov. 7 8 New tests will be added when function reset is implemented. 9 10 Added framework code in WebCoreTestSupport. The real implementation of 11 Internals::reset() depends on the need from the settings that require a reset. 12 13 * testing/Internals.cpp: 14 (WebCore::Internals::reset): 15 * testing/Internals.h: 16 * testing/js/WebCoreTestSupport.cpp: 17 (WebCoreTestSupport::resetInternalsObject): 18 * testing/js/WebCoreTestSupport.h: 19 * testing/v8/WebCoreTestSupport.cpp: 20 (WebCoreTestSupport::resetInternalsObject): 21 * testing/v8/WebCoreTestSupport.h: 22 1 23 2011-08-17 Tony Chang <tony@chromium.org> 2 24 -
trunk/Source/WebCore/testing/Internals.cpp
r92697 r93235 43 43 44 44 namespace WebCore { 45 46 const char* Internals::internalsId = "internals"; 45 47 46 48 PassRefPtr<Internals> Internals::create() … … 190 192 } 191 193 194 void Internals::reset(Document*) 195 { 196 // FIXME: Implement 192 197 } 198 199 } -
trunk/Source/WebCore/testing/Internals.h
r92697 r93235 44 44 static PassRefPtr<Internals> create(); 45 45 virtual ~Internals(); 46 46 47 void reset(Document*); 48 47 49 String elementRenderTreeAsText(Element*, ExceptionCode&); 48 50 … … 68 70 void setForceCompositingMode(Document*, bool enabled, ExceptionCode&); 69 71 72 static const char* internalsId; 70 73 private: 71 74 Internals(); -
trunk/Source/WebCore/testing/js/WebCoreTestSupport.cpp
r87948 r93235 29 29 #include "Internals.h" 30 30 #include "JSDOMGlobalObject.h" 31 #include "JSDocument.h" 31 32 #include "JSInternals.h" 32 33 #include <JavaScriptCore/APICast.h> … … 43 44 ExecState* exec = toJS(context); 44 45 JSDOMGlobalObject* globalObject = static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()); 45 globalObject->putDirect(exec->globalData(), Identifier(exec, "internals"), toJS(exec, globalObject, Internals::create())); 46 globalObject->putDirect(exec->globalData(), Identifier(exec, Internals::internalsId), toJS(exec, globalObject, Internals::create())); 47 } 48 49 void resetInternalsObject(JSContextRef context) 50 { 51 JSLock lock(SilenceAssertionsOnly); 52 ExecState* exec = toJS(context); 53 JSDOMGlobalObject* globalObject = static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()); 54 Internals * internals = toInternals(globalObject->getDirect(exec->globalData(), Identifier(exec, Internals::internalsId))); 55 if (internals) { 56 ScriptExecutionContext* scriptContext = globalObject->scriptExecutionContext(); 57 if (scriptContext->isDocument()) 58 internals->reset(static_cast<Document*>(scriptContext)); 59 } 46 60 } 47 61 -
trunk/Source/WebCore/testing/js/WebCoreTestSupport.h
r87948 r93235 32 32 33 33 void injectInternalsObject(JSContextRef); 34 void resetInternalsObject(JSContextRef); 34 35 35 36 } // namespace WebCore -
trunk/Source/WebCore/testing/v8/WebCoreTestSupport.cpp
r87948 r93235 27 27 #include "WebCoreTestSupport.h" 28 28 29 #include "Document.h" 29 30 #include "Internals.h" 31 #include "ScriptExecutionContext.h" 30 32 #include "V8Internals.h" 31 33 … … 41 43 v8::HandleScope scope; 42 44 43 context->Global()->Set(v8::String::New("internals"), toV8(Internals::create())); 45 context->Global()->Set(v8::String::New(Internals::internalsId), toV8(Internals::create())); 46 } 47 48 void resetInternalsObject(v8::Local<v8::Context> context) 49 { 50 v8::Context::Scope contextScope(context); 51 v8::HandleScope scope; 52 53 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(context->Global()->Get(v8::String::New(Internals::internalsId))); 54 Internals * internals = V8Internals::toNative(object); 55 if (internals) { 56 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); 57 if (scriptContext->isDocument()) 58 internals->reset(static_cast<Document*>(scriptContext)); 59 } 44 60 } 45 61 -
trunk/Source/WebCore/testing/v8/WebCoreTestSupport.h
r87948 r93235 35 35 36 36 void injectInternalsObject(v8::Local<v8::Context>); 37 void resetInternalsObject(v8::Local<v8::Context>); 37 38 38 39 } // namespace WebCore -
trunk/Source/WebKit/chromium/ChangeLog
r93228 r93235 1 2011-08-16 Chang Shu <cshu@webkit.org> 2 3 Support reset in WebCore::Internals 4 https://bugs.webkit.org/show_bug.cgi?id=66307 5 6 Reviewed by Dimitri Glazkov. 7 8 Added framework code in WebKit. 9 10 * public/WebTestingSupport.h: 11 * src/WebTestingSupport.cpp: 12 (WebKit::WebTestingSupport::resetInternalsObject): 13 1 14 2011-08-15 Aaron Boodman <aa@chromium.org> 2 15 -
trunk/Source/WebKit/chromium/public/WebTestingSupport.h
r92322 r93235 36 36 public: 37 37 WEBKIT_EXPORT static void injectInternalsObject(WebFrame*); 38 WEBKIT_EXPORT static void resetInternalsObject(WebFrame*); 38 39 }; 39 40 -
trunk/Source/WebKit/chromium/src/WebTestingSupport.cpp
r87948 r93235 39 39 } 40 40 41 void WebTestingSupport::resetInternalsObject(WebFrame* frame) 42 { 43 v8::HandleScope handleScope; 44 WebCoreTestSupport::resetInternalsObject(frame->mainWorldScriptContext()); 41 45 } 46 47 } -
trunk/Source/WebKit/qt/ChangeLog
r93093 r93235 1 2011-08-16 Chang Shu <cshu@webkit.org> 2 3 Support reset in WebCore::Internals 4 https://bugs.webkit.org/show_bug.cgi?id=66307 5 6 Reviewed by Dimitri Glazkov. 7 8 Added framework code in WebKit. 9 10 * WebCoreSupport/DumpRenderTreeSupportQt.cpp: 11 (DumpRenderTreeSupportQt::resetInternalsObject): 12 * WebCoreSupport/DumpRenderTreeSupportQt.h: 13 1 14 2011-08-16 Lindsay Mathieson <lindsay.mathieson@gmail.com> 2 15 -
trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
r90341 r93235 1166 1166 } 1167 1167 1168 void DumpRenderTreeSupportQt::resetInternalsObject(QWebFrame* frame) 1169 { 1170 WebCore::Frame* coreFrame = QWebFramePrivate::core(frame); 1171 #if USE(JSC) 1172 JSC::JSLock lock(JSC::SilenceAssertionsOnly); 1173 1174 JSDOMWindow* window = toJSDOMWindow(coreFrame, mainThreadNormalWorld()); 1175 Q_ASSERT(window); 1176 1177 JSC::ExecState* exec = window->globalExec(); 1178 Q_ASSERT(exec); 1179 1180 JSContextRef context = toRef(exec); 1181 WebCoreTestSupport::resetInternalsObject(context); 1182 #elif USE(V8) 1183 WebCoreTestSupport::resetInternalsObject(V8Proxy::mainWorldContext(coreFrame)); 1184 #endif 1185 } 1186 1168 1187 // Provide a backward compatibility with previously exported private symbols as of QtWebKit 4.6 release 1169 1188 -
trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
r90341 r93235 214 214 215 215 static void injectInternalsObject(QWebFrame*); 216 static void resetInternalsObject(QWebFrame*); 216 217 217 218 static void setInteractiveFormValidationEnabled(QWebPage*, bool); -
trunk/Tools/ChangeLog
r93231 r93235 1 2011-08-16 Chang Shu <cshu@webkit.org> 2 3 Support reset in WebCore::Internals 4 https://bugs.webkit.org/show_bug.cgi?id=66307 5 6 Reviewed by Dimitri Glazkov. 7 8 Added call to resetInternalsObject in DRT. 9 10 * DumpRenderTree/chromium/TestShell.cpp: 11 (TestShell::resetTestController): 12 * DumpRenderTree/mac/DumpRenderTree.mm: 13 (resetWebViewToConsistentStateBeforeTesting): 14 * DumpRenderTree/qt/DumpRenderTreeQt.cpp: 15 (WebCore::WebPage::resetSettings): 16 1 17 2011-08-17 Alexis Menard <alexis.menard@openbossa.org> 2 18 -
trunk/Tools/DumpRenderTree/chromium/TestShell.cpp
r92341 r93235 269 269 webView()->scalePage(1, WebPoint(0, 0)); 270 270 webView()->mainFrame()->clearOpener(); 271 WebTestingSupport::resetInternalsObject(webView()->mainFrame()); 271 272 } 272 273 -
trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm
r92785 r93235 52 52 #import "UIDelegate.h" 53 53 #import "WebArchiveDumpSupport.h" 54 #import "WebCoreTestSupport.h" 54 55 #import "WorkQueue.h" 55 56 #import "WorkQueueItem.h" … … 1057 1058 resetDefaultsToConsistentValues(); 1058 1059 1060 if (gLayoutTestController) 1061 WebCoreTestSupport::resetInternalsObject([mainFrame globalContext]); 1062 1059 1063 [[mainFrame webView] setSmartInsertDeleteEnabled:YES]; 1060 1064 [[[mainFrame webView] inspector] setJavaScriptProfilingEnabled:NO]; -
trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
r90951 r93235 212 212 DumpRenderTreeSupportQt::setMinimumTimerInterval(this, DumpRenderTreeSupportQt::defaultMinimumTimerInterval()); 213 213 214 DumpRenderTreeSupportQt::resetInternalsObject(mainFrame()); 215 214 216 m_pendingGeolocationRequests.clear(); 215 217 }
Note: See TracChangeset
for help on using the changeset viewer.