Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(376)

Side by Side Diff: sky/engine/core/frame/FrameView.cpp

Issue 846643005: Fix the build (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 return result; 687 return result;
688 } 688 }
689 689
690 void FrameView::paint(GraphicsContext* context, const IntRect& rect) 690 void FrameView::paint(GraphicsContext* context, const IntRect& rect)
691 { 691 {
692 paintContents(context, rect); 692 paintContents(context, rect);
693 } 693 }
694 694
695 void FrameView::paintContents(GraphicsContext* p, const IntRect& rect) 695 void FrameView::paintContents(GraphicsContext* p, const IntRect& rect)
696 { 696 {
697 Document* document = m_frame->document();
698
699 #ifndef NDEBUG 697 #ifndef NDEBUG
700 bool fillWithRed; 698 bool fillWithRed;
701 if (isTransparent()) 699 if (isTransparent())
702 fillWithRed = false; // Transparent, don't fill with red. 700 fillWithRed = false; // Transparent, don't fill with red.
703 else if (m_nodeToDraw) 701 else if (m_nodeToDraw)
704 fillWithRed = false; // Element images are transparent, don't fill with red. 702 fillWithRed = false; // Element images are transparent, don't fill with red.
705 else 703 else
706 fillWithRed = true; 704 fillWithRed = true;
707 705
708 if (fillWithRed) 706 if (fillWithRed)
709 p->fillRect(rect, Color(0xFF, 0, 0)); 707 p->fillRect(rect, Color(0xFF, 0, 0));
710 #endif 708 #endif
711 709
712 RenderView* renderView = this->renderView(); 710 RenderView* renderView = this->renderView();
713 if (!renderView) { 711 if (!renderView) {
714 WTF_LOG_ERROR("called FrameView::paint with nil renderer"); 712 WTF_LOG_ERROR("called FrameView::paint with nil renderer");
715 return; 713 return;
716 } 714 }
717 715
718 RELEASE_ASSERT(!needsLayout()); 716 RELEASE_ASSERT(!needsLayout());
719 ASSERT(document->lifecycle().state() >= DocumentLifecycle::StyleAndLayoutCle an); 717 ASSERT(m_frame->document()->lifecycle().state() >= DocumentLifecycle::StyleA ndLayoutClean);
720 718
721 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Paint", "data" , InspectorPaintEvent::data(renderView, rect)); 719 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Paint", "data" , InspectorPaintEvent::data(renderView, rect));
722 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.stack"), " CallStack", TRACE_EVENT_SCOPE_PROCESS, "stack", InspectorCallStackEvent::current CallStack()); 720 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.stack"), " CallStack", TRACE_EVENT_SCOPE_PROCESS, "stack", InspectorCallStackEvent::current CallStack());
723 721
724 bool isTopLevelPainter = !s_inPaintContents; 722 bool isTopLevelPainter = !s_inPaintContents;
725 s_inPaintContents = true; 723 s_inPaintContents = true;
726 724
727 FontCachePurgePreventer fontCachePurgePreventer; 725 FontCachePurgePreventer fontCachePurgePreventer;
728 726
729 ASSERT(!m_isPainting); 727 ASSERT(!m_isPainting);
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 totalObjects = 0; 897 totalObjects = 0;
900 898
901 for (RenderObject* o = root; o; o = o->nextInPreOrder(root)) { 899 for (RenderObject* o = root; o; o = o->nextInPreOrder(root)) {
902 ++totalObjects; 900 ++totalObjects;
903 if (o->needsLayout()) 901 if (o->needsLayout())
904 ++needsLayoutObjects; 902 ++needsLayoutObjects;
905 } 903 }
906 } 904 }
907 905
908 } // namespace blink 906 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698