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

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

Issue 2095013003: Changes in DisplayItemClient for spv2 paint invalidation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes to DisplayItemClient Created 4 years, 5 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, 2009, 2010, 2011 Apple Inc. All r ights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All r ights 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 , m_lineLayoutItem(obj) 49 , m_lineLayoutItem(obj)
50 , m_logicalWidth() 50 , m_logicalWidth()
51 #if ENABLE(ASSERT) 51 #if ENABLE(ASSERT)
52 , m_hasBadParent(false) 52 , m_hasBadParent(false)
53 #endif 53 #endif
54 { 54 {
55 } 55 }
56 56
57 InlineBox(LineLayoutItem item, LayoutPoint topLeft, LayoutUnit logicalWidth, bool firstLine, bool constructed, 57 InlineBox(LineLayoutItem item, LayoutPoint topLeft, LayoutUnit logicalWidth, bool firstLine, bool constructed,
58 bool dirty, bool extracted, bool isHorizontal, InlineBox* next, InlineBo x* prev, InlineFlowBox* parent) 58 bool dirty, bool extracted, bool isHorizontal, InlineBox* next, InlineBo x* prev, InlineFlowBox* parent)
59 : m_next(next) 59 : m_bitfields(firstLine, constructed, dirty, extracted, isHorizontal)
chrishtr 2016/06/27 21:09:09 Why did this get moved?
Xianzhu 2016/06/27 21:34:54 This is to avoid the gap between DisplayItemClient
60 , m_next(next)
60 , m_prev(prev) 61 , m_prev(prev)
61 , m_parent(parent) 62 , m_parent(parent)
62 , m_lineLayoutItem(item) 63 , m_lineLayoutItem(item)
63 , m_topLeft(topLeft) 64 , m_topLeft(topLeft)
64 , m_logicalWidth(logicalWidth) 65 , m_logicalWidth(logicalWidth)
65 , m_bitfields(firstLine, constructed, dirty, extracted, isHorizontal)
66 #if ENABLE(ASSERT) 66 #if ENABLE(ASSERT)
67 , m_hasBadParent(false) 67 , m_hasBadParent(false)
68 #endif 68 #endif
69 { 69 {
70 } 70 }
71 71
72 virtual ~InlineBox(); 72 virtual ~InlineBox();
73 73
74 virtual void destroy(); 74 virtual void destroy();
75 75
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 signed expansion() const { return m_expansion; } 388 signed expansion() const { return m_expansion; }
389 void setExpansion(signed expansion) { m_expansion = expansion; } 389 void setExpansion(signed expansion) { m_expansion = expansion; }
390 }; 390 };
391 #undef ADD_BOOLEAN_BITFIELD 391 #undef ADD_BOOLEAN_BITFIELD
392 392
393 private: 393 private:
394 // Converts the given (top-left) position from the logical space of the Inli neBox to the physical space of the 394 // Converts the given (top-left) position from the logical space of the Inli neBox to the physical space of the
395 // containing block. The size indicates the size of the box whose point is b eing flipped. 395 // containing block. The size indicates the size of the box whose point is b eing flipped.
396 LayoutPoint logicalPositionToPhysicalPoint(const LayoutPoint&, const LayoutS ize&) const; 396 LayoutPoint logicalPositionToPhysicalPoint(const LayoutPoint&, const LayoutS ize&) const;
397 397
398 InlineBoxBitfields m_bitfields;
399
398 InlineBox* m_next; // The next element on the same line as us. 400 InlineBox* m_next; // The next element on the same line as us.
399 InlineBox* m_prev; // The previous element on the same line as us. 401 InlineBox* m_prev; // The previous element on the same line as us.
400 402
401 InlineFlowBox* m_parent; // The box that contains us. 403 InlineFlowBox* m_parent; // The box that contains us.
402 LineLayoutItem m_lineLayoutItem; 404 LineLayoutItem m_lineLayoutItem;
403 405
404 protected: 406 protected:
405 // For RootInlineBox 407 // For RootInlineBox
406 bool endsWithBreak() const { return m_bitfields.endsWithBreak(); } 408 bool endsWithBreak() const { return m_bitfields.endsWithBreak(); }
407 void setEndsWithBreak(bool endsWithBreak) { m_bitfields.setEndsWithBreak(end sWithBreak); } 409 void setEndsWithBreak(bool endsWithBreak) { m_bitfields.setEndsWithBreak(end sWithBreak); }
(...skipping 10 matching lines...) Expand all
418 signed expansion() { return m_bitfields.expansion(); } 420 signed expansion() { return m_bitfields.expansion(); }
419 void setExpansion(signed expansion) { m_bitfields.setExpansion(expansion); } 421 void setExpansion(signed expansion) { m_bitfields.setExpansion(expansion); }
420 422
421 // For InlineFlowBox and InlineTextBox 423 // For InlineFlowBox and InlineTextBox
422 bool extracted() const { return m_bitfields.extracted(); } 424 bool extracted() const { return m_bitfields.extracted(); }
423 425
424 LayoutPoint m_topLeft; 426 LayoutPoint m_topLeft;
425 LayoutUnit m_logicalWidth; 427 LayoutUnit m_logicalWidth;
426 428
427 private: 429 private:
428 InlineBoxBitfields m_bitfields;
429
430 DISPLAY_ITEM_CACHE_STATUS_IMPLEMENTATION
431
432 #if ENABLE(ASSERT) 430 #if ENABLE(ASSERT)
433 bool m_hasBadParent; 431 bool m_hasBadParent;
434 #endif 432 #endif
435 }; 433 };
436 434
437 #if !ENABLE(ASSERT) 435 #if !ENABLE(ASSERT)
438 inline InlineBox::~InlineBox() 436 inline InlineBox::~InlineBox()
439 { 437 {
440 } 438 }
441 #endif 439 #endif
(...skipping 13 matching lines...) Expand all
455 453
456 } // namespace blink 454 } // namespace blink
457 455
458 #ifndef NDEBUG 456 #ifndef NDEBUG
459 // Outside the WebCore namespace for ease of invocation from gdb. 457 // Outside the WebCore namespace for ease of invocation from gdb.
460 void showTree(const blink::InlineBox*); 458 void showTree(const blink::InlineBox*);
461 void showLineTree(const blink::InlineBox*); 459 void showLineTree(const blink::InlineBox*);
462 #endif 460 #endif
463 461
464 #endif // InlineBox_h 462 #endif // InlineBox_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698