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

Side by Side Diff: Source/core/editing/FrameSelection.cpp

Issue 748513006: Trigger style recalc when the window's active state change (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: removed dumppixels from testcase Created 6 years 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) 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 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after
1457 void FrameSelection::notifyEventHandlerForSelectionChange() 1457 void FrameSelection::notifyEventHandlerForSelectionChange()
1458 { 1458 {
1459 m_frame->eventHandler().notifySelectionChanged(); 1459 m_frame->eventHandler().notifySelectionChanged();
1460 } 1460 }
1461 1461
1462 void FrameSelection::focusedOrActiveStateChanged() 1462 void FrameSelection::focusedOrActiveStateChanged()
1463 { 1463 {
1464 bool activeAndFocused = isFocusedAndActive(); 1464 bool activeAndFocused = isFocusedAndActive();
1465 1465
1466 RefPtrWillBeRawPtr<Document> document = m_frame->document(); 1466 RefPtrWillBeRawPtr<Document> document = m_frame->document();
1467 document->updateRenderTreeIfNeeded(); 1467 document->updateRenderTreeOnFocusChanged();
1468 1468
1469 // Because RenderObject::selectionBackgroundColor() and 1469 // Because RenderObject::selectionBackgroundColor() and
1470 // RenderObject::selectionForegroundColor() check if the frame is active, 1470 // RenderObject::selectionForegroundColor() check if the frame is active,
1471 // we have to update places those colors were painted. 1471 // we have to update places those colors were painted.
1472 if (RenderView* view = document->renderView()) 1472 if (RenderView* view = document->renderView())
1473 view->invalidatePaintForSelection(); 1473 view->invalidatePaintForSelection();
1474 1474
1475 // Caret appears in the active frame. 1475 // Caret appears in the active frame.
1476 if (activeAndFocused) 1476 if (activeAndFocused)
1477 setSelectionFromNone(); 1477 setSelectionFromNone();
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
1956 sel.showTreeForThis(); 1956 sel.showTreeForThis();
1957 } 1957 }
1958 1958
1959 void showTree(const blink::FrameSelection* sel) 1959 void showTree(const blink::FrameSelection* sel)
1960 { 1960 {
1961 if (sel) 1961 if (sel)
1962 sel->showTreeForThis(); 1962 sel->showTreeForThis();
1963 } 1963 }
1964 1964
1965 #endif 1965 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698