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

Side by Side Diff: Source/core/rendering/RenderBoxModelObject.cpp

Issue 23643003: ImageBuffer-less SVG masking and clipping. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix the Win build. Created 7 years, 3 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
« no previous file with comments | « Source/core/rendering/RenderBox.cpp ('k') | Source/core/rendering/RenderInline.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2010 Google Inc. All rights reserved. 7 * Copyright (C) 2010 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 PaintInfo info(context, maskRect, PaintPhaseTextClip, PaintBehaviorForce BlackText, 0, paintInfo.renderRegion); 760 PaintInfo info(context, maskRect, PaintPhaseTextClip, PaintBehaviorForce BlackText, 0, paintInfo.renderRegion);
761 context->setCompositeOperation(CompositeSourceOver); 761 context->setCompositeOperation(CompositeSourceOver);
762 if (box) { 762 if (box) {
763 RootInlineBox* root = box->root(); 763 RootInlineBox* root = box->root();
764 box->paint(info, LayoutPoint(scrolledPaintRect.x() - box->x(), scrol ledPaintRect.y() - box->y()), root->lineTop(), root->lineBottom()); 764 box->paint(info, LayoutPoint(scrolledPaintRect.x() - box->x(), scrol ledPaintRect.y() - box->y()), root->lineTop(), root->lineBottom());
765 } else { 765 } else {
766 LayoutSize localOffset = isBox() ? toRenderBox(this)->locationOffset () : LayoutSize(); 766 LayoutSize localOffset = isBox() ? toRenderBox(this)->locationOffset () : LayoutSize();
767 paint(info, scrolledPaintRect.location() - localOffset); 767 paint(info, scrolledPaintRect.location() - localOffset);
768 } 768 }
769 769
770 context->endTransparencyLayer(); 770 context->endLayer();
771 context->endTransparencyLayer(); 771 context->endLayer();
772 } 772 }
773 } 773 }
774 774
775 static inline int resolveWidthForRatio(int height, const FloatSize& intrinsicRat io) 775 static inline int resolveWidthForRatio(int height, const FloatSize& intrinsicRat io)
776 { 776 {
777 return ceilf(height * intrinsicRatio.width() / intrinsicRatio.height()); 777 return ceilf(height * intrinsicRatio.width() / intrinsicRatio.height());
778 } 778 }
779 779
780 static inline int resolveHeightForRatio(int width, const FloatSize& intrinsicRat io) 780 static inline int resolveHeightForRatio(int width, const FloatSize& intrinsicRat io)
781 { 781 {
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after
1681 1681
1682 bool useTransparencyLayer = includesAdjacentEdges(commonColorEdgeSet) && commonColor.hasAlpha(); 1682 bool useTransparencyLayer = includesAdjacentEdges(commonColorEdgeSet) && commonColor.hasAlpha();
1683 if (useTransparencyLayer) { 1683 if (useTransparencyLayer) {
1684 graphicsContext->beginTransparencyLayer(static_cast<float>(commonCol or.alpha()) / 255); 1684 graphicsContext->beginTransparencyLayer(static_cast<float>(commonCol or.alpha()) / 255);
1685 commonColor = Color(commonColor.red(), commonColor.green(), commonCo lor.blue()); 1685 commonColor = Color(commonColor.red(), commonColor.green(), commonCo lor.blue());
1686 } 1686 }
1687 1687
1688 paintBorderSides(graphicsContext, style, outerBorder, innerBorder, inner BorderAdjustment, edges, commonColorEdgeSet, bleedAvoidance, includeLogicalLeftE dge, includeLogicalRightEdge, antialias, &commonColor); 1688 paintBorderSides(graphicsContext, style, outerBorder, innerBorder, inner BorderAdjustment, edges, commonColorEdgeSet, bleedAvoidance, includeLogicalLeftE dge, includeLogicalRightEdge, antialias, &commonColor);
1689 1689
1690 if (useTransparencyLayer) 1690 if (useTransparencyLayer)
1691 graphicsContext->endTransparencyLayer(); 1691 graphicsContext->endLayer();
1692 1692
1693 edgesToDraw &= ~commonColorEdgeSet; 1693 edgesToDraw &= ~commonColorEdgeSet;
1694 } 1694 }
1695 } 1695 }
1696 1696
1697 void RenderBoxModelObject::paintBorder(const PaintInfo& info, const LayoutRect& rect, const RenderStyle* style, 1697 void RenderBoxModelObject::paintBorder(const PaintInfo& info, const LayoutRect& rect, const RenderStyle* style,
1698 BackgroundBleedAvoidance bleedAvoidance, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) 1698 BackgroundBleedAvoidance bleedAvoidance, bool includeLogicalLeftEdge, bool includeLogicalRightEdge)
1699 { 1699 {
1700 GraphicsContext* graphicsContext = info.context; 1700 GraphicsContext* graphicsContext = info.context;
1701 // border-image is not affected by border-radius. 1701 // border-image is not affected by border-radius.
(...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after
2786 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); 2786 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent());
2787 for (RenderObject* child = startChild; child && child != endChild; ) { 2787 for (RenderObject* child = startChild; child && child != endChild; ) {
2788 // Save our next sibling as moveChildTo will clear it. 2788 // Save our next sibling as moveChildTo will clear it.
2789 RenderObject* nextSibling = child->nextSibling(); 2789 RenderObject* nextSibling = child->nextSibling();
2790 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); 2790 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert);
2791 child = nextSibling; 2791 child = nextSibling;
2792 } 2792 }
2793 } 2793 }
2794 2794
2795 } // namespace WebCore 2795 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBox.cpp ('k') | Source/core/rendering/RenderInline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698