| Summary: | Display list iteration should automatically stop if an item is null | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Gabriel Nava Marino <gnavamarino> |
| Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW --- | ||
| Severity: | Normal | CC: | mmaxfield, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
We should consider modifying DisplayList::Iterator::operator== so display list iteration automatically stops iterating if an item is null. As was previously recommended, this can be done by making DisplayList::Iterator::operator== return true when called with a null iterator and the end iterator by changing ``` bool operator==(const Iterator& other) const { return &m_displayList == &other.m_displayList && m_cursor == other.m_cursor; } ``` to ``` bool operator==(const Iterator& other) const { if (atEnd() && other.atEnd()) return true; return &m_displayList == &other.m_displayList && m_cursor == other.m_cursor; } ``` This requires updating the following two API tests: - TestWebKitAPI.DisplayListTests.InlineItemValidationFailure - TestWebKitAPI.DisplayListTests.OutOfLineItemDecodingFailure