| Summary: | WebKit2 View Gestures (Swipe): Discard snapshots made with a different view size/pixel density | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Tim Horton <thorton> | ||||||||||
| Component: | WebKit2 | Assignee: | Tim Horton <thorton> | ||||||||||
| Status: | RESOLVED FIXED | ||||||||||||
| Severity: | Normal | CC: | andersca, mitz, sam, simon.fraser | ||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||
| Version: | 528+ (Nightly build) | ||||||||||||
| Hardware: | Unspecified | ||||||||||||
| OS: | Unspecified | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Tim Horton
2014-04-24 01:36:20 PDT
*** Bug 132116 has been marked as a duplicate of this bug. *** Created attachment 230239 [details]
patch
Created attachment 230244 [details]
fix the build
Comment on attachment 230244 [details] fix the build View in context: https://bugs.webkit.org/attachment.cgi?id=230244&action=review > Source/WebKit2/UIProcess/mac/ViewSnapshotStore.mm:154 > String oldSnapshotUUID = item->snapshotUUID(); > - if (!oldSnapshotUUID.isEmpty()) > - m_snapshotMap.remove(oldSnapshotUUID); > + if (!oldSnapshotUUID.isEmpty()) { > + const auto& oldSnapshotIter = m_snapshotMap.find(oldSnapshotUUID); > + if (oldSnapshotIter != m_snapshotMap.end()) { > + if (oldSnapshotIter->value.hasImage()) > + m_snapshotsWithImagesCount--; > + m_snapshotMap.remove(oldSnapshotIter); > + } > + } > Pulled this bit out into https://bugs.webkit.org/show_bug.cgi?id=132204 Created attachment 230250 [details]
fix the ML build
Created attachment 230251 [details]
pulled crash fix into another bug
Comment on attachment 230251 [details] pulled crash fix into another bug View in context: https://bugs.webkit.org/attachment.cgi?id=230251&action=review > Source/WebKit2/ChangeLog:65 > + Fix a bug where the count of snapshots with live images was too high > + because we were failing to decrement it when replacing a snapshot of > + an existing item with a fresh one. get rid of the changelog part of this too (code change moved to a different bug) Comment on attachment 230251 [details] pulled crash fix into another bug View in context: https://bugs.webkit.org/attachment.cgi?id=230251&action=review > Source/WebKit2/ChangeLog:9 > + To do this, we need an accurate picture of the topContentInset, both for the Web view, "picture" in the context of snapshotting is ... confusing. > Source/WebKit2/UIProcess/mac/ViewGestureController.h:137 > + CALayer *determineSnapshotLayerParent(); > + CALayer *determineLayerAdjacentToSnapshotForParent(SwipeDirection, CALayer *snapshotLayerParent); Not sure why these aren't const. |