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

Unified Diff: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp

Issue 2510513002: Issue paint offset for SVGText, etc. (Closed)
Patch Set: Rebase Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/paint/ObjectPainter.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1ba7d67924f3bbf8c97a2b8277f6702940aad4cc..4ec98c604d4325fe040514b85f618fed644afdfb 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
@@ -267,7 +267,8 @@ void PaintPropertyTreeBuilder::updateTransformForNonRootSVG(
const LayoutObject& object,
PaintPropertyTreeBuilderContext& context) {
DCHECK(object.isSVG() && !object.isSVGRoot());
- // SVG (other than SVGForeignObject) does not use paint offset internally.
+ // SVG does not use paint offset internally, except for SVGForeignObject which
+ // has different SVG and HTML coordinate spaces.
DCHECK(object.isSVGForeignObject() ||
context.current.paintOffset == LayoutPoint());
@@ -845,12 +846,7 @@ static void deriveBorderBoxFromContainerContext(
ASSERT_NOT_REACHED();
}
- // SVGForeignObject needs paint offset because its viewport offset is baked
- // into its location(), while its localSVGTransform() doesn't contain the
- // offset.
- if (boxModelObject.isBox() &&
- (!boxModelObject.isSVG() || boxModelObject.isSVGRoot() ||
- boxModelObject.isSVGForeignObject())) {
+ if (boxModelObject.isBox()) {
// TODO(pdr): Several calls in this function walk back up the tree to
// calculate containers (e.g., physicalLocation, offsetForInFlowPosition*).
// The containing block and other containers can be stored on
« no previous file with comments | « third_party/WebKit/Source/core/paint/ObjectPainter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698