Bug 188292 - PDFPlugin: Context menus in RTL are left-aligned
Summary: PDFPlugin: Context menus in RTL are left-aligned
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-08-02 17:20 PDT by Tim Horton
Modified: 2018-08-02 18:11 PDT (History)
4 users (show)

See Also:


Attachments
Patch (5.91 KB, patch)
2018-08-02 17:20 PDT, Tim Horton
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2018-08-02 17:20:00 PDT
PDFPlugin: Context menus in RTL are left-aligned
Comment 1 Tim Horton 2018-08-02 17:20:11 PDT
Created attachment 346434 [details]
Patch
Comment 2 Tim Horton 2018-08-02 17:20:36 PDT
<rdar://problem/33781669>
Comment 3 Simon Fraser (smfr) 2018-08-02 17:27:14 PDT
Comment on attachment 346434 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=346434&action=review

> Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:1610
> +    auto itemCount = [nsMenu numberOfItems];
> +    for (int i = 0; i < itemCount; i++) {

auto considered harmful: are you going to get signed/unsigned comparison warnings here or not?

> Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:1619
> +    std::optional<int> selectedIndex = -1;

optional<> but init with -1? Why not optional<optional<>> (j/k)
Comment 4 WebKit Commit Bot 2018-08-02 18:11:53 PDT
Comment on attachment 346434 [details]
Patch

Clearing flags on attachment: 346434

Committed r234530: <https://trac.webkit.org/changeset/234530>
Comment 5 WebKit Commit Bot 2018-08-02 18:11:55 PDT
All reviewed patches have been landed.  Closing bug.