- test for http://bugzilla.opendarwin.org/show_bug.cgi?id=10158
REGRESSION: Selection highlight is dark and opaque when solid-color images are used
Reviewed by Darin.
* fast/backgrounds/solid-color-context-restore-expected.checksum: Added.
* fast/backgrounds/solid-color-context-restore-expected.png: Added.
* fast/backgrounds/solid-color-context-restore-expected.txt: Added.
* fast/backgrounds/solid-color-context-restore.html: Added.
WebCore:
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10158
REGRESSION: Selection highlight is dark and opaque when solid-color images are used
Reviewed by Darin.
Pixel test: fast/backgrounds/solid-color-context-restore.html
* platform/mac/ImageMac.mm:
(WebCore::Image::draw): Added calls to preserve the graphics context
around the painting of a solid color image.
(WebCore::Image::drawTiled): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15733
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2006-07-31 Mitz Pettel <opendarwin.org@mitzpettel.com>
+
+ - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=10158
+ REGRESSION: Selection highlight is dark and opaque when solid-color images are used
+
+ Reviewed by Darin.
+
+ * fast/backgrounds/solid-color-context-restore-expected.checksum: Added.
+ * fast/backgrounds/solid-color-context-restore-expected.png: Added.
+ * fast/backgrounds/solid-color-context-restore-expected.txt: Added.
+ * fast/backgrounds/solid-color-context-restore.html: Added.
+
2006-07-31 Darin Adler <darin@apple.com>
Reviewed by Maciej.
--- /dev/null
+d04a85690ef07ce117313108750cf56e
\ No newline at end of file
--- /dev/null
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {P} at (0,0) size 784x18
+ RenderText {#text} at (0,0) size 750x18
+ text run at (0,0) width 445: "This tests that the graphics context is restored after painting solid color "
+ text run at (445,0) width 305: "images. The highlight color should be light blue."
+ RenderBlock {HR} at (0,34) size 784x2 [border: (1px inset #000000)]
+ RenderBlock {DIV} at (0,44) size 784x18
+ RenderText {#text} at (0,0) size 21x18
+ text run at (0,0) width 21: "foo"
+selection start: position 9 of child 0 {#text} of child 5 {DIV} of child 1 {BODY} of child 0 {HTML} of document
+selection end: position 12 of child 0 {#text} of child 5 {DIV} of child 1 {BODY} of child 0 {HTML} of document
--- /dev/null
+<html>
+<head>
+ <style type="text/css">
+ #target { background: url(data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==); }
+ </style>
+</head>
+<body>
+ <p>
+ This tests that the graphics context is restored after painting solid color
+ images. The highlight color should be light blue.
+ </p>
+ <hr>
+ <div id="target">
+ foo
+ </div>
+ <script type="text/javascript">
+ if (window.layoutTestController)
+ layoutTestController.display();
+ target = document.getElementById('target');
+ window.getSelection().setBaseAndExtent(target, 0, target, 1);
+ </script>
+</body>
+</html>
+2006-07-31 Mitz Pettel <opendarwin.org@mitzpettel.com>
+
+ - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10158
+ REGRESSION: Selection highlight is dark and opaque when solid-color images are used
+
+ Reviewed by Darin.
+
+ Pixel test: fast/backgrounds/solid-color-context-restore.html
+
+ * platform/mac/ImageMac.mm:
+ (WebCore::Image::draw): Added calls to preserve the graphics context
+ around the painting of a solid color image.
+ (WebCore::Image::drawTiled): Ditto.
+
2006-07-31 Maciej Stachowiak <mjs@apple.com>
Rubber-stamped by Tim Hatcher.
if (m_isSolidColor && m_currentFrame == 0) {
if (m_solidColor.alpha() > 0) {
+ ctxt->save();
ctxt->setCompositeOperation(!m_solidColor.hasAlpha() && compositeOp == CompositeSourceOver ? CompositeCopy : compositeOp);
ctxt->fillRect(ir, m_solidColor);
+ ctxt->restore();
}
return;
}
if (m_isSolidColor && m_currentFrame == 0) {
if (m_solidColor.alpha() > 0) {
+ ctxt->save();
ctxt->setCompositeOperation(!m_solidColor.hasAlpha() && op == CompositeSourceOver ? CompositeCopy : op);
ctxt->fillRect(destRect, m_solidColor);
+ ctxt->restore();
}
return;
}
if (m_isSolidColor && m_currentFrame == 0) {
if (m_solidColor.alpha() > 0) {
+ ctxt->save();
ctxt->setCompositeOperation(!m_solidColor.hasAlpha() && op == CompositeSourceOver ? CompositeCopy : op);
ctxt->fillRect(dstRect, m_solidColor);
+ ctxt->restore();
}
return;
}