summaryrefslogtreecommitdiff
path: root/chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGRoot.cpp
diff options
context:
space:
mode:
authorAndras Becsi <andras.becsi@digia.com>2014-03-18 13:16:26 +0100
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-03-20 15:55:39 +0100
commit3f0f86b0caed75241fa71c95a5d73bc0164348c5 (patch)
tree92b9fb00f2e9e90b0be2262093876d4f43b6cd13 /chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGRoot.cpp
parente90d7c4b152c56919d963987e2503f9909a666d2 (diff)
downloadqtwebengine-chromium-3f0f86b0caed75241fa71c95a5d73bc0164348c5.tar.gz
Update to new stable branch 1750
This also includes an updated ninja and chromium dependencies needed on Windows. Change-Id: Icd597d80ed3fa4425933c9f1334c3c2e31291c42 Reviewed-by: Zoltan Arvai <zarvai@inf.u-szeged.hu> Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Diffstat (limited to 'chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGRoot.cpp')
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGRoot.cpp32
1 files changed, 9 insertions, 23 deletions
diff --git a/chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGRoot.cpp b/chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGRoot.cpp
index a3ac4b8136c..a4355cd4d9a 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGRoot.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGRoot.cpp
@@ -25,12 +25,9 @@
#include "core/rendering/svg/RenderSVGRoot.h"
-#include "core/page/Chrome.h"
-#include "core/page/ChromeClient.h"
-#include "core/page/Frame.h"
-#include "core/page/Page.h"
-#include "core/platform/graphics/GraphicsContext.h"
+#include "core/frame/Frame.h"
#include "core/rendering/HitTestResult.h"
+#include "core/rendering/LayoutRectRecorder.h"
#include "core/rendering/LayoutRepainter.h"
#include "core/rendering/RenderPart.h"
#include "core/rendering/RenderView.h"
@@ -41,6 +38,7 @@
#include "core/svg/SVGElement.h"
#include "core/svg/SVGSVGElement.h"
#include "core/svg/graphics/SVGImage.h"
+#include "platform/graphics/GraphicsContext.h"
using namespace std;
@@ -81,9 +79,9 @@ void RenderSVGRoot::computeIntrinsicRatioInformation(FloatSize& intrinsicSize, d
// resolving both values to user units.
if (intrinsicWidthAttribute.isFixed() || intrinsicHeightAttribute.isFixed()) {
if (intrinsicWidthAttribute.isFixed())
- intrinsicSize.setWidth(floatValueForLength(intrinsicWidthAttribute, 0));
+ intrinsicSize.setWidth(floatValueForLength(intrinsicWidthAttribute, 0, 0));
if (intrinsicHeightAttribute.isFixed())
- intrinsicSize.setHeight(floatValueForLength(intrinsicHeightAttribute, 0));
+ intrinsicSize.setHeight(floatValueForLength(intrinsicHeightAttribute, 0, 0));
if (!intrinsicSize.isEmpty())
intrinsicRatio = intrinsicSize.width() / static_cast<double>(intrinsicSize.height());
return;
@@ -197,6 +195,8 @@ void RenderSVGRoot::layout()
{
ASSERT(needsLayout());
+ LayoutRectRecorder recorder(*this);
+
// Arbitrary affine transforms are incompatible with LayoutState.
LayoutStateDisabler layoutStateDisabler(view());
@@ -246,23 +246,13 @@ void RenderSVGRoot::paintReplaced(PaintInfo& paintInfo, const LayoutPoint& paint
if (svg->hasEmptyViewBox())
return;
- Page* page = 0;
- if (Frame* frame = this->frame())
- page = frame->page();
-
// Don't paint if we don't have kids, except if we have filters we should paint those.
if (!firstChild()) {
SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(this);
- if (!resources || !resources->filter()) {
- if (page && paintInfo.phase == PaintPhaseForeground)
- page->addRelevantUnpaintedObject(this, visualOverflowRect());
+ if (!resources || !resources->filter())
return;
- }
}
- if (page && paintInfo.phase == PaintPhaseForeground)
- page->addRelevantRepaintedObject(this, visualOverflowRect());
-
// Make a copy of the PaintInfo because applyTransform will modify the damage rect.
PaintInfo childPaintInfo(paintInfo);
childPaintInfo.context->save();
@@ -300,15 +290,11 @@ void RenderSVGRoot::willBeDestroyed()
RenderReplaced::willBeDestroyed();
}
-void RenderSVGRoot::styleWillChange(StyleDifference diff, const RenderStyle* newStyle)
+void RenderSVGRoot::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
if (diff == StyleDifferenceLayout)
setNeedsBoundariesUpdate();
- RenderReplaced::styleWillChange(diff, newStyle);
-}
-void RenderSVGRoot::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
-{
RenderReplaced::styleDidChange(diff, oldStyle);
SVGResourcesCache::clientStyleChanged(this, diff, style());
}