WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 59183
Overlay scroller hard to see on pages with dark background
https://bugs.webkit.org/show_bug.cgi?id=59183
Summary
Overlay scroller hard to see on pages with dark background
Jon Lee
Reported
2011-04-22 02:09:17 PDT
<
rdar://problem/8975367
>
Attachments
Patch
(12.01 KB, patch)
2011-04-22 02:30 PDT
,
Jon Lee
sam
: review-
Details
Formatted Diff
Diff
Patch
(13.99 KB, patch)
2011-04-22 14:01 PDT
,
Jon Lee
no flags
Details
Formatted Diff
Diff
Patch
(14.04 KB, patch)
2011-04-22 14:09 PDT
,
Jon Lee
bdakin
: review+
bdakin
: commit-queue-
Details
Formatted Diff
Diff
Patch
(13.12 KB, patch)
2011-04-22 15:34 PDT
,
Jon Lee
simon.fraser
: review-
Details
Formatted Diff
Diff
Patch
(17.70 KB, patch)
2011-04-24 20:16 PDT
,
Jon Lee
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Jon Lee
Comment 1
2011-04-22 02:30:09 PDT
Created
attachment 90683
[details]
Patch
Sam Weinig
Comment 2
2011-04-22 09:44:22 PDT
Comment on
attachment 90683
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=90683&action=review
> Source/WebCore/platform/mac/ScrollbarThemeMac.mm:214 > + if (!scrollbar->parent()->isFrameView()) > + return ScrollbarOverlayStyleDefault; > + > + FrameView* frameView = static_cast<FrameView*>(scrollbar->parent()); > + Document* document = frameView->frame()->document(); > + Element* rootElementToUse = document->body(); > + if (!rootElementToUse) > + rootElementToUse = document->documentElement(); > + if (!rootElementToUse) > + return ScrollbarOverlayStyleDefault; > + > + RenderObject* renderer = rootElementToUse->renderer(); > + if (!renderer) > + return ScrollbarOverlayStyleDefault; > + Color color = renderer->style()->visitedDependentColor(CSSPropertyBackgroundColor); > + if (!color.isValid()) > + return ScrollbarOverlayStyleDefault; > + > + // reduce the background color from RGB to a lightness value > + // and determine which scrollbar style to use based on a magic > + // lightness heuristic > + double h, s, l; > + color.getHSL(h, s, l); > + if (l < .5) > + return ScrollbarOverlayStyleLight;
This is a layering violation, since classes in WebCore/platform are not supposed to know about rendering, the DOM, or the frame tree. Instead, I think you should add a virtual method to ScrollableArea which FrameView can implement to return the background color. This will also make this possible to implement for overflow areas in the future.
Jon Lee
Comment 3
2011-04-22 14:01:44 PDT
Created
attachment 90756
[details]
Patch
WebKit Review Bot
Comment 4
2011-04-22 14:04:46 PDT
Attachment 90756
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/page/FrameView.cpp:332: l is incorrectly named. Don't use the single letter 'l' as an identifier name. [readability/naming] [4] Total errors found: 1 in 14 files If any of these errors are false positives, please file a bug against check-webkit-style.
Jon Lee
Comment 5
2011-04-22 14:09:23 PDT
Created
attachment 90758
[details]
Patch
Beth Dakin
Comment 6
2011-04-22 14:15:25 PDT
Comment on
attachment 90758
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=90758&action=review
> Source/WebCore/platform/ScrollableArea.cpp:201 > +ScrollbarOverlayStyle ScrollableArea::recommendedScrollbarOverlayStyle()
Since this is a one-line function, it would be nice to have it implemented in the header.
> Source/WebCore/platform/mac/ScrollbarThemeMac.mm:39 > +
Unnecessary whitespace. You should remove this.
> Source/WebCore/platform/mac/ScrollbarThemeMac.mm:-449 > -
Arguably this whitespace was valuable. But I'll leave that up to you. :-)
> Source/WebCore/platform/mac/WebCoreSystemInterface.h:230 > +
Unnecessary tab-whitespace. Should remove.
Beth Dakin
Comment 7
2011-04-22 14:17:21 PDT
Comment on
attachment 90758
[details]
Patch Oops, meant to r+ and cq- so that Jon can upload a new version with improved whitespace.
Jon Lee
Comment 8
2011-04-22 15:34:55 PDT
Created
attachment 90784
[details]
Patch
WebKit Commit Bot
Comment 9
2011-04-22 23:20:45 PDT
The commit-queue encountered the following flaky tests while processing
attachment 90784
[details]
: http/tests/xmlhttprequest/re-login.html
bug 51987
(author:
ap@webkit.org
) The commit-queue is continuing to process your patch.
WebKit Commit Bot
Comment 10
2011-04-22 23:23:14 PDT
Comment on
attachment 90784
[details]
Patch Clearing flags on attachment: 90784 Committed
r84740
: <
http://trac.webkit.org/changeset/84740
>
WebKit Commit Bot
Comment 11
2011-04-22 23:23:18 PDT
All reviewed patches have been landed. Closing bug.
WebKit Commit Bot
Comment 12
2011-04-23 00:48:06 PDT
The commit-queue encountered the following flaky tests while processing
attachment 90784
[details]
: http/tests/xmlhttprequest/basic-auth.html
bug 51613
(author:
ap@webkit.org
) http/tests/appcache/update-cache.html
bug 52483
(author:
ap@webkit.org
) The commit-queue is continuing to process your patch.
Simon Fraser (smfr)
Comment 13
2011-04-23 20:58:20 PDT
I rolled this out via 59290, since it breaks internal builds and does not take into account feedback that I gave via email.
Jon Lee
Comment 14
2011-04-24 20:16:58 PDT
Created
attachment 90897
[details]
Patch
Maciej Stachowiak
Comment 15
2011-04-24 20:20:48 PDT
Comment on
attachment 90897
[details]
Patch r=me (previously reviewed by Simon and revised per his suggestions)
WebKit Commit Bot
Comment 16
2011-04-25 01:26:43 PDT
Comment on
attachment 90897
[details]
Patch Clearing flags on attachment: 90897 Committed
r84769
: <
http://trac.webkit.org/changeset/84769
>
WebKit Commit Bot
Comment 17
2011-04-25 01:26:48 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug