WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
129623
Web Inspector: Gradient.js:120:22: JS ERROR: TypeError: undefined is not an object (evaluating 'stop.offset')
https://bugs.webkit.org/show_bug.cgi?id=129623
Summary
Web Inspector: Gradient.js:120:22: JS ERROR: TypeError: undefined is not an o...
Timothy Hatcher
Reported
2014-03-03 14:50:15 PST
Seeing Gradient.js:120:22: JS ERROR: TypeError: undefined is not an object (evaluating 'stop.offset') while poking around some internal scripts.
Attachments
Patch
(2.09 KB, patch)
2014-03-03 15:12 PST
,
Timothy Hatcher
no flags
Details
Formatted Diff
Diff
Patch
(2.09 KB, patch)
2014-03-03 15:24 PST
,
Timothy Hatcher
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2014-03-03 14:50:53 PST
<
rdar://problem/16215772
>
Timothy Hatcher
Comment 2
2014-03-03 15:00:25 PST
The content seems to be: var a = "background-image:", b = "gradient(linear,left top,right bottom,from(#9f9),to(white));", c = "linear-gradient(left top,#9f9, white);"; And the components passed to stopsWithComponents are [["left","top"],["#9f9"],["white"]].
Radar WebKit Bug Importer
Comment 3
2014-03-03 15:01:43 PST
<
rdar://problem/16215950
>
Timothy Hatcher
Comment 4
2014-03-03 15:06:18 PST
Found in modernizr-2.0.6.min.js
Timothy Hatcher
Comment 5
2014-03-03 15:12:44 PST
Created
attachment 225694
[details]
Patch
Joseph Pecoraro
Comment 6
2014-03-03 15:20:30 PST
(In reply to
comment #2
)
> The content seems to be: > > var a = "background-image:", b = "gradient(linear,left top,right bottom,from(#9f9),to(white));", c = "linear-gradient(left top,#9f9, white);"; > > And the components passed to stopsWithComponents are [["left","top"],["#9f9"],["white"]].
This strikes me as a little weird. The input was "left top", "right bottom". Are we sure we are doing the right thing for these kinds of inputs?
Joseph Pecoraro
Comment 7
2014-03-03 15:20:45 PST
Comment on
attachment 225694
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=225694&action=review
> Source/WebInspectorUI/UserInterface/Models/Gradient.js:192 > + // We don't support any of the legacy linerar gradient formats.
linerar
Timothy Hatcher
Comment 8
2014-03-03 15:24:17 PST
Created
attachment 225698
[details]
Patch
Timothy Hatcher
Comment 9
2014-03-03 15:26:17 PST
(In reply to
comment #6
)
> (In reply to
comment #2
) > > The content seems to be: > > > > var a = "background-image:", b = "gradient(linear,left top,right bottom,from(#9f9),to(white));", c = "linear-gradient(left top,#9f9, white);"; > > > > And the components passed to stopsWithComponents are [["left","top"],["#9f9"],["white"]]. > > This strikes me as a little weird. The input was "left top", "right bottom". Are we sure we are doing the right thing for these kinds of inputs?
Yeah, the "left" and "top" get sorted and recombined for a switch that looks for "left top". That allows ["top", "left"] to work without the need for case "top left" and all the other permutations.
WebKit Commit Bot
Comment 10
2014-03-03 16:02:58 PST
Comment on
attachment 225698
[details]
Patch Clearing flags on attachment: 225698 Committed
r165017
: <
http://trac.webkit.org/changeset/165017
>
WebKit Commit Bot
Comment 11
2014-03-03 16:03:01 PST
All reviewed patches have been landed. Closing bug.
Antoine Quint
Comment 12
2014-03-04 00:23:39 PST
Thanks for cleaning up after me Tim!
Antoine Quint
Comment 13
2014-04-24 01:44:13 PDT
This fix caused
https://bugs.webkit.org/show_bug.cgi?id=132083
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug