| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef DisplayItem_h | 5 #ifndef DisplayItem_h |
| 6 #define DisplayItem_h | 6 #define DisplayItem_h |
| 7 | 7 |
| 8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
| 9 #include "platform/graphics/ContiguousContainer.h" | 9 #include "platform/graphics/ContiguousContainer.h" |
| 10 #include "platform/graphics/paint/DisplayItemClient.h" | 10 #include "platform/graphics/paint/DisplayItemClient.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 kScrollbarForwardTrack, | 103 kScrollbarForwardTrack, |
| 104 kScrollbarThumb, | 104 kScrollbarThumb, |
| 105 kScrollbarTickmarks, | 105 kScrollbarTickmarks, |
| 106 kScrollbarTrackBackground, | 106 kScrollbarTrackBackground, |
| 107 kScrollbarCompositedScrollbar, | 107 kScrollbarCompositedScrollbar, |
| 108 kSelectionTint, | 108 kSelectionTint, |
| 109 kTableCellBackgroundFromColumnGroup, | 109 kTableCellBackgroundFromColumnGroup, |
| 110 kTableCellBackgroundFromColumn, | 110 kTableCellBackgroundFromColumn, |
| 111 kTableCellBackgroundFromSection, | 111 kTableCellBackgroundFromSection, |
| 112 kTableCellBackgroundFromRow, | 112 kTableCellBackgroundFromRow, |
| 113 // Table collapsed borders can be painted together (e.g., left & top) but | 113 kTableCollapsedBorders, |
| 114 // there are at most 4 phases of collapsed border painting for a single | |
| 115 // cell. To disambiguate these phases of collapsed border painting, a mask | |
| 116 // is used. TableCollapsedBorderBase can be larger than | |
| 117 // TableCollapsedBorderUnalignedBase to ensure the base lower bits are 0's. | |
| 118 kTableCollapsedBorderUnalignedBase, | |
| 119 kTableCollapsedBorderBase = | |
| 120 (((kTableCollapsedBorderUnalignedBase - 1) >> 4) + 1) << 4, | |
| 121 kTableCollapsedBorderLast = kTableCollapsedBorderBase + 0x0f, | |
| 122 kTableSectionBoxShadowInset, | 114 kTableSectionBoxShadowInset, |
| 123 kTableSectionBoxShadowNormal, | 115 kTableSectionBoxShadowNormal, |
| 124 kTableRowBoxShadowInset, | 116 kTableRowBoxShadowInset, |
| 125 kTableRowBoxShadowNormal, | 117 kTableRowBoxShadowNormal, |
| 126 kVideoBitmap, | 118 kVideoBitmap, |
| 127 kWebPlugin, | 119 kWebPlugin, |
| 128 kWebFont, | 120 kWebFont, |
| 129 kReflectionMask, | 121 kReflectionMask, |
| 130 kDrawingLast = kReflectionMask, | 122 kDrawingLast = kReflectionMask, |
| 131 | 123 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 kBeginClipPath, | 187 kBeginClipPath, |
| 196 kEndClipPath, | 188 kEndClipPath, |
| 197 | 189 |
| 198 kSubsequence, | 190 kSubsequence, |
| 199 kEndSubsequence, | 191 kEndSubsequence, |
| 200 | 192 |
| 201 kUninitializedType, | 193 kUninitializedType, |
| 202 kTypeLast = kUninitializedType | 194 kTypeLast = kUninitializedType |
| 203 }; | 195 }; |
| 204 | 196 |
| 205 static_assert(kTableCollapsedBorderBase >= kTableCollapsedBorderUnalignedBase, | |
| 206 "TableCollapsedBorder types overlap with other types"); | |
| 207 static_assert((kTableCollapsedBorderBase & 0xf) == 0, | |
| 208 "The lowest 4 bits of TableCollapsedBorderBase should be zero"); | |
| 209 // Bits or'ed onto TableCollapsedBorderBase to generate a real table collapsed | |
| 210 // border type. | |
| 211 enum TableCollapsedBorderSides { | |
| 212 TableCollapsedBorderTop = 1 << 0, | |
| 213 TableCollapsedBorderRight = 1 << 1, | |
| 214 TableCollapsedBorderBottom = 1 << 2, | |
| 215 TableCollapsedBorderLeft = 1 << 3, | |
| 216 }; | |
| 217 | |
| 218 DisplayItem(const DisplayItemClient& client, Type type, size_t derivedSize) | 197 DisplayItem(const DisplayItemClient& client, Type type, size_t derivedSize) |
| 219 : m_client(&client), | 198 : m_client(&client), |
| 220 m_type(type), | 199 m_type(type), |
| 221 m_derivedSize(derivedSize), | 200 m_derivedSize(derivedSize), |
| 222 m_skippedCache(false) | 201 m_skippedCache(false) |
| 223 #ifndef NDEBUG | 202 #ifndef NDEBUG |
| 224 , | 203 , |
| 225 m_clientDebugString(client.debugName()) | 204 m_clientDebugString(client.debugName()) |
| 226 #endif | 205 #endif |
| 227 { | 206 { |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 bool isEndAndPairedWith(DisplayItem::Type otherType) const override = 0; | 401 bool isEndAndPairedWith(DisplayItem::Type otherType) const override = 0; |
| 423 #endif | 402 #endif |
| 424 | 403 |
| 425 private: | 404 private: |
| 426 bool isEnd() const final { return true; } | 405 bool isEnd() const final { return true; } |
| 427 }; | 406 }; |
| 428 | 407 |
| 429 } // namespace blink | 408 } // namespace blink |
| 430 | 409 |
| 431 #endif // DisplayItem_h | 410 #endif // DisplayItem_h |
| OLD | NEW |