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

Unified Diff: sky/engine/core/rendering/RenderBlock.cpp

Issue 878303002: Remove more scrolling code from Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 | « sky/engine/core/rendering/RenderBlock.h ('k') | sky/engine/core/rendering/RenderBox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderBlock.cpp
diff --git a/sky/engine/core/rendering/RenderBlock.cpp b/sky/engine/core/rendering/RenderBlock.cpp
index 0c632e05e809816dd2aaf2bd1ef7c963f04eecdb..f0fdc42c54ce83ab1dde197ff3b090d48400a030 100644
--- a/sky/engine/core/rendering/RenderBlock.cpp
+++ b/sky/engine/core/rendering/RenderBlock.cpp
@@ -560,10 +560,6 @@ void RenderBlock::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffs
{
PaintPhase paintPhase = paintInfo.phase;
- LayoutPoint scrolledOffset = paintOffset;
- if (hasOverflowClip())
- scrolledOffset.move(-scrolledContentOffset());
-
if (paintPhase == PaintPhaseForeground) {
if (hasBoxDecorationBackground())
paintBoxDecorationBackground(paintInfo, paintOffset);
@@ -575,9 +571,9 @@ void RenderBlock::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffs
}
if (paintPhase != PaintPhaseSelfOutline)
- paintContents(paintInfo, scrolledOffset);
+ paintContents(paintInfo, paintOffset);
- paintSelection(paintInfo, scrolledOffset); // Fill in gaps in selection on lines and between blocks.
+ paintSelection(paintInfo, paintOffset); // Fill in gaps in selection on lines and between blocks.
if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseSelfOutline)
&& style()->hasOutline() && !style()->outlineStyleIsAuto()) {
@@ -1131,12 +1127,7 @@ bool RenderBlock::nodeAtPoint(const HitTestRequest& request, HitTestResult& resu
checkChildren = locationInContainer.intersects(clipRect);
}
if (checkChildren) {
- // Hit test descendants first.
- LayoutSize scrolledOffset(localOffset);
- if (hasOverflowClip())
- scrolledOffset -= scrolledContentOffset();
-
- if (hitTestContents(request, result, locationInContainer, toLayoutPoint(scrolledOffset), hitTestAction)) {
+ if (hitTestContents(request, result, locationInContainer, toLayoutPoint(localOffset), hitTestAction)) {
updateHitTestResult(result, locationInContainer.point() - localOffset);
return true;
}
@@ -1331,7 +1322,6 @@ PositionWithAffinity RenderBlock::positionForPoint(const LayoutPoint& point)
}
LayoutPoint pointInContents = point;
- offsetForContents(pointInContents);
LayoutPoint pointInLogicalContents(pointInContents);
if (isRenderParagraph())
@@ -1360,12 +1350,6 @@ PositionWithAffinity RenderBlock::positionForPoint(const LayoutPoint& point)
return RenderBox::positionForPoint(point);
}
-void RenderBlock::offsetForContents(LayoutPoint& offset) const
-{
- if (hasOverflowClip())
- offset += scrolledContentOffset();
-}
-
LayoutUnit RenderBlock::availableLogicalWidth() const
{
return RenderBox::availableLogicalWidth();
« no previous file with comments | « sky/engine/core/rendering/RenderBlock.h ('k') | sky/engine/core/rendering/RenderBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698