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

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

Issue 865383003: Consolidate callers to scheduleVisualUpdate. (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
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 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 return; 448 return;
449 if (!m_frame->document()->isActive()) 449 if (!m_frame->document()->isActive())
450 return; 450 return;
451 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Invali dateLayout", TRACE_EVENT_SCOPE_PROCESS, "frame", m_frame.get()); 451 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Invali dateLayout", TRACE_EVENT_SCOPE_PROCESS, "frame", m_frame.get());
452 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.stack"), " CallStack", TRACE_EVENT_SCOPE_PROCESS, "stack", InspectorCallStackEvent::current CallStack()); 452 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.stack"), " CallStack", TRACE_EVENT_SCOPE_PROCESS, "stack", InspectorCallStackEvent::current CallStack());
453 453
454 if (m_hasPendingLayout) 454 if (m_hasPendingLayout)
455 return; 455 return;
456 m_hasPendingLayout = true; 456 m_hasPendingLayout = true;
457 457
458 page()->animator().scheduleVisualUpdate(); 458 m_frame->document()->scheduleVisualUpdate();
459 lifecycle().ensureStateAtMost(DocumentLifecycle::StyleClean); 459 lifecycle().ensureStateAtMost(DocumentLifecycle::StyleClean);
460 } 460 }
461 461
462 static bool isObjectAncestorContainerOf(RenderObject* ancestor, RenderObject* de scendant) 462 static bool isObjectAncestorContainerOf(RenderObject* ancestor, RenderObject* de scendant)
463 { 463 {
464 for (RenderObject* r = descendant; r; r = r->container()) { 464 for (RenderObject* r = descendant; r; r = r->container()) {
465 if (r == ancestor) 465 if (r == ancestor)
466 return true; 466 return true;
467 } 467 }
468 return false; 468 return false;
(...skipping 30 matching lines...) Expand all
499 m_layoutSubtreeRoot->markContainingBlocksForLayout(false); 499 m_layoutSubtreeRoot->markContainingBlocksForLayout(false);
500 m_layoutSubtreeRoot = 0; 500 m_layoutSubtreeRoot = 0;
501 relayoutRoot->markContainingBlocksForLayout(false); 501 relayoutRoot->markContainingBlocksForLayout(false);
502 } 502 }
503 } 503 }
504 } else if (m_layoutSchedulingEnabled) { 504 } else if (m_layoutSchedulingEnabled) {
505 m_layoutSubtreeRoot = relayoutRoot; 505 m_layoutSubtreeRoot = relayoutRoot;
506 ASSERT(!m_layoutSubtreeRoot->container() || !m_layoutSubtreeRoot->contai ner()->needsLayout()); 506 ASSERT(!m_layoutSubtreeRoot->container() || !m_layoutSubtreeRoot->contai ner()->needsLayout());
507 m_hasPendingLayout = true; 507 m_hasPendingLayout = true;
508 508
509 page()->animator().scheduleVisualUpdate(); 509 m_frame->document()->scheduleVisualUpdate();
510 lifecycle().ensureStateAtMost(DocumentLifecycle::StyleClean); 510 lifecycle().ensureStateAtMost(DocumentLifecycle::StyleClean);
511 } 511 }
512 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Invali dateLayout", TRACE_EVENT_SCOPE_PROCESS, "frame", m_frame.get()); 512 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Invali dateLayout", TRACE_EVENT_SCOPE_PROCESS, "frame", m_frame.get());
513 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.stack"), " CallStack", TRACE_EVENT_SCOPE_PROCESS, "stack", InspectorCallStackEvent::current CallStack()); 513 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.stack"), " CallStack", TRACE_EVENT_SCOPE_PROCESS, "stack", InspectorCallStackEvent::current CallStack());
514 } 514 }
515 515
516 bool FrameView::layoutPending() const 516 bool FrameView::layoutPending() const
517 { 517 {
518 // FIXME: This should check Document::lifecycle instead. 518 // FIXME: This should check Document::lifecycle instead.
519 return m_hasPendingLayout; 519 return m_hasPendingLayout;
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 totalObjects = 0; 895 totalObjects = 0;
896 896
897 for (RenderObject* o = root; o; o = o->nextInPreOrder(root)) { 897 for (RenderObject* o = root; o; o = o->nextInPreOrder(root)) {
898 ++totalObjects; 898 ++totalObjects;
899 if (o->needsLayout()) 899 if (o->needsLayout())
900 ++needsLayoutObjects; 900 ++needsLayoutObjects;
901 } 901 }
902 } 902 }
903 903
904 } // namespace blink 904 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/editing/InputMethodController.cpp ('k') | sky/engine/core/html/HTMLCanvasElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698