Closed
Bug 602420
Opened 14 years ago
Closed 14 years ago
Frontend can set nonsensical viewportScale/Scroll values
Categories
(Firefox for Android Graveyard :: General, defect)
Firefox for Android Graveyard
General
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: cjones, Assigned: mbrubeck)
Details
Attachments
(1 file)
707 bytes,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
STR (1) fennec http://people.mozilla.com/~cjones/grid-noscale.html (although I don't think the page matters) I see (gdb) bt #0 nsFrameLoader::UpdateViewportConfig (this=0x112fc50, aNewConfig=...) at /home/cjones/mozilla/mozilla-central/content/base/src/nsFrameLoader.cpp:1534 #1 0x00007ffff4050a2e in nsFrameLoader::SetViewportScale (this=0x112fc50, aXScale=inf, aYScale=inf) at /home/cjones/mozilla/mozilla-central/content/base/src/nsFrameLoader.cpp:1512 [snip] (gdb) p aNewConfig $2 = (const nsFrameLoader::ViewportConfig &) @0x7fffffff9c70: { mScrollOffset = { x = 0, y = 0 }, mXScale = inf, mYScale = inf } (gdb) call DumpJSStack() 0 _setScale(scale = Infinity) ["chrome://browser/content/bindings/browser.xml":879] event = undefined this = [object XULElement @ 0x1149f30 (native @ 0x112e1e0)] 1 set_scale(val = Infinity) ["chrome://browser/content/bindings/browser.xml":0] this = [object XULElement @ 0x1149f30 (native @ 0x112e1e0)] 2 updateViewportSize(aRatio = 800) ["chrome://browser/content/browser.js":2392] metadata = [object Object] screenH = 500 screenW = 800 browser = [object XULElement @ 0x1149f30 (native @ 0x112e1e0)] this = [Tab about:blank] 3 resizeHandler(e = [object Event @ 0x10914e0 (native @ 0x1091470)]) ["chrome://browser/content/browser.js":272] scrollInterface = undefined scrollbox = undefined currentElement = undefined browser = undefined oldWidth = 1 toolbarHeight = 72 maximize = false h = 500 w = 800 this = [object ChromeWindow @ 0x950b10 (native @ 0xad8f78)] Then later on, (gdb) p aNewConfig $3 = (const nsFrameLoader::ViewportConfig &) @0x7fffffffb220: { mScrollOffset = { x = -2147483648, y = -2147483648 }, mXScale = inf, mYScale = inf } (gdb) call DumpJSStack() 0 scrollBy(y = NaN, x = NaN) ["chrome://browser/content/bindings/browser.xml":911] docHeight = NaN docWidth = NaN viewportHeight = 500 viewportWidth = 800 bcr = [object ClientRect @ 0x7fffd81d93f0 (native @ 0x7fffd81d93c0)] frameLoader = [xpconnect wrapped nsIFrameLoader @ 0x117ba30 (native @ 0x112fc50)] this = [object XULElement @ 0x1149f30 (native @ 0x112e1e0)] 1 scrollTo(y = NaN, x = NaN) ["chrome://browser/content/bindings/browser.xml":932] frameLoader = [xpconnect wrapped nsIFrameLoader @ 0x117ba30 (native @ 0x112fc50)] this = [object XULElement @ 0x1149f30 (native @ 0x112e1e0)] 2 updateViewportSize(aRatio = 800) ["chrome://browser/content/browser.js":2396] metadata = [object Object] screenH = 500 screenW = 800 browser = [object XULElement @ 0x1149f30 (native @ 0x112e1e0)] this = [Tab about:blank] 3 resizeHandler(e = [object Event @ 0x10914e0 (native @ 0x1091470)]) ["chrome://browser/content/browser.js":272] scrollInterface = undefined scrollbox = undefined currentElement = undefined browser = undefined oldWidth = 1 toolbarHeight = 72 maximize = false h = 500 w = 800 this = [object ChromeWindow @ 0x950b10 (native @ 0xad8f78)] This leads to WARNING: Visible rect transformed out of bounds: file /home/cjones/mozilla/mozilla-central/layout/base/FrameLayerBuilder.cpp, line 743
Assignee | ||
Updated•14 years ago
|
Assignee: nobody → mbrubeck
Reporter | ||
Comment 1•14 years ago
|
||
The latter also causes WARNING: Overflowed nscoord_MAX in conversion to nscoord: file ../../dist/include/nsCoord.h, line 105
Assignee | ||
Comment 2•14 years ago
|
||
When the browser is first created, its contentDocumentWidth is 0. This is causing getPageZoomLevel to return Infinity.
Attachment #481908 -
Flags: review?(mark.finkle)
Updated•14 years ago
|
Attachment #481908 -
Flags: review?(mark.finkle) → review+
Assignee | ||
Comment 3•14 years ago
|
||
http://hg.mozilla.org/mobile-browser/rev/04dbed7f2854
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment 4•13 years ago
|
||
How can I verify this?
Comment 5•13 years ago
|
||
Since I cannot see in my Error Console the specified warnings on the latest Nightly build, I will mark this bug as Verified Fixed. If needed, please reopen it or file a new bug. -- Mozilla/5.0 (Android;Linux armv7l;rv:9.0a1)Gecko/20110912 Firefox/9.0a1 Fennec/9.0a1 Device: Samsung Galaxy S OS: Android 2.2
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•