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

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

Issue 792233004: Invalidate Custom Scrollbars irrespective of focused frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
« no previous file with comments | « LayoutTests/scrollbars/custom-scrollbar-thumb-focus-iframe-inactive-pseudo-expected.html ('k') | 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) 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 1447 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // Invalidate All CustomScrollbars as CustomScrollbars supports 1467 // Invalidate All CustomScrollbars as CustomScrollbars supports
1468 // CSS window-active attribute. 1468 // CSS window-active attribute.Irrespective of focus on frame, this
1469 if (FrameView* view = document->view()) 1469 // needs to be applied for entire page. So invalidate from root FrameView
skobes 2014/12/16 22:19:52 If the frame's focus state is irrelevant, this see
MuVen 2014/12/17 17:17:15 yes, i tried earlier with what you have mentioned.
skobes 2014/12/17 17:41:31 I'm sorry, I don't understand what you're trying t
MuVen 2014/12/17 18:06:52 I have earlier tried calling focusorActiveStateCha
skobes 2014/12/17 18:51:22 I didn't mean for FocusController::setActive to ca
MuVen 2014/12/17 18:59:43 Oh ok ok !!! Got it, Make sense even. I shall upda
1470 // rather than focused frame.
1471 if (FrameView* view = m_frame->localFrameRoot()->document()->view())
1470 view->invalidateAllCustomScrollbarsOnActiveChanged(); 1472 view->invalidateAllCustomScrollbarsOnActiveChanged();
1471 1473
1472 document->updateRenderTreeIfNeeded(); 1474 document->updateRenderTreeIfNeeded();
1473 1475
1474 // Because RenderObject::selectionBackgroundColor() and 1476 // Because RenderObject::selectionBackgroundColor() and
1475 // RenderObject::selectionForegroundColor() check if the frame is active, 1477 // RenderObject::selectionForegroundColor() check if the frame is active,
1476 // we have to update places those colors were painted. 1478 // we have to update places those colors were painted.
1477 if (RenderView* view = document->renderView()) 1479 if (RenderView* view = document->renderView())
1478 view->invalidatePaintForSelection(); 1480 view->invalidatePaintForSelection();
1479 1481
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
1920 sel.showTreeForThis(); 1922 sel.showTreeForThis();
1921 } 1923 }
1922 1924
1923 void showTree(const blink::FrameSelection* sel) 1925 void showTree(const blink::FrameSelection* sel)
1924 { 1926 {
1925 if (sel) 1927 if (sel)
1926 sel->showTreeForThis(); 1928 sel->showTreeForThis();
1927 } 1929 }
1928 1930
1929 #endif 1931 #endif
OLDNEW
« no previous file with comments | « LayoutTests/scrollbars/custom-scrollbar-thumb-focus-iframe-inactive-pseudo-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698