WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 78698
Simplify CSSParser::parseFont.
https://bugs.webkit.org/show_bug.cgi?id=78698
Summary
Simplify CSSParser::parseFont.
Alexis Menard (darktears)
Reported
2012-02-15 04:58:51 PST
Simplify CSSParser::parseFont.
Attachments
Patch
(16.11 KB, patch)
2012-02-15 05:01 PST
,
Alexis Menard (darktears)
no flags
Details
Formatted Diff
Diff
Patch
(17.29 KB, patch)
2012-02-15 05:51 PST
,
Alexis Menard (darktears)
no flags
Details
Formatted Diff
Diff
Patch
(19.21 KB, patch)
2012-02-15 09:29 PST
,
Alexis Menard (darktears)
no flags
Details
Formatted Diff
Diff
Patch
(19.23 KB, patch)
2012-04-10 05:06 PDT
,
Alexis Menard (darktears)
no flags
Details
Formatted Diff
Diff
Patch
(22.77 KB, patch)
2012-04-20 14:51 PDT
,
Alexis Menard (darktears)
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Alexis Menard (darktears)
Comment 1
2012-02-15 05:01:40 PST
Created
attachment 127166
[details]
Patch
Alexis Menard (darktears)
Comment 2
2012-02-15 05:51:22 PST
Created
attachment 127169
[details]
Patch
WebKit Review Bot
Comment 3
2012-02-15 06:56:11 PST
Comment on
attachment 127169
[details]
Patch
Attachment 127169
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/11515784
New failing tests: fast/inspector-support/style.html fast/parser/style-script-head-test.html
Alexis Menard (darktears)
Comment 4
2012-02-15 09:29:04 PST
Created
attachment 127190
[details]
Patch
WebKit Review Bot
Comment 5
2012-02-15 09:30:15 PST
Attachment 127190
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/update-webkit']" exit_code: 2 Updating OpenSource git.webkit.org[0: 17.254.20.231]: errno=Connection refused fatal: unable to connect a socket (Connection refused) Died at Tools/Scripts/update-webkit line 162. If any of these errors are false positives, please file a bug against check-webkit-style.
Alexis Menard (darktears)
Comment 6
2012-04-10 05:06:03 PDT
Created
attachment 136429
[details]
Patch Rebased version
Antti Koivisto
Comment 7
2012-04-19 16:49:00 PDT
Comment on
attachment 136429
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=136429&action=review
> Source/WebCore/css/CSSParser.cpp:4314 > + if (!fontStyleParsed && parseValue(CSSPropertyFontStyle, important)) > + fontStyleParsed = true;
I think we should avoid calling to generic parseValue() from parseFont(). We already know what property this is so jumping through the huge switch seems like wasted work. Perhaps we could refactor this so that both parseValue and this can use the same helper functions.
> Source/WebCore/css/CSSParser.cpp:-4594 > - if (m_valueList->size() != 1) > - return false;
Only shorthand properties can have list longer than 1, right? You could assert for that.
Alexis Menard (darktears)
Comment 8
2012-04-20 14:51:25 PDT
Created
attachment 138169
[details]
Patch
Alexis Menard (darktears)
Comment 9
2012-04-20 14:53:03 PDT
(In reply to
comment #7
)
> (From update of
attachment 136429
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=136429&action=review
> > > Source/WebCore/css/CSSParser.cpp:4314 > > + if (!fontStyleParsed && parseValue(CSSPropertyFontStyle, important)) > > + fontStyleParsed = true; > > I think we should avoid calling to generic parseValue() from parseFont(). We already know what property this is so jumping through the huge switch seems like wasted work.
Fixed in the new version.
> > Perhaps we could refactor this so that both parseValue and this can use the same helper functions. > > > Source/WebCore/css/CSSParser.cpp:-4594 > > - if (m_valueList->size() != 1) > > - return false; > > Only shorthand properties can have list longer than 1, right? You could assert for that.
As discussed we don't really want to ASSERT in case of an invalid property, we just want to skip it.
Antti Koivisto
Comment 10
2012-04-23 06:44:00 PDT
Comment on
attachment 138169
[details]
Patch r=me
WebKit Review Bot
Comment 11
2012-04-23 07:27:12 PDT
Comment on
attachment 138169
[details]
Patch Clearing flags on attachment: 138169 Committed
r114895
: <
http://trac.webkit.org/changeset/114895
>
WebKit Review Bot
Comment 12
2012-04-23 07:27:18 PDT
All reviewed patches have been landed. Closing bug.
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