WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
135671
[iOS] Make document marker assets not specific to particular scale factors
https://bugs.webkit.org/show_bug.cgi?id=135671
Summary
[iOS] Make document marker assets not specific to particular scale factors
Myles C. Maxfield
Reported
2014-08-06 14:16:48 PDT
[iOS] Make document marker assets not specific to particular scale factors
Attachments
Patch
(7.17 KB, patch)
2014-08-06 14:51 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Patch
(7.22 KB, patch)
2014-08-06 15:05 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Patch
(7.23 KB, patch)
2014-08-06 15:27 PDT
,
Myles C. Maxfield
simon.fraser
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2014-08-06 14:21:06 PDT
<
rdar://problem/17936546
>
Radar WebKit Bug Importer
Comment 2
2014-08-06 14:21:49 PDT
<
rdar://problem/17936564
>
Jon Lee
Comment 3
2014-08-06 14:25:57 PDT
<
rdar://problem/17855327
>
Myles C. Maxfield
Comment 4
2014-08-06 14:51:07 PDT
Created
attachment 236138
[details]
Patch
Simon Fraser (smfr)
Comment 5
2014-08-06 14:56:36 PDT
Comment on
attachment 236138
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=236138&action=review
> Source/WebCore/platform/ios/wak/WKGraphics.mm:96 > + NSString *fileName = scaleFactor == 1 ? [NSString stringWithUTF8String:imageFile] : [NSString stringWithFormat:@"%s@%dx", imageFile, scaleFactor];
You've removed the fallback that used to be here. I think it would be better to reinstate the fallback, but assert when the correct image is not found.
Myles C. Maxfield
Comment 6
2014-08-06 15:05:26 PDT
Created
attachment 236139
[details]
Patch
Simon Fraser (smfr)
Comment 7
2014-08-06 15:07:58 PDT
Comment on
attachment 236139
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=236139&action=review
> Source/WebCore/platform/ios/wak/WKGraphics.mm:116 > + NSData *imageData = nullptr; > + for (unsigned scaleFactor = wkGetScreenScaleFactor(); scaleFactor > 0; --scaleFactor) { > + imageData = [NSData dataWithContentsOfFile:imageResourcePath(image_file, scaleFactor)]; > + ASSERT(scaleFactor != wkGetScreenScaleFactor() || imageData);
Now you're just fetching the 1x image.
Myles C. Maxfield
Comment 8
2014-08-06 15:27:43 PDT
Created
attachment 236143
[details]
Patch
Simon Fraser (smfr)
Comment 9
2014-08-06 17:42:39 PDT
Comment on
attachment 236143
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=236143&action=review
> Source/WebCore/ChangeLog:9 > + No new tests, because on iOS I can only test whether or not document > + markers should be rendered, rather than whether or not they were rendered
I don't think you need to justify the lack of tests.
> Source/WebCore/platform/ios/wak/WKGraphics.mm:116 > + ASSERT(scaleFactor != wkGetScreenScaleFactor() || imageData);
I think an if (imageData) break; would be a little easier to read.
Myles C. Maxfield
Comment 10
2014-08-06 17:59:56 PDT
Comment on
attachment 236143
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=236143&action=review
>> Source/WebCore/ChangeLog:9 >> + markers should be rendered, rather than whether or not they were rendered > > I don't think you need to justify the lack of tests.
Done.
>> Source/WebCore/platform/ios/wak/WKGraphics.mm:116 >> + ASSERT(scaleFactor != wkGetScreenScaleFactor() || imageData); > > I think an if (imageData) break; would be a little easier to read.
Done.
Myles C. Maxfield
Comment 11
2014-08-06 18:00:04 PDT
https://trac.webkit.org/r172197
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug