Bug 82242 - Remove Document::mappedElementSheet()
Summary: Remove Document::mappedElementSheet()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 82339
Blocks: 77745
  Show dependency treegraph
 
Reported: 2012-03-26 13:51 PDT by Antti Koivisto
Modified: 2012-04-11 20:55 PDT (History)
5 users (show)

See Also:


Attachments
patch (11.87 KB, patch)
2012-03-26 14:05 PDT, Antti Koivisto
webkit-ews: commit-queue-
Details | Formatted Diff | Diff
Try to fix qt build (12.19 KB, patch)
2012-03-27 02:51 PDT, Antti Koivisto
webkit-ews: commit-queue-
Details | Formatted Diff | Diff
moved the map to SVGDocumentExtensions (14.58 KB, patch)
2012-03-27 04:02 PDT, Antti Koivisto
webkit-ews: commit-queue-
Details | Formatted Diff | Diff
test SVG_FONTS instead of SVG (14.33 KB, patch)
2012-03-27 04:29 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2012-03-26 13:51:09 PDT
Only thing this is used for anymore is SVGFontFaceElement. That can be handled without confusing extra stylesheets.
Comment 1 Antti Koivisto 2012-03-26 14:05:51 PDT
Created attachment 133889 [details]
patch
Comment 2 Early Warning System Bot 2012-03-26 15:31:21 PDT
Comment on attachment 133889 [details]
patch

Attachment 133889 [details] did not pass qt-wk2-ews (qt):
Output: http://queues.webkit.org/results/12141126
Comment 3 Early Warning System Bot 2012-03-26 15:46:43 PDT
Comment on attachment 133889 [details]
patch

Attachment 133889 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/12076033
Comment 4 Andreas Kling 2012-03-26 15:55:35 PDT
Comment on attachment 133889 [details]
patch

TD;DR but it looks pretty good. Fix the build and slap me for an r+ tomorrow.
Comment 5 Antti Koivisto 2012-03-27 02:51:19 PDT
Created attachment 134010 [details]
Try to fix qt build
Comment 6 Early Warning System Bot 2012-03-27 03:03:45 PDT
Comment on attachment 134010 [details]
Try to fix qt build 

Attachment 134010 [details] did not pass qt-wk2-ews (qt):
Output: http://queues.webkit.org/results/12147392
Comment 7 Early Warning System Bot 2012-03-27 03:06:22 PDT
Comment on attachment 134010 [details]
Try to fix qt build 

Attachment 134010 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/12142409
Comment 8 Nikolas Zimmermann 2012-03-27 03:06:57 PDT
Comment on attachment 134010 [details]
Try to fix qt build 

View in context: https://bugs.webkit.org/attachment.cgi?id=134010&action=review

> Source/WebCore/dom/Document.h:638
> +    HashSet<SVGFontFaceElement*>& svgFontFaceElements();

As discussed on IRC, this needs ENABLE(SVG) guards, and should be moved right into SVGDocumentExtensions.
Comment 9 Antti Koivisto 2012-03-27 04:02:26 PDT
Created attachment 134017 [details]
moved the map to SVGDocumentExtensions
Comment 10 Early Warning System Bot 2012-03-27 04:14:39 PDT
Comment on attachment 134017 [details]
moved the map to SVGDocumentExtensions

Attachment 134017 [details] did not pass qt-wk2-ews (qt):
Output: http://queues.webkit.org/results/12147423
Comment 11 Early Warning System Bot 2012-03-27 04:18:22 PDT
Comment on attachment 134017 [details]
moved the map to SVGDocumentExtensions

Attachment 134017 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/12142434
Comment 12 Antti Koivisto 2012-03-27 04:29:31 PDT
Created attachment 134021 [details]
test SVG_FONTS instead of SVG
Comment 13 Andreas Kling 2012-03-27 04:35:40 PDT
Comment on attachment 134021 [details]
test SVG_FONTS instead of SVG

Me gusta.
Comment 14 Nikolas Zimmermann 2012-03-27 04:41:30 PDT
Comment on attachment 134021 [details]
test SVG_FONTS instead of SVG

View in context: https://bugs.webkit.org/attachment.cgi?id=134021&action=review

r=me with comments:

> Source/WebCore/svg/SVGDocumentExtensions.cpp:421
> +void SVGDocumentExtensions::registerSVGFontFaceElement(SVGFontFaceElement* element)

How about checking in the SVGDocExt dtor that this set is empty? I'm not sure we do it for the others, but we should do so to catch missing unregister() calls.
I hope removedFromDocument is guaranteed to be called :-)
Comment 15 Antti Koivisto 2012-03-27 05:41:10 PDT
http://trac.webkit.org/changeset/112258
Comment 16 Csaba Osztrogonác 2012-03-27 07:30:01 PDT
Reopen, because it broke debug builds on Qt:
../../../../Source/WebCore/svg/SVGDocumentExtensions.cpp: In destructor ‘WebCore::SVGDocumentExtensions::~SVGDocumentExtensions()’:
../../../../Source/WebCore/svg/SVGDocumentExtensions.cpp:53: error: ‘m_svgFontFaceElements’ was not declared in this scope

Additionally it made almost all tests assert:
STDERR: ASSERTION FAILED: m_svgFontFaceElements.isEmpty()
STDERR: ../../Source/WebCore/svg/SVGDocumentExtensions.cpp(53) : WebCore::SVGDocumentExtensions::~SVGDocumentExtensions()
Comment 17 Antti Koivisto 2012-03-27 08:03:16 PDT
Removed the assert in ~SVGDocumentExtensions in http://trac.webkit.org/changeset/112269. It seems insertedInto/removedFromDocument don't always pair.