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

Unified Diff: sky/engine/web/WebViewImpl.cpp

Issue 928393003: Remove the concept of document.documentElement (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/web/WebViewImpl.h ('k') | sky/tests/clipping/background-opaque-clipped-gradients-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/web/WebViewImpl.cpp
diff --git a/sky/engine/web/WebViewImpl.cpp b/sky/engine/web/WebViewImpl.cpp
index d5e71577ddc02843231932f7440e996bbc7d6d1d..d6463bc78ce9ef79a90d2b4bc383b711accac8b4 100644
--- a/sky/engine/web/WebViewImpl.cpp
+++ b/sky/engine/web/WebViewImpl.cpp
@@ -453,26 +453,6 @@ bool WebViewImpl::confirmComposition(const WebString& text, ConfirmCompositionBe
return focused->inputMethodController().confirmCompositionOrInsertText(text, selectionBehavior == KeepSelection ? InputMethodController::KeepSelection : InputMethodController::DoNotKeepSelection);
}
-bool WebViewImpl::compositionRange(size_t* location, size_t* length)
-{
- LocalFrame* focused = focusedCoreFrame();
- if (!focused || !m_imeAcceptEvents)
- return false;
-
- RefPtr<Range> range = focused->inputMethodController().compositionRange();
- if (!range)
- return false;
-
- Element* editable = focused->selection().rootEditableElementOrDocumentElement();
- ASSERT(editable);
- PlainTextRange plainTextRange(PlainTextRange::create(*editable, *range.get()));
- if (plainTextRange.isNull())
- return false;
- *location = plainTextRange.start();
- *length = plainTextRange.length();
- return true;
-}
-
WebTextInputInfo WebViewImpl::textInputInfo()
{
WebTextInputInfo info;
@@ -582,18 +562,6 @@ WebVector<WebCompositionUnderline> WebViewImpl::compositionUnderlines() const
return results;
}
-WebColor WebViewImpl::backgroundColor() const
-{
- if (isTransparent())
- return Color::transparent;
- if (!m_page)
- return m_baseBackgroundColor;
- if (!m_page->mainFrame())
- return m_baseBackgroundColor;
- FrameView* view = m_page->mainFrame()->view();
- return view->documentBackgroundColor().rgb();
-}
-
// WebView --------------------------------------------------------------------
WebSettingsImpl* WebViewImpl::settingsImpl()
@@ -624,9 +592,7 @@ void WebViewImpl::injectModule(const WebString& path)
RefPtr<Document> document = m_page->mainFrame()->document();
RefPtr<HTMLImportElement> import = HTMLImportElement::create(*document);
import->setAttribute(HTMLNames::srcAttr, path);
- if (!document->documentElement())
- return;
- document->documentElement()->appendChild(import.release());
+ document->appendChild(import.release());
}
void WebViewImpl::setFocusedFrame(WebFrame* frame)
« no previous file with comments | « sky/engine/web/WebViewImpl.h ('k') | sky/tests/clipping/background-opaque-clipped-gradients-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698