Steps to reproduce: 1. Load <http://sahilparikh.com/post/46741689726/building-a-saas-business-2007-vs-2013#> in a WebKit nightly 2. Open the Safari Web Inspector 3. Click on the layers pane 4. *crash* The issue here is that a CSS rule using the :first-letter pseudo-element creates a composited layer (due to "backface-visilibity: hidden") and the InspectorLayerTreeAgent doesn't know how to handle such "special" RenderObjects. As a result, we get a null Node and when we ask for its nodeId, we eventually crash. We should be both more protective of unknown nodes and handle anonymous RenderObjects specifically.
<rdar://problem/13555463>
Created attachment 196169 [details] Patch
Comment on attachment 196169 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=196169&action=review > Source/WebCore/inspector/InspectorLayerTreeAgent.cpp:206 > + RenderStyle* style = renderer->style(); > + if (style) { FWIW, this can be simplified to: if (RenderStyle* style = renderer->style()) {
Comment on attachment 196169 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=196169&action=review > Source/WebCore/inspector/InspectorLayerTreeAgent.cpp:175 > + else if (isReflection || isAnonymous) > node = renderer->parent()->node(); Does this always work? What about a :first-letter inside a :first-line?
(In reply to comment #4) > (From update of attachment 196169 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=196169&action=review > > > Source/WebCore/inspector/InspectorLayerTreeAgent.cpp:175 > > + else if (isReflection || isAnonymous) > > node = renderer->parent()->node(); > > Does this always work? What about a :first-letter inside a :first-line? Per my testing, that works too. I haven't found a way to have a ::first-letter be composited though, animations don't apply, neither do transforms, etc.
Created attachment 196313 [details] Patch for landing
<rdar://problem/13544596>
Comment on attachment 196313 [details] Patch for landing Clearing flags on attachment: 196313 Committed r147538: <http://trac.webkit.org/changeset/147538>
All reviewed patches have been landed. Closing bug.