mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:08:13 +00:00
LibWeb: Check HTML parser position is equal to or after insertion point
This used to be the other way around. If we just inserted input with document.write, this would always be true and not allow document.write to immediately parse its input (given that there's no pending parsing blocking script)
This commit is contained in:
parent
fa29214d9a
commit
eabb0be7ea
1 changed files with 1 additions and 1 deletions
|
@ -132,7 +132,7 @@ public:
|
|||
bool is_insertion_point_defined() const { return m_insertion_point.defined; }
|
||||
bool is_insertion_point_reached()
|
||||
{
|
||||
return m_insertion_point.defined && m_insertion_point.position >= m_utf8_view.iterator_offset(m_utf8_iterator);
|
||||
return m_insertion_point.defined && m_utf8_view.iterator_offset(m_utf8_iterator) >= m_insertion_point.position;
|
||||
}
|
||||
void undefine_insertion_point() { m_insertion_point.defined = false; }
|
||||
void store_insertion_point() { m_old_insertion_point = m_insertion_point; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue