WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
10652
Need SVGFontFace*Element(s) DOM objects
https://bugs.webkit.org/show_bug.cgi?id=10652
Summary
Need SVGFontFace*Element(s) DOM objects
Eric Seidel (no email)
Reported
2006-08-31 01:29:09 PDT
Need SVGFontFace*Element(s) DOM objects To complete this bug would mean implementing one more more of the SVGFontFace*Element dom objects. By this I mean simple parsing and DOM element creation. Only once this is done can one actually implement a fontData() method for SVGFontElement
bug 10650
. Each of these DOM elements should be quite easy to create. This blocks
bug 10649
.
Attachments
partial fix
(51.18 KB, patch)
2007-10-04 23:02 PDT
,
Eric Seidel (no email)
no flags
Details
Formatted Diff
Diff
more complete fix (still not quite functional)
(84.37 KB, patch)
2007-10-05 10:19 PDT
,
Eric Seidel (no email)
no flags
Details
Formatted Diff
Diff
complete fix
(87.66 KB, patch)
2007-10-05 10:53 PDT
,
Eric Seidel (no email)
darin
: review-
Details
Formatted Diff
Diff
test case showing @font-face and <font-face>
(793 bytes, image/svg+xml)
2007-10-05 10:54 PDT
,
Eric Seidel (no email)
no flags
Details
test case showing font-face-src fallback (blocked by 15588)
(682 bytes, image/svg+xml)
2007-10-20 22:49 PDT
,
Eric Seidel (no email)
no flags
Details
improved complete fix (ignore the large project file changes)
(252.50 KB, patch)
2007-10-21 00:46 PDT
,
Eric Seidel (no email)
no flags
Details
Formatted Diff
Diff
improved complete fix (large file size is from project changes)
(298.02 KB, patch)
2007-10-21 01:37 PDT
,
Eric Seidel (no email)
hyatt
: review+
Details
Formatted Diff
Diff
possible cascade test (after hyatt's correction)
(671 bytes, image/svg+xml)
2007-10-22 16:53 PDT
,
Eric Seidel (no email)
no flags
Details
Fixed cascade test
(671 bytes, image/svg+xml)
2007-10-22 16:56 PDT
,
Eric Seidel (no email)
no flags
Details
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Eric Seidel (no email)
Comment 1
2007-10-04 23:01:21 PDT
Ok, now that hyatt has implemented @font-face, we can actually wire this up. I've created a patch to do just that. It parses and partially builds the font-face rule, but doesn't insert it yet. Still need to chat with hyatt about how to best do that.
Eric Seidel (no email)
Comment 2
2007-10-04 23:02:53 PDT
Created
attachment 16537
[details]
partial fix a partial fix (mostly just does parsing). Posting this so hyatt and others can more easily see what I've done.
Eric Seidel (no email)
Comment 3
2007-10-05 10:19:10 PDT
Created
attachment 16547
[details]
more complete fix (still not quite functional)
Eric Seidel (no email)
Comment 4
2007-10-05 10:53:53 PDT
Created
attachment 16548
[details]
complete fix I'll add some tests after discussion with hyatt.
Eric Seidel (no email)
Comment 5
2007-10-05 10:54:55 PDT
Created
attachment 16549
[details]
test case showing @font-face and <font-face>
Darin Adler
Comment 6
2007-10-05 14:38:41 PDT
Comment on
attachment 16548
[details]
complete fix + This file is part of the WebKit project We don't normally include that in headers. I'd prefer to just omit it. + class SVGDefinitionSrcElement : public SVGElement +{ +public: + SVGDefinitionSrcElement(const QualifiedName&, Document*); + virtual ~SVGDefinitionSrcElement(); + + virtual void childrenChanged(); +}; This looks indented wrong. Brace goes on same line as function definition. +namespace WebCore +{ Brace goes on same line as namespace. + virtual ~SVGDefinitionSrcElement(); There's no need to declare and define the destructor explicitly in a case like this where the destructor is already virtual, unless there's something about the constructor that you can't compile given just the header (like a data member that is a RefPtr for a type that's forward declared). For simple classes it's far better to remove it. +#define SVGDefinitionSrcElement_h +#if ENABLE(SVG) Normally we include "Platform.h" before using macros like ENABLE. +// Defined in CSSGrammar.y, but not in any header, so just declare it here for now. +int getPropertyID(const char* str, int len); Lets not replicate this hack. If we need to use this in more places, then lets fix the problem. +#if 0 + if (definitionSrc) + m_styleDeclaration->setProperty(CSS_PROP_DEFINITION_SRC, definitionSrc->getAttribute(XLinkNames::hrefAttr), false); +#endif Please don't check in code with #if 0; if you must please include a comment. I think we need some sort of deferral of the work in rebuildFontFace -- if you do a sequence of DOM modifications, the SVGFontFaceElement will keep rebuilding itself over and over again. Maybe we can make the style declaration get rebuild as part of recalcStyle?
Eric Seidel (no email)
Comment 7
2007-10-20 22:48:15 PDT
I discovered an ASSERT in @font-face code (
bug 15588
) which blocks landing of this, since that bug was only hidden by another bug in the @font-face { src:} parsing code (which my SVG font-face code does not share).
Eric Seidel (no email)
Comment 8
2007-10-20 22:49:31 PDT
Created
attachment 16759
[details]
test case showing font-face-src fallback (blocked by 15588)
Eric Seidel (no email)
Comment 9
2007-10-21 00:46:20 PDT
Created
attachment 16762
[details]
improved complete fix (ignore the large project file changes) This answers all of darin's concerns, except for recalcing the style selector every time a <font-face> element is changed. I agree, it's less that ideal, but I don't see a nice way to fix it short of registering each font-face element with the document and then marking the doc as "needing style selector recalc" -- a concept which doesn't exist yet.
Eric Seidel (no email)
Comment 10
2007-10-21 01:37:18 PDT
Created
attachment 16763
[details]
improved complete fix (large file size is from project changes) I added groupings to the JS generated bindings, similar to what the Obj-C generated bindings already had. These groupings explain the large project file diff (that and that this patch adds a bunch of files to the project).
Dave Hyatt
Comment 11
2007-10-22 15:48:05 PDT
Comment on
attachment 16763
[details]
improved complete fix (large file size is from project changes) Move the addition of the mapped element sheet rules to before the walking of the stylesheet list instead of after (in CSSStyleSelector's constructor). r=me
Eric Seidel (no email)
Comment 12
2007-10-22 16:53:02 PDT
Created
attachment 16812
[details]
possible cascade test (after hyatt's correction)
Eric Seidel (no email)
Comment 13
2007-10-22 16:56:15 PDT
Created
attachment 16813
[details]
Fixed cascade test
Eric Seidel (no email)
Comment 14
2007-10-22 17:50:13 PDT
Ah. So wonderful to finally have this in. Note that one test (svg/custom/font-face-fallback.svg) is disabled until
bug 15588
is fixed.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug