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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutScrollbarPart.cpp

Issue 1835843002: WIP: Fix foreignObject cullrect Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
Index: third_party/WebKit/Source/core/layout/LayoutScrollbarPart.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutScrollbarPart.cpp b/third_party/WebKit/Source/core/layout/LayoutScrollbarPart.cpp
index 7e828396612d4e86099d8b074171fed1c2b06876..5171058638c1b0d7965488056df3ed169e63c257 100644
--- a/third_party/WebKit/Source/core/layout/LayoutScrollbarPart.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutScrollbarPart.cpp
@@ -35,8 +35,9 @@
namespace blink {
-LayoutScrollbarPart::LayoutScrollbarPart(LayoutScrollbar* scrollbar, ScrollbarPart part)
+LayoutScrollbarPart::LayoutScrollbarPart(ScrollableArea* scrollableArea, LayoutScrollbar* scrollbar, ScrollbarPart part)
: LayoutBlock(nullptr)
+ , m_scrollableArea(scrollableArea)
, m_scrollbar(scrollbar)
, m_part(part)
{
@@ -74,9 +75,10 @@ static void recordScrollbarPartStats(Document& document, ScrollbarPart part)
}
}
-LayoutScrollbarPart* LayoutScrollbarPart::createAnonymous(Document* document, LayoutScrollbar* scrollbar, ScrollbarPart part)
+LayoutScrollbarPart* LayoutScrollbarPart::createAnonymous(Document* document, ScrollableArea* scrollableArea,
+ LayoutScrollbar* scrollbar, ScrollbarPart part)
{
- LayoutScrollbarPart* layoutObject = new LayoutScrollbarPart(scrollbar, part);
+ LayoutScrollbarPart* layoutObject = new LayoutScrollbarPart(scrollableArea, scrollbar, part);
recordScrollbarPartStats(*document, part);
layoutObject->setDocumentForAnonymous(document);
return layoutObject;
@@ -211,15 +213,14 @@ void LayoutScrollbarPart::setNeedsPaintInvalidation()
}
}
- // This LayoutScrollbarPart belongs to a PaintLayerScrollableArea.
- toLayoutBox(parent())->getScrollableArea()->setScrollCornerNeedsPaintInvalidation();
+ m_scrollableArea->setScrollCornerNeedsPaintInvalidation();
}
LayoutRect LayoutScrollbarPart::visualRect() const
{
// This returns the combined bounds of all scrollbar parts, which is sufficient for correctness
// but not as tight as it could be.
- return m_scrollbar ? m_scrollbar->visualRect() : LayoutRect();
+ return m_scrollableArea->visualRectForScrollbarParts();
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698