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

Unified Diff: Source/core/layout/LayoutScrollbar.cpp

Issue 1296033002: Fix re-layout logic in LayoutScrollbar::updateScrollbarParts. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 months 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/layout/LayoutScrollbar.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutScrollbar.cpp
diff --git a/Source/core/layout/LayoutScrollbar.cpp b/Source/core/layout/LayoutScrollbar.cpp
index 1829b789c01c9dcd836012414a8c8f9d67b8d81c..f1694a0635dc214d9b98ec49f2ed0077a2950413 100644
--- a/Source/core/layout/LayoutScrollbar.cpp
+++ b/Source/core/layout/LayoutScrollbar.cpp
@@ -32,6 +32,7 @@
#include "core/layout/LayoutPart.h"
#include "core/layout/LayoutScrollbarPart.h"
#include "core/layout/LayoutScrollbarTheme.h"
+#include "core/layout/LayoutView.h"
#include "platform/graphics/GraphicsContext.h"
namespace blink {
@@ -96,6 +97,13 @@ LayoutBox* LayoutScrollbar::owningLayoutObject() const
return m_owner && m_owner->layoutObject() ? m_owner->layoutObject()->enclosingBox() : 0;
}
+LayoutBox* LayoutScrollbar::owningLayoutObjectWithinFrame() const
+{
+ if (m_owningFrame)
+ return m_owningFrame->contentLayoutObject();
+ return owningLayoutObject();
+}
+
void LayoutScrollbar::setParent(Widget* parent)
{
Scrollbar::setParent(parent);
@@ -188,7 +196,7 @@ void LayoutScrollbar::updateScrollbarParts(bool destroy)
if (newThickness != oldThickness) {
setFrameRect(IntRect(location(), IntSize(isHorizontal ? width() : newThickness, isHorizontal ? newThickness : height())));
- if (LayoutBox* box = owningLayoutObject()) {
+ if (LayoutBox* box = owningLayoutObjectWithinFrame()) {
if (box->isLayoutBlock())
toLayoutBlock(box)->notifyScrollbarThicknessChanged();
box->setChildNeedsLayout();
« no previous file with comments | « Source/core/layout/LayoutScrollbar.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698