Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(391)

Side by Side Diff: Source/core/editing/ApplyStyleCommand.cpp

Issue 190993002: ASSERTION FAILED: extractedStyle in WebCore::ApplyStyleCommand::removeInlineStyleFromElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed build fail. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « LayoutTests/editing/execCommand/extracted-style-assert-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005, 2006, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2008, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 bool ApplyStyleCommand::removeInlineStyleFromElement(EditingStyle* style, PassRe fPtr<HTMLElement> element, InlineStyleRemovalMode mode, EditingStyle* extractedS tyle) 885 bool ApplyStyleCommand::removeInlineStyleFromElement(EditingStyle* style, PassRe fPtr<HTMLElement> element, InlineStyleRemovalMode mode, EditingStyle* extractedS tyle)
886 { 886 {
887 ASSERT(element); 887 ASSERT(element);
888 888
889 if (!element->parentNode() || !element->parentNode()->isContentEditable(Node ::UserSelectAllIsAlwaysNonEditable)) 889 if (!element->parentNode() || !element->parentNode()->isContentEditable(Node ::UserSelectAllIsAlwaysNonEditable))
890 return false; 890 return false;
891 891
892 if (isStyledInlineElementToRemove(element.get())) { 892 if (isStyledInlineElementToRemove(element.get())) {
893 if (mode == RemoveNone) 893 if (mode == RemoveNone)
894 return true; 894 return true;
895 ASSERT(extractedStyle); 895 if (extractedStyle)
896 extractedStyle->mergeInlineStyleOfElement(element.get(), EditingStyle::O verrideValues); 896 extractedStyle->mergeInlineStyleOfElement(element.get(), EditingStyl e::OverrideValues);
897 removeNodePreservingChildren(element); 897 removeNodePreservingChildren(element);
898 return true; 898 return true;
899 } 899 }
900 900
901 bool removed = false; 901 bool removed = false;
902 if (removeImplicitlyStyledElement(style, element.get(), mode, extractedStyle )) 902 if (removeImplicitlyStyledElement(style, element.get(), mode, extractedStyle ))
903 removed = true; 903 removed = true;
904 904
905 if (!element->inDocument()) 905 if (!element->inDocument())
906 return removed; 906 return removed;
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
1543 String textToMove = nextText->data(); 1543 String textToMove = nextText->data();
1544 insertTextIntoNode(childText, childText->length(), textToMove); 1544 insertTextIntoNode(childText, childText->length(), textToMove);
1545 removeNode(next); 1545 removeNode(next);
1546 // don't move child node pointer. it may want to merge with more text no des. 1546 // don't move child node pointer. it may want to merge with more text no des.
1547 } 1547 }
1548 1548
1549 updateStartEnd(newStart, newEnd); 1549 updateStartEnd(newStart, newEnd);
1550 } 1550 }
1551 1551
1552 } 1552 }
OLDNEW
« no previous file with comments | « LayoutTests/editing/execCommand/extracted-style-assert-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698