RESOLVED FIXED 25316
Outdenting a line inside a blockquote tag does nothing
https://bugs.webkit.org/show_bug.cgi?id=25316
Summary Outdenting a line inside a blockquote tag does nothing
Marcos Almeida
Reported 2009-04-21 16:14:18 PDT
1) go to http://www.mozilla.org/editor/midasdemo/ 2) check View HTML 3) enter "<blockquote>one<br>two</blockquote>" 4) uncheck View HTML 5) put the cursor at the beginning of "two" 6) press the outdent button --> nothing happens. the line should have been outdented (e.g. removed from inside the blockquote tags)
Attachments
fixes the bug (51.15 KB, patch)
2009-07-09 16:45 PDT, Ryosuke Niwa
eric: review-
removes isIndentBlockquote as requested (54.58 KB, patch)
2009-07-10 19:06 PDT, Ryosuke Niwa
no flags
fixes the bug (54.65 KB, patch)
2009-07-12 16:46 PDT, Ryosuke Niwa
eric: review+
Ryosuke Niwa
Comment 1 2009-07-09 16:45:38 PDT
Created attachment 32540 [details] fixes the bug
Ryosuke Niwa
Comment 2 2009-07-09 16:47:16 PDT
Comment on attachment 32540 [details] fixes the bug The patch is large only because I had to rebaseline a pixel test. The actual change is very small (<10 lines).
Eric Seidel (no email)
Comment 3 2009-07-10 17:45:26 PDT
Ok, this was added in: http://trac.webkit.org/changeset/17143 It seems that Justin/Levi were trying to add the ability for Mail.app to style blockquotes added by WebKit. I think an unintentional side-effect of this change was that WebKit was changed to no longer to outdent non-webkit blockquotes. So I guess we could call this bug a REGRESSION(17143) although it seems no one noticed until much later.
Eric Seidel (no email)
Comment 4 2009-07-10 17:54:04 PDT
Comment on attachment 32540 [details] fixes the bug I think we should remove this function: 6060 static bool isIndentBlockquote(const Node* node) and just use tag-based detection of blockquotes like was the case pre-r17143 Why is: LayoutTests/platform/mac/editing/execCommand/outdent-selection-expected.txt changing? Please explain in your ChagneLog. Please remove boilerplate from your ChangeLogs: DETAILED DESCRIPTION OF THE CHANGES GOES HERE. (OOPS!) SEE: 9 http://webkit.org/coding/contributing.html FOR MORE INFORMATION You soudl explain all your added tests and changes to tests in your ChangeLogs. Please explain this change: if (enclosingBlockFlow != enclosingNode) 275 splitBlockquoteNode = splitTreeToNode(enclosingBlockFlowElement(visibleStartOfParagraph), enclosingNode, true); 271 splitBlockquoteNode = splitTreeToNode(enclosingBlockFlow, enclosingNode, true); 272 else { 273 splitElement(static_cast<Element*>(enclosingBlockFlow), visibleStartOfParagraph.deepEquivalent().node()); 274 splitBlockquoteNode = enclosingBlockFlow; 275 } in your ChangeLog.
Ryosuke Niwa
Comment 5 2009-07-10 19:06:30 PDT
Created attachment 32601 [details] removes isIndentBlockquote as requested
Eric Seidel (no email)
Comment 6 2009-07-10 20:20:12 PDT
Comment on attachment 32601 [details] removes isIndentBlockquote as requested Why is it OK to remove the ! check here? - if (isIndentBlockquote(splitPointParent) - && !isIndentBlockquote(splitPoint) + if (splitPointParent->hasTagName(blockquoteTag) Style: + else + splitElement(static_cast<Element*>(enclosingNode), visibleStartOfParagraph.deepEquivalent().node()); + // We split the blockquote at where we start outdenting. comment would go before the splt, and the whole thing would be in { } In general this looks fine. You're a committer now, so you could just commit this with edits, but I'd liek to see your answer to the first question before I r+
Ryosuke Niwa
Comment 7 2009-07-12 16:46:52 PDT
Created attachment 32635 [details] fixes the bug
Ryosuke Niwa
Comment 8 2009-07-12 16:47:37 PDT
(In reply to comment #6) > (From update of attachment 32601 [details]) > Why is it OK to remove the ! check here? > - if (isIndentBlockquote(splitPointParent) > - && !isIndentBlockquote(splitPoint) > + if (splitPointParent->hasTagName(blockquoteTag) Good catch. I didn't realize that I deleted a line. Fixed. > Style: > + else > + splitElement(static_cast<Element*>(enclosingNode), > visibleStartOfParagraph.deepEquivalent().node()); > + // We split the blockquote at where we start outdenting. > comment would go before the splt, and the whole thing would be in { } Fixed.
Eric Seidel (no email)
Comment 9 2009-07-12 17:37:59 PDT
Comment on attachment 32635 [details] fixes the bug Looks sane enough to me.
Ryosuke Niwa
Comment 10 2009-07-14 14:03:49 PDT
This patch doesn't have the rebaselined expected results for qt platform. Please rebaseline it as needed.
Julie Parent
Comment 11 2009-07-14 18:03:16 PDT
Note You need to log in before you can comment on or make changes to this bug.