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

Unified Diff: sky/engine/web/WebLocalFrameImpl.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/WebLocalFrameImpl.h ('k') | sky/engine/web/WebRange.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/web/WebLocalFrameImpl.cpp
diff --git a/sky/engine/web/WebLocalFrameImpl.cpp b/sky/engine/web/WebLocalFrameImpl.cpp
index 94d5c6480c0653e467795e8a6812634e776b90e4..08e46fd0f2d0d49ef47a4ce15d34df1500241cf0 100644
--- a/sky/engine/web/WebLocalFrameImpl.cpp
+++ b/sky/engine/web/WebLocalFrameImpl.cpp
@@ -154,7 +154,7 @@ static void frameContentAsPlainText(size_t maxChars, LocalFrame* frame, StringBu
// Select the document body.
RefPtr<Range> range(document->createRange());
TrackExceptionState exceptionState;
- range->selectNodeContents(document->documentElement(), exceptionState);
+ range->selectNodeContents(document, exceptionState);
if (!exceptionState.had_exception()) {
// The text iterator will walk nodes giving us text. This is similar to
@@ -293,42 +293,6 @@ bool WebLocalFrameImpl::hasMarkedText() const
return frame()->inputMethodController().hasComposition();
}
-WebRange WebLocalFrameImpl::markedRange() const
-{
- return frame()->inputMethodController().compositionRange();
-}
-
-bool WebLocalFrameImpl::firstRectForCharacterRange(unsigned location, unsigned length, WebRect& rect) const
-{
- if ((location + length < location) && (location + length))
- length = 0;
-
- Element* editable = frame()->selection().rootEditableElementOrDocumentElement();
- ASSERT(editable);
- RefPtr<Range> range = PlainTextRange(location, location + length).createRange(*editable);
- if (!range)
- return false;
- IntRect intRect = frame()->editor().firstRectForRange(range.get());
- rect = WebRect(intRect);
- rect = frame()->view()->contentsToWindow(rect);
- return true;
-}
-
-size_t WebLocalFrameImpl::characterIndexForPoint(const WebPoint& webPoint) const
-{
- if (!frame())
- return kNotFound;
-
- IntPoint point = frame()->view()->windowToContents(webPoint);
- HitTestResult result = frame()->eventHandler().hitTestResultAtPoint(point, HitTestRequest::ReadOnly | HitTestRequest::Active);
- RefPtr<Range> range = frame()->rangeForPoint(result.roundedPointInInnerNodeFrame());
- if (!range)
- return kNotFound;
- Element* editable = frame()->selection().rootEditableElementOrDocumentElement();
- ASSERT(editable);
- return PlainTextRange::create(*editable, *range.get()).start();
-}
-
bool WebLocalFrameImpl::executeCommand(const WebString& name, const WebNode& node)
{
ASSERT(frame());
« no previous file with comments | « sky/engine/web/WebLocalFrameImpl.h ('k') | sky/engine/web/WebRange.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698