We have generic looking Element::pseudoElement(PseudoID) which only returns before/after pseudo elements.
Created attachment 209448 [details] patch
Comment on attachment 209448 [details] patch Attachment 209448 [details] did not pass gtk-ews (gtk): Output: http://webkit-queues.appspot.com/results/1528576
Created attachment 209534 [details] another
Comment on attachment 209534 [details] another Attachment 209534 [details] did not pass gtk-ews (gtk): Output: http://webkit-queues.appspot.com/results/1529786
Comment on attachment 209534 [details] another Attachment 209534 [details] did not pass gtk-ews (gtk): Output: http://webkit-queues.appspot.com/results/1557420
Comment on attachment 209534 [details] another View in context: https://bugs.webkit.org/attachment.cgi?id=209534&action=review r=me > Source/WebCore/dom/Element.cpp:2069 > + if (pseudoElementSpecifier != BEFORE && pseudoElementSpecifier != AFTER) > + return 0; > + return pseudoElementSpecifier == BEFORE ? host->beforePseudoElement() : host->afterPseudoElement(); This might look better as a switch. > Source/WebCore/dom/Element.cpp:2310 > +bool Element::updateExistingPseudoElement(PseudoElement* existing, Style::Change change) existing -> existingPseudoElement? > Source/WebCore/dom/Element.cpp:2341 > + if (PseudoElement* existing = beforePseudoElement()) { existing -> existingPseudoElement? > Source/WebCore/dom/Element.cpp:2352 > + if (PseudoElement* existing = afterPseudoElement()) { existing -> existingPseudoElement? > Source/WebCore/dom/Element.cpp:2396 > + if (!hasRareData()) > + return; This could be an assertion instead, if we moved the two clearFooPseudoElement() calls in clearStyleDerived... after the hasRareData check. > Source/WebCore/dom/Element.cpp:2404 > + if (!hasRareData()) > + return; Ditto.
https://trac.webkit.org/r154541