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

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

Issue 2051333005: Let FrameView track object paint invalidations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@TrackInvalidation
Patch Set: x 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
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 if (!m_lineLayoutItem.documentBeingDestroyed()) 68 if (!m_lineLayoutItem.documentBeingDestroyed())
69 m_lineLayoutItem.invalidateDisplayItemClient(*this); 69 m_lineLayoutItem.invalidateDisplayItemClient(*this, PaintInvalidationFul l);
70 delete this; 70 delete this;
71 } 71 }
72 72
73 void InlineBox::remove(MarkLineBoxes markLineBoxes) 73 void InlineBox::remove(MarkLineBoxes markLineBoxes)
74 { 74 {
75 if (parent()) 75 if (parent())
76 parent()->removeChild(this, markLineBoxes); 76 parent()->removeChild(this, markLineBoxes);
77 } 77 }
78 78
79 void* InlineBox::operator new(size_t sz) 79 void* InlineBox::operator new(size_t sz)
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 377
378 LayoutPoint InlineBox::flipForWritingMode(const LayoutPoint& point) const 378 LayoutPoint InlineBox::flipForWritingMode(const LayoutPoint& point) const
379 { 379 {
380 if (!UNLIKELY(getLineLayoutItem().hasFlippedBlocksWritingMode())) 380 if (!UNLIKELY(getLineLayoutItem().hasFlippedBlocksWritingMode()))
381 return point; 381 return point;
382 return root().block().flipForWritingMode(point); 382 return root().block().flipForWritingMode(point);
383 } 383 }
384 384
385 void InlineBox::invalidateDisplayItemClientsRecursively() 385 void InlineBox::invalidateDisplayItemClientsRecursively()
386 { 386 {
387 getLineLayoutItem().invalidateDisplayItemClient(*this); 387 getLineLayoutItem().invalidateDisplayItemClient(*this, PaintInvalidationFull );
388 if (!isInlineFlowBox()) 388 if (!isInlineFlowBox())
389 return; 389 return;
390 for (InlineBox* child = toInlineFlowBox(this)->firstChild(); child; child = child->nextOnLine()) 390 for (InlineBox* child = toInlineFlowBox(this)->firstChild(); child; child = child->nextOnLine())
391 child->invalidateDisplayItemClientsRecursively(); 391 child->invalidateDisplayItemClientsRecursively();
392 } 392 }
393 393
394 } // namespace blink 394 } // namespace blink
395 395
396 #ifndef NDEBUG 396 #ifndef NDEBUG
397 397
398 void showTree(const blink::InlineBox* b) 398 void showTree(const blink::InlineBox* b)
399 { 399 {
400 if (b) 400 if (b)
401 b->showTreeForThis(); 401 b->showTreeForThis();
402 else 402 else
403 fprintf(stderr, "Cannot showTree for (nil) InlineBox.\n"); 403 fprintf(stderr, "Cannot showTree for (nil) InlineBox.\n");
404 } 404 }
405 405
406 void showLineTree(const blink::InlineBox* b) 406 void showLineTree(const blink::InlineBox* b)
407 { 407 {
408 if (b) 408 if (b)
409 b->showLineTreeForThis(); 409 b->showLineTreeForThis();
410 else 410 else
411 fprintf(stderr, "Cannot showLineTree for (nil) InlineBox.\n"); 411 fprintf(stderr, "Cannot showLineTree for (nil) InlineBox.\n");
412 } 412 }
413 413
414 #endif 414 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698