[webkit-reviews] review granted: [Bug 5476] Dynamically adding <link>/<style> for CSS style sheet outside <head> fails to load style sheet : [Attachment 22269] Change the iteration in addStyleSheetCandidateNode to go from last to first

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 14 14:06:15 PDT 2008


Sam Weinig <sam at webkit.org> has granted Dave Hyatt <hyatt at apple.com>'s request
for review:
Bug 5476: Dynamically adding <link>/<style> for CSS style sheet outside <head>
fails to load style sheet
https://bugs.webkit.org/show_bug.cgi?id=5476

Attachment 22269: Change the iteration in addStyleSheetCandidateNode to go from
last to first
https://bugs.webkit.org/attachment.cgi?id=22269&action=edit

------- Additional Comments from Sam Weinig <sam at webkit.org>
You can use an early return here to 
+    if (createdByParser || m_styleSheetCandidateNodes.isEmpty())
+	 m_styleSheetCandidateNodes.add(node);
+    else {
+	 // Determine an appropriate insertion point.


Though this works, it might be cleaner to put the for-loop in an if-statement
instead.
+    if (!matchAuthorAndUserStyles)
+	 end = begin;
+    for (ListHashSet<Node*>::iterator it = begin; it != end; ++it) {


More information about the webkit-reviews mailing list