Commit Graph

13805 Commits

Author SHA1 Message Date
Bas Schouten
cf309d5907 Bug 1367906: Cache the presence of rounded corners upon style changes. r=dbaron r=mattwoodrow
Profiling indicates a significant amount of time is spent during displaylist building accessing style information in order to detect border radii. This is a cost that for frames with no border radii only needs to be paid when the style changes.

Since nsIFrame still has 16 bits available for storing data without growing it in size, this patch recomputes whether there are border radii upon DidGetStyleContext and stores that information in one of these unused bits.

MozReview-Commit-ID: 4Jm29qUwXq3
2017-05-26 16:56:55 +00:00
Mats Palmgren
54186f9d65 Bug 1367877 - Remove a few unused frame class IDs. r=jfkthame
MozReview-Commit-ID: JQW8cCeSdth
2017-05-26 12:11:12 +02:00
Mats Palmgren
154f4890bf Bug 1362886 part 2 - Devirtualize the IsLeaf() method by doing an array lookup instead. r=jfkthame
MozReview-Commit-ID: 1zm9rFhRVZ3
2017-05-26 12:11:12 +02:00
Mats Palmgren
367f5ef1e8 Bug 1362886 part 1 - Annotate the FRAME_ID for each concrete frame class whether it's a leaf or not. Generate an array containing the IsLeaf state for each frame class. r=jfkthame
MozReview-Commit-ID: 8m52kG8EwCv
2017-05-26 12:11:12 +02:00
Mats Palmgren
a254b64145 Bug 1364805 part 4 - Remove the now unused LayoutFrameType values from the ctors. r=jfkthame
MozReview-Commit-ID: 1RSDoc3pQXf
2017-05-26 12:11:11 +02:00
Mats Palmgren
483a804512 Bug 1364805 part 3 - Implement Type() by indexing a static array using the mClass field. Remove the nsIFrame::mType field. r=jfkthame
In the nsWindowMemoryReporter.cpp / nsArenaMemoryStats.h I'm only
including the concrete frame classes now - we obviously never have
instances of the other IDs so there's no need to collect stats for them.

MozReview-Commit-ID: 48uFCZ3xKBC
2017-05-26 12:11:11 +02:00
Mats Palmgren
1242172259 Bug 1364805 part 2 - Add a nsIFrame::mClass field and propagate the concrete class' value up the ctor chain. r=jfkthame
nsIFrame::mClass is of type enum class nsQueryFrame::ClassID which is
a strict subset of the nsQueryFrame::FrameIID values.  For a concrete
frame class, its FrameIID is the same numeric value as its ClassID.

MozReview-Commit-ID: 1N0AkCGo1ol
2017-05-26 12:11:11 +02:00
Mats Palmgren
ec6b1ef065 Bug 1364805 part 1 - Make every concrete frame class be a NS_DECL_QUERYFRAME_TARGET. r=jfkthame
MozReview-Commit-ID: Gy9gcEYupeY
2017-05-26 12:11:11 +02:00
L. David Baron
9d25ba2b78 Bug 1367413 - Fix assertion that can occur when paginating abs-pos elements with a transform. r=mats
I confirmed that the test crashes in the crashtest harness without the
patch (although the harness doesn't exit!), whereas it passes with the
patch.

MozReview-Commit-ID: 37S6i1kvw37

--HG--
extra : transplant_source : %9F%A91%90%3F%93%1F%E5%B3%ACHf%8C%BD%BA%C9%12%97%83I
2017-05-25 16:21:20 -04:00
L. David Baron
c84d27dd7e Bug 1367190 - Fix bustage on a CLOSED TREE. 2017-05-24 10:17:19 -04:00
L. David Baron
76b64757a7 Bug 1367190 patch 3 - Store nsPresArena::mFreeLists as an array. r=mats
MozReview-Commit-ID: DDJetJaJMb4

--HG--
extra : transplant_source : r%2C1%CA%1B%3B%816/%A7%1A%82%28%E3%B6%EDj%A2W%B1
2017-05-24 09:41:41 -04:00
L. David Baron
a852d0d5ce Bug 1367190 patch 1 - Convert the 4 objects that use nsPresArena::AllocateBySize to use AllocateByObjectID. r=mats
MozReview-Commit-ID: 3LaG8Daon6V

--HG--
extra : transplant_source : %AB%00%3E%F6B%13%B8%84%C7%7B%24%08%8BU%8A%91%7DA%2C%A1
2017-05-24 09:35:26 -04:00
Mats Palmgren
badec5efb7 Bug 1359341 part 4 - Optimize initializing a nsBlockInFlowLineIterator for single-line blocks by skipping the search for aFindFrame. r=jfkthame
MozReview-Commit-ID: GpiNAzFhZeJ
2017-05-23 19:09:27 +02:00
Mats Palmgren
f9096282d3 Bug 1359341 part 3 - Propagate AreAllEarlierInFlowFramesEmpty() state on placeholders down the line. We can stop iterating siblings if we find a placeholder with a stored state. r=jfkthame
MozReview-Commit-ID: DNtcNIEwA5P
2017-05-23 19:09:27 +02:00
Mats Palmgren
e51607abe1 Bug 1359341 part 2 - Add a couple of private frame state bits to nsPlaceholderFrame to be used for propagating "line emptiness" during reflow. r=jfkthame
MozReview-Commit-ID: Ds98Sn5PZav
2017-05-23 19:09:26 +02:00
Mats Palmgren
5f995975b4 Bug 1359341 part 1 - Make PresShell::GetPlaceholderFrameFor return a nsPlaceholderFrame. r=jfkthame
MozReview-Commit-ID: AvfQcCtVMta
2017-05-23 19:09:26 +02:00
Mats Palmgren
66549d89e1 Bug 1366176 part 1 - Initialize aOutIndex to the last range in the Selection as a fallback in case we don't add a range later in AddItem. r=smaug
MozReview-Commit-ID: Dgl7MwXMjYs
2017-05-23 19:09:26 +02:00
Wes Kocher
9a8d52f7af Merge m-c to autoland, a=merge
MozReview-Commit-ID: AVwPRGa5re9
2017-05-22 16:38:46 -07:00
Wes Kocher
2933592c4a Merge inbound to central, a=merge
MozReview-Commit-ID: 7NiWtCjPk84
2017-05-22 16:26:12 -07:00
Jonathan Kew
fcf175b16a Bug 1365928 - patch 2 - Annotate style-struct getters with MOZ_NONNULL_RETURN for better optimization. r=mats 2017-05-22 19:00:19 +01:00
Mats Palmgren
297b9d70e1 Bug 1365614 part 3 - Backout bug 1333482 part 1-9. Removes support for [-webkit-]appearance for now b/c web compat issues. r=bz
MozReview-Commit-ID: IbwWM0FL6HF

--HG--
extra : source : bbb688fe1ba3f5201a190c6e25b693ef7272ea2d
2017-05-21 17:15:00 +08:00
Carsten "Tomcat" Book
00d4ea331d Backed out changeset bbb688fe1ba3 (bug 1365614) 2017-05-22 15:45:31 +02:00
Mats Palmgren
e706869580 Bug 1365614 part 3 - Backout bug 1333482 part 1-9. Removes support for [-webkit-]appearance for now b/c web compat issues. r=bz 2017-05-21 17:15:00 +08:00
Phil Ringnalda
35dc6b4906 Merge m-i to m-c, a=merge
MozReview-Commit-ID: 78jnwmm4rib
2017-05-21 13:01:06 -07:00
L. David Baron
7fd8f7b188 Bug 1365449 - Reflow absolutely positioned children when they need to be repaginated. r=mats
This fixes the failure of
layout/reftests/pagination/dynamic-abspos-overflow-01-cols.xhtml with
the primary patch in bug 1308876.

Since it is an independently testable failure, I'm posting it as a
separate bug.

Without the patch, both reftests fail to rewrap in response to the
dynamic change, and the inner dark blue absolutely positioned element
remains wrapped at the wrong position when the inner light blue
relatively positioned element rewraps.  (I tested this only outside of
the reftest harness, but that should be sufficient.)

I verified manually that the height conditions were correct by modifying
both reftests to add some padding and border to #relpos and margin to
#abspos, changing the height of #abspos so that it was either exactly at
or just above the threshold where reflow was needed, and using
GECKO_DISPLAY_REFLOW_RULES_FILE debugging to verify that the reflow of
the absolutely positioned element did or didn't happen as expected.

MozReview-Commit-ID: 6ISgSEYyMiN

--HG--
extra : transplant_source : %93%86%8Csr_L%83%F2OJ%DC%7F%3D%7D%BC%9C%A6%1F0
2017-05-20 10:15:26 -07:00
Hiroyuki Ikezoe
93e3eef4cb Bug 1341102 - Update test expecrations. r=me
https://github.com/servo/app_units/pull/26#issuecomment-301931183
2017-05-20 15:26:55 +09:00
Kartikaya Gupta
5d656fab0f Merge m-c to graphics
MozReview-Commit-ID: HvsAeMjJAIA
2017-05-19 09:30:48 -04:00
Kartikaya Gupta
aca076b94b Merge m-c to graphics
MozReview-Commit-ID: DFNbcj14mg9

--HG--
rename : memory/mozjemalloc/jemalloc.c => memory/mozjemalloc/mozjemalloc.cpp
rename : memory/mozjemalloc/jemalloc_types.h => memory/mozjemalloc/mozjemalloc_types.h
2017-05-18 08:34:15 -04:00
Kartikaya Gupta
dc10ea1700 Merge m-c to graphics
MozReview-Commit-ID: 5Rpd42jqi40
2017-05-17 08:39:54 -04:00
cku
d528aa4d56 Bug 1205475 - Part 2. Prevent multiple EffectSet property look up. r=mattwoodrow
Functions like BuildDisplayListForStackingContext or BuildDisplayListForChild look
up EffectSet property several times in callees, such as IsTransformed() or
HasOpacity(), which is time wasting.

We should look up EffectSet just once, and pass the found one to all callees
that need it.

MozReview-Commit-ID: GZywm2UcpU7

--HG--
extra : rebase_source : 21f5dd0076a90d876a6df35eee2b886844b44f0a
2017-05-17 15:13:12 +08:00
Kartikaya Gupta
77fae9e5d6 Merge m-c to graphics
MozReview-Commit-ID: 6TxOtFjEGyY
2017-05-16 09:16:28 -04:00
Kartikaya Gupta
35374ded53 Merge m-c to graphics
MozReview-Commit-ID: BYH3uvvu4jz
2017-05-15 09:36:37 -04:00
Kartikaya Gupta
85ce3b9a88 Merge m-c to graphics
MozReview-Commit-ID: LHvR5izGDcT
2017-05-12 10:20:09 -04:00
Kartikaya Gupta
a4a58a3748 Merge m-c to graphics
MozReview-Commit-ID: Ax2mJsUs80t
2017-05-10 11:21:46 -04:00
Carsten "Tomcat" Book
d66b9f27d5 merge mozilla-inbound to mozilla-central a=merge 2017-05-10 15:07:28 +02:00
Carsten "Tomcat" Book
a1263f8111 Backed out changeset ff6861518bc3 (bug 1331718) 2017-05-10 12:09:04 +02:00
Bas Schouten
70d011d12c Bug 1331718 - Part 3: Store pointers to DisplayItemData directly on nsIFrame. r=mattwoodrow r=dbaron
This patch aims to speed up the lookup and storage of DisplayItemData objects, by removing a level of indirection and preventing the previously required hashtable lookup in order to access these. Instead it stores an array of pointers on each frame that allows direct access to the DisplayItemData object by dereferencing the frame. Since most frames get either 1 or 2 DisplayItemData objects attached to them a specialized class is used that is of minimal size (2 * sizeof(void)) and that performs well for sizes 1 or 2.

MozReview-Commit-ID: HONKAmpk5H8
2017-05-10 05:07:38 +02: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
Ethan Lin
1fe274c96f Bug 1361668 - Fix the bound of nsDisplayColumnRules. r=mattwoodrow 2017-05-10 13:55:15 +08:00
Kartikaya Gupta
5d5cdc518c Merge m-c to graphics
MozReview-Commit-ID: 2cIoGVmLEuA
2017-05-08 10:50:52 -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
Iris Hsiao
b2235165ae Merge mozilla-central to mozilla-inbound 2017-05-08 11:20:12 +08:00
L. David Baron
6fa3cf9282 Bug 944200 followup - Consistently use nscoord_MIN for uninitialized mFloatEdgeIStart/End. r=mats
This fixes an inconsistency in part 2 (32faa7c639ff), which wrote the
constant for uninitialized in two different ways.

The constructor uses nscoord_MIN for uninitialized, and that's also what
GetFloatEdges tests for, so this should use nscoord_MIN as well.

I believe this is because the review comment in comment 29 was only
partially addressed.

I noticed the difference because it caused broken behavior in a tree
with my patch for bug 1227493, which defines NS_INTRINSIC_WIDTH_UNKNOWN
differently.  Some text was disappearing on github (email and website
on user pages), slack (usernames of private chats in the sidebar), and
twitter (username of user who tweeted a quoted tweet).

MozReview-Commit-ID: Ah9FUPf2dw4

--HG--
extra : rebase_source : 2d947e017647bc6d6029169ef57cddca5aa4f3a9
2017-05-16 14:31:30 -07:00
Timothy Guan-tin Chien
d40c6eb2c0 Bug 1365869 - Bug 1365869 - Better contrast comparison for Selection#setColors(). r=masayuki
Instead of hardcoding a color-to-compare, compare the contrast between
the text and the background color v.s. text and the alternative
background color, and use the color that has better contrast.

MozReview-Commit-ID: D90047Y0Xst

--HG--
extra : rebase_source : cc0bd290930dbb11f464aa434b7606bab268627a
2017-05-18 16:49:51 +08:00
Kartikaya Gupta
eac87bc2bf Merge m-c to graphics
MozReview-Commit-ID: 9HO5vhW5fyh
2017-05-04 09:05:26 -04:00
Iris Hsiao
e71485e5b0 merge mozilla-inbound to mozilla-central a=merge 2017-05-04 11:18:36 +08:00
Cameron McCormack
203bdaed3b Bug 1361235 - Part 2: Re-enable some tests. r=emilio
MozReview-Commit-ID: 76FaOwHjIMB

--HG--
extra : rebase_source : e2e36bd8a6b86761fe616d7c30d8df7b661a4e09
2017-05-11 19:19:52 +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
b6b23a1376 Merge m-c to graphics
MozReview-Commit-ID: DVUE3Wys3HV
2017-05-03 08:52:43 -04: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