Closed
Bug 919129
Opened 11 years ago
Closed 11 years ago
fix nsLayoutUtils::UpdateImageVisibilityForFrame to not expand the image rect too much
Categories
(Core :: Layout: Images, Video, and HTML Frames, defect)
Tracking
()
RESOLVED
FIXED
mozilla27
People
(Reporter: tnikkel, Assigned: tnikkel)
References
Details
(Whiteboard: [qa-])
Attachments
(1 file, 1 obsolete file)
1.72 KB,
patch
|
MatsPalmgren_bugz
:
review+
lsblakk
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
nsLayoutUtils::UpdateImageVisibilityForFrame expands the image rect to the scrollport of the scrollframe for each scroll frame it encounters. This is way too much.
The rect of the image may be scrolled out of view in the scroll frame. Using a rect that is scrolled out of view for further visibility calculations seems wrong. Instead pretend the rect was scrolled into view.
Attachment #808101 -
Flags: review?(matspal)
Comment 1•11 years ago
|
||
This makes sense for a small image (relative the scroll port), but it seems overly pessimistic
for an image that's larger than the scroll port. I think we want to clip the result to the
scroll port after the lines you added. (which, given that x,y is now inside the scroll port
with the lines you added, boils down to std::max of the two widths/heights)
Also,
transformedRect.x += scrollPort.x - transformedRect.x;
is the same as:
transformedRect.x = scrollPort.x;
Comment 2•11 years ago
|
||
Er, std::min that is... bah, reviewing while having morning coffee ;-)
Assignee | ||
Comment 3•11 years ago
|
||
(In reply to Mats Palmgren (:mats) from comment #1)
> I think we want to clip the result to the
> scroll port after the lines you added.
Yes of course. This was what I always intended to do but forget to add after I had the shifting part done.
Assignee | ||
Comment 4•11 years ago
|
||
Attachment #808101 -
Attachment is obsolete: true
Attachment #808101 -
Flags: review?(matspal)
Attachment #808202 -
Flags: review?(matspal)
Comment 5•11 years ago
|
||
Comment on attachment 808202 [details] [diff] [review]
patch v2
OK, looks good. r=mats
Attachment #808202 -
Flags: review?(matspal) → review+
Assignee | ||
Comment 6•11 years ago
|
||
Assignee | ||
Comment 7•11 years ago
|
||
Bug 847223 added this code, so adding dependency to track that.
Blocks: 847223
Comment 8•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
Assignee | ||
Comment 9•11 years ago
|
||
Comment on attachment 808202 [details] [diff] [review]
patch v2
[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 847223
User impact if declined: this patch just fixes the code that was added in bug 847223 to determine if a image is visible or not. it stops images from being considered visible or nearly visible when they are not. taking this patch means we only have one version of this code around and never ship the sub-optimal code.
Testing completed (on m-c, etc.): been on m-c for a while now, no problems found
Risk to taking this patch (and alternatives if risky): not risky
String or IDL/UUID changes made by this patch: none
Attachment #808202 -
Flags: approval-mozilla-aurora?
Updated•11 years ago
|
blocking-b2g: --- → koi?
Updated•11 years ago
|
Attachment #808202 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Assignee | ||
Comment 10•11 years ago
|
||
status-firefox26:
--- → fixed
Updated•11 years ago
|
status-firefox27:
--- → fixed
Comment 11•11 years ago
|
||
We probably don't need to bother triaging this for koi at this point, given that this is already landed on aurora per comment 10.
blocking-b2g: koi? → ---
Updated•11 years ago
|
Whiteboard: [qa-]
Updated•6 years ago
|
Product: Core → Core Graveyard
Updated•6 years ago
|
Product: Core Graveyard → Core
You need to log in
before you can comment on or make changes to this bug.
Description
•