Граф коммитов

10 Коммитов

Автор SHA1 Сообщение Дата
Boris Chiou 50975ecf3c Bug 1210265 - Add a pref toggle for copying/pasting only plain text on B2G. r=timdream
Add a new preference, clibboard.plainTextOnly.
1. On:  we only support kUnicodeMIME in SetData/GetData.
2. Off: we can support different MIME types in SetData/GetData

BTW, "copy image" is dependent on non-text/rich text support, so this
menu item is also disabled after we turn the pref off.
2015-10-02 00:26:00 +02:00
Ehsan Akhgari d12f7ccede Bug 1143570 - Part 1: Use an nsBlockInFlowLineIterator to determine whether a BR frame is visible or not; r=roc 2015-06-09 15:58:55 -04:00
Ehsan Akhgari 7f2412ff3d Bug 1151873 - Unit test 2015-04-09 10:12:27 -04:00
Ehsan Akhgari 8662c25478 Bug 1119503 - Part 2: Insert a line break between preformatted block boundaries when creating raw output; r=bzbarsky 2015-01-28 09:58:35 -05:00
Wes Kocher a092ea34c3 Backed out 5 changesets (bug 1119503) for PGO m-oth failures so I can a=merge today
Backed out changeset 05ee3ae06643 (bug 1119503)
Backed out changeset 5ccef8ecf319 (bug 1119503)
Backed out changeset 8c2129ff8897 (bug 1119503)
Backed out changeset ff9012ee428a (bug 1119503)
Backed out changeset af9f4a6a7b78 (bug 1119503)
2015-01-27 16:04:59 -08:00
Ehsan Akhgari 7262a9f23c Bug 1119503 - Part 2: Insert a line break between preformatted block boundaries when creating raw output; r=bzbarsky 2015-01-27 13:25:08 -05:00
Ehsan Akhgari cd67e85c8d Bug 1113238 - Part 1: Make our plaintext and HTML serializers aware of CSS preformatted styles; r=bzbarsky
This code is super-hairy, but I think this is the minimum amount of changes
that we need.

nsPlainTextSerializer::IsInPre() before this patch is completely broken, and
I changed it to maintain a stack of bools representing whether the elements
that we saw as we were traversing the tree are preformatted or not.

nsXHTMLContentSerializer maintains this information using a counter, which is
broken in case pre and non-preformatted elements are stacked underneath each
other, but I'm not sure why this code is using a counter and I didn't want to
change it drastically, so for now I'm just making it look at the element's
style first as opposed to its tag name.

Follow-up work may include exploring whether nsXHTMLContentSerializer should
use a stack similar to nsPlainTextSerializer, and also audit this code for
more places where things are hardcoded based on tag names where we should be
really looking at the style.
2015-01-16 15:56:40 -05:00
Ryan VanderMeulen b606c36f31 Backed out 4 changesets (bug 1113238) for mochitest-dt failures.
Backed out changeset 8439a009837d (bug 1113238)
Backed out changeset 34b89a4f9dea (bug 1113238)
Backed out changeset ce0ed9dc4d6d (bug 1113238)
Backed out changeset 9dd632bab2aa (bug 1113238)

CLOSED TREE
2015-01-13 13:50:12 -05:00
Ehsan Akhgari 6cf0cc9a3e Bug 1113238 - Part 1: Make our plaintext and HTML serializers aware of CSS preformatted styles; r=bzbarsky
This code is super-hairy, but I think this is the minimum amount of changes
that we need.

nsPlainTextSerializer::IsInPre() before this patch is completely broken, and
I changed it to maintain a stack of bools representing whether the elements
that we saw as we were traversing the tree are preformatted or not.

nsXHTMLContentSerializer maintains this information using a counter, which is
broken in case pre and non-preformatted elements are stacked underneath each
other, but I'm not sure why this code is using a counter and I didn't want to
change it drastically, so for now I'm just making it look at the element's
style first as opposed to its tag name.

Follow-up work may include exploring whether nsXHTMLContentSerializer should
use a stack similar to nsPlainTextSerializer, and also audit this code for
more places where things are hardcoded based on tag names where we should be
really looking at the style.
2015-01-13 12:03:53 -05:00
Ehsan Akhgari 751467e432 Bug 116083 - Correctly handle the whitespace in all preformatted elements; r=roc
Previously this code only handled the special case of a <body> element that
had an explicit style attribute, which doesn't really make sense.  Now we
do the right thing based on the computed white-space style.
2014-12-01 06:38:11 -05:00