| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 namespace blink { | 68 namespace blink { |
| 69 | 69 |
| 70 double FrameView::s_currentFrameTimeStamp = 0.0; | 70 double FrameView::s_currentFrameTimeStamp = 0.0; |
| 71 bool FrameView::s_inPaintContents = false; | 71 bool FrameView::s_inPaintContents = false; |
| 72 | 72 |
| 73 static const double resourcePriorityUpdateDelayAfterScroll = 0.250; | 73 static const double resourcePriorityUpdateDelayAfterScroll = 0.250; |
| 74 | 74 |
| 75 FrameView::FrameView(LocalFrame* frame) | 75 FrameView::FrameView(LocalFrame* frame) |
| 76 : m_frame(frame) | 76 : m_frame(frame) |
| 77 , m_canHaveScrollbars(true) | 77 , m_canHaveScrollbars(true) |
| 78 , m_slowRepaintObjectCount(0) | |
| 79 , m_hasPendingLayout(false) | 78 , m_hasPendingLayout(false) |
| 80 , m_layoutSubtreeRoot(0) | 79 , m_layoutSubtreeRoot(0) |
| 81 , m_inSynchronousPostLayout(false) | 80 , m_inSynchronousPostLayout(false) |
| 82 , m_postLayoutTasksTimer(this, &FrameView::postLayoutTimerFired) | 81 , m_postLayoutTasksTimer(this, &FrameView::postLayoutTimerFired) |
| 83 , m_isTransparent(false) | 82 , m_isTransparent(false) |
| 84 , m_baseBackgroundColor(Color::white) | 83 , m_baseBackgroundColor(Color::white) |
| 85 , m_mediaType("screen") | 84 , m_mediaType("screen") |
| 86 , m_overflowStatusDirty(true) | 85 , m_overflowStatusDirty(true) |
| 87 , m_viewportRenderer(0) | 86 , m_viewportRenderer(0) |
| 88 , m_wasScrolledByUser(false) | 87 , m_wasScrolledByUser(false) |
| (...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 RenderView* renderView = this->renderView(); | 683 RenderView* renderView = this->renderView(); |
| 685 if (renderView && renderView->compositingState() == PaintsIntoOwnBacking) { | 684 if (renderView && renderView->compositingState() == PaintsIntoOwnBacking) { |
| 686 GraphicsLayer* layer = renderView->layer()->compositedLayerMapping()->ma
inGraphicsLayer(); | 685 GraphicsLayer* layer = renderView->layer()->compositedLayerMapping()->ma
inGraphicsLayer(); |
| 687 if (layer && layer->drawsContent()) | 686 if (layer && layer->drawsContent()) |
| 688 return true; | 687 return true; |
| 689 } | 688 } |
| 690 | 689 |
| 691 return false; | 690 return false; |
| 692 } | 691 } |
| 693 | 692 |
| 694 void FrameView::addSlowRepaintObject() | |
| 695 { | |
| 696 if (!m_slowRepaintObjectCount++) { | |
| 697 if (Page* page = m_frame->page()) { | |
| 698 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoor
dinator()) | |
| 699 scrollingCoordinator->frameViewHasSlowRepaintObjectsDidChange(th
is); | |
| 700 } | |
| 701 } | |
| 702 } | |
| 703 | |
| 704 void FrameView::removeSlowRepaintObject() | |
| 705 { | |
| 706 ASSERT(m_slowRepaintObjectCount > 0); | |
| 707 m_slowRepaintObjectCount--; | |
| 708 if (!m_slowRepaintObjectCount) { | |
| 709 if (Page* page = m_frame->page()) { | |
| 710 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoor
dinator()) | |
| 711 scrollingCoordinator->frameViewHasSlowRepaintObjectsDidChange(th
is); | |
| 712 } | |
| 713 } | |
| 714 } | |
| 715 | |
| 716 IntPoint FrameView::lastKnownMousePosition() const | 693 IntPoint FrameView::lastKnownMousePosition() const |
| 717 { | 694 { |
| 718 return m_frame->eventHandler().lastKnownMousePosition(); | 695 return m_frame->eventHandler().lastKnownMousePosition(); |
| 719 } | 696 } |
| 720 | 697 |
| 721 bool FrameView::shouldSetCursor() const | 698 bool FrameView::shouldSetCursor() const |
| 722 { | 699 { |
| 723 Page* page = frame().page(); | 700 Page* page = frame().page(); |
| 724 return page && page->visibilityState() != PageVisibilityStateHidden && page-
>focusController().isActive() && page->settings().deviceSupportsMouse(); | 701 return page && page->visibilityState() != PageVisibilityStateHidden && page-
>focusController().isActive() && page->settings().deviceSupportsMouse(); |
| 725 } | 702 } |
| (...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1558 void FrameView::setLayoutSizeInternal(const IntSize& size) | 1535 void FrameView::setLayoutSizeInternal(const IntSize& size) |
| 1559 { | 1536 { |
| 1560 if (m_layoutSize == size) | 1537 if (m_layoutSize == size) |
| 1561 return; | 1538 return; |
| 1562 | 1539 |
| 1563 m_layoutSize = size; | 1540 m_layoutSize = size; |
| 1564 contentsResized(); | 1541 contentsResized(); |
| 1565 } | 1542 } |
| 1566 | 1543 |
| 1567 } // namespace blink | 1544 } // namespace blink |
| OLD | NEW |