Bug 173507 - REGRESSION(Sierra): Meter element doesn't work in RTL
Summary: REGRESSION(Sierra): Meter element doesn't work in RTL
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified macOS 10.12
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-06-16 20:57 PDT by Ryosuke Niwa
Modified: 2017-06-18 21:00 PDT (History)
7 users (show)

See Also:


Attachments
Fixes the bug (4.15 KB, patch)
2017-06-16 23:45 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Patch for landing (4.21 KB, patch)
2017-06-18 19:37 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2017-06-16 20:57:11 PDT
In macOS Sierra and High Sierra, meter element in RTL context is drawn as if it's in LTR context.
Comment 1 Ryosuke Niwa 2017-06-16 20:57:21 PDT
<rdar://problem/32827803>
Comment 2 Ryosuke Niwa 2017-06-16 23:45:09 PDT
Created attachment 313189 [details]
Fixes the bug
Comment 3 Sam Weinig 2017-06-17 04:31:10 PDT
Comment on attachment 313189 [details]
Fixes the bug

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

> Source/WebCore/rendering/RenderThemeMac.mm:1079
> +    [cell setUserInterfaceLayoutDirection: style.isLeftToRightDirection() ? NSUserInterfaceLayoutDirectionLeftToRight : NSUserInterfaceLayoutDirectionRightToLeft];

Does this method exist on El Capitan?
Comment 4 Alexey Proskuryakov 2017-06-18 11:11:11 PDT
Comment on attachment 313189 [details]
Fixes the bug

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

> Source/WebCore/rendering/RenderThemeMac.mm:1077
> +    // FIXME: Remove the call to setBaseWritingDirection once __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100 is always true.

Can it be in an #ifdef?
Comment 5 Ryosuke Niwa 2017-06-18 17:20:04 PDT
(In reply to Sam Weinig from comment #3)
> Comment on attachment 313189 [details]
> Fixes the bug
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=313189&action=review
> 
> > Source/WebCore/rendering/RenderThemeMac.mm:1079
> > +    [cell setUserInterfaceLayoutDirection: style.isLeftToRightDirection() ? NSUserInterfaceLayoutDirectionLeftToRight : NSUserInterfaceLayoutDirectionRightToLeft];
> 
> Does this method exist on El Capitan?

Yes. It has been supported OS X 10.8.

(In reply to Alexey Proskuryakov from comment #4)
> Comment on attachment 313189 [details]
> Fixes the bug
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=313189&action=review
> 
> > Source/WebCore/rendering/RenderThemeMac.mm:1077
> > +    // FIXME: Remove the call to setBaseWritingDirection once __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100 is always true.
> 
> Can it be in an #ifdef?

What kind of #ifdef are you suggesting?
Comment 6 Ryosuke Niwa 2017-06-18 19:18:03 PDT
Oh, I guess we can just call setUserInterfaceLayoutDirection only when __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100 and call setBaseWritingDirection otherwise.

Will do that before landing.
Comment 7 Ryosuke Niwa 2017-06-18 19:37:06 PDT
Created attachment 313256 [details]
Patch for landing
Comment 8 Ryosuke Niwa 2017-06-18 19:37:48 PDT
Comment on attachment 313256 [details]
Patch for landing

Wait for EWS
Comment 9 WebKit Commit Bot 2017-06-18 21:00:52 PDT
Comment on attachment 313256 [details]
Patch for landing

Clearing flags on attachment: 313256

Committed r218468: <http://trac.webkit.org/changeset/218468>
Comment 10 WebKit Commit Bot 2017-06-18 21:00:54 PDT
All reviewed patches have been landed.  Closing bug.