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 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
750 break; | 749 break; |
751 case WebConsoleMessage::LevelError: | 750 case WebConsoleMessage::LevelError: |
752 webCoreMessageLevel = ErrorMessageLevel; | 751 webCoreMessageLevel = ErrorMessageLevel; |
753 break; | 752 break; |
754 // Unsupported values. | 753 // Unsupported values. |
755 case WebConsoleMessage::LevelInfo: | 754 case WebConsoleMessage::LevelInfo: |
756 case WebConsoleMessage::LevelRevokedError: | 755 case WebConsoleMessage::LevelRevokedError: |
757 break; | 756 break; |
758 } | 757 } |
759 | 758 |
760 frame()->document()->addConsoleMessage(ConsoleMessage::create(OtherMessageSo
urce, webCoreMessageLevel, message.text, message.url, message.lineNumber, messag
e.columnNumber)); | 759 frame()->document()->addConsoleMessage(ConsoleMessage::create(OtherMessageSo
urce, webCoreMessageLevel, message.text, SourceLocation::create(message.url, mes
sage.lineNumber, message.columnNumber, nullptr))); |
761 } | 760 } |
762 | 761 |
763 void WebLocalFrameImpl::collectGarbage() | 762 void WebLocalFrameImpl::collectGarbage() |
764 { | 763 { |
765 if (!frame()) | 764 if (!frame()) |
766 return; | 765 return; |
767 if (!frame()->settings()->scriptEnabled()) | 766 if (!frame()->settings()->scriptEnabled()) |
768 return; | 767 return; |
769 V8GCController::collectGarbage(v8::Isolate::GetCurrent()); | 768 V8GCController::collectGarbage(v8::Isolate::GetCurrent()); |
770 } | 769 } |
(...skipping 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1991 } | 1990 } |
1992 | 1991 |
1993 void WebLocalFrameImpl::resetMatchCount() | 1992 void WebLocalFrameImpl::resetMatchCount() |
1994 { | 1993 { |
1995 ensureTextFinder().resetMatchCount(); | 1994 ensureTextFinder().resetMatchCount(); |
1996 } | 1995 } |
1997 | 1996 |
1998 void WebLocalFrameImpl::dispatchMessageEventWithOriginCheck(const WebSecurityOri
gin& intendedTargetOrigin, const WebDOMEvent& event) | 1997 void WebLocalFrameImpl::dispatchMessageEventWithOriginCheck(const WebSecurityOri
gin& intendedTargetOrigin, const WebDOMEvent& event) |
1999 { | 1998 { |
2000 DCHECK(!event.isNull()); | 1999 DCHECK(!event.isNull()); |
2001 frame()->localDOMWindow()->dispatchMessageEventWithOriginCheck(intendedTarge
tOrigin.get(), event, nullptr); | 2000 frame()->localDOMWindow()->dispatchMessageEventWithOriginCheck(intendedTarge
tOrigin.get(), event, SourceLocation::create(String(), 0, 0, nullptr)); |
2002 } | 2001 } |
2003 | 2002 |
2004 int WebLocalFrameImpl::findMatchMarkersVersion() const | 2003 int WebLocalFrameImpl::findMatchMarkersVersion() const |
2005 { | 2004 { |
2006 DCHECK(!parent()); | 2005 DCHECK(!parent()); |
2007 | 2006 |
2008 if (m_textFinder) | 2007 if (m_textFinder) |
2009 return m_textFinder->findMatchMarkersVersion(); | 2008 return m_textFinder->findMatchMarkersVersion(); |
2010 return 0; | 2009 return 0; |
2011 } | 2010 } |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2090 return WebSandboxFlags::None; | 2089 return WebSandboxFlags::None; |
2091 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); | 2090 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); |
2092 } | 2091 } |
2093 | 2092 |
2094 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) | 2093 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) |
2095 { | 2094 { |
2096 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); | 2095 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); |
2097 } | 2096 } |
2098 | 2097 |
2099 } // namespace blink | 2098 } // namespace blink |
OLD | NEW |