Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1083)

Unified Diff: Source/core/frame/FrameView.cpp

Issue 774953003: CustomScrollbar Style not updated for IFrame. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/frame/FrameView.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index 80bbf1b9c1caa164c41519188afb2ff8c9b8d76d..5743b2ecf3ad03acad99f21fc5d4a52d2bd686cf 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -339,6 +339,35 @@ void FrameView::recalculateCustomScrollbarStyle()
updateScrollCorner();
positionScrollbarLayers();
}
+ if (!m_parts.isEmpty())
+ recalculateWidgetCustomScrollbarStyle();
+}
+
+void FrameView::recalculateWidgetCustomScrollbarStyle()
MuVen 2014/12/04 15:47:10 with this changes any scrollbar pertaining to fram
+{
+ WillBeHeapVector<RefPtrWillBeMember<RenderPart> > parts;
+ copyToVector(m_parts, parts);
+
+ for (size_t i = 0; i < parts.size() && renderView(); ++i) {
skobes 2014/12/04 17:18:38 This looks like it does the equivalent of FrameVie
MuVen 2014/12/04 17:50:28 True. Instead of writing one more api i have reuse
+ Widget* widget = parts[i]->widget();
+ if (widget && widget->isFrameView()) {
+ FrameView* frameView = toFrameView(widget);
+ bool didStyleChange = false;
+ if (frameView->horizontalScrollbar() && frameView->horizontalScrollbar()->isCustomScrollbar()) {
+ frameView->horizontalScrollbar()->styleChanged();
+ didStyleChange = true;
+ }
+ if (frameView->verticalScrollbar() && frameView->verticalScrollbar()->isCustomScrollbar()) {
+ frameView->verticalScrollbar()->styleChanged();
+ didStyleChange = true;
+ }
+ if (didStyleChange) {
+ frameView->updateScrollbarGeometry();
+ frameView->updateScrollCorner();
+ frameView->positionScrollbarLayers();
+ }
+ }
+ }
}
void FrameView::recalculateScrollbarOverlayStyle()
« no previous file with comments | « Source/core/frame/FrameView.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698