[Webkit-unassigned] [Bug 60914] REGRESSION(r84311): WebKit copies too much styles when copying
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon May 16 20:02:51 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=60914
--- Comment #2 from Ryosuke Niwa <rniwa at webkit.org> 2011-05-16 20:02:51 PST ---
I spent whole day debugging this bug but haven't found a solution yet. The problem is that if I add background color property like I'm doing in the work-in-progress patch, then string comparison in handleStyleSpansBeforeInsertion fail and we end up leaving style spans in paste.
592 // FIXME: This string comparison is a naive way of comparing two styles.
593 // We should be taking the diff and check that the diff is empty.
594 if (styleText == static_cast<Element*>(sourceDocumentStyleSpan)->getAttribute(styleAttr)) {
595 fragment.removeNodePreservingChildren(sourceDocumentStyleSpan);
596 if (!isStyleSpan(copiedRangeStyleSpan.get()))
597 return true;
598 }
599
600 if (isStyleSpan(copiedRangeStyleSpan.get()) && styleText == static_cast<Element*>(copiedRangeStyleSpan.get())->getAttribute(styleAttr)) {
601 fragment.removeNodePreservingChildren(copiedRangeStyleSpan.get());
602 return true;
603 }
We can't change these two style diffs either because the second diff must be done against the insertion position after sourceDocumentStyleSpan has been inserted. Resolving this bug properly may require fixing the bug 34564 first.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list