| Summary: | Add support for the initial-letter CSS property to first-letter | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Dave Hyatt <hyatt> | ||||
| Component: | CSS | Assignee: | Dave Hyatt <hyatt> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | bjonesbe, commit-queue, jonlee, thorton, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=164150 | ||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 136841 | ||||||
| Attachments: |
|
||||||
|
Description
Dave Hyatt
2014-09-03 09:40:26 PDT
Created attachment 237561 [details]
Patch
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.
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. 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. 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? 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. |