1
Description: Drop assertion, handle the case instead.
2
Author: Benjamin Wolsey <bwy@benjaminwolsey.de>
4
--- a/libcore/DisplayList.cpp
5
+++ b/libcore/DisplayList.cpp
7
DisplayList::const_iterator beginNonRemoved(
8
const DisplayList::container_type& c);
10
- /// Return an iterator succeeding the last element in zone
11
- /// (-16384, 0xffff-16384)
12
+ /// Return the first element in the DisplayList whose depth exceeds
14
DisplayList::iterator dlistTagsEffectiveZoneEnd(
15
DisplayList::container_type& c);
17
- /// Return an constant iterator succeeding the last element
18
- /// in (-16384, 0xffff-16384)
19
- DisplayList::const_iterator dlistTagsEffectiveZoneEnd(
20
- const DisplayList::container_type& c);
23
/// Anonymous namespace for generic algorithm functors.
28
-DisplayList::mergeDisplayList(DisplayList & newList)
29
+DisplayList::mergeDisplayList(DisplayList& newList)
33
+ log_debug("New list size: %s", newList.size());
35
iterator itOld = beginNonRemoved(_charsByDepth);
36
iterator itNew = beginNonRemoved(newList._charsByDepth);
38
iterator itOldEnd = dlistTagsEffectiveZoneEnd(_charsByDepth);
39
- iterator itNewEnd = newList._charsByDepth.end();
40
- assert(itNewEnd == dlistTagsEffectiveZoneEnd(newList._charsByDepth) );
42
+ // There used to be an assertion here that no character in the new list
43
+ // is at depth 65535 or higher. There's no reason why the tags executed
44
+ // on the new list shouldn't do this though. Bug #29282 does this.
45
+ // TODO: check whether we should be ignoring that character.
46
+ iterator itNewEnd = dlistTagsEffectiveZoneEnd(newList._charsByDepth);
49
// starting scanning both lists.
50
- while (itOld != itOldEnd)
52
+ while (itOld != itOldEnd) {
54
iterator itOldBackup = itOld;
56
DisplayObject* chOld = *itOldBackup;
57
@@ -1108,13 +1110,6 @@
59
return std::find_if(c.begin(), c.end(),
60
DepthGreaterOrEqual(0xffff + DisplayObject::staticDepthOffset));
63
-DisplayList::const_iterator
64
-dlistTagsEffectiveZoneEnd(const DisplayList::container_type& c)
66
- return std::find_if(c.begin(), c.end(),
67
- DepthGreaterOrEqual(0xffff + DisplayObject::staticDepthOffset));
70
} // anonymous namespace
b'\\ No newline at end of file'