[Webkit-unassigned] [Bug 149496] [GTK][WPE] Use mobile user-agent on tablet

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 9 01:21:12 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=149496

Carlos Garcia Campos <cgarcia at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #403776|review?                     |review+, commit-queue-
              Flags|                            |

--- Comment #33 from Carlos Garcia Campos <cgarcia at igalia.com> ---
Comment on attachment 403776
  --> https://bugs.webkit.org/attachment.cgi?id=403776
Patch

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

> Source/WTF/wtf/PlatformGTK.cmake:27
> +    glib/ChassisType.cpp

You have to add the files to PlatformWPE.cmake too.

> Source/WTF/wtf/glib/ChassisType.cpp:88
> +    } else {
> +        if (!g_error_matches(error.get(), G_FILE_ERROR, G_FILE_ERROR_NOENT))

else if?

> Source/WTF/wtf/glib/ChassisType.cpp:118
> +    } else {
> +        if (!g_error_matches(error.get(), G_FILE_ERROR, G_FILE_ERROR_NOENT))

Ditto.

> Source/WTF/wtf/glib/ChassisType.cpp:136
> +        if (chassisType == ChassisType::Unknown)
> +            chassisType = ChassisType::Desktop;

So, Unknown is never exposed, we always fallback to Desktop. I think it would be better to use Optional<> instead of adding the Unknown value to the enum. All read functions would return Optional<ChassisType>, returning WTF::nullopt when unknown.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200709/1e493d66/attachment.htm>


More information about the webkit-unassigned mailing list