Opened 8 years ago

Closed 8 years ago

#13733 closed defect (fixed)

dojo.withDoc / dojo.withGlobal should update has("quirks"), has("ie"), dojo.isIE

Reported by: Kenneth G. Franqueiro Owned by: Kenneth G. Franqueiro
Priority: high Milestone: 1.7
Component: General Version: 1.7.0b1
Keywords: quirks ie Cc:
Blocked By: Blocking:

Description (last modified by Kenneth G. Franqueiro)

A few days ago, I unwittingly checked in some changes which replaced a bunch of dojo.isQuirks references with has("quirks") references. It was quickly brought to my attention by Bill that the reason isQuirks had been left alone was because withDoc and withGlobal update it, but they don't update the value of the respective has feature.

In the e-mail thread that followed, I discovered that it should actually be trivial to update the value of the has feature as well as isQuirks; moreover, this type of updating has never been done for isIE (or has("ie")), despite the potential for withDoc or withGlobal to be pointed to a document running in a different IE compatibility mode.

I am attaching a patch which resolves these issues, as well as supersedes the original _base/window tests with more/better tests, both for the original functionality (but pointing to real document/window objects, whereas the original tests didn't) and for testing proper updates to quirks/IE flags/features.

There is currently one straggling issue in this patch: in IE9, the is/has-IE test fails *only* when run through the doh runner (the flag/feature don't get updated). Run in isolation, it passes. Curiously, IE8 does not have this problem.

I've checked before/after results of _base tests across FF/Chrome/Safari/IE6-9; I've seen no regressions introduced by this patch.

The patch also removes the dojo/_base/kernel dependency from dom-geometry and dom-style, as they no longer need it now that they use has for quirks mode detection.

Attachments (1)

13733.diff (9.3 KB) - added by Kenneth G. Franqueiro 8 years ago.

Download all attachments as: .zip

Change History (3)

comment:1 Changed 8 years ago by Kenneth G. Franqueiro

Description: modified (diff)
Status: newassigned

Changed 8 years ago by Kenneth G. Franqueiro

Attachment: 13733.diff added

comment:2 Changed 8 years ago by Kenneth G. Franqueiro

Resolution: fixed
Status: assignedclosed

In [26334]:

Fixes #13733 - dojo.withDoc should update has('quirks') when dojo.isQuirks is updated, and should update has('ie') / dojo.isIE as well.

Note: See TracTickets for help on using tickets.