WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
136484
Add support for the initial-letter CSS property to first-letter
https://bugs.webkit.org/show_bug.cgi?id=136484
Summary
Add support for the initial-letter CSS property to first-letter
Dave Hyatt
Reported
2014-09-03 09:40:26 PDT
Bug for adding initial-letter support to WebKit.
Attachments
Patch
(325.72 KB, patch)
2014-09-03 10:49 PDT
,
Dave Hyatt
dino
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Dave Hyatt
Comment 1
2014-09-03 10:49:25 PDT
Created
attachment 237561
[details]
Patch
WebKit Commit Bot
Comment 2
2014-09-03 10:50:32 PDT
Attachment 237561
[details]
did not pass style-queue: ERROR: Source/WebCore/rendering/RenderBlockFlow.cpp:2350: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WebCore/css/CSSLineBoxContainValue.h:38: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 2 in 33 files If any of these errors are false positives, please file a bug against check-webkit-style.
Dean Jackson
Comment 3
2014-09-03 11:11:03 PDT
Comment on
attachment 237561
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=237561&action=review
> Source/WebCore/css/CSSValueKeywords.in:974 > +initial-letter
Do you actually ever use this?
> Source/WebCore/platform/graphics/FontMetrics.h:102 > - > +
whoopsy
> Source/WebCore/rendering/RenderBlock.cpp:3484 > + while (actualCapHeight > desiredCapHeight) {
Would this ever be slow?
> Source/WebCore/rendering/RenderBlock.cpp:3487 > + newFontDescription.setComputedSize(newFontDescription.computedSize() -1);
Nit: missing space between - and 1
> Source/WebCore/rendering/style/RenderStyle.h:1087 > + const IntSize& initialLetter() const { return rareNonInheritedData->m_initialLetter; } > + int initialLetterDrop() const { return initialLetter().width(); } > + int initialLetterHeight() const { return initialLetter().height(); }
This is a bit weird - maybe initialLetter() should be private, so that people won't ever think that the IntSize.width() is an actual width.
> Source/WebCore/rendering/style/RenderStyle.h:1620 > + void setInitialLetter(const IntSize& size) { SET_VAR(rareNonInheritedData, m_initialLetter, size); }
Again, a bit weird that you need to know what is width and what is height.
Dave Hyatt
Comment 4
2014-09-03 12:27:01 PDT
Landed in
r173217
.
Tim Horton
Comment 5
2014-09-03 13:27:41 PDT
Build fix that I'm not 100% sure about in
http://trac.webkit.org/changeset/173221
; Dave, if you could check it that would be great.
Bem Jones-Bey
Comment 6
2014-09-03 16:56:32 PDT
Comment on
attachment 237561
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=237561&action=review
> Source/WebCore/css/CSSParser.cpp:2436 > + addProperty(propId, createPrimitiveValuePair(parsedValue1.release(), parsedValue2.release()), important);
This looks dangerous to me: in the case of only 1 value, you're release()ing it twice. Why is this ok here?
Tim Horton
Comment 7
2014-09-03 17:01:28 PDT
Comment on
attachment 237561
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=237561&action=review
>> Source/WebCore/css/CSSParser.cpp:2436 >> + addProperty(propId, createPrimitiveValuePair(parsedValue1.release(), parsedValue2.release()), important); > > This looks dangerous to me: in the case of only 1 value, you're release()ing it twice. Why is this ok here?
There are two RefPtrs; even if they point at the same thing they'll both own one reference apiece, and each release will move said reference into a PassRefPtr.
Radar WebKit Bug Importer
Comment 8
2014-11-11 09:53:25 PST
<
rdar://problem/18941449
>
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