Title: [90290] trunk/Source
- Revision
- 90290
- Author
- [email protected]
- Date
- 2011-07-01 16:02:41 -0700 (Fri, 01 Jul 2011)
Log Message
../WebCore: WebCore part of fix for https://bugs.webkit.org/show_bug.cgi?id=63851
<rdar://problem/8981062> Crash when loading a document in an editable WebView that has a subframe with an unstyled body
Reviewed by Darin Adler.
No new tests. I tried to make a test in DumpRenderTree with an editable WebView,
but was unsuccessful in getting the crash to happen in that instance.
* editing/Editor.cpp: (WebCore::Editor::applyEditingStyleToElement): Add a nil check that exits early, in addition to the ASSERT.
../WebKit/mac: WebKit part of fix for https://bugs.webkit.org/show_bug.cgi?id=63851
<rdar://problem/8981062> Crash when loading a document in an editable WebView that has a subframe with an unstyled body
Reviewed by Darin Adler.
* WebView/WebHTMLRepresentation.mm: (-[WebHTMLRepresentation finishedLoadingWithDataSource:]):
Only call applyEditingStyleToBodyElement for the main frame. There's no need to apply break-word,
space, and after-white-space properties to subframes in the editable document.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (90289 => 90290)
--- trunk/Source/WebCore/ChangeLog 2011-07-01 22:43:29 UTC (rev 90289)
+++ trunk/Source/WebCore/ChangeLog 2011-07-01 23:02:41 UTC (rev 90290)
@@ -1,3 +1,15 @@
+2011-07-01 Adele Peterson <[email protected]>
+
+ Reviewed by Darin Adler.
+
+ WebCore part of fix for https://bugs.webkit.org/show_bug.cgi?id=63851
+ <rdar://problem/8981062> Crash when loading a document in an editable WebView that has a subframe with an unstyled body
+
+ No new tests. I tried to make a test in DumpRenderTree with an editable WebView,
+ but was unsuccessful in getting the crash to happen in that instance.
+
+ * editing/Editor.cpp: (WebCore::Editor::applyEditingStyleToElement): Add a nil check that exits early, in addition to the ASSERT.
+
2011-07-01 Levi Weintraub <[email protected]>
Switch overflow and collapsedMargins to new layout types
Modified: trunk/Source/WebCore/editing/Editor.cpp (90289 => 90290)
--- trunk/Source/WebCore/editing/Editor.cpp 2011-07-01 22:43:29 UTC (rev 90289)
+++ trunk/Source/WebCore/editing/Editor.cpp 2011-07-01 23:02:41 UTC (rev 90290)
@@ -2883,6 +2883,8 @@
CSSStyleDeclaration* style = element->style();
ASSERT(style);
+ if (!style)
+ return;
ExceptionCode ec = 0;
style->setProperty(CSSPropertyWordWrap, "break-word", false, ec);
Modified: trunk/Source/WebKit/mac/ChangeLog (90289 => 90290)
--- trunk/Source/WebKit/mac/ChangeLog 2011-07-01 22:43:29 UTC (rev 90289)
+++ trunk/Source/WebKit/mac/ChangeLog 2011-07-01 23:02:41 UTC (rev 90290)
@@ -1,3 +1,14 @@
+2011-07-01 Adele Peterson <[email protected]>
+
+ Reviewed by Darin Adler.
+
+ WebKit part of fix for https://bugs.webkit.org/show_bug.cgi?id=63851
+ <rdar://problem/8981062> Crash when loading a document in an editable WebView that has a subframe with an unstyled body
+
+ * WebView/WebHTMLRepresentation.mm: (-[WebHTMLRepresentation finishedLoadingWithDataSource:]):
+ Only call applyEditingStyleToBodyElement for the main frame. There's no need to apply break-word,
+ space, and after-white-space properties to subframes in the editable document.
+
2011-07-01 Andy Estes <[email protected]>
Reviewed by Mark Rowe.
Modified: trunk/Source/WebKit/mac/WebView/WebHTMLRepresentation.mm (90289 => 90290)
--- trunk/Source/WebKit/mac/WebView/WebHTMLRepresentation.mm 2011-07-01 22:43:29 UTC (rev 90289)
+++ trunk/Source/WebKit/mac/WebView/WebHTMLRepresentation.mm 2011-07-01 23:02:41 UTC (rev 90290)
@@ -220,7 +220,7 @@
}
WebView *webView = [webFrame webView];
- if ([webView isEditable])
+ if ([webView mainFrame] == webFrame && [webView isEditable])
core(webFrame)->editor()->applyEditingStyleToBodyElement();
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes