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
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]
Depends on:
  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:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

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

Description User image Mounir Lamouri (:mounir) 2012-06-24 08:32:00 PDT
Created attachment 636166 [details] [diff] [review]

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 User image 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 User image Justin Lebar (not reading bugmail) 2012-06-24 12:51:24 PDT
Comment on attachment 636166 [details] [diff] [review]

Woo, first official DOM peer review!
Comment 3 User image Ryan VanderMeulen [:RyanVM] 2012-07-05 17:20:26 PDT

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