OLD | NEW |
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 Loading... |
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 // Invalidate All CustomScrollbars as CustomScrollbars supports | |
1468 // CSS window-active attribute. | |
1469 if (FrameView* view = document->view()) | |
1470 view->invalidateAllCustomScrollbarsOnActiveChanged(); | |
1471 | |
1472 document->updateRenderTreeIfNeeded(); | 1467 document->updateRenderTreeIfNeeded(); |
1473 | 1468 |
1474 // Because RenderObject::selectionBackgroundColor() and | 1469 // Because RenderObject::selectionBackgroundColor() and |
1475 // RenderObject::selectionForegroundColor() check if the frame is active, | 1470 // RenderObject::selectionForegroundColor() check if the frame is active, |
1476 // we have to update places those colors were painted. | 1471 // we have to update places those colors were painted. |
1477 if (RenderView* view = document->renderView()) | 1472 if (RenderView* view = document->renderView()) |
1478 view->invalidatePaintForSelection(); | 1473 view->invalidatePaintForSelection(); |
1479 | 1474 |
1480 // Caret appears in the active frame. | 1475 // Caret appears in the active frame. |
1481 if (activeAndFocused) | 1476 if (activeAndFocused) |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1920 sel.showTreeForThis(); | 1915 sel.showTreeForThis(); |
1921 } | 1916 } |
1922 | 1917 |
1923 void showTree(const blink::FrameSelection* sel) | 1918 void showTree(const blink::FrameSelection* sel) |
1924 { | 1919 { |
1925 if (sel) | 1920 if (sel) |
1926 sel->showTreeForThis(); | 1921 sel->showTreeForThis(); |
1927 } | 1922 } |
1928 | 1923 |
1929 #endif | 1924 #endif |
OLD | NEW |