| 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 10 matching lines...) Expand all Loading... |
| 21 * You should have received a copy of the GNU Library General Public License | 21 * You should have received a copy of the GNU Library General Public License |
| 22 * along with this library; see the file COPYING.LIB. If not, write to | 22 * along with this library; see the file COPYING.LIB. If not, write to |
| 23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 24 * Boston, MA 02110-1301, USA. | 24 * Boston, MA 02110-1301, USA. |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #include "sky/engine/config.h" | 27 #include "sky/engine/config.h" |
| 28 #include "sky/engine/core/frame/FrameView.h" | 28 #include "sky/engine/core/frame/FrameView.h" |
| 29 | 29 |
| 30 #include "gen/sky/platform/RuntimeEnabledFeatures.h" | 30 #include "gen/sky/platform/RuntimeEnabledFeatures.h" |
| 31 #include "sky/engine/core/animation/DocumentAnimations.h" |
| 31 #include "sky/engine/core/css/FontFaceSet.h" | 32 #include "sky/engine/core/css/FontFaceSet.h" |
| 32 #include "sky/engine/core/css/resolver/StyleResolver.h" | 33 #include "sky/engine/core/css/resolver/StyleResolver.h" |
| 33 #include "sky/engine/core/dom/DocumentMarkerController.h" | 34 #include "sky/engine/core/dom/DocumentMarkerController.h" |
| 34 #include "sky/engine/core/editing/FrameSelection.h" | 35 #include "sky/engine/core/editing/FrameSelection.h" |
| 35 #include "sky/engine/core/fetch/ResourceFetcher.h" | 36 #include "sky/engine/core/fetch/ResourceFetcher.h" |
| 36 #include "sky/engine/core/frame/FrameHost.h" | 37 #include "sky/engine/core/frame/FrameHost.h" |
| 37 #include "sky/engine/core/frame/LocalFrame.h" | 38 #include "sky/engine/core/frame/LocalFrame.h" |
| 38 #include "sky/engine/core/frame/Settings.h" | 39 #include "sky/engine/core/frame/Settings.h" |
| 39 #include "sky/engine/core/html/parser/TextResourceDecoder.h" | 40 #include "sky/engine/core/html/parser/TextResourceDecoder.h" |
| 40 #include "sky/engine/core/inspector/InspectorTraceEvents.h" | 41 #include "sky/engine/core/inspector/InspectorTraceEvents.h" |
| (...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 791 p->fillRect(rect, Color(0xFF, 0, 0)); | 792 p->fillRect(rect, Color(0xFF, 0, 0)); |
| 792 #endif | 793 #endif |
| 793 | 794 |
| 794 RenderView* renderView = this->renderView(); | 795 RenderView* renderView = this->renderView(); |
| 795 if (!renderView) { | 796 if (!renderView) { |
| 796 WTF_LOG_ERROR("called FrameView::paint with nil renderer"); | 797 WTF_LOG_ERROR("called FrameView::paint with nil renderer"); |
| 797 return; | 798 return; |
| 798 } | 799 } |
| 799 | 800 |
| 800 RELEASE_ASSERT(!needsLayout()); | 801 RELEASE_ASSERT(!needsLayout()); |
| 801 ASSERT(document->lifecycle().state() >= DocumentLifecycle::CompositingClean)
; | 802 ASSERT(document->lifecycle().state() >= DocumentLifecycle::PaintInvalidation
Clean); |
| 802 | 803 |
| 803 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Paint", "data"
, InspectorPaintEvent::data(renderView, rect)); | 804 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Paint", "data"
, InspectorPaintEvent::data(renderView, rect)); |
| 804 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.stack"), "
CallStack", TRACE_EVENT_SCOPE_PROCESS, "stack", InspectorCallStackEvent::current
CallStack()); | 805 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.stack"), "
CallStack", TRACE_EVENT_SCOPE_PROCESS, "stack", InspectorCallStackEvent::current
CallStack()); |
| 805 | 806 |
| 806 bool isTopLevelPainter = !s_inPaintContents; | 807 bool isTopLevelPainter = !s_inPaintContents; |
| 807 s_inPaintContents = true; | 808 s_inPaintContents = true; |
| 808 | 809 |
| 809 FontCachePurgePreventer fontCachePurgePreventer; | 810 FontCachePurgePreventer fontCachePurgePreventer; |
| 810 | 811 |
| 811 PaintBehavior oldPaintBehavior = m_paintBehavior; // FIXME(sky): is this nee
ded? | 812 PaintBehavior oldPaintBehavior = m_paintBehavior; // FIXME(sky): is this nee
ded? |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 870 | 871 |
| 871 updateLayoutAndStyleIfNeededRecursive(); | 872 updateLayoutAndStyleIfNeededRecursive(); |
| 872 | 873 |
| 873 if (RenderView* view = renderView()) { | 874 if (RenderView* view = renderView()) { |
| 874 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "In
validateTreeAndUpdateIframes", TRACE_EVENT_SCOPE_PROCESS, "frame", m_frame.get()
); | 875 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "In
validateTreeAndUpdateIframes", TRACE_EVENT_SCOPE_PROCESS, "frame", m_frame.get()
); |
| 875 invalidateTreeIfNeededRecursive(); | 876 invalidateTreeIfNeededRecursive(); |
| 876 view->updateIFramesAfterLayout(); | 877 view->updateIFramesAfterLayout(); |
| 877 } | 878 } |
| 878 | 879 |
| 879 ASSERT(lifecycle().state() == DocumentLifecycle::PaintInvalidationClean); | 880 ASSERT(lifecycle().state() == DocumentLifecycle::PaintInvalidationClean); |
| 881 |
| 882 DocumentAnimations::startPendingAnimations(*m_frame->document()); |
| 880 } | 883 } |
| 881 | 884 |
| 882 void FrameView::updateLayoutAndStyleIfNeededRecursive() | 885 void FrameView::updateLayoutAndStyleIfNeededRecursive() |
| 883 { | 886 { |
| 884 // We have to crawl our entire tree looking for any FrameViews that need | 887 // We have to crawl our entire tree looking for any FrameViews that need |
| 885 // layout and make sure they are up to date. | 888 // layout and make sure they are up to date. |
| 886 // Mac actually tests for intersection with the dirty region and tries not t
o | 889 // Mac actually tests for intersection with the dirty region and tries not t
o |
| 887 // update layout for frames that are outside the dirty region. Not only doe
s this seem | 890 // update layout for frames that are outside the dirty region. Not only doe
s this seem |
| 888 // pointless (since those frames will have set a zero timer to layout anyway
), but | 891 // pointless (since those frames will have set a zero timer to layout anyway
), but |
| 889 // it is also incorrect, since if two frames overlap, the first could be exc
luded from the dirty | 892 // it is also incorrect, since if two frames overlap, the first could be exc
luded from the dirty |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1015 void FrameView::setLayoutSizeInternal(const IntSize& size) | 1018 void FrameView::setLayoutSizeInternal(const IntSize& size) |
| 1016 { | 1019 { |
| 1017 if (m_layoutSize == size) | 1020 if (m_layoutSize == size) |
| 1018 return; | 1021 return; |
| 1019 | 1022 |
| 1020 m_layoutSize = size; | 1023 m_layoutSize = size; |
| 1021 contentsResized(); | 1024 contentsResized(); |
| 1022 } | 1025 } |
| 1023 | 1026 |
| 1024 } // namespace blink | 1027 } // namespace blink |
| OLD | NEW |