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 18 matching lines...) Expand all Loading... |
29 | 29 |
30 #include "core/HTMLNames.h" | 30 #include "core/HTMLNames.h" |
31 #include "core/MediaTypeNames.h" | 31 #include "core/MediaTypeNames.h" |
32 #include "core/css/FontFaceSet.h" | 32 #include "core/css/FontFaceSet.h" |
33 #include "core/css/resolver/StyleResolver.h" | 33 #include "core/css/resolver/StyleResolver.h" |
34 #include "core/dom/AXObjectCache.h" | 34 #include "core/dom/AXObjectCache.h" |
35 #include "core/dom/DocumentMarkerController.h" | 35 #include "core/dom/DocumentMarkerController.h" |
36 #include "core/dom/Fullscreen.h" | 36 #include "core/dom/Fullscreen.h" |
37 #include "core/editing/FrameSelection.h" | 37 #include "core/editing/FrameSelection.h" |
38 #include "core/editing/RenderedPosition.h" | 38 #include "core/editing/RenderedPosition.h" |
39 #include "core/events/OverflowEvent.h" | |
40 #include "core/fetch/ResourceFetcher.h" | 39 #include "core/fetch/ResourceFetcher.h" |
41 #include "core/fetch/ResourceLoadPriorityOptimizer.h" | 40 #include "core/fetch/ResourceLoadPriorityOptimizer.h" |
42 #include "core/frame/FrameHost.h" | 41 #include "core/frame/FrameHost.h" |
43 #include "core/frame/LocalFrame.h" | 42 #include "core/frame/LocalFrame.h" |
44 #include "core/frame/Settings.h" | 43 #include "core/frame/Settings.h" |
45 #include "core/html/HTMLFrameElement.h" | 44 #include "core/html/HTMLFrameElement.h" |
46 #include "core/html/HTMLPlugInElement.h" | 45 #include "core/html/HTMLPlugInElement.h" |
47 #include "core/html/HTMLTextFormControlElement.h" | 46 #include "core/html/HTMLTextFormControlElement.h" |
48 #include "core/html/parser/TextResourceDecoder.h" | 47 #include "core/html/parser/TextResourceDecoder.h" |
49 #include "core/input/EventHandler.h" | 48 #include "core/input/EventHandler.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 , m_displayMode(WebDisplayModeBrowser) | 110 , m_displayMode(WebDisplayModeBrowser) |
112 , m_canHaveScrollbars(true) | 111 , m_canHaveScrollbars(true) |
113 , m_slowRepaintObjectCount(0) | 112 , m_slowRepaintObjectCount(0) |
114 , m_hasPendingLayout(false) | 113 , m_hasPendingLayout(false) |
115 , m_inSynchronousPostLayout(false) | 114 , m_inSynchronousPostLayout(false) |
116 , m_postLayoutTasksTimer(this, &FrameView::postLayoutTimerFired) | 115 , m_postLayoutTasksTimer(this, &FrameView::postLayoutTimerFired) |
117 , m_updateWidgetsTimer(this, &FrameView::updateWidgetsTimerFired) | 116 , m_updateWidgetsTimer(this, &FrameView::updateWidgetsTimerFired) |
118 , m_isTransparent(false) | 117 , m_isTransparent(false) |
119 , m_baseBackgroundColor(Color::white) | 118 , m_baseBackgroundColor(Color::white) |
120 , m_mediaType(MediaTypeNames::screen) | 119 , m_mediaType(MediaTypeNames::screen) |
121 , m_overflowStatusDirty(true) | |
122 , m_wasScrolledByUser(false) | 120 , m_wasScrolledByUser(false) |
123 , m_safeToPropagateScrollToParent(true) | 121 , m_safeToPropagateScrollToParent(true) |
124 , m_isTrackingPaintInvalidations(false) | 122 , m_isTrackingPaintInvalidations(false) |
125 , m_scrollCorner(nullptr) | 123 , m_scrollCorner(nullptr) |
126 , m_inputEventsScaleFactorForEmulation(1) | 124 , m_inputEventsScaleFactorForEmulation(1) |
127 , m_layoutSizeFixedToFrameSize(true) | 125 , m_layoutSizeFixedToFrameSize(true) |
128 , m_didScrollTimer(this, &FrameView::didScrollTimerFired) | 126 , m_didScrollTimer(this, &FrameView::didScrollTimerFired) |
129 , m_topControlsViewportAdjustment(0) | 127 , m_topControlsViewportAdjustment(0) |
130 , m_needsUpdateWidgetPositions(false) | 128 , m_needsUpdateWidgetPositions(false) |
131 #if ENABLE(ASSERT) | 129 #if ENABLE(ASSERT) |
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1056 | 1054 |
1057 m_layoutCount++; | 1055 m_layoutCount++; |
1058 | 1056 |
1059 if (AXObjectCache* cache = document->axObjectCache()) { | 1057 if (AXObjectCache* cache = document->axObjectCache()) { |
1060 const KURL& url = document->url(); | 1058 const KURL& url = document->url(); |
1061 if (url.isValid() && !url.isAboutBlankURL()) | 1059 if (url.isValid() && !url.isAboutBlankURL()) |
1062 cache->handleLayoutComplete(document); | 1060 cache->handleLayoutComplete(document); |
1063 } | 1061 } |
1064 updateAnnotatedRegions(); | 1062 updateAnnotatedRegions(); |
1065 | 1063 |
1066 if (document->hasListenerType(Document::OVERFLOWCHANGED_LISTENER)) | |
1067 updateOverflowStatus(layoutSize().width() < contentsWidth(), layoutSize(
).height() < contentsHeight()); | |
1068 | |
1069 scheduleOrPerformPostLayoutTasks(); | 1064 scheduleOrPerformPostLayoutTasks(); |
1070 | 1065 |
1071 // FIXME: The notion of a single root for layout is no longer applicable. Re
move or update this code. crbug.com/460596 | 1066 // FIXME: The notion of a single root for layout is no longer applicable. Re
move or update this code. crbug.com/460596 |
1072 TRACE_EVENT_END1("devtools.timeline", "Layout", "endData", InspectorLayoutEv
ent::endData(rootForThisLayout)); | 1067 TRACE_EVENT_END1("devtools.timeline", "Layout", "endData", InspectorLayoutEv
ent::endData(rootForThisLayout)); |
1073 InspectorInstrumentation::didLayout(m_frame.get()); | 1068 InspectorInstrumentation::didLayout(m_frame.get()); |
1074 | 1069 |
1075 m_nestedLayoutCount--; | 1070 m_nestedLayoutCount--; |
1076 if (m_nestedLayoutCount) | 1071 if (m_nestedLayoutCount) |
1077 return; | 1072 return; |
1078 | 1073 |
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2061 return; | 2056 return; |
2062 | 2057 |
2063 for (LayoutObject* layoutObject = view; layoutObject; layoutObject = layoutO
bject->nextInPreOrder()) { | 2058 for (LayoutObject* layoutObject = view; layoutObject; layoutObject = layoutO
bject->nextInPreOrder()) { |
2064 if (!layoutObject->isCounter()) | 2059 if (!layoutObject->isCounter()) |
2065 continue; | 2060 continue; |
2066 | 2061 |
2067 toLayoutCounter(layoutObject)->updateCounter(); | 2062 toLayoutCounter(layoutObject)->updateCounter(); |
2068 } | 2063 } |
2069 } | 2064 } |
2070 | 2065 |
2071 void FrameView::updateOverflowStatus(bool horizontalOverflow, bool verticalOverf
low) | |
2072 { | |
2073 LayoutObject* viewport = viewportLayoutObject(); | |
2074 if (!viewport) | |
2075 return; | |
2076 | |
2077 if (m_overflowStatusDirty) { | |
2078 m_horizontalOverflow = horizontalOverflow; | |
2079 m_verticalOverflow = verticalOverflow; | |
2080 m_overflowStatusDirty = false; | |
2081 return; | |
2082 } | |
2083 | |
2084 bool horizontalOverflowChanged = (m_horizontalOverflow != horizontalOverflow
); | |
2085 bool verticalOverflowChanged = (m_verticalOverflow != verticalOverflow); | |
2086 | |
2087 if (horizontalOverflowChanged || verticalOverflowChanged) { | |
2088 m_horizontalOverflow = horizontalOverflow; | |
2089 m_verticalOverflow = verticalOverflow; | |
2090 | |
2091 RefPtrWillBeRawPtr<OverflowEvent> event = OverflowEvent::create(horizont
alOverflowChanged, horizontalOverflow, verticalOverflowChanged, verticalOverflow
); | |
2092 event->setTarget(viewport->node()); | |
2093 m_frame->document()->enqueueAnimationFrameEvent(event.release()); | |
2094 } | |
2095 | |
2096 } | |
2097 | |
2098 IntRect FrameView::windowClipRect(IncludeScrollbarsInRect scrollbarInclusion) co
nst | 2066 IntRect FrameView::windowClipRect(IncludeScrollbarsInRect scrollbarInclusion) co
nst |
2099 { | 2067 { |
2100 ASSERT(m_frame->view() == this); | 2068 ASSERT(m_frame->view() == this); |
2101 | 2069 |
2102 // Set our clip rect to be our contents. | 2070 // Set our clip rect to be our contents. |
2103 IntRect clipRect = contentsToRootFrame(visibleContentRect(scrollbarInclusion
)); | 2071 IntRect clipRect = contentsToRootFrame(visibleContentRect(scrollbarInclusion
)); |
2104 if (!m_frame->deprecatedLocalOwner()) | 2072 if (!m_frame->deprecatedLocalOwner()) |
2105 return clipRect; | 2073 return clipRect; |
2106 | 2074 |
2107 // Take our owner element and get its clip rect. | 2075 // Take our owner element and get its clip rect. |
(...skipping 1875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3983 | 3951 |
3984 if (!graphicsLayer) | 3952 if (!graphicsLayer) |
3985 return; | 3953 return; |
3986 | 3954 |
3987 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL
ayoutObject(), paintInvalidationContainer, viewRect); | 3955 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL
ayoutObject(), paintInvalidationContainer, viewRect); |
3988 | 3956 |
3989 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web
Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing
IntRect(viewRect))); | 3957 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web
Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing
IntRect(viewRect))); |
3990 } | 3958 } |
3991 | 3959 |
3992 } // namespace blink | 3960 } // namespace blink |
OLD | NEW |