| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
| 3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
| 4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
| 5 * 2000 Dirk Mueller <mueller@kde.org> | 5 * 2000 Dirk Mueller <mueller@kde.org> |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 9 * Copyright (C) 2009 Google Inc. All rights reserved. | 9 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 10 * | 10 * |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 } | 333 } |
| 334 if (didStyleChange) { | 334 if (didStyleChange) { |
| 335 updateScrollbarGeometry(); | 335 updateScrollbarGeometry(); |
| 336 updateScrollCorner(); | 336 updateScrollCorner(); |
| 337 positionScrollbarLayers(); | 337 positionScrollbarLayers(); |
| 338 } | 338 } |
| 339 } | 339 } |
| 340 | 340 |
| 341 void FrameView::invalidateAllCustomScrollbarsOnActiveChanged() | 341 void FrameView::invalidateAllCustomScrollbarsOnActiveChanged() |
| 342 { | 342 { |
| 343 bool usesWindowInactiveSelector = m_frame->document()->styleEngine()->usesWi
ndowInactiveSelector(); |
| 344 |
| 343 const ChildrenWidgetSet* viewChildren = children(); | 345 const ChildrenWidgetSet* viewChildren = children(); |
| 344 for (const RefPtrWillBeMember<Widget>& child : *viewChildren) { | 346 for (const RefPtrWillBeMember<Widget>& child : *viewChildren) { |
| 345 Widget* widget = child.get(); | 347 Widget* widget = child.get(); |
| 346 if (widget->isFrameView()) | 348 if (widget->isFrameView()) |
| 347 toFrameView(widget)->invalidateAllCustomScrollbarsOnActiveChanged(); | 349 toFrameView(widget)->invalidateAllCustomScrollbarsOnActiveChanged(); |
| 348 else if (widget->isScrollbar() && toScrollbar(widget)->isCustomScrollbar
()) | 350 else if (usesWindowInactiveSelector && widget->isScrollbar() && toScroll
bar(widget)->isCustomScrollbar()) |
| 349 toScrollbar(widget)->styleChanged(); | 351 toScrollbar(widget)->styleChanged(); |
| 350 } | 352 } |
| 351 recalculateCustomScrollbarStyle(); | 353 if (usesWindowInactiveSelector) |
| 354 recalculateCustomScrollbarStyle(); |
| 352 } | 355 } |
| 353 | 356 |
| 354 void FrameView::recalculateScrollbarOverlayStyle() | 357 void FrameView::recalculateScrollbarOverlayStyle() |
| 355 { | 358 { |
| 356 ScrollbarOverlayStyle oldOverlayStyle = scrollbarOverlayStyle(); | 359 ScrollbarOverlayStyle oldOverlayStyle = scrollbarOverlayStyle(); |
| 357 ScrollbarOverlayStyle overlayStyle = ScrollbarOverlayStyleDefault; | 360 ScrollbarOverlayStyle overlayStyle = ScrollbarOverlayStyleDefault; |
| 358 | 361 |
| 359 Color backgroundColor = documentBackgroundColor(); | 362 Color backgroundColor = documentBackgroundColor(); |
| 360 // Reduce the background color from RGB to a lightness value | 363 // Reduce the background color from RGB to a lightness value |
| 361 // and determine which scrollbar style to use based on a lightness | 364 // and determine which scrollbar style to use based on a lightness |
| (...skipping 3643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4005 return; | 4008 return; |
| 4006 | 4009 |
| 4007 ScrollableArea::setScrollOrigin(origin); | 4010 ScrollableArea::setScrollOrigin(origin); |
| 4008 | 4011 |
| 4009 // Update if the scroll origin changes, since our position will be different
if the content size did not change. | 4012 // Update if the scroll origin changes, since our position will be different
if the content size did not change. |
| 4010 if (updatePositionAtAll && updatePositionSynchronously) | 4013 if (updatePositionAtAll && updatePositionSynchronously) |
| 4011 updateScrollbars(scrollOffsetDouble()); | 4014 updateScrollbars(scrollOffsetDouble()); |
| 4012 } | 4015 } |
| 4013 | 4016 |
| 4014 } // namespace blink | 4017 } // namespace blink |
| OLD | NEW |