Changeset 90290 in webkit


Ignore:
Timestamp:
Jul 1, 2011, 4:02:41 PM (14 years ago)
Author:
adele@apple.com
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.

Location:
trunk/Source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r90288 r90290  
     12011-07-01  Adele Peterson  <adele@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        WebCore part of fix for https://bugs.webkit.org/show_bug.cgi?id=63851
     6        <rdar://problem/8981062> Crash when loading a document in an editable WebView that has a subframe with an unstyled body
     7
     8        No new tests.  I tried to make a test in DumpRenderTree with an editable WebView,
     9        but was unsuccessful in getting the crash to happen in that instance.
     10
     11        * editing/Editor.cpp: (WebCore::Editor::applyEditingStyleToElement): Add a nil check that exits early, in addition to the ASSERT.
     12
    1132011-07-01  Levi Weintraub  <leviw@chromium.org>
    214
  • trunk/Source/WebCore/editing/Editor.cpp

    r90098 r90290  
    28842884    CSSStyleDeclaration* style = element->style();
    28852885    ASSERT(style);
     2886    if (!style)
     2887        return;
    28862888
    28872889    ExceptionCode ec = 0;
  • trunk/Source/WebKit/mac/ChangeLog

    r90223 r90290  
     12011-07-01  Adele Peterson  <adele@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        WebKit part of fix for https://bugs.webkit.org/show_bug.cgi?id=63851
     6        <rdar://problem/8981062> Crash when loading a document in an editable WebView that has a subframe with an unstyled body
     7
     8        * WebView/WebHTMLRepresentation.mm: (-[WebHTMLRepresentation finishedLoadingWithDataSource:]):
     9        Only call applyEditingStyleToBodyElement for the main frame.  There's no need to apply break-word,
     10        space, and after-white-space properties to subframes in the editable document.
     11
    1122011-07-01  Andy Estes  <aestes@apple.com>
    213
  • trunk/Source/WebKit/mac/WebView/WebHTMLRepresentation.mm

    r89991 r90290  
    221221
    222222    WebView *webView = [webFrame webView];
    223     if ([webView isEditable])
     223    if ([webView mainFrame] == webFrame && [webView isEditable])
    224224        core(webFrame)->editor()->applyEditingStyleToBodyElement();
    225225}
Note: See TracChangeset for help on using the changeset viewer.