| 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 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 return m_layoutSize; | 526 return m_layoutSize; |
| 527 } | 527 } |
| 528 | 528 |
| 529 void FrameView::setLayoutSize(const IntSize& size) | 529 void FrameView::setLayoutSize(const IntSize& size) |
| 530 { | 530 { |
| 531 ASSERT(!layoutSizeFixedToFrameSize()); | 531 ASSERT(!layoutSizeFixedToFrameSize()); |
| 532 | 532 |
| 533 setLayoutSizeInternal(size); | 533 setLayoutSizeInternal(size); |
| 534 } | 534 } |
| 535 | 535 |
| 536 void FrameView::updateCompositedSelectionBoundsIfNeeded() | |
| 537 { | |
| 538 if (!RuntimeEnabledFeatures::compositedSelectionUpdatesEnabled()) | |
| 539 return; | |
| 540 | |
| 541 Page* page = frame().page(); | |
| 542 ASSERT(page); | |
| 543 | |
| 544 LocalFrame* frame = page->focusController().focusedOrMainFrame(); | |
| 545 if (!frame || !frame->selection().isCaretOrRange()) { | |
| 546 page->chrome().client().clearCompositedSelectionBounds(); | |
| 547 return; | |
| 548 } | |
| 549 | |
| 550 // TODO(jdduke): Compute and route selection bounds through ChromeClient. | |
| 551 } | |
| 552 | |
| 553 HostWindow* FrameView::hostWindow() const | 536 HostWindow* FrameView::hostWindow() const |
| 554 { | 537 { |
| 555 Page* page = frame().page(); | 538 Page* page = frame().page(); |
| 556 if (!page) | 539 if (!page) |
| 557 return 0; | 540 return 0; |
| 558 return &page->chrome(); | 541 return &page->chrome(); |
| 559 } | 542 } |
| 560 | 543 |
| 561 void FrameView::contentRectangleForPaintInvalidation(const IntRect& r) | 544 void FrameView::contentRectangleForPaintInvalidation(const IntRect& r) |
| 562 { | 545 { |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 961 { | 944 { |
| 962 // Updating layout can run script, which can tear down the FrameView. | 945 // Updating layout can run script, which can tear down the FrameView. |
| 963 RefPtr<FrameView> protector(this); | 946 RefPtr<FrameView> protector(this); |
| 964 | 947 |
| 965 updateLayoutAndStyleIfNeededRecursive(); | 948 updateLayoutAndStyleIfNeededRecursive(); |
| 966 | 949 |
| 967 if (RenderView* view = renderView()) { | 950 if (RenderView* view = renderView()) { |
| 968 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Up
dateLayerTree", TRACE_EVENT_SCOPE_PROCESS, "frame", m_frame.get()); | 951 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Up
dateLayerTree", TRACE_EVENT_SCOPE_PROCESS, "frame", m_frame.get()); |
| 969 view->compositor()->updateIfNeededRecursive(); | 952 view->compositor()->updateIfNeededRecursive(); |
| 970 | 953 |
| 971 updateCompositedSelectionBoundsIfNeeded(); | |
| 972 | |
| 973 invalidateTreeIfNeededRecursive(); | 954 invalidateTreeIfNeededRecursive(); |
| 974 | 955 |
| 975 view->updateIFramesAfterLayout(); | 956 view->updateIFramesAfterLayout(); |
| 976 } | 957 } |
| 977 | 958 |
| 978 ASSERT(lifecycle().state() == DocumentLifecycle::PaintInvalidationClean); | 959 ASSERT(lifecycle().state() == DocumentLifecycle::PaintInvalidationClean); |
| 979 } | 960 } |
| 980 | 961 |
| 981 void FrameView::updateLayoutAndStyleIfNeededRecursive() | 962 void FrameView::updateLayoutAndStyleIfNeededRecursive() |
| 982 { | 963 { |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1119 void FrameView::setLayoutSizeInternal(const IntSize& size) | 1100 void FrameView::setLayoutSizeInternal(const IntSize& size) |
| 1120 { | 1101 { |
| 1121 if (m_layoutSize == size) | 1102 if (m_layoutSize == size) |
| 1122 return; | 1103 return; |
| 1123 | 1104 |
| 1124 m_layoutSize = size; | 1105 m_layoutSize = size; |
| 1125 contentsResized(); | 1106 contentsResized(); |
| 1126 } | 1107 } |
| 1127 | 1108 |
| 1128 } // namespace blink | 1109 } // namespace blink |
| OLD | NEW |