Bug 188292

Summary: PDFPlugin: Context menus in RTL are left-aligned
Product: WebKit Reporter: Tim Horton <thorton>
Component: New BugsAssignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: aestes, commit-queue, simon.fraser, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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.