Changeset 95745 in webkit
- Timestamp:
- Sep 22, 2011 12:25:54 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 17 deleted
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r95744 r95745 1 2011-09-22 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r95335 and r95645. 4 http://trac.webkit.org/changeset/95335 5 http://trac.webkit.org/changeset/95645 6 https://bugs.webkit.org/show_bug.cgi?id=68649 7 8 Wrong fix (Requested by rniwa on #webkit). 9 10 * editing/deleting/merge-paragraph-from-address-expected.txt: Removed. 11 * editing/deleting/merge-paragraph-from-address.html: Removed. 12 * editing/deleting/merge-paragraph-from-h6-expected.txt: Removed. 13 * editing/deleting/merge-paragraph-from-h6-with-style-expected.txt: Removed. 14 * editing/deleting/merge-paragraph-from-h6-with-style.html: Removed. 15 * editing/deleting/merge-paragraph-from-h6.html: Removed. 16 * editing/deleting/merge-paragraph-from-listing-expected.txt: Removed. 17 * editing/deleting/merge-paragraph-from-listing.html: Removed. 18 * editing/deleting/merge-paragraph-from-p-with-style-expected.txt: Removed. 19 * editing/deleting/merge-paragraph-from-p-with-style.html: Removed. 20 * editing/deleting/merge-paragraph-into-h1-expected.txt: Removed. 21 * editing/deleting/merge-paragraph-into-h1-style-expected.txt: Removed. 22 * editing/deleting/merge-paragraph-into-h1-with-style-expected.txt: Removed. 23 * editing/deleting/merge-paragraph-into-h1-with-style.html: Removed. 24 * editing/deleting/merge-paragraph-into-h1.html: Removed. 25 * editing/deleting/merge-paragraph-into-pre-expected.txt: Removed. 26 * editing/deleting/merge-paragraph-into-pre.html: Removed. 27 * platform/mac/editing/deleting/merge-whitespace-pre-expected.png: 28 * platform/mac/editing/deleting/merge-whitespace-pre-expected.txt: 29 1 30 2011-09-22 Robert Hogan <robert@webkit.org> 2 31 -
trunk/LayoutTests/platform/mac/editing/deleting/merge-whitespace-pre-expected.txt
r95335 r95745 13 13 RenderText {#text} at (0,0) size 21x18 14 14 text run at (0,0) width 21: "foo" 15 RenderText {#text} at (21,0) size 20x18 16 text run at (21,0) width 20: "bar" 15 RenderInline {SPAN} at (0,0) size 24x15 16 RenderText {#text} at (21,2) size 24x15 17 text run at (21,2) width 24: "bar" 17 18 RenderBlock {PRE} at (0,31) size 784x15 18 19 RenderText {#text} at (0,0) size 24x15 -
trunk/Source/WebCore/ChangeLog
r95743 r95745 1 2011-09-22 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r95335 and r95645. 4 http://trac.webkit.org/changeset/95335 5 http://trac.webkit.org/changeset/95645 6 https://bugs.webkit.org/show_bug.cgi?id=68649 7 8 Wrong fix (Requested by rniwa on #webkit). 9 10 * editing/DeleteSelectionCommand.cpp: 11 (WebCore::DeleteSelectionCommand::saveTypingStyleState): 12 * editing/EditingStyle.cpp: 13 (WebCore::EditingStyle::removeStyleAddedByNode): 14 * editing/EditingStyle.h: 15 * editing/ReplaceSelectionCommand.cpp: 16 (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline): 17 * editing/markup.cpp: 18 (WebCore::StyledMarkupAccumulator::serializeNodes): 19 (WebCore::ancestorToRetainStructureAndAppearance): 20 * editing/markup.h: 21 1 22 2011-09-22 Ryosuke Niwa <rniwa@webkit.org> 2 23 -
trunk/Source/WebCore/editing/DeleteSelectionCommand.cpp
r95645 r95745 284 284 // Figure out the typing style in effect before the delete is done. 285 285 m_typingStyle = EditingStyle::create(m_selectionToDelete.start()); 286 m_typingStyle->removeStyle FromRules(enclosingAnchorElement(m_selectionToDelete.start()));286 m_typingStyle->removeStyleAddedByNode(enclosingAnchorElement(m_selectionToDelete.start())); 287 287 288 288 // If we're deleting into a Mail blockquote, save the style at end() instead of start() -
trunk/Source/WebCore/editing/EditingStyle.cpp
r95645 r95745 520 520 } 521 521 522 void EditingStyle::removeStyleFromRules(Node* node) 523 { 524 // FIXME: This should share code with removeStyleFromRulesAndContext 525 // but it's hard to do until we figure out how to compare font-size property without computed style. 522 void EditingStyle::removeStyleAddedByNode(Node* node) 523 { 526 524 if (!node || !node->parentNode()) 527 525 return; … … 529 527 RefPtr<CSSMutableStyleDeclaration> nodeStyle = editingStyleFromComputedStyle(computedStyle(node)); 530 528 parentStyle->diff(nodeStyle.get()); 531 if (node->isStyledElement() && static_cast<StyledElement*>(node)->inlineStyleDecl())532 nodeStyle = getPropertiesNotIn(nodeStyle.get(), static_cast<StyledElement*>(node)->inlineStyleDecl());533 529 nodeStyle->diff(m_mutableStyle.get()); 534 530 } -
trunk/Source/WebCore/editing/EditingStyle.h
r95645 r95745 103 103 PassRefPtr<EditingStyle> extractAndRemoveTextDirection(); 104 104 void removeBlockProperties(); 105 void removeStyle FromRules(Node*);105 void removeStyleAddedByNode(Node*); 106 106 void removeStyleConflictingWithStyleOfNode(Node*); 107 107 void removeNonEditingProperties(); -
trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp
r95335 r95745 497 497 // If Mail wraps the fragment with a Paste as Quotation blockquote, or if you're pasting into a quoted region, 498 498 // styles from blockquoteNode are allowed to override those from the source document, see <rdar://problem/4930986> and <rdar://problem/5089327>. 499 Node* blockquoteNode = isMailPasteAsQuotationNode(context) ? context : enclosingNodeOfType(firstPositionInNode(context), is BlockNodeToRetainAppearance, CanCrossEditingBoundary);499 Node* blockquoteNode = isMailPasteAsQuotationNode(context) ? context : enclosingNodeOfType(firstPositionInNode(context), isMailBlockquote, CanCrossEditingBoundary); 500 500 if (blockquoteNode) 501 501 newInlineStyle->removeStyleFromRulesAndContext(element, document()->documentElement()); -
trunk/Source/WebCore/editing/markup.cpp
r95645 r95745 337 337 } 338 338 339 bool isBlockNodeToRetainAppearance(const Node* node)340 {341 DEFINE_STATIC_LOCAL(HashSet<QualifiedName::QualifiedNameImpl*>, names, ());342 if (!names.size()) {343 names.add(addressTag.impl());344 names.add(blockquoteTag.impl());345 names.add(h1Tag.impl());346 names.add(h2Tag.impl());347 names.add(h3Tag.impl());348 names.add(h4Tag.impl());349 names.add(h5Tag.impl());350 names.add(h6Tag.impl());351 names.add(listingTag.impl());352 names.add(pTag.impl());353 names.add(preTag.impl());354 }355 return node->isElementNode() && names.contains(toElement(node)->tagQName().impl());356 }357 358 339 Node* StyledMarkupAccumulator::serializeNodes(Node* startNode, Node* pastEnd) 359 340 { … … 370 351 // to help us differentiate those styles from ones that the user has applied. 371 352 // This helps us get the color of content pasted into blockquotes right. 372 m_wrappingStyle->removeStyle FromRules(enclosingNodeOfType(firstPositionInOrBeforeNode(parentOfHighestNode), isBlockNodeToRetainAppearance, CanCrossEditingBoundary));353 m_wrappingStyle->removeStyleAddedByNode(enclosingNodeOfType(firstPositionInOrBeforeNode(parentOfHighestNode), isMailBlockquote, CanCrossEditingBoundary)); 373 354 374 355 // Call collapseTextDecorationProperties first or otherwise it'll copy the value over from in-effect to text-decorations. … … 473 454 } 474 455 475 if ( isBlockNodeToRetainAppearance(commonAncestorBlock)456 if (commonAncestorBlock->hasTagName(listingTag) 476 457 || commonAncestorBlock->hasTagName(olTag) 458 || commonAncestorBlock->hasTagName(preTag) 477 459 || commonAncestorBlock->hasTagName(tableTag) 478 460 || commonAncestorBlock->hasTagName(ulTag) 479 || commonAncestorBlock->hasTagName(xmpTag)) 461 || commonAncestorBlock->hasTagName(xmpTag) 462 || commonAncestorBlock->hasTagName(h1Tag) 463 || commonAncestorBlock->hasTagName(h2Tag) 464 || commonAncestorBlock->hasTagName(h3Tag) 465 || commonAncestorBlock->hasTagName(h4Tag) 466 || commonAncestorBlock->hasTagName(h5Tag)) 480 467 return commonAncestorBlock; 481 468 -
trunk/Source/WebCore/editing/markup.h
r95335 r95745 50 50 bool isPlainTextMarkup(Node *node); 51 51 52 bool isBlockNodeToRetainAppearance(const Node*);53 52 String createMarkup(const Range*, 54 53 Vector<Node*>* = 0, EAnnotateForInterchange = DoNotAnnotateForInterchange, bool convertBlocksToInlines = false, EAbsoluteURLs = DoNotResolveURLs); 55 54 String createMarkup(const Node*, EChildrenOnly = IncludeNode, Vector<Node*>* = 0, EAbsoluteURLs = DoNotResolveURLs); 56 55 57 56 String createFullMarkup(const Node*); 58 57 String createFullMarkup(const Range*);
Note: See TracChangeset
for help on using the changeset viewer.