Title: [99669] trunk/Source/WebCore
- Revision
- 99669
- Author
- [email protected]
- Date
- 2011-11-09 01:15:48 -0800 (Wed, 09 Nov 2011)
Log Message
2011-11-09 Nikolas Zimmermann <[email protected]>
svg failures after r99561
https://bugs.webkit.org/show_bug.cgi?id=71830
Reviewed by Antti Koivisto.
Fix regressions in svg/zoom/page/relative-sized-document-scrollbars.svg and svg/zoom/page/zoom-svg-as-relative-image.html.
Fix merging problem in r99561, bug 71780. It moved several methods from SVGLength to SVGLengthContext, and unfortunately
the SVGLength changes part of r98852, bug 47156, got reverted again, making these two tests fail.
* svg/SVGLengthContext.cpp:
(WebCore::SVGLengthContext::determineViewport):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (99668 => 99669)
--- trunk/Source/WebCore/ChangeLog 2011-11-09 09:14:10 UTC (rev 99668)
+++ trunk/Source/WebCore/ChangeLog 2011-11-09 09:15:48 UTC (rev 99669)
@@ -1,3 +1,17 @@
+2011-11-09 Nikolas Zimmermann <[email protected]>
+
+ svg failures after r99561
+ https://bugs.webkit.org/show_bug.cgi?id=71830
+
+ Reviewed by Antti Koivisto.
+
+ Fix regressions in svg/zoom/page/relative-sized-document-scrollbars.svg and svg/zoom/page/zoom-svg-as-relative-image.html.
+ Fix merging problem in r99561, bug 71780. It moved several methods from SVGLength to SVGLengthContext, and unfortunately
+ the SVGLength changes part of r98852, bug 47156, got reverted again, making these two tests fail.
+
+ * svg/SVGLengthContext.cpp:
+ (WebCore::SVGLengthContext::determineViewport):
+
2011-11-09 Rakesh KN <[email protected]>
Select multiple options with mouse drag in Select element.
Modified: trunk/Source/WebCore/svg/SVGLengthContext.cpp (99668 => 99669)
--- trunk/Source/WebCore/svg/SVGLengthContext.cpp 2011-11-09 09:14:10 UTC (rev 99668)
+++ trunk/Source/WebCore/svg/SVGLengthContext.cpp 2011-11-09 09:15:48 UTC (rev 99669)
@@ -282,6 +282,7 @@
if (!frame)
return false;
+ // SVGs embedded through <object> resolve percentage values against the owner renderer in the host document.
if (RenderPart* ownerRenderer = frame->ownerRenderer()) {
width = ownerRenderer->width();
height = ownerRenderer->height();
@@ -293,8 +294,14 @@
if (!view)
return false;
+ // Always resolve percentages against the unscaled viewport, as agreed across browsers.
+ float zoom = view->style()->effectiveZoom();
width = view->viewWidth();
height = view->viewHeight();
+ if (zoom != 1) {
+ width /= zoom;
+ height /= zoom;
+ }
return true;
}
@@ -302,12 +309,13 @@
SVGElement* viewportElement = m_context->viewportElement();
if (viewportElement && viewportElement->isSVG()) {
const SVGSVGElement* svg = static_cast<const SVGSVGElement*>(viewportElement);
- if (svg->hasAttribute(SVGNames::viewBoxAttr)) {
- width = svg->viewBox().width();
- height = svg->viewBox().height();
- } else {
+ FloatRect viewBox = svg->currentViewBoxRect();
+ if (viewBox.isEmpty()) {
width = svg->width().value(svg);
height = svg->height().value(svg);
+ } else {
+ width = viewBox.width();
+ height = viewBox.height();
}
return true;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes