[Webkit-unassigned] [Bug 23940] Use Document::createElement(const QualifiedName&, bool) when creating a known element inside WebCore

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 17 02:46:09 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=23940


ap at webkit.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #27635|review?                     |review-
               Flag|                            |




------- Comment #2 from ap at webkit.org  2009-02-17 02:46 PDT -------
(From update of attachment 27635)
@@ -969,9 +969,8 @@ void Document::setTitle(const String& ti
             m_titleElement = 0;
         else if (!m_titleElement) {
             if (HTMLElement* headElement = head()) {
+                m_titleElement = createElement(titleTag, false);
                 ExceptionCode ec = 0;
-                m_titleElement = createElement("title", ec);

I think that this changes the behavior for SVG documents - previously,
QualifiedName(nullAtom, "title", nullAtom) was used via createElement(). Is
this intentional? Please add a test case for this regardless.

-    RefPtr<Element> reportElement =
doc->createElementNS(HTMLNames::xhtmlNamespaceURI, "parsererror", ec);
-    reportElement->setAttribute(HTMLNames::styleAttr, "display: block;
white-space: pre; border: 2px solid #c77; padding: 0 1em 0 1em; margin: 1em;
background-color: #fdd; color: black");
+    RefPtr<Element> reportElement = doc->createElement(QualifiedName(nullAtom,
"parsererror", xhtmlNamespaceURI), true);

This changes createdByParser from false to true - is it intentional? I don't
see how that is correct.

Same question elsewhere in error header creation code.

-    // make the span to hold the tab
+    // Make the span to hold the tab

It's great to fix comments - we also prefer to have periods at the end of full
sentences.

I like this patch a lot! r- for now, to consider the comments.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list