Index: Source/core/frame/FrameView.cpp |
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp |
index 79c8bc6ed79e305da0bbcb7175273785db4eb902..405f3d09a4c0829d7b8ace6f4caa564d3f8b124b 100644 |
--- a/Source/core/frame/FrameView.cpp |
+++ b/Source/core/frame/FrameView.cpp |
@@ -340,15 +340,18 @@ void FrameView::recalculateCustomScrollbarStyle() |
void FrameView::invalidateAllCustomScrollbarsOnActiveChanged() |
{ |
+ bool usesWindowInactiveSelector = m_frame->document()->styleEngine()->usesWindowInactiveSelector(); |
+ |
const ChildrenWidgetSet* viewChildren = children(); |
for (const RefPtrWillBeMember<Widget>& child : *viewChildren) { |
Widget* widget = child.get(); |
if (widget->isFrameView()) |
toFrameView(widget)->invalidateAllCustomScrollbarsOnActiveChanged(); |
- else if (widget->isScrollbar() && toScrollbar(widget)->isCustomScrollbar()) |
+ else if (usesWindowInactiveSelector && widget->isScrollbar() && toScrollbar(widget)->isCustomScrollbar()) |
toScrollbar(widget)->styleChanged(); |
} |
- recalculateCustomScrollbarStyle(); |
+ if (usesWindowInactiveSelector) |
+ recalculateCustomScrollbarStyle(); |
} |
void FrameView::recalculateScrollbarOverlayStyle() |