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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 // is vertical, then we use TextDirection to choose between those options. | 148 // is vertical, then we use TextDirection to choose between those options. |
149 if (writingMode == TopToBottomWritingMode || (!isHorizontalWritingMode && te
xtDirection == RTL)) | 149 if (writingMode == TopToBottomWritingMode || (!isHorizontalWritingMode && te
xtDirection == RTL)) |
150 return Pagination::TopToBottomPaginated; | 150 return Pagination::TopToBottomPaginated; |
151 return Pagination::BottomToTopPaginated; | 151 return Pagination::BottomToTopPaginated; |
152 } | 152 } |
153 | 153 |
154 FrameView::FrameView(Frame* frame) | 154 FrameView::FrameView(Frame* frame) |
155 : m_frame(frame) | 155 : m_frame(frame) |
156 , m_canHaveScrollbars(true) | 156 , m_canHaveScrollbars(true) |
157 , m_slowRepaintObjectCount(0) | 157 , m_slowRepaintObjectCount(0) |
158 , m_layoutTimer(this, &FrameView::layoutTimerFired) | 158 , m_layoutIsScheduledWithEmbedder(false) |
159 , m_layoutRoot(0) | 159 , m_layoutRoot(0) |
160 , m_inSynchronousPostLayout(false) | 160 , m_inSynchronousPostLayout(false) |
161 , m_postLayoutTasksTimer(this, &FrameView::postLayoutTimerFired) | 161 , m_postLayoutTasksTimer(this, &FrameView::postLayoutTimerFired) |
162 , m_isTransparent(false) | 162 , m_isTransparent(false) |
163 , m_baseBackgroundColor(Color::white) | 163 , m_baseBackgroundColor(Color::white) |
164 , m_mediaType("screen") | 164 , m_mediaType("screen") |
165 , m_actionScheduler(adoptPtr(new FrameActionScheduler)) | 165 , m_actionScheduler(adoptPtr(new FrameActionScheduler)) |
166 , m_overflowStatusDirty(true) | 166 , m_overflowStatusDirty(true) |
167 , m_viewportRenderer(0) | 167 , m_viewportRenderer(0) |
168 , m_wasScrolledByUser(false) | 168 , m_wasScrolledByUser(false) |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 } | 240 } |
241 } | 241 } |
242 | 242 |
243 void FrameView::reset() | 243 void FrameView::reset() |
244 { | 244 { |
245 m_cannotBlitToWindow = false; | 245 m_cannotBlitToWindow = false; |
246 m_isOverlapped = false; | 246 m_isOverlapped = false; |
247 m_contentIsOpaque = false; | 247 m_contentIsOpaque = false; |
248 m_borderX = 30; | 248 m_borderX = 30; |
249 m_borderY = 30; | 249 m_borderY = 30; |
250 m_layoutTimer.stop(); | 250 unscheduleRelayout(); |
251 m_layoutRoot = 0; | 251 m_layoutRoot = 0; |
252 m_delayedLayout = false; | 252 m_delayedLayout = false; |
253 m_doFullRepaint = true; | 253 m_doFullRepaint = true; |
254 m_layoutSchedulingEnabled = true; | 254 m_layoutSchedulingEnabled = true; |
255 m_inLayout = false; | 255 m_inLayout = false; |
256 m_doingPreLayoutStyleUpdate = false; | 256 m_doingPreLayoutStyleUpdate = false; |
257 m_inSynchronousPostLayout = false; | 257 m_inSynchronousPostLayout = false; |
258 m_layoutCount = 0; | 258 m_layoutCount = 0; |
259 m_nestedLayoutCount = 0; | 259 m_nestedLayoutCount = 0; |
260 m_postLayoutTasksTimer.stop(); | 260 m_postLayoutTasksTimer.stop(); |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
684 } | 684 } |
685 } | 685 } |
686 | 686 |
687 void FrameView::updateCompositingLayersAfterStyleChange() | 687 void FrameView::updateCompositingLayersAfterStyleChange() |
688 { | 688 { |
689 RenderView* renderView = this->renderView(); | 689 RenderView* renderView = this->renderView(); |
690 if (!renderView) | 690 if (!renderView) |
691 return; | 691 return; |
692 | 692 |
693 // If we expect to update compositing after an incipient layout, don't do so
here. | 693 // If we expect to update compositing after an incipient layout, don't do so
here. |
694 if (m_doingPreLayoutStyleUpdate || layoutPending() || renderView->needsLayou
t()) | 694 if (m_doingPreLayoutStyleUpdate || layoutIsScheduledWithEmbedder() || render
View->needsLayout()) |
695 return; | 695 return; |
696 | 696 |
697 // This call will make sure the cached hasAcceleratedCompositing is updated
from the pref | 697 // This call will make sure the cached hasAcceleratedCompositing is updated
from the pref |
698 renderView->compositor()->cacheAcceleratedCompositingFlags(); | 698 renderView->compositor()->cacheAcceleratedCompositingFlags(); |
699 | 699 |
700 // Sometimes we will change a property (for example, z-index) that will not | 700 // Sometimes we will change a property (for example, z-index) that will not |
701 // cause a layout, but will require us to update compositing state. We only | 701 // cause a layout, but will require us to update compositing state. We only |
702 // need to do this if a layout is not already scheduled. | 702 // need to do this if a layout is not already scheduled. |
703 if (!needsLayout()) | 703 if (!needsLayout()) |
704 renderView->compositor()->updateCompositingRequirementsState(); | 704 renderView->compositor()->updateCompositingRequirementsState(); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
809 } | 809 } |
810 | 810 |
811 bool FrameView::isSoftwareRenderable() const | 811 bool FrameView::isSoftwareRenderable() const |
812 { | 812 { |
813 RenderView* renderView = this->renderView(); | 813 RenderView* renderView = this->renderView(); |
814 return !renderView || !renderView->compositor()->has3DContent(); | 814 return !renderView || !renderView->compositor()->has3DContent(); |
815 } | 815 } |
816 | 816 |
817 RenderObject* FrameView::layoutRoot(bool onlyDuringLayout) const | 817 RenderObject* FrameView::layoutRoot(bool onlyDuringLayout) const |
818 { | 818 { |
819 return onlyDuringLayout && layoutPending() ? 0 : m_layoutRoot; | 819 return onlyDuringLayout && layoutIsScheduledWithEmbedder() ? 0 : m_layoutRoo
t; |
820 } | 820 } |
821 | 821 |
822 static inline void collectFrameViewChildren(FrameView* frameView, Vector<RefPtr<
FrameView> >& frameViews) | 822 static inline void collectFrameViewChildren(FrameView* frameView, Vector<RefPtr<
FrameView> >& frameViews) |
823 { | 823 { |
824 const HashSet<RefPtr<Widget> >* viewChildren = frameView->children(); | 824 const HashSet<RefPtr<Widget> >* viewChildren = frameView->children(); |
825 ASSERT(viewChildren); | 825 ASSERT(viewChildren); |
826 | 826 |
827 const HashSet<RefPtr<Widget> >::iterator end = viewChildren->end(); | 827 const HashSet<RefPtr<Widget> >::iterator end = viewChildren->end(); |
828 for (HashSet<RefPtr<Widget> >::iterator current = viewChildren->begin(); cur
rent != end; ++current) { | 828 for (HashSet<RefPtr<Widget> >::iterator current = viewChildren->begin(); cur
rent != end; ++current) { |
829 Widget* widget = (*current).get(); | 829 Widget* widget = (*current).get(); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
875 | 875 |
876 TRACE_EVENT0("webkit", "FrameView::layout"); | 876 TRACE_EVENT0("webkit", "FrameView::layout"); |
877 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "Layout"); | 877 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "Layout"); |
878 | 878 |
879 // Protect the view from being deleted during layout (in recalcStyle) | 879 // Protect the view from being deleted during layout (in recalcStyle) |
880 RefPtr<FrameView> protector(this); | 880 RefPtr<FrameView> protector(this); |
881 | 881 |
882 // Every scroll that happens during layout is programmatic. | 882 // Every scroll that happens during layout is programmatic. |
883 TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, tru
e); | 883 TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, tru
e); |
884 | 884 |
885 m_layoutTimer.stop(); | 885 unscheduleRelayout(); |
886 m_delayedLayout = false; | 886 m_delayedLayout = false; |
887 m_setNeedsLayoutWasDeferred = false; | 887 m_setNeedsLayoutWasDeferred = false; |
888 | 888 |
889 // we shouldn't enter layout() while painting | 889 // we shouldn't enter layout() while painting |
890 ASSERT(!isPainting()); | 890 ASSERT(!isPainting()); |
891 if (isPainting()) | 891 if (isPainting()) |
892 return; | 892 return; |
893 | 893 |
894 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willLayout
(m_frame.get()); | 894 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willLayout
(m_frame.get()); |
895 | 895 |
(...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1868 { | 1868 { |
1869 ASSERT(m_disableRepaints > 0); | 1869 ASSERT(m_disableRepaints > 0); |
1870 m_disableRepaints--; | 1870 m_disableRepaints--; |
1871 } | 1871 } |
1872 | 1872 |
1873 void FrameView::layoutTimerFired(Timer<FrameView>*) | 1873 void FrameView::layoutTimerFired(Timer<FrameView>*) |
1874 { | 1874 { |
1875 layout(); | 1875 layout(); |
1876 } | 1876 } |
1877 | 1877 |
| 1878 void FrameView::scheduleLayoutWithEmbedder() |
| 1879 { |
| 1880 // FIXME: Right now we're hijacking the scheduleAnimation codepath. |
| 1881 scheduleAnimation(); |
| 1882 m_layoutIsScheduledWithEmbedder = true; |
| 1883 } |
| 1884 |
1878 void FrameView::scheduleRelayout() | 1885 void FrameView::scheduleRelayout() |
1879 { | 1886 { |
1880 ASSERT(m_frame->view() == this); | 1887 ASSERT(m_frame->view() == this); |
1881 | 1888 |
1882 if (m_layoutRoot) { | 1889 if (m_layoutRoot) { |
1883 m_layoutRoot->markContainingBlocksForLayout(false); | 1890 m_layoutRoot->markContainingBlocksForLayout(false); |
1884 m_layoutRoot = 0; | 1891 m_layoutRoot = 0; |
1885 } | 1892 } |
1886 if (!m_layoutSchedulingEnabled) | 1893 if (!m_layoutSchedulingEnabled) |
1887 return; | 1894 return; |
1888 if (!needsLayout()) | 1895 if (!needsLayout()) |
1889 return; | 1896 return; |
1890 if (!m_frame->document()->shouldScheduleLayout()) | 1897 if (!m_frame->document()->shouldScheduleLayout()) |
1891 return; | 1898 return; |
1892 InspectorInstrumentation::didInvalidateLayout(m_frame.get()); | 1899 InspectorInstrumentation::didInvalidateLayout(m_frame.get()); |
1893 | 1900 |
1894 // When frame seamless is enabled, the contents of the frame could affect th
e layout of the parent frames. | 1901 // When frame seamless is enabled, the contents of the frame could affect th
e layout of the parent frames. |
1895 // Also invalidate parent frame starting from the owner element of this fram
e. | 1902 // Also invalidate parent frame starting from the owner element of this fram
e. |
1896 if (m_frame->ownerRenderer() && frame()->document()->shouldDisplaySeamlessly
WithParent()) | 1903 if (m_frame->ownerRenderer() && frame()->document()->shouldDisplaySeamlessly
WithParent()) |
1897 m_frame->ownerRenderer()->setNeedsLayout(true, MarkContainingBlockChain)
; | 1904 m_frame->ownerRenderer()->setNeedsLayout(true, MarkContainingBlockChain)
; |
1898 | 1905 |
1899 int delay = m_frame->document()->minimumLayoutDelay(); | 1906 scheduleLayoutWithEmbedder(); |
1900 if (m_layoutTimer.isActive() && m_delayedLayout && !delay) | |
1901 unscheduleRelayout(); | |
1902 if (m_layoutTimer.isActive()) | |
1903 return; | |
1904 | |
1905 m_delayedLayout = delay != 0; | |
1906 m_layoutTimer.startOneShot(delay * 0.001); | |
1907 } | 1907 } |
1908 | 1908 |
1909 static bool isObjectAncestorContainerOf(RenderObject* ancestor, RenderObject* de
scendant) | 1909 static bool isObjectAncestorContainerOf(RenderObject* ancestor, RenderObject* de
scendant) |
1910 { | 1910 { |
1911 for (RenderObject* r = descendant; r; r = r->container()) { | 1911 for (RenderObject* r = descendant; r; r = r->container()) { |
1912 if (r == ancestor) | 1912 if (r == ancestor) |
1913 return true; | 1913 return true; |
1914 } | 1914 } |
1915 return false; | 1915 return false; |
1916 } | 1916 } |
1917 | 1917 |
1918 void FrameView::scheduleRelayoutOfSubtree(RenderObject* relayoutRoot) | 1918 void FrameView::scheduleRelayoutOfSubtree(RenderObject* relayoutRoot) |
1919 { | 1919 { |
1920 ASSERT(m_frame->view() == this); | 1920 ASSERT(m_frame->view() == this); |
1921 | 1921 |
1922 RenderView* renderView = this->renderView(); | 1922 RenderView* renderView = this->renderView(); |
1923 if (renderView && renderView->needsLayout()) { | 1923 if (renderView && renderView->needsLayout()) { |
1924 if (relayoutRoot) | 1924 if (relayoutRoot) |
1925 relayoutRoot->markContainingBlocksForLayout(false); | 1925 relayoutRoot->markContainingBlocksForLayout(false); |
1926 return; | 1926 return; |
1927 } | 1927 } |
1928 | 1928 |
1929 if (layoutPending() || !m_layoutSchedulingEnabled) { | 1929 if (layoutIsScheduledWithEmbedder() || !m_layoutSchedulingEnabled) { |
1930 if (m_layoutRoot != relayoutRoot) { | 1930 if (m_layoutRoot != relayoutRoot) { |
1931 if (isObjectAncestorContainerOf(m_layoutRoot, relayoutRoot)) { | 1931 if (isObjectAncestorContainerOf(m_layoutRoot, relayoutRoot)) { |
1932 // Keep the current root | 1932 // Keep the current root |
1933 relayoutRoot->markContainingBlocksForLayout(false, m_layoutRoot)
; | 1933 relayoutRoot->markContainingBlocksForLayout(false, m_layoutRoot)
; |
1934 ASSERT(!m_layoutRoot->container() || !m_layoutRoot->container()-
>needsLayout()); | 1934 ASSERT(!m_layoutRoot->container() || !m_layoutRoot->container()-
>needsLayout()); |
1935 } else if (m_layoutRoot && isObjectAncestorContainerOf(relayoutRoot,
m_layoutRoot)) { | 1935 } else if (m_layoutRoot && isObjectAncestorContainerOf(relayoutRoot,
m_layoutRoot)) { |
1936 // Re-root at relayoutRoot | 1936 // Re-root at relayoutRoot |
1937 m_layoutRoot->markContainingBlocksForLayout(false, relayoutRoot)
; | 1937 m_layoutRoot->markContainingBlocksForLayout(false, relayoutRoot)
; |
1938 m_layoutRoot = relayoutRoot; | 1938 m_layoutRoot = relayoutRoot; |
1939 ASSERT(!m_layoutRoot->container() || !m_layoutRoot->container()-
>needsLayout()); | 1939 ASSERT(!m_layoutRoot->container() || !m_layoutRoot->container()-
>needsLayout()); |
1940 InspectorInstrumentation::didInvalidateLayout(m_frame.get()); | 1940 InspectorInstrumentation::didInvalidateLayout(m_frame.get()); |
1941 } else { | 1941 } else { |
1942 // Just do a full relayout | 1942 // Just do a full relayout |
1943 if (m_layoutRoot) | 1943 if (m_layoutRoot) |
1944 m_layoutRoot->markContainingBlocksForLayout(false); | 1944 m_layoutRoot->markContainingBlocksForLayout(false); |
1945 m_layoutRoot = 0; | 1945 m_layoutRoot = 0; |
1946 relayoutRoot->markContainingBlocksForLayout(false); | 1946 relayoutRoot->markContainingBlocksForLayout(false); |
1947 InspectorInstrumentation::didInvalidateLayout(m_frame.get()); | 1947 InspectorInstrumentation::didInvalidateLayout(m_frame.get()); |
1948 } | 1948 } |
1949 } | 1949 } |
1950 } else if (m_layoutSchedulingEnabled) { | 1950 } else if (m_layoutSchedulingEnabled) { |
1951 int delay = m_frame->document()->minimumLayoutDelay(); | 1951 int delay = m_frame->document()->minimumLayoutDelay(); |
1952 m_layoutRoot = relayoutRoot; | 1952 m_layoutRoot = relayoutRoot; |
1953 ASSERT(!m_layoutRoot->container() || !m_layoutRoot->container()->needsLa
yout()); | 1953 ASSERT(!m_layoutRoot->container() || !m_layoutRoot->container()->needsLa
yout()); |
1954 InspectorInstrumentation::didInvalidateLayout(m_frame.get()); | 1954 InspectorInstrumentation::didInvalidateLayout(m_frame.get()); |
1955 m_delayedLayout = delay != 0; | 1955 scheduleLayoutWithEmbedder(); |
1956 m_layoutTimer.startOneShot(delay * 0.001); | |
1957 } | 1956 } |
1958 } | 1957 } |
1959 | 1958 |
1960 bool FrameView::layoutPending() const | 1959 bool FrameView::layoutIsScheduledWithEmbedder() const |
1961 { | 1960 { |
1962 return m_layoutTimer.isActive(); | 1961 return m_layoutIsScheduledWithEmbedder; |
1963 } | 1962 } |
1964 | 1963 |
1965 bool FrameView::needsLayout() const | 1964 bool FrameView::needsLayout() const |
1966 { | 1965 { |
1967 // This can return true in cases where the document does not have a body yet
. | 1966 // This can return true in cases where the document does not have a body yet
. |
1968 // Document::shouldScheduleLayout takes care of preventing us from schedulin
g | 1967 // Document::shouldScheduleLayout takes care of preventing us from schedulin
g |
1969 // layout in that case. | 1968 // layout in that case. |
1970 if (!m_frame) | 1969 if (!m_frame) |
1971 return false; | 1970 return false; |
1972 | 1971 |
1973 RenderView* renderView = this->renderView(); | 1972 RenderView* renderView = this->renderView(); |
1974 return layoutPending() | 1973 return layoutIsScheduledWithEmbedder() |
1975 || (renderView && renderView->needsLayout()) | 1974 || (renderView && renderView->needsLayout()) |
1976 || m_layoutRoot | 1975 || m_layoutRoot |
1977 || (m_deferSetNeedsLayouts && m_setNeedsLayoutWasDeferred); | 1976 || (m_deferSetNeedsLayouts && m_setNeedsLayoutWasDeferred); |
1978 } | 1977 } |
1979 | 1978 |
1980 void FrameView::setNeedsLayout() | 1979 void FrameView::setNeedsLayout() |
1981 { | 1980 { |
1982 if (m_deferSetNeedsLayouts) { | 1981 if (m_deferSetNeedsLayouts) { |
1983 m_setNeedsLayoutWasDeferred = true; | 1982 m_setNeedsLayoutWasDeferred = true; |
1984 return; | 1983 return; |
1985 } | 1984 } |
1986 | 1985 |
1987 if (RenderView* renderView = this->renderView()) | 1986 if (RenderView* renderView = this->renderView()) |
1988 renderView->setNeedsLayout(true); | 1987 renderView->setNeedsLayout(true); |
1989 } | 1988 } |
1990 | 1989 |
1991 void FrameView::unscheduleRelayout() | 1990 void FrameView::unscheduleRelayout() |
1992 { | 1991 { |
1993 if (!m_layoutTimer.isActive()) | 1992 // FIXME: We should just remove this method. |
1994 return; | 1993 m_layoutIsScheduledWithEmbedder = false; |
1995 | |
1996 m_layoutTimer.stop(); | |
1997 m_delayedLayout = false; | |
1998 } | 1994 } |
1999 | 1995 |
2000 void FrameView::serviceScriptedAnimations(double monotonicAnimationStartTime) | 1996 void FrameView::serviceScriptedAnimations(double monotonicAnimationStartTime) |
2001 { | 1997 { |
| 1998 // The Animation timer is also used for scheduling layouts. |
| 1999 updateLayoutAndStyleIfNeededRecursive(); |
| 2000 |
2002 for (RefPtr<Frame> frame = m_frame; frame; frame = frame->tree()->traverseNe
xt()) { | 2001 for (RefPtr<Frame> frame = m_frame; frame; frame = frame->tree()->traverseNe
xt()) { |
2003 frame->view()->serviceScrollAnimations(); | 2002 frame->view()->serviceScrollAnimations(); |
2004 if (!RuntimeEnabledFeatures::webAnimationsCSSEnabled()) | 2003 if (!RuntimeEnabledFeatures::webAnimationsCSSEnabled()) |
2005 frame->animation()->serviceAnimations(); | 2004 frame->animation()->serviceAnimations(); |
2006 if (RuntimeEnabledFeatures::webAnimationsEnabled()) | 2005 if (RuntimeEnabledFeatures::webAnimationsEnabled()) |
2007 frame->document()->timeline()->serviceAnimations(monotonicAnimationS
tartTime); | 2006 frame->document()->timeline()->serviceAnimations(monotonicAnimationS
tartTime); |
2008 } | 2007 } |
2009 | 2008 |
2010 Vector<RefPtr<Document> > documents; | 2009 Vector<RefPtr<Document> > documents; |
2011 for (Frame* frame = m_frame.get(); frame; frame = frame->tree()->traverseNex
t()) | 2010 for (Frame* frame = m_frame.get(); frame; frame = frame->tree()->traverseNex
t()) |
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2980 // layout and make sure they are up to date. | 2979 // layout and make sure they are up to date. |
2981 // Mac actually tests for intersection with the dirty region and tries not t
o | 2980 // Mac actually tests for intersection with the dirty region and tries not t
o |
2982 // update layout for frames that are outside the dirty region. Not only doe
s this seem | 2981 // update layout for frames that are outside the dirty region. Not only doe
s this seem |
2983 // pointless (since those frames will have set a zero timer to layout anyway
), but | 2982 // pointless (since those frames will have set a zero timer to layout anyway
), but |
2984 // it is also incorrect, since if two frames overlap, the first could be exc
luded from the dirty | 2983 // it is also incorrect, since if two frames overlap, the first could be exc
luded from the dirty |
2985 // region but then become included later by the second frame adding rects to
the dirty region | 2984 // region but then become included later by the second frame adding rects to
the dirty region |
2986 // when it lays out. | 2985 // when it lays out. |
2987 | 2986 |
2988 m_frame->document()->updateStyleIfNeeded(); | 2987 m_frame->document()->updateStyleIfNeeded(); |
2989 | 2988 |
| 2989 unscheduleRelayout(); |
2990 if (needsLayout()) | 2990 if (needsLayout()) |
2991 layout(); | 2991 layout(); |
2992 | 2992 |
2993 // Grab a copy of the children() set, as it may be mutated by the following
updateLayoutAndStyleIfNeededRecursive | 2993 // Grab a copy of the children() set, as it may be mutated by the following
updateLayoutAndStyleIfNeededRecursive |
2994 // calls, as they can potentially re-enter a layout of the parent frame view
, which may add/remove scrollbars | 2994 // calls, as they can potentially re-enter a layout of the parent frame view
, which may add/remove scrollbars |
2995 // and thus mutates the children() set. | 2995 // and thus mutates the children() set. |
2996 Vector<RefPtr<FrameView> > frameViews; | 2996 Vector<RefPtr<FrameView> > frameViews; |
2997 collectFrameViewChildren(this, frameViews); | 2997 collectFrameViewChildren(this, frameViews); |
2998 | 2998 |
2999 const Vector<RefPtr<FrameView> >::iterator end = frameViews.end(); | 2999 const Vector<RefPtr<FrameView> >::iterator end = frameViews.end(); |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3379 } | 3379 } |
3380 | 3380 |
3381 AXObjectCache* FrameView::axObjectCache() const | 3381 AXObjectCache* FrameView::axObjectCache() const |
3382 { | 3382 { |
3383 if (frame() && frame()->document()) | 3383 if (frame() && frame()->document()) |
3384 return frame()->document()->existingAXObjectCache(); | 3384 return frame()->document()->existingAXObjectCache(); |
3385 return 0; | 3385 return 0; |
3386 } | 3386 } |
3387 | 3387 |
3388 } // namespace WebCore | 3388 } // namespace WebCore |
OLD | NEW |