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

Side by Side Diff: Source/core/rendering/svg/SVGInlineTextBox.cpp

Issue 14160005: Track the region where text is painted. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase with TOT Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
1 /** 1 /**
2 * Copyright (C) 2007 Rob Buis <buis@kde.org> 2 * Copyright (C) 2007 Rob Buis <buis@kde.org>
3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 if (!prepareGraphicsContextForTextPainting(context, scalingFactor, textR un, style)) 611 if (!prepareGraphicsContextForTextPainting(context, scalingFactor, textR un, style))
612 break; 612 break;
613 613
614 FloatSize extraOffset; 614 FloatSize extraOffset;
615 if (shadow) 615 if (shadow)
616 extraOffset = applyShadowToGraphicsContext(context, shadow, shadowRe ct, false /* stroked */, true /* opaque */, true /* horizontal */); 616 extraOffset = applyShadowToGraphicsContext(context, shadow, shadowRe ct, false /* stroked */, true /* opaque */, true /* horizontal */);
617 617
618 context->save(); 618 context->save();
619 context->scale(FloatSize(1 / scalingFactor, 1 / scalingFactor)); 619 context->scale(FloatSize(1 / scalingFactor, 1 / scalingFactor));
620 620
621 scaledFont.drawText(context, textRun, textOrigin + extraOffset, startPos ition, endPosition); 621 scaledFont.drawText(context, textRun, textOrigin + extraOffset, FloatRec t(textOrigin, textSize), startPosition, endPosition);
622 622
623 context->restore(); 623 context->restore();
624 624
625 restoreGraphicsContextAfterTextPainting(context, textRun); 625 restoreGraphicsContextAfterTextPainting(context, textRun);
626 626
627 if (!shadow) 627 if (!shadow)
628 break; 628 break;
629 629
630 if (shadow->next()) 630 if (shadow->next())
631 context->restore(); 631 context->restore();
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 return true; 720 return true;
721 } 721 }
722 } 722 }
723 } 723 }
724 return false; 724 return false;
725 } 725 }
726 726
727 } // namespace WebCore 727 } // namespace WebCore
728 728
729 #endif 729 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698