Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(265)

Issue 9513015: Fix XML tests on Safari and IE. (Closed)

Created:
8 years, 9 months ago by nweiz
Modified:
8 years, 9 months ago
Reviewers:
dgrove, kasperl, sra1, Jacob
CC:
reviews_dartlang.org, ngeoffray, floitsch
Visibility:
Public.

Description

Fix XML tests on Safari and IE. This involves fixing $typeNameOf when dealing with XML documents, as well as ensuring that nodes are removed from their owner documents before being added to new documents. Fixes issue 1884. Committed: https://code.google.com/p/dart/source/detail?r=4769

Patch Set 1 #

Total comments: 6

Patch Set 2 : Code review changes #

Total comments: 8

Patch Set 3 : Code review changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+120 lines, -57 lines) Patch
M client/html/release/htmlimpl.dart View 1 chunk +9 lines, -3 lines 0 comments Download
M client/html/src/XMLElementWrappingImplementation.dart View 1 chunk +9 lines, -3 lines 0 comments Download
M client/tests/client/client.status View 1 chunk +0 lines, -3 lines 0 comments Download
M client/tests/client/html/XMLDocumentTests.dart View 2 chunks +5 lines, -1 line 0 comments Download
M frog/corejs.dart View 1 2 1 chunk +47 lines, -22 lines 0 comments Download
M frog/minfrog View 1 2 2 chunks +50 lines, -25 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
nweiz
8 years, 9 months ago (2012-02-28 23:56:12 UTC) #1
Jacob
lgtm for the html library changes
8 years, 9 months ago (2012-02-29 00:01:37 UTC) #2
sra1
LGTM - these are just suggestions. We should cc Kasper/Florian/Nicolas on any frog changes. https://chromiumcodereview.appspot.com/9513015/diff/1/frog/corejs.dart ...
8 years, 9 months ago (2012-02-29 01:28:55 UTC) #3
nweiz
8 years, 9 months ago (2012-02-29 01:43:07 UTC) #4
nweiz
https://chromiumcodereview.appspot.com/9513015/diff/1/frog/corejs.dart File frog/corejs.dart (right): https://chromiumcodereview.appspot.com/9513015/diff/1/frog/corejs.dart#newcode404 frog/corejs.dart:404: if (name && typeof(name) == 'string' && name != ...
8 years, 9 months ago (2012-02-29 01:54:27 UTC) #5
kasperl
LGTM! Thanks for sending this my way. https://chromiumcodereview.appspot.com/9513015/diff/5001/client/html/src/XMLElementWrappingImplementation.dart File client/html/src/XMLElementWrappingImplementation.dart (right): https://chromiumcodereview.appspot.com/9513015/diff/5001/client/html/src/XMLElementWrappingImplementation.dart#newcode55 client/html/src/XMLElementWrappingImplementation.dart:55: // Safari ...
8 years, 9 months ago (2012-02-29 05:59:58 UTC) #6
dgrove
(switching cc to correct Nicolas and to Florian's google account)
8 years, 9 months ago (2012-02-29 06:04:13 UTC) #7
nweiz
8 years, 9 months ago (2012-02-29 19:41:45 UTC) #8
https://chromiumcodereview.appspot.com/9513015/diff/5001/client/html/src/XMLE...
File client/html/src/XMLElementWrappingImplementation.dart (right):

https://chromiumcodereview.appspot.com/9513015/diff/5001/client/html/src/XMLE...
client/html/src/XMLElementWrappingImplementation.dart:55: // Safari requires
that the clone be removed from its owner document before
On 2012/02/29 05:59:58, kasperl wrote:
> Is this another place where knowing which platform you run on could help
> (performance)?

I believe #remove is very cheap, so I don't think a browser check here would be
too helpful.

https://chromiumcodereview.appspot.com/9513015/diff/5001/frog/corejs.dart
File frog/corejs.dart (right):

https://chromiumcodereview.appspot.com/9513015/diff/5001/frog/corejs.dart#new...
frog/corejs.dart:410: function chrome_$typeNameOf() { return
this.constructor.name; }
On 2012/02/29 05:59:58, kasperl wrote:
> I would put a newline after { for consistency.

Done.

https://chromiumcodereview.appspot.com/9513015/diff/5001/frog/corejs.dart#new...
frog/corejs.dart:412: function firefox_$typeNameOf() {
On 2012/02/29 05:59:58, kasperl wrote:
> Why is there an underscore after firefox, chrome, and ie? The $ delimits
things
> nicely, no?

I was thinking of "$typeNameOf" as an atomic identifier, rather than an
identifier with an initial delimiter, but I can change it to have no underscore.

https://chromiumcodereview.appspot.com/9513015/diff/5001/frog/corejs.dart#new...
frog/corejs.dart:430: // If we're not in the browser, we're almost certainly
running on v8.
On 2012/02/29 05:59:58, kasperl wrote:
> Long term, it would be great to factor this platform check out so we can use
it
> from multiple different places.

The best practice in most instances where you want functionality to vary between
browsers is to do feature detection, and choose the behavior based on what APIs
the browser supports rather than which browser you're using. That's not possible
here because we're not accessing a feature as such, but that's probably the
direction we should go for most compatibility issues.

Powered by Google App Engine
This is Rietveld 408576698