Changeset 135193 in webkit


Ignore:
Timestamp:
Nov 19, 2012, 1:43:28 PM (13 years ago)
Author:
inferno@chromium.org
Message:

Crash in ApplyStyleCommand::cleanupUnstyledAppleStyleSpans.
https://bugs.webkit.org/show_bug.cgi?id=100150

Reviewed by Ryosuke Niwa.

Source/WebCore:

RefPtr startDummySpanAncestor and endDummySpanAncestor since
they can go away inside fixRangeAndApplyInlineStyle call.

Test: editing/style/apply-style-crash.html

  • editing/ApplyStyleCommand.cpp:

(WebCore::ApplyStyleCommand::applyInlineStyle):

LayoutTests:

  • editing/style/apply-style-crash-expected.txt: Added.
  • editing/style/apply-style-crash.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r135192 r135193  
     12012-11-19  Abhishek Arya  <inferno@chromium.org>
     2
     3        Crash in ApplyStyleCommand::cleanupUnstyledAppleStyleSpans.
     4        https://bugs.webkit.org/show_bug.cgi?id=100150
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        * editing/style/apply-style-crash-expected.txt: Added.
     9        * editing/style/apply-style-crash.html: Added.
     10
    1112012-11-19  Sheriff Bot  <webkit.review.bot@gmail.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r135192 r135193  
     12012-11-19  Abhishek Arya  <inferno@chromium.org>
     2
     3        Crash in ApplyStyleCommand::cleanupUnstyledAppleStyleSpans.
     4        https://bugs.webkit.org/show_bug.cgi?id=100150
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        RefPtr startDummySpanAncestor and endDummySpanAncestor since
     9        they can go away inside fixRangeAndApplyInlineStyle call.
     10
     11        Test: editing/style/apply-style-crash.html
     12
     13        * editing/ApplyStyleCommand.cpp:
     14        (WebCore::ApplyStyleCommand::applyInlineStyle):
     15
    1162012-11-19  Sheriff Bot  <webkit.review.bot@gmail.com>
    217
  • trunk/Source/WebCore/editing/ApplyStyleCommand.cpp

    r134539 r135193  
    539539void ApplyStyleCommand::applyInlineStyle(EditingStyle* style)
    540540{
    541     Node* startDummySpanAncestor = 0;
    542     Node* endDummySpanAncestor = 0;
     541    RefPtr<Node> startDummySpanAncestor = 0;
     542    RefPtr<Node> endDummySpanAncestor = 0;
    543543
    544544    // update document layout once before removing styles
     
    665665
    666666    // Remove dummy style spans created by splitting text elements.
    667     cleanupUnstyledAppleStyleSpans(startDummySpanAncestor);
     667    cleanupUnstyledAppleStyleSpans(startDummySpanAncestor.get());
    668668    if (endDummySpanAncestor != startDummySpanAncestor)
    669         cleanupUnstyledAppleStyleSpans(endDummySpanAncestor);
     669        cleanupUnstyledAppleStyleSpans(endDummySpanAncestor.get());
    670670}
    671671
Note: See TracChangeset for help on using the changeset viewer.