Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Side by Side Diff: Source/core/platform/graphics/GraphicsContext.cpp

Issue 14576017: Implement CSS3TextDecorations runtime flag in favor of CSS3_TEXT (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated css-properties-as-js-properties.html layout test expectations to match new properties. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 paint->setStrokeCap(m_skiaState->m_lineCap); 736 paint->setStrokeCap(m_skiaState->m_lineCap);
737 paint->setStrokeJoin(m_skiaState->m_lineJoin); 737 paint->setStrokeJoin(m_skiaState->m_lineJoin);
738 paint->setStrokeMiter(SkFloatToScalar(m_skiaState->m_miterLimit)); 738 paint->setStrokeMiter(SkFloatToScalar(m_skiaState->m_miterLimit));
739 739
740 if (m_skiaState->m_dash) 740 if (m_skiaState->m_dash)
741 paint->setPathEffect(m_skiaState->m_dash); 741 paint->setPathEffect(m_skiaState->m_dash);
742 else { 742 else {
743 switch (m_skiaState->m_strokeStyle) { 743 switch (m_skiaState->m_strokeStyle) {
744 case NoStroke: 744 case NoStroke:
745 case SolidStroke: 745 case SolidStroke:
746 #if ENABLE(CSS3_TEXT)
747 case DoubleStroke: 746 case DoubleStroke:
748 case WavyStroke: // FIXME: https://bugs.webkit.org/show_bug.cgi?id=93509 - Needs platform support. 747 case WavyStroke: // FIXME: https://code.google.com/p/chromium/issues/det ail?id=229574
749 #endif // CSS3_TEXT
750 break; 748 break;
751 case DashedStroke: 749 case DashedStroke:
752 width = m_skiaState->m_dashRatio * width; 750 width = m_skiaState->m_dashRatio * width;
753 // Fall through. 751 // Fall through.
754 case DottedStroke: 752 case DottedStroke:
755 // Truncate the width, since we don't want fuzzy dots or dashes. 753 // Truncate the width, since we don't want fuzzy dots or dashes.
756 int dashLength = static_cast<int>(width); 754 int dashLength = static_cast<int>(width);
757 // Subtract off the endcaps, since they're rendered separately. 755 // Subtract off the endcaps, since they're rendered separately.
758 int distance = length - 2 * static_cast<int>(m_skiaState->m_strokeTh ickness); 756 int distance = length - 2 * static_cast<int>(m_skiaState->m_strokeTh ickness);
759 int phase = 1; 757 int phase = 1;
(...skipping 1357 matching lines...) Expand 10 before | Expand all | Expand 10 after
2117 SkPaint paint; 2115 SkPaint paint;
2118 paint.setXfermodeMode(SkXfermode::kDstIn_Mode); 2116 paint.setXfermodeMode(SkXfermode::kDstIn_Mode);
2119 realizeSave(SkCanvas::kMatrixClip_SaveFlag); 2117 realizeSave(SkCanvas::kMatrixClip_SaveFlag);
2120 m_canvas->save(SkCanvas::kMatrix_SaveFlag); 2118 m_canvas->save(SkCanvas::kMatrix_SaveFlag);
2121 m_canvas->resetMatrix(); 2119 m_canvas->resetMatrix();
2122 m_canvas->drawBitmapRect(imageBuffer, 0, rect, &paint); 2120 m_canvas->drawBitmapRect(imageBuffer, 0, rect, &paint);
2123 m_canvas->restore(); 2121 m_canvas->restore();
2124 } 2122 }
2125 2123
2126 } 2124 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698