Chromium Code Reviews| Index: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp |
| diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp |
| index 5c58aa44a1edfc27408f48239064e38e82799bcc..cb522c911eb76937b467e76e99ca7c33716a3930 100644 |
| --- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp |
| +++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp |
| @@ -218,8 +218,8 @@ static FloatPoint3D transformOrigin(const LayoutBox& box) |
| void PaintPropertyTreeBuilder::updateTransform(const LayoutObject& object, PaintPropertyTreeBuilderContext& context) |
| { |
| if (object.isSVG() && !object.isSVGRoot()) { |
| - // SVG does not use paint offset internally. |
| - DCHECK(context.current.paintOffset == LayoutPoint()); |
| + // SVG (other than SVGForeign object) does not use paint offset internally. |
|
pdr.
2016/09/29 01:26:34
I think LayoutSVGText uses this too (the comment i
Xianzhu
2016/09/29 01:32:47
Done.
Xianzhu
2016/09/29 02:57:40
Just looked into LayoutSVGText and found that it's
|
| + DCHECK(object.isSVGForeignObject() || context.current.paintOffset == LayoutPoint()); |
| // FIXME(pdr): Check for the presence of a transform instead of the value. Checking for an |
| // identity matrix will cause the property tree structure to change during animations if |
| @@ -541,7 +541,7 @@ static void deriveBorderBoxFromContainerContext(const LayoutObject& object, Pain |
| default: |
| ASSERT_NOT_REACHED(); |
| } |
| - if (boxModelObject.isBox() && (!boxModelObject.isSVG() || boxModelObject.isSVGRoot())) { |
| + if (boxModelObject.isBox() && (!boxModelObject.isSVG() || boxModelObject.isSVGRoot() || boxModelObject.isSVGForeignObject())) { |
| // TODO(pdr): Several calls in this function walk back up the tree to calculate containers |
| // (e.g., topLeftLocation, offsetForInFlowPosition*). The containing block and other |
| // containers can be stored on PaintPropertyTreeBuilderContext instead of recomputing them. |