[Webkit-unassigned] [Bug 31115] New: [Qt] QWebFrame::setHtml() should be removed

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 4 06:20:39 PST 2009


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

           Summary: [Qt] QWebFrame::setHtml() should be removed
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Keywords: Qt
          Severity: Normal
          Priority: P3
         Component: WebKit Qt
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: jedrzej.nowacki at nokia.com


Hi,

  I think that the QWebFrame::setHtml() should be removed from the public API
or at least marked as obsolete/internal.

  Justification:
  a.  The name is confusing. Many users think that the method can be used for
XHTML too or for HTML with XHTML extensions. Even if sometimes it works (bug
29540), it is wrong, because implementation force a mime type (text/html).
  b.  The method is redundant. It can be easily replaced by the
QWebFrame::setContent(), which behave in the same manner with a defaults
arguments.
  c.  The name is confusing. The setHtml() "Sets the content of the web view to
the specified html" and the setContent() "Sets the content of the web view to
the specified content data", so what is difference between specified html and
content data? In my opinion "setContent" is a better name.
  d.  There is no way to override default mime type setting, even if given
source code is a correct XHTML or SVG file with DOCTYPE information.
  e.  The setContent() method is more flexible. For example it permits to
create a SVG based interface.
  f.  The load function is better choice if user have an URL. It is more
"intelligent", because it can guess a mime type from file name or HTTP header
(the information is lost if user load the file manually). So it maybe worth to
encourage users to use the load() if they can.

Connected bugs: 29457, 29461 (29540)

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



More information about the webkit-unassigned mailing list