Title: [91951] trunk/Source/WebKit/chromium
- Revision
- 91951
- Author
- [email protected]
- Date
- 2011-07-28 15:00:51 -0700 (Thu, 28 Jul 2011)
Log Message
[Chromium] Remove WebDocument::insertStyleText
https://bugs.webkit.org/show_bug.cgi?id=65332
Reviewed by Tony Chang.
As of http://crrev.com/94499 no Chromium code calls this anymore.
Also does a bit of #include cleanup.
* public/WebDocument.h:
* src/WebDocument.cpp:
Modified Paths
Diff
Modified: trunk/Source/WebKit/chromium/ChangeLog (91950 => 91951)
--- trunk/Source/WebKit/chromium/ChangeLog 2011-07-28 21:38:36 UTC (rev 91950)
+++ trunk/Source/WebKit/chromium/ChangeLog 2011-07-28 22:00:51 UTC (rev 91951)
@@ -1,3 +1,16 @@
+2011-07-28 Mihai Parparita <[email protected]>
+
+ [Chromium] Remove WebDocument::insertStyleText
+ https://bugs.webkit.org/show_bug.cgi?id=65332
+
+ Reviewed by Tony Chang.
+
+ As of http://crrev.com/94499 no Chromium code calls this anymore.
+ Also does a bit of #include cleanup.
+
+ * public/WebDocument.h:
+ * src/WebDocument.cpp:
+
2011-07-27 Fady Samuel <[email protected]>
Added a Chromium WebKit API method to set the minimum row height of a popup listbox.
Modified: trunk/Source/WebKit/chromium/public/WebDocument.h (91950 => 91951)
--- trunk/Source/WebKit/chromium/public/WebDocument.h 2011-07-28 21:38:36 UTC (rev 91950)
+++ trunk/Source/WebKit/chromium/public/WebDocument.h 2011-07-28 22:00:51 UTC (rev 91951)
@@ -31,9 +31,9 @@
#ifndef WebDocument_h
#define WebDocument_h
-#include "WebFormElement.h"
#include "WebNode.h"
#include "WebSecurityOrigin.h"
+#include "WebVector.h"
#if WEBKIT_IMPLEMENTATION
namespace WebCore {
@@ -47,6 +47,7 @@
class WebAccessibilityObject;
class WebDocumentType;
class WebElement;
+class WebFormElement;
class WebFrame;
class WebNodeCollection;
class WebNodeList;
@@ -99,15 +100,6 @@
WEBKIT_API WebDocumentType doctype() const;
WEBKIT_API WebAccessibilityObject accessibilityObject() const;
- // Insert the given text as a STYLE element at the beginning of the
- // document. |elementId| can be empty, but if specified then it is used
- // as the id for the newly inserted element (replacing an existing one
- // with the same id, if any).
- // FIXME: Remove this once Chromium callers have been updated to call
- // insertUserStyleSheet instead.
- WEBKIT_API bool insertStyleText(const WebString& styleText,
- const WebString& elementId);
-
// Inserts the given CSS source code as a user stylesheet in the document.
// Meant for programatic/one-off injection, as opposed to
// WebView::addUserStyleSheet which inserts styles for the lifetime of the
Modified: trunk/Source/WebKit/chromium/src/WebDocument.cpp (91950 => 91951)
--- trunk/Source/WebKit/chromium/src/WebDocument.cpp 2011-07-28 21:38:36 UTC (rev 91950)
+++ trunk/Source/WebKit/chromium/src/WebDocument.cpp 2011-07-28 22:00:51 UTC (rev 91951)
@@ -43,12 +43,12 @@
#include "HTMLElement.h"
#include "HTMLFormElement.h"
#include "HTMLHeadElement.h"
-#include "HTMLNames.h"
#include "NodeList.h"
#include "WebAccessibilityObject.h"
#include "WebDocumentType.h"
#include "WebElement.h"
+#include "WebFormElement.h"
#include "WebFrameImpl.h"
#include "WebNodeCollection.h"
#include "WebNodeList.h"
@@ -179,35 +179,6 @@
document->axObjectCache()->getOrCreate(document->renderer()));
}
-bool WebDocument::insertStyleText(const WebString& styleText, const WebString& elementId)
-{
- RefPtr<Document> document = unwrap<Document>();
- RefPtr<Element> documentElement = document->documentElement();
- if (!documentElement)
- return false;
-
- ExceptionCode err = 0;
-
- if (!elementId.isEmpty()) {
- Element* oldElement = document->getElementById(elementId);
- if (oldElement) {
- Node* parent = oldElement->parentNode();
- if (!parent)
- return false;
- parent->removeChild(oldElement, err);
- }
- }
-
- RefPtr<Element> stylesheet = document->createElement(HTMLNames::styleTag, false);
- if (!elementId.isEmpty())
- stylesheet->setAttribute(HTMLNames::idAttr, elementId);
- stylesheet->setTextContent(styleText, err);
- ASSERT(!err);
- bool success = documentElement->insertBefore(stylesheet, documentElement->firstChild(), err);
- ASSERT(success);
- return success;
-}
-
void WebDocument::insertUserStyleSheet(const WebString& sourceCode, UserStyleLevel level)
{
RefPtr<Document> document = unwrap<Document>();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes