InsertIntoTextNodeCommand should get Settings from the Frame.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Feb 2014 18:39:13 +0000 (18:39 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Feb 2014 18:39:13 +0000 (18:39 +0000)
<https://webkit.org/b/128678>

EditCommands have a frame() accessor that returns a reference,
so there's no need to go through Document.

Reviewed by Anders Carlsson.

* editing/InsertIntoTextNodeCommand.cpp:
(WebCore::InsertIntoTextNodeCommand::doApply):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@164038 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/editing/InsertIntoTextNodeCommand.cpp

index 1742564b230419b880a9ddfc8241c224315c9637..a3b526e94a438a3286292cd15903d023ad180625 100644 (file)
@@ -1,3 +1,16 @@
+2014-02-13  Andreas Kling  <akling@apple.com>
+
+        InsertIntoTextNodeCommand should get Settings from the Frame.
+        <https://webkit.org/b/128678>
+
+        EditCommands have a frame() accessor that returns a reference,
+        so there's no need to go through Document.
+
+        Reviewed by Anders Carlsson.
+
+        * editing/InsertIntoTextNodeCommand.cpp:
+        (WebCore::InsertIntoTextNodeCommand::doApply):
+
 2014-02-13  László Langó  <llango.u-szeged@partner.samsung.com>
 
         Document should be constructable
index 370d4bf4e5b9861dc4653950b83afdfa5ad1e7c8..5107eec34024ab07dd675cb1fed0ec95735cec8a 100644 (file)
@@ -29,6 +29,7 @@
 #include "AXObjectCache.h"
 #include "Document.h"
 #include "ExceptionCodePlaceholder.h"
+#include "Frame.h"
 #include "RenderText.h"
 #include "Settings.h"
 #include "Text.h"
@@ -51,8 +52,7 @@ InsertIntoTextNodeCommand::InsertIntoTextNodeCommand(PassRefPtr<Text> node, unsi
 
 void InsertIntoTextNodeCommand::doApply()
 {
-    // FIXME: EditCommand should always have a Frame, so going through Document for Settings shouldn't be necessary.
-    bool passwordEchoEnabled = document().settings() && document().settings()->passwordEchoEnabled();
+    bool passwordEchoEnabled = frame().settings().passwordEchoEnabled();
     if (passwordEchoEnabled)
         document().updateLayoutIgnorePendingStylesheets();