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

Side by Side Diff: third_party/WebKit/Source/core/layout/line/InlineBox.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: Source/core/paint/README.md 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 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007 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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 root().block().flipForWritingMode(rect); 377 root().block().flipForWritingMode(rect);
378 } 378 }
379 379
380 LayoutPoint InlineBox::flipForWritingMode(const LayoutPoint& point) const 380 LayoutPoint InlineBox::flipForWritingMode(const LayoutPoint& point) const
381 { 381 {
382 if (!UNLIKELY(lineLayoutItem().hasFlippedBlocksWritingMode())) 382 if (!UNLIKELY(lineLayoutItem().hasFlippedBlocksWritingMode()))
383 return point; 383 return point;
384 return root().block().flipForWritingMode(point); 384 return root().block().flipForWritingMode(point);
385 } 385 }
386 386
387 void InlineBox::invalidateDisplayItemClientsRecursively()
388 {
389 layoutObject().invalidateDisplayItemClient(*this);
390 if (!isInlineFlowBox())
391 return;
392 for (InlineBox* child = toInlineFlowBox(this)->firstChild(); child; child = child->nextOnLine())
393 child->invalidateDisplayItemClientsRecursively();
394 }
395
387 } // namespace blink 396 } // namespace blink
388 397
389 #ifndef NDEBUG 398 #ifndef NDEBUG
390 399
391 void showTree(const blink::InlineBox* b) 400 void showTree(const blink::InlineBox* b)
392 { 401 {
393 if (b) 402 if (b)
394 b->showTreeForThis(); 403 b->showTreeForThis();
395 else 404 else
396 fprintf(stderr, "Cannot showTree for (nil) InlineBox.\n"); 405 fprintf(stderr, "Cannot showTree for (nil) InlineBox.\n");
397 } 406 }
398 407
399 void showLineTree(const blink::InlineBox* b) 408 void showLineTree(const blink::InlineBox* b)
400 { 409 {
401 if (b) 410 if (b)
402 b->showLineTreeForThis(); 411 b->showLineTreeForThis();
403 else 412 else
404 fprintf(stderr, "Cannot showLineTree for (nil) InlineBox.\n"); 413 fprintf(stderr, "Cannot showLineTree for (nil) InlineBox.\n");
405 } 414 }
406 415
407 #endif 416 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698