Don't create a useless string every time we check for input's validity

RESOLVED FIXED in mozilla16

Status

()

Core
DOM: Core & HTML
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: mounir, Assigned: mounir)

Tracking

Trunk
mozilla16
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

973 bytes, patch
Justin Lebar (not reading bugmail)
: review+
mounir
: checkin+
Details | Diff | Splinter Review
(Assignee)

Description

5 years ago
Created attachment 636166 [details] [diff] [review]
Patch

nsHTMLInputElement::HasPatternMismatch is creating a string for @pattern every time, even if @pattern isn't set. It seems that we can save a few cycles by not doing so.
Attachment #636166 - Flags: review?(justin.lebar+bug)
(Assignee)

Comment 1

5 years ago
I should add that the validity of an input element is checked everytime the value is changed (more or less).
Comment on attachment 636166 [details] [diff] [review]
Patch

Woo, first official DOM peer review!
Attachment #636166 - Flags: review?(justin.lebar+bug) → review+
(Assignee)

Updated

5 years ago
Flags: in-testsuite-
Target Milestone: --- → mozilla16
(Assignee)

Updated

5 years ago
Attachment #636166 - Flags: checkin+
https://hg.mozilla.org/mozilla-central/rev/c995cbc6f7fc
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.