Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 286 return VisiblePosition(); | 286 return VisiblePosition(); |
| 287 RenderObject* renderer = node->renderer(); | 287 RenderObject* renderer = node->renderer(); |
| 288 if (!renderer) | 288 if (!renderer) |
| 289 return VisiblePosition(); | 289 return VisiblePosition(); |
| 290 VisiblePosition visiblePos = VisiblePosition(renderer->positionForPoint(resu lt.localPoint())); | 290 VisiblePosition visiblePos = VisiblePosition(renderer->positionForPoint(resu lt.localPoint())); |
| 291 if (visiblePos.isNull()) | 291 if (visiblePos.isNull()) |
| 292 visiblePos = VisiblePosition(firstPositionInOrBeforeNode(node)); | 292 visiblePos = VisiblePosition(firstPositionInOrBeforeNode(node)); |
| 293 return visiblePos; | 293 return visiblePos; |
| 294 } | 294 } |
| 295 | 295 |
| 296 RenderView* LocalFrame::contentRenderer() const | |
| 297 { | |
| 298 return document() ? document()->renderView() : 0; | |
| 299 } | |
| 300 | |
| 301 Document* LocalFrame::document() const | |
| 302 { | |
| 303 return m_domWindow ? m_domWindow->document() : 0; | |
| 304 } | |
| 305 | |
| 296 Document* LocalFrame::documentAtPoint(const IntPoint& point) | 306 Document* LocalFrame::documentAtPoint(const IntPoint& point) |
| 297 { | 307 { |
| 298 if (!view()) | 308 if (!view()) |
| 299 return 0; | 309 return 0; |
| 300 | 310 |
| 301 IntPoint pt = view()->windowToContents(point); | 311 IntPoint pt = view()->windowToContents(point); |
| 302 HitTestResult result = HitTestResult(pt); | 312 HitTestResult result = HitTestResult(pt); |
| 303 | 313 |
| 304 if (contentRenderer()) | 314 if (contentRenderer()) |
| 305 result = eventHandler().hitTestResultAtPoint(pt, HitTestRequest::ReadOnl y | HitTestRequest::Active | HitTestRequest::ConfusingAndOftenMisusedDisallowSha dowContent); | 315 result = eventHandler().hitTestResultAtPoint(pt, HitTestRequest::ReadOnl y | HitTestRequest::Active | HitTestRequest::ConfusingAndOftenMisusedDisallowSha dowContent); |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 596 double LocalFrame::devicePixelRatio() const | 606 double LocalFrame::devicePixelRatio() const |
| 597 { | 607 { |
| 598 if (!m_host) | 608 if (!m_host) |
| 599 return 0; | 609 return 0; |
| 600 | 610 |
| 601 double ratio = m_host->deviceScaleFactor(); | 611 double ratio = m_host->deviceScaleFactor(); |
| 602 ratio *= pageZoomFactor(); | 612 ratio *= pageZoomFactor(); |
| 603 return ratio; | 613 return ratio; |
| 604 } | 614 } |
| 605 | 615 |
| 616 void LocalFrame::disconnectOwnerElement() | |
| 617 { | |
| 618 if (ownerElement()) { | |
| 619 if (Document* doc = document()) | |
| 620 doc->topDocument().clearAXObjectCache(); | |
|
dcheng
2014/04/14 19:25:57
Do you know what accessibility is planning on doin
kenrb
2014/04/14 20:09:52
I don't know much about accessibility, so I have j
| |
| 621 } | |
| 622 Frame::disconnectOwnerElement(); | |
| 623 } | |
| 624 | |
| 606 } // namespace WebCore | 625 } // namespace WebCore |
| OLD | NEW |