If content is styled both via ::first-letter and then an @region applies to it, too, then the properties set via ::first-letter are discarded. However, if font-size is specified, the box for the first letter will be the same as if font-size applies, but the actual letter is displayed without the font-size specified in ::first-letter. See attached ref-test for a clearer picture of the problem (the letter 'M' should be 2.5em tall, italic and monospace; all the text should be green).
Created attachment 189031 [details] Ref test highlighting the problem
Created attachment 189274 [details] Patch
Created attachment 190792 [details] Patch
Comment on attachment 190792 [details] Patch Attachment 190792 [details] did not pass chromium-ews (chromium-xvfb): Output: http://webkit-commit-queue.appspot.com/results/16775977 New failing tests: css3/flexbox/inline-flex-crash2.html css3/flexbox/flexbox-ignore-container-firstLetter.html css3/flexbox/flexbox-ignore-firstLetter.html css3/flexbox/inline-flex-crash.html
Comment on attachment 190792 [details] Patch Attachment 190792 [details] did not pass mac-ews (mac): Output: http://webkit-commit-queue.appspot.com/results/16672719
Comment on attachment 190792 [details] Patch Attachment 190792 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-commit-queue.appspot.com/results/16766317 New failing tests: css3/flexbox/inline-flex-crash2.html css3/flexbox/flexbox-ignore-container-firstLetter.html css3/flexbox/flexbox-ignore-firstLetter.html css3/flexbox/inline-flex-crash.html
Created attachment 191446 [details] Patch
Comment on attachment 191446 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=191446&action=review > Source/WebCore/ChangeLog:1 > +2013-02-20 Takashi Sakamoto <tasak@google.com> This is an informal review, please feel free to ignore it. > Source/WebCore/ChangeLog:8 > + While RenderRegion updates styles, it should consider the case, In fact, you are talking about RenderRegion computing the styles in region for elements that are displayed inside the region. > Source/WebCore/ChangeLog:17 > + Added one more parameter, regionForStyling, to see a pseudo style in see = set > Source/WebCore/ChangeLog:20 > + (StyleResolver): You can get rid of lines like this in Changelogs. > Source/WebCore/ChangeLog:26 > + (WebCore): I would rather put the method on the RenderBlock class itself rather than put it in the header file. > Source/WebCore/rendering/RenderRegion.cpp:533 > +{ Please add an ASSERT here that your object is really an anonymous one. > Source/WebCore/rendering/RenderRegion.cpp:536 > + RenderStyle* parentStyle; If you do: RenderStyle* parentStyle = parent->style(), you may get rid of the else statement. > LayoutTests/fast/regions/pseudo-first-letter-inside-flowthread.html:28 > +<span>Morem ipsum dolor sit amet, consectetur adipisicing elit. Assumenda ipsam rem fugit accusantium fugiat ea.</span> Should be Lorem ... here right? :) I mean L instead of M. Or you can as well put a meaningful text, like what is this test for (I would also like to have a reference to the bug you are trying to solve).
Created attachment 191947 [details] Patch
Created attachment 191953 [details] Patch
Comment on attachment 191446 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=191446&action=review >> Source/WebCore/ChangeLog:8 >> + While RenderRegion updates styles, it should consider the case, > > In fact, you are talking about RenderRegion computing the styles in region for elements that are displayed inside the region. I changed the description. >> Source/WebCore/ChangeLog:17 >> + Added one more parameter, regionForStyling, to see a pseudo style in > > see = set Done. >> Source/WebCore/ChangeLog:26 >> + (WebCore): > > I would rather put the method on the RenderBlock class itself rather than put it in the header file. I see. Done. >> Source/WebCore/rendering/RenderRegion.cpp:533 >> +{ > > Please add an ASSERT here that your object is really an anonymous one. I see. Done. >> Source/WebCore/rendering/RenderRegion.cpp:536 >> + RenderStyle* parentStyle; > > If you do: RenderStyle* parentStyle = parent->style(), you may get rid of the else statement. Done. >> LayoutTests/fast/regions/pseudo-first-letter-inside-flowthread.html:28 >> +<span>Morem ipsum dolor sit amet, consectetur adipisicing elit. Assumenda ipsam rem fugit accusantium fugiat ea.</span> > > Should be Lorem ... here right? :) I mean L instead of M. Or you can as well put a meaningful text, like what is this test for (I would also like to have a reference to the bug you are trying to solve). I see. Done.
Comment on attachment 191953 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=191953&action=review > Source/WebCore/rendering/RenderRegion.cpp:540 > + const PseudoStyleRequest pseudoStyleRequest(FIRST_LETTER); Scope these correctly inside the inner if. > Source/WebCore/rendering/RenderRegion.cpp:541 > + parentStyle = parent->firstLineStyle(); This will override the parentStyle if you fall through this if into the createAnonymousStyleWithDisplay below, is that intended? Seems safer to just use parent->style() in each place and not have this local. > Source/WebCore/rendering/RenderRegion.cpp:546 > + return styleInRegion.release(); Is it actually possible for this to be null? How would we have a first-letter render object but no style?
Still repros on today's nightly (r151543)
Comment on attachment 191953 [details] Patch Clearing review flag on patches from before 2014. If this patch is still relevant, please reset the r? flag.
CSS Regions were removed in Bug 174978.