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

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

Issue 938193004: Remove dead position:relative code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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: sky/engine/core/rendering/RenderBlock.cpp
diff --git a/sky/engine/core/rendering/RenderBlock.cpp b/sky/engine/core/rendering/RenderBlock.cpp
index d2a203a5ae72021cc5255fa6fc174cf744292d8e..94b779b3f36bb2922b1a96854795ed6cfa21d4e3 100644
--- a/sky/engine/core/rendering/RenderBlock.cpp
+++ b/sky/engine/core/rendering/RenderBlock.cpp
@@ -640,14 +640,6 @@ GapRects RenderBlock::blockSelectionGaps(RenderBlock* rootBlock, const LayoutPoi
if (curr->isFloatingOrOutOfFlowPositioned())
continue; // We must be a normal flow object in order to even be considered.
- if (curr->isRelPositioned() && curr->hasLayer()) {
- // If the relposition offset is anything other than 0, then treat this just like an absolute positioned element.
- // Just disregard it completely.
- LayoutSize relOffset = curr->layer()->offsetForInFlowPosition();
- if (relOffset.width() || relOffset.height())
- continue;
- }
-
bool paintsOwnSelection = curr->shouldPaintSelectionGaps();
bool fillBlockGaps = paintsOwnSelection || (curr->canBeSelectionLeaf() && childState != SelectionNone);
if (fillBlockGaps) {
@@ -1117,8 +1109,6 @@ static inline bool isEditingBoundary(RenderObject* ancestor, RenderObject* child
static PositionWithAffinity positionForPointRespectingEditingBoundaries(RenderBlock* parent, RenderBox* child, const LayoutPoint& pointInParentCoordinates)
{
LayoutPoint childLocation = child->location();
- if (child->isRelPositioned())
- childLocation += child->offsetForInFlowPosition();
// FIXME: This is wrong if the child's writing-mode is different from the parent's.
LayoutPoint pointInChildCoordinates(toLayoutPoint(pointInParentCoordinates - childLocation));
@@ -1631,8 +1621,6 @@ const char* RenderBlock::renderName() const
return "RenderBlock (anonymous)";
if (isAnonymous())
return "RenderBlock (generated)";
- if (isRelPositioned())
- return "RenderBlock (relative positioned)";
return "RenderBlock";
}

Powered by Google App Engine
This is Rietveld 408576698