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

378 Коммитов

Автор SHA1 Сообщение Дата
Kartikaya Gupta 35374ded53 Merge m-c to graphics
MozReview-Commit-ID: BYH3uvvu4jz
2017-05-15 09:36:37 -04:00
Alexis Beingessner 6ece5add60 Bug 1361751 - Update gecko bindings to webrender to reflect changes in PR 1181. r=kats
MozReview-Commit-ID: Fxt4sNm4vxa
2017-05-08 13:52:16 -04:00
Morris Tseng 2e459a5741 Bug 1362324 - Use BlobImage for path type of bullet item. r=jrmuizel
MozReview-Commit-ID: 4ld6biSaFce
2017-05-08 14:14:41 +08:00
Xidorn Quan 8c54e3ce73 Bug 1363699 part 1 - Make named CounterStyle objects not refcounted. r=heycam
This change does the following:
* Introduce a new smart pointer called CounterStylePtr which either
  holds an AnonymousCounterStyle strongly, or a named CounterStyle
  managed by CounterStyleManager weakly, and use it to replace all
  RefPtr<CounterStyle> around the codebase.
* Rename CounterStyleManager::mCacheTable to mStyles to reflect the
  fact that it is used to manage all styles, not just for caching.
* Add a retired styles list which collect all named CounterStyle
  evicted from mStyles, and post a PostRefreshObserver to destroy
  objects in that list after next flush.
* Remove helper functions for counter style in nsStyleList and expose
  mCounterStyle directly, to make code simpler with the new pointer.

Reason for adding a new smart pointer type rather than making their
AddRef/Release behave like BuiltinCounterStyle is that, it is possible
that after a flush, some stale style structs may still be alive. They
can contain pointer to destroyed CounterStyle objects. Although the
actual content may never be accessed anymore, RefPtr may still access
the object for refcounting during destruction.

MozReview-Commit-ID: xxegwSDhNb

--HG--
extra : rebase_source : bb5443f0eb56eee51cbdfd08e0400335648610e8
2017-05-13 21:42:23 +10:00
Kartikaya Gupta 989470c342 Bug 1360246 - Update code to use StackingContextHelper::ToRelativeWr* instead of RelativeToParent. r=nical
This updates more code that was using RelativeToParent() to use the
stacking context helper's ToRelativeWr* functions instead. This get us
closer to breaking the assumption that the WR stacking context order maps
1:1 to the layer tree structure.

MozReview-Commit-ID: HQrbvCgPOW4
2017-05-03 08:48:08 -04:00
Kartikaya Gupta 0ec3e2d4dd Bug 1360246 - Propagate the StackingContextHelper to the rest of the displaylist-building code. r=nical
This propagates the StackingContextHelper to the rest of the code that
builds WR display items, because we will need it in future patches to
stop using RelativeToParent.

MozReview-Commit-ID: 3PlQrJRhH36
2017-05-03 08:48:08 -04:00
Kartikaya Gupta 55a7794c28 Bug 1360246 - Clean up WebRenderTextLayer::RenderLayer. r=nical
This uses the StackingContextHelper and typed helper functions in
WebRenderLayer to simplify WebRenderTextLayer::RenderLayer. It also
removes the implicit assumption in WebRenderTextLayer that the parent
layer pushed a stacking context, which is an assumption we will
probably break in the future.

MozReview-Commit-ID: CARoGVQd56i
2017-05-03 08:48:07 -04:00
Kartikaya Gupta 9c0fee2d43 Bug 1360246 - Propagate the StackingContextHelper through CreateWebRenderCommands. r=nical
This is needed for the next patch, because the bullet frame WR rendering
code will need a StackingContextHelper to pass to the PushGlyphs call.
It also helps with some of the later patches in this series, when we get
rid of the RelativeToParent calls.

MozReview-Commit-ID: Is0aciHhy2N
2017-05-03 08:48:07 -04:00
Emilio Cobos Álvarez e44543aad4 Bug 1360241: Devirtualize nsIFrame::GetType. r=heycam
MozReview-Commit-ID: 5Nzhyta5Hle

--HG--
extra : rebase_source : c2e9d4bfb9239f5e851d110cd7dff98c1e1a8d8b
2017-04-30 17:30:08 +02:00
Kartikaya Gupta 61f60a73fb Bug 1359842 - Convert RelativeToParent to deal with typed units. r=nical
As we are often converting from LayoutDevicePixel to LayerPixel types
in WebRenderDisplayItem code, I added a convenience overload of
RelativeToParent that takes a LayoutDeviceRect and returns a LayerRect,
even though this is a potential footgun if abused.

MozReview-Commit-ID: DABAWdOBsbV
2017-04-27 12:04:13 -04:00
Kartikaya Gupta a8407ac1c7 Bug 1359842 - Replace use of NSRectToRect in WebRender-related code with proper LayoutDevicePixel types. r=nical
MozReview-Commit-ID: 7MXFubPtLoD
2017-04-27 12:04:12 -04:00
Ethan Lin e7c48eaf73 Bug 1357003 - Keep original layer state for basic layer manager when enabling advanced layer. r=mattwoodrow
--HG--
extra : rebase_source : 75540e18973d788e4e076aa3bdfa8a26036b2269
2017-04-21 23:11:38 +08:00
Ethan Lin 0e0ea44db7 Bug 1349500 - Add webrender support for BulletFrame path type. r=mchang 2017-04-18 14:26:41 +08:00
sotaro a824933324 Bug 1356130 - Change SendImageContainer() as to return Maybe<wr::ImageKey> r=jrmuizel 2017-04-14 09:13:12 +09:00
sotaro 79b1971bae Bug 1356088 - Fix ImageKey removals of ExternalImages r=jrmuizel 2017-04-13 20:53:21 +09:00
Lee Salzman 22fb7629b8 Bug 1348980 - use UnscaledFont to track WebRender font keys. r=jrmuizel 2017-04-06 17:41:24 -04:00
Ryan Hunt 4450cd3bae Bug 1345907 - Use clip region instead of clip rect r=kats
--HG--
extra : rebase_source : 23506430d8aa7b2097de208a3415d8597a1e13cd
2017-03-09 11:57:06 -05:00
Jeff Muizelaar 900393a0dc Bug 1344396. Build the display lists directly. r=kats
This is a largely uninteresting patch that just uses the DisplayListBuilder
directly. A wonderful cleanup patch will come after this. One of the more
interesting pieces is the use of PushBuiltDisplayList. This is needed for
handling empty transactions. See https://github.com/servo/webrender/pull/934
for more info.
2017-03-06 23:16:30 -05:00
Jeff Muizelaar 033a5b26a9 Bug 1343770. Separate out Parent commands from Child commands. r=kats
This basically just splits the enum in two and does the necessary plumbing. The
worst part is that now DisplayItemLayers need to have two arrays of commands.
Fortunately, this will be going away in the future.

This makes it so we don't send the child side commands to the parent.
2017-03-02 16:33:25 -05:00
Ethan Lin 8b7fb662c7 Bug 1342356 - Remove validBufferRegion from OpAddExternalImage. r=sotaro 2017-03-01 14:11:13 +08:00
Jeff Muizelaar 6296f9be71 Bug 1342246. Generate resource ids on the client side. r=lsalzman 2017-02-23 17:52:38 -05:00
Ting-Yu Lin 8f840dc923 Bug 775624 Part 22 - Remove NS_FRAME_COMPLETE. r=dholbert
This patch is written by the following script with some manual adjustment to
the comment in nsRubyTextContainerFrame.cpp and nsRubyFrame.cpp, and
nsColumnSetFrame's constructor.

function rename() {
find layout\
     -type f\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -r "s/$1/$2/g" "{}" \;
}

rename "nsReflowStatus *([a-zA-Z0-9]*) = NS_FRAME_COMPLETE" "nsReflowStatus \1"
rename "([a-zA-Z0-9.*]*) *= NS_FRAME_COMPLETE;" "\1.Reset();"
rename "([a-zA-Z0-9.*]*) == NS_FRAME_COMPLETE" "\1.IsEmpty()"

MozReview-Commit-ID: 9tqQAHvdQex

--HG--
extra : rebase_source : 3119776946dc2c8350098b7bf9f3ceff29bdffb5
2017-02-14 17:55:48 +08:00
Morris Tseng cd430e1918 Bug 1339683 - Remove build layer codes which are not used anymore. r=mattwoodrow
MozReview-Commit-ID: E64X3p5m3et
2017-02-20 10:22:58 +08:00
Morris Tseng 063a3bcf59 Bug 1339683 - Add CreateWebRenderCommands for nsDisplayBullet. r=mattwoodrow
MozReview-Commit-ID: 6IhKxRCJvZd
2017-02-20 10:22:58 +08:00
Morris Tseng ceab727d41 Bug 1339683 - Move the function definition out of class for readability. r=mattwoodrow
MozReview-Commit-ID: Ed1ItJYWxYG
2017-02-20 10:22:58 +08:00
Daniel Holbert 452a3b8454 Bug 1339609: Add #include for gfxPrefs.h to all source code that calls gfxPrefs APIs. r=jgilbert
MozReview-Commit-ID: GxWehmDYB3t

--HG--
extra : rebase_source : cd994e5c6abf777f77c5a708cbfb2f6afc49a44c
2017-02-14 14:01:59 -08:00
Jonathan Watt 28ad9afcfa Bug 1058040, part 11 - Convert DrawImage/DrawImageInternal's SVGImageContext param from pointer to Maybe<>. r=dholbert 2017-01-11 01:48:29 +00:00
Morris Tseng 1928a5fc22 Bug 1328494 - Convert nsDisplayBullet to layer. r=mattwoodrow
MozReview-Commit-ID: 8cDvUfwJqUF
2017-01-24 16:53:42 +08:00
Xidorn Quan 97d13f46a3 Bug 1303241 part 2 - Make GetVisitedDependentColor use style structs directly. r=dbaron
I think there are three advantages of this change:
1. removes some dependencies from layout / painting code to pre-computed
   value stuff in the style system;
2. makes it easier to audit usage of specific fields in style structs
   (which is probably a side effect of the first one);
3. potentially improves performance since it doesn't go through the
   unnecessary general logic in ExtractComputedValue.

Also, combined with the part before, we get a unified list for visited-
dependent properties so that we can ensure the assertion here and the
style difference calc code are consistent.

MozReview-Commit-ID: 5B9aN7CfRgI

--HG--
extra : rebase_source : ac80eaea2474b9ec4b47b1cc9a5bdd2e61f6ec4d
2016-12-31 00:57:37 +11:00
Ting-Yu Lin 4f426feb17 Bug 1288992 Part 3 - Rename local variables named metrics to reflowOutput. r=dholbert
This patch is edited manually.

MozReview-Commit-ID: 1IsLGrgmDIY

--HG--
extra : rebase_source : 52ad416a2ae56f312976cef6f30a45f03d77c4d1
2016-07-26 17:10:52 +08:00
Ting-Yu Lin 40fcd21b9a Bug 1277129 Part 7b - Rename various ReflowState variables to ReflowInput. r=dbaron
This patch is generated by the following script:

function rename() {
find .\
     -type f\
     ! -path "./obj*"\
     ! -path "./.git"\
     ! -path "./.hg"\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -r "s/$1/$2/g" "{}" \;
}

rename "([[:alpha:]]*)([rR])eflowState(s?)" "\1\2eflowInput\3"

MozReview-Commit-ID: ITFO7uMTkSb

--HG--
extra : rebase_source : c91a2e174a0baec60c1b0111ac7636295004ab35
2016-07-21 18:36:39 +08:00
Ting-Yu Lin 55cde36029 Bug 1277129 Part 6b - Rename rendContext to mRenderingContext in SizeComputationInput. r=dbaron
MozReview-Commit-ID: LczLJDtDncy

--HG--
extra : rebase_source : c32e928ae25f94305fb907db89278dce7304a903
2016-07-21 18:36:38 +08:00
Ting-Yu Lin 4053c4c028 Bug 1277129 Part 5c - Rename nsHTMLReflowMetrics to ReflowOutput. r=dbaron
This patch is generated by the following script:

function rename() {
find .\
     -type f\
     ! -path "./obj*"\
     ! -path "./.git"\
     ! -path "./.hg"\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -e "s/$1/$2/g" "{}" \;
}

rename "nsHTMLReflowMetrics" "ReflowOutput"

MozReview-Commit-ID: 2HBb7DkooH5

--HG--
extra : rebase_source : acfa442a6483772fcb5748dc6f5e7072e599032a
2016-07-21 18:36:38 +08:00
Ting-Yu Lin 820f88de49 Bug 1277129 Part 1c - Rename nsHTMLReflowState to ReflowInput. r=dbaron
This patch is generated by the following script:

function rename() {
find .\
     -type f\
     ! -path "./obj*"\
     ! -path "./.git"\
     ! -path "./.hg"\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -e "s/$1/$2/g" "{}" \;
}

rename nsHTMLReflowState ReflowInput

MozReview-Commit-ID: 9r9vdVv1pXc

--HG--
extra : rebase_source : 623ec822996ba0ea0058dd137acf5a658cdea04a
2016-07-21 18:36:35 +08:00
Jonathan Watt 2eb705bb3f Bug 1277862, part 3 - Rename Moz2D's Filter to SamplingFilter in the rest of the tree. r=Bas 2016-05-25 17:01:18 +01:00
Markus Stange 8e960525ba Bug 1270023 - Make nsDisplayBullet respect DisableComponentAlpha(). r=mattwoodrow
MozReview-Commit-ID: BlPpm24Knwc

--HG--
extra : rebase_source : 3ad3366569ace6f92a168e96d5437ea65c7266b6
2016-05-31 14:56:22 -04:00
Mats Palmgren fd47863d66 Bug 645647 part 1 - Don't let empty bullet frames block suppressing white-space in intrinsic size calculations. r=dholbert 2016-04-14 01:32:12 +02:00
Xidorn Quan 60bcaa5c0b Bug 1257121 part 4 - Use return value rather than out param to return font metrics. r=jfkthame
MozReview-Commit-ID: 6xrHYbgHGVd

--HG--
extra : rebase_source : 4d0cea24689588d8a1daa1869502e31ac7c3dc56
2016-03-17 13:55:48 +08:00
Xidorn Quan 072dccd81f Bug 1230034 part 6 - Convert all frame properties which do not hold pointer to be typed. r=dbaron
--HG--
extra : source : f95f143e0e521ad2f8726097a484de402c834620
2016-01-28 14:23:59 +11:00
Nicholas Nethercote 06e901cb9f Bug 1231550 - Use DrawTarget instead of gfxContext and/or nsRenderingContext in many places in font/text code. r=jfkthame.
AutoTextRun now only needs a DrawTarget instead of an nsRenderingContext, and
similar nsRenderingContext/gfxContext-to-DrawTarget replacements can be
propagated a long way up the call graph. This patch replaces 93 occurrences of
nsRenderingContext and 135 occurrences of gfxContext with DrawTarget; that's
13% of them.

The patch is mostly plumbing changes. A couple of not-entirely-plumbing
changes:

- It adds a comment about the null check in
  gfxGlyphExtents::GetTightGlyphExtentsAppUnits().

- A couple of functions simply had an unused gfxContext or nsRenderingContext
  parameter removed, e.g. SetLineBreaks().

--HG--
extra : rebase_source : 8f56994bb4d254a86788b17ab2864ebc758a7e6b
2015-12-15 13:56:41 -08:00
Seth Fowler 44de2cc528 Bug 1207355 (Part 4) - Request decodes intelligently in nsBulletFrame. r=tn 2015-10-29 16:37:42 -07:00
Phil Ringnalda a727c1fe68 Back out 8 changesets (bug 1207355) for OS X 10.10 reftest failures in generated-content/
CLOSED TREE

Backed out changeset aafd6db2fbb4 (bug 1207355)
Backed out changeset 9dd950b837fb (bug 1207355)
Backed out changeset e941e0e106a1 (bug 1207355)
Backed out changeset ecebca101fcb (bug 1207355)
Backed out changeset 08f2017137e1 (bug 1207355)
Backed out changeset 3dc69e37c9b4 (bug 1207355)
Backed out changeset bcdf51edb121 (bug 1207355)
Backed out changeset 1d4c00dbf49a (bug 1207355)
2015-10-28 22:57:43 -07:00
Seth Fowler 485e5ae23b Bug 1207355 (Part 4) - Request decodes intelligently in nsBulletFrame. r=tn 2015-10-28 16:40:43 -07: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
Nicholas Nethercote a37228e1fe 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().

--HG--
extra : rebase_source : ae423a422b37ada8ca0cb6f130350b4a71d58fc4
2015-09-23 23:41:30 -07:00
Cameron McCormack 2e3473ca07 Bug 968923 - part 3b - propagating use counters from SVG images into owning/parent documents; r=seth 2015-06-03 13:42:07 -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
Xidorn Quan c0df2e2d3b Bug 1142400 - Separate padding calculation in Get{Min,Pref}ISize and Reflow of nsBulletFrame. r=dbaron
--HG--
extra : source : bb4e850d9a1d2f86395cc2c4880c65073c7fd0e4
2015-03-12 20:53:54 +11:00