Closed
Bug 375038
Opened 17 years ago
Closed 17 years ago
Dragging image with display: block freezes the browser
Categories
(Core :: DOM: Copy & Paste and Drag & Drop, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: phiw2, Assigned: enndeakin)
References
Details
(Keywords: regression, testcase)
Attachments
(2 files)
1.06 KB,
text/html
|
Details | |
10.51 KB,
patch
|
roc
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
An image is set to {display:block} _and_ the image is nested in a link (<a href>). Dragging the image freezes the browser. Reports in Console.app log: 2007-03-23 15:36:40.436 firefox-bin[19123] Inconsistent set of values to create NSBitmapImageRep 2007-03-23 15:36:40.442 firefox-bin[19123] *** NSRunLoop ignoring exception 'Can't cache image' that raised during posting of delayed perform with target 1a0fea0 and selector 'runAppShell' 2007-03-23 15:35:13.832 Camino[19094] Inconsistent set of values to create NSBitmapImageRep 2007-03-23 15:35:13.834 Camino[19094] Can't cache image Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a3pre) Gecko/20070322 Minefield/3.0a3pre ID:2007032204 [cairo]
Reporter | ||
Updated•17 years ago
|
Blocks: 178513
Keywords: regression,
testcase
Assignee | ||
Comment 1•17 years ago
|
||
<span><img style="display: block;" src="../happy.png"></span> This is because the inline (span) is being dragged, instead of the image block which has been moved outside of the inline.
Why does that cause this error? In these situations we'll have split the <span> into multiple frames, in this case an empty inline frame followed by an anonymous block containing the <img>. What I think you should do is move GetNifOrSpecialSibling: http://lxr.mozilla.org/seamonkey/source/layout/base/nsCSSFrameConstructor.cpp#485 to nsLayoutUtils and give it a better name, say GetNextContinuationOrSpecialSibling. Then in that loop where we search for the nearest ancestor which has no next-continuation, call GetNextContinuationOrSpecialSibling instead so we ensure it has no special sibling as well (i.e. it's not participating in the above situation).
Assignee | ||
Comment 3•17 years ago
|
||
> Then in that loop where we search for the
> nearest ancestor which has no next-continuation, call
> GetNextContinuationOrSpecialSibling instead
That loop actually looks for the nearest ancestor with no next-in-flow, otherwise only the first line of text is included.
Every next-in-flow is also a next-continuation, so searching for the nearest ancestor with a next-continuation should go at least as far as checking the next-in-flow. Maybe there was some other problem when you tried it?
I mean nearest ancestor with no next-continuation. In other words, if an ancestor has no next-continuation, then it also has no next-in-flow.
Assignee | ||
Comment 6•17 years ago
|
||
The patch also checks for zero size images and uses a default size if so
Assignee: nobody → enndeakin
Status: NEW → ASSIGNED
Attachment #259518 -
Flags: superreview?(roc)
Attachment #259518 -
Flags: review?(roc)
Comment on attachment 259518 [details] [diff] [review] check special siblings as well Can you remove the changes to +++ widget/src/xpwidgets/nsBaseDragService.cpp? They don't seem to be related to this bug and I didn't review them.
Attachment #259518 -
Flags: superreview?(roc)
Attachment #259518 -
Flags: superreview+
Attachment #259518 -
Flags: review?(roc)
Attachment #259518 -
Flags: review+
Assignee | ||
Updated•17 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Updated•17 years ago
|
Flags: in-testsuite?
You need to log in
before you can comment on or make changes to this bug.
Description
•