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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 m_verticalScrollbar->styleChanged(); | 334 m_verticalScrollbar->styleChanged(); |
335 didStyleChange = true; | 335 didStyleChange = true; |
336 } | 336 } |
337 if (didStyleChange) { | 337 if (didStyleChange) { |
338 updateScrollbarGeometry(); | 338 updateScrollbarGeometry(); |
339 updateScrollCorner(); | 339 updateScrollCorner(); |
340 positionScrollbarLayers(); | 340 positionScrollbarLayers(); |
341 } | 341 } |
342 } | 342 } |
343 | 343 |
| 344 void FrameView::invalidateAllCustomScrollbarsOnActiveChanged() |
| 345 { |
| 346 const ChildrenWidgetSet* viewChildren = children(); |
| 347 for (const RefPtrWillBeMember<Widget>& child : *viewChildren) { |
| 348 Widget* widget = child.get(); |
| 349 if (widget->isFrameView()) |
| 350 toFrameView(widget)->invalidateAllCustomScrollbarsOnActiveChanged(); |
| 351 else if (widget->isScrollbar() && toScrollbar(widget)->isCustomScrollbar
()) |
| 352 toScrollbar(widget)->styleChanged(); |
| 353 } |
| 354 recalculateCustomScrollbarStyle(); |
| 355 } |
| 356 |
344 void FrameView::recalculateScrollbarOverlayStyle() | 357 void FrameView::recalculateScrollbarOverlayStyle() |
345 { | 358 { |
346 ScrollbarOverlayStyle oldOverlayStyle = scrollbarOverlayStyle(); | 359 ScrollbarOverlayStyle oldOverlayStyle = scrollbarOverlayStyle(); |
347 ScrollbarOverlayStyle overlayStyle = ScrollbarOverlayStyleDefault; | 360 ScrollbarOverlayStyle overlayStyle = ScrollbarOverlayStyleDefault; |
348 | 361 |
349 Color backgroundColor = documentBackgroundColor(); | 362 Color backgroundColor = documentBackgroundColor(); |
350 // Reduce the background color from RGB to a lightness value | 363 // Reduce the background color from RGB to a lightness value |
351 // and determine which scrollbar style to use based on a lightness | 364 // and determine which scrollbar style to use based on a lightness |
352 // heuristic. | 365 // heuristic. |
353 double hue, saturation, lightness; | 366 double hue, saturation, lightness; |
(...skipping 3602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3956 return; | 3969 return; |
3957 | 3970 |
3958 ScrollableArea::setScrollOrigin(origin); | 3971 ScrollableArea::setScrollOrigin(origin); |
3959 | 3972 |
3960 // Update if the scroll origin changes, since our position will be different
if the content size did not change. | 3973 // Update if the scroll origin changes, since our position will be different
if the content size did not change. |
3961 if (updatePositionAtAll && updatePositionSynchronously) | 3974 if (updatePositionAtAll && updatePositionSynchronously) |
3962 updateScrollbars(scrollOffsetDouble()); | 3975 updateScrollbars(scrollOffsetDouble()); |
3963 } | 3976 } |
3964 | 3977 |
3965 } // namespace blink | 3978 } // namespace blink |
OLD | NEW |