Title: [121751] trunk/Source/WebCore
- Revision
- 121751
- Author
- [email protected]
- Date
- 2012-07-03 02:49:46 -0700 (Tue, 03 Jul 2012)
Log Message
Web Inspector: [Elements] Text formatting is not retained when editing <script> or <style> contents as text
https://bugs.webkit.org/show_bug.cgi?id=90440
Reviewed by Vsevolod Vlasov.
* inspector/front-end/ElementsTreeOutline.js:
(WebInspector.ElementsTreeElement.prototype._startEditingTextNode):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (121750 => 121751)
--- trunk/Source/WebCore/ChangeLog 2012-07-03 09:28:41 UTC (rev 121750)
+++ trunk/Source/WebCore/ChangeLog 2012-07-03 09:49:46 UTC (rev 121751)
@@ -1,3 +1,13 @@
+2012-07-03 Alexander Pavlov <[email protected]>
+
+ Web Inspector: [Elements] Text formatting is not retained when editing <script> or <style> contents as text
+ https://bugs.webkit.org/show_bug.cgi?id=90440
+
+ Reviewed by Vsevolod Vlasov.
+
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeElement.prototype._startEditingTextNode):
+
2012-07-03 Vsevolod Vlasov <[email protected]>
Web Inspector: Save scroll selection and cursor position of SourceFrames in sources panel.
Modified: trunk/Source/WebCore/inspector/front-end/ElementsTreeOutline.js (121750 => 121751)
--- trunk/Source/WebCore/inspector/front-end/ElementsTreeOutline.js 2012-07-03 09:28:41 UTC (rev 121750)
+++ trunk/Source/WebCore/inspector/front-end/ElementsTreeOutline.js 2012-07-03 09:49:46 UTC (rev 121751)
@@ -1179,6 +1179,9 @@
if (WebInspector.isBeingEdited(textNode))
return true;
+ var container = textNode.enclosingNodeOrSelfWithClass("webkit-html-text-node");
+ if (container)
+ container.innerText = container.innerText; // Strip the CSS or JS highlighting if present.
var config = new WebInspector.EditingConfig(this._textNodeEditingCommitted.bind(this), this._editingCancelled.bind(this));
this._editing = WebInspector.startEditing(textNode, config);
window.getSelection().setBaseAndExtent(textNode, 0, textNode, 1);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes