Changeset 164983 in webkit
- Timestamp:
- Mar 3, 2014, 3:57:30 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
-
ChangeLog (modified) (1 diff)
-
svg/graphics/SVGImage.cpp (modified) (2 diffs)
-
svg/graphics/SVGImage.h (modified) (3 diffs)
-
svg/graphics/SVGImageForContainer.cpp (modified) (2 diffs)
-
svg/graphics/SVGImageForContainer.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r164981 r164983 1 2014-03-03 Antoine Quint <graouts@webkit.org> 2 3 Respect SVG fragment identifiers in <img> src attribute 4 https://bugs.webkit.org/show_bug.cgi?id=129387 5 6 Reviewed by Dirk Schulze. 7 8 Following Dirk Schulze's suggestion, we set the URL on the SVGImage itself and handle the URL's 9 fragment identifier at draw time in the SVGImage itself, which will provide a sounder base for 10 handling of fragment identifier in SVG resource URLs in CSS properties, and should also deal 11 with the crasher reported in http://webkit.org/b/129498 since there is a guaranteed Frame at the 12 time we call SVGImage::draw(). 13 14 * svg/graphics/SVGImage.cpp: 15 (WebCore::SVGImage::draw): 16 * svg/graphics/SVGImage.h: 17 * svg/graphics/SVGImageForContainer.cpp: 18 * svg/graphics/SVGImageForContainer.h: 19 1 20 2014-03-03 Laszlo Vidacs <lvidacs.u-szeged@partner.samsung.com> 2 21 -
trunk/Source/WebCore/svg/graphics/SVGImage.cpp
r163440 r164983 221 221 222 222 FrameView* view = frameView(); 223 ASSERT(view); 223 224 224 225 GraphicsContextStateSaver stateSaver(*context); … … 252 253 253 254 stateSaver.restore(); 255 256 if (!m_url.isEmpty()) 257 view->scrollToFragment(m_url); 254 258 255 259 if (imageObserver()) -
trunk/Source/WebCore/svg/graphics/SVGImage.h
r163440 r164983 29 29 30 30 #include "Image.h" 31 #include "URL.h" 31 32 32 33 namespace WebCore { … … 52 53 virtual bool isSVGImage() const override { return true; } 53 54 virtual IntSize size() const override { return m_intrinsicSize; } 55 56 void setURL(const URL& url) { m_url = url; } 54 57 55 58 virtual bool hasSingleSecurityOrigin() const override; … … 96 99 std::unique_ptr<Page> m_page; 97 100 IntSize m_intrinsicSize; 101 URL m_url; 98 102 }; 99 103 -
trunk/Source/WebCore/svg/graphics/SVGImageForContainer.cpp
r164804 r164983 26 26 #include "FrameView.h" 27 27 #include "Image.h" 28 #include "SVGImage.h"29 28 30 29 namespace WebCore { … … 55 54 } 56 55 57 void SVGImageForContainer::setURL(const URL& url)58 {59 m_image->frameView()->scrollToFragment(url);60 }61 62 56 } // namespace WebCore -
trunk/Source/WebCore/svg/graphics/SVGImageForContainer.h
r164804 r164983 47 47 virtual IntSize size() const override; 48 48 49 void setURL(const URL& );49 void setURL(const URL& url) { m_image->setURL(url); } 50 50 51 51 virtual bool usesContainerSize() const override { return m_image->usesContainerSize(); }
Note:
See TracChangeset
for help on using the changeset viewer.