[Webkit-unassigned] [Bug 132269] Document.contentType implementation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Dec 11 05:49:51 PST 2014


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

--- Comment #37 from Tibor Mészáros <tmeszaros.u-szeged at partner.samsung.com> ---
Comment on attachment 242800
  --> https://bugs.webkit.org/attachment.cgi?id=242800
Patch v7

View in context: https://bugs.webkit.org/attachment.cgi?id=242800&action=review

>> Source/WebCore/dom/Document.cpp:1388
>> +    if (!m_overriddenMIMEType.isEmpty())
> 
> I think maybe we want isNull here instead of isEmpty.

I changed it to isNull.

>> Source/WebCore/dom/Document.cpp:1391
>> +    if (DocumentLoader* documentLoader = this->loader())
> 
> No need for "this->" here.

removed.

>> Source/WebCore/dom/Document.cpp:1395
>> +    if (!mimeType.isEmpty())
> 
> I think maybe we want isNull here instead of isEmpty.

Changed it too.

>> Source/WebCore/loader/DocumentLoader.h:121
>>          WEBCORE_EXPORT void setResponseMIMEType(const String&);
> 
> Seems strange to put the new "mimeType" function between responseMIMEType and setResponseMIMEType, which were previously right next to each other. Can we find a better place for this?
> 
> Also, it’s confusing that we have a function named responseMIMEType and a second function named mimeType. Maybe we need a longer name for the new function.

I replaced it, now it's after the setResponseMIMEType function. Could you possibly suggest a better name for this simple getter?

>> Source/WebCore/xml/DOMParser.cpp:42
>> +        doc->overrideMIMEType(contentType);
> 
> Why is this conditional? What’s the downside to always calling overrideMIMEType unconditionally?

It was a previous fix, not necessary any more.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20141211/9be44222/attachment-0002.html>


More information about the webkit-unassigned mailing list