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

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

Issue 1033943002: Rename LayoutStyle to papayawhip (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ensureComputedStyle Created 5 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
« no previous file with comments | « Source/core/layout/LayoutTextControlSingleLine.h ('k') | Source/core/layout/LayoutTheme.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutTextControlSingleLine.cpp
diff --git a/Source/core/layout/LayoutTextControlSingleLine.cpp b/Source/core/layout/LayoutTextControlSingleLine.cpp
index c1cd7e3a79e2cbecfc688af4b8dd4a6f7219d229..619bf77f12a569a26231adc57b7dc92aaab1e78c 100644
--- a/Source/core/layout/LayoutTextControlSingleLine.cpp
+++ b/Source/core/layout/LayoutTextControlSingleLine.cpp
@@ -227,7 +227,7 @@ bool LayoutTextControlSingleLine::nodeAtPoint(const HitTestRequest& request, Hit
return true;
}
-void LayoutTextControlSingleLine::styleDidChange(StyleDifference diff, const LayoutStyle* oldStyle)
+void LayoutTextControlSingleLine::styleDidChange(StyleDifference diff, const ComputedStyle* oldStyle)
{
m_desiredInnerEditorLogicalHeight = -1;
LayoutTextControl::styleDidChange(diff, oldStyle);
@@ -330,8 +330,8 @@ LayoutUnit LayoutTextControlSingleLine::preferredContentLogicalWidth(float charW
if (LayoutBox* spinRenderer = spinButton ? spinButton->layoutBox() : 0) {
result += spinRenderer->borderAndPaddingLogicalWidth();
// Since the width of spinRenderer is not calculated yet, spinRenderer->logicalWidth() returns 0.
- // So computedStyle()->logicalWidth() is used instead.
- result += spinButton->computedStyle()->logicalWidth().value();
+ // So ensureComputedStyle()->logicalWidth() is used instead.
+ result += spinButton->ensureComputedStyle()->logicalWidth().value();
}
}
@@ -343,9 +343,9 @@ LayoutUnit LayoutTextControlSingleLine::computeControlLogicalHeight(LayoutUnit l
return lineHeight + nonContentHeight;
}
-PassRefPtr<LayoutStyle> LayoutTextControlSingleLine::createInnerEditorStyle(const LayoutStyle& startStyle) const
+PassRefPtr<ComputedStyle> LayoutTextControlSingleLine::createInnerEditorStyle(const ComputedStyle& startStyle) const
{
- RefPtr<LayoutStyle> textBlockStyle = LayoutStyle::create();
+ RefPtr<ComputedStyle> textBlockStyle = ComputedStyle::create();
textBlockStyle->inheritFrom(startStyle);
adjustInnerEditorStyle(*textBlockStyle);
@@ -359,7 +359,7 @@ PassRefPtr<LayoutStyle> LayoutTextControlSingleLine::createInnerEditorStyle(cons
textBlockStyle->setLogicalHeight(Length(m_desiredInnerEditorLogicalHeight, Fixed));
// Do not allow line-height to be smaller than our default.
if (textBlockStyle->fontMetrics().lineSpacing() > lineHeight(true, HorizontalLine, PositionOfInteriorLineBoxes))
- textBlockStyle->setLineHeight(LayoutStyle::initialLineHeight());
+ textBlockStyle->setLineHeight(ComputedStyle::initialLineHeight());
textBlockStyle->setDisplay(BLOCK);
textBlockStyle->setUnique();
« no previous file with comments | « Source/core/layout/LayoutTextControlSingleLine.h ('k') | Source/core/layout/LayoutTheme.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698