Title: [105468] trunk
- Revision
- 105468
- Author
- [email protected]
- Date
- 2012-01-19 17:47:41 -0800 (Thu, 19 Jan 2012)
Log Message
[Skia Mac] Match style of platform error underline for misspellings
https://bugs.webkit.org/show_bug.cgi?id=76556
Reviewed by Stephen White.
Source/WebCore:
Add Darwin-specific code in Skia to draw the error underline so that
it matches the CoreGraphics style.
Many existing layout tests inadvertantly trigger the misspelling
underline by including the word 'foo' in an editable field. Those
tests are temporarily suppressed separately in an edit to
test_expectations.txt.
* platform/graphics/skia/GraphicsContextSkia.cpp:
(WebCore::GraphicsContext::drawLineForTextChecking):
LayoutTests:
Suppress editing tests with misspellings, since the error underline
is drawn differently.
* platform/chromium/test_expectations.txt:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (105467 => 105468)
--- trunk/LayoutTests/ChangeLog 2012-01-20 01:34:24 UTC (rev 105467)
+++ trunk/LayoutTests/ChangeLog 2012-01-20 01:47:41 UTC (rev 105468)
@@ -1,3 +1,15 @@
+2012-01-19 Cary Clark <[email protected]>
+
+ [Skia Mac] Match style of platform error underline for misspellings
+ https://bugs.webkit.org/show_bug.cgi?id=76556
+
+ Reviewed by Stephen White.
+
+ Suppress editing tests with misspellings, since the error underline
+ is drawn differently.
+
+ * platform/chromium/test_expectations.txt:
+
2012-01-19 Stephen Chenney <[email protected]>
[Chromium] A Skia roll will break some tests - marking as expected
Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (105467 => 105468)
--- trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-01-20 01:34:24 UTC (rev 105467)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-01-20 01:47:41 UTC (rev 105468)
@@ -3916,5 +3916,87 @@
// RenderSVGRoot now reports a correct size.
BUGWK76646 : svg/foreignObject/text-tref-02-b.svg = TEXT
+// Change error (misspelling) underlines from Windows look to Mac look.
+BUG_CARYCLARK MAC : editing/deleting/delete-3928305-fix.html = IMAGE
+BUG_CARYCLARK MAC : editing/deleting/delete-3959464-fix.html = IMAGE
+BUG_CARYCLARK MAC : editing/deleting/delete-and-undo.html = IMAGE
+BUG_CARYCLARK MAC : editing/deleting/delete-block-contents-003.html = IMAGE
+BUG_CARYCLARK MAC : editing/deleting/delete-contiguous-ws-001.html = IMAGE
+BUG_CARYCLARK MAC : editing/deleting/delete-tab-002.html = IMAGE
+BUG_CARYCLARK MAC : editing/deleting/delete-tab-003.html = IMAGE
+BUG_CARYCLARK MAC : editing/deleting/delete-to-select-table.html = IMAGE
+BUG_CARYCLARK MAC : editing/deleting/delete-trailing-ws-002.html = IMAGE
+BUG_CARYCLARK MAC : editing/deleting/delete-ws-fixup-001.html = IMAGE
+BUG_CARYCLARK MAC : editing/deleting/delete-ws-fixup-002.html = IMAGE
+BUG_CARYCLARK MAC : editing/execCommand/5569741.html = IMAGE
+BUG_CARYCLARK MAC : editing/execCommand/insert-list-and-stitch.html = IMAGE
+BUG_CARYCLARK MAC : editing/execCommand/insertHorizontalRule.html = IMAGE
+BUG_CARYCLARK MAC : editing/inserting/5418891.html = IMAGE
+BUG_CARYCLARK MAC : editing/inserting/editing-empty-divs.html = IMAGE
+BUG_CARYCLARK MAC : editing/inserting/insert-br-004.html = IMAGE
+BUG_CARYCLARK MAC : editing/inserting/insert-br-005.html = IMAGE
+BUG_CARYCLARK MAC : editing/inserting/insert-br-007.html = IMAGE
+BUG_CARYCLARK MAC : editing/inserting/insert-div-007.html = IMAGE
+BUG_CARYCLARK MAC : editing/inserting/insert-div-012.html = IMAGE
+BUG_CARYCLARK MAC : editing/inserting/insert-div-013.html = IMAGE
+BUG_CARYCLARK MAC : editing/inserting/insert-div-014.html = IMAGE
+BUG_CARYCLARK MAC : editing/inserting/insert-div-015.html = IMAGE
+BUG_CARYCLARK MAC : editing/inserting/insert-div-016.html = IMAGE
+BUG_CARYCLARK MAC : editing/inserting/insert-div-017.html = IMAGE
+BUG_CARYCLARK MAC : editing/inserting/insert-div-018.html = IMAGE
+BUG_CARYCLARK MAC : editing/inserting/insert-div-019.html = IMAGE
+BUG_CARYCLARK MAC : editing/inserting/insert-div-020.html = IMAGE
+BUG_CARYCLARK MAC : editing/inserting/insert-div-022.html = IMAGE
+BUG_CARYCLARK MAC : editing/inserting/insert-div-025.html = IMAGE
+BUG_CARYCLARK MAC : editing/inserting/insert-div-027.html = IMAGE
+BUG_CARYCLARK MAC : editing/inserting/insert-paragraph-02.html = IMAGE
+BUG_CARYCLARK MAC : editing/inserting/insert-paragraph-03.html = IMAGE
+BUG_CARYCLARK MAC : editing/inserting/insert-tab-002.html = IMAGE
+BUG_CARYCLARK MAC : editing/inserting/insert-tab-003.html = IMAGE
+BUG_CARYCLARK MAC : editing/inserting/insert-text-with-newlines.html = IMAGE
+BUG_CARYCLARK MAC : editing/inserting/paragraph-separator-01.html = IMAGE
+BUG_CARYCLARK MAC : editing/inserting/paragraph-separator-02.html = IMAGE
+BUG_CARYCLARK MAC : editing/inserting/paragraph-separator-03.html = IMAGE
+BUG_CARYCLARK MAC : editing/inserting/return-key-with-selection-001.html = IMAGE
+BUG_CARYCLARK MAC : editing/inserting/return-key-with-selection-002.html = IMAGE
+BUG_CARYCLARK MAC : editing/inserting/return-key-with-selection-003.html = IMAGE
+BUG_CARYCLARK MAC : editing/inserting/typing-002.html = IMAGE
+BUG_CARYCLARK MAC : editing/inserting/typing-around-br-001.html = IMAGE
+BUG_CARYCLARK MAC : editing/pasteboard/4242293.html = IMAGE
+BUG_CARYCLARK MAC : editing/pasteboard/4944770-1.html = IMAGE
+BUG_CARYCLARK MAC : editing/pasteboard/8145-2.html = IMAGE
+BUG_CARYCLARK MAC : editing/pasteboard/cut-text-001.html = IMAGE
+BUG_CARYCLARK MAC : editing/pasteboard/merge-after-delete-1.html = IMAGE
+BUG_CARYCLARK MAC : editing/pasteboard/merge-after-delete-2.html = IMAGE
+BUG_CARYCLARK MAC : editing/pasteboard/merge-after-delete.html = IMAGE
+BUG_CARYCLARK MAC : editing/pasteboard/merge-end-blockquote.html = IMAGE
+BUG_CARYCLARK MAC : editing/pasteboard/paste-text-013.html = IMAGE
+BUG_CARYCLARK MAC : editing/pasteboard/paste-text-014.html = IMAGE
+BUG_CARYCLARK MAC : editing/pasteboard/paste-text-019.html = IMAGE
+BUG_CARYCLARK MAC : editing/pasteboard/undoable-fragment-removes.html = IMAGE
+BUG_CARYCLARK MAC : editing/selection/13804.html = IMAGE
+BUG_CARYCLARK MAC : editing/selection/5234383-1.html = IMAGE
+BUG_CARYCLARK MAC : editing/selection/5234383-2.html = IMAGE
+BUG_CARYCLARK MAC : editing/selection/extend-by-word-001.html = IMAGE
+BUG_CARYCLARK MAC : editing/selection/move-backwords-by-word-001.html = IMAGE
+BUG_CARYCLARK MAC : editing/selection/move-by-character-001.html = IMAGE
+BUG_CARYCLARK MAC : editing/selection/move-by-line-001.html = IMAGE
+BUG_CARYCLARK MAC : editing/selection/move-by-word-001.html = IMAGE
+BUG_CARYCLARK MAC : editing/selection/select-from-textfield-outwards.html = IMAGE
+BUG_CARYCLARK MAC : editing/selection/unrendered-002.html = IMAGE
+BUG_CARYCLARK MAC : editing/spelling/inline_spelling_markers.html = IMAGE
+BUG_CARYCLARK MAC : editing/spelling/spelling.html = IMAGE
+BUG_CARYCLARK MAC : editing/style/5046875-2.html = IMAGE
+BUG_CARYCLARK MAC : editing/style/block-styles-007.html = IMAGE
+BUG_CARYCLARK MAC : editing/style/create-block-for-style-002.html = IMAGE
+BUG_CARYCLARK MAC : editing/style/create-block-for-style-003.html = IMAGE
+BUG_CARYCLARK MAC : editing/style/create-block-for-style-004.html = IMAGE
+BUG_CARYCLARK MAC : editing/style/create-block-for-style-006.html = IMAGE
+BUG_CARYCLARK MAC : editing/style/create-block-for-style-008.html = IMAGE
+BUG_CARYCLARK MAC : editing/style/create-block-for-style-009.html = IMAGE
+BUG_CARYCLARK MAC : editing/style/create-block-for-style-011.html = IMAGE
+BUG_CARYCLARK MAC : editing/style/create-block-for-style-012.html = IMAGE
+BUG_CARYCLARK MAC : editing/style/create-block-for-style-013.html = IMAGE
+
// Need to implement file name logging.
BUGWK76572 : http/tests/download = FAIL
Modified: trunk/Source/WebCore/ChangeLog (105467 => 105468)
--- trunk/Source/WebCore/ChangeLog 2012-01-20 01:34:24 UTC (rev 105467)
+++ trunk/Source/WebCore/ChangeLog 2012-01-20 01:47:41 UTC (rev 105468)
@@ -1,3 +1,21 @@
+2012-01-19 Cary Clark <[email protected]>
+
+ [Skia Mac] Match style of platform error underline for misspellings
+ https://bugs.webkit.org/show_bug.cgi?id=76556
+
+ Reviewed by Stephen White.
+
+ Add Darwin-specific code in Skia to draw the error underline so that
+ it matches the CoreGraphics style.
+
+ Many existing layout tests inadvertantly trigger the misspelling
+ underline by including the word 'foo' in an editable field. Those
+ tests are temporarily suppressed separately in an edit to
+ test_expectations.txt.
+
+ * platform/graphics/skia/GraphicsContextSkia.cpp:
+ (WebCore::GraphicsContext::drawLineForTextChecking):
+
2012-01-19 No'am Rosenthal <[email protected]>
[Texmap] TextureMapper creates two many big intermediate surfaces
Modified: trunk/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp (105467 => 105468)
--- trunk/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp 2012-01-20 01:34:24 UTC (rev 105467)
+++ trunk/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp 2012-01-20 01:47:41 UTC (rev 105468)
@@ -656,17 +656,40 @@
// Create the pattern we'll use to draw the underline.
static SkBitmap* misspellBitmap = 0;
if (!misspellBitmap) {
+#if PLATFORM(CHROMIUM) && OS(DARWIN)
+ // Match the artwork used by the Mac.
+ const int rowPixels = 4;
+ const int colPixels = 3;
+#else
// We use a 2-pixel-high misspelling indicator because that seems to be
// what WebKit is designed for, and how much room there is in a typical
// page for it.
const int rowPixels = 32; // Must be multiple of 4 for pattern below.
const int colPixels = 2;
+#endif
misspellBitmap = new SkBitmap;
misspellBitmap->setConfig(SkBitmap::kARGB_8888_Config,
rowPixels, colPixels);
misspellBitmap->allocPixels();
misspellBitmap->eraseARGB(0, 0, 0, 0);
+#if PLATFORM(CHROMIUM) && OS(DARWIN)
+ const uint32_t colors[] = { 0x2A2A0600, 0x57571000, // left half of 4x3
+ 0xA8A81B00, 0xBFBF1F00,
+ 0x70701200, 0xE0E02400 };
+ const uint32_t transparentColor = 0x00000000;
+
+ // Pattern: a b a a b a
+ // c d c c d c
+ // e f e e f e
+ for (int x = 0; x < colPixels; ++x) {
+ uint32_t* row = misspellBitmap->getAddr32(0, x);
+ row[0] = colors[x * 2];
+ row[1] = colors[x * 2 + 1];
+ row[2] = colors[x * 2];
+ row[3] = transparentColor;
+ }
+#else
const uint32_t lineColor = 0xFFFF0000; // Opaque red.
const uint32_t antiColor = 0x60600000; // Semitransparent red.
@@ -692,11 +715,16 @@
break;
}
}
+#endif
}
+ SkScalar originX = WebCoreFloatToSkScalar(pt.x());
+#if PLATFORM(CHROMIUM) && OS(DARWIN)
+ SkScalar originY = WebCoreFloatToSkScalar(pt.y());
+#else
// Offset it vertically by 1 so that there's some space under the text.
- SkScalar originX = WebCoreFloatToSkScalar(pt.x());
SkScalar originY = WebCoreFloatToSkScalar(pt.y()) + 1;
+#endif
// Make a shader for the bitmap with an origin of the box we'll draw. This
// shader is refcounted and will have an initial refcount of 1.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes