Last Comment Bug 767806 - Don't create a useless string every time we check for input's validity
: Don't create a useless string every time we check for input's validity
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM: Core & HTML (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla16
Assigned To: Mounir Lamouri (:mounir)
:
: Andrew Overholt [:overholt]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-24 08:32 PDT by Mounir Lamouri (:mounir)
Modified: 2012-07-05 17:20 PDT (History)
1 user (show)
mounir: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (973 bytes, patch)
2012-06-24 08:32 PDT, Mounir Lamouri (:mounir)
justin.lebar+bug: review+
mounir: checkin+
Details | Diff | Splinter Review

Description Mounir Lamouri (:mounir) 2012-06-24 08:32:00 PDT
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.
Comment 1 Mounir Lamouri (:mounir) 2012-06-24 08:37:34 PDT
I should add that the validity of an input element is checked everytime the value is changed (more or less).
Comment 2 Justin Lebar (not reading bugmail) 2012-06-24 12:51:24 PDT
Comment on attachment 636166 [details] [diff] [review]
Patch

Woo, first official DOM peer review!
Comment 3 Ryan VanderMeulen [:RyanVM] 2012-07-05 17:20:26 PDT
https://hg.mozilla.org/mozilla-central/rev/c995cbc6f7fc

Note You need to log in before you can comment on or make changes to this bug.