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

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

Issue 2086613004: When invalidating InlineBox ensure its painting layer is setNeedsRepaint (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: - Created 4 years, 6 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/api/LineLayoutItem.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 if (!m_hasBadParent && m_parent) 58 if (!m_hasBadParent && m_parent)
59 m_parent->setHasBadChildList(); 59 m_parent->setHasBadChildList();
60 } 60 }
61 61
62 #endif 62 #endif
63 63
64 void InlineBox::destroy() 64 void InlineBox::destroy()
65 { 65 {
66 // We do not need to issue invalidations if the page is being destroyed 66 // We do not need to issue invalidations if the page is being destroyed
67 // since these objects will never be repainted. 67 // since these objects will never be repainted.
68 // TODO(crbug.com/619630): Make this fast.
68 if (!m_lineLayoutItem.documentBeingDestroyed()) 69 if (!m_lineLayoutItem.documentBeingDestroyed())
69 m_lineLayoutItem.invalidateDisplayItemClient(*this, PaintInvalidationFul l); 70 m_lineLayoutItem.slowSetPaintingLayerNeedsRepaintAndInvalidateDisplayIte mClient(*this, PaintInvalidationFull);
70 delete this; 71 delete this;
71 } 72 }
72 73
73 void InlineBox::remove(MarkLineBoxes markLineBoxes) 74 void InlineBox::remove(MarkLineBoxes markLineBoxes)
74 { 75 {
75 if (parent()) 76 if (parent())
76 parent()->removeChild(this, markLineBoxes); 77 parent()->removeChild(this, markLineBoxes);
77 } 78 }
78 79
79 void* InlineBox::operator new(size_t sz) 80 void* InlineBox::operator new(size_t sz)
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 378
378 LayoutPoint InlineBox::flipForWritingMode(const LayoutPoint& point) const 379 LayoutPoint InlineBox::flipForWritingMode(const LayoutPoint& point) const
379 { 380 {
380 if (!UNLIKELY(getLineLayoutItem().hasFlippedBlocksWritingMode())) 381 if (!UNLIKELY(getLineLayoutItem().hasFlippedBlocksWritingMode()))
381 return point; 382 return point;
382 return root().block().flipForWritingMode(point); 383 return root().block().flipForWritingMode(point);
383 } 384 }
384 385
385 void InlineBox::invalidateDisplayItemClientsRecursively() 386 void InlineBox::invalidateDisplayItemClientsRecursively()
386 { 387 {
387 getLineLayoutItem().invalidateDisplayItemClient(*this, PaintInvalidationFull ); 388 // TODO(crbug.com/619630): Make this fast.
389 getLineLayoutItem().slowSetPaintingLayerNeedsRepaintAndInvalidateDisplayItem Client(*this, PaintInvalidationFull);
388 if (!isInlineFlowBox()) 390 if (!isInlineFlowBox())
389 return; 391 return;
390 for (InlineBox* child = toInlineFlowBox(this)->firstChild(); child; child = child->nextOnLine()) 392 for (InlineBox* child = toInlineFlowBox(this)->firstChild(); child; child = child->nextOnLine())
391 child->invalidateDisplayItemClientsRecursively(); 393 child->invalidateDisplayItemClientsRecursively();
392 } 394 }
393 395
394 } // namespace blink 396 } // namespace blink
395 397
396 #ifndef NDEBUG 398 #ifndef NDEBUG
397 399
398 void showTree(const blink::InlineBox* b) 400 void showTree(const blink::InlineBox* b)
399 { 401 {
400 if (b) 402 if (b)
401 b->showTreeForThis(); 403 b->showTreeForThis();
402 else 404 else
403 fprintf(stderr, "Cannot showTree for (nil) InlineBox.\n"); 405 fprintf(stderr, "Cannot showTree for (nil) InlineBox.\n");
404 } 406 }
405 407
406 void showLineTree(const blink::InlineBox* b) 408 void showLineTree(const blink::InlineBox* b)
407 { 409 {
408 if (b) 410 if (b)
409 b->showLineTreeForThis(); 411 b->showLineTreeForThis();
410 else 412 else
411 fprintf(stderr, "Cannot showLineTree for (nil) InlineBox.\n"); 413 fprintf(stderr, "Cannot showLineTree for (nil) InlineBox.\n");
412 } 414 }
413 415
414 #endif 416 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/api/LineLayoutItem.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698