+2007-01-14 Eric Seidel <eric@webkit.org>
+
+ Reviewed by hyatt.
+
+ SVG does not correctly handle float: left
+ http://bugs.webkit.org/show_bug.cgi?id=12210
+
+ * svg/custom/svg-float-border-padding-expected.checksum: Added.
+ * svg/custom/svg-float-border-padding-expected.png: Added.
+ * svg/custom/svg-float-border-padding-expected.txt: Added.
+ * svg/custom/svg-float-border-padding.xml: Added.
+
2007-01-14 Mitz Pettel <mitz@webkit.org>
Reviewed by Adam.
--- /dev/null
+76e4941eb091a37aa392f69051458d81
\ No newline at end of file
--- /dev/null
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x516
+ RenderBlock {html} at (0,0) size 800x516
+ RenderBody {body} at (8,8) size 784x492
+ RenderBlock (anonymous) at (0,0) size 784x18
+ RenderText {#text} at (0,0) size 639x18
+ text run at (0,0) width 241: "The two blocks should look identical. "
+ text run at (241,0) width 398: "One uses an SVG, and the other just uses a normal HTML div."
+ RenderBlock {p} at (0,34) size 784x18
+ RenderText {#text} at (0,0) size 354x18
+ text run at (0,0) width 354: "There should be a red, white and blue pattern below this"
+ RenderSVGContainer {svg} at (8,8) size 100x100
+ RenderPath {rect} at (8,8) size 100x100 [fill={[type=SOLID] [color=#0000FF]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+ RenderBlock {p} at (0,228) size 784x18
+ RenderText {#text} at (0,0) size 353x18
+ text run at (0,0) width 353: "There should be a red, white and blue pattern above this"
+ RenderBlock {hr} at (0,262) size 784x2 [border: (1px inset #000000)]
+ RenderBlock {p} at (0,280) size 784x18
+ RenderText {#text} at (0,0) size 354x18
+ text run at (0,0) width 354: "There should be a red, white and blue pattern below this"
+ RenderBlock (floating) {div} at (10,324) size 140x140 [border: (10px solid #FF0000)]
+ RenderBlock {div} at (20,20) size 100x100 [bgcolor=#0000FF]
+ RenderBlock {p} at (0,474) size 784x18
+ RenderText {#text} at (0,0) size 353x18
+ text run at (0,0) width 353: "There should be a red, white and blue pattern above this"
--- /dev/null
+<html xmlns='http://www.w3.org/1999/xhtml'>
+ <body>
+ The two blocks should look identical. One uses an SVG, and the other just uses a normal HTML div.
+
+ <p>There should be a red, white and blue pattern below this</p>
+ <svg xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' style='float: left; border:10px solid red; padding:10px; margin:10px'>
+ <rect width='100' height='100' fill='blue' />
+ </svg>
+ <p style='clear: left'>There should be a red, white and blue pattern above this</p>
+
+ <hr/>
+
+ <p>There should be a red, white and blue pattern below this</p>
+ <div style='width:120px; height:120px; float: left; border:10px solid red; margin:10px'>
+ <div style="width:100px;height:100px;background-color:blue; margin:10px;"></div>
+ </div>
+ <p style='clear: left'>There should be a red, white and blue pattern above this</p>
+
+
+
+ </body>
+</html>
+2007-01-14 Eric Seidel <eric@webkit.org>
+
+ Reviewed by hyatt.
+
+ SVG does not correctly handle float: left
+ http://bugs.webkit.org/show_bug.cgi?id=12210
+
+ Test: svg/custom/svg-float-border-padding.xml
+
+ * rendering/RenderSVGContainer.cpp:
+ (WebCore::RenderSVGContainer::paint):
+
2007-01-14 David Hyatt <hyatt@apple.com>
More work to fix 10145, regression where form elements don't break properly. Make sure to really use
(WebCore::GraphicsContext::setPlatformStrokeThickness):
(WebCore::GraphicsContext::setPlatformFillColor):
-2007-01-13 Eric Seidel <eric@eseidel.com>
+2007-01-13 Eric Seidel <eric@webkit.org>
Reviewed by hyatt.
if (paintInfo.context->paintingDisabled())
return;
+ // This should only exist for <svg> renderers
if (hasBoxDecorations() && (paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection))
- paintBoxDecorations(paintInfo, parentX, parentY);
+ paintBoxDecorations(paintInfo, m_x + parentX, m_y + parentY);
if ((paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSelfOutline) && style()->outlineWidth() && style()->visibility() == VISIBLE)
paintOutline(paintInfo.context, parentX, parentY, width(), height(), style());
paintInfo.context->save();
- if (parentX != 0 || parentY != 0) {
+ if (!parent()->isSVGContainer()) {
// Translate from parent offsets (html renderers) to a relative transform (svg renderers)
- paintInfo.context->concatCTM(AffineTransform().translate(parentX, parentY));
+ IntPoint origin;
+ origin.move(parentX, parentY);
+ origin.move(m_x, m_y);
+ origin.move(borderLeft(), borderTop());
+ origin.move(paddingLeft(), paddingTop());
+ if (origin.x() || origin.y())
+ paintInfo.context->concatCTM(AffineTransform().translate(origin.x(), origin.y()));
parentX = parentY = 0;
+ } else {
+ // Only the root <svg> element should need any translations using the HTML system
+ ASSERT(parentX == 0);
+ ASSERT(parentY == 0);
+ ASSERT(m_x == 0);
+ ASSERT(m_y == 0);
}
if (!viewport().isEmpty()) {