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

Side by Side Diff: sky/engine/core/editing/FrameSelection.cpp

Issue 847393003: Remove the PaintInvalidation DocumentLifeCycle states. (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 | « sky/engine/core/dom/DocumentLifecycle.cpp ('k') | sky/engine/core/frame/FrameView.h » ('j') | 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) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1190 return CaretBase::caretRenderer(m_selection.start().deprecatedNode()); 1190 return CaretBase::caretRenderer(m_selection.start().deprecatedNode());
1191 } 1191 }
1192 1192
1193 static bool isNonOrphanedCaret(const VisibleSelection& selection) 1193 static bool isNonOrphanedCaret(const VisibleSelection& selection)
1194 { 1194 {
1195 return selection.isCaret() && !selection.start().isOrphan() && !selection.en d().isOrphan(); 1195 return selection.isCaret() && !selection.start().isOrphan() && !selection.en d().isOrphan();
1196 } 1196 }
1197 1197
1198 IntRect FrameSelection::absoluteCaretBounds() 1198 IntRect FrameSelection::absoluteCaretBounds()
1199 { 1199 {
1200 ASSERT(m_frame->document()->lifecycle().state() != DocumentLifecycle::InPain tInvalidation);
1201 m_frame->document()->updateLayout(); 1200 m_frame->document()->updateLayout();
1202 if (!isNonOrphanedCaret(m_selection)) { 1201 if (!isNonOrphanedCaret(m_selection)) {
1203 clearCaretRect(); 1202 clearCaretRect();
1204 } else { 1203 } else {
1205 updateCaretRect(m_frame->document(), VisiblePosition(m_selection.start() , m_selection.affinity())); 1204 updateCaretRect(m_frame->document(), VisiblePosition(m_selection.start() , m_selection.affinity()));
1206 } 1205 }
1207 return absoluteBoundsForLocalRect(m_selection.start().deprecatedNode(), loca lCaretRectWithoutUpdate()); 1206 return absoluteBoundsForLocalRect(m_selection.start().deprecatedNode(), loca lCaretRectWithoutUpdate());
1208 } 1207 }
1209 1208
1210 void FrameSelection::paintCaret(GraphicsContext* context, const LayoutPoint& pai ntOffset, const LayoutRect& clipRect) 1209 void FrameSelection::paintCaret(GraphicsContext* context, const LayoutPoint& pai ntOffset, const LayoutRect& clipRect)
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
1674 sel.showTreeForThis(); 1673 sel.showTreeForThis();
1675 } 1674 }
1676 1675
1677 void showTree(const blink::FrameSelection* sel) 1676 void showTree(const blink::FrameSelection* sel)
1678 { 1677 {
1679 if (sel) 1678 if (sel)
1680 sel->showTreeForThis(); 1679 sel->showTreeForThis();
1681 } 1680 }
1682 1681
1683 #endif 1682 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/dom/DocumentLifecycle.cpp ('k') | sky/engine/core/frame/FrameView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698