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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp

Issue 2610253004: Migrate WTF::Vector::append() to ::push_back() [part 9 of N] (Closed)
Patch Set: rebase Created 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
4 * All right reserved. 4 * All right reserved.
5 * Copyright (C) 2010 Google Inc. All rights reserved. 5 * Copyright (C) 2010 Google Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // Justfication applies to before and after the combined text as if 60 // Justfication applies to before and after the combined text as if
61 // it is an ideographic character, and is prohibited inside the 61 // it is an ideographic character, and is prohibited inside the
62 // combined text. 62 // combined text.
63 opportunitiesInRun = isAfterExpansion ? 1 : 2; 63 opportunitiesInRun = isAfterExpansion ? 1 : 2;
64 isAfterExpansion = true; 64 isAfterExpansion = true;
65 } else { 65 } else {
66 opportunitiesInRun = Character::expansionOpportunityCount( 66 opportunitiesInRun = Character::expansionOpportunityCount(
67 text.characters16() + run.m_start, run.m_stop - run.m_start, 67 text.characters16() + run.m_start, run.m_stop - run.m_start,
68 run.m_box->direction(), isAfterExpansion, textJustify); 68 run.m_box->direction(), isAfterExpansion, textJustify);
69 } 69 }
70 m_runsWithExpansions.append(opportunitiesInRun); 70 m_runsWithExpansions.push_back(opportunitiesInRun);
71 m_totalOpportunities += opportunitiesInRun; 71 m_totalOpportunities += opportunitiesInRun;
72 } 72 }
73 void removeTrailingExpansion() { 73 void removeTrailingExpansion() {
74 if (!m_totalOpportunities || !m_runsWithExpansions.back()) 74 if (!m_totalOpportunities || !m_runsWithExpansions.back())
75 return; 75 return;
76 m_runsWithExpansions.back()--; 76 m_runsWithExpansions.back()--;
77 m_totalOpportunities--; 77 m_totalOpportunities--;
78 } 78 }
79 79
80 unsigned count() { return m_totalOpportunities; } 80 unsigned count() { return m_totalOpportunities; }
(...skipping 1842 matching lines...) Expand 10 before | Expand all | Expand 10 after
1923 if (o->isAtomicInlineLevel() || o->isFloating() || 1923 if (o->isAtomicInlineLevel() || o->isFloating() ||
1924 o->isOutOfFlowPositioned()) { 1924 o->isOutOfFlowPositioned()) {
1925 LayoutBox* box = toLayoutBox(o); 1925 LayoutBox* box = toLayoutBox(o);
1926 box->setMayNeedPaintInvalidation(); 1926 box->setMayNeedPaintInvalidation();
1927 1927
1928 updateBlockChildDirtyBitsBeforeLayout(relayoutChildren, *box); 1928 updateBlockChildDirtyBitsBeforeLayout(relayoutChildren, *box);
1929 1929
1930 if (o->isOutOfFlowPositioned()) { 1930 if (o->isOutOfFlowPositioned()) {
1931 o->containingBlock()->insertPositionedObject(box); 1931 o->containingBlock()->insertPositionedObject(box);
1932 } else if (o->isFloating()) { 1932 } else if (o->isFloating()) {
1933 layoutState.floats().append(FloatWithRect(box)); 1933 layoutState.floats().push_back(FloatWithRect(box));
1934 if (box->needsLayout()) { 1934 if (box->needsLayout()) {
1935 // Be sure to at least mark the first line affected by the float as 1935 // Be sure to at least mark the first line affected by the float as
1936 // dirty, so that the float gets relaid out. Otherwise we'll miss 1936 // dirty, so that the float gets relaid out. Otherwise we'll miss
1937 // it. After float layout, if it turns out that it changed size, 1937 // it. After float layout, if it turns out that it changed size,
1938 // any lines after this line will be deleted and relaid out. 1938 // any lines after this line will be deleted and relaid out.
1939 dirtyLinesFromChangedChild(box, MarkOnlyThis); 1939 dirtyLinesFromChangedChild(box, MarkOnlyThis);
1940 } 1940 }
1941 } else if (isFullLayout || o->needsLayout()) { 1941 } else if (isFullLayout || o->needsLayout()) {
1942 // Atomic inline. 1942 // Atomic inline.
1943 box->dirtyLineBoxes(isFullLayout); 1943 box->dirtyLineBoxes(isFullLayout);
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
2511 2511
2512 bool LayoutBlockFlow::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const { 2512 bool LayoutBlockFlow::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const {
2513 // LayoutBlockFlow is in charge of paint invalidation of the first line. 2513 // LayoutBlockFlow is in charge of paint invalidation of the first line.
2514 if (firstLineBox()) 2514 if (firstLineBox())
2515 return false; 2515 return false;
2516 2516
2517 return LayoutBlock::paintedOutputOfObjectHasNoEffectRegardlessOfSize(); 2517 return LayoutBlock::paintedOutputOfObjectHasNoEffectRegardlessOfSize();
2518 } 2518 }
2519 2519
2520 } // namespace blink 2520 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698