Bug 18447 - Setting of CSSStyleDeclaration.prototype.foo on outer window affects prototype of inner window
Summary: Setting of CSSStyleDeclaration.prototype.foo on outer window affects prototyp...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 525.x (Safari 3.1)
Hardware: All All
: P2 Normal
Assignee: James Kozianski
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-12 15:54 PDT by Ojan Vafai
Modified: 2011-01-18 22:01 PST (History)
7 users (show)

See Also:


Attachments
Shows that CSSStyleDeclaration and String behave differently. (507 bytes, text/html)
2008-04-12 15:54 PDT, Ojan Vafai
no flags Details
Patch (1.96 KB, patch)
2010-09-13 16:46 PDT, James Kozianski
no flags Details | Formatted Diff | Diff
Patch (2.20 KB, patch)
2010-09-13 18:28 PDT, James Kozianski
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ojan Vafai 2008-04-12 15:54:02 PDT
That summary isn't the most clear. Will attach a test case. In short, if I set a prototype property in an outer window and then grab an object from that type from a frame, that property shouldn't be set on the object from the frame.

This is how Firefox and Opera work.
Comment 1 Ojan Vafai 2008-04-12 15:54:57 PDT
Created attachment 20495 [details]
Shows that CSSStyleDeclaration and String behave differently.
Comment 2 Alexey Proskuryakov 2010-09-08 15:45:05 PDT
This no longer occurs in Safari 5.0.1. Not sure if we need to land a test for this.
Comment 3 Ojan Vafai 2010-09-09 20:24:53 PDT
Ugh, didn't mean to close the bug. Probably worth committing a test for this.
Comment 4 James Kozianski 2010-09-13 16:46:53 PDT
Created attachment 67488 [details]
Patch
Comment 5 Adam Barth 2010-09-13 16:48:36 PDT
Comment on attachment 67488 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=67488&action=prettypatch

> LayoutTests/fast/frames/frame-prototype-inheritance.html:11
> +  // alert(win.CSSStyleDeclaration.prototype.foo);
Please remove commented out code.
Comment 6 James Kozianski 2010-09-13 18:28:04 PDT
Created attachment 67502 [details]
Patch
Comment 7 Ojan Vafai 2010-09-13 18:33:01 PDT
Comment on attachment 67502 [details]
Patch

Did you mean to set cq?
Comment 8 WebKit Commit Bot 2010-09-14 14:42:02 PDT
Comment on attachment 67502 [details]
Patch

Rejecting patch 67502 from commit-queue.

Failed to run "['WebKitTools/Scripts/run-webkit-tests', '--no-launch-safari', '--exit-after-n-failures=1', '--wait-for-httpd', '--ignore-tests', 'compositing,media', '--quiet']" exit_code: 1
Running build-dumprendertree
Compiling Java tests
make: Nothing to be done for `default'.
Running tests from /Users/eseidel/Projects/CommitQueue/LayoutTests
Testing 20991 test cases.
fast/css/visited-link-hang.html -> failed

Exiting early after 1 failures. 6198 tests run.
131.28s total testing time

6197 test cases (99%) succeeded
1 test case (<1%) had incorrect layout

Full output: http://queues.webkit.org/results/4059011
Comment 9 Adam Barth 2010-09-14 14:53:32 PDT
> Rejecting patch 67502 from commit-queue.

We just change some core logic in the commit-queue.  Not sure if we have a bug now.
Comment 10 WebKit Commit Bot 2010-09-14 16:15:52 PDT
Comment on attachment 67502 [details]
Patch

Clearing flags on attachment: 67502

Committed r67511: <http://trac.webkit.org/changeset/67511>
Comment 11 WebKit Commit Bot 2010-09-14 16:15:58 PDT
All reviewed patches have been landed.  Closing bug.