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(); | |
|
skobes
2014/12/08 21:48:04
Sorry to revisit this but I am still confused by t
MuVen
2014/12/09 09:33:07
Actually as i see there is an issue in the FrameSe
| |
| 352 } else if (widget->isScrollbar()) { | |
| 353 toScrollbar(widget)->styleChanged(); | |
| 354 } | |
| 355 } | |
| 356 } | |
| 357 | |
| 344 void FrameView::recalculateScrollbarOverlayStyle() | 358 void FrameView::recalculateScrollbarOverlayStyle() |
| 345 { | 359 { |
| 346 ScrollbarOverlayStyle oldOverlayStyle = scrollbarOverlayStyle(); | 360 ScrollbarOverlayStyle oldOverlayStyle = scrollbarOverlayStyle(); |
| 347 ScrollbarOverlayStyle overlayStyle = ScrollbarOverlayStyleDefault; | 361 ScrollbarOverlayStyle overlayStyle = ScrollbarOverlayStyleDefault; |
| 348 | 362 |
| 349 Color backgroundColor = documentBackgroundColor(); | 363 Color backgroundColor = documentBackgroundColor(); |
| 350 // Reduce the background color from RGB to a lightness value | 364 // Reduce the background color from RGB to a lightness value |
| 351 // and determine which scrollbar style to use based on a lightness | 365 // and determine which scrollbar style to use based on a lightness |
| 352 // heuristic. | 366 // heuristic. |
| 353 double hue, saturation, lightness; | 367 double hue, saturation, lightness; |
| (...skipping 3608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3962 return; | 3976 return; |
| 3963 | 3977 |
| 3964 ScrollableArea::setScrollOrigin(origin); | 3978 ScrollableArea::setScrollOrigin(origin); |
| 3965 | 3979 |
| 3966 // Update if the scroll origin changes, since our position will be different if the content size did not change. | 3980 // Update if the scroll origin changes, since our position will be different if the content size did not change. |
| 3967 if (updatePositionAtAll && updatePositionSynchronously) | 3981 if (updatePositionAtAll && updatePositionSynchronously) |
| 3968 updateScrollbars(scrollOffsetDouble()); | 3982 updateScrollbars(scrollOffsetDouble()); |
| 3969 } | 3983 } |
| 3970 | 3984 |
| 3971 } // namespace blink | 3985 } // namespace blink |
| OLD | NEW |