mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-23 23:57:31 +09:00
Issue #1279 - Implement regular expressions lookbehind (v3)
Based on d10e8a5b with the addition of chromium issue 570241.
This commit is contained in:
parent
f54f007d47
commit
4db6fa8360
1 changed files with 4 additions and 1 deletions
|
|
@ -4860,6 +4860,9 @@ TextNode::GetQuickCheckDetails(QuickCheckDetails* details,
|
||||||
int characters_filled_in,
|
int characters_filled_in,
|
||||||
bool not_at_start)
|
bool not_at_start)
|
||||||
{
|
{
|
||||||
|
// Do not collect any quick check details if the text node reads backward,
|
||||||
|
// since it reads in the opposite direction than we use for quick checks.
|
||||||
|
if (read_backward()) return;
|
||||||
MOZ_ASSERT(characters_filled_in < details->characters());
|
MOZ_ASSERT(characters_filled_in < details->characters());
|
||||||
int characters = details->characters();
|
int characters = details->characters();
|
||||||
int char_mask = MaximumCharacter(compiler->ascii());
|
int char_mask = MaximumCharacter(compiler->ascii());
|
||||||
|
|
@ -5016,7 +5019,7 @@ QuickCheckDetails::Clear()
|
||||||
void
|
void
|
||||||
QuickCheckDetails::Advance(int by, bool ascii)
|
QuickCheckDetails::Advance(int by, bool ascii)
|
||||||
{
|
{
|
||||||
if (by >= characters_) {
|
if (by >= characters_ || by < 0) {
|
||||||
Clear();
|
Clear();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue