Commit Graph

156 Commits

Author SHA1 Message Date
Milan Sreckovic
e0b2b9e425 Bug 1259513: Make gfxContext constructor private, use a utility function that can return nullptr. r=bas,lsalzman
MozReview-Commit-ID: rHhLEDZEQt

--HG--
extra : rebase_source : 4988f3f488c19dd35a9979e96f78a5511ee8f3d2
2016-04-12 15:18:11 -04:00
Markus Stange
08e56286e7 Bug 1248913 - Build nsDisplayBlendMode items for background-blend-mode. r=mattwoodrow
MozReview-Commit-ID: 72IzlcgHFtd

--HG--
extra : rebase_source : fdc3fd31176e1177e04b224c9206858437ef7806
2016-03-08 14:22:36 -05:00
Ting-Yu Lin
2d02ad0652 Bug 1227927 Part 3 - Use ranged-based for-loop to rewrite some simple loops in part 2. r=mats
--HG--
extra : commitid : CcdpGdlMNIk
extra : rebase_source : 9c184cb8107bf6276c237d03d240f8755fd61553
2016-01-29 22:42:15 +08:00
Ting-Yu Lin
1889f6bc41 Bug 1227927 Part 2 - Remove nsIFrame::GetFirstPrincipalChild(). r=mats
--HG--
extra : commitid : 5qtaK1nS8RC
extra : rebase_source : dcc98f423b2446269beb6fa6a9d092ae8213f38e
2016-01-29 22:42:14 +08:00
CJKu
7b577b9c98 Bug 686281 - Rename nsStyleSVGReset::mLayers to nsStyleSVGReset::mMask; Rename nsStyleBackground::mLayers to nsStyleBackground::mImage. r=dbaron 2016-01-28 06:39:00 +01:00
CJKu
2d363d1b79 Bug 686281 - Implement nsStyleImageLayers; r=dbaron 2016-01-28 06:24:00 +01:00
Matt Woodrow
10dde3e3a8 Bug 1231538 - Build a ContainerLayer for position:fixed and background-attachment:fixed content. r=roc 2016-01-26 13:36:48 +13:00
Nicholas Nethercote
144e1789d7 Bug 1228211 (part 1) - Rearrange nsDisplayCanvasBackgroundImage::Paint(). r=dholbert.
This patch rearranges Paint() so that the next nsRenderingContext is created
via the one-arg constructor rather than via the zero-arg constructor + Init().
This means the SetLineWidth(1.0) call in Init() no longer occurs but that's ok;
it was redundant because 1.0 is the default line width in a new gfxContext.

--HG--
extra : rebase_source : d3aa44310e180f8a297feab281a92233bd4859ce
2016-01-05 20:29:52 -08:00
Ting-Yu Lin
d477595b16 Bug 1221459 - Remove TouchCaret and SelectionCarets. r=mtseng, r=roc
All the files modified are straightforward deletion except TouchManager
and ZoomConstraintsClient. I add some includes and wrap TouchManager by
mozilla namespace to fix build errors due to the removal of TouchCaret.
2015-12-22 14:14:12 +08:00
Nigel Babu
fd9c9b233f Backed out changeset 9f30d3caa231 (bug 1221459) 2015-12-22 14:03:21 +05:30
Ting-Yu Lin
0fd840e0d8 Bug 1221459 - Remove TouchCaret and SelectionCarets. r=mtseng,roc
All the files modified are straightforward deletion except TouchManager
and ZoomConstraintsClient. I add some includes and wrap TouchManager by
mozilla namespace to fix build errors due to the removal of TouchCaret.

--HG--
extra : rebase_source : b31db322130f665e7dda53d1061cfc40f81ce411
2015-12-22 14:14:12 +08:00
Nicholas Nethercote
937ca16d12 Bug 1230413 (part 1) - Pass a DrawTarget to several PaintFocus functions(). r=mattwoodrow.
Instead of an nsRenderingContext.

--HG--
extra : rebase_source : 8b36c4babd8324c775fcc459f9ed29e89f2030cd
2015-12-03 19:16:59 -08:00
Ting-Yu Lin
41f35c7496 Bug 1206545 - Initialize AccessibleCaretEventHub in nsCanvasFrame. r=roc
To properly initialize AccessibleCaretEventHub, both canvas frame and
its anonymous mCustomContentContainer are required to successfully
insert anonymous caret elements.

However, if <html> has "display: none",
nsCSSFrameConstructor::ConstructDocElementFrame() will return early in
[1] without constructing mCustomContentContainer. Thus,
AccessibleCaretEventHub will fail to initialize in [2] due to null
mCustomContentContainer.

By moving AccessibleCaretEventHub::Init() to
nsCanvasFrame::CreateAnonymousContent(), we can guarantee that
mCustomContentContainer is constructed before initializing
AccessibleCaretEventHub.

[1] https://dxr.mozilla.org/mozilla-central/rev/7cd2d806bd069c0260ff73f023ac85f892b863bf/layout/base/nsCSSFrameConstructor.cpp#2413-2416
[2] https://dxr.mozilla.org/mozilla-central/rev/7cd2d806bd069c0260ff73f023ac85f892b863bf/layout/base/nsPresShell.cpp#1682

--HG--
extra : commitid : 4D5733d5Xr8
extra : rebase_source : 0edef7db8004da2e2cde3d4510bb23f1e9cee61e
2015-11-16 18:16:43 +08:00
Nathan Froyd
01583602a9 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

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Nathan Froyd
583afa0965 Bug 1207245 - part 3 - switch all uses of mozilla::RefPtr<T> to nsRefPtr<T>; r=ehsan
This commit was generated using the following script, executed at the
top level of a typical source code checkout.

 # Don't modify select files in mfbt/ because it's not worth trying to
 # tease out the dependencies currently.
 #
 # Don't modify anything in media/gmp-clearkey/0.1/ because those files
 # use their own RefPtr, defined in their own RefCounted.h.
find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    grep -v 'mfbt/RefPtr.h' | \
    grep -v 'mfbt/nsRefPtr.h' | \
    grep -v 'mfbt/RefCounted.h' | \
    grep -v 'media/gmp-clearkey/0.1/' | \
    xargs perl -p -i -e '
 s/mozilla::RefPtr/nsRefPtr/g; # handle declarations in headers
 s/\bRefPtr</nsRefPtr</g; # handle local variables in functions
 s#mozilla/RefPtr.h#mozilla/nsRefPtr.h#; # handle #includes
 s#mfbt/RefPtr.h#mfbt/nsRefPtr.h#;       # handle strange #includes
'

 # |using mozilla::RefPtr;| is OK; |using nsRefPtr;| is invalid syntax.
find . -name '*.cpp' -o -name '*.mm' | xargs sed -i -e '/using nsRefPtr/d'

 # RefPtr.h used |byRef| for dealing with COM-style outparams.
 # nsRefPtr.h uses |getter_AddRefs|.
 # Fixup that mismatch.
find . -name '*.cpp' -o -name '*.h'| \
    xargs perl -p -i -e 's/byRef/getter_AddRefs/g'
2015-10-18 00:40:10 -04:00
Boris Zbarsky
1b4d68bc0c Bug 1177819. Replace the warning about anon content being passed into frame construction with an assert plus whitelisting of the known-OK cases. r=dholbert 2015-07-23 11:51:09 -04:00
Jonathan Kew
4e6c40d7ea Bug 1131451 part 1 - Replace containerWidth with containerSize in logical-coordinate classes and APIs, frame classes, etc. r=dholbert 2015-07-16 10:07:57 +01:00
Jonathan Kew
a3380043e5 Bug 1174507 - Replace the frame flag CONTAINS_RELATIVE_HEIGHT with CONTAINS_RELATIVE_BSIZE, and adjust callsites appropriately. r=dholbert 2015-06-18 07:33:50 +01:00
Morris Tseng
6184cd18a5 Bug 1021499 - Enlarge touch/selection carets touch area. r=roc
--HG--
extra : histedit_source : 86209694d0b0704554a3a61d08741d02ea1a57cc
2015-04-15 19:15:00 -04:00
Mats Palmgren
ed9ed2d61a 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
883849ee32 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
Morris Tseng
c8b0b1c49e Bug 1125419 - Add dummy touch event listener to touch/selection carets to prevent apz scroll when dragging touch/selection carets. r=roc
--HG--
extra : rebase_source : 53aa339fca8e0a1287a9c47e98e162cd695c7b22
2015-02-01 20:17:00 +01:00
Mats Palmgren
b39a2a10f3 Bug 1116714 part 2 - Don't create a frame for the custom content container when it has no children. r=roc 2015-01-20 18:20:04 +00:00
Mats Palmgren
dd1166614c Bug 1116714 part 0 - Iterate forward instead, to avoid depending on undefined integer behavior. r=roc 2015-01-13 14:44:33 +00:00
Simon Montagu
1eacdee679 Bug 1079154 patch 5: convert callers of ApplyRelativePosition, ReflowChild and FinishReflowChild in layout/generic to the logical versions, r=jfkthame 2015-01-06 23:10:07 -08:00
Ehsan Akhgari
a41280816e Bug 1116622 - Give TemporaryRef a take() method semantically equivalent to already_AddRefed::take(); r=froydnj
This is in preparation of removing TemporaryRef.  It should help make
already_AddRefed a drop-in replacement for it.
2015-01-05 11:32:37 -05:00
Jonathan Kew
e117c33e3d Bug 1077528 - part 1 - Provide physical and logical accessors for the m{HV}Resize flags in nsHTMLReflowState, and convert all flag users to the accessor methods. r=smontagu 2014-11-28 09:44:02 +00:00
Kartikaya Gupta
4a94a25a0d Bug 1104266 - Avoid needless temporary nsACString. r=mattwoodrow 2014-11-25 08:45:19 -05:00
Morris Tseng
d0e550df52 Bug 1096169 - Handle selection carets overlapping case. r=roc 2014-11-12 23:03:00 -05:00
Jonathan Watt
bf49eb7f25 Bug 651021 - Make nsRenderingContext a stack class. r=jrmuizel 2014-10-31 20:08:49 +00:00
Patrick Brosset
159aa067df Bug 1020244 - Ability to insert AnonymousContent nodes in the canvasFrame via a chrome-only Document API; r=smaug; r=roc; r=ehsan 2014-10-28 11:15:25 +01:00
L. David Baron
977efff305 Bug 1088179 - Convert touch caret code to using :-moz-native-anonymous so that it doesn't expose styles for magic attribute names to content. r=birtles
I tested locally on a Flame that using this without the ua.css changes
breaks the touch caret (it doesn't appear), but with the ua.css changes
the touch caret appears again.

This was formerly bug 1082899 patch 6.

--HG--
extra : transplant_source : %CA%60%B7%10%AD%01%14%92%98%28o%AA%BF%5E%8F%7BV%AA%24%D5
2014-10-23 14:58:21 -04:00
Ryan VanderMeulen
c457a87994 Backed out changeset 1ac58452ef7d (bug 1082899) for test_selectioncarets.py failures. 2014-10-23 13:40:41 -04:00
L. David Baron
9f9351c617 Bug 1082899 patch 6 - Convert touch caret code to using :-moz-native-anonymous so that it doesn't expose styles for magic attribute names to content. r=birtles
Note that this leaves a few selectors with repeated classes of the form
.moz-touchcaret.moz-touchcaret .   This is intentional, so that these
changes don't change the relative specificity of any of the touch caret
selectors.

I tested locally on a Flame that using this without the ua.css changes
breaks the touch caret (it doesn't appear), but with the ua.css changes
the touch caret appears again.
2014-10-23 12:57:28 -04:00
Jonathan Watt
09f54bbbb9 Bug 1086708 - Rename the snapping variant of NSRectToRect to NSRectToSnappedRect. r=mattwoodrow 2014-10-22 12:29:06 +01:00
Jonathan Watt
e3bd1068b9 Bug 1085167, part 2 - Get rid of nsRenderingContext's DeviceContext and any need for it to know about app-units-per-device-pixel. r=mattwoodrow
--HG--
extra : rebase_source : d8fb804f03a1cc4635d6acd7f66f5f21962de6d3
2014-10-20 10:55:49 +01:00
Jonathan Watt
b8b833765e Bug 1083753, part 2 - Port the code that uses nsRenderingContext::FillRect(nsRect) to Moz2D. r=mattwoodrow 2014-10-19 13:22:22 +01:00
Ting-Yu Lin
f8923cff09 Bug 1070851 - Make touch caret respect snapshotWindow(). r=roc
Avoid capture touch caret when the argument 'withCaret' is false in
snapshotWindow().
2014-09-24 01:26:00 -04:00
Jonathan Watt
93e59c8bd5 Bug 1064084, part 1 - Convert all consumers of gfxContext::Translate() to use gfxContext::SetMatrix()/Multiply(). r=Bas 2014-09-11 07:57:38 +01:00
Trevor Saunders
8f78184d9a bug 1016545 - Provide an iterator that iterates over all children of an element r=bz 2014-07-16 14:41:57 -04:00
Jonathan Kew
ce9cbe4216 bug 1031241 pt 1 - Rename Get{Min,Pref}Width to Get{Min,Pref}ISize throughout layout. r=dbaron,smontagu 2014-07-24 18:03:25 +01:00
Simon Montagu
18c9f2f61a Bug 789096 patch 10: make Reflow set nsHTMLReflowMetrics.ISize and BSize instead of Width and Height. r=jfkthame 2014-07-24 01:30:07 -07:00
Simon Montagu
c3b44c4dad Bug 789096 patch 9: use logical coordinates in nsHTMLReflowState available size. r=jfkthame 2014-07-24 01:28:46 -07:00
Rik Cabanier
30e903768b Bug 1038521 - background-blend-mode should not blend with white backdrop of the root element. r=roc 2014-07-16 21:04:00 +02:00
Jonathan Watt
24935e91e2 Bug 1034528, part 2 - Remove the Thebes backed gfxContext propagating code from nsCanvasFrame. r=Bas 2014-07-07 09:05:16 +01:00
Kyle Huey
b1e3198eed Bug 737976: Remove nsINodeInfo. r=smaug
--HG--
rename : content/base/src/nsNodeInfo.cpp => dom/base/NodeInfo.cpp
rename : content/base/public/nsINodeInfo.h => dom/base/NodeInfo.h
rename : content/base/src/nsNodeInfo.h => dom/base/NodeInfoInlines.h
2014-06-19 19:01:40 -07:00
Morris Tseng
5d9e036945 Bug 987718 - Part 6: Hooks up SelectionCaret; r=roc 2014-06-04 22:58:00 +02:00
Kartikaya Gupta
a4a3fd7711 Bug 1019888 - Log canvas background color when dumping display items. r=tn 2014-06-03 16:21:39 -04:00
Phoebe Chang
a37fc5efe4 Bug 924692 - Part 1: Add touch caret rendering support; r=roc 2014-06-03 15:08:25 +08:00
Mats Palmgren
16e5742424 Bug 1015781 - part 5, Make nsCanvasFrame::SetInitialChildList/AppendFrames/InsertFrames/RemoveFrame DEBUG only. r=roc 2014-05-28 19:36:59 +00:00