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

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

Issue 1473363003: Invalidate first line display item clients when first line style changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Handle inherited firstline style Created 5 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 ASSERT(userData); 1273 ASSERT(userData);
1274 (*customReverseImplementation)(userData, first, last); 1274 (*customReverseImplementation)(userData, first, last);
1275 } else { 1275 } else {
1276 std::reverse(first, last); 1276 std::reverse(first, last);
1277 } 1277 }
1278 } 1278 }
1279 ++minLevel; 1279 ++minLevel;
1280 } 1280 }
1281 } 1281 }
1282 1282
1283 void InlineFlowBox::invalidateDisplayItemClientsOfFirstLine()
1284 {
1285 ASSERT(isFirstLineStyle());
1286 layoutObject().invalidateDisplayItemClient(*this);
1287 for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) {
1288 if (!curr->isFirstLineStyle())
1289 break;
1290 if (curr->isInlineFlowBox())
1291 toInlineFlowBox(curr)->invalidateDisplayItemClientsOfFirstLine();
1292 else
1293 curr->layoutObject().invalidateDisplayItemClient(*curr);
1294 }
1295 }
1296
1283 const char* InlineFlowBox::boxName() const 1297 const char* InlineFlowBox::boxName() const
1284 { 1298 {
1285 return "InlineFlowBox"; 1299 return "InlineFlowBox";
1286 } 1300 }
1287 1301
1288 #ifndef NDEBUG 1302 #ifndef NDEBUG
1289 1303
1290 void InlineFlowBox::showLineTreeAndMark(const InlineBox* markedBox1, const char* markedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layo utObject* obj, int depth) const 1304 void InlineFlowBox::showLineTreeAndMark(const InlineBox* markedBox1, const char* markedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layo utObject* obj, int depth) const
1291 { 1305 {
1292 InlineBox::showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedL abel2, obj, depth); 1306 InlineBox::showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedL abel2, obj, depth);
(...skipping 14 matching lines...) Expand all
1307 ASSERT(child->prevOnLine() == prev); 1321 ASSERT(child->prevOnLine() == prev);
1308 prev = child; 1322 prev = child;
1309 } 1323 }
1310 ASSERT(prev == m_lastChild); 1324 ASSERT(prev == m_lastChild);
1311 #endif 1325 #endif
1312 } 1326 }
1313 1327
1314 #endif 1328 #endif
1315 1329
1316 } // namespace blink 1330 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698