Commit Graph

14133 Commits

Author SHA1 Message Date
Alexis Beingessner
6b38993c8b Bug 1399274 - Block invisible text optimizations when using WebRender. r=jrmuizel
Mostly just threading the TextDrawTarget deeper into the code to use a boolean.
A lot of places are trying to optimize away invisible text!

MozReview-Commit-ID: 89sDAwUv0HA

--HG--
extra : rebase_source : 8d800702232aec6626a33f2d6be893708d0bbfee
2017-09-13 14:05:51 -04:00
Miko Mynttinen
351756e478 Bug 1359584 - Part 3: Improve nsDisplayItem const correctness and fix surrounding whitespace r=mstange
MozReview-Commit-ID: 3GkWiu6C4Zo

--HG--
extra : rebase_source : 1423442cd723b8a052d183394dc5f5ef272a5272
2017-08-24 17:09:44 +02:00
Miko Mynttinen
ce08697502 Bug 1359584 - Part 1: Move mDisableSubpixelAA to nsDisplayItem r=mstange
MozReview-Commit-ID: 70169AFRmjq

--HG--
extra : rebase_source : 9c46e40700430e8286ab8e5b2f986e660c293101
2017-08-24 14:45:21 +02:00
Alexis Beingessner
39e87f69a6 Bug 1395748 - Fix text selection shadow interaction. r=jrmuizel
Selections in gecko are used to hack in style changes to subsets of text frames.
Mostly this works fine because decorations don't care where they are, and
textRunFragments already exist to do style changes midFrame. However we mishandled
shadows because we were assuming they applied to the entire run, which isn't
the case when shadows are involved.

Applying shadows to everything was desirable because the way nsTextFrame is written,
it's difficult for us to associate the glyphs and decorations with a "range".
However the selections iterator provides a natural grouping, so we use that.

The result is that TextDrawTarget effectively becomes an array of what TextDrawTarget
used to be (now called SelectedTextRunFragment). Everything else is just fallout
of this change.

MozReview-Commit-ID: 5GWPruo6daW

--HG--
extra : rebase_source : 8e1c1d61e43151ee6651f8c6cfbcb0912262df56
2017-09-12 16:50:44 -04:00
Emilio Cobos Álvarez
c04f22ad37 Bug 1368852: Avoid flushing frames from nsHideViewer if we know we're not going to get a frame. r=tnikkel
MozReview-Commit-ID: ATVMfQ8myC1

--HG--
extra : rebase_source : fb82003b9ce61644f0cdf4eac5245ef321dec8d5
2017-09-13 00:08:46 +02:00
Ethan Lin
87d42ae44a Bug 1393077 - Part1. Round the transformed rectangles and transformed points in StackingContextHelper. r=kats
MozReview-Commit-ID: Gk5z6BwsuTM

--HG--
extra : rebase_source : 36db102162518622f1da659ff83fb71fe4d9eccf
2017-08-31 17:59:41 +08:00
KuoE0
e629f92818 Bug 1229979 - (Part 1) Make the color of decoration line shadow be as same as the color of the text shadow. r=jfkthame
Multi-color shadow is not allowed in spec. We could use the same color
of the text as the color of the decoration line when we paint the
shadow.

MozReview-Commit-ID: AK9NoseSE0h

--HG--
extra : rebase_source : 48a84e73a7ee76b615c255a440cbe119fa8f56f0
2017-09-06 14:31:36 +08:00
Alexis Beingessner
9a02daa232 Bug 1397361 - Apply skew transform to glyphs to undo inverse transform in font code. r=jrmuizel
MozReview-Commit-ID: GBpDmWp1Hnm

--HG--
extra : rebase_source : 85f7071e6306669c8628e26a39379436ba6cad56
2017-09-06 13:08:09 -04:00
Kartikaya Gupta
14f29010a0 Bug 1388433 - Remove unnecessary warning as the codepath is handled in an acceptable manner. r=mattwoodrow
MozReview-Commit-ID: 76KuxiDwnas

--HG--
extra : rebase_source : 65f7df5fbc79b10e632b3db9ecf40f37f4c33e8e
2017-09-11 10:49:22 -04:00
Mats Palmgren
bb4a414d58 Bug 1364815 part 2 - Follow-up to fix a typo. r=me
MozReview-Commit-ID: 1sdmYFuIyUS
2017-09-10 02:10:03 +02:00
Mats Palmgren
7b8d4cf0a4 Bug 1364815 - Optimize away many (virtual) calls to QueryFrame. r=dholbert
do_QueryFrame from one frame type to another frame type
can compare mClass first, and if successful just downcast
the pointer to the target frame type.  If unsuccessful,
or for do_QueryFrame calls involving other types, we must
still call QueryFrame.

MozReview-Commit-ID: 5MVfmuOYwdE
2017-09-10 00:50:16 +02:00
Lorena Diaconescu
40a6d7faec Bug 1361548 - Removed unreachable isCollapsed if condition. r=mats
MozReview-Commit-ID: EinCtNyaK6e

--HG--
extra : rebase_source : 55f08ef227bc96e31dbb83c597448274a7836a35
2017-09-06 15:48:20 -04:00
Sebastian Hengst
d7fd3d4096 Backed out changeset 274175ce0863 (bug 1229979) for failing reftest layout/reftests/text-shadow/decorations-multiple-zorder.html, at least on Windows and Android. r=backout 2017-09-08 10:56:24 +02:00
KuoE0
a3a2484069 Bug 1229979 - (Part 1) Make the color of decoration line shadow be as same as the color of the text shadow. r=jfkthame
Multi-color shadow is not allowed in spec. We could use the same color
of the text as the color of the decoration line when we paint the
shadow.

MozReview-Commit-ID: AK9NoseSE0h

--HG--
extra : rebase_source : 12b0aa45f5dbb938a35271dcadaa664ae4a82c1e
2017-09-06 14:31:36 +08:00
Manish Goregaokar
7960cd0a4d Bug 1397363 - stylo: Update crashtest expectations; r=orange
MozReview-Commit-ID: 6yYiGcZ7n3E
2017-09-06 23:24:53 -07:00
Alexis Beingessner
3ce36bee8a Bug 1395729 - Disable frame merging for nsTextFrame. r=mattwoodrow
MozReview-Commit-ID: C0kq5IYgUMG

--HG--
extra : rebase_source : 554424e067dba4c5ed39712a51f48f79912e6e6a
2017-09-06 13:49:31 -04:00
Ethan Lin
46edacd44f Bug 1390440 - Support nsDisplayPlugin for webrender layers-free mode. r=mattwoodrow
MozReview-Commit-ID: 2DoBo7OkTsb

--HG--
extra : rebase_source : 751562bb54e309ab5eff64d4e423125367c7fa9f
2017-08-16 15:08:55 +08:00
Sebastian Hengst
4d0bad92dd merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: Gsw48p934sI
2017-09-02 10:54:44 +02:00
Daniel Holbert
b137f93e10 Bug 1387152 part 2: Don't let unrelated property "flex-basis" influence the sizing inside of -webkit-box containers. r=mats
We use nsFlexContainerFrame (our modern flexbox implementation) to emulate
-webkit-box, and we use a frame state bit to tell us whether to use
modern-flexbox properties vs. legacy properties.  Up until this patch, we
neglected to check that state bit when determining whether to use the modern
"flex-basis" property for sizing.  This patch makes us *not* use that property
(and just use the axis-appropriate width/height property instead) for legacy
-webkit-box containers.

MozReview-Commit-ID: 14bzOCPCtUY

--HG--
extra : rebase_source : 0091761ba3aff64030a3301d9b60fb9401aa77b3
2017-08-03 11:18:13 -07:00
Daniel Holbert
c787965805 Bug 1387152 part 1: Adjust indentation and use HasAnyStateBits() instead of manual bitwise arithmetic, in nsFrame size-computation code. r=mats
* HasAnyStateBits is slightly more foolproof and readable -- in particular, you
  can put the logical "!" directly alongside the expression, rather than
  needing to separate it with a layer of logical-grouping-parens.

* The deindentation here isn't super-important, but it conforms better to our
  coding style, and it'll make this code consistent with a new chunk that I'm
  adding in the next patch (and that chunk will *have* to be deindented like
  this, to avoid going over 80 characters).

MozReview-Commit-ID: FWfqrKjHedP

--HG--
extra : rebase_source : e556f9789e9e153d57df07a38b10c21963e50978
2017-08-03 11:04:08 -07:00
Sebastian Hengst
43bc951ac7 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: ES9rKhiQo10
2017-09-01 10:38:51 +02:00
Boris Zbarsky
11a90dfbd9 Bug 1395591. When looking for our layout parent style, make sure to start with the placeholder if we're out of flow. r=emilio
MozReview-Commit-ID: 1M52bi3oQFX
2017-08-31 22:46:35 -04:00
Boris Zbarsky
c7c1bed48a Bug 1390389. Fix anon box restyling assertions to correctly handle ib splits. r=xidorn
MozReview-Commit-ID: AtBFlvLyg6b
2017-08-31 09:12:13 -04:00
Wes Kocher
cf93b6ca0d Merge m-c to autoland, a=merge
MozReview-Commit-ID: BlE0HFQUP9c
2017-08-31 16:56:58 -07:00
Boris Zbarsky
9d11ba2233 Bug 1395979. Remove backdrop hackery from placeholder's GetLayoutParentStyleForOutOfFlow. r=xidorn
This was never even meant to apply to the out-of-flow, just to the placeholder
itself.  So it's been effectively dead since placeholders stopped inheriting
from another style context.
2017-09-01 20:57:55 -04:00
Alexis Beingessner
bfdaac7f5c Bug 1395098 - Apply folded alpha to text when using advanced layers r=jrmuizel
MozReview-Commit-ID: 6crHThEP6Ha

--HG--
extra : rebase_source : 9dd0c286b400b22803b1a52ac0822738ef17d904
2017-08-30 13:18:09 -04:00
Ehsan Akhgari
ebaa749322 Bug 1394191 - Remove unneeded nsContentList.h includes from layout; r=dholbert 2017-08-29 07:29:11 -04:00
Masayuki Nakano
5e251e26e0 Bug 1393348 - part3: Converting SelectionType to index of Selection array in nsFrameSelection should use array instead of switch statement r=smaug
GetIndexFromSelectionType() in nsFrameSelection.cpp or
nsFrameSelection::GetSelection() appears in profile of attachment 8848015.  So,
it should not use switch statement due to really hot path.

With the previous patch, we can make it use array to retrieve the index from
SelectionType with static_cast<int8_t>.

MozReview-Commit-ID: 8jvIF5buTyT

--HG--
extra : rebase_source : ccb9c855caa6688e45097f67de3160860339d281
2017-08-24 20:01:20 +09:00
Masayuki Nakano
3bd4299525 Bug 1393348 - part2: nsISelectionController::SELECTION_* should be sequential integer values r=smaug
nsISelectionController::SELECTION_* are declared as bit-mask.  However, no
methods of nsISelectionController treat them as bit-mask and these
values need a switch statement in nsFrameSelection to convert SelectionType to
array index of nsFrameSelection::mDOMSelections because it's too big to create
an array to do it.  Additionally, this conversion appears profile of
attachment 8848015.

So, now, we should declare these values as sequential integer values.

However, only nsTextFrame uses these values as bit-mask.  Therefore, this patch
adds new type, SelectionTypeMask and creates new inline method,
ToSelectionTypeMask(SelectionType), to retrieve mask value for a SelectionType.

MozReview-Commit-ID: 5Za8mA6iu4

--HG--
extra : rebase_source : 86617c1f5fa23166458f4353cb834f9e7c5b131b
2017-08-24 19:14:04 +09:00
Bobby Holley
8fb4fb3d6c Bug 1393791 - Stop unbinding native-anonymous content off a script runner. r=emilio
The failure mode in the attached crashtest is an inconsistency in the flattened
tree. Specifically, we null out mVideoControls in an nsVideoFrame, but defer
the UnbindFromTree call on that NAC element, which measn that its mParent still
points to the nsVideoFrame's mContent. Because all this stuff runs off of script
runners, and the anonymous content destroyer is not guaranteed to run before
other potential script runners, we end up running arbitrary script while the
tree mismatch exists. This script calls back into ProcessPendingRestyles, which
causes trouble.

We could build a separate deferral mechanism, but it's not clear that we actually
need to defer the unbind anymore. The deferred unbind was added in bug 489008,
which predated a lot of simplifications in layout/dom interaction.

MozReview-Commit-ID: 1JYAhiXKVJC
2017-08-27 15:29:36 -07:00
Bobby Holley
7d9019f3fd Bug 1394156 - Use a smart pointer for nsIFrame::mStyleContext. r=emilio
MozReview-Commit-ID: FizF2iCvp9t
2017-08-27 10:46:00 -07:00
Bobby Holley
08e1911969 Bug 1394156 - Use a smart pointer for nsIFrame::mContent. r=emilio
MozReview-Commit-ID: 5xsLwXkXym7
2017-08-27 10:45:59 -07:00
Bobby Holley
a61ee7166e Bug 1394156 - Make static_casts of mContent use GetContent(). r=emilio
This was done with: perl -pi -e 's/\(mContent\)/\(GetContent\(\)\)/g' *.cpp

MozReview-Commit-ID: 7ugPKf5ypGw
2017-08-27 10:45:59 -07:00
Matt Woodrow
5d9dd5a30b Bug 1387059 - When checking if nsDisplayPerspective participates in preserve-3d, check the underlying transformed frame. r=mstange 2017-08-25 11:51:37 +02:00
Nicholas Nethercote
f2751f3072 Bug 1393636 (part 4) - Move ComputedValues measurements from nsStyleSizes to nsWindowSizes. r=heycam.
Another plumbing-only change, which is a precursor for the next patch.
ComputedValues are a Servo-only thing, so in order to use nsStyleSizes for both
Gecko and Servo, the ComputedValues sizes must be moved out.

MozReview-Commit-ID: BOnQSzzV0vC

--HG--
extra : rebase_source : 025c6161e509401a36525349083dd98bfda35621
2017-08-25 14:50:26 +10:00
Nicholas Nethercote
7e120ce35e Bug 1393636 (part 3) - Pass nsWindowSizes to more AddSizeOf*() functions. r=heycam.
This is a purely non-functional plumbing change. Instead of passing a
SizeOfState and an nsStyleSizes a bunch of places, we pass an nsWindowSizes,
which contains both of them.

This is a necessary precursor for the next patch.

MozReview-Commit-ID: Ek03wDM50rB

--HG--
extra : rebase_source : 7b05708bd21dc4e3812ea041647fa74bb413d0b9
2017-08-25 14:47:54 +10:00
Sebastian Hengst
7e5c12872d Backed out changeset 61a168afa436 (bug 1387059) for unexpectedly passing web-platform-reftest /css/css-transforms-2/transform3d-sorting-001.html. r=backout 2017-08-25 10:05:22 +02:00
Matt Woodrow
3cd9715429 Bug 1387059 - When checking if nsDisplayPerspective participates in preserve-3d, check the underlying transformed frame. r=mstange 2017-08-25 15:40:45 +12:00
Bas Schouten
a2109666bb Bug 1363922 - Part 1: Remember about the reference frame during BuildDisplayList for ScrollFrameHelper so GetScrolledRect can use it. r=mstange
MozReview-Commit-ID: 8GO6xuSH5xY
2017-08-17 15:45:30 +02:00
Wes Kocher
fb8abb94c7 Merge inbound to central, a=merge
MozReview-Commit-ID: 1mWKzfX4kl
2017-08-23 18:07:24 -07:00
Eric Rahm
a33f11e0f5 Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj
We should not be declaring forward declarations for nsString classes directly,
instead we should use nsStringFwd.h. This will make changing the underlying
types easier.

--HG--
extra : rebase_source : b2c7554e8632f078167ff2f609392e63a136c299
2017-08-16 16:48:52 -07:00
Emilio Cobos Álvarez
8b193459d8 Bug 1389743: Update expected assertion count in layout/generic/crashtests/1059138-1.html. rs=heycam
MozReview-Commit-ID: IeyIi9Q53JZ
2017-08-23 12:54:22 +02:00
Kevin Chen
9fa0238d13 Bug 1362321 - Do not crash in gfxPlatform:Init if there is a TDR happening; r=bas
MozReview-Commit-ID: 9gJCErHosg1

--HG--
extra : rebase_source : 6fc0e95b18ee795f2571d82ca81f3a72970142b3
2017-08-09 18:00:01 +08:00
Sebastian Hengst
2f56a032cd merge mozilla-central to autoland. r=merge a=merge 2017-08-22 11:50:08 +02:00
Sebastian Hengst
75955d0246 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 8fJX1xXgzhD
2017-08-22 11:49:04 +02:00
Nicholas Nethercote
ac72ddb583 Bug 1390760 - Measure ServoComputedData::visited_style. r=bholley.
For the Obama wikipedia page, this covers about 85% of the unmeasured
ComputedValues structs. The about:memory output looks like this:

> +---2,443,648 B (02.41%) -- computed-values
> |   +--1,088,272 B (01.07%) -- dom
> |   +----945,744 B (00.93%) -- non-dom
> |   +----409,632 B (00.40%) -- visited

I'm not sure why some CVs are still being missed.

MozReview-Commit-ID: 1bYWwSi4ihn

--HG--
extra : rebase_source : 14e4bd36a54bbbd8fd265f559704bec5a5e3b154
2017-08-21 16:07:16 +10:00
Ethan Lin
d592c08612 Bug 1387994 - Ensure the draw target when initializing the canvas context. r=nical
MozReview-Commit-ID: DxqoywKaSbE

--HG--
extra : rebase_source : 142dea1433db50600fa73d5b0ed3d2eb9c584732
2017-08-10 15:04:42 +08:00
Ethan Lin
d9862646f9 Bug 1391996 - Move some checks from nsDisplayText::GetLayerState to constructor to prevent ambiguous status. r=jrmuizel
MozReview-Commit-ID: QPSIqLz56p

--HG--
extra : rebase_source : 1c4db4b0111126b79f4d3e5ab8f693545f1cbd70
2017-08-21 14:52:31 +08:00
Bevis Tseng
6b5c329803 Bug 1390790 - Label ScrollFrameHelper::ScheduleSyntheticMouseMove. r=tnikkel 2017-08-16 17:10:36 +08:00
Wes Kocher
b1fc5e008c Merge inbound to central, a=merge
MozReview-Commit-ID: 4cWGBbMEU2x
2017-08-18 15:53:07 -07:00