summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DEPS2
-rw-r--r--chrome/common/gfx/chrome_canvas_win.cc7
-rwxr-xr-xskia/ext/bitmap_platform_device_mac.h1
-rw-r--r--skia/ext/bitmap_platform_device_win.cc134
-rw-r--r--skia/ext/bitmap_platform_device_win.h16
-rw-r--r--skia/ext/platform_canvas_unittest.cc6
-rwxr-xr-xskia/ext/platform_device_mac.cc9
-rwxr-xr-xskia/ext/platform_device_mac.h9
-rw-r--r--skia/ext/platform_device_win.h20
-rw-r--r--webkit/build/WebCore/WebCore.vcproj4
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.pngbin67443 -> 67692 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/backgrounds/svg-as-background-5-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/backgrounds/svg-as-background-5-expected.pngbin173123 -> 173115 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-01-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-01-expected.pngbin17034 -> 19523 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-rotate-transform-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-rotate-transform-expected.pngbin31075 -> 42176 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-scale-transform-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-scale-transform-expected.pngbin31018 -> 47583 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/canvas/canvas-text-alignment-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/canvas/canvas-text-alignment-expected.pngbin41710 -> 42437 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/clip/nestedTransparencyClip-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/clip/nestedTransparencyClip-expected.pngbin5510 -> 5512 bytes
-rwxr-xr-xwebkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/css/resize-corner-tracking-transformed-expected.checksum2
-rwxr-xr-xwebkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/css/resize-corner-tracking-transformed-expected.pngbin7540 -> 7655 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/dom/anchor-toString-expected.txt6
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/forms/input-appearance-height-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/forms/input-appearance-height-expected.pngbin7072 -> 7072 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/reflections/reflection-direction-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/reflections/reflection-direction-expected.pngbin810387 -> 797578 bytes
-rwxr-xr-xwebkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-h-expected.checksum2
-rwxr-xr-xwebkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-h-expected.pngbin6684 -> 6684 bytes
-rwxr-xr-xwebkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-v-expected.checksum2
-rwxr-xr-xwebkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-v-expected.pngbin6684 -> 6684 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/replaced/001-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/replaced/001-expected.pngbin8992 -> 27022 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/replaced/002-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/replaced/002-expected.pngbin13033 -> 24729 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/replaced/003-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/replaced/003-expected.pngbin13033 -> 24729 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/international/complex-character-based-fallback-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/international/complex-character-based-fallback-expected.pngbin17866 -> 26603 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/international/hindi-spacing-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/international/hindi-spacing-expected.pngbin6538 -> 8779 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/international/thai-line-breaks-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/international/thai-line-breaks-expected.pngbin12357 -> 21103 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transform-on-inline-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transform-on-inline-expected.pngbin9556 -> 9311 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transform-table-row-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transform-table-row-expected.pngbin16219 -> 15757 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transformed-focused-text-input-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transformed-focused-text-input-expected.pngbin5314 -> 5995 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/animate-elem-30-t-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/animate-elem-30-t-expected.pngbin10219 -> 10244 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/filters-blend-01-b-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/filters-blend-01-b-expected.pngbin6799 -> 7063 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/masking-opacity-01-b-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/masking-opacity-01-b-expected.pngbin9207 -> 9200 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/render-groups-01-b-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/render-groups-01-b-expected.pngbin13624 -> 21268 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/render-groups-03-t-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/render-groups-03-t-expected.pngbin16009 -> 25301 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/text-text-08-b-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/text-text-08-b-expected.pngbin29587 -> 29914 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/batik/text/textFeatures-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/batik/text/textFeatures-expected.pngbin23357 -> 23121 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/carto.net/scrollbar-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/carto.net/scrollbar-expected.pngbin264624 -> 263247 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/foreign-object-skew-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/foreign-object-skew-expected.pngbin18306 -> 20837 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/js-update-bounce-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/js-update-bounce-expected.pngbin4679 -> 4687 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.pngbin28624 -> 32372 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-instanceRoot-modifications-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-instanceRoot-modifications-expected.pngbin4359 -> 4232 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-modify-container-in-target-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-modify-container-in-target-expected.pngbin4666 -> 4587 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-modify-target-container-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-modify-target-container-expected.pngbin4483 -> 4404 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-g-containing-use-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-g-containing-use-expected.pngbin5399 -> 5367 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-g-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-g-expected.pngbin5042 -> 4958 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-use-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-use-expected.pngbin5042 -> 4958 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-transform-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-transform-expected.pngbin6304 -> 6220 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug12910-2-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug12910-2-expected.pngbin2264 -> 2346 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug1296-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug1296-expected.pngbin19237 -> 19238 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug137388-2-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug137388-2-expected.pngbin9042 -> 28861 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug1430-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug1430-expected.pngbin27565 -> 27566 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug4093-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug4093-expected.pngbin39433 -> 39432 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug4427-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug4427-expected.pngbin20322 -> 20320 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug4523-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug4523-expected.pngbin4616 -> 4638 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug625-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug625-expected.pngbin61365 -> 61370 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/core/bloomberg-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/core/bloomberg-expected.pngbin133971 -> 133980 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla_expected_failures/bugs/bug1647-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla_expected_failures/bugs/bug1647-expected.pngbin18032 -> 18021 bytes
-rw-r--r--webkit/glue/webframe_impl.cc4
-rwxr-xr-xwebkit/tools/test_shell/test_shell.cc14
-rw-r--r--webkit/tools/test_shell/test_shell_tests.vcproj4
-rw-r--r--webkit/tools/webcore_unit_tests/TransparencyWin_unittest.cpp679
113 files changed, 776 insertions, 237 deletions
diff --git a/DEPS b/DEPS
index 4aed6ba..e6fc11f 100644
--- a/DEPS
+++ b/DEPS
@@ -19,7 +19,7 @@ deps = {
"http://googletest.googlecode.com/svn/trunk@167",
"src/third_party/WebKit":
- "/trunk/deps/third_party/WebKit@10624",
+ "/trunk/deps/third_party/WebKit@10629",
"src/third_party/icu38":
"/trunk/deps/third_party/icu38@10364",
diff --git a/chrome/common/gfx/chrome_canvas_win.cc b/chrome/common/gfx/chrome_canvas_win.cc
index 770effb..5e40ceb 100644
--- a/chrome/common/gfx/chrome_canvas_win.cc
+++ b/chrome/common/gfx/chrome_canvas_win.cc
@@ -158,7 +158,6 @@ void ChromeCanvas::DrawStringInt(const std::wstring& text, HFONT font,
if (!IntersectsClipRectInt(x, y, w, h))
return;
- getTopPlatformDevice().prepareForGDI(x, y, w, h);
RECT text_bounds = { x, y, x + w, y + h };
HDC dc = beginPlatformPaint();
SetBkMode(dc, TRANSPARENT);
@@ -174,7 +173,11 @@ void ChromeCanvas::DrawStringInt(const std::wstring& text, HFONT font,
// Restore the old font. This way we don't have to worry if the caller
// deletes the font and the DC lives longer.
SelectObject(dc, old_font);
- getTopPlatformDevice().postProcessGDI(x, y, w, h);
+
+ // Windows will have cleared the alpha channel of the text we drew. Assume
+ // we're drawing to an opaque surface, or at least the text rect area is
+ // opaque.
+ getTopPlatformDevice().makeOpaque(x, y, w, h);
}
void ChromeCanvas::DrawStringInt(const std::wstring& text,
diff --git a/skia/ext/bitmap_platform_device_mac.h b/skia/ext/bitmap_platform_device_mac.h
index 2e31eb2..7116a1b 100755
--- a/skia/ext/bitmap_platform_device_mac.h
+++ b/skia/ext/bitmap_platform_device_mac.h
@@ -61,7 +61,6 @@ class BitmapPlatformDeviceMac : public PlatformDeviceMac {
virtual void DrawToContext(CGContextRef context, int x, int y,
const CGRect* src_rect);
virtual bool IsVectorial() { return false; }
- virtual void fixupAlphaBeforeCompositing() { };
// Returns the color value at the specified location. This does not
// consider any transforms that may be set on the device.
diff --git a/skia/ext/bitmap_platform_device_win.cc b/skia/ext/bitmap_platform_device_win.cc
index 1b5c2eb..5702b55 100644
--- a/skia/ext/bitmap_platform_device_win.cc
+++ b/skia/ext/bitmap_platform_device_win.cc
@@ -11,33 +11,6 @@
namespace skia {
-// When Windows draws text, is sets the fourth byte (which Skia uses for alpha)
-// to zero. This means that if we try compositing with text that Windows has
-// drawn, we get invalid color values (if the alpha is 0, the other channels
-// should be 0 since Skia uses premultiplied colors) and strange results.
-//
-// HTML rendering only requires one bit of transparency. When you ask for a
-// semitransparent div, the div itself is drawn in another layer as completely
-// opaque, and then composited onto the lower layer with a transfer function.
-// The only place an alpha channel is needed is to track what has been drawn
-// and what has not been drawn.
-//
-// Therefore, when we allocate a new device, we fill it with this special
-// color. Because Skia uses premultiplied colors, any color where the alpha
-// channel is smaller than any component is impossible, so we know that no
-// legitimate drawing will produce this color. We use 1 as the alpha value
-// because 0 is produced when Windows draws text (even though it should be
-// opaque).
-//
-// When a layer is done and we want to render it to a lower layer, we use
-// fixupAlphaBeforeCompositing. This replaces all 0 alpha channels with
-// opaque (to fix the text problem), and replaces this magic color value
-// with transparency. The result is something that can be correctly
-// composited. However, once this has been done, no more can be drawn to
-// the layer because fixing the alphas *again* will result in incorrect
-// values.
-static const uint32_t kMagicTransparencyColor = 0x01FFFEFD;
-
namespace {
// Constrains position and size to fit within available_size. If |size| is -1,
@@ -67,36 +40,6 @@ bool Constrain(int available_size, int* position, int *size) {
return true;
}
-// If the pixel value is 0, it gets set to kMagicTransparencyColor.
-void PrepareAlphaForGDI(uint32_t* pixel) {
- if (*pixel == 0) {
- *pixel = kMagicTransparencyColor;
- }
-}
-
-// If the pixel value is kMagicTransparencyColor, it gets set to 0. Otherwise
-// if the alpha is 0, the alpha is set to 255.
-void PostProcessAlphaForGDI(uint32_t* pixel) {
- if (*pixel == kMagicTransparencyColor) {
- *pixel = 0;
- } else if ((*pixel & 0xFF000000) == 0) {
- *pixel |= 0xFF000000;
- }
-}
-
-// Sets the opacity of the specified value to 0xFF.
-void MakeOpaqueAlphaAdjuster(uint32_t* pixel) {
- *pixel |= 0xFF000000;
-}
-
-// See the declaration of kMagicTransparencyColor at the top of the file.
-void FixupAlphaBeforeCompositing(uint32_t* pixel) {
- if (*pixel == kMagicTransparencyColor)
- *pixel = 0;
- else
- *pixel |= 0xFF000000;
-}
-
} // namespace
class BitmapPlatformDeviceWin::BitmapPlatformDeviceWinData : public SkRefCnt {
@@ -280,10 +223,7 @@ BitmapPlatformDeviceWin* BitmapPlatformDeviceWin::create(
bitmap.eraseARGB(255, 0, 255, 128); // bright bluish green
#endif
} else {
- // A transparent layer is requested: fill with our magic "transparent"
- // color, see the declaration of kMagicTransparencyColor above
- sk_memset32(static_cast<uint32_t*>(data), kMagicTransparencyColor,
- width * height);
+ bitmap.eraseARGB(0, 0, 0, 0);
}
// The device object will take ownership of the HBITMAP. The initial refcount
@@ -387,56 +327,14 @@ void BitmapPlatformDeviceWin::drawToHDC(HDC dc, int x, int y,
data_->ReleaseBitmapDC();
}
-void BitmapPlatformDeviceWin::prepareForGDI(int x, int y, int width,
- int height) {
- processPixels<PrepareAlphaForGDI>(x, y, width, height);
-}
-
-void BitmapPlatformDeviceWin::postProcessGDI(int x, int y, int width,
- int height) {
- processPixels<PostProcessAlphaForGDI>(x, y, width, height);
-}
-
void BitmapPlatformDeviceWin::makeOpaque(int x, int y, int width, int height) {
- processPixels<MakeOpaqueAlphaAdjuster>(x, y, width, height);
-}
-
-void BitmapPlatformDeviceWin::fixupAlphaBeforeCompositing() {
- const SkBitmap& bitmap = accessBitmap(true);
- SkAutoLockPixels lock(bitmap);
- uint32_t* data = bitmap.getAddr32(0, 0);
-
- size_t words = bitmap.rowBytes() / sizeof(uint32_t) * bitmap.height();
- for (size_t i = 0; i < words; i++) {
- if (data[i] == kMagicTransparencyColor)
- data[i] = 0;
- else
- data[i] |= 0xFF000000;
- }
-}
-
-// Returns the color value at the specified location.
-SkColor BitmapPlatformDeviceWin::getColorAt(int x, int y) {
- const SkBitmap& bitmap = accessBitmap(false);
- SkAutoLockPixels lock(bitmap);
- uint32_t* data = bitmap.getAddr32(0, 0);
- return static_cast<SkColor>(data[x + y * width()]);
-}
-
-void BitmapPlatformDeviceWin::onAccessBitmap(SkBitmap* bitmap) {
- // FIXME(brettw) OPTIMIZATION: We should only flush if we know a GDI
- // operation has occurred on our DC.
- if (data_->IsBitmapDCCreated())
- GdiFlush();
-}
-
-template<BitmapPlatformDeviceWin::adjustAlpha adjustor>
-void BitmapPlatformDeviceWin::processPixels(int x,
- int y,
- int width,
- int height) {
const SkBitmap& bitmap = accessBitmap(true);
SkASSERT(bitmap.config() == SkBitmap::kARGB_8888_Config);
+
+ // FIXME(brettw): This is kind of lame, we shouldn't be dealing with
+ // transforms at this level. Probably there should be a PlatformCanvas
+ // function that does the transform (using the actual transform not just the
+ // translation) and calls us with the transformed rect.
const SkMatrix& matrix = data_->transform();
int bitmap_start_x = SkScalarRound(matrix.getTranslateX()) + x;
int bitmap_start_y = SkScalarRound(matrix.getTranslateY()) + y;
@@ -450,13 +348,27 @@ void BitmapPlatformDeviceWin::processPixels(int x,
uint32_t* data = bitmap.getAddr32(0, 0) + (bitmap_start_y * row_words) +
bitmap_start_x;
for (int i = 0; i < height; i++) {
- for (int j = 0; j < width; j++) {
- adjustor(data + j);
- }
+ for (int j = 0; j < width; j++)
+ data[j] |= (0xFF << SK_A32_SHIFT);
data += row_words;
}
}
}
+// Returns the color value at the specified location.
+SkColor BitmapPlatformDeviceWin::getColorAt(int x, int y) {
+ const SkBitmap& bitmap = accessBitmap(false);
+ SkAutoLockPixels lock(bitmap);
+ uint32_t* data = bitmap.getAddr32(0, 0);
+ return static_cast<SkColor>(data[x + y * width()]);
+}
+
+void BitmapPlatformDeviceWin::onAccessBitmap(SkBitmap* bitmap) {
+ // FIXME(brettw) OPTIMIZATION: We should only flush if we know a GDI
+ // operation has occurred on our DC.
+ if (data_->IsBitmapDCCreated())
+ GdiFlush();
+}
+
} // namespace skia
diff --git a/skia/ext/bitmap_platform_device_win.h b/skia/ext/bitmap_platform_device_win.h
index f6e456d..428441d 100644
--- a/skia/ext/bitmap_platform_device_win.h
+++ b/skia/ext/bitmap_platform_device_win.h
@@ -61,10 +61,7 @@ class BitmapPlatformDeviceWin : public PlatformDeviceWin {
virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region);
virtual void drawToHDC(HDC dc, int x, int y, const RECT* src_rect);
- virtual void prepareForGDI(int x, int y, int width, int height);
- virtual void postProcessGDI(int x, int y, int width, int height);
virtual void makeOpaque(int x, int y, int width, int height);
- virtual void fixupAlphaBeforeCompositing();
virtual bool IsVectorial() { return false; }
// Returns the color value at the specified location. This does not
@@ -78,10 +75,6 @@ class BitmapPlatformDeviceWin : public PlatformDeviceWin {
virtual void onAccessBitmap(SkBitmap* bitmap);
private:
- // Function pointer used by the processPixels method for setting the alpha
- // value of a particular pixel.
- typedef void (*adjustAlpha)(uint32_t* pixel);
-
// Reference counted data that can be shared between multiple devices. This
// allows copy constructors and operator= for devices to work properly. The
// bitmaps used by the base device class are already refcounted and copyable.
@@ -91,15 +84,6 @@ class BitmapPlatformDeviceWin : public PlatformDeviceWin {
BitmapPlatformDeviceWin(BitmapPlatformDeviceWinData* data,
const SkBitmap& bitmap);
- // Loops through each of the pixels in the specified range, invoking
- // adjustor for the alpha value of each pixel. If |width| or |height| are -1,
- // the available width/height is used.
- template<adjustAlpha adjustor>
- void processPixels(int x,
- int y,
- int width,
- int height);
-
// Data associated with this device, guaranteed non-null. We hold a reference
// to this object.
BitmapPlatformDeviceWinData* data_;
diff --git a/skia/ext/platform_canvas_unittest.cc b/skia/ext/platform_canvas_unittest.cc
index e1f1eee..426591b 100644
--- a/skia/ext/platform_canvas_unittest.cc
+++ b/skia/ext/platform_canvas_unittest.cc
@@ -116,9 +116,6 @@ class LayerSaver {
}
~LayerSaver() {
-#if defined(OS_WIN)
- canvas_.getTopPlatformDevice().fixupAlphaBeforeCompositing();
-#endif
canvas_.restore();
}
@@ -177,9 +174,6 @@ TEST(PlatformCanvas, ClipRegion) {
// with a black rectangle.
// Note: Don't use LayerSaver, since internally it sets a clip region.
DrawNativeRect(canvas, 0, 0, 16, 16);
-#if defined(OS_WIN)
- canvas.getTopPlatformDevice().fixupAlphaBeforeCompositing();
-#endif
EXPECT_TRUE(VerifyCanvasColor(canvas, SK_ColorBLACK));
// Test that intersecting disjoint clip rectangles sets an empty clip region
diff --git a/skia/ext/platform_device_mac.cc b/skia/ext/platform_device_mac.cc
index 6722105..0b09b9e 100755
--- a/skia/ext/platform_device_mac.cc
+++ b/skia/ext/platform_device_mac.cc
@@ -33,21 +33,12 @@ bool constrain(int available_size, int* position, int *size) {
return false;
}
-// Sets the opacity of the specified value to 0xFF.
-void makeOpaqueAlphaAdjuster(uint32_t* pixel) {
- *pixel |= 0xFF000000;
-}
-
} // namespace
PlatformDeviceMac::PlatformDeviceMac(const SkBitmap& bitmap)
: SkDevice(bitmap) {
}
-void PlatformDeviceMac::makeOpaque(int x, int y, int width, int height) {
- processPixels(x, y, width, height, makeOpaqueAlphaAdjuster);
-}
-
// Set up the CGContextRef for peaceful coexistence with Skia
void PlatformDeviceMac::InitializeCGContext(CGContextRef context) {
// CG defaults to the same settings as Skia
diff --git a/skia/ext/platform_device_mac.h b/skia/ext/platform_device_mac.h
index dbfed5c..b2136af 100755
--- a/skia/ext/platform_device_mac.h
+++ b/skia/ext/platform_device_mac.h
@@ -35,18 +35,9 @@ class PlatformDeviceMac : public SkDevice {
virtual void DrawToContext(CGContextRef context, int x, int y,
const CGRect* src_rect) = 0;
- // Sets the opacity of each pixel in the specified region to be opaque.
- void makeOpaque(int x, int y, int width, int height);
-
// Returns if the preferred rendering engine is vectorial or bitmap based.
virtual bool IsVectorial() = 0;
- // On platforms where the native rendering API does not support rendering
- // into bitmaps with a premultiplied alpha channel, this call is responsible
- // for doing any fixup necessary. It is not used on the Mac, since
- // CoreGraphics can handle premultiplied alpha just fine.
- virtual void fixupAlphaBeforeCompositing() = 0;
-
// Initializes the default settings and colors in a device context.
static void InitializeCGContext(CGContextRef context);
diff --git a/skia/ext/platform_device_win.h b/skia/ext/platform_device_win.h
index 506bd6a..75319bb 100644
--- a/skia/ext/platform_device_win.h
+++ b/skia/ext/platform_device_win.h
@@ -36,29 +36,9 @@ class PlatformDeviceWin : public SkDevice {
// source device will be copied.
virtual void drawToHDC(HDC dc, int x, int y, const RECT* src_rect) = 0;
- // Invoke before using GDI functions. See description in platform_device.cc
- // for specifics.
- // NOTE: x,y,width and height are relative to the current transform.
- virtual void prepareForGDI(int x, int y, int width, int height) { }
-
- // Invoke after using GDI functions. See description in platform_device.cc
- // for specifics.
- // NOTE: x,y,width and height are relative to the current transform.
- virtual void postProcessGDI(int x, int y, int width, int height) { }
-
// Sets the opacity of each pixel in the specified region to be opaque.
virtual void makeOpaque(int x, int y, int width, int height) { }
- // Call this function to fix the alpha channels before compositing this layer
- // onto another. Internally, the device uses a special alpha method to work
- // around problems with Windows. This call will put the values into what
- // Skia expects, so it can be composited onto other layers.
- //
- // After this call, no more drawing can be done because the
- // alpha channels will be "correct", which, if this function is called again
- // will make them wrong. See the implementation for more discussion.
- virtual void fixupAlphaBeforeCompositing() { }
-
// Returns if the preferred rendering engine is vectorial or bitmap based.
virtual bool IsVectorial() = 0;
diff --git a/webkit/build/WebCore/WebCore.vcproj b/webkit/build/WebCore/WebCore.vcproj
index c719575..258c468 100644
--- a/webkit/build/WebCore/WebCore.vcproj
+++ b/webkit/build/WebCore/WebCore.vcproj
@@ -1667,11 +1667,11 @@
>
</File>
<File
- RelativePath="..\..\..\third_party\WebKit\WebCore\platform\graphics\chromium\ThemeHelperChromiumWin.cpp"
+ RelativePath="..\..\..\third_party\WebKit\WebCore\platform\graphics\chromium\TransparencyWin.cpp"
>
</File>
<File
- RelativePath="..\..\..\third_party\WebKit\WebCore\platform\graphics\chromium\ThemeHelperChromiumWin.h"
+ RelativePath="..\..\..\third_party\WebKit\WebCore\platform\graphics\chromium\TransparencyWin.h"
>
</File>
<File
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.checksum
index 587742a..3214293 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.checksum
@@ -1 +1 @@
-effc98b8f69984d94d4bbd3adc50cbd2 \ No newline at end of file
+4aea2b950b03e4d270e930e72c5921c3 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.png
index 80ba556..383c589 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/backgrounds/svg-as-background-5-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/backgrounds/svg-as-background-5-expected.checksum
index e105ed2..c7e67e8 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/backgrounds/svg-as-background-5-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/backgrounds/svg-as-background-5-expected.checksum
@@ -1 +1 @@
-80458a31f057e4d9992d0a15b2cce199 \ No newline at end of file
+310586748ca51ea34cafa325c624c489 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/backgrounds/svg-as-background-5-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/backgrounds/svg-as-background-5-expected.png
index 754a72c..5401430 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/backgrounds/svg-as-background-5-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/backgrounds/svg-as-background-5-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-01-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-01-expected.checksum
index b5f29f2..39a3bc9 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-01-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-01-expected.checksum
@@ -1 +1 @@
-b865d2544378e35362b683bd74813b1d \ No newline at end of file
+a43feb17ebc208d53232a0b66d83ebbf \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-01-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-01-expected.png
index 9bd9b1b..a6bcef8 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-01-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-01-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-rotate-transform-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-rotate-transform-expected.checksum
index 6da4ecf..20df63d 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-rotate-transform-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-rotate-transform-expected.checksum
@@ -1 +1 @@
-7cd050852e2bf5c80c0c9490723a9882 \ No newline at end of file
+9f20039b8bb867165f27d3c761562557 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-rotate-transform-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-rotate-transform-expected.png
index 034388d..07cc3ea 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-rotate-transform-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-rotate-transform-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-scale-transform-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-scale-transform-expected.checksum
index 5ff4230..53f8bc8 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-scale-transform-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-scale-transform-expected.checksum
@@ -1 +1 @@
-c5582fddeeb6211fc5cc9c466ee6ea28 \ No newline at end of file
+228dd38d7393aa6d0a18b5744124b50e \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-scale-transform-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-scale-transform-expected.png
index f6a3ecc..2d61110 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-scale-transform-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-scale-transform-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/canvas/canvas-text-alignment-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/canvas/canvas-text-alignment-expected.checksum
index 26e85c6..f988353 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/canvas/canvas-text-alignment-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/canvas/canvas-text-alignment-expected.checksum
@@ -1 +1 @@
-31bf3a66560d91a19c85ffc0d57fbb95 \ No newline at end of file
+3ad8137bac9f92ee564e84104d03b586 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/canvas/canvas-text-alignment-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/canvas/canvas-text-alignment-expected.png
index 58c9767..0026303 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/canvas/canvas-text-alignment-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/canvas/canvas-text-alignment-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/clip/nestedTransparencyClip-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/clip/nestedTransparencyClip-expected.checksum
index 9752200..6bb9911 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/clip/nestedTransparencyClip-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/clip/nestedTransparencyClip-expected.checksum
@@ -1 +1 @@
-efec041dccaa0ece262e9f939cbe9422 \ No newline at end of file
+3c121bae1d7d4ac6b3e390eab9c61674 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/clip/nestedTransparencyClip-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/clip/nestedTransparencyClip-expected.png
index 20abe57..34c2730 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/clip/nestedTransparencyClip-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/clip/nestedTransparencyClip-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/css/resize-corner-tracking-transformed-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/css/resize-corner-tracking-transformed-expected.checksum
index 3fd0f29..caf1fdf 100755
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/css/resize-corner-tracking-transformed-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/css/resize-corner-tracking-transformed-expected.checksum
@@ -1 +1 @@
-f524c01d70124c24f5f798737fb46c12 \ No newline at end of file
+c562eddeb6da19529b5941bef6bfe421 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/css/resize-corner-tracking-transformed-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/css/resize-corner-tracking-transformed-expected.png
index 118479e..5776e87 100755
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/css/resize-corner-tracking-transformed-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/css/resize-corner-tracking-transformed-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/dom/anchor-toString-expected.txt b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/dom/anchor-toString-expected.txt
index e51cf7c..2522aaf 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/dom/anchor-toString-expected.txt
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/dom/anchor-toString-expected.txt
@@ -1,7 +1,7 @@
A link!
-Writing just the anchor object - file:///C:/sometestfile.html
+Writing just the anchor object - file:///Q:/sometestfile.html
-Writing the result of the String(anchor) - file:///C:/sometestfile.html
+Writing the result of the String(anchor) - file:///Q:/sometestfile.html
-Writing the result of the anchor's toString() method - file:///C:/sometestfile.html
+Writing the result of the anchor's toString() method - file:///Q:/sometestfile.html
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/forms/input-appearance-height-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/forms/input-appearance-height-expected.checksum
index a97c8a9..0a4a16f 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/forms/input-appearance-height-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/forms/input-appearance-height-expected.checksum
@@ -1 +1 @@
-d7687cb6602801a4e6549bb0f36754b8 \ No newline at end of file
+bd64358778cd7ae6d26f14e6cfa44ad5 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/forms/input-appearance-height-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/forms/input-appearance-height-expected.png
index 2bf21b0..1763fb1 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/forms/input-appearance-height-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/forms/input-appearance-height-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/reflections/reflection-direction-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/reflections/reflection-direction-expected.checksum
index 363970b..b666baf 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/reflections/reflection-direction-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/reflections/reflection-direction-expected.checksum
@@ -1 +1 @@
-557d5da11bb19215c50723caa8b66554 \ No newline at end of file
+0938d024494ecc574e29a65e06b4bb93 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/reflections/reflection-direction-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/reflections/reflection-direction-expected.png
index 5c43186..66ddd0c 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/reflections/reflection-direction-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/reflections/reflection-direction-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-h-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-h-expected.checksum
index ed26478..0f6fa4e 100755
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-h-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-h-expected.checksum
@@ -1 +1 @@
-788d5f8948ad4805e4650517c3d647ea \ No newline at end of file
+9a5126e1d60bbcaf361d296aea3408ea \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-h-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-h-expected.png
index 90fbfcb..9557e2c 100755
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-h-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-h-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-v-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-v-expected.checksum
index ed26478..0f6fa4e 100755
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-v-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-v-expected.checksum
@@ -1 +1 @@
-788d5f8948ad4805e4650517c3d647ea \ No newline at end of file
+9a5126e1d60bbcaf361d296aea3408ea \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-v-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-v-expected.png
index 90fbfcb..9557e2c 100755
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-v-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-v-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/replaced/001-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/replaced/001-expected.checksum
index 6d63fdc..27d7780 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/replaced/001-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/replaced/001-expected.checksum
@@ -1 +1 @@
-20f4583d4cb89cfb84b1451a49ba010f \ No newline at end of file
+69f794de706a5a10c3c6613e1b446be6 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/replaced/001-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/replaced/001-expected.png
index c4e6546..362d24e 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/replaced/001-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/replaced/001-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/replaced/002-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/replaced/002-expected.checksum
index 03e76ec..e86b85f 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/replaced/002-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/replaced/002-expected.checksum
@@ -1 +1 @@
-fcad0a9ab6b6aa33ccc63555979cc35d \ No newline at end of file
+22a71c3796cc02e12337cfaab00dcbc7 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/replaced/002-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/replaced/002-expected.png
index 36cabf0..6913477 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/replaced/002-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/replaced/002-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/replaced/003-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/replaced/003-expected.checksum
index 03e76ec..e86b85f 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/replaced/003-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/replaced/003-expected.checksum
@@ -1 +1 @@
-fcad0a9ab6b6aa33ccc63555979cc35d \ No newline at end of file
+22a71c3796cc02e12337cfaab00dcbc7 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/replaced/003-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/replaced/003-expected.png
index 36cabf0..6913477 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/replaced/003-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/replaced/003-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/international/complex-character-based-fallback-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/international/complex-character-based-fallback-expected.checksum
index 0eff8bd..ecc5b2e 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/international/complex-character-based-fallback-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/international/complex-character-based-fallback-expected.checksum
@@ -1 +1 @@
-6e4e4be490cbadfd72f5da0fb1b491ab \ No newline at end of file
+81251c2998893050296f88060123096f \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/international/complex-character-based-fallback-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/international/complex-character-based-fallback-expected.png
index 45ae280..c7d919e 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/international/complex-character-based-fallback-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/international/complex-character-based-fallback-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/international/hindi-spacing-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/international/hindi-spacing-expected.checksum
index ff193a8..accd096e 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/international/hindi-spacing-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/international/hindi-spacing-expected.checksum
@@ -1 +1 @@
-a444ecbde6fe5789c7e1a6ca4ae281ec \ No newline at end of file
+f5781ebc607b5ebb50b19a10a899a742 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/international/hindi-spacing-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/international/hindi-spacing-expected.png
index f32631f..1d32d68 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/international/hindi-spacing-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/international/hindi-spacing-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/international/thai-line-breaks-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/international/thai-line-breaks-expected.checksum
index 9208c7c..628759b 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/international/thai-line-breaks-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/international/thai-line-breaks-expected.checksum
@@ -1 +1 @@
-ed0cde2466a186d222db8c479949e316 \ No newline at end of file
+7b526c5b970b4b8f5d62dc499e465a73 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/international/thai-line-breaks-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/international/thai-line-breaks-expected.png
index ca4e4a6..d3a0a7e 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/international/thai-line-breaks-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/international/thai-line-breaks-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transform-on-inline-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transform-on-inline-expected.checksum
index 2095c7a..82a8271 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transform-on-inline-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transform-on-inline-expected.checksum
@@ -1 +1 @@
-58ff301052507cb09137e9dcb89034de \ No newline at end of file
+9f8b0ca6c9372b22b6f497afd0326faf \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transform-on-inline-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transform-on-inline-expected.png
index 2b06ff1..fd79a96 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transform-on-inline-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transform-on-inline-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transform-table-row-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transform-table-row-expected.checksum
index 8b6c334..6034536 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transform-table-row-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transform-table-row-expected.checksum
@@ -1 +1 @@
-b4a3e35cdedf903787e3d458991d3560 \ No newline at end of file
+f3fdd0ac5c6d1731675d1da855bd56ba \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transform-table-row-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transform-table-row-expected.png
index 82adc3f..1c24d86 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transform-table-row-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transform-table-row-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transformed-focused-text-input-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transformed-focused-text-input-expected.checksum
index 4949f37..334783f 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transformed-focused-text-input-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transformed-focused-text-input-expected.checksum
@@ -1 +1 @@
-926ec8e88ceb8f06263c9d5611820113 \ No newline at end of file
+5bf31adb3739827220f6b1e01cba17e3 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transformed-focused-text-input-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transformed-focused-text-input-expected.png
index c5bcda4..45f890c 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transformed-focused-text-input-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transformed-focused-text-input-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/animate-elem-30-t-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/animate-elem-30-t-expected.checksum
index f779bda..25990c6 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/animate-elem-30-t-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/animate-elem-30-t-expected.checksum
@@ -1 +1 @@
-a1fbecfe8c7a39d948637921d1847803 \ No newline at end of file
+9ae35e8f903babb2fd354b8593cfc3b7 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/animate-elem-30-t-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/animate-elem-30-t-expected.png
index d2a42eb..bac4212 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/animate-elem-30-t-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/animate-elem-30-t-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/filters-blend-01-b-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/filters-blend-01-b-expected.checksum
index b9c0f6f..94d0a86 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/filters-blend-01-b-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/filters-blend-01-b-expected.checksum
@@ -1 +1 @@
-dd3ab307b431d897d735cb7aa5a6f2d1 \ No newline at end of file
+9e84e542274367f65adc09846d4c9b32 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/filters-blend-01-b-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/filters-blend-01-b-expected.png
index d6991c5..722d5e0 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/filters-blend-01-b-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/filters-blend-01-b-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/masking-opacity-01-b-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/masking-opacity-01-b-expected.checksum
index 78662d4..133acce 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/masking-opacity-01-b-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/masking-opacity-01-b-expected.checksum
@@ -1 +1 @@
-8edb7e6de0b6f8f7b62868b8987e5456 \ No newline at end of file
+843774840eb13b07a055d34e6cf5da05 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/masking-opacity-01-b-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/masking-opacity-01-b-expected.png
index a55c07a..3a0404f 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/masking-opacity-01-b-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/masking-opacity-01-b-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/render-groups-01-b-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/render-groups-01-b-expected.checksum
index a6cc57d..7677641 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/render-groups-01-b-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/render-groups-01-b-expected.checksum
@@ -1 +1 @@
-e84445c4a9087f98dfc23de305672998 \ No newline at end of file
+c2d0e8ddc6fdcf829956136f22eefaa1 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/render-groups-01-b-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/render-groups-01-b-expected.png
index 686ea57..d575e66 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/render-groups-01-b-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/render-groups-01-b-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/render-groups-03-t-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/render-groups-03-t-expected.checksum
index 138454d8..12e4ee7 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/render-groups-03-t-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/render-groups-03-t-expected.checksum
@@ -1 +1 @@
-7bd735e3d5e0f2de0667dbf8587d4f9e \ No newline at end of file
+689c478372398ac6d53146e8ec00c9ec \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/render-groups-03-t-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/render-groups-03-t-expected.png
index 5be4c39..b5c7b3d 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/render-groups-03-t-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/render-groups-03-t-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/text-text-08-b-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/text-text-08-b-expected.checksum
index 492359c..ce86518 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/text-text-08-b-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/text-text-08-b-expected.checksum
@@ -1 +1 @@
-17094bf9dc2591e62aa4b504fdd90b96 \ No newline at end of file
+1cc1ec7c1489d77d1c54c9c0600e0f39 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/text-text-08-b-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/text-text-08-b-expected.png
index f4e3e57..e1765fc 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/text-text-08-b-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/text-text-08-b-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/batik/text/textFeatures-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/batik/text/textFeatures-expected.checksum
index de42d14..51c4dee 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/batik/text/textFeatures-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/batik/text/textFeatures-expected.checksum
@@ -1 +1 @@
-eb71e927a36bf6563ea0e420527ee947 \ No newline at end of file
+6808f57a3a2f8a7f7f5629e3d56b31ed \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/batik/text/textFeatures-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/batik/text/textFeatures-expected.png
index 017797e..806b999 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/batik/text/textFeatures-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/batik/text/textFeatures-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/carto.net/scrollbar-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/carto.net/scrollbar-expected.checksum
index a4ff4fa..f60f2f2 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/carto.net/scrollbar-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/carto.net/scrollbar-expected.checksum
@@ -1 +1 @@
-4437d531e86dae8cfabd72a157711658 \ No newline at end of file
+2457bbddfed046e77c678d52d7c3c1c2 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/carto.net/scrollbar-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/carto.net/scrollbar-expected.png
index bf30694..539d351 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/carto.net/scrollbar-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/carto.net/scrollbar-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/foreign-object-skew-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/foreign-object-skew-expected.checksum
index 4ca5089..64d08cc 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/foreign-object-skew-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/foreign-object-skew-expected.checksum
@@ -1 +1 @@
-b3d69493feec1ef53f321337349c1a79 \ No newline at end of file
+de3e2be5b5a3fe8d76c8ffddf7f5c43d \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/foreign-object-skew-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/foreign-object-skew-expected.png
index 62b4336..d3144dd 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/foreign-object-skew-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/foreign-object-skew-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/js-update-bounce-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/js-update-bounce-expected.checksum
index de05ded..18e8659 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/js-update-bounce-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/js-update-bounce-expected.checksum
@@ -1 +1 @@
-de6287c911aa19dd0b77cd0adf8f863b \ No newline at end of file
+271bf2fa73b1a3cadf3c3de2d05311af \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/js-update-bounce-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/js-update-bounce-expected.png
index 8a26237..7075d92 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/js-update-bounce-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/js-update-bounce-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.checksum
index 410b8f4..f8c4d79 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.checksum
@@ -1 +1 @@
-876162c06f3d087eec3cbb089e3034d3 \ No newline at end of file
+281ccf2a0918f1ed40a36c8267d87bbe \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.png
index 7239de7c..1406161 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-instanceRoot-modifications-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-instanceRoot-modifications-expected.checksum
index babd0a7..ccdea09 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-instanceRoot-modifications-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-instanceRoot-modifications-expected.checksum
@@ -1 +1 @@
-66fccf56277166db86e73933ebbfe05a \ No newline at end of file
+d0f58ddf19785ebf8f141f51ea89c4c6 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-instanceRoot-modifications-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-instanceRoot-modifications-expected.png
index 4aaf343..2b3a64b 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-instanceRoot-modifications-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-instanceRoot-modifications-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-modify-container-in-target-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-modify-container-in-target-expected.checksum
index 9be02d3..d7d2c24 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-modify-container-in-target-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-modify-container-in-target-expected.checksum
@@ -1 +1 @@
-9887e0e0670a18f809e46a5a5128ea70 \ No newline at end of file
+57c10a66cd0e69b99083e9c3c115e243 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-modify-container-in-target-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-modify-container-in-target-expected.png
index 26bb798..e4d3458 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-modify-container-in-target-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-modify-container-in-target-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-modify-target-container-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-modify-target-container-expected.checksum
index 8238ec0..77de29b 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-modify-target-container-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-modify-target-container-expected.checksum
@@ -1 +1 @@
-9fb3a1eb5a0ff0195b7f5379585b693f \ No newline at end of file
+0174f66ffedeabcad832af21d7d51343 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-modify-target-container-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-modify-target-container-expected.png
index 0551507..67dbdf4 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-modify-target-container-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-modify-target-container-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-g-containing-use-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-g-containing-use-expected.checksum
index 0e7cc54..2d1409c 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-g-containing-use-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-g-containing-use-expected.checksum
@@ -1 +1 @@
-ace3408c5dd749e2187afc247a78dbe6 \ No newline at end of file
+03140d6295deabaeae5511b51802032f \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-g-containing-use-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-g-containing-use-expected.png
index 18e830d..fd8813d0 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-g-containing-use-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-g-containing-use-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-g-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-g-expected.checksum
index 284c58b..4eb6065 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-g-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-g-expected.checksum
@@ -1 +1 @@
-778f65ba5ba66301266a76b64ced26fe \ No newline at end of file
+efa4e5ebed4dc0d6866d5d59c22513c8 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-g-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-g-expected.png
index fb22521..355cf81 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-g-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-g-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-use-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-use-expected.checksum
index 284c58b..4eb6065 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-use-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-use-expected.checksum
@@ -1 +1 @@
-778f65ba5ba66301266a76b64ced26fe \ No newline at end of file
+efa4e5ebed4dc0d6866d5d59c22513c8 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-use-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-use-expected.png
index fb22521..355cf81 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-use-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-use-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-transform-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-transform-expected.checksum
index 81ba272..f2f0fa8 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-transform-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-transform-expected.checksum
@@ -1 +1 @@
-0539e864d70a9dd6f2c8e3b5b2c78605 \ No newline at end of file
+e68cf222b6279b49eec951dadc1066c2 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-transform-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-transform-expected.png
index 55b6f14..bd69280 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-transform-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-transform-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug12910-2-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug12910-2-expected.checksum
index b9ff6eb..a15b076 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug12910-2-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug12910-2-expected.checksum
@@ -1 +1 @@
-c69e65e17fcbb875674fa5db83df1e48 \ No newline at end of file
+dfd1bf8661a1fe20eb59b2a7e3293ed1 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug12910-2-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug12910-2-expected.png
index d55fda0..4405ab9 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug12910-2-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug12910-2-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug1296-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug1296-expected.checksum
index b190d09..884498e 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug1296-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug1296-expected.checksum
@@ -1 +1 @@
-6304925f6663e1d5f395742552b41c05 \ No newline at end of file
+c07f1c2b52d545e41e9c9605cb555cbd \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug1296-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug1296-expected.png
index 1b926c9..fc04fba 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug1296-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug1296-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug137388-2-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug137388-2-expected.checksum
index 1f0110b..31df05f3 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug137388-2-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug137388-2-expected.checksum
@@ -1 +1 @@
-49b45cd510a5851a32402c2d4084c52b \ No newline at end of file
+b07f17df31a34a4ff12d6ab8397d53a1 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug137388-2-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug137388-2-expected.png
index 1fdfee3..f1d4934 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug137388-2-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug137388-2-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug1430-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug1430-expected.checksum
index da8e796..9042b70 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug1430-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug1430-expected.checksum
@@ -1 +1 @@
-94f346893983e714cdb4c357295b13d4 \ No newline at end of file
+f5a48539127483876d655c1261358157 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug1430-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug1430-expected.png
index 4ced76e..6a964ab 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug1430-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug1430-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug4093-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug4093-expected.checksum
index 7af6579..f0a151b 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug4093-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug4093-expected.checksum
@@ -1 +1 @@
-86fa41db975800957786b44ab9ce270a \ No newline at end of file
+33e364975c4fa5c511841d9e2561f9ee \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug4093-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug4093-expected.png
index c8e75fb..eb6a2c8 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug4093-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug4093-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug4427-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug4427-expected.checksum
index 7c45f80..80ca455 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug4427-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug4427-expected.checksum
@@ -1 +1 @@
-219c95bd0ee7199246c743543b8bcbcd \ No newline at end of file
+df259d0285942752f60656754bec5894 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug4427-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug4427-expected.png
index 3e7b2a6..d220021 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug4427-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug4427-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug4523-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug4523-expected.checksum
index c617a70..dec3cb6 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug4523-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug4523-expected.checksum
@@ -1 +1 @@
-535451fe912ddd624f3097a55e022c6d \ No newline at end of file
+bbce254b780f56780423f6309dd9321d \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug4523-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug4523-expected.png
index 18fa4cf..509335f 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug4523-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug4523-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug625-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug625-expected.checksum
index f730b5c..1342c5d 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug625-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug625-expected.checksum
@@ -1 +1 @@
-6a105840a8e5a1c91db9793e7cbca728 \ No newline at end of file
+16ca5725dea90bbf2ddc5beea3ffa7de \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug625-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug625-expected.png
index 059251d..24df307 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug625-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/bugs/bug625-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/core/bloomberg-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/core/bloomberg-expected.checksum
index dac5338..678972b 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/core/bloomberg-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/core/bloomberg-expected.checksum
@@ -1 +1 @@
-80850307f022be3ebeab7d869ccd25b3 \ No newline at end of file
+d02cd8a25cf905ed2a4455fd0b8ef693 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/core/bloomberg-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/core/bloomberg-expected.png
index dc79926..e26a343 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/core/bloomberg-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla/core/bloomberg-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla_expected_failures/bugs/bug1647-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla_expected_failures/bugs/bug1647-expected.checksum
index e3d7690..517bd4a 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla_expected_failures/bugs/bug1647-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla_expected_failures/bugs/bug1647-expected.checksum
@@ -1 +1 @@
-6fbaa69aaf6fd84790710a90160035ca \ No newline at end of file
+6064ebe793d3ef48ffdc44ae47bbf683 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla_expected_failures/bugs/bug1647-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla_expected_failures/bugs/bug1647-expected.png
index f1df616..72abf8d 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla_expected_failures/bugs/bug1647-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/tables/mozilla_expected_failures/bugs/bug1647-expected.png
Binary files differ
diff --git a/webkit/glue/webframe_impl.cc b/webkit/glue/webframe_impl.cc
index a2ecb7e..63b47a8 100644
--- a/webkit/glue/webframe_impl.cc
+++ b/webkit/glue/webframe_impl.cc
@@ -1490,10 +1490,6 @@ bool WebFrameImpl::CaptureImage(scoped_ptr<skia::BitmapPlatformDevice>* image,
skia::BitmapPlatformDevice& device =
static_cast<skia::BitmapPlatformDevice&>(canvas.getTopPlatformDevice());
-#if defined(OS_WIN)
- device.fixupAlphaBeforeCompositing();
-#endif
-
image->reset(new skia::BitmapPlatformDevice(device));
return true;
}
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index 66a9fc6..7cba160 100755
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -248,12 +248,18 @@ std::string TestShell::DumpImage(WebFrame* web_frame,
std::vector<unsigned char> png;
SkAutoLockPixels src_bmp_lock(src_bmp);
PNGEncoder::ColorFormat color_format = PNGEncoder::FORMAT_BGRA;
-#if defined(OS_WIN) || defined(OS_LINUX)
+
+ // Fix the alpha. The expected PNGs on Mac have an alpha channel, so we want
+ // to keep it. On Windows, the alpha channel is wrong since text/form control
+ // drawing may have erased it in a few places. So on Windows we force it to
+ // opaque and also don't write the alpha channel for the reference. Linux
+ // doesn't have the wrong alpha like Windows, but we ignore it anyway.
+#if defined(OS_WIN)
+ bool discard_transparency = true;
+ device->makeOpaque(0, 0, src_bmp.width(), src_bmp.height());
+#elif defined(OS_LINUX)
bool discard_transparency = true;
#elif defined(OS_MACOSX)
- // the expected PNGs in webkit have an alpha channel. We shouldn't discard
- // the transparency for reference purposes, though the hashes will still
- // match.
bool discard_transparency = false;
#endif
PNGEncoder::Encode(
diff --git a/webkit/tools/test_shell/test_shell_tests.vcproj b/webkit/tools/test_shell/test_shell_tests.vcproj
index 9e5c655..032e4da 100644
--- a/webkit/tools/test_shell/test_shell_tests.vcproj
+++ b/webkit/tools/test_shell/test_shell_tests.vcproj
@@ -403,6 +403,10 @@
>
</File>
<File
+ RelativePath="..\webcore_unit_tests\TransparencyWin_unittest.cpp"
+ >
+ </File>
+ <File
RelativePath="..\webcore_unit_tests\UniscribeHelper_unittest.cpp"
>
</File>
diff --git a/webkit/tools/webcore_unit_tests/TransparencyWin_unittest.cpp b/webkit/tools/webcore_unit_tests/TransparencyWin_unittest.cpp
new file mode 100644
index 0000000..46b955f
--- /dev/null
+++ b/webkit/tools/webcore_unit_tests/TransparencyWin_unittest.cpp
@@ -0,0 +1,679 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include <windows.h>
+
+#include "ImageBuffer.h"
+#include "TransformationMatrix.h"
+#include "TransparencyWin.h"
+
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace WebCore {
+
+static FloatRect RECTToFloatRect(const RECT* rect)
+{
+ return FloatRect(static_cast<float>(rect->left),
+ static_cast<float>(rect->top),
+ static_cast<float>(rect->right - rect->left),
+ static_cast<float>(rect->bottom - rect->top));
+}
+
+static void drawNativeRect(GraphicsContext* context,
+ int x, int y, int w, int h)
+{
+ skia::PlatformCanvas* canvas = context->platformContext()->canvas();
+ HDC dc = canvas->beginPlatformPaint();
+
+ RECT inner_rc;
+ inner_rc.left = x;
+ inner_rc.top = y;
+ inner_rc.right = x + w;
+ inner_rc.bottom = y + h;
+ FillRect(dc, &inner_rc,
+ reinterpret_cast<HBRUSH>(GetStockObject(BLACK_BRUSH)));
+
+ canvas->endPlatformPaint();
+}
+
+static Color getPixelAt(GraphicsContext* context, int x, int y)
+{
+ const SkBitmap& bitmap = context->platformContext()->canvas()->
+ getTopPlatformDevice().accessBitmap(false);
+ return Color(*reinterpret_cast<const RGBA32*>(bitmap.getAddr32(x, y)));
+}
+
+// Resets the top layer's alpha channel to 0 for each pixel. This simulates
+// Windows messing it up.
+static void clearTopLayerAlphaChannel(GraphicsContext* context)
+{
+ SkBitmap& bitmap = const_cast<SkBitmap&>(context->platformContext()->
+ canvas()->getTopPlatformDevice().accessBitmap(false));
+ for (int y = 0; y < bitmap.height(); y++) {
+ uint32_t* row = bitmap.getAddr32(0, y);
+ for (int x = 0; x < bitmap.width(); x++)
+ row[x] &= 0x00FFFFFF;
+ }
+}
+
+// Clears the alpha channel on the specified pixel.
+static void clearTopLayerAlphaPixel(GraphicsContext* context, int x, int y)
+{
+ SkBitmap& bitmap = const_cast<SkBitmap&>(context->platformContext()->
+ canvas()->getTopPlatformDevice().accessBitmap(false));
+ *bitmap.getAddr32(x, y) &= 0x00FFFFFF;
+}
+
+static std::ostream& operator<<(std::ostream& out, const Color& c)
+{
+ std::ios_base::fmtflags oldFlags = out.flags(std::ios_base::hex |
+ std::ios_base::showbase);
+ out << c.rgb();
+ out.flags(oldFlags);
+ return out;
+}
+
+TEST(TransparencyWin, NoLayer)
+{
+ std::auto_ptr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), false));
+
+ // KeepTransform
+ {
+ TransparencyWin helper;
+ helper.init(src->context(),
+ TransparencyWin::NoLayer,
+ TransparencyWin::KeepTransform,
+ IntRect(1, 1, 14, 12));
+
+ EXPECT_TRUE(src->context() == helper.context());
+ EXPECT_TRUE(IntSize(14, 12) == helper.m_layerSize);
+ EXPECT_TRUE(IntRect(1, 1, 14, 12) == helper.drawRect());
+ }
+
+ // Untransform is not allowed for NoLayer.
+
+ // ScaleTransform
+ src->context()->save();
+ src->context()->scale(FloatSize(2.0, 0.5));
+ {
+ TransparencyWin helper;
+ helper.init(src->context(),
+ TransparencyWin::NoLayer,
+ TransparencyWin::ScaleTransform,
+ IntRect(2, 2, 6, 6));
+
+ // The coordinate system should be based in the upper left of our box.
+ // It should be post-transformed.
+ EXPECT_TRUE(src->context() == helper.context());
+ EXPECT_TRUE(IntSize(12, 3) == helper.m_layerSize);
+ EXPECT_TRUE(IntRect(4, 1, 12, 3) == helper.drawRect());
+ }
+ src->context()->restore();
+}
+
+TEST(TransparencyWin, WhiteLayer)
+{
+ std::auto_ptr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), false));
+
+ // KeepTransform
+ {
+ TransparencyWin helper;
+ helper.init(src->context(),
+ TransparencyWin::WhiteLayer,
+ TransparencyWin::KeepTransform,
+ IntRect(1, 1, 14, 12));
+
+ EXPECT_TRUE(src->context() != helper.context());
+ EXPECT_TRUE(IntSize(14, 12) == helper.m_layerSize);
+ EXPECT_TRUE(IntRect(1, 1, 14, 12) == helper.drawRect());
+ }
+
+ // Untransform
+ {
+ TransparencyWin helper;
+ helper.init(src->context(),
+ TransparencyWin::WhiteLayer,
+ TransparencyWin::Untransform,
+ IntRect(1, 1, 14, 12));
+
+ EXPECT_TRUE(src->context() != helper.context());
+ EXPECT_TRUE(IntSize(14, 12) == helper.m_layerSize);
+ EXPECT_TRUE(IntRect(0, 0, 14, 12) == helper.drawRect());
+ }
+
+ // ScaleTransform
+ src->context()->save();
+ src->context()->scale(FloatSize(2.0, 0.5));
+ {
+ TransparencyWin helper;
+ helper.init(src->context(),
+ TransparencyWin::WhiteLayer,
+ TransparencyWin::ScaleTransform,
+ IntRect(2, 2, 6, 6));
+
+ // The coordinate system should be based in the upper left of our box.
+ // It should be post-transformed.
+ EXPECT_TRUE(src->context() != helper.context());
+ EXPECT_TRUE(IntSize(12, 3) == helper.m_layerSize);
+ EXPECT_TRUE(IntRect(0, 0, 12, 3) == helper.drawRect());
+ }
+ src->context()->restore();
+}
+
+TEST(TransparencyWin, TextComposite)
+{
+ std::auto_ptr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), false));
+
+ // KeepTransform is the only valid transform mode for TextComposite.
+ {
+ TransparencyWin helper;
+ helper.init(src->context(),
+ TransparencyWin::TextComposite,
+ TransparencyWin::KeepTransform,
+ IntRect(1, 1, 14, 12));
+
+ EXPECT_TRUE(src->context() != helper.context());
+ EXPECT_TRUE(IntSize(14, 12) == helper.m_layerSize);
+ EXPECT_TRUE(IntRect(1, 1, 14, 12) == helper.drawRect());
+ }
+}
+
+TEST(TransparencyWin, OpaqueCompositeLayer)
+{
+ std::auto_ptr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), false));
+
+ // KeepTransform
+ {
+ TransparencyWin helper;
+ helper.init(src->context(),
+ TransparencyWin::OpaqueCompositeLayer,
+ TransparencyWin::KeepTransform,
+ IntRect(1, 1, 14, 12));
+
+ EXPECT_TRUE(src->context() != helper.context());
+ EXPECT_TRUE(IntSize(14, 12) == helper.m_layerSize);
+ EXPECT_TRUE(IntRect(1, 1, 14, 12) == helper.drawRect());
+ }
+
+ // KeepTransform with scroll applied.
+ src->context()->save();
+ src->context()->translate(0, -1);
+ {
+ TransparencyWin helper;
+ helper.init(src->context(),
+ TransparencyWin::OpaqueCompositeLayer,
+ TransparencyWin::KeepTransform,
+ IntRect(1, 1, 14, 14));
+
+ EXPECT_TRUE(src->context() != helper.context());
+ EXPECT_TRUE(IntSize(14, 14) == helper.m_layerSize);
+ EXPECT_TRUE(IntRect(1, 1, 14, 14) == helper.drawRect());
+ }
+ src->context()->restore();
+
+ // Untransform
+ {
+ TransparencyWin helper;
+ helper.init(src->context(),
+ TransparencyWin::OpaqueCompositeLayer,
+ TransparencyWin::Untransform,
+ IntRect(1, 1, 14, 12));
+
+ EXPECT_TRUE(src->context() != helper.context());
+ EXPECT_TRUE(IntSize(14, 12) == helper.m_layerSize);
+ EXPECT_TRUE(IntRect(0, 0, 14, 12) == helper.drawRect());
+ }
+
+ // ScaleTransform
+ src->context()->save();
+ src->context()->scale(FloatSize(2.0, 0.5));
+ {
+ TransparencyWin helper;
+ helper.init(src->context(),
+ TransparencyWin::OpaqueCompositeLayer,
+ TransparencyWin::ScaleTransform,
+ IntRect(2, 2, 6, 6));
+
+ // The coordinate system should be based in the upper left of our box.
+ // It should be post-transformed.
+ EXPECT_TRUE(src->context() != helper.context());
+ EXPECT_TRUE(IntSize(12, 3) == helper.m_layerSize);
+ EXPECT_TRUE(IntRect(0, 0, 12, 3) == helper.drawRect());
+ }
+ src->context()->restore();
+}
+
+TEST(TransparencyWin, WhiteLayerPixelTest)
+{
+ // Make a total transparent buffer, and draw the white layer inset by 1 px.
+ std::auto_ptr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), false));
+
+ {
+ TransparencyWin helper;
+ helper.init(src->context(),
+ TransparencyWin::WhiteLayer,
+ TransparencyWin::KeepTransform,
+ IntRect(1, 1, 14, 14));
+
+ // Coordinates should be in the original space, not the layer.
+ drawNativeRect(helper.context(), 3, 3, 1, 1);
+ clearTopLayerAlphaChannel(helper.context());
+ }
+
+ // The final image should be transparent around the edges for 1 px, white
+ // in the middle, with (3,3) (what we drew above) being opaque black.
+ EXPECT_EQ(Color(Color::transparent), getPixelAt(src->context(), 0, 0));
+ EXPECT_EQ(Color(Color::white), getPixelAt(src->context(), 2, 2));
+ EXPECT_EQ(Color(Color::black), getPixelAt(src->context(), 3, 3));
+ EXPECT_EQ(Color(Color::white), getPixelAt(src->context(), 4, 4));
+}
+
+TEST(TransparencyWin, OpaqueCompositeLayerPixel)
+{
+ Color red(0xFFFF0000), darkRed(0xFFC00000);
+ Color green(0xFF00FF00);
+
+ // Make a red bottom layer, followed by a half green next layer @ 50%.
+ std::auto_ptr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), false));
+
+ FloatRect fullRect(0, 0, 16, 16);
+ src->context()->fillRect(fullRect, red);
+ src->context()->beginTransparencyLayer(0.5);
+ FloatRect rightHalf(8, 0, 8, 16);
+ src->context()->fillRect(rightHalf, green);
+
+ // Make a transparency layer inset by one pixel, and fill it inset by
+ // another pixel with 50% black.
+ {
+ TransparencyWin helper;
+ helper.init(src->context(),
+ TransparencyWin::OpaqueCompositeLayer,
+ TransparencyWin::KeepTransform,
+ IntRect(1, 1, 14, 14));
+
+ FloatRect inner(2, 2, 12, 12);
+ helper.context()->fillRect(inner, Color(0x7f000000));
+ // These coordinates are relative to the layer, whish is inset by 1x1
+ // pixels from the top left. So we're actually clearing (2, 2) and
+ // (13,13), which are the extreme corners of the black area (and which
+ // we check below).
+ clearTopLayerAlphaPixel(helper.context(), 1, 1);
+ clearTopLayerAlphaPixel(helper.context(), 12, 12);
+ }
+
+ // Finish the compositing.
+ src->context()->endTransparencyLayer();
+
+ // Check that we got the right values, it should be like the rectangle was
+ // drawn with half opacity even though the alpha channel got messed up.
+ EXPECT_EQ(red, getPixelAt(src->context(), 0, 0));
+ EXPECT_EQ(red, getPixelAt(src->context(), 1, 1));
+ EXPECT_EQ(darkRed, getPixelAt(src->context(), 2, 2));
+
+ // The dark result is:
+ // (black @ 50% atop green) @ 50% atop red = 0xFF804000
+ // which is 0xFFA02000 (Skia computes 0xFFA11F00 due to rounding).
+ Color darkGreenRed(0xFF813f00);
+ EXPECT_EQ(darkGreenRed, getPixelAt(src->context(), 13, 13));
+
+ // 50% green on top of red = FF808000 (rounded to what Skia will produce).
+ Color greenRed(0xFF817E00);
+ EXPECT_EQ(greenRed, getPixelAt(src->context(), 14, 14));
+ EXPECT_EQ(greenRed, getPixelAt(src->context(), 15, 15));
+}
+
+// Tests that translations are properly handled when using KeepTransform.
+TEST(TransparencyWin, TranslateOpaqueCompositeLayer)
+{
+ // Fill with white.
+ std::auto_ptr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), false));
+ Color white(0xFFFFFFFF);
+ FloatRect fullRect(0, 0, 16, 16);
+ src->context()->fillRect(fullRect, white);
+
+ // Scroll down by 8 (coordinate system goes up).
+ src->context()->save();
+ src->context()->translate(0, -8);
+
+ Color red(0xFFFF0000);
+ Color green(0xFF00FF00);
+ {
+ // Make the transparency layer after translation will be @ (0, -8) with
+ // size 16x16.
+ TransparencyWin helper;
+ helper.init(src->context(),
+ TransparencyWin::OpaqueCompositeLayer,
+ TransparencyWin::KeepTransform,
+ IntRect(0, 0, 16, 16));
+
+ // Draw a red pixel at (15, 15). This should be the at (15, 7) after
+ // the transform.
+ FloatRect bottomRight(15, 15, 1, 1);
+ helper.context()->fillRect(bottomRight, green);
+ }
+
+ src->context()->restore();
+
+ // Check the pixel we wrote.
+ EXPECT_EQ(green, getPixelAt(src->context(), 15, 7));
+}
+
+// Same as OpaqueCompositeLayer, but the canvas has a rotation applied. This
+// tests that the propert transform is applied to the copied layer.
+TEST(TransparencyWin, RotateOpaqueCompositeLayer)
+{
+ std::auto_ptr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), false));
+
+ // The background is white.
+ Color white(0xFFFFFFFF);
+ FloatRect fullRect(0, 0, 16, 16);
+ src->context()->fillRect(fullRect, white);
+
+ // Rotate the image by 90 degrees. This matrix is the same as
+ // cw90.rotate(90); but avoids rounding errors. Rounding errors can cause
+ // Skia to think that !rectStaysRect() and it will fall through to path
+ // drawing mode, which in turn gives us antialiasing. We want no
+ // antialiasing or other rounding problems since we're testing exact pixel
+ // values.
+ src->context()->save();
+ TransformationMatrix cw90( 0, 1, 0, 0,
+ -1, 0, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1);
+ src->context()->concatCTM(cw90);
+
+ // Make a transparency layer consisting of a horizontal line of 50% black.
+ // Since the rotation is applied, this will actually be a vertical line
+ // down the middle of the image.
+ src->context()->beginTransparencyLayer(0.5);
+ FloatRect blackRect(0, -9, 16, 2);
+ Color black(0xFF000000);
+ src->context()->fillRect(blackRect, black);
+
+ // Now draw 50% red square.
+ {
+ // Create a transparency helper inset one pixel in the buffer. The
+ // coordinates are before transforming into this space, and maps to
+ // IntRect(1, 1, 14, 14).
+ TransparencyWin helper;
+ helper.init(src->context(),
+ TransparencyWin::OpaqueCompositeLayer,
+ TransparencyWin::Untransform,
+ IntRect(1, -15, 14, 14));
+
+ // Fill with red.
+ helper.context()->fillRect(helper.drawRect(), Color(0x7f7f0000));
+ clearTopLayerAlphaChannel(helper.context());
+ }
+
+ // Finish the compositing.
+ src->context()->endTransparencyLayer();
+
+ // Top corner should be the original background.
+ EXPECT_EQ(white, getPixelAt(src->context(), 0, 0));
+
+ // Check the stripe down the middle, first at the top...
+ Color gray(0xFF818181);
+ EXPECT_EQ(white, getPixelAt(src->context(), 6, 0));
+ EXPECT_EQ(gray, getPixelAt(src->context(), 7, 0));
+ EXPECT_EQ(gray, getPixelAt(src->context(), 8, 0));
+ EXPECT_EQ(white, getPixelAt(src->context(), 9, 0));
+
+ // ...now at the bottom.
+ EXPECT_EQ(white, getPixelAt(src->context(), 6, 15));
+ EXPECT_EQ(gray, getPixelAt(src->context(), 7, 15));
+ EXPECT_EQ(gray, getPixelAt(src->context(), 8, 15));
+ EXPECT_EQ(white, getPixelAt(src->context(), 9, 15));
+
+ // Our red square should be 25% red over the top of those two.
+ Color redwhite(0xFFdfc0c0);
+ Color redgray(0xFFa08181);
+ EXPECT_EQ(white, getPixelAt(src->context(), 0, 1));
+ EXPECT_EQ(redwhite, getPixelAt(src->context(), 1, 1));
+ EXPECT_EQ(redwhite, getPixelAt(src->context(), 6, 1));
+ EXPECT_EQ(redgray, getPixelAt(src->context(), 7, 1));
+ EXPECT_EQ(redgray, getPixelAt(src->context(), 8, 1));
+ EXPECT_EQ(redwhite, getPixelAt(src->context(), 9, 1));
+ EXPECT_EQ(redwhite, getPixelAt(src->context(), 14, 1));
+ EXPECT_EQ(white, getPixelAt(src->context(), 15, 1));
+
+ // Complete the 50% transparent layer.
+ src->context()->restore();
+}
+
+TEST(TransparencyWin, TranslateScaleOpaqueCompositeLayer)
+{
+ std::auto_ptr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), false));
+
+ // The background is white on top with red on bottom.
+ Color white(0xFFFFFFFF);
+ FloatRect topRect(0, 0, 16, 8);
+ src->context()->fillRect(topRect, white);
+ Color red(0xFFFF0000);
+ FloatRect bottomRect(0, 8, 16, 8);
+ src->context()->fillRect(bottomRect, red);
+
+ src->context()->save();
+
+ // Translate left by one pixel.
+ TransformationMatrix left;
+ left.translate(-1, 0);
+
+ // Scale by 2x.
+ TransformationMatrix scale;
+ scale.scale(2.0);
+ src->context()->concatCTM(scale);
+
+ // Then translate up by one pixel (which will actually be 2 due to scaling).
+ TransformationMatrix up;
+ up.translate(0, -1);
+ src->context()->concatCTM(up);
+
+ // Now draw 50% red square.
+ {
+ // Create a transparency helper inset one pixel in the buffer. The
+ // coordinates are before transforming into this space, and maps to
+ // IntRect(1, 1, 14, 14).
+ TransparencyWin helper;
+ helper.init(src->context(),
+ TransparencyWin::OpaqueCompositeLayer,
+ TransparencyWin::KeepTransform,
+ IntRect(1, -15, 14, 14));
+
+ // Fill with red.
+ helper.context()->fillRect(helper.drawRect(), Color(0x7f7f0000));
+ clearTopLayerAlphaChannel(helper.context());
+ }
+}
+
+// Tests scale mode with no additional copy.
+TEST(TransparencyWin, Scale)
+{
+ // Create an opaque white buffer.
+ std::auto_ptr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), false));
+ FloatRect fullBuffer(0, 0, 16, 16);
+ src->context()->fillRect(fullBuffer, Color::white);
+
+ // Scale by 2x.
+ src->context()->save();
+ TransformationMatrix scale;
+ scale.scale(2.0);
+ src->context()->concatCTM(scale);
+
+ // Start drawing a rectangle from 1->4. This should get scaled to 2->8.
+ {
+ TransparencyWin helper;
+ helper.init(src->context(),
+ TransparencyWin::NoLayer,
+ TransparencyWin::ScaleTransform,
+ IntRect(1, 1, 3, 3));
+
+ // The context should now have the identity transform and the returned
+ // rect should be scaled.
+ EXPECT_TRUE(helper.context()->getCTM().isIdentity());
+ EXPECT_EQ(2, helper.drawRect().x());
+ EXPECT_EQ(2, helper.drawRect().y());
+ EXPECT_EQ(8, helper.drawRect().right());
+ EXPECT_EQ(8, helper.drawRect().bottom());
+
+ // Set the pixel at (2, 2) to be transparent. This should be fixed when
+ // the helper goes out of scope. We don't want to call
+ // clearTopLayerAlphaChannel because that will actually clear the whole
+ // canvas (since we have no extra layer!).
+ SkBitmap& bitmap = const_cast<SkBitmap&>(helper.context()->
+ platformContext()->canvas()->getTopPlatformDevice().
+ accessBitmap(false));
+ *bitmap.getAddr32(2, 2) &= 0x00FFFFFF;
+ }
+
+ src->context()->restore();
+
+ // Check the pixel we previously made transparent, it should have gotten
+ // fixed back up to white.
+
+ // The current version doesn't fixup transparency when there is no layer.
+ // This seems not to be necessary, so we don't bother, but if it becomes
+ // necessary, this line should be uncommented.
+ //EXPECT_EQ(Color(Color::white), getPixelAt(src->context(), 2, 2));
+}
+
+// Tests scale mode with an additional copy for transparency. This will happen
+// if we have a scaled textbox, for example. WebKit will create a new
+// transparency layer, draw the text field, then draw the text into it, then
+// composite this down with an opacity.
+TEST(TransparencyWin, ScaleTransparency)
+{
+ // Create an opaque white buffer.
+ std::auto_ptr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), false));
+ FloatRect fullBuffer(0, 0, 16, 16);
+ src->context()->fillRect(fullBuffer, Color::white);
+
+ // Make another layer (which duplicates how WebKit will make this). We fill
+ // the top half with red, and have the layer be 50% opaque.
+ src->context()->beginTransparencyLayer(0.5);
+ FloatRect topHalf(0, 0, 16, 8);
+ src->context()->fillRect(topHalf, Color(0xFFFF0000));
+
+ // Scale by 2x.
+ src->context()->save();
+ TransformationMatrix scale;
+ scale.scale(2.0);
+ src->context()->concatCTM(scale);
+
+ // Make a layer inset two pixels (because of scaling, this is 2->14). And
+ // will it with 50% black.
+ {
+ TransparencyWin helper;
+ helper.init(src->context(),
+ TransparencyWin::OpaqueCompositeLayer,
+ TransparencyWin::ScaleTransform,
+ IntRect(1, 1, 6, 6));
+
+ helper.context()->fillRect(helper.drawRect(), Color(0x7f000000));
+ clearTopLayerAlphaChannel(helper.context());
+ }
+
+ // Finish the layer.
+ src->context()->restore();
+ src->context()->endTransparencyLayer();
+
+ Color redBackground(0xFFFF8181); // 50% red composited on white.
+ EXPECT_EQ(redBackground, getPixelAt(src->context(), 0, 0));
+ EXPECT_EQ(redBackground, getPixelAt(src->context(), 1, 1));
+
+ // Top half (minus two pixel border) should be 50% gray atop opaque
+ // red = 0xFF804141. Then that's composited with 50% transparency on solid
+ // white = 0xFFC0A1A1.
+ Color darkRed(0xFFC08181);
+ EXPECT_EQ(darkRed, getPixelAt(src->context(), 2, 2));
+ EXPECT_EQ(darkRed, getPixelAt(src->context(), 7, 7));
+
+ // Bottom half (minus a two pixel border) should be a layer with 5% gray
+ // with another 50% opacity composited atop white.
+ Color darkWhite(0xFFC0C0C0);
+ EXPECT_EQ(darkWhite, getPixelAt(src->context(), 8, 8));
+ EXPECT_EQ(darkWhite, getPixelAt(src->context(), 13, 13));
+
+ Color white(0xFFFFFFFF); // Background in the lower-right.
+ EXPECT_EQ(white, getPixelAt(src->context(), 14, 14));
+ EXPECT_EQ(white, getPixelAt(src->context(), 15, 15));
+}
+
+TEST(TransparencyWin, Text)
+{
+ std::auto_ptr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), false));
+
+ // Our text should end up 50% transparent blue-green.
+ Color fullResult(0x80008080);
+
+ {
+ TransparencyWin helper;
+ helper.init(src->context(),
+ TransparencyWin::TextComposite,
+ TransparencyWin::KeepTransform,
+ IntRect(0, 0, 16, 16));
+ helper.setTextCompositeColor(fullResult);
+
+ // Write several different squares to simulate ClearType. These should
+ // all reduce to 2/3 coverage.
+ FloatRect pixel(0, 0, 1, 1);
+ helper.context()->fillRect(pixel, 0xFFFF0000);
+ pixel.move(1.0f, 0.0f);
+ helper.context()->fillRect(pixel, 0xFF00FF00);
+ pixel.move(1.0f, 0.0f);
+ helper.context()->fillRect(pixel, 0xFF0000FF);
+ pixel.move(1.0f, 0.0f);
+ helper.context()->fillRect(pixel, 0xFF008080);
+ pixel.move(1.0f, 0.0f);
+ helper.context()->fillRect(pixel, 0xFF800080);
+ pixel.move(1.0f, 0.0f);
+ helper.context()->fillRect(pixel, 0xFF808000);
+
+ // Try one with 100% coverage (opaque black).
+ pixel.move(1.0f, 0.0f);
+ helper.context()->fillRect(pixel, 0xFF000000);
+
+ // Now mess with the alpha channel.
+ clearTopLayerAlphaChannel(helper.context());
+ }
+
+ Color oneThirdResult(0x55005555); // = fullResult * 2 / 3
+ EXPECT_EQ(oneThirdResult, getPixelAt(src->context(), 0, 0));
+ EXPECT_EQ(oneThirdResult, getPixelAt(src->context(), 1, 0));
+ EXPECT_EQ(oneThirdResult, getPixelAt(src->context(), 2, 0));
+ EXPECT_EQ(oneThirdResult, getPixelAt(src->context(), 3, 0));
+ EXPECT_EQ(oneThirdResult, getPixelAt(src->context(), 4, 0));
+ EXPECT_EQ(oneThirdResult, getPixelAt(src->context(), 5, 0));
+ EXPECT_EQ(fullResult, getPixelAt(src->context(), 6, 0));
+ EXPECT_EQ(Color::transparent, getPixelAt(src->context(), 7, 0));
+}
+
+} // namespace WebCore \ No newline at end of file