Title: [130191] trunk/Source/WebKit/chromium
Revision
130191
Author
commit-qu...@webkit.org
Date
2012-10-02 11:51:35 -0700 (Tue, 02 Oct 2012)

Log Message

WebDocument doesn't export document language to outside users.
https://bugs.webkit.org/show_bug.cgi?id=98066

Patch by Brian White <bcwh...@chromium.org> on 2012-10-02
Reviewed by Adam Barth.

Chromium uses the document language to offer translation.  It's been doing
its own detection of this property but it would be better to get it from
existing extraction code.

* public/WebDocument.h:
(WebDocument):
* src/WebDocument.cpp:
(WebKit::WebDocument::contentLanguage):
(WebKit):

Modified Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (130190 => 130191)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-10-02 18:41:05 UTC (rev 130190)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-10-02 18:51:35 UTC (rev 130191)
@@ -1,3 +1,20 @@
+2012-10-02  Brian White  <bcwh...@chromium.org>
+
+        WebDocument doesn't export document language to outside users.
+        https://bugs.webkit.org/show_bug.cgi?id=98066
+
+        Reviewed by Adam Barth.
+
+        Chromium uses the document language to offer translation.  It's been doing
+        its own detection of this property but it would be better to get it from
+        existing extraction code.
+
+        * public/WebDocument.h:
+        (WebDocument):
+        * src/WebDocument.cpp:
+        (WebKit::WebDocument::contentLanguage):
+        (WebKit):
+
 2012-10-02  Vangelis Kokkevis  <vange...@chromium.org>
 
         Remove call to FinishAllRendering when in force-compositing-mode.

Modified: trunk/Source/WebKit/chromium/public/WebDocument.h (130190 => 130191)


--- trunk/Source/WebKit/chromium/public/WebDocument.h	2012-10-02 18:41:05 UTC (rev 130190)
+++ trunk/Source/WebKit/chromium/public/WebDocument.h	2012-10-02 18:51:35 UTC (rev 130191)
@@ -79,6 +79,7 @@
     WEBKIT_EXPORT WebSecurityOrigin securityOrigin() const;
 
     WEBKIT_EXPORT WebString encoding() const;
+    WEBKIT_EXPORT WebString contentLanguage() const;
 
     // The url of the OpenSearch Desription Document (if any).
     WEBKIT_EXPORT WebURL openSearchDescriptionURL() const;

Modified: trunk/Source/WebKit/chromium/src/WebDocument.cpp (130190 => 130191)


--- trunk/Source/WebKit/chromium/src/WebDocument.cpp	2012-10-02 18:41:05 UTC (rev 130190)
+++ trunk/Source/WebKit/chromium/src/WebDocument.cpp	2012-10-02 18:51:35 UTC (rev 130191)
@@ -81,6 +81,11 @@
     return constUnwrap<Document>()->encoding();
 }
 
+WebString WebDocument::contentLanguage() const
+{
+    return constUnwrap<Document>()->contentLanguage();
+}
+
 WebURL WebDocument::openSearchDescriptionURL() const
 {
     return const_cast<Document*>(constUnwrap<Document>())->openSearchDescriptionURL();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to