Chromium Code Reviews| 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)->recalculateCustomScrollbarStyle(); | |
| 351 toFrameView(widget)->invalidateAllCustomScrollbarsOnActiveChanged(); | |
| 352 } else if (widget->isScrollbar()) { | |
| 353 toScrollbar(widget)->styleChanged(); | |
| 354 updateScrollbarGeometry(); | |
|
MuVen
2014/12/09 11:29:48
This snippet was missed. If RootFrameView has Cust
rune
2014/12/09 11:41:33
I'm not an expert on scrollbar widgets, but doesn'
| |
| 355 updateScrollCorner(); | |
| 356 positionScrollbarLayers(); | |
| 357 } | |
| 358 } | |
| 359 } | |
| 360 | |
| 344 void FrameView::recalculateScrollbarOverlayStyle() | 361 void FrameView::recalculateScrollbarOverlayStyle() |
| 345 { | 362 { |
| 346 ScrollbarOverlayStyle oldOverlayStyle = scrollbarOverlayStyle(); | 363 ScrollbarOverlayStyle oldOverlayStyle = scrollbarOverlayStyle(); |
| 347 ScrollbarOverlayStyle overlayStyle = ScrollbarOverlayStyleDefault; | 364 ScrollbarOverlayStyle overlayStyle = ScrollbarOverlayStyleDefault; |
| 348 | 365 |
| 349 Color backgroundColor = documentBackgroundColor(); | 366 Color backgroundColor = documentBackgroundColor(); |
| 350 // Reduce the background color from RGB to a lightness value | 367 // Reduce the background color from RGB to a lightness value |
| 351 // and determine which scrollbar style to use based on a lightness | 368 // and determine which scrollbar style to use based on a lightness |
| 352 // heuristic. | 369 // heuristic. |
| 353 double hue, saturation, lightness; | 370 double hue, saturation, lightness; |
| (...skipping 3602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3956 return; | 3973 return; |
| 3957 | 3974 |
| 3958 ScrollableArea::setScrollOrigin(origin); | 3975 ScrollableArea::setScrollOrigin(origin); |
| 3959 | 3976 |
| 3960 // Update if the scroll origin changes, since our position will be different if the content size did not change. | 3977 // Update if the scroll origin changes, since our position will be different if the content size did not change. |
| 3961 if (updatePositionAtAll && updatePositionSynchronously) | 3978 if (updatePositionAtAll && updatePositionSynchronously) |
| 3962 updateScrollbars(scrollOffsetDouble()); | 3979 updateScrollbars(scrollOffsetDouble()); |
| 3963 } | 3980 } |
| 3964 | 3981 |
| 3965 } // namespace blink | 3982 } // namespace blink |
| OLD | NEW |