Closed
Bug 1239342
Opened 9 years ago
Closed 9 years ago
weather.com maps unable to zoom more than one level with layout.css.prefixes.webkit = true
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
VERIFIED
DUPLICATE
of bug 1236979
People
(Reporter: miketaylr, Unassigned)
References
()
Details
Originally reported here: https://bugzilla.mozilla.org/show_bug.cgi?id=1236930#c19
Spinning into its own bug to diagnose, because it's using a different mapping system: Bing Maps.
Reporter | ||
Comment 1•9 years ago
|
||
STR:
1) Go to http://www.weather.com/weather/radar/interactive/l/USTX0057:1:US?interactiveMapLayer=radar&baseMap=r
2) Either double click on the map, or use the zoom control in the upper left to zoom in
Expected: can zoom multiple levels
Actual: can only zoom one level
Reporter | ||
Comment 2•9 years ago
|
||
Interesting bit of code with comments here: http://www.weather.com/sites/acquia-prod/files/js/js_dN80pzTo5Y0H__JHCtm1uag_G_dL9A69rfTqasJE2Mw.js
var CSS_PREFIX = '', TRANSITION_PROP, TRANSITIONEND_EVENT, ANIMATION_PROP, ANIMATIONEND_EVENT;
// If unprefixed events are not supported but webkit-prefixed are, use the latter.
// Otherwise, just use W3C names, browsers not supporting them at all will just ignore them.
// Note: Chrome implements `window.onwebkitanimationend` and doesn't implement `window.onanimationend`
// but at the same time dispatches the `animationend` event and not `webkitAnimationEnd`.
// Register both events in case `window.onanimationend` is not supported because of that,
// do the same for `transitionend` as Safari is likely to exhibit similar behavior.
// Also, the only modern browser that uses vendor prefixes for transitions/keyframes is webkit
// therefore there is no reason to test anymore for other vendor prefixes: http://caniuse.com/#search=transition
if (window.ontransitionend === undefined && window.onwebkittransitionend !== undefined) {
CSS_PREFIX = '-webkit-';
TRANSITION_PROP = 'WebkitTransition';
TRANSITIONEND_EVENT = 'webkitTransitionEnd transitionend';
} else {
TRANSITION_PROP = 'transition';
TRANSITIONEND_EVENT = 'transitionend';
}
if (window.onanimationend === undefined && window.onwebkitanimationend !== undefined) {
CSS_PREFIX = '-webkit-';
ANIMATION_PROP = 'WebkitAnimation';
ANIMATIONEND_EVENT = 'webkitAnimationEnd animationend';
} else {
ANIMATION_PROP = 'animation';
ANIMATIONEND_EVENT = 'animationend';
}
Reporter | ||
Comment 3•9 years ago
|
||
Hm, that's not the cause -- apparently we don't expose window.ontransitionend or window.onwebkitransitionend, so we end up with the prefixless TRANSITIONEND_EVENT and _PROP.
Reporter | ||
Comment 4•9 years ago
|
||
(Just leaving a note here for myself, ontransitionend (and presumably onanimationend) are not supported in Gecko because the spec says nothing about them. See https://bugzilla.mozilla.org/show_bug.cgi?id=531585#c23. Unsure if they're needed for compat or not--something to look out for).
Reporter | ||
Comment 5•9 years ago
|
||
Ah, looks like Bing maps does use leaflet.js underneath the hood:
http://tiles.imwx.com/en-US/0009/0001/0000/template.js?build=debug&scriptId=wxMap&elementId=&memberId=0009&mapId=0001&templateId=0000&culture=en-US&callback=TWC.IMap.OnMapLoaded&zoomLevel=7&latitude=30.27&longitude=-97.74&opacity=0.6&basemap=0078&layers=0089,0088&menuItems=&enableSidebar=false&enableWeather=false&logoImg=&logoUrl=&attrib=&orientation=&persistLocation=false&persistAnimation=false&persistOpacity=false&persistZoomLevel=false&persistBasemap=false&persistLayers=false&timeoutUrl=&alternateHtml=
var i = o.DomUtil.TRANSITION = o.DomUtil.testProp(["webkitTransition", "transition", "OTransition", "MozTransition", "msTransition"]);
if (o.DomUtil.TRANSITION_END = "webkitTransition" === i || "OTransition" === i ? i + "End" : "transitionend", "onselectstart" in e)
So weather.com also depends on bug 1236979.
Reporter | ||
Comment 6•9 years ago
|
||
I'm just gonna dupe this against Bug 1236930 and update that bugs title, since it's the same underlying problem.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Comment 7•9 years ago
|
||
As note of interest, I flipped the webkit pref and restarted the browser using the latest m-c win32 tinderbox build on win7 x64 and weather.com maps zoomed properly.
Resolution: DUPLICATE → FIXED
Comment 8•9 years ago
|
||
Per Comment #6.
Comment 9•9 years ago
|
||
This should be fixed (on Nightly at least) by bug 1236979.
You need to log in
before you can comment on or make changes to this bug.
Description
•