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 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
694 markForLayoutAndParentResourceInvalidation(layoutObject); | 694 markForLayoutAndParentResourceInvalidation(layoutObject); |
695 return; | 695 return; |
696 } | 696 } |
697 | 697 |
698 if (fragmentIdentifier.startsWith("svgView(")) { | 698 if (fragmentIdentifier.startsWith("svgView(")) { |
699 if (!view) | 699 if (!view) |
700 view = currentView(); // Create the SVGViewSpec. | 700 view = currentView(); // Create the SVGViewSpec. |
701 | 701 |
702 view->inheritViewAttributesFromElement(this); | 702 view->inheritViewAttributesFromElement(this); |
703 | 703 |
704 if (view->parseViewSpec(fragmentIdentifier)) | 704 if (view->parseViewSpec(fragmentIdentifier)) { |
705 UseCounter::count(document(), UseCounter::SVGSVGElementFragmentSVGVi ew); | |
705 m_useCurrentView = true; | 706 m_useCurrentView = true; |
706 else | 707 } else { |
707 view->reset(); | 708 view->reset(); |
709 } | |
708 | 710 |
709 if (layoutObject && (hadUseCurrentView || m_useCurrentView)) | 711 if (layoutObject && (hadUseCurrentView || m_useCurrentView)) |
710 markForLayoutAndParentResourceInvalidation(layoutObject); | 712 markForLayoutAndParentResourceInvalidation(layoutObject); |
711 return; | 713 return; |
712 } | 714 } |
713 | 715 |
716 UseCounter::count(document(), UseCounter::SVGSVGElementFragment); | |
fs
2015/11/26 13:30:23
IIRC, this method still gets called when there's n
davve
2015/11/26 13:35:37
I only found one call-site, FrameView::processUrlF
fs
2015/11/26 13:38:36
Yes, in processUrlFragment we have:
// If our
davve
2015/11/26 13:43:20
Ouch, a !m_frame->document()->isSVGDocument() ther
| |
717 | |
714 // Spec: If the SVG fragment identifier addresses a 'view' element within an SVG document (e.g., MyDrawing.svg#MyView | 718 // Spec: If the SVG fragment identifier addresses a 'view' element within an SVG document (e.g., MyDrawing.svg#MyView |
715 // or MyDrawing.svg#xpointer(id('MyView'))) then the closest ancestor 'svg' element is displayed in the viewport. | 719 // or MyDrawing.svg#xpointer(id('MyView'))) then the closest ancestor 'svg' element is displayed in the viewport. |
716 // Any view specification attributes included on the given 'view' element ov erride the corresponding view specification | 720 // Any view specification attributes included on the given 'view' element ov erride the corresponding view specification |
717 // attributes on the closest ancestor 'svg' element. | 721 // attributes on the closest ancestor 'svg' element. |
718 // TODO(ed): The spec text above is a bit unclear. | 722 // TODO(ed): The spec text above is a bit unclear. |
719 // Should the transform from outermost svg to nested svg be applied to "disp lay" | 723 // Should the transform from outermost svg to nested svg be applied to "disp lay" |
720 // the inner svg in the viewport, then let the view element override the inn er | 724 // the inner svg in the viewport, then let the view element override the inn er |
721 // svg's view specification attributes. Should it fill/override the outer vi ewport? | 725 // svg's view specification attributes. Should it fill/override the outer vi ewport? |
722 if (isSVGViewElement(anchorNode)) { | 726 if (isSVGViewElement(anchorNode)) { |
723 SVGViewElement& viewElement = toSVGViewElement(*anchorNode); | 727 SVGViewElement& viewElement = toSVGViewElement(*anchorNode); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
769 visitor->trace(m_width); | 773 visitor->trace(m_width); |
770 visitor->trace(m_height); | 774 visitor->trace(m_height); |
771 visitor->trace(m_translation); | 775 visitor->trace(m_translation); |
772 visitor->trace(m_timeContainer); | 776 visitor->trace(m_timeContainer); |
773 visitor->trace(m_viewSpec); | 777 visitor->trace(m_viewSpec); |
774 SVGGraphicsElement::trace(visitor); | 778 SVGGraphicsElement::trace(visitor); |
775 SVGFitToViewBox::trace(visitor); | 779 SVGFitToViewBox::trace(visitor); |
776 } | 780 } |
777 | 781 |
778 } // namespace blink | 782 } // namespace blink |
OLD | NEW |