Diff
Modified: branches/safari-537.77-branch/LayoutTests/ChangeLog (169221 => 169222)
--- branches/safari-537.77-branch/LayoutTests/ChangeLog 2014-05-22 21:40:21 UTC (rev 169221)
+++ branches/safari-537.77-branch/LayoutTests/ChangeLog 2014-05-22 21:45:45 UTC (rev 169222)
@@ -1,5 +1,23 @@
2014-05-22 Dana Burkart <[email protected]>
+ Merge r168641
+
+ 2014-05-09 Jon Honeycutt <[email protected]>
+
+ REGRESSION (r167818): editing/inserting/typing-space-to-trigger-smart-link.html fails on WebKit1 bots
+
+ <https://bugs.webkit.org/show_bug.cgi?id=132207>
+ <rdar://problem/16730393>
+
+ Reviewed by Darin Adler.
+
+ * editing/apply-style-iframe-crash-expected.txt:
+ Rebased test result has one fewer new line.
+ * platform/mac-wk1/TestExpectations:
+ Remove test from list of expected failures.
+
+2014-05-22 Dana Burkart <[email protected]>
+
Merge r167818
2014-04-23 Jon Honeycutt <[email protected]>
Modified: branches/safari-537.77-branch/LayoutTests/editing/apply-style-iframe-crash-expected.txt (169221 => 169222)
--- branches/safari-537.77-branch/LayoutTests/editing/apply-style-iframe-crash-expected.txt 2014-05-22 21:40:21 UTC (rev 169221)
+++ branches/safari-537.77-branch/LayoutTests/editing/apply-style-iframe-crash-expected.txt 2014-05-22 21:45:45 UTC (rev 169222)
@@ -1,5 +1,4 @@
-
PASS
WebKit bug #132103: Crash applying editing commands from iframe onload event.
Modified: branches/safari-537.77-branch/Source/WebCore/ChangeLog (169221 => 169222)
--- branches/safari-537.77-branch/Source/WebCore/ChangeLog 2014-05-22 21:40:21 UTC (rev 169221)
+++ branches/safari-537.77-branch/Source/WebCore/ChangeLog 2014-05-22 21:45:45 UTC (rev 169222)
@@ -1,3 +1,31 @@
+2014-05-22 Dana Burkart <[email protected]>
+
+ Merge r168641
+
+ 2014-05-09 Jon Honeycutt <[email protected]>
+
+ REGRESSION (r167818): editing/inserting/typing-space-to-trigger-smart-link.html fails on WebKit1 bots
+
+ <https://bugs.webkit.org/show_bug.cgi?id=132207>
+ <rdar://problem/16730393>
+
+ Reverts the previous workaround in favor of a more specific fix for the
+ null dereference.
+
+ Reviewed by Darin Adler.
+
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
+ Check whether the run's start and end are still in the document, as
+ removeConflictingInlineStyleFromRun() may have removed them.
+
+ * editing/CompositeEditCommand.cpp:
+ (WebCore::CompositeEditCommand::apply):
+ Reverted previous workaround.
+ (WebCore::ApplyEditCommand::ReentrancyGuard::isRecursiveCall): Deleted.
+ (WebCore::ApplyEditCommand::ReentrancyGuard::Scope::Scope): Deleted.
+ (WebCore::ApplyEditCommand::ReentrancyGuard::Scope::~Scope): Deleted.
+
2014-05-22 Lucas Forschler <[email protected]>
Merge r167635
Modified: branches/safari-537.77-branch/Source/WebCore/editing/ApplyStyleCommand.cpp (169221 => 169222)
--- branches/safari-537.77-branch/Source/WebCore/editing/ApplyStyleCommand.cpp 2014-05-22 21:40:21 UTC (rev 169221)
+++ branches/safari-537.77-branch/Source/WebCore/editing/ApplyStyleCommand.cpp 2014-05-22 21:45:45 UTC (rev 169222)
@@ -807,9 +807,10 @@
runs.append(InlineRunToApplyStyle(runStart, runEnd, pastEndNode));
}
- for (size_t i = 0; i < runs.size(); i++) {
- removeConflictingInlineStyleFromRun(style, runs[i].start, runs[i].end, runs[i].pastEndNode);
- runs[i].positionForStyleComputation = positionToComputeInlineStyleChange(runs[i].start, runs[i].dummyElement);
+ for (auto& run : runs) {
+ removeConflictingInlineStyleFromRun(style, run.start, run.end, run.pastEndNode);
+ if (run.startAndEndAreStillInDocument())
+ run.positionForStyleComputation = positionToComputeInlineStyleChange(run.start, run.dummyElement);
}
document()->updateLayoutIgnorePendingStylesheets();
Modified: branches/safari-537.77-branch/Source/WebCore/editing/CompositeEditCommand.cpp (169221 => 169222)
--- branches/safari-537.77-branch/Source/WebCore/editing/CompositeEditCommand.cpp 2014-05-22 21:40:21 UTC (rev 169221)
+++ branches/safari-537.77-branch/Source/WebCore/editing/CompositeEditCommand.cpp 2014-05-22 21:45:45 UTC (rev 169222)
@@ -78,26 +78,6 @@
using namespace HTMLNames;
-namespace ApplyEditCommand {
-
-class ReentrancyGuard {
-public:
- static bool isRecursiveCall() { return s_nestingCounter; }
-
- class Scope {
- public:
- Scope() { ++s_nestingCounter; }
- ~Scope() { --s_nestingCounter; }
- };
- friend class Scope;
-
-private:
- static unsigned s_nestingCounter;
-};
-unsigned ApplyEditCommand::ReentrancyGuard::s_nestingCounter;
-
-} // namespace ApplyEditCommand
-
PassRefPtr<EditCommandComposition> EditCommandComposition::create(Document* document,
const VisibleSelection& startingSelection, const VisibleSelection& endingSelection, EditAction editAction)
{
@@ -204,12 +184,6 @@
void CompositeEditCommand::apply()
{
- // It's possible to enter this recursively, but legitimate cases of that are rare, and it can cause crashes. As a
- // temporary fix, guard against recursive calls.
- // FIXME: <rdar://16701803> Remove this workaround when <rdar://15797536> is fixed.
- if (ApplyEditCommand::ReentrancyGuard::isRecursiveCall())
- return;
-
if (!endingSelection().isContentRichlyEditable()) {
switch (editingAction()) {
case EditActionTyping:
@@ -236,7 +210,6 @@
ASSERT(frame);
{
EventQueueScope eventQueueScope;
- ApplyEditCommand::ReentrancyGuard::Scope reentrancyGuardScope;
#if ENABLE(DELETION_UI)
DeleteButtonControllerDisableScope deleteButtonControllerDisableScope(frame);
#endif