| 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 |
| 1467 document->updateRenderTreeIfNeeded(); | 1472 document->updateRenderTreeIfNeeded(); |
| 1468 | 1473 |
| 1469 // Because RenderObject::selectionBackgroundColor() and | 1474 // Because RenderObject::selectionBackgroundColor() and |
| 1470 // RenderObject::selectionForegroundColor() check if the frame is active, | 1475 // RenderObject::selectionForegroundColor() check if the frame is active, |
| 1471 // we have to update places those colors were painted. | 1476 // we have to update places those colors were painted. |
| 1472 if (RenderView* view = document->renderView()) | 1477 if (RenderView* view = document->renderView()) |
| 1473 view->invalidatePaintForSelection(); | 1478 view->invalidatePaintForSelection(); |
| 1474 | 1479 |
| 1475 // Caret appears in the active frame. | 1480 // Caret appears in the active frame. |
| 1476 if (activeAndFocused) | 1481 if (activeAndFocused) |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1956 sel.showTreeForThis(); | 1961 sel.showTreeForThis(); |
| 1957 } | 1962 } |
| 1958 | 1963 |
| 1959 void showTree(const blink::FrameSelection* sel) | 1964 void showTree(const blink::FrameSelection* sel) |
| 1960 { | 1965 { |
| 1961 if (sel) | 1966 if (sel) |
| 1962 sel->showTreeForThis(); | 1967 sel->showTreeForThis(); |
| 1963 } | 1968 } |
| 1964 | 1969 |
| 1965 #endif | 1970 #endif |
| OLD | NEW |