Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Side by Side Diff: sky/engine/bindings/core/v8/ScriptController.cpp

Issue 723583002: Make the parser an implementation detail of the Document (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rename textPosition to parserPosition Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/engine/bindings/core/v8/ScriptController.h ('k') | sky/engine/core/dom/Document.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2009 Apple Inc. All rights reserved.
4 * Copyright (C) 2014 Opera Software ASA. All rights reserved. 4 * Copyright (C) 2014 Opera Software ASA. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are 7 * modification, are permitted provided that the following conditions are
8 * met: 8 * met:
9 * 9 *
10 * * Redistributions of source code must retain the above copyright 10 * * Redistributions of source code must retain the above copyright
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 } else { 181 } else {
182 OwnPtr<WindowProxy> isolatedWorldWindowProxy = WindowProxy::create(m _frame, world, m_isolate); 182 OwnPtr<WindowProxy> isolatedWorldWindowProxy = WindowProxy::create(m _frame, world, m_isolate);
183 windowProxy = isolatedWorldWindowProxy.get(); 183 windowProxy = isolatedWorldWindowProxy.get();
184 m_isolatedWorlds.set(world.worldId(), isolatedWorldWindowProxy.relea se()); 184 m_isolatedWorlds.set(world.worldId(), isolatedWorldWindowProxy.relea se());
185 } 185 }
186 } 186 }
187 windowProxy->initializeIfNeeded(); 187 windowProxy->initializeIfNeeded();
188 return windowProxy; 188 return windowProxy;
189 } 189 }
190 190
191 TextPosition ScriptController::eventHandlerPosition() const
192 {
193 HTMLDocumentParser* parser = m_frame->document()->scriptableDocumentParser() ;
194 if (parser)
195 return parser->textPosition();
196 return TextPosition::minimumPosition();
197 }
198
199 V8Extensions& ScriptController::registeredExtensions() 191 V8Extensions& ScriptController::registeredExtensions()
200 { 192 {
201 DEFINE_STATIC_LOCAL(V8Extensions, extensions, ()); 193 DEFINE_STATIC_LOCAL(V8Extensions, extensions, ());
202 return extensions; 194 return extensions;
203 } 195 }
204 196
205 void ScriptController::registerExtensionIfNeeded(v8::Extension* extension) 197 void ScriptController::registerExtensionIfNeeded(v8::Extension* extension)
206 { 198 {
207 const V8Extensions& extensions = registeredExtensions(); 199 const V8Extensions& extensions = registeredExtensions();
208 for (size_t i = 0; i < extensions.size(); ++i) { 200 for (size_t i = 0; i < extensions.size(); ++i) {
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 scriptModule.resolvedDependencies.append(actual); 357 scriptModule.resolvedDependencies.append(actual);
366 } 358 }
367 } 359 }
368 } 360 }
369 } 361 }
370 362
371 V8ScriptRunner::runModule(m_isolate, m_frame->document(), scriptModule); 363 V8ScriptRunner::runModule(m_isolate, m_frame->document(), scriptModule);
372 } 364 }
373 365
374 } // namespace blink 366 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/bindings/core/v8/ScriptController.h ('k') | sky/engine/core/dom/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698