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 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 73 #include "core/loader/FrameLoaderClient.h" | 73 #include "core/loader/FrameLoaderClient.h" |
| 74 #include "core/page/AutoscrollController.h" | 74 #include "core/page/AutoscrollController.h" |
| 75 #include "core/page/ChromeClient.h" | 75 #include "core/page/ChromeClient.h" |
| 76 #include "core/page/FocusController.h" | 76 #include "core/page/FocusController.h" |
| 77 #include "core/page/FrameTree.h" | 77 #include "core/page/FrameTree.h" |
| 78 #include "core/page/Page.h" | 78 #include "core/page/Page.h" |
| 79 #include "core/page/scrolling/ScrollingCoordinator.h" | 79 #include "core/page/scrolling/ScrollingCoordinator.h" |
| 80 #include "core/paint/FramePainter.h" | 80 #include "core/paint/FramePainter.h" |
| 81 #include "core/paint/PaintLayer.h" | 81 #include "core/paint/PaintLayer.h" |
| 82 #include "core/paint/PaintPropertyTreeBuilder.h" | 82 #include "core/paint/PaintPropertyTreeBuilder.h" |
| 83 #include "core/plugins/PluginView.h" | |
| 83 #include "core/style/ComputedStyle.h" | 84 #include "core/style/ComputedStyle.h" |
| 84 #include "core/svg/SVGDocumentExtensions.h" | 85 #include "core/svg/SVGDocumentExtensions.h" |
| 85 #include "core/svg/SVGSVGElement.h" | 86 #include "core/svg/SVGSVGElement.h" |
| 86 #include "platform/HostWindow.h" | 87 #include "platform/HostWindow.h" |
| 87 #include "platform/RuntimeEnabledFeatures.h" | 88 #include "platform/RuntimeEnabledFeatures.h" |
| 88 #include "platform/ScriptForbiddenScope.h" | 89 #include "platform/ScriptForbiddenScope.h" |
| 89 #include "platform/TraceEvent.h" | 90 #include "platform/TraceEvent.h" |
| 90 #include "platform/TracedValue.h" | 91 #include "platform/TracedValue.h" |
| 91 #include "platform/fonts/FontCache.h" | 92 #include "platform/fonts/FontCache.h" |
| 92 #include "platform/geometry/DoubleRect.h" | 93 #include "platform/geometry/DoubleRect.h" |
| (...skipping 2522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2615 // pointless (since those frames will have set a zero timer to layout anyway ), but | 2616 // pointless (since those frames will have set a zero timer to layout anyway ), but |
| 2616 // it is also incorrect, since if two frames overlap, the first could be exc luded from the dirty | 2617 // it is also incorrect, since if two frames overlap, the first could be exc luded from the dirty |
| 2617 // region but then become included later by the second frame adding rects to the dirty region | 2618 // region but then become included later by the second frame adding rects to the dirty region |
| 2618 // when it lays out. | 2619 // when it lays out. |
| 2619 | 2620 |
| 2620 m_frame->document()->updateLayoutTreeIfNeeded(); | 2621 m_frame->document()->updateLayoutTreeIfNeeded(); |
| 2621 | 2622 |
| 2622 if (needsLayout()) | 2623 if (needsLayout()) |
| 2623 layout(); | 2624 layout(); |
| 2624 | 2625 |
| 2626 // WebView plugins need to update regardless of whether the LayoutEmbeddedOb ject | |
| 2627 // that owns them needed layout. | |
|
chrishtr
2016/02/17 23:49:18
Add a TODO to fix this in a better way.
| |
| 2628 const ChildrenWidgetSet* viewChildren = children(); | |
| 2629 for (const RefPtrWillBeMember<Widget>& child : *viewChildren) { | |
|
eae
2016/02/17 23:48:03
Why is this only needed for WebView plugins and no
| |
| 2630 if ((*child).isPluginContainer()) | |
| 2631 toPluginView(child.get())->layoutIfNeeded(); | |
|
chrishtr
2016/02/17 23:49:18
Add a note that this actually runs the entire life
| |
| 2632 } | |
| 2633 | |
| 2625 // FIXME: Calling layout() shouldn't trigger script execution or have any | 2634 // FIXME: Calling layout() shouldn't trigger script execution or have any |
| 2626 // observable effects on the frame tree but we're not quite there yet. | 2635 // observable effects on the frame tree but we're not quite there yet. |
| 2627 WillBeHeapVector<RefPtrWillBeMember<FrameView>> frameViews; | 2636 WillBeHeapVector<RefPtrWillBeMember<FrameView>> frameViews; |
| 2628 for (Frame* child = m_frame->tree().firstChild(); child; child = child->tree ().nextSibling()) { | 2637 for (Frame* child = m_frame->tree().firstChild(); child; child = child->tree ().nextSibling()) { |
| 2629 if (!child->isLocalFrame()) | 2638 if (!child->isLocalFrame()) |
| 2630 continue; | 2639 continue; |
| 2631 if (FrameView* view = toLocalFrame(child)->view()) | 2640 if (FrameView* view = toLocalFrame(child)->view()) |
| 2632 frameViews.append(view); | 2641 frameViews.append(view); |
| 2633 } | 2642 } |
| 2634 | 2643 |
| (...skipping 1462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4097 return m_hiddenForThrottling && m_crossOriginForThrottling; | 4106 return m_hiddenForThrottling && m_crossOriginForThrottling; |
| 4098 } | 4107 } |
| 4099 | 4108 |
| 4100 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const | 4109 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const |
| 4101 { | 4110 { |
| 4102 ASSERT(layoutView()); | 4111 ASSERT(layoutView()); |
| 4103 return *layoutView(); | 4112 return *layoutView(); |
| 4104 } | 4113 } |
| 4105 | 4114 |
| 4106 } // namespace blink | 4115 } // namespace blink |
| OLD | NEW |