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(); | |
|
pdr.
2014/12/06 04:17:53
Just to make sure I understand: we don't need to c
MuVen
2014/12/06 13:27:03
Good Catch !!! thanks, we have to call invalidateA
| |
| 351 } else if (widget->isScrollbar()) { | |
| 352 toScrollbar(widget)->styleChanged(); | |
| 353 } | |
| 354 } | |
| 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 3608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3962 return; | 3975 return; |
| 3963 | 3976 |
| 3964 ScrollableArea::setScrollOrigin(origin); | 3977 ScrollableArea::setScrollOrigin(origin); |
| 3965 | 3978 |
| 3966 // Update if the scroll origin changes, since our position will be different if the content size did not change. | 3979 // Update if the scroll origin changes, since our position will be different if the content size did not change. |
| 3967 if (updatePositionAtAll && updatePositionSynchronously) | 3980 if (updatePositionAtAll && updatePositionSynchronously) |
| 3968 updateScrollbars(scrollOffsetDouble()); | 3981 updateScrollbars(scrollOffsetDouble()); |
| 3969 } | 3982 } |
| 3970 | 3983 |
| 3971 } // namespace blink | 3984 } // namespace blink |
| OLD | NEW |