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

Unified Diff: Source/core/layout/TextAutosizer.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/TextAutosizer.h ('k') | Source/core/layout/TextRunConstructor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/TextAutosizer.cpp
diff --git a/Source/core/layout/TextAutosizer.cpp b/Source/core/layout/TextAutosizer.cpp
index 04c35aeb3c8d8ca38734488aa09a950ab40165c3..e1026e9de142606723c9c8757e16c4b9d254e816 100644
--- a/Source/core/layout/TextAutosizer.cpp
+++ b/Source/core/layout/TextAutosizer.cpp
@@ -222,7 +222,7 @@ static bool blockHeightConstrained(const LayoutBlock* block)
// FIXME: This code needs to take into account vertical writing modes.
// FIXME: Consider additional heuristics, such as ignoring fixed heights if the content is already overflowing before autosizing kicks in.
for (; block; block = block->containingBlock()) {
- const LayoutStyle& style = block->styleRef();
+ const ComputedStyle& style = block->styleRef();
if (style.overflowY() >= OSCROLL)
return false;
if (style.height().isSpecified() || style.maxHeight().isSpecified() || block->isOutOfFlowPositioned()) {
@@ -569,7 +569,7 @@ void TextAutosizer::resetMultipliers()
{
LayoutObject* renderer = m_document->layoutView();
while (renderer) {
- if (const LayoutStyle* style = renderer->style()) {
+ if (const ComputedStyle* style = renderer->style()) {
if (style->textAutosizingMultiplier() != 1)
applyMultiplier(renderer, 1, LayoutNeeded);
}
@@ -688,7 +688,7 @@ TextAutosizer::Fingerprint TextAutosizer::computeFingerprint(const LayoutObject*
data.m_qualifiedNameHash = QualifiedNameHash::hash(toElement(node)->tagQName());
- if (const LayoutStyle* style = renderer->style()) {
+ if (const ComputedStyle* style = renderer->style()) {
data.m_packedStyleProperties = style->direction();
data.m_packedStyleProperties |= (style->position() << 1);
data.m_packedStyleProperties |= (style->floating() << 4);
@@ -967,19 +967,19 @@ const LayoutObject* TextAutosizer::findTextLeaf(const LayoutObject* parent, size
void TextAutosizer::applyMultiplier(LayoutObject* renderer, float multiplier, RelayoutBehavior relayoutBehavior)
{
ASSERT(renderer);
- LayoutStyle& currentStyle = renderer->mutableStyleRef();
+ ComputedStyle& currentStyle = renderer->mutableStyleRef();
if (currentStyle.textAutosizingMultiplier() == multiplier)
return;
// We need to clone the render style to avoid breaking style sharing.
- RefPtr<LayoutStyle> style = LayoutStyle::clone(currentStyle);
+ RefPtr<ComputedStyle> style = ComputedStyle::clone(currentStyle);
style->setTextAutosizingMultiplier(multiplier);
style->setUnique();
switch (relayoutBehavior) {
case AlreadyInLayout:
// Don't free currentStyle until the end of the layout pass. This allows other parts of the system
- // to safely hold raw LayoutStyle* pointers during layout, e.g. BreakingContext::m_currentStyle.
+ // to safely hold raw ComputedStyle* pointers during layout, e.g. BreakingContext::m_currentStyle.
m_stylesRetainedDuringLayout.append(&currentStyle);
renderer->setStyleInternal(style.release());
« no previous file with comments | « Source/core/layout/TextAutosizer.h ('k') | Source/core/layout/TextRunConstructor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698