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

Side by Side Diff: sky/engine/web/WebViewImpl.cpp

Issue 696413002: Remove HTMLLinkElement (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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/web/WebLocalFrameImpl.cpp ('k') | no next file » | 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) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "core/editing/InputMethodController.h" 43 #include "core/editing/InputMethodController.h"
44 #include "core/editing/TextIterator.h" 44 #include "core/editing/TextIterator.h"
45 #include "core/editing/markup.h" 45 #include "core/editing/markup.h"
46 #include "core/events/KeyboardEvent.h" 46 #include "core/events/KeyboardEvent.h"
47 #include "core/events/WheelEvent.h" 47 #include "core/events/WheelEvent.h"
48 #include "core/frame/EventHandlerRegistry.h" 48 #include "core/frame/EventHandlerRegistry.h"
49 #include "core/frame/FrameHost.h" 49 #include "core/frame/FrameHost.h"
50 #include "core/frame/FrameView.h" 50 #include "core/frame/FrameView.h"
51 #include "core/frame/LocalFrame.h" 51 #include "core/frame/LocalFrame.h"
52 #include "core/frame/Settings.h" 52 #include "core/frame/Settings.h"
53 #include "core/html/HTMLLinkElement.h" 53 #include "core/html/HTMLImportElement.h"
54 #include "core/html/HTMLMediaElement.h" 54 #include "core/html/HTMLMediaElement.h"
55 #include "core/html/ime/InputMethodContext.h" 55 #include "core/html/ime/InputMethodContext.h"
56 #include "core/loader/FrameLoader.h" 56 #include "core/loader/FrameLoader.h"
57 #include "core/loader/UniqueIdentifier.h" 57 #include "core/loader/UniqueIdentifier.h"
58 #include "core/page/Chrome.h" 58 #include "core/page/Chrome.h"
59 #include "core/page/EventHandler.h" 59 #include "core/page/EventHandler.h"
60 #include "core/page/EventWithHitTestResults.h" 60 #include "core/page/EventWithHitTestResults.h"
61 #include "core/page/FocusController.h" 61 #include "core/page/FocusController.h"
62 #include "core/page/Page.h" 62 #include "core/page/Page.h"
63 #include "core/page/TouchDisambiguation.h" 63 #include "core/page/TouchDisambiguation.h"
(...skipping 1589 matching lines...) Expand 10 before | Expand all | Expand 10 after
1653 } 1653 }
1654 1654
1655 WebFrame* WebViewImpl::focusedFrame() 1655 WebFrame* WebViewImpl::focusedFrame()
1656 { 1656 {
1657 return WebFrame::fromFrame(focusedCoreFrame()); 1657 return WebFrame::fromFrame(focusedCoreFrame());
1658 } 1658 }
1659 1659
1660 void WebViewImpl::injectModule(const WebString& path) 1660 void WebViewImpl::injectModule(const WebString& path)
1661 { 1661 {
1662 RefPtr<Document> document = m_page->mainFrame()->document(); 1662 RefPtr<Document> document = m_page->mainFrame()->document();
1663 RefPtr<HTMLLinkElement> link = HTMLLinkElement::create(*document, false); 1663 RefPtr<HTMLImportElement> import = HTMLImportElement::create(*document);
1664 link->setAttribute(HTMLNames::relAttr, "import"); 1664 import->setAttribute(HTMLNames::srcAttr, path);
1665 link->setAttribute(HTMLNames::hrefAttr, path);
1666 if (!document->documentElement()) 1665 if (!document->documentElement())
1667 return; 1666 return;
1668 document->documentElement()->appendChild(link.release()); 1667 document->documentElement()->appendChild(import.release());
1669 } 1668 }
1670 1669
1671 void WebViewImpl::setFocusedFrame(WebFrame* frame) 1670 void WebViewImpl::setFocusedFrame(WebFrame* frame)
1672 { 1671 {
1673 if (!frame) { 1672 if (!frame) {
1674 // Clears the focused frame if any. 1673 // Clears the focused frame if any.
1675 LocalFrame* focusedFrame = focusedCoreFrame(); 1674 LocalFrame* focusedFrame = focusedCoreFrame();
1676 if (focusedFrame) 1675 if (focusedFrame)
1677 focusedFrame->selection().setFocused(false); 1676 focusedFrame->selection().setFocused(false);
1678 return; 1677 return;
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
2405 m_layerTreeView->setVisible(visible); 2404 m_layerTreeView->setVisible(visible);
2406 } 2405 }
2407 } 2406 }
2408 2407
2409 bool WebViewImpl::shouldDisableDesktopWorkarounds() 2408 bool WebViewImpl::shouldDisableDesktopWorkarounds()
2410 { 2409 {
2411 return true; 2410 return true;
2412 } 2411 }
2413 2412
2414 } // namespace blink 2413 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/web/WebLocalFrameImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698