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

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

Issue 844023003: Delete InvalidationReason. (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 | sky/engine/core/rendering/RenderBlockFlow.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 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after
1365 scheduleVisualUpdate(); 1365 scheduleVisualUpdate();
1366 } 1366 }
1367 1367
1368 void FrameSelection::focusedOrActiveStateChanged() 1368 void FrameSelection::focusedOrActiveStateChanged()
1369 { 1369 {
1370 bool activeAndFocused = isFocusedAndActive(); 1370 bool activeAndFocused = isFocusedAndActive();
1371 1371
1372 RefPtr<Document> document = m_frame->document(); 1372 RefPtr<Document> document = m_frame->document();
1373 document->updateRenderTreeIfNeeded(); 1373 document->updateRenderTreeIfNeeded();
1374 1374
1375 // Because RenderObject::selectionBackgroundColor() and
1376 // RenderObject::selectionForegroundColor() check if the frame is active,
1377 // we have to update places those colors were painted.
1378 if (RenderView* view = document->renderView())
1379 view->invalidatePaintForSelection();
1380
1381 // Caret appears in the active frame. 1375 // Caret appears in the active frame.
1382 if (activeAndFocused) 1376 if (activeAndFocused)
1383 setSelectionFromNone(); 1377 setSelectionFromNone();
1384 else 1378 else
1385 m_frame->spellChecker().spellCheckAfterBlur(); 1379 m_frame->spellChecker().spellCheckAfterBlur();
1386 setCaretVisibility(activeAndFocused ? Visible : Hidden); 1380 setCaretVisibility(activeAndFocused ? Visible : Hidden);
1387 1381
1388 // Update for caps lock state 1382 // Update for caps lock state
1389 m_frame->eventHandler().capsLockStateMayHaveChanged(); 1383 m_frame->eventHandler().capsLockStateMayHaveChanged();
1390 1384
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
1716 sel.showTreeForThis(); 1710 sel.showTreeForThis();
1717 } 1711 }
1718 1712
1719 void showTree(const blink::FrameSelection* sel) 1713 void showTree(const blink::FrameSelection* sel)
1720 { 1714 {
1721 if (sel) 1715 if (sel)
1722 sel->showTreeForThis(); 1716 sel->showTreeForThis();
1723 } 1717 }
1724 1718
1725 #endif 1719 #endif
OLDNEW
« no previous file with comments | « no previous file | sky/engine/core/rendering/RenderBlockFlow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698