OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2007 Apple Inc. All rights reserved. |
5 * Copyright (C) 2014 Google, Inc. | 5 * Copyright (C) 2014 Google, Inc. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 LayoutSize scrollOffset(view->scrollOffset()); | 521 LayoutSize scrollOffset(view->scrollOffset()); |
522 scrollOffset.scale(zoomFactor); | 522 scrollOffset.scale(zoomFactor); |
523 transform.translate(-scrollOffset.width(), -scrollOffset.height(
)); | 523 transform.translate(-scrollOffset.width(), -scrollOffset.height(
)); |
524 } | 524 } |
525 } | 525 } |
526 } | 526 } |
527 | 527 |
528 return transform.multiply(viewBoxTransform); | 528 return transform.multiply(viewBoxTransform); |
529 } | 529 } |
530 | 530 |
531 bool SVGSVGElement::layoutObjectIsNeeded(const LayoutStyle& style) | 531 bool SVGSVGElement::layoutObjectIsNeeded(const ComputedStyle& style) |
532 { | 532 { |
533 // FIXME: We should respect display: none on the documentElement svg element | 533 // FIXME: We should respect display: none on the documentElement svg element |
534 // but many things in FrameView and SVGImage depend on the LayoutSVGRoot whe
n | 534 // but many things in FrameView and SVGImage depend on the LayoutSVGRoot whe
n |
535 // they should instead depend on the LayoutView. | 535 // they should instead depend on the LayoutView. |
536 // https://bugs.webkit.org/show_bug.cgi?id=103493 | 536 // https://bugs.webkit.org/show_bug.cgi?id=103493 |
537 if (document().documentElement() == this) | 537 if (document().documentElement() == this) |
538 return true; | 538 return true; |
539 return Element::layoutObjectIsNeeded(style); | 539 return Element::layoutObjectIsNeeded(style); |
540 } | 540 } |
541 | 541 |
542 LayoutObject* SVGSVGElement::createLayoutObject(const LayoutStyle&) | 542 LayoutObject* SVGSVGElement::createLayoutObject(const ComputedStyle&) |
543 { | 543 { |
544 if (isOutermostSVGSVGElement()) | 544 if (isOutermostSVGSVGElement()) |
545 return new LayoutSVGRoot(this); | 545 return new LayoutSVGRoot(this); |
546 | 546 |
547 return new LayoutSVGViewportContainer(this); | 547 return new LayoutSVGViewportContainer(this); |
548 } | 548 } |
549 | 549 |
550 Node::InsertionNotificationRequest SVGSVGElement::insertedInto(ContainerNode* ro
otParent) | 550 Node::InsertionNotificationRequest SVGSVGElement::insertedInto(ContainerNode* ro
otParent) |
551 { | 551 { |
552 if (rootParent->inDocument()) { | 552 if (rootParent->inDocument()) { |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
782 visitor->trace(m_width); | 782 visitor->trace(m_width); |
783 visitor->trace(m_height); | 783 visitor->trace(m_height); |
784 visitor->trace(m_translation); | 784 visitor->trace(m_translation); |
785 visitor->trace(m_timeContainer); | 785 visitor->trace(m_timeContainer); |
786 visitor->trace(m_viewSpec); | 786 visitor->trace(m_viewSpec); |
787 SVGGraphicsElement::trace(visitor); | 787 SVGGraphicsElement::trace(visitor); |
788 SVGFitToViewBox::trace(visitor); | 788 SVGFitToViewBox::trace(visitor); |
789 } | 789 } |
790 | 790 |
791 } // namespace blink | 791 } // namespace blink |
OLD | NEW |