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 Dirk Mueller <mueller@kde.org> | 5 * 2000 Dirk Mueller <mueller@kde.org> |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
9 * Copyright (C) 2009 Google Inc. All rights reserved. | 9 * Copyright (C) 2009 Google Inc. All rights reserved. |
10 * | 10 * |
(...skipping 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1398 } | 1398 } |
1399 | 1399 |
1400 IntPoint FrameView::lastKnownMousePosition() const | 1400 IntPoint FrameView::lastKnownMousePosition() const |
1401 { | 1401 { |
1402 return m_frame->eventHandler().lastKnownMousePosition(); | 1402 return m_frame->eventHandler().lastKnownMousePosition(); |
1403 } | 1403 } |
1404 | 1404 |
1405 bool FrameView::shouldSetCursor() const | 1405 bool FrameView::shouldSetCursor() const |
1406 { | 1406 { |
1407 Page* page = frame().page(); | 1407 Page* page = frame().page(); |
1408 return page && page->visibilityState() != PageVisibilityStateHidden && page- >focusController().isActive(); | 1408 return page && page->visibilityState() != PageVisibilityStateHidden && page- >focusController().isActive() && page->settings().deviceSupportsMouse(); |
pfeldman
2014/04/07 17:52:50
isCursorVisible()?
dgozman
2014/04/08 16:51:48
I don't think so. When cursor is invisible (i.e. p
| |
1409 } | 1409 } |
1410 | 1410 |
1411 void FrameView::scrollContentsIfNeededRecursive() | 1411 void FrameView::scrollContentsIfNeededRecursive() |
1412 { | 1412 { |
1413 scrollContentsIfNeeded(); | 1413 scrollContentsIfNeeded(); |
1414 | 1414 |
1415 for (LocalFrame* child = m_frame->tree().firstChild(); child; child = child- >tree().nextSibling()) { | 1415 for (LocalFrame* child = m_frame->tree().firstChild(); child; child = child- >tree().nextSibling()) { |
1416 if (FrameView* view = child->view()) | 1416 if (FrameView* view = child->view()) |
1417 view->scrollContentsIfNeededRecursive(); | 1417 view->scrollContentsIfNeededRecursive(); |
1418 } | 1418 } |
(...skipping 1818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3237 | 3237 |
3238 AXObjectCache* FrameView::axObjectCache() const | 3238 AXObjectCache* FrameView::axObjectCache() const |
3239 { | 3239 { |
3240 if (frame().document()) | 3240 if (frame().document()) |
3241 return frame().document()->existingAXObjectCache(); | 3241 return frame().document()->existingAXObjectCache(); |
3242 return 0; | 3242 return 0; |
3243 } | 3243 } |
3244 | 3244 |
3245 void FrameView::setCursor(const Cursor& cursor) | 3245 void FrameView::setCursor(const Cursor& cursor) |
3246 { | 3246 { |
3247 if (!shouldSetCursor()) | |
3248 return; | |
3247 Page* page = frame().page(); | 3249 Page* page = frame().page(); |
3248 if (!page) | 3250 if (!page) |
3249 return; | 3251 return; |
3250 page->chrome().setCursor(cursor); | 3252 page->chrome().setCursor(cursor); |
3251 } | 3253 } |
3252 | 3254 |
3253 bool FrameView::isMainFrame() const | 3255 bool FrameView::isMainFrame() const |
3254 { | 3256 { |
3255 return m_frame->isMainFrame(); | 3257 return m_frame->isMainFrame(); |
3256 } | 3258 } |
(...skipping 25 matching lines...) Expand all Loading... | |
3282 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation) | 3284 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation) |
3283 { | 3285 { |
3284 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); | 3286 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); |
3285 if (AXObjectCache* cache = axObjectCache()) { | 3287 if (AXObjectCache* cache = axObjectCache()) { |
3286 cache->remove(scrollbar); | 3288 cache->remove(scrollbar); |
3287 cache->handleScrollbarUpdate(this); | 3289 cache->handleScrollbarUpdate(this); |
3288 } | 3290 } |
3289 } | 3291 } |
3290 | 3292 |
3291 } // namespace WebCore | 3293 } // namespace WebCore |
OLD | NEW |