<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:darin@apple.com" title="Darin Adler <darin@apple.com>"> <span class="fn">Darin Adler</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - Selector checker should not mutate document and style"
href="https://bugs.webkit.org/show_bug.cgi?id=153205">bug 153205</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Attachment #269223 Flags</td>
<td>review?
</td>
<td>review+
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Selector checker should not mutate document and style"
href="https://bugs.webkit.org/show_bug.cgi?id=153205#c6">Comment # 6</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Selector checker should not mutate document and style"
href="https://bugs.webkit.org/show_bug.cgi?id=153205">bug 153205</a>
from <span class="vcard"><a class="email" href="mailto:darin@apple.com" title="Darin Adler <darin@apple.com>"> <span class="fn">Darin Adler</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=269223&action=diff" name="attach_269223" title="patch">attachment 269223</a> <a href="attachment.cgi?id=269223&action=edit" title="patch">[details]</a></span>
patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=269223&action=review">https://bugs.webkit.org/attachment.cgi?id=269223&action=review</a>
<span class="quote">> Source/WebCore/css/SelectorChecker.cpp:91
> + checkingContext.styleRelations.append({ const_cast<Element&>(element), type, value });</span >
A little strange that we end up using the const_cast here. Any way to avoid it in future? I guess you are focusing on using const here more to express the fact that we won’t be setting flags and such on the Element.
<span class="quote">> Source/WebCore/css/SelectorChecker.cpp:1014
> + LocalContext subContext(context);</span >
The coined word “subcontext” is a single word and it should not have a capital "C" in it.
<span class="quote">> Source/WebCore/css/SelectorCheckerTestFunctions.h:66
> +ALWAYS_INLINE bool isMediaDocument(const Element* element)</span >
This requires a non-null pointer, so I would have expected it to take a reference. Then I thought there was some assembly-language-related reason these have to take pointers, but I noticed that isChecked takes a reference.
<span class="quote">> Source/WebCore/css/SelectorCheckerTestFunctions.h:86
> +ALWAYS_INLINE bool isInRange(const Element* element)</span >
Ditto.
<span class="quote">> Source/WebCore/css/SelectorCheckerTestFunctions.h:91
> +ALWAYS_INLINE bool isOutOfRange(const Element* element)</span >
Ditto.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>