| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 // | 81 // |
| 82 // The client is expected to be set whenever the WebLocalFrameImpl is attached t
o | 82 // The client is expected to be set whenever the WebLocalFrameImpl is attached t
o |
| 83 // the DOM. | 83 // the DOM. |
| 84 | 84 |
| 85 #include "web/WebLocalFrameImpl.h" | 85 #include "web/WebLocalFrameImpl.h" |
| 86 | 86 |
| 87 #include "bindings/core/v8/BindingSecurity.h" | 87 #include "bindings/core/v8/BindingSecurity.h" |
| 88 #include "bindings/core/v8/DOMWrapperWorld.h" | 88 #include "bindings/core/v8/DOMWrapperWorld.h" |
| 89 #include "bindings/core/v8/ExceptionState.h" | 89 #include "bindings/core/v8/ExceptionState.h" |
| 90 #include "bindings/core/v8/ExceptionStatePlaceholder.h" | 90 #include "bindings/core/v8/ExceptionStatePlaceholder.h" |
| 91 #include "bindings/core/v8/ScriptCallStack.h" | |
| 92 #include "bindings/core/v8/ScriptController.h" | 91 #include "bindings/core/v8/ScriptController.h" |
| 93 #include "bindings/core/v8/ScriptSourceCode.h" | 92 #include "bindings/core/v8/ScriptSourceCode.h" |
| 94 #include "bindings/core/v8/ScriptValue.h" | 93 #include "bindings/core/v8/ScriptValue.h" |
| 95 #include "bindings/core/v8/SourceLocation.h" | 94 #include "bindings/core/v8/SourceLocation.h" |
| 96 #include "bindings/core/v8/V8Binding.h" | 95 #include "bindings/core/v8/V8Binding.h" |
| 97 #include "bindings/core/v8/V8GCController.h" | 96 #include "bindings/core/v8/V8GCController.h" |
| 98 #include "bindings/core/v8/V8PerIsolateData.h" | 97 #include "bindings/core/v8/V8PerIsolateData.h" |
| 99 #include "core/HTMLNames.h" | 98 #include "core/HTMLNames.h" |
| 100 #include "core/dom/Document.h" | 99 #include "core/dom/Document.h" |
| 101 #include "core/dom/IconURL.h" | 100 #include "core/dom/IconURL.h" |
| (...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 757 break; | 756 break; |
| 758 case WebConsoleMessage::LevelError: | 757 case WebConsoleMessage::LevelError: |
| 759 webCoreMessageLevel = ErrorMessageLevel; | 758 webCoreMessageLevel = ErrorMessageLevel; |
| 760 break; | 759 break; |
| 761 // Unsupported values. | 760 // Unsupported values. |
| 762 case WebConsoleMessage::LevelInfo: | 761 case WebConsoleMessage::LevelInfo: |
| 763 case WebConsoleMessage::LevelRevokedError: | 762 case WebConsoleMessage::LevelRevokedError: |
| 764 break; | 763 break; |
| 765 } | 764 } |
| 766 | 765 |
| 767 frame()->document()->addConsoleMessage(ConsoleMessage::create(OtherMessageSo
urce, webCoreMessageLevel, message.text, message.url, message.lineNumber, messag
e.columnNumber)); | 766 frame()->document()->addConsoleMessage(ConsoleMessage::create(OtherMessageSo
urce, webCoreMessageLevel, message.text, SourceLocation::create(message.url, mes
sage.lineNumber, message.columnNumber, nullptr))); |
| 768 } | 767 } |
| 769 | 768 |
| 770 void WebLocalFrameImpl::collectGarbage() | 769 void WebLocalFrameImpl::collectGarbage() |
| 771 { | 770 { |
| 772 if (!frame()) | 771 if (!frame()) |
| 773 return; | 772 return; |
| 774 if (!frame()->settings()->scriptEnabled()) | 773 if (!frame()->settings()->scriptEnabled()) |
| 775 return; | 774 return; |
| 776 V8GCController::collectGarbage(v8::Isolate::GetCurrent()); | 775 V8GCController::collectGarbage(v8::Isolate::GetCurrent()); |
| 777 } | 776 } |
| (...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1990 } | 1989 } |
| 1991 | 1990 |
| 1992 void WebLocalFrameImpl::resetMatchCount() | 1991 void WebLocalFrameImpl::resetMatchCount() |
| 1993 { | 1992 { |
| 1994 ensureTextFinder().resetMatchCount(); | 1993 ensureTextFinder().resetMatchCount(); |
| 1995 } | 1994 } |
| 1996 | 1995 |
| 1997 void WebLocalFrameImpl::dispatchMessageEventWithOriginCheck(const WebSecurityOri
gin& intendedTargetOrigin, const WebDOMEvent& event) | 1996 void WebLocalFrameImpl::dispatchMessageEventWithOriginCheck(const WebSecurityOri
gin& intendedTargetOrigin, const WebDOMEvent& event) |
| 1998 { | 1997 { |
| 1999 DCHECK(!event.isNull()); | 1998 DCHECK(!event.isNull()); |
| 2000 frame()->localDOMWindow()->dispatchMessageEventWithOriginCheck(intendedTarge
tOrigin.get(), event, nullptr); | 1999 frame()->localDOMWindow()->dispatchMessageEventWithOriginCheck(intendedTarge
tOrigin.get(), event, SourceLocation::create(String(), 0, 0, nullptr)); |
| 2001 } | 2000 } |
| 2002 | 2001 |
| 2003 int WebLocalFrameImpl::findMatchMarkersVersion() const | 2002 int WebLocalFrameImpl::findMatchMarkersVersion() const |
| 2004 { | 2003 { |
| 2005 DCHECK(!parent()); | 2004 DCHECK(!parent()); |
| 2006 | 2005 |
| 2007 if (m_textFinder) | 2006 if (m_textFinder) |
| 2008 return m_textFinder->findMatchMarkersVersion(); | 2007 return m_textFinder->findMatchMarkersVersion(); |
| 2009 return 0; | 2008 return 0; |
| 2010 } | 2009 } |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2089 return WebSandboxFlags::None; | 2088 return WebSandboxFlags::None; |
| 2090 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); | 2089 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); |
| 2091 } | 2090 } |
| 2092 | 2091 |
| 2093 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) | 2092 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) |
| 2094 { | 2093 { |
| 2095 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); | 2094 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); |
| 2096 } | 2095 } |
| 2097 | 2096 |
| 2098 } // namespace blink | 2097 } // namespace blink |
| OLD | NEW |