Title: [93879] trunk/Source
- Revision
- 93879
- Author
- [email protected]
- Date
- 2011-08-26 08:29:03 -0700 (Fri, 26 Aug 2011)
Log Message
Chromium Mac: Use a custom pattern image for rubber banding overhang area
https://bugs.webkit.org/show_bug.cgi?id=66707
Also roll Chromium revision to 98101, to include dependency: http://codereview.chromium.org/7714036/
Patch by Alexei Svitkine <[email protected]> on 2011-08-26
Reviewed by Dimitri Glazkov.
No new tests since its just changing the Chromium-specific overhang pattern.
* platform/chromium/ScrollbarThemeChromiumMac.mm:
(WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac):
(WebCore::ScrollbarThemeChromiumMac::paintOverhangAreas):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (93878 => 93879)
--- trunk/Source/WebCore/ChangeLog 2011-08-26 15:14:03 UTC (rev 93878)
+++ trunk/Source/WebCore/ChangeLog 2011-08-26 15:29:03 UTC (rev 93879)
@@ -1,3 +1,18 @@
+2011-08-26 Alexei Svitkine <[email protected]>
+
+ Chromium Mac: Use a custom pattern image for rubber banding overhang area
+ https://bugs.webkit.org/show_bug.cgi?id=66707
+
+ Also roll Chromium revision to 98101, to include dependency: http://codereview.chromium.org/7714036/
+
+ Reviewed by Dimitri Glazkov.
+
+ No new tests since its just changing the Chromium-specific overhang pattern.
+
+ * platform/chromium/ScrollbarThemeChromiumMac.mm:
+ (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac):
+ (WebCore::ScrollbarThemeChromiumMac::paintOverhangAreas):
+
2011-08-26 Eric Carlson <[email protected]>
<video> playlist can not advance when playing in background tab
Modified: trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromiumMac.mm (93878 => 93879)
--- trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromiumMac.mm 2011-08-26 15:14:03 UTC (rev 93878)
+++ trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromiumMac.mm 2011-08-26 15:29:03 UTC (rev 93879)
@@ -42,18 +42,12 @@
#include <wtf/UnusedParam.h>
#if USE(SKIA)
-#include "BitmapImageSingleFrameSkia.h"
#include "PlatformContextSkia.h"
#include "skia/ext/skia_utils_mac.h"
#endif
-// Undocumented Lion method to get the pattern for the over-scroll area.
-@interface NSColor (LionSekretAPI)
-+ (NSImage*)_linenPatternImage;
-@end
-
// FIXME: There are repainting problems due to Aqua scroll bar buttons' visual overflow.
using namespace std;
@@ -200,24 +194,9 @@
if (!initialized) {
initialized = true;
- // Load the linen pattern image used for overhang drawing if available.
- if ([NSColor respondsToSelector:@selector(_linenPatternImage)]) {
- NSImage* image = [NSColor _linenPatternImage];
- if (image) {
- NSData* tiffData = [image TIFFRepresentation];
- if (tiffData) {
- CGImageSourceRef imageSource = CGImageSourceCreateWithData((CFDataRef)tiffData, NULL);
- CGImageRef cgImage = CGImageSourceCreateImageAtIndex(imageSource, 0, NULL);
-#if USE(SKIA)
- SkBitmap bitmap = gfx::CGImageToSkBitmap(cgImage);
- RefPtr<Image> patternImage = BitmapImageSingleFrameSkia::create(bitmap, false);
-#else
- RefPtr<Image> patternImage = BitmapImage::create(cgImage);
-#endif
- m_overhangPattern = Pattern::create(patternImage, true, true);
- }
- }
- }
+ // Load the linen pattern image used for overhang drawing.
+ RefPtr<Image> patternImage = Image::loadPlatformResource("overhangPattern");
+ m_overhangPattern = Pattern::create(patternImage, true, true);
[ScrollbarPrefsObserver registerAsObserver];
preferencesChanged();
@@ -718,11 +697,7 @@
context->save();
- if (m_overhangPattern.get())
- context->setFillPattern(m_overhangPattern);
- else
- context->setFillColor(Color::darkGray, ColorSpaceDeviceRGB);
-
+ context->setFillPattern(m_overhangPattern);
if (hasHorizontalOverhang)
context->fillRect(intersection(horizontalOverhangRect, dirtyRect));
if (hasVerticalOverhang)
Modified: trunk/Source/WebKit/chromium/DEPS (93878 => 93879)
--- trunk/Source/WebKit/chromium/DEPS 2011-08-26 15:14:03 UTC (rev 93878)
+++ trunk/Source/WebKit/chromium/DEPS 2011-08-26 15:29:03 UTC (rev 93879)
@@ -32,7 +32,7 @@
vars = {
'chromium_svn': 'http://src.chromium.org/svn/trunk/src',
- 'chromium_rev': '97891'
+ 'chromium_rev': '98101'
}
deps = {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes