Chromium Code Reviews| Index: Source/core/dom/Document.cpp |
| diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
| index 3d9b2ff48daa51b26d54f977f31b9b48e03af427..d2ecd4f001a1d5b6841ff803c7b415e9c221eab5 100644 |
| --- a/Source/core/dom/Document.cpp |
| +++ b/Source/core/dom/Document.cpp |
| @@ -361,7 +361,7 @@ static void printNavigationErrorMessage(const LocalFrame& frame, const KURL& act |
| String message = "Unsafe JavaScript attempt to initiate navigation for frame with URL '" + frame.document()->url().string() + "' from frame with URL '" + activeURL.string() + "'. " + reason + "\n"; |
| // FIXME: should we print to the console of the document performing the navigation instead? |
| - frame.domWindow()->printErrorMessage(message); |
| + frame.localDOMWindow()->printErrorMessage(message); |
| } |
| uint64_t Document::s_globalTreeVersion = 0; |
| @@ -443,7 +443,7 @@ Document::Document(const DocumentInit& initializer, DocumentClassFlags documentC |
| , m_evaluateMediaQueriesOnStyleRecalc(false) |
| , m_pendingSheetLayout(NoLayoutWithPendingSheets) |
| , m_frame(initializer.frame()) |
| - , m_domWindow(m_frame ? m_frame->domWindow() : 0) |
| + , m_domWindow(m_frame ? m_frame->localDOMWindow() : 0) |
| , m_importsController(initializer.importsController()) |
| , m_activeParserCount(0) |
| , m_contextFeatures(ContextFeatures::defaultSwitch()) |
| @@ -2634,10 +2634,10 @@ void Document::dispatchUnloadEvents() |
| DocumentLoadTiming* timing = documentLoader->timing(); |
| ASSERT(timing->navigationStart()); |
| timing->markUnloadEventStart(); |
| - m_frame->domWindow()->dispatchEvent(unloadEvent, this); |
| + m_frame->localDOMWindow()->dispatchEvent(unloadEvent, this); |
| timing->markUnloadEventEnd(); |
| } else { |
| - m_frame->domWindow()->dispatchEvent(unloadEvent, m_frame->document()); |
| + m_frame->localDOMWindow()->dispatchEvent(unloadEvent, m_frame->document()); |
| } |
| } |
| m_loadEventProgress = UnloadEventHandled; |
| @@ -5205,7 +5205,7 @@ void Document::serviceScriptedAnimations(double monotonicAnimationStartTime) |
| m_scriptedAnimationController->serviceScriptedAnimations(monotonicAnimationStartTime); |
| } |
| -PassRefPtrWillBeRawPtr<Touch> Document::createTouch(LocalDOMWindow* window, EventTarget* target, int identifier, double pageX, double pageY, double screenX, double screenY, double radiusX, double radiusY, float rotationAngle, float force) const |
| +PassRefPtrWillBeRawPtr<Touch> Document::createTouch(DOMWindow* window, EventTarget* target, int identifier, double pageX, double pageY, double screenX, double screenY, double radiusX, double radiusY, float rotationAngle, float force) const |
|
haraken
2014/10/31 06:07:04
Why doesn't this method take a LocalDOMWindow* par
dcheng
2014/10/31 06:31:01
This is tricky. This is required because of severa
|
| { |
| // Match behavior from when these types were integers, and avoid surprises from someone explicitly |
| // passing Infinity/NaN. |
| @@ -5230,7 +5230,7 @@ PassRefPtrWillBeRawPtr<Touch> Document::createTouch(LocalDOMWindow* window, Even |
| // http://developer.apple.com/library/safari/#documentation/UserExperience/Reference/DocumentAdditionsReference/DocumentAdditions/DocumentAdditions.html |
| // when this method should throw and nor is it by inspection of iOS behavior. It would be nice to verify any cases where it throws under iOS |
| // and implement them here. See https://bugs.webkit.org/show_bug.cgi?id=47819 |
| - LocalFrame* frame = window ? window->frame() : this->frame(); |
| + LocalFrame* frame = window ? toLocalDOMWindow(window)->frame() : this->frame(); |
|
haraken
2014/10/31 06:07:04
Here we're assuming that |window| is a LocalDOMWin
dcheng
2014/10/31 06:31:01
This change is actually incorrect--I forgot to upd
|
| return Touch::create(frame, target, identifier, FloatPoint(screenX, screenY), FloatPoint(pageX, pageY), FloatSize(radiusX, radiusY), rotationAngle, force); |
| } |