Changeset 248351 in webkit
- Timestamp:
- Aug 6, 2019, 11:52:39 PM (7 years ago)
- Location:
- branches/safari-608.1-branch/Source/WebCore
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
page/FrameSnapshotting.cpp (modified) (2 diffs)
-
page/FrameSnapshotting.h (modified) (1 diff)
-
page/TextIndicator.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-608.1-branch/Source/WebCore/ChangeLog
r248349 r248351 1 2019-08-06 Kocsen Chung <kocsen_chung@apple.com> 2 3 Cherry-pick r247846. rdar://problem/54017896 4 5 Subpixel fringes around TextIndicator snapshots at non-integral scale factors 6 https://bugs.webkit.org/show_bug.cgi?id=200145 7 8 Reviewed by Simon Fraser. 9 10 * page/FrameSnapshotting.cpp: 11 (WebCore::snapshotFrameRectWithClip): 12 * page/FrameSnapshotting.h: 13 * page/TextIndicator.cpp: 14 (WebCore::snapshotOptionsForTextIndicatorOptions): 15 Round the scale factor up, and snappily enclose the clip rects. 16 17 TextIndicator doesn't require the use of the precise scale factor that 18 the page is painted at, but we want it to be sharp, so we overshoot! 19 20 21 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247846 268f45cc-cd09-0410-ab3c-d52691b4dbfc 22 23 2019-07-25 Tim Horton <timothy_horton@apple.com> 24 25 Subpixel fringes around TextIndicator snapshots at non-integral scale factors 26 https://bugs.webkit.org/show_bug.cgi?id=200145 27 28 Reviewed by Simon Fraser. 29 30 * page/FrameSnapshotting.cpp: 31 (WebCore::snapshotFrameRectWithClip): 32 * page/FrameSnapshotting.h: 33 * page/TextIndicator.cpp: 34 (WebCore::snapshotOptionsForTextIndicatorOptions): 35 Round the scale factor up, and snappily enclose the clip rects. 36 37 TextIndicator doesn't require the use of the precise scale factor that 38 the page is painted at, but we want it to be sharp, so we overshoot! 39 1 40 2019-08-06 Kocsen Chung <kocsen_chung@apple.com> 2 41 -
branches/safari-608.1-branch/Source/WebCore/page/FrameSnapshotting.cpp
r235560 r248351 109 109 scaleFactor *= frame.page()->pageScaleFactor(); 110 110 111 if (options & SnapshotOptionsPaintWithIntegralScaleFactor) 112 scaleFactor = ceilf(scaleFactor); 113 111 114 std::unique_ptr<ImageBuffer> buffer = ImageBuffer::create(imageRect.size(), Unaccelerated, scaleFactor); 112 115 if (!buffer) … … 117 120 Path clipPath; 118 121 for (auto& rect : clipRects) 119 clipPath.addRect( rect);122 clipPath.addRect(encloseRectToDevicePixels(rect, scaleFactor)); 120 123 buffer->context().clipPath(clipPath); 121 124 } -
branches/safari-608.1-branch/Source/WebCore/page/FrameSnapshotting.h
r222113 r248351 48 48 SnapshotOptionsForceBlackText = 1 << 3, 49 49 SnapshotOptionsPaintSelectionAndBackgroundsOnly = 1 << 4, 50 SnapshotOptionsPaintEverythingExcludingSelection = 1 << 5 50 SnapshotOptionsPaintEverythingExcludingSelection = 1 << 5, 51 SnapshotOptionsPaintWithIntegralScaleFactor = 1 << 6, 51 52 }; 52 53 typedef unsigned SnapshotOptions; -
branches/safari-608.1-branch/Source/WebCore/page/TextIndicator.cpp
r248345 r248351 133 133 static SnapshotOptions snapshotOptionsForTextIndicatorOptions(TextIndicatorOptions options) 134 134 { 135 SnapshotOptions snapshotOptions = SnapshotOptions None;135 SnapshotOptions snapshotOptions = SnapshotOptionsPaintWithIntegralScaleFactor; 136 136 137 137 if (!(options & TextIndicatorOptionPaintAllContent)) {
Note:
See TracChangeset
for help on using the changeset viewer.