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 1785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1796 return; | 1796 return; |
1797 | 1797 |
1798 String script = decodeURLEscapeSequences(url.string().substring(strlen("java
script:"))); | 1798 String script = decodeURLEscapeSequences(url.string().substring(strlen("java
script:"))); |
1799 UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture); | 1799 UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture); |
1800 v8::HandleScope handleScope(toIsolate(frame())); | 1800 v8::HandleScope handleScope(toIsolate(frame())); |
1801 v8::Local<v8::Value> result = frame()->script().executeScriptInMainWorldAndR
eturnValue(ScriptSourceCode(script)); | 1801 v8::Local<v8::Value> result = frame()->script().executeScriptInMainWorldAndR
eturnValue(ScriptSourceCode(script)); |
1802 if (result.IsEmpty() || !result->IsString()) | 1802 if (result.IsEmpty() || !result->IsString()) |
1803 return; | 1803 return; |
1804 String scriptResult = toCoreString(v8::Handle<v8::String>::Cast(result)); | 1804 String scriptResult = toCoreString(v8::Handle<v8::String>::Cast(result)); |
1805 if (!frame()->navigationScheduler().locationChangePending()) | 1805 if (!frame()->navigationScheduler().locationChangePending()) |
1806 frame()->document()->loader()->replaceDocument(scriptResult, ownerDocume
nt.get()); | 1806 frame()->loader().replaceDocumentWhileExecutingJavaScriptURL(scriptResul
t, ownerDocument.get()); |
1807 } | 1807 } |
1808 | 1808 |
1809 void WebLocalFrameImpl::addStyleSheetByURL(const WebString& url) | 1809 void WebLocalFrameImpl::addStyleSheetByURL(const WebString& url) |
1810 { | 1810 { |
1811 RefPtrWillBeRawPtr<Element> styleElement = frame()->document()->createElemen
t(HTMLNames::linkTag, false); | 1811 RefPtrWillBeRawPtr<Element> styleElement = frame()->document()->createElemen
t(HTMLNames::linkTag, false); |
1812 | 1812 |
1813 styleElement->setAttribute(HTMLNames::typeAttr, "text/css"); | 1813 styleElement->setAttribute(HTMLNames::typeAttr, "text/css"); |
1814 styleElement->setAttribute(HTMLNames::relAttr, "stylesheet"); | 1814 styleElement->setAttribute(HTMLNames::relAttr, "stylesheet"); |
1815 styleElement->setAttribute(HTMLNames::hrefAttr, url); | 1815 styleElement->setAttribute(HTMLNames::hrefAttr, url); |
1816 | 1816 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1867 | 1867 |
1868 void WebLocalFrameImpl::invalidateAll() const | 1868 void WebLocalFrameImpl::invalidateAll() const |
1869 { | 1869 { |
1870 ASSERT(frame() && frame()->view()); | 1870 ASSERT(frame() && frame()->view()); |
1871 FrameView* view = frame()->view(); | 1871 FrameView* view = frame()->view(); |
1872 view->invalidateRect(view->frameRect()); | 1872 view->invalidateRect(view->frameRect()); |
1873 invalidateScrollbar(); | 1873 invalidateScrollbar(); |
1874 } | 1874 } |
1875 | 1875 |
1876 } // namespace blink | 1876 } // namespace blink |
OLD | NEW |