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

Unified Diff: Source/core/rendering/RenderBlock.cpp

Issue 82083002: Move viewport unit resolution to style recalc time (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: rebased.. Created 7 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
Index: Source/core/rendering/RenderBlock.cpp
diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp
index 4b1580ec252202625fbe031b864cc4bcb77849c9..8f2746da22c0340d681864e96108d27a418ade11 100644
--- a/Source/core/rendering/RenderBlock.cpp
+++ b/Source/core/rendering/RenderBlock.cpp
@@ -2915,12 +2915,9 @@ void RenderBlock::clearPercentHeightDescendantsFrom(RenderBox* parent)
LayoutUnit RenderBlock::textIndentOffset() const
{
LayoutUnit cw = 0;
- RenderView* renderView = 0;
if (style()->textIndent().isPercent())
cw = containingBlock()->availableLogicalWidth();
- else if (style()->textIndent().isViewportPercentage())
- renderView = view();
- return minimumValueForLength(style()->textIndent(), cw, renderView);
+ return minimumValueForLength(style()->textIndent(), cw);
}
LayoutUnit RenderBlock::logicalLeftOffsetForContent(RenderRegion* region) const
@@ -3123,7 +3120,7 @@ bool RenderBlock::nodeAtPoint(const HitTestRequest& request, HitTestResult& resu
if (!isRenderView() && style()->hasBorderRadius()) {
LayoutRect borderRect = borderBoxRect();
borderRect.moveBy(adjustedLocation);
- RoundedRect border = style()->getRoundedBorderFor(borderRect, view());
+ RoundedRect border = style()->getRoundedBorderFor(borderRect);
if (!locationInContainer.intersects(border))
return false;
}
@@ -4112,7 +4109,7 @@ void RenderBlock::computeInlinePreferredLogicalWidths(LayoutUnit& minLogicalWidt
// Signals the text indent was more negative than the min preferred width
bool hasRemainingNegativeTextIndent = false;
- LayoutUnit textIndent = minimumValueForLength(styleToUse->textIndent(), cw, view());
+ LayoutUnit textIndent = minimumValueForLength(styleToUse->textIndent(), cw);
RenderObject* prevFloat = 0;
bool isPrevChildInlineFlow = false;
bool shouldBreakLineAfterText = false;
@@ -4506,11 +4503,11 @@ LayoutUnit RenderBlock::lineHeight(bool firstLine, LineDirectionMode direction,
if (firstLine && document().styleEngine()->usesFirstLineRules()) {
RenderStyle* s = style(firstLine);
if (s != style())
- return s->computedLineHeight(view());
+ return s->computedLineHeight();
}
if (m_lineHeight == -1)
- m_lineHeight = style()->computedLineHeight(view());
+ m_lineHeight = style()->computedLineHeight();
return m_lineHeight;
}

Powered by Google App Engine
This is Rietveld 408576698