Changeset 86314 in webkit
- Timestamp:
- May 12, 2011 12:04:24 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r86313 r86314 1 2011-05-12 Ben Wells <benwells@chromium.org> 2 3 Reviewed by Simon Fraser. 4 5 RGBA colors in outlines show overpainting at the corners 6 https://bugs.webkit.org/show_bug.cgi?id=58999 7 8 * fast/borders/outline-alpha-block.html: Added. 9 * fast/borders/outline-alpha-inline.html: Added. 10 * platform/chromium/test_expectations.txt: 11 * platform/mac/fast/borders/outline-alpha-block-expected.png: Added. 12 * platform/mac/fast/borders/outline-alpha-block-expected.txt: Added. 13 * platform/mac/fast/borders/outline-alpha-inline-expected.png: Added. 14 * platform/mac/fast/borders/outline-alpha-inline-expected.txt: Added. 15 * platform/mac/fast/box-shadow/box-shadow-radius-expected.png: Rebaselined as this test had rgba outlines. 16 * platform/mac/fast/layers/self-painting-outline-expected.png: Rebaselined as this test had rgba outlines. 17 1 18 2011-05-11 Srinivasulu Chereddy <Srinivasulu.Chereddy@nokia.com> 2 19 -
trunk/LayoutTests/platform/chromium/test_expectations.txt
r86280 r86314 4028 4028 BUGCR82281 : fast/xpath/xpath-other-nodeset-result-should-mark-its-nodeset.html = TEXT 4029 4029 BUGCR82281 : fast/xpath/xpath-snapshot-result-should-mark-its-nodeset.html = TEXT 4030 4031 // New pixel tests added for bug 58999, rebaseline when webkit 58999 rolls. 4032 BUGWK58999 WIN LINUX : fast/borders/outline-alpha-block.html = IMAGE+TEXT 4033 BUGWK58999 WIN LINUX : fast/borders/outline-alpha-inline.html = IMAGE+TEXT -
trunk/Source/WebCore/ChangeLog
r86312 r86314 1 2011-05-12 Ben Wells <benwells@chromium.org> 2 3 Reviewed by Simon Fraser. 4 5 RGBA colors in outlines show overpainting at the corners 6 https://bugs.webkit.org/show_bug.cgi?id=58999 7 8 Tests: fast/borders/outline-alpha-block.html 9 fast/borders/outline-alpha-inline.html 10 11 Updated baseline images for tests with rgba outlines: 12 fast/box-shadow/box-shadow-radius.html 13 fast/layers/self-painting-outline.html 14 15 * rendering/RenderInline.cpp: 16 (WebCore::RenderInline::paintOutline): 17 (WebCore::RenderInline::paintOutlineForLine): 18 * rendering/RenderInline.h: 19 * rendering/RenderObject.cpp: 20 (WebCore::RenderObject::paintOutline): 21 1 22 2011-05-11 Levi Weintraub <leviw@chromium.org> 2 23 -
trunk/Source/WebCore/rendering/RenderInline.cpp
r86060 r86314 1398 1398 rects.append(IntRect()); 1399 1399 1400 Color outlineColor = styleToUse->visitedDependentColor(CSSPropertyOutlineColor); 1401 #if !USE(SKIA) 1402 bool useTransparencyLayer = outlineColor.hasAlpha(); 1403 if (useTransparencyLayer) { 1404 graphicsContext->beginTransparencyLayer(static_cast<float>(outlineColor.alpha()) / 255); 1405 outlineColor = Color(outlineColor.red(), outlineColor.green(), outlineColor.blue()); 1406 } 1407 #endif 1408 1400 1409 for (unsigned i = 1; i < rects.size() - 1; i++) 1401 paintOutlineForLine(graphicsContext, tx, ty, rects.at(i - 1), rects.at(i), rects.at(i + 1)); 1410 paintOutlineForLine(graphicsContext, tx, ty, rects.at(i - 1), rects.at(i), rects.at(i + 1), outlineColor); 1411 1412 #if !USE(SKIA) 1413 if (useTransparencyLayer) 1414 graphicsContext->endTransparencyLayer(); 1415 #endif 1402 1416 } 1403 1417 1404 1418 void RenderInline::paintOutlineForLine(GraphicsContext* graphicsContext, int tx, int ty, 1405 const IntRect& lastline, const IntRect& thisline, const IntRect& nextline) 1419 const IntRect& lastline, const IntRect& thisline, const IntRect& nextline, 1420 const Color outlineColor) 1406 1421 { 1407 1422 RenderStyle* styleToUse = style(); 1408 1423 int ow = styleToUse->outlineWidth(); 1409 1424 EBorderStyle os = styleToUse->outlineStyle(); 1410 Color oc = styleToUse->visitedDependentColor(CSSPropertyOutlineColor);1411 1425 1412 1426 int offset = style()->outlineOffset(); … … 1424 1438 b + (nextline.isEmpty() || thisline.x() <= nextline.x() || (nextline.maxX() - 1) <= thisline.x() ? ow : 0), 1425 1439 BSLeft, 1426 o c, os,1440 outlineColor, os, 1427 1441 (lastline.isEmpty() || thisline.x() < lastline.x() || (lastline.maxX() - 1) <= thisline.x() ? ow : -ow), 1428 1442 (nextline.isEmpty() || thisline.x() <= nextline.x() || (nextline.maxX() - 1) <= thisline.x() ? ow : -ow)); … … 1435 1449 b + (nextline.isEmpty() || nextline.maxX() <= thisline.maxX() || (thisline.maxX() - 1) <= nextline.x() ? ow : 0), 1436 1450 BSRight, 1437 o c, os,1451 outlineColor, os, 1438 1452 (lastline.isEmpty() || lastline.maxX() < thisline.maxX() || (thisline.maxX() - 1) <= lastline.x() ? ow : -ow), 1439 1453 (nextline.isEmpty() || nextline.maxX() <= thisline.maxX() || (thisline.maxX() - 1) <= nextline.x() ? ow : -ow)); … … 1445 1459 min(r+ow, (lastline.isEmpty() ? 1000000 : tx + lastline.x())), 1446 1460 t , 1447 BSTop, o c, os,1461 BSTop, outlineColor, os, 1448 1462 ow, 1449 1463 (!lastline.isEmpty() && tx + lastline.x() + 1 < r + ow) ? -ow : ow); … … 1455 1469 r + ow, 1456 1470 t , 1457 BSTop, o c, os,1471 BSTop, outlineColor, os, 1458 1472 (!lastline.isEmpty() && l - ow < tx + lastline.maxX()) ? -ow : ow, 1459 1473 ow); … … 1466 1480 min(r + ow, !nextline.isEmpty() ? tx + nextline.x() + 1 : 1000000), 1467 1481 b + ow, 1468 BSBottom, o c, os,1482 BSBottom, outlineColor, os, 1469 1483 ow, 1470 1484 (!nextline.isEmpty() && tx + nextline.x() + 1 < r + ow) ? -ow : ow); … … 1476 1490 r + ow, 1477 1491 b + ow, 1478 BSBottom, o c, os,1492 BSBottom, outlineColor, os, 1479 1493 (!nextline.isEmpty() && l - ow < tx + nextline.maxX()) ? -ow : ow, 1480 1494 ow); -
trunk/Source/WebCore/rendering/RenderInline.h
r83075 r86314 163 163 static RenderInline* cloneInline(RenderInline* src); 164 164 165 void paintOutlineForLine(GraphicsContext*, int tx, int ty, const IntRect& prevLine, const IntRect& thisLine, const IntRect& nextLine); 165 void paintOutlineForLine(GraphicsContext*, int tx, int ty, const IntRect& prevLine, const IntRect& thisLine, 166 const IntRect& nextLine, const Color); 166 167 RenderBoxModelObject* continuationBefore(RenderObject* beforeChild); 167 168 -
trunk/Source/WebCore/rendering/RenderObject.cpp
r86128 r86314 1052 1052 return; 1053 1053 1054 #if !USE(SKIA) 1055 bool useTransparencyLayer = outlineColor.hasAlpha(); 1056 if (useTransparencyLayer) { 1057 graphicsContext->beginTransparencyLayer(static_cast<float>(outlineColor.alpha()) / 255); 1058 outlineColor = Color(outlineColor.red(), outlineColor.green(), outlineColor.blue()); 1059 } 1060 #endif 1061 1054 1062 int leftOuter = tx - outlineWidth; 1055 1063 int leftInner = tx; … … 1065 1073 drawLineForBoxSide(graphicsContext, rightInner, topOuter, rightOuter, bottomOuter, BSRight, outlineColor, outlineStyle, outlineWidth, outlineWidth); 1066 1074 drawLineForBoxSide(graphicsContext, leftOuter, bottomInner, rightOuter, bottomOuter, BSBottom, outlineColor, outlineStyle, outlineWidth, outlineWidth); 1075 1076 #if !USE(SKIA) 1077 if (useTransparencyLayer) 1078 graphicsContext->endTransparencyLayer(); 1079 #endif 1067 1080 } 1068 1081
Note: See TracChangeset
for help on using the changeset viewer.