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

Side by Side Diff: Source/core/page/Frame.cpp

Issue 24278008: [oilpan] Handlify Nodes in htmlediting (Closed) Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Simon Hausmann <hausmann@kde.org> 5 * 2000 Simon Hausmann <hausmann@kde.org>
6 * 2000 Stefan Schimanski <1Stein@gmx.de> 6 * 2000 Stefan Schimanski <1Stein@gmx.de>
7 * 2001 George Staikos <staikos@kde.org> 7 * 2001 George Staikos <staikos@kde.org>
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 { 500 {
501 HitTestResult result = eventHandler()->hitTestResultAtPoint(framePoint, HitT estRequest::ReadOnly | HitTestRequest::Active); 501 HitTestResult result = eventHandler()->hitTestResultAtPoint(framePoint, HitT estRequest::ReadOnly | HitTestRequest::Active);
502 Handle<Node> node = result.innerNonSharedNode(); 502 Handle<Node> node = result.innerNonSharedNode();
503 if (!node) 503 if (!node)
504 return VisiblePosition(); 504 return VisiblePosition();
505 RenderObject* renderer = node->renderer(); 505 RenderObject* renderer = node->renderer();
506 if (!renderer) 506 if (!renderer)
507 return VisiblePosition(); 507 return VisiblePosition();
508 VisiblePosition visiblePos = renderer->positionForPoint(result.localPoint()) ; 508 VisiblePosition visiblePos = renderer->positionForPoint(result.localPoint()) ;
509 if (visiblePos.isNull()) 509 if (visiblePos.isNull())
510 visiblePos = firstPositionInOrBeforeNode(node.raw()); 510 visiblePos = firstPositionInOrBeforeNode(node);
511 return visiblePos; 511 return visiblePos;
512 } 512 }
513 513
514 Result<Document> Frame::documentAtPoint(const IntPoint& point) 514 Result<Document> Frame::documentAtPoint(const IntPoint& point)
515 { 515 {
516 if (!view()) 516 if (!view())
517 return nullptr; 517 return nullptr;
518 518
519 IntPoint pt = view()->windowToContents(point); 519 IntPoint pt = view()->windowToContents(point);
520 HitTestResult result = HitTestResult(pt); 520 HitTestResult result = HitTestResult(pt);
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 buffer->context()->translate(-paintingRect.x(), -paintingRect.y()); 796 buffer->context()->translate(-paintingRect.x(), -paintingRect.y());
797 buffer->context()->clip(FloatRect(0, 0, paintingRect.maxX(), paintingRect.ma xY())); 797 buffer->context()->clip(FloatRect(0, 0, paintingRect.maxX(), paintingRect.ma xY()));
798 798
799 m_view->paintContents(buffer->context(), paintingRect); 799 m_view->paintContents(buffer->context(), paintingRect);
800 800
801 RefPtr<Image> image = buffer->copyImage(); 801 RefPtr<Image> image = buffer->copyImage();
802 return createDragImageFromImage(image.get()); 802 return createDragImageFromImage(image.get());
803 } 803 }
804 804
805 } // namespace WebCore 805 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698