Commit Graph

227 Commits

Author SHA1 Message Date
Jonathan Kew
7407253cb8 Bug 1216427 - part 2 - Ensure mouse selection does not split up a Regional Indicator flag symbol. r=emk 2015-10-26 10:47:18 +00:00
Jonathan Kew
2b2811e250 Bug 1216427 - part 1 - Ensure a character+VS sequence or a ligated Regional-Indicator flag symbol is deleted as a single unit when backspacing. r=emk 2015-10-26 10:47:16 +00:00
Robert O'Callahan
37b74104b6 Revert incorrectly committed changes ab657569f554 and a396f4262479 2015-10-24 22:38:22 +13:00
Robert O'Callahan
162b00750e Bug 264412. Refactor nsIFrame::GetRenderedText API to be more sane. r=mats,marcoz
The test changes here are to adjust for the fact that
nsTextFrame::GetRenderedText can now trim whitespace from the end of lines
that end in a hard line break.
2015-10-24 22:27:29 +13:00
Nicholas Nethercote
b5e1e5998d Bug 1038663 (part 1) - Make nsStyleText::mWordSpacing an nsStyleCoord. r=heycam.
This makes mWordSpacing a lot more like mLetterSpacing, while maintaining the
existing "'normal' computes to 0px" behaviour.
2015-10-21 22:13:11 -07:00
Nathan Froyd
e4e2da55c9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi
2015-10-18 01:24:48 -04:00
Nicholas Nethercote
7be9d28dde Bug 1207944 (part 4) - Use SetColor(const Color&) when setting from an nscolor. r=jwatt.
In various places SetColor() gets passed an nscolor. These are converted
(either implicitly or explicitly) to a gfxRBGA, and then to a gfx::Color.

This patch changes all these cases to avoid the middle step, by (a)
constructing a gfx::Color directly instead of an nscolor, or (b) by converting
an nscolor with Color::FromABGR().
2015-09-23 23:41:30 -07:00
Jonathan Kew
a244425aaf Bug 1193519 pt 4 - Reverse the direction of text-decoration offsets in sideways-lr mode. r=dholbert 2015-09-24 10:23:34 +01:00
Jonathan Kew
427bb40573 Bug 1193519 pt 3 - Handle writing-mode:sideways-lr in nsTextFrame selection and rendering. r=dholbert 2015-09-24 10:23:34 +01:00
Nicholas Nethercote
cae6e9971a Bug 1203427 (part 1) - Add nsExpirationTracker::mName. r=froydnj.
There are many sub-classes of nsExpirationTracker. In order to distinguish them
nicely in the logging of timer firings, it's necessary to manually name each
one. (This wouldn't be necessary if there was a way to stringify template
parameters, but there isn't.)
2015-09-09 21:07:07 -07:00
Masayuki Nakano
533f7dc32f Bug 299603 part.5 nsTextFrame should use system foreground or background color when painting IME selections if whose style defines only one of foreground color or background color r=roc 2015-08-19 16:37:39 +09:00
Masayuki Nakano
79e109ca66 Bug 299603 part.4 Some global methods in nsTextFrame.cpp should be members of nsTextFrame class r=roc 2015-08-19 16:37:39 +09:00
Xidorn Quan
9417f42819 Bug 1186721 - Suppress line break due to soft hyphen inside ruby. r=jfkthame 2015-08-13 22:39:51 +10:00
CJ Ku
0c07d120c9 Bug 1061393 - Export display list info to layer scope viewer. r=kamidphish 2015-08-03 02:11:00 -04:00
Ted Clancy
f312455bc0 Bug 1180417 - Part 2: Fix failure in layout/base/crashtests/942690.html. r=smontagu 2015-07-17 18:29:28 -03:00
Ted Clancy
a96721bc8f Bug 1180417 - Part 1: Put back optimizations for determining end of flow. r=smontagu 2015-07-17 18:29:25 -03:00
Cameron McCormack
41cdb1e7f1 Bug 1057921 - Don't propagate text decorations through outer <svg> elements. r=dholbert 2015-07-15 14:41:06 +10:00
Tim Taubert
95e395f64a Bug 834830 - Add nsISelectionController.SELECTION_URLSTRIKEOUT to enable striking out parts of the URL in the URL bar r=roc 2015-07-08 15:45:21 +02:00
Daniel Holbert
fbbaf1f5d6 Bug 1177925: Use range-based "for" loops for nsFrameList iteration, in various places in layout. r=tn 2015-06-29 13:02:21 -07:00
Masayuki Nakano
3f959cd72f Bug 1175789 Draw underline as overline when it's in vertical writing mode and the language is Japanese or Korean r=dbaron 2015-06-24 09:35:04 +09:00
Ted Clancy
b943c64dbd Bug 1164693 - part 3: Exclude optimizations that don't apply to preformatted paragraphs. r=smontagu 2015-06-20 08:52:34 -07:00
Ted Clancy
f59df6856b Bug 1067788 - Part 1: Don't invalidate bidi cursor directionality during a delete. r=smontagu 2015-06-01 15:19:57 -04:00
Birunthan Mohanathas
f7fa42cc65 Bug 968520 - Add mozilla::fallible to FallibleTArray::AppendElements calls. r=froydnj 2015-05-28 11:07:43 -07:00
Xidorn Quan
6d77b2c893 Bug 1149009 - Suppress line break inside text frame if it is directly contained by ruby content box. r=dbaron 2015-05-04 09:52:53 +12:00
Jonathan Kew
5b045e05e0 Bug 1157951 patch 2 - Make nsCharClipDisplayItem aware of vertical writing modes. r=roc 2015-04-29 08:18:53 +01:00
Jonathan Kew
90fb081923 Bug 1157951 patch 1 - Rename fields and variables in nsCharClipDisplayItem etc using VisIStart/End instead of left/right. r=roc 2015-04-29 08:18:53 +01:00
Jonathan Kew
0fc9d01b47 Bug 1155261 - Fix computation of glyph extents and text-frame visual overflow for vertical text frames. r=smontagu 2015-04-27 09:45:55 +01:00
Jonathan Kew
3c18ceba3f Bug 1154227 - Fix the painting of text-shadow in vertical writing modes. r=smontagu 2015-04-27 09:35:59 +01:00
Xidorn Quan
235273e773 Bug 1117227 part 3 - Make nsTextFrame::MeasureCharClippedText use frame isize instead of width. r=roc 2015-04-24 10:15:32 +12:00
Xidorn Quan
c1c6588202 Bug 1153634 - Weaken the assertion condition to make it match the condition before. r=roc 2015-04-14 09:11:28 +12:00
Jonathan Kew
400ab186f0 Bug 1146754 - Show selection highlighting for trailing space. r=mats 2015-04-01 14:45:16 +01:00
Mike Hommey
ee117642af Bug 1134920 - Use moz_xmalloc/moz_xrealloc/free instead of nsMemory::Alloc/Realloc/Free. r=nfroyd 2015-04-01 13:51:45 +09:00
Mats Palmgren
3f5a5b4fa1 Bug 1148833 part 3 - Remove nsIFrame::WillReflow and add a non-virtual MarkInReflow method instead that sets NS_FRAME_IN_REFLOW. Call it at the start of Reflow(). r=roc 2015-03-29 22:38:40 +00:00
Ehsan Akhgari
5cccea6f0f Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Xidorn Quan
a7063c7d0f Bug 1143558 part 2 - Convert suppressed line break to whitespace. r=roc 2015-03-17 19:10:15 +11:00
Xidorn Quan
aae5533b8f Bug 1143558 part 1 - Fix line break suppression when newline is significant. r=roc 2015-03-17 19:10:15 +11:00
Xidorn Quan
b7ff3ed97e Bug 1141842 - Add LastOptionalBreakPriority to nsLineLayout to simplify some code. r=roc 2015-03-11 14:14:48 +11:00
Xidorn Quan
df6de670d5 Bug 1140264 part 3 - Rename IsInlineDescendantOfRuby to ShouldSuppressLineBreak and exclude rbc/rtc from it. r=dbaron 2015-03-11 10:28:21 +11:00
L. David Baron
1a0ff17ff7 Bug 1140486 patch 2 - Make nsTextFrame::UpdateOverflow include the visual overflow from the text metrics by calling existing RecomputeOverflow. r=jfkthame
UpdateOverflow and RecomputeOverflow need to remain two separate
functions since RecomputeOverflow is called from line layout, prior to
setting the overflow areas, whereas UpdateOverflow needs to reset the
overflow areas and (via its return value) propagate the change to
ancestors.  However, they should share more code than they do today.

The only substantive (non-error-handling) change this is making is that
it's adding the MeasureText call, manipulation of the resulting
boundingBox, and inclusion of that bounding box in the visual overflow.
This is exactly the change that I'm trying to make in this bug.

It's also changing the error handling if EnsureTextRun returns null, but
I don't think we need to worry about that case much.
2015-03-07 12:27:36 -08:00
L. David Baron
24a6ad23b9 Bug 1140486 patch 1 - Pass block frame instead of block reflow state to nsTextFrame::RecomputeOverflow. r=jfkthame
This allows calling it from UpdateOverflow in patch 2.
2015-03-07 12:27:36 -08:00
Andrea Marchesini
00dbe99756 Bug 1134280 - Get rid of Tag() - patch 2.7 - layout/generic - Fix all the occurrences, m=smaug, r=surkov 2015-03-03 11:09:00 +00:00
Andrea Marchesini
5a32f7fa5a Bug 1134280 - Get rid of Tag() - patch 1 - Is{HTML,XUL,MathML,SVG}Element and IsAnyOf{HTML,XUL,MathML,SVG}Elements, r=smaug 2015-03-03 11:08:59 +00:00
Mats Palmgren
66100c4a5c Bug 1134531 - Remove nsTextFrame::DidSetStyleContext which only contained a (now obsolete) wallpaper. r=heycam 2015-02-24 18:35:30 +00:00
Kartikaya Gupta
d4629d57fe Bug 990907 - Have DLBI pick up changes in the char-clip on text frames. r=mstange,mattwoodrow 2015-02-25 09:32:28 -05:00
Jonathan Watt
253cce7ad9 Bug 1135913, part 4 - Unify SVGTextFrame's NotifyBeforeSelectionDecorationLine and NotifySelectionDecorationLinePathEmitted callbacks. r=heycam 2015-02-04 13:51:22 +00:00
Jonathan Watt
20be224bc6 Bug 1135913, part 3 - Unify SVGTextFrame's NotifyBeforeDecorationLine and NotifyDecorationLinePathEmitted callbacks. r=heycam 2015-02-03 20:00:18 +00:00
Jonathan Watt
61530dde21 Bug 1135913, part 2 - Separately handle non-selected and selected text. r=heycam 2015-02-03 19:36:15 +00:00
Jonathan Watt
796825ddf6 Bug 1135913, part 1 - Simplify nsCSSRendering::DecorationLineToPath to not require a context. r=heycam 2015-02-03 14:34:14 +00:00
Xidorn Quan
1a54d7d54d Bug 1135432 - Suppress line break after text run which ends in ruby. r=jfkthame 2015-02-23 08:55:04 +11:00
Xidorn Quan
1acd140e9d Bug 1133697 part 2 - Scan ruby texts instead of their container for building text run. r=roc 2015-02-18 17:20:02 +13:00