[webkit-reviews] review granted: [Bug 191559] Use a light scrollbar for transparent web views in dark mode : [Attachment 354713] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 13 16:50:13 PST 2018


Dean Jackson <dino at apple.com> has granted Timothy Hatcher <timothy at apple.com>'s
request for review:
Bug 191559: Use a light scrollbar for transparent web views in dark mode
https://bugs.webkit.org/show_bug.cgi?id=191559

Attachment 354713: Patch

https://bugs.webkit.org/attachment.cgi?id=354713&action=review




--- Comment #6 from Dean Jackson <dino at apple.com> ---
Comment on attachment 354713
  --> https://bugs.webkit.org/attachment.cgi?id=354713
Patch

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

> Source/WebCore/page/FrameView.cpp:2058
> +    auto* document = frame().document();
> +    auto* documentElement = document ? document->documentElement() :
nullptr;
> +    auto* documentElementRenderer = documentElement ?
documentElement->renderer() : nullptr;
> +    if (documentElementRenderer &&
documentElementRenderer->style().hasExplicitlySetSupportedColorSchemes())
> +	   return documentElementRenderer;
> +    auto* bodyElement = document ? document->bodyOrFrameset() : nullptr;
> +    return bodyElement ? bodyElement->renderer() : nullptr;

Don't we normally do early returns? A null document would go through 5 extra
checks before returning null here.

> Source/WebCore/testing/Internals.cpp:2507
> +	   return "default"_str;

First time I've seen someone else use it!


More information about the webkit-reviews mailing list