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

14266 Коммитов

Автор SHA1 Сообщение Дата
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
Botond Ballo ba4ac53b51 Bug 1340684 - Fire the scroll event before the style flush. r=mstange
This ensures that if the scroll event triggers style changes, they are
reflected on the same paint.

This is accomplished by having the refresh driver fire scroll events as
an explicit step after FlushType::Style observers and rAF callbacks, and
before the actual style flush.

MozReview-Commit-ID: 4kgauD5SgVo

--HG--
extra : rebase_source : 5f2c869c0749c1e1473797f2e202c075907a45fd
2017-08-09 21:08:38 -04:00
cku eb978c416f Bug 577824 - Part 1. Set the frame size in nsIFrame::FinishAndStoreOverflow before the ComputeEffectsRect call that uses it. r=jwatt
This change ensures that HTML frames with SVG filters applied are given the
correct overflow regions so that they will display and invalidate correctly.

The bug that this commit fixes does not manifest in many cases since
often elements happen to be reflowed more than once when a document loads.
When that happened the bug would be masked because the filtered frame would be
given a size during the first reflow, and that would then make the overflow
calculations in subsequent reflows work.  It was only in cases where the
filtered frame was only reflowed once (such as when dynamically inserting a
filtered element into the DOM using script) that the lack of a valid frame
size during the overflow calculations would result in bad overflow regions
being calculated.

MozReview-Commit-ID: 79lR27KRSym

--HG--
extra : rebase_source : 9df6ff87002f0af4abf0b97e2a084902d81f468c
2017-08-09 01:04:49 +08:00
Alexis Beingessner 9c4535798f Bug 1357545 - handle text-shadows/decorations with webrender (layers-free) r=jrmuizel
This replaces our DrawTargetCapture hack with a similar but more powerful TextDrawTarget
hack. The old design had several limitations:

* It couldn't handle shadows
* It couldn't handle selections
* It couldn't handle font/color changes in a single text-run
* It couldn't handle decorations (underline, overline, line-through)

Mostly this was a consequence of the fact that it only modified the start and end
of the rendering algorithm, and therefore couldn't distinguish draw calls for different
parts of the text.

This new design is based on a similar principle as DrawTargetCapture, but also passes
down the TextDrawTarget in the drawing arguments, so that the drawing algorithm can
notify us of changes in phase (e.g. "now we're doing underlines"). This also lets us
directly pass data to TextDrawTarget when possible (as is done for shadows and selections).

In doing this, I also improved the logic copied from ContainsOnlyColoredGlyphs to handle
changes in font/color mid-text-run (which can happen because of font fallback).

The end result is:

* We handle all shadows natively
* We handle all selections natively
* We handle all decorations natively
* We handle font/color changes in a single text-run
    * Although we still hackily intercept draw calls
    * But we don't need to buffer commands, reducing total memcopies

In addition, this change integrates webrender's PushTextShadow and PushLine APIs,
which were designed for this use case. This is only done in the layerless path;
WebrenderTextLayer continues to be semantically limited, as we aren't actively
maintaining non-layers-free webrender anymore.

This also doesn't modify TextLayers, to minimize churn. In theory they can be
augmented to support the richer semantics that TextDrawTarget has, but there's
little motivation since the API is largely unused with this change.

MozReview-Commit-ID: 4IjTsSW335h

--HG--
extra : rebase_source : d69f69648ade5c7a8e6bb756f4b8ab9e2543e576
2017-06-19 10:58:28 -04:00
Wes Kocher e5f7ecb3d1 Backed out 2 changesets (bug 577824) for reftest failures in 577824.html a=backout CLOSED TREE
Backed out changeset 98f8d05483cf (bug 577824)
Backed out changeset 3b9a469ab1d6 (bug 577824)

MozReview-Commit-ID: HraTkt5uajG
2017-08-17 13:17:28 -07:00
cku 82da18f800 Bug 577824 - Part 1. Set the frame size in nsIFrame::FinishAndStoreOverflow before the ComputeEffectsRect call that uses it. r=jwatt
This change ensures that HTML frames with SVG filters applied are given the
correct overflow regions so that they will display and invalidate correctly.

The bug that this commit fixes does not manifest in many cases since
often elements happen to be reflowed more than once when a document loads.
When that happened the bug would be masked because the filtered frame would be
given a size during the first reflow, and that would then make the overflow
calculations in subsequent reflows work.  It was only in cases where the
filtered frame was only reflowed once (such as when dynamically inserting a
filtered element into the DOM using script) that the lack of a valid frame
size during the overflow calculations would result in bad overflow regions
being calculated.

MozReview-Commit-ID: 79lR27KRSym

--HG--
extra : rebase_source : 9b232f68db1b21abae13758d4f345baa709641fd
2017-08-09 01:04:49 +08:00
Michael Kaply 73bafcec5e Bug 1389168 - Remove unnecessary IBM license text. r=gerv
MozReview-Commit-ID: 8HdaBppsJsc

--HG--
extra : rebase_source : 617c17b1162265e44810597fa69d533316da1a6b
2017-08-16 16:10:56 -05:00
Ehsan Akhgari 5cb2b76206 Bug 1390382 - Part 5 : Only call nsLayoutUtils::GetDisplayRootFrame() once per call to nsIFrame::SchedulePaint(); r=dholbert
nsLayoutUtils::GetDisplayRootFrame() can be quite expensive to call.
By calling this function one level higher (in callers and passing the return
value to callees), we can avoid calling it twice per call to SchedulePaint().
2017-08-15 18:57:16 -04:00
Milan Sreckovic 650410a90c Bug 1387514: Upgrade BaseRect (derived classes) width and height direct member variable use to instead use Width()/SetWidth() and Height()/SetHeight() in layout/*. r=dholbert
MozReview-Commit-ID: AfAbr74e1Yh

--HG--
extra : rebase_source : d684d4f8126fbe47eb31eba9923fdd37a35246bf
2017-08-14 08:30:04 -04:00
Masayuki Nakano b11e66f8da Bug 1388004 - part1: Make nsContentUtils::GetHTMLEditor() return HTMLEditor* rather than nsIEditor* r=smaug
nsContentUtils::GetHTMLEditor() currently returns nsIEditor* since editor of doc shell may be any type of editors such as TextEditor or editor object which is implemented by JS.  However, nsIEditor is now a builtin class.  So, it can return HTMLEditor.

MozReview-Commit-ID: 3YoFOplZa7W

--HG--
extra : rebase_source : 46f42d23babd64bf0a5003e66e8fe3b9e0bd7166
2017-08-07 16:33:59 +09:00
Nicholas Nethercote 57c26c9834 Bug 1387956 - Overhaul ComputedValues measurement, and add style structs measurement. r=bholley.
This patch moves measurement of ComputedValues objects from Rust to C++.
Measurement now happens (a) via DOM elements and (b) remaining elements via
the frame tree. Likewise for the style structs hanging off ComputedValues
objects.

Here is an example of the output.

> ├──27,600,448 B (26.49%) -- active/window(https://en.wikipedia.org/wiki/Barack_Obama)
> │  ├──12,772,544 B (12.26%) -- layout
> │  │  ├───4,483,744 B (04.30%) -- frames
> │  │  │   ├──1,653,552 B (01.59%) ── nsInlineFrame
> │  │  │   ├──1,415,760 B (01.36%) ── nsTextFrame
> │  │  │   ├────431,376 B (00.41%) ── nsBlockFrame
> │  │  │   ├────340,560 B (00.33%) ── nsHTMLScrollFrame
> │  │  │   ├────302,544 B (00.29%) ── nsContinuingTextFrame
> │  │  │   ├────156,408 B (00.15%) ── nsBulletFrame
> │  │  │   ├─────73,024 B (00.07%) ── nsPlaceholderFrame
> │  │  │   ├─────27,656 B (00.03%) ── sundries
> │  │  │   ├─────23,520 B (00.02%) ── nsTableCellFrame
> │  │  │   ├─────16,704 B (00.02%) ── nsImageFrame
> │  │  │   ├─────15,488 B (00.01%) ── nsTableRowFrame
> │  │  │   ├─────13,776 B (00.01%) ── nsTableColFrame
> │  │  │   └─────13,376 B (00.01%) ── nsTableFrame
> │  │  ├───3,412,192 B (03.28%) -- servo-style-structs
> │  │  │   ├──1,288,224 B (01.24%) ── Display
> │  │  │   ├────742,400 B (00.71%) ── Position
> │  │  │   ├────308,736 B (00.30%) ── Font
> │  │  │   ├────226,512 B (00.22%) ── Background
> │  │  │   ├────218,304 B (00.21%) ── TextReset
> │  │  │   ├────214,896 B (00.21%) ── Text
> │  │  │   ├────130,560 B (00.13%) ── Border
> │  │  │   ├─────81,408 B (00.08%) ── UIReset
> │  │  │   ├─────61,440 B (00.06%) ── Padding
> │  │  │   ├─────38,176 B (00.04%) ── UserInterface
> │  │  │   ├─────29,232 B (00.03%) ── Margin
> │  │  │   ├─────21,824 B (00.02%) ── sundries
> │  │  │   ├─────20,080 B (00.02%) ── Color
> │  │  │   ├─────20,080 B (00.02%) ── Column
> │  │  │   └─────10,320 B (00.01%) ── Effects
> │  │  ├───2,227,680 B (02.14%) -- computed-values
> │  │  │   ├──1,182,928 B (01.14%) ── non-dom
> │  │  │   └──1,044,752 B (01.00%) ── dom
> │  │  ├───1,500,016 B (01.44%) ── text-runs
> │  │  ├─────492,640 B (00.47%) ── line-boxes
> │  │  ├─────326,688 B (00.31%) ── frame-properties
> │  │  ├─────301,760 B (00.29%) ── pres-shell
> │  │  ├──────27,648 B (00.03%) ── pres-contexts
> │  │  └─────────176 B (00.00%) ── style-sets

The 'servo-style-structs' and 'computed-values' sub-trees are new. (Prior to
this patch, ComputedValues under DOM elements were tallied under the the
'dom/element-nodes' sub-tree, and ComputedValues not under DOM element were
ignored.) 'servo-style-structs/sundries' aggregates all the style structs that
are smaller than 8 KiB.

Other notable things done by the patch are as follows.

- It significantly changes the signatures of the methods measuring nsINode and
  its subclasses, in order to handle the tallying of style structs separately
  from element-nodes. Likewise for nsIFrame.

- It renames the 'layout/style-structs' sub-tree as
  'layout/gecko-style-structs', to clearly distinguish it from the new
  'layout/servo-style-structs' sub-tree.

- It adds some FFI functions to access various Rust-side data structures from
  C++ code.

- There is a nasty hack used twice to measure Arcs, by stepping backwards from
  an interior pointer to a base pointer. It works, but I want to replace it
  with something better eventually. The "XXX WARNING" comments have details.

- It makes DMD print a line to the console if it sees a pointer it doesn't
  recognise. This is useful for detecting when we are measuring an interior
  pointer instead of a base pointer, which is bad but easy to do when Arcs are
  involved.

- It removes the Rust code for measuring CVs, because it's now all done on the
  C++ side.

MozReview-Commit-ID: BKebACLKtCi

--HG--
extra : rebase_source : 4d9a8c6b198a0ff025b811759a6bfa9f33a260ba
2017-08-11 16:37:33 +10:00
Wes Kocher 5a4357c768 Merge inbound to central, a=merge
MozReview-Commit-ID: GArkKmOFIVH
2017-08-11 13:15:33 -07:00
Xidorn Quan b97e3aed9b Bug 1388255 - Make nsStylePosition::mGridTemplate{Columns,Rows} a UniquePtr. r=canaltinova,dholbert
MozReview-Commit-ID: 8SOE6sAavCX

--HG--
extra : rebase_source : 666c95221e059da9b1a729eea3584e2060968582
2017-08-09 11:30:25 +10:00
Ethan Lin 6ff926330a Bug 1388662 - Correct canvas transform in layers-free mode. r=mtseng
MozReview-Commit-ID: 5J0I1OTA6Ql

--HG--
extra : rebase_source : 26ce2f5bcdb7efcd52577b253ec4b90ce0b77568
2017-08-09 16:54:24 +08:00
Boris Zbarsky b183fe45c1 Bug 1388625 part 5. Implement wrapper anonymous box restyling in ServoRestyleManager. r=heycam
MozReview-Commit-ID: FRW4RCR1GT4

--HG--
extra : rebase_source : 4b3788a93173d73c0a47c92a3e8574bae713862f
2017-08-11 00:10:26 -04:00
Boris Zbarsky 345d831c42 Bug 1388625 part 3. Add nsIFrame flags we will use in stylo post-traversal to keep track of wrapper anonymous boxes. r=heycam
MozReview-Commit-ID: GscWh51aio2

--HG--
extra : rebase_source : 9be722b4384246d580e86b0e4fe0152de5306a2b
2017-08-10 12:49:03 -04:00
Carsten "Tomcat" Book c329d562fb merge mozilla-inbound to mozilla-central a=merge 2017-08-09 11:37:08 +02:00
Nicholas Nethercote d4e19d954a Bug 1388253 - Convert nsTextFormatter:[v]smprintf() use to [v]ssprintf(). r=erahm.
[v]ssprintf() is just a better way of doing things.

--HG--
extra : rebase_source : 25337787b9557f8a7080a67645dba70609a8f646
2017-08-09 10:41:14 +10:00
Ya-Chieh Wu edb40ab2be Bug 1379306 - Fix the wrong position when we calculate the position for position:absolute child. r=dbaron
Use |GetUsedBorder| instead of |GetComputedBorder|
when we calculate the position for position:absolute child.

MozReview-Commit-ID: 75gq5SFOVqT

--HG--
extra : rebase_source : 3b22920300f1054d3d2738e42c0347032bd9cecb
2017-08-07 20:31:00 +02:00
Nicholas Nethercote 1a6f1a62fa Bug 1387381 - Remove nsXPIDLString local variables. r=erahm.
nsXPIDLStrings are marked as VOIDED upon initialization. Most of these local
nsXPIDLString variables are immediately set via getter_Copies(), which will
either assign a string value (using Adopt()) or do SetIsVoid(). These can be
trivially converted to nsString, which will get the same treatment.

The patch suitably converts the remaining nsXPIDLString local variable as well.

--HG--
extra : rebase_source : 5fff9f2c6844559198f601853f8db08564add7d5
2017-08-08 16:07:55 +10:00
Wes Kocher 223f322400 Merge m-c to autoland a=merge
MozReview-Commit-ID: 2qLtb79Nlhs
2017-08-08 15:26:30 -07:00
J. Ryan Stinnett 11508b0f88 Bug 1385027 - Update Stylo test annotations for Windows. r=manishearth
MozReview-Commit-ID: 7FPPAga0jgW

--HG--
extra : rebase_source : 5fe4189caf99b23e56cf87f6ebaea332058a3e80
2017-08-01 16:32:48 -05:00
Jonathan Kew 5aac49cb16 Bug 1385395 - Use flag bits in the nsGenericDOMDataNode to record whether nsTextFrame-related properties are present, so we don't perform unnecessary hashtable lookups in CharacterDataChanged etc. r=dbaron 2017-08-07 23:13:30 +01:00
Carsten "Tomcat" Book e54b14cf9a merge mozilla-inbound to mozilla-central a=merge 2017-08-07 12:56:05 +02:00
cku dc53be7e42 Bug 1386864 - Part 2. Implement CompareLayers to reuse the code in AddAndRemoveImageAssociations. r=heycam
MozReview-Commit-ID: Aw9uJ8UFipj

--HG--
extra : rebase_source : 46457cfd25d918ad65327ac9a062ddf7bf973ee1
2017-08-04 17:01:21 +08:00
cku e39dc2b278 Bug 1386864 - Part 1. Compare image-data of two style-image objects only if both of them are resolved. r=heycam
MozReview-Commit-ID: 3gjoN9wNPlH

--HG--
extra : rebase_source : c1970147ede5cb3f3f94f3dd69100d92da573edf
2017-08-04 16:40:04 +08:00
Nicholas Nethercote f941156987 Bug 1386600 - Change nsIStringBundle methods to return |AString| instead of |wstring|. r=emk,sr=dbaron.
This removes about 2/3 of the occurrences of nsXPIDLString in the tree. The
places where nsXPIDLStrings are null-checked are replaced with |rv| checks.

The patch also removes a couple of unused declarations from
nsIStringBundle.idl.

Note that nsStringBundle::GetStringFromNameHelper() was merged into
GetStringFromName(), because they both would have had the same signature.

--HG--
extra : rebase_source : ac40bc31c2a4997f2db0bd5069cc008757a2df6d
2017-08-04 14:40:52 +10:00
Masatoshi Kimura 8b713b2b0f Bug 1375125 - Stop using nsILocalFile in the tree. r=froydnj
This mechanically replaces nsILocalFile with nsIFile in
*.js, *.jsm, *.sjs, *.html, *.xul, *.xml, and *.py.

MozReview-Commit-ID: 4ecl3RZhOwC

--HG--
extra : rebase_source : 412880ea27766118c38498d021331a3df6bccc70
2017-08-04 17:49:22 +09:00
Ehsan Akhgari 22c17c93c9 Bug 1386472 - Only register the AccessibleCaretEventHub when the accessible caret is enabled; r=bzbarsky 2017-08-03 23:06:15 -04:00
Wes Kocher 2196b718d3 Merge inbound to central, a=merge
MozReview-Commit-ID: DlSLhaepjeU
2017-08-03 18:06:53 -07:00
Ehsan Akhgari 064dd8f2a2 Bug 1386468 - Only register SelectionChangeListener for plaintext controls when dom.select_events.textcontrols.enabled is turned on; r=mystor 2017-08-03 17:01:40 -04:00
Morris Tseng 65beb79d45 Bug 1379920 - Support canvas in layers free mode. r=kats
MozReview-Commit-ID: 42jOb3fzodb
2017-08-03 13:55:15 +08:00
Morris Tseng f3d4ff499f Bug 1379920 - Introduce CanvasRenderer and its derived classes. r=nical,jrmuizel
This patch move common canvas interfaces out of layer. So I create a
base class CanvasRenderer which move interfaces from CanvasLayer.
CopyableCanvasRenderer from CopyableCanvasLayer, ClientCanvasRenderer
from ClientCanvasLayer and WebRenderCanvasRenderer from
WebRenderCanvasLayer. And finally, WebRenderCanvasRendererSync for the
non layers free mode and WebRenderCanvasRendererAsync for the layers
free mode.

Summary all changes in this patch.
* Move class CanvasLayer::Data to CanvasRenderer.h and rename it to
CanvasInitializeData. Because this class not only use by layer but also
* Move BasicCanvasLayer::UpdateSurface to
CopyableCanvasRenderer::ReadbackSurface.
* CanvasClient::Update now accepts ShareableCanvasRenderer as parameter.
not CanvasLayer.
use by layers-free mode. Move it out of layer's class makes more sense.
* Add InitializeCanvasRenderer in the canvas related classes to
initialize CanvasRenderer without involved layer.
* All canvas layer has function "CreateCanvasRendererInternal" that
initialize corresponding CanvasRenderer.

* Description of all CanvasRenderer classes:
** CanvasRenderer: Based classes.
** CopyableCanvasRenderer: Can readback canvas content to a
SourceSurface. Use by BasicCanvasLayer.
** ShareableCanvasRenderer: Provide IPC capabilities that allow sending
canvas content over IPC. This is pure virtual class because the IPC handling is
different in different LayerManager.
** ClientCanvasRenderer: Implement IPC handling for ClientLayerManager.
Use by ClientCanvasLayer.
** WebRenderCanvasRenderer: Implement IPC handling for
WebRenderLayerManager.
** WebRenderCanvasRendererSync: Use by WebRenderCanvasLayer.
** WebRenderCanvasRendererAsync: Use by layers-free mode in WebRender.

class diagram shows below:

                      +--------------+
                      |CanvasRenderer|
                      +-------+------+
                              ^
                              |
                  +----------------------+
                  |CopyableCanvasRenderer|
                  +----------------------+
                              ^
                              |
                  +-----------+-----------+
                  |ShareableCanvasRenderer|
                  +-----+-----------------+
                        ^      ^
          +-------------+      +-------+
          |                            |
+--------------------+       +---------+-------------+
|ClientCanvasRenderer|       |WebRenderCanvasRenderer|
+--------------------+       +--------+--+-----------+
                                      ^  ^
              +-----------------------+  +----+
              |                               |
+-------------+-------------+   +-------------+--------------+
|WebRenderCanvasRendererSync|   |WebRenderCanvasRendererAsync|
+---------------------------+   +----------------------------+

MozReview-Commit-ID: 5hqQ19W169r
2017-08-03 13:55:14 +08:00
Wes Kocher d350602e58 Backed out changeset 3b7a0f888294 (bug 1386468) for failures in browser_contentSearchUI.js a=backout
MozReview-Commit-ID: 7XhVgq5C4Ar
2017-08-02 18:09:12 -07:00
Ehsan Akhgari 7a5a9f6fd7 Bug 1386468 - Only register SelectionChangeListener for plaintext controls when dom.select_events.textcontrols.enabled is turned on; r=mystor 2017-08-02 19:58:07 -04:00
Jonathan Watt bcaeb4d9e8 Bug 1379474 - Update various ReflowInput variable names to match the new type name. r=xidorn
MozReview-Commit-ID: 1pMLInpeMGY
2017-07-25 12:02:35 +01:00
Timothy Nikkel eb6908084a Bug 1356705 - Update range when an async smooth scroll is interrupted with a new scroll. r=kip
MozReview-Commit-ID: 3iU6oJz8O6O

--HG--
extra : rebase_source : 64b1394181560158036b54860bc68618393b7a43
2017-04-28 01:52:00 -04:00
Matt Woodrow 781ec6ffa1 Bug 1388162 - Add a Destroy function to nsDisplayItem to use instead of manually invoking the destructor, this will allow us to recycle them in the future. r=mstange
* * *
[mq]: fix

MozReview-Commit-ID: LUXZAIL73BJ
2017-08-07 16:07:43 +12:00
Matt Woodrow 40f5b92e3b Bug 1388161 - Store the dirty rect on the display list builder rather than passing it as a parameter to BuildDisplayList. r=mstange 2017-08-07 14:23:35 +12:00
Sebastian Hengst 8257b2d113 Backed out changeset 8f2dd8f13b53 (bug 1388161) for failing chrome's test_animation_performance_warning.html | preserve-3d transform. r=backout 2017-08-10 14:40:21 +02:00
Sebastian Hengst 7f85daeb2a Backed out changeset e9985564e081 (bug 1388162) for failing chrome's test_animation_performance_warning.html | preserve-3d transform. r=backout 2017-08-10 14:40:20 +02:00
Matt Woodrow 95f2e31f88 Bug 1388162 - Add a Destroy function to nsDisplayItem to use instead of manually invoking the destructor, this will allow us to recycle them in the future. r=mstange 2017-08-07 16:07:43 +12:00
Matt Woodrow a3a130b6ff Bug 1388161 - Store the dirty rect on the display list builder rather than passing it as a parameter to BuildDisplayList. r=mstange 2017-08-07 14:23:35 +12:00
Morris Tseng 2ad398aebc Bug 1391136 - Handle context lost in layers-free mode. r=jgilbert
MozReview-Commit-ID: 1J0EggRmM4i
2017-08-18 15:13:29 +08:00
Sebastian Hengst 7879c55451 Backed out changeset 5ea221b039d4 (bug 1363922) for bustage at layout/painting/FrameLayerBuilder.cpp:5863 (defined but unused). r=backout on a CLOSED TREE 2017-08-17 16:12:08 +02:00
Sebastian Hengst fb32ca19c4 Backed out changeset 189abf9f8d6d (bug 1363922) 2017-08-17 16:11:28 +02:00
Bas Schouten 9207223d59 Bug 1363922 - Part 2: Estimate scale of frames based on their PresShell resolution. r=mstange
MozReview-Commit-ID: 8f6T3PiPkF8
2017-08-17 15:45:31 +02:00
Bas Schouten fe49d64a98 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
Daniel Holbert d95e955d65 Bug 1393098 part 1: Adjust nsTextFrame::CharacterDataChanged to skip redundant requests for reflow, via a new boolean member-var. r=jfkthame
Some benchmarks & use-cases cause nsTextFrame::CharacterDataChanged to be
called multiple times for the same text between reflows.  Each call triggers a
slightly-expensive call to shell->FrameNeedsReflow(), for each affected
nsTextFrame in the continuation chain. (OK, it's not quite that bad -- we
skip the FrameNeedsReflow calls for siblings, since the ancestor
notifications/tweaks would all be the same.)

This patch makes us set a flag on the nsTextFrame to indicate that a reflow has
*already* been requested by this chunk of code, and we'll now use that to skip
the FrameNeedsReflow() call (and the dirty-bit-setting for siblings) on the
next invocation. And we clear this new flag when the pending reflow actually
happens.

This shouldn't change behavior in a web-observable way, but it should speed
things up by removing redundant work.

MozReview-Commit-ID: 5nmbZHEFFDi

--HG--
extra : rebase_source : 1f40abbc9eb90713095d2aff63f5a54a634e5aea
2017-08-31 10:45:38 -07:00
Daniel Holbert c81d05b3b7 Bug 1393098 part 0: Refactor logic (add helper bool & reduce GetParent calls), in nsTextFrame::CharacterDataChanged. r=jfkthame
This patch doesn't affect behavior at all -- it just adjusts the logic
slightly. Specifically, this patch:

 (a) Changes some code that currently tracks a frame, to now instead track that
     frame's parent, since we only ever call GetParent() on it anyway.
 (b) Drops a null-check that becomes unnecessary as a result of that
     change. (It was only there to protect us from calling GetParent() on a
     null pointer during the first loop iteration, and now that's not a risk
     since we're tracking the parent itself, and a null value will fail the
     equality comparison and do the right thing.)
 (c) Captures the "are ancestors already aware of a reflow request for my
     subtree" if-condition in a named boolean helper-variable.
 (d) Adds/improves documentation.

MozReview-Commit-ID: 7dEflfiERYB

--HG--
extra : rebase_source : 0981952a6fa08f6c995ea6e21dd0cef4f6934bdc
2017-08-31 10:45:36 -07:00
Nicolas Silva 2d3eb6cef7 Bug 1393031 - Remove unused nsTArray<WebRenderParentCommand>& parameter all over the place. r=jrmuizel 2017-09-14 20:21:54 +02:00
Nicolas Silva 58c3eac416 Bug 1393031 - Use IpcResourceUpdateQueue in more places. r=jrmuizel 2017-09-14 20:21:46 +02:00
Nicolas Silva 6721e0dbdc Bug 1393031 - Begin moving OpAddExternalImage to IpcResourceUpdateQueue and recycle image keys in WebRenderImageLayer. r=jrmuizel 2017-09-14 20:21:36 +02:00
Nicolas Silva 59e80c8f7e Bug 1393031 - Use shared memory to pass resource update data. r=jrmuizel 2017-09-14 18:48:55 +02:00
Wes Kocher 3c2dc39278 Merge m-c to inbound, a=merge
MozReview-Commit-ID: BgPWEtPV0sy
2017-07-31 17:49:47 -07:00
James Willcox d0bb12024d Bug 1381916 - Remove support for plugins on Android r=jchen,bsmedberg
MozReview-Commit-ID: AcAIC1QQew2
2017-07-31 12:25:16 -05:00
Kyle Machulis d812ac4e87 Bug 1279218 - Additional applet tag logic removal; r=bz
I've been having problems with interdiffs on mozreview lately, so for
ease of review, this patch is being submitted as a seperate patch for
review. Once it is r+'d, it will be folded into the first patch in
this set before landing.

MozReview-Commit-ID: CS9MngaXlBd

--HG--
extra : rebase_source : 6a86fd4f7a66e73497a756976a2562d183002a2a
2017-07-28 16:44:39 -07:00
Sebastian Hengst bbe32b6bed merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 44WBcWjnVo
2017-07-30 11:19:17 +02:00
Boris Zbarsky ada6e6cf35 Bug 1324619 part 6. Handle dynamic restyles of ::first-line in stylo. r=emilio
MozReview-Commit-ID: 3jQhIqPuL1g

--HG--
extra : rebase_source : 094829b3cecf0549462cbe107d293a7e56ea2e5b
2017-07-28 21:20:47 -04:00
Boris Zbarsky 6c4a600617 Bug 1324619 part 5. Implement FrameForPseudoElement for ::first-line. r=emilio
MozReview-Commit-ID: JXcV58peI7T

--HG--
extra : rebase_source : 013bde490d40f409af15752f15abe04df004aad6
2017-07-28 21:20:46 -04:00
Boris Zbarsky dbb8398bd1 Bug 1324619 part 2. Stop unnecessarily trying to reparent the style contexts of our kids in nsFirstLetterFrame::SetInitialChildList. r=emilio
The style contexts are already correct here; the frame constructor ensures that.

MozReview-Commit-ID: CWO225MB6Pe

--HG--
extra : rebase_source : ebc74ab507aaad6ac4c301cbbcdcab30ad3034d0
2017-07-28 21:11:18 -04:00
Timothy Nikkel 5db4da69f6 Backed out changeset bc4c5281f2c2 (bug 1379887) for causing regressions. 2017-07-29 01:21:32 -05:00
Carsten "Tomcat" Book 892bedca2e merge mozilla-inbound to mozilla-central a=merge 2017-07-28 15:24:39 +02:00
Manish Goregaokar e632c1393e Bug 1383492: stylo: Change nscoord_MAX to 1<<30 - 1 ; r=emilio,dbaron
nscoord_MAX is (1<<30) so that we can check for overflow *after* adding
two nscoords. However, (nscoord_MAX + nscoord_MAX) will still overflow.
Subtracting one makes this no longer possible.

MozReview-Commit-ID: BtbQRMp5kWm
2017-07-27 18:57:32 -07:00
Mason Chang cc5d07571f Bug 1381973 - Lazily create the reference DT in DrawTargetCapture. r=dvander 2017-07-26 15:43:00 -07:00
Daniel Holbert 764274fe30 Bug 1059138: add this bug's testcase as a crashtest. (no review, test-only)
This bug report became semi-obsolete after we restructured the way flex items
are reordered for the CSS 'order' property. I'm adding its testcase as a
crashtest for good measure & for regression-testing.

MozReview-Commit-ID: 9ytJymbxZx
2017-07-27 15:32:33 -07:00
Daniel Holbert 442d7cef56 Bug 876749: Remove stale asserts(0-5) annotation for crashtest that doesn't assert anymore. (no review)
I believe crashtest 876074-1.html stopped asserting (about flex item frame-list
sortedness) once we stopped reordering the flex item child-list, in bug 812687.
So we don't need this asserts() annotation anymore.

MozReview-Commit-ID: BlMoFnkLQeU
2017-07-27 12:38:16 -07:00
J. Ryan Stinnett c79cb3fbb1 Bug 1380053 - Stylo reftest annotations for all OSes. r=manishearth
MozReview-Commit-ID: JNsNUOZfd2e

--HG--
extra : rebase_source : 05a71f9a0fe484c93931fb230cf0752a3b1b8b00
2017-07-20 22:02:00 -05:00
Carsten "Tomcat" Book d360d49d2a merge mozilla-inbound to mozilla-central a=merge 2017-07-27 10:57:25 +02:00
Tobias Schneider 3880ddff03 Bug 1382327 - (reftest) Rename reftest-print to reftest-paged. r=dbaron
--HG--
extra : rebase_source : c4e47e2de8d615c77e7e9ce88f6b21c9d15c92e4
2017-07-26 22:53:46 -07:00
cku 321461fb26 Bug 1301245 - Part 2. Do not resolve a style image if the given url has a fragment. r=heycam
MozReview-Commit-ID: 18LFjlWZBLl

--HG--
extra : rebase_source : afbba14c09f937340bd506859cbcc829100f9e8d
2017-07-26 11:21:30 +08:00
Ethan Lin 413b71eafc Bug 1382985 - Support image animation for layers-free mode. r=kats
We should do SchedulePaint in nsImageFrame for layers-free mode and set
invalid flag to make sure the image will be repainted.

MozReview-Commit-ID: 2lXElZ151Qa

--HG--
extra : rebase_source : 56045f66f3b36afe8a6327b841d80073f1d038cb
2017-07-24 14:43:55 +08:00
Wes Kocher 18f09001d3 Backed out 4 changesets (bug 1341102, bug 1383492) for windows build bustage and crashtest assertions a=backout CLOSED TREE
Backed out changeset 1c4310082e35 (bug 1341102)
Backed out changeset 849c109d96b4 (bug 1341102)
Backed out changeset 11cadad891a4 (bug 1383492)
Backed out changeset b4dfcf4f795e (bug 1383492)

MozReview-Commit-ID: 4bDAPgiaepG
2017-07-26 18:09:45 -07:00
Manish Goregaokar 210c009a85 Bug 1341102: Fix bustage on a CLOSED TREE; r=bustage
MozReview-Commit-ID: Ho2PNnBhR3M
2017-07-26 17:06:56 -07:00
Manish Goregaokar 196d78a2ab Bug 1383492: stylo: Change nscoord_MAX to 1<<30 - 1 ; r=emilio,dbaron
nscoord_MAX is (1<<30) so that we can check for overflow *after* adding
two nscoords. However, (nscoord_MAX + nscoord_MAX) will still overflow.
Subtracting one makes this no longer possible.

MozReview-Commit-ID: BtbQRMp5kWm
2017-07-26 15:59:52 -07:00
Emilio Cobos Álvarez 1a47c01765 Bug 1384542: Move GetParent and IsLinkContext to GeckoStyleContext. r=heycam
MozReview-Commit-ID: C19yGcphixX
2017-07-31 14:32:59 +02:00
Emilio Cobos Álvarez 049aad7027 Bug 1384542: Get rid of GetParentAllowServo in implementation of CSS 'justify-items' property. r=dholbert,heycam
MozReview-Commit-ID: 4qydjqSoVXs
2017-07-31 14:32:51 +02:00
Boris Zbarsky 53455d52aa Bug 1384542: Remove the use of GetParentAllowServo in nsFirstLetterFrame. r=heycam
MozReview-Commit-ID: Gt9MX8t3vUh
2017-07-31 14:29:17 +02:00
Yoshi Huang 7036b3761f Bug 1382531 - Part 1: rewrite crashtest for data: URI is unique opaque origin. r=smaug 2017-07-25 09:56:02 +08:00
Mason Chang b4e1afb9e9 Bug 1365876. Blur text shadows on the CPU. r=lsalzman 2017-07-24 13:48:14 -07:00
Emilio Cobos Álvarez 2b7de51623 Bug 1381844: Be more explicit about the kind of style context we handle all the time. r=bholley
MozReview-Commit-ID: E0mdkhU3XBz
2017-07-22 18:02:57 +02:00
Sebastian Hengst f16a7f8371 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 4EWdTlEncz7
2017-07-22 11:38:42 +02:00
Wes Kocher d45eb771f0 Merge m-c to inbound, a=merge
MozReview-Commit-ID: Ah48RzFU8Mt
2017-07-21 18:20:46 -07:00
Sylvestre Ledru 7c0ae251cd Bug 1381253 - Remove redundant control flow declarations rs=ehsan
MozReview-Commit-ID: FFxP4aMCbOL

--HG--
extra : amend_source : 3aec108430b11048f47ffe19d5da7ac5034770a9
2017-07-15 19:03:04 +02:00
Emilio Cobos Álvarez 0fff6a4e53 Bug 1382593: Clean a bit nsImageMap. r=heycam
MozReview-Commit-ID: Htm2OoExJ3T

--HG--
extra : rebase_source : 0d4214ab9e0d98421ebd8f7dbaee8d36342cfe85
2017-07-03 20:35:14 +02:00
Sebastian Hengst 367f0ac5a2 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: IWRTFZdtzaE
2017-07-21 12:56:44 +02:00
Kartikaya Gupta 4b9801e41b Bug 1359808 - Don't do empty transactions for scroll updates if there are already pending transforms in the layer tree. r=mstange
The pending transforms must have been computed using the older scroll offset
values, which means that updating the scroll offsets without recomputing the
transforms will make them wrong. If we do an empty transaction for the scroll
offset updates, the transforms will not get computed. This patch catches this
scenario and schedules a full paint instead of the empty transaction instead.
The case where the scroll offset is modified *before* the transform is already
handled by code in nsIFrame::TryUpdateTransformOnly.

MozReview-Commit-ID: I5s5J7BS1ru

--HG--
extra : rebase_source : 63fec656440c8bee322f069a4466a311ebcd0f7d
2017-07-12 11:14:11 -04:00
Sebastian Hengst 42d11fca28 Backed out changeset 22dabf04e560 (bug 1380133) 2017-07-20 15:40:12 +02:00
Sebastian Hengst 8400ef0636 Backed out changeset cc720d72d024 (bug 1380133) 2017-07-20 15:40:06 +02:00
Kris Maglione 654f2c0c26 Bug 1374025. Try calling ShowViewer again later if it hasn't succeeded yet when we get a render frame parent. r=tnikkel 2017-07-20 16:24:40 -05:00
Emilio Cobos Álvarez 821b4127c4 Bug 1366721: Restyle additional style contexts in ServoRestyleManager. r=heycam
I was about to assert that other non-primary frames don't have additional style
contexts everywhere, but that wouldn't make much sense, given they don't
correspond to an element we could selector-match against.

MozReview-Commit-ID: EtAQbSg6nP6

--HG--
extra : rebase_source : e9e10c53b7a69506750bd3c7c985946f7027dc30
2017-07-20 18:29:14 +02:00
Kartikaya Gupta 1fc595df29 Bug 1382682 - Update a param to be a const-ptr. r=mstange
MozReview-Commit-ID: 1bFolt83iaL

--HG--
extra : rebase_source : 4f9839f4accbe2b41b62a1ad36f8a9164fbae66e
2017-07-20 12:33:09 -04:00
Ryan VanderMeulen d229288071 Merge m-c to autoland. a=merge
CLOSED TREE

--HG--
extra : amend_source : 2ab51304cc7df444f22c3aac001a1aba61faee3a
2017-07-21 09:42:41 -04:00
Cameron McCormack 350253019b Bug 1380133 - Part 4: Make CalcStyleDifferenceInternal not cache any new structs on ServoStyleContexts when in a traversal. r=emilio
MozReview-Commit-ID: Eu4MvdQUBor
---
 layout/generic/nsFrame.cpp      |  8 ++++++++
 layout/style/nsStyleContext.cpp | 11 +++++++----
 layout/tables/nsTableFrame.cpp  |  8 ++++++++
 3 files changed, 23 insertions(+), 4 deletions(-)

--HG--
extra : rebase_source : b77d33b5823eca4a57e568881c00959ddecf9089
2017-07-21 11:42:43 +08:00
Cameron McCormack d77c5d77d8 Bug 1380133 - Part 3: Remove nsPresContext argument to ServoStyleContext::ResolveSameStructsAs. r=emilio
We have it in mPresContext already.

MozReview-Commit-ID: G1kKHGFOXTp
---
 layout/base/ServoRestyleManager.cpp     | 2 +-
 layout/generic/ViewportFrame.cpp        | 2 +-
 layout/style/ServoStyleContext.h        | 3 +--
 layout/style/ServoStyleContextInlines.h | 6 +++---
 4 files changed, 6 insertions(+), 7 deletions(-)

--HG--
extra : rebase_source : 63e1e4fba69c587f7eb403efd7d8dd98214c86ac
2017-07-21 11:42:43 +08:00
Wes Kocher b5bcc4905e Merge inbound to central, a=merge CLOSED TREE
MozReview-Commit-ID: CBL7SUEUGKV
2017-07-19 17:29:56 -07:00
Andrew Osmond 8a1d7d4bf1 Bug 1359833 - Part 7. nsImageLoadingContent native observers should use the new API. r=tnikkel 2017-07-19 14:15:12 -04:00
Andrew Osmond 02e515fc18 Bug 1359833 - Part 5. Callers pass the loading document to imgRequestProxy::SyncClone and GetStaticRequest. r=tnikkel 2017-07-19 14:15:11 -04:00
Ryan Hunt 522bc76415 Bug 1382128 part 8 - Remove Wr prefix from some type aliases. r=kats
MozReview-Commit-ID: 5h7QobhcYc1

--HG--
extra : rebase_source : 34d6636b6c3726ccc21b105f05227e27f84e63c9
2017-07-19 03:28:58 -04:00
Ryan Hunt 017d292cac Bug 1382128 part 2 - Remove WrPoint, WrSize, WrRect, WrMatrix, and WrColor. r=kats
MozReview-Commit-ID: 9koNScu4CyE

--HG--
extra : rebase_source : 68185e949ddf2ae346a5d597d056a7f2d9ea7a28
2017-07-18 18:32:46 -04:00
Daniel Holbert fc581a5454 Bug 1284888 part 2: Make TextOverflow::WillProcessLines() return a UniquePtr, for stronger lifetime guarantees. r=jfkthame
MozReview-Commit-ID: 7KVsFlxuL9p

--HG--
extra : rebase_source : 13ee634d9a310236f70c30afa0d3c5a798a00194
2017-07-18 22:42:42 -07:00
Daniel Holbert 09b0fe59f0 Bug 1284888 part 1: Annotate TextOverflow as a heap-only final class, to reflect reality. r=jfkthame
MozReview-Commit-ID: 9e03pevzCOc

--HG--
extra : rebase_source : 1bd889e9142390e746d1bbed3092c6108049c3f5
2017-07-18 22:36:24 -07:00
Ryan Hunt 3f3cb0a954 Bug 1382128 part 1 - Use a namespace in webrender_bindings. r=kats
MozReview-Commit-ID: 3JTMa9Ix5S7

--HG--
extra : rebase_source : 0bea14d9e395cab260d2db5135b1f64e9f82b2e2
2017-06-27 19:20:36 -04:00
Wes Kocher 33e10acd83 Backed out 2 changesets (bug 1284888) for windows build failures in TextOverflow.h a=backout
Backed out changeset 520df8c2a0ac (bug 1284888)
Backed out changeset 39e9b0e7ae04 (bug 1284888)

MozReview-Commit-ID: CIzl29LVfFM
2017-07-18 20:59:51 -07:00
Cameron McCormack a5c91255ab Bug 1380133 - Part 4: Make CalcStyleDifferenceInternal not cache any new structs on ServoStyleContexts when in a traversal. r=emilio
MozReview-Commit-ID: Eu4MvdQUBor

--HG--
extra : rebase_source : c98706cec1788662a09cb1d99bcd3893658261a9
2017-07-19 15:11:09 +08:00
Cameron McCormack 4b22db7890 Bug 1380133 - Part 3: Remove nsPresContext argument to ServoStyleContext::ResolveSameStructsAs. r=emilio
We have it in mPresContext already.

MozReview-Commit-ID: G1kKHGFOXTp

--HG--
extra : rebase_source : fc3de196bd0bd1a78d5bdaca3078e89edd4f014f
2017-07-19 14:39:40 +08:00
Masayuki Nakano 2f92264fb7 Bug 1377978 - Make nsRange use uint32_t to offset r=smaug
DOM Standard defines that offset of Range is unsigned long.  However, nsRange uses int32_t to them.

This patch makes nsRange use uint32_t instead.  However, this patch does NOT allow to set over INT32_MAX as offset values since a lot of users of nsRange cannot treat the values as over INT32_MAX because a lot of internal APIs take int32_t as offsets.

For easier to search such points, this patch adds static_cast<int32_t> to uint32_t variables when they are used for int32_t arguments.

And note that nsContentUtils::ComparePoints() behaves odd.  It accepts negative offset and compares such value with valid offset simply.  This patch still uses int32_t offset variables in nsRange::CompareNodeToRange() even though it may be negative value if nsINode::IndexOf() returns -1 because the caller of it depends on this behavior.

MozReview-Commit-ID: 8RbOgA86JuT

--HG--
extra : rebase_source : 46d526c6d50dfa2f104439b19b8691477b17a4af
2017-07-19 22:49:52 +09:00
Daniel Holbert 93add5506b Bug 1284888 part 2: Make TextOverflow::WillProcessLines() return a UniquePtr, for stronger lifetime guarantees. r=jfkthame
MozReview-Commit-ID: 7KVsFlxuL9p

--HG--
extra : rebase_source : e0ee604800f456d1a0b24f7933d722fe51d15122
2017-07-18 10:48:07 -07:00
Daniel Holbert 5211e242a7 Bug 1284888 part 1: Annotate TextOverflow as a heap-only final class, to reflect reality. r=jfkthame
MozReview-Commit-ID: 9e03pevzCOc

--HG--
extra : rebase_source : b099f11bba849f83a0eb536a7573b45d265a7b62
2017-07-18 10:47:30 -07:00
Ryan VanderMeulen 366f48ad7e Merge inbound to m-c. a=merge 2017-07-18 12:14:50 -04:00
Christoph Kerschbaumer 87798d9abf Bug 1337270 - Convert tests within layout/ to not rely on principal inheritance for data: URIs. r=smaug 2017-07-18 07:50:07 +02:00
Manish Goregaokar cdb73416fd Bug 1367904 - Part 14: stylo: Remove FFI calls for fetching style structs from ServoComputedValues; r=bholley
MozReview-Commit-ID: 2HrVZl9HZu1
2017-07-17 21:01:10 -07:00
Manish Goregaokar d909c5cea0 Bug 1367904 - Part 11: stylo: Use ServoStyleContext in ServoStyleSet/ServoRestyleManager; r=bholley
MozReview-Commit-ID: JJOBixTSCZq
2017-07-17 21:00:54 -07:00
cku b507182a78 Bug 1381503 - Part 2. Do not use GetWidgetLayerManager if gfxPrefs::LayersAllowTextLayers return false. r=mattwoodrow
Call gfxPrefs::LayersAllowTextLayers before aBuilder->GetWidgetLayerManager,
which is costly. Since LayersAllowTextLayers returns false by default, we are
free of using aBuilder->GetWidgetLayerManager.

MozReview-Commit-ID: Jv1voPYjOad

--HG--
extra : rebase_source : b4892a8800d71eeac5f30b8425954505cade31e6
2017-07-17 23:31:36 +08:00
Xidorn Quan 2b1d414ed0 Bug 1364274 part 3 - Adjust test expectation. r=heycam
MozReview-Commit-ID: GagkRtB8PGv

--HG--
extra : rebase_source : beb99889b8f8c10dda6a95bd9ae45d0bbe789d86
2017-07-05 14:08:45 +10:00
Daniel Holbert 84d56b987a Bug 1380461 part 1: Clarify ancient code-comment about the helper-variables we use as AddRemoveScrollbar outparams. r=jfkthame
MozReview-Commit-ID: Fxzes2yuLHJ

--HG--
extra : rebase_source : 27207908b6bc703fb64e975316c68db0c4dfa1d1
2017-07-13 09:45:52 -07:00
Daniel Holbert ac96bfc73b Bug 1380461 part 0: Fix mis-indentation in nsXULScrollFrame::AddRemoveScrollbar. (whitespace-only) r=jfkthame
MozReview-Commit-ID: zJBPEUa4Po

--HG--
extra : rebase_source : 68506d3f0b6c6cf86a29b9c6d28b44386c029687
2017-07-13 09:45:44 -07:00
Xidorn Quan 4c45d7e560 Bug 1308876 - Add crashtest that used to hang Firefox. r=dholbert
MozReview-Commit-ID: 2ZCrhcV5i2G
2017-07-12 19:37:13 -07:00
L. David Baron 46238dd351 Bug 1308876 - Preserve behavior of ignoring parent dirty bit for column groups. r=dholbert
In the existing code, the parent having NS_FRAME_IS_DIRTY is not
propagated to column groups because nsTableFrame::ReflowColGroups checks
the child dirty bit before constructing the reflow state for the child.
This preserves that behavior in the presence of the primary patch in bug
1308876.

I noticed this while debugging the assertion count failure of
layout/base/crashtests/470851-1.xhtml .  It doesn't help that failure,
but it still seems like the safe thing to do.

MozReview-Commit-ID: EhfIQQkeaJx
2017-07-12 19:37:12 -07:00
L. David Baron 6edf234e49 Bug 1308876 - Mark child frames as dirty before starting reflow of the parent, so that if we reflow a child twice, it's only dirty the first time. r=dholbert
This is the primary patch in this bug, and makes the performance
improvement that fixes this bug.

The assertion count increase for layout/generic/crashtests/1015844.html
is accompanied by a layout change in the testcase as well.  However, I'm
not planning to fix it in this sequence; fundamentally columnsets with
specified heights inside a paginated context (like another columnset) do
not work in any reasonable way, and changing the number of times we
reflow them can change the layout.  At least, assuming I didn't lose
something in the process of simplifying the testcase.

ISSUES:
 - may make block inside XUL worse in performance by marking dirty more (see subdoc in Firefox UI, or text control innards?)

MozReview-Commit-ID: GdOvPynqcFP
2017-07-12 19:37:12 -07:00
L. David Baron a97ab76724 Bug 1308876 - Reflow all kids when column-fill is auto and height has changed. r=dholbert
This fixes the regression in
layout/reftests/columns/column-balancing-nested-001.html from the
primary patch in this bug, for which a simplified testcase is
https://bugzilla.mozilla.org/attachment.cgi?id=8848293 .  I believe it's
simply a pre-existing bug that wasn't previously exposed.  I suspect
it may be possible to write a test that shows the bug prior to the
patch.  However, it's difficult, since it requires triggering height
changes in a multicol with an 'auto' height (since a non-'auto' height
would cause the multicol to have NS_FRAME_CONTAINS_RELATIVE_BSIZE set by
nsColumnSetFrame::Reflow, which would make skipIncremental false because
ShouldReflowAllKids returns true).  I suspect any working testcase would
likely be rather brittle, so I haven't pursued it further (particularly
given the complexity of the minimal testcase).

MozReview-Commit-ID: Gve3XKEPSxL
2017-07-12 19:37:12 -07:00
L. David Baron b6efec5651 Bug 1308876 - Fix ColumnSet to reflow a non-dirty column when the block-size has shrunk and the column might need to push some children to the next column. r=dholbert
This fixes (confirmed by testing locally) a regression in
layout/reftests/w3c-css/received/css-multicol-1/multicol-nested-margin-004.xht
resulting from the primary patch in this bug, which tends to make frames
dirty less often.  The problem with that test is that (at least in a
simplified form), in the final reflow of the inner ColumnSet in the
first column of the outer ColumnSet, the inner ColumnSet chooses not to
reflow its first column, thus leaving that first column having a height
that is too large for the inner ColumnSet to fit in the first column of
the outer ColumnSet, causing the entire inner ColumnSet (rather than
just part of it) to be pushed to the next column.

I believe this existing incremental reflow code just doesn't make sense.
The code I'm modifying dates back primarily to:
c237520c89 (October 2004, initial columns implementation)
ee070ec95f (March 2005)
31e3540d1e (November 2006)

The first thing that doesn't make sense is the condition modified at the
end of this patch:
  (!reflowNext && (skipIncremental || skipResizeBSizeShrink))
There's simply no reason that that || isn't required to be an &&, as far
as I can tell.  Even if we don't need to reflow due to any of the
standard incremental reflow conditions, we can need to reflow because
the block size is shrinking and the column no longer fits.

Note that things were already OK when we required reflow due to
NS_SUBTREE_DIRTY(this), because of the way shrinkingBSizeOnly was
initialized using !NS_SUBTREE_DIRTY(this), thus excluding such cases
from the optimization.

The rest of the patch falls out of turning the || into an && in an
efficient way (i.e., without the extra !NS_SUBTREE_DIRTY(this) test, and
avoiding doing extra tests that we know we're not going to need by
coalescing all the incremental reflow tests into a single variable).

I tested that this patch passes try on its own (on 64-bit Linux debug):
https://treeherder.mozilla.org/#/jobs?repo=try&revision=a279023fb7e8f3349d5ecbfb95807d6b097cdbcb

MozReview-Commit-ID: BD3ofmWN5Wl
2017-07-12 19:37:12 -07:00
L. David Baron 57af4c8b58 Bug 1308876 - Remove assertion that starts firing more when we mark frames dirty less and thus call PrepareResizeReflow more. r=mats
This fires, for example, in layout/base/crashtests/265973-1.html (and a
number of other tests, I believe) with the primary patch in this bug.
This is because the primary patch causes frames to be dirty less often,
which sends us into the PrepareResizeReflow codepath, which only happens
when frames are not dirty.

I don't think NS_CoordSaturatingAdd is needed here, since newAvailISize
is used only when deciding whether or not lines need reflow; wraparound
should only cause us to do a little extra work.

Note: This patch passes try on its own, on Linux64 debug.

MozReview-Commit-ID: K6Z5MvG7awp
2017-07-12 19:37:12 -07:00
L. David Baron e094153c1e Bug 1308876 - Don't continue reflow after deciding we need to try again due to page-break-inside:avoid. r=mats
The primary patch in this bug causes fewer dirty reflows, which leads to lines
being out-of-date for the reason described in the comment.  This causes
incorrect layout of some references sections on wikipedia, for which a
simplified testcase is included.

This bug was not caught by anything in our test suite, but I noticed it
while browsing wikipedia (since I use a build that has my patches in it
for my regular browsing).

MozReview-Commit-ID: 4hTQpGS2pZH
2017-07-12 19:37:12 -07:00
L. David Baron 8487157732 Bug 1308876 - Mark lines dirty when we abort their reflow due to page-break-inside:avoid. r=mats
Both of the changes are needed to fix
layout/reftests/w3c-css/submitted/css21/pagination/moz-css21-float-page-break-inside-avoid-4.html
with the primary patch in bug 1308876.

That patch changes the transfer of NS_FRAME_IS_DIRTY from parent to
child so that it happens at the start of the parent's reflow rather than
later at the start of the child's reflow, which means that frames that
are pulled into a dirty frame during reflow are not marked dirty (and
thus forced to reflow all of their lines).  This means that the primary
patch in bug 1308876 introduces the possibility of non-dirty reflows
during printing, which means we exercise non-dirty relayout code in a
number of tests where we did not do so previously.

Note: This patch passes try on its own, on Linux64 debug.

Writing a simple test for this that fails without the primary patch in
bug 1308876 seems difficult.  ColumnSetFrame responds to
nsReflowStatus::NextInFlowNeedsReflow by marking the next-in-flow
*dirty* (which page frames don't), which makes it hard to test in
columns, at least without nesting.  (Colums probably shouldn't do that,
though, but that's a performance fix for another time.)

MozReview-Commit-ID: JZ3qWTSO2lX
2017-07-12 19:37:11 -07:00
L. David Baron df36211f4f Bug 1380521 - Fix spelling of mSuppressScrollbarUpdate member variable. r=dholbert
MozReview-Commit-ID: 6i2cz2Flwtb
2017-07-12 19:37:11 -07:00
L. David Baron 57368ff4e7 Bug 1379334 - Make XULScrollFrame test for needing a vertical scrollbar because of the size of the horizontal scrollbar. r=dholbert
This fixes an incremental layout bug, where the number of times we
reflow the frame affects its layout.  This is because we make the
decisions about the vertical scrollbar before the horizontal scrollbar
(and, when making the decision, adjust mHelper.mScrollPort for the size
of the scrollbar).  Thus, in order to avoid a situation where reflowing
the scrollframe once leads us to have no vertical scrollbar, but
reflowing it a second time leads us to add that scrollbar, we need to
retest for the need for a vertical scrollbar after we add the horizontal
one.

(It's possible there are some other missing cases here, but this is the
one that (a) already existed in the code and (b) is needed to fix the
reftest failure on Windows that I got on bug 1308876, in
layout/reftests/text-overflow/xulscroll.html .

The reftest here shows the bug even without bug 1308876 (though I
confirmed that only by loading the test and reference in a nightly
build, not in the reftest harness).  I did test that, in combination
with bug 1308876, the test fails without the patch and passes with the
patch.

MozReview-Commit-ID: LhMi7LbmB6J
2017-07-12 19:37:11 -07:00
L. David Baron 5381103fc6 Bug 1379334 - Convert mis-indented code to 2-space indent, plus bracing and logical operator position fixes when reindenting. r=dholbert
MozReview-Commit-ID: ElsSNF40LZQ
2017-07-12 19:37:11 -07:00
Boris Zbarsky 190842b75b Bug 667079. Make sure to set the right containing block size for inner tables no matter what. r=dbaron
MozReview-Commit-ID: 3EwrNfgJ2oA
2011-06-25 01:21:47 -04:00
Carsten "Tomcat" Book bf8ecdbf1a Merge mozilla-central to autoland 2017-07-12 11:18:59 +02:00
Carsten "Tomcat" Book 0edfa97e38 merge mozilla-inbound to mozilla-central a=merge 2017-07-12 11:07:09 +02:00
Emilio Cobos Álvarez b779c61dd4 Bug 1379505: Account for the page frame in UpdateStyleOfOwnedAnonBoxes. r=heycam
MozReview-Commit-ID: L2ouruOMmIq

--HG--
extra : rebase_source : dabe8cd79eff5922074021453b08bba0bfccd5b7
2017-07-10 10:16:19 +02:00
Ethan Lin a11b08a3ac Bug 1377571 - Add fallback path for layers-free. r=jrmuizel
MozReview-Commit-ID: KOM7JXYljX2

--HG--
extra : rebase_source : 94a8c314ac311a05256a27bd61648815b0e42734
2017-07-06 00:29:41 +08:00
Timothy Nikkel 96e0c1cbc6 Bug 1379887. Don't clobber the value of mWillBuildScrollableLayer when we are building a display list for event handling. r=mstange
ScrollFrameHelper::DecideScrollableLayer doesn't get the actual value of usingDisplayPort/wasUsingDisplayPort if we are not painting to the window. It then sets mWillBuildScrollableLayer to usingDisplayPort. mWillBuildScrollableLayer is the value that determines if we are active and hence an ASR, we don't want to change that between paint display lists for an event handling display list.

We then want to condition uses of mWillBuildScrollableLayer and the return value of DecideScrollableLayer on if we want painting to the window so we get the same behaviour as before when not painting to the window.
2017-07-11 15:30:04 -05:00
cku 6f5fc6f921 Bug 1379404 - Part 1. Prevent using gfxContext::Save/Restore in nsTextFrame. r=mattwoodrow
MozReview-Commit-ID: Aob1J2pXNk1

--HG--
extra : rebase_source : 1e60f60167f54728ee5b604a8923fee7baab00f0
2017-07-08 23:52:00 +08:00
Masayuki Nakano 3fd54e5d5f Bug 1377989 - part11: Rename local variables, |startParent| which is set to start container of nsRange to |startContainer| r=smaug
This does NOT change variable names like |startNode| because it's not odd and somebody use it for nsINode and startContent for nsIContent.  So, changing them needs more work.

MozReview-Commit-ID: H19pTDprRuT

--HG--
extra : rebase_source : 7a7454ac14da48a597ff19a50c863d04dcaddd6e
2017-07-12 00:02:14 +09:00
Masayuki Nakano b1f8f6d611 Bug 1377989 - part10: Rename local variables, |parent| which is set to container of nsRange to |container| r=smaug
MozReview-Commit-ID: 9w3O7MJEDBS

--HG--
extra : rebase_source : 92194bd18c9e79210c7cb4e9835a528d51e8ba7a
2017-07-11 23:52:39 +09:00
Masayuki Nakano e756fe8300 Bug 1377989 - part7: Rename aParent, aParentNode and aNode related to nsRange to aContainer r=smaug
MozReview-Commit-ID: K7Lu0U0pdC8

--HG--
extra : rebase_source : 324de9d2927231414395799c0f002889321b7d1e
2017-07-11 23:33:04 +09:00
Masayuki Nakano 4ee17d1b8c Bug 1377989 - part2: Rename nsRange::GetEndParent() to nsRange::GetEndContainer() r=smaug
MozReview-Commit-ID: K4qPjtZ62yO

--HG--
extra : rebase_source : 8653db98b9bd70c77a6aac8d906f401f0222c58a
2017-07-11 21:11:37 +09:00
Masayuki Nakano 2f2ce53be5 Bug 1377989 - part1: Rename nsRange::GetStartParent() to nsRange::GetStartContainer() r=smaug
Web standards use "Container" instead of "Parent".  So, nsRange shouldn't use "Parent" for its members and methods.

MozReview-Commit-ID: Ho6N0diuWtE

--HG--
extra : rebase_source : ee4eb7068a68b118c7fe98e9e9e7fa9c9e7f13e2
2017-07-11 20:53:04 +09:00
Botond Ballo 60d852855e Bug 1326686 - Only use the most recent refresh time as the start time of an AsyncScroll when the refresh driver is under test control. r=kip
MozReview-Commit-ID: FkyJfbaPPVl

--HG--
extra : rebase_source : 58ea615484a54b74b76f17e859136cf371b7c05f
2017-01-20 19:28:29 -05:00
Carsten "Tomcat" Book 6121e5b902 Backed out changeset 31c43a9ffa8b (bug 1379474) for bustage 2017-07-10 08:06:30 +02:00
Jonathan Watt b4ab3914e7 Bug 1379474 - Update various ReflowInput variable names to match the new type name. r=xidorn
MozReview-Commit-ID: 1pMLInpeMGY
2017-06-13 11:45:17 +01:00
L. David Baron d4c979a87f Bug 1377497 - Pass the correct writing mode to SizeComputationInput::DisplayInitOffsetsEnter. r=jfkthame
This avoids asserting when the writing mode doesn't correspond to the
one stored (DEBUG-only) in aPercentBasis.

MozReview-Commit-ID: KKqms9X17SS
2017-07-07 09:20:56 -07:00
Sebastian Hengst 629ef010df Backed out changeset f07caa23cdbb (bug 1377497) for bustage at layout/generic/ReflowInput.cpp:2543: macro "DISPLAY_INIT_OFFSETS" passed 6 arguments, but takes just 5. r=backout on a CLOSED TREE
--HG--
extra : amend_source : 3666e631a99bdda91c09e2a1237e0e4ab65fdfba
2017-07-07 18:52:50 +02:00
L. David Baron 609b65745d Bug 1377497 - Pass the correct writing mode to SizeComputationInput::DisplayInitOffsetsEnter. r=jfkthame
This avoids asserting when the writing mode doesn't correspond to the
one stored (DEBUG-only) in aPercentBasis.

MozReview-Commit-ID: KKqms9X17SS

--HG--
extra : transplant_source : %0Eh%09F%17%15%0D%D1%D3%DA%9B%85%21z%ED%3Dx%EA%F9%E8
2017-07-07 09:20:56 -07:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Wes Kocher bfc45b98b9 Merge m-c to inbound, a=merge
MozReview-Commit-ID: 9XdoB5MuVz6
2017-07-05 17:17:41 -07:00
Mats Palmgren 489c03b415 Bug 1378481 - Assign 'roundingError' in the default branch too, to avoid a maybe-uninitialized compiler warning. r=dholbert
MozReview-Commit-ID: CQk1PBaflct
2017-07-05 23:07:11 +02:00
Mats Palmgren a31659e209 Bug 1377910 - Don't bother calling DisassociateRequestFromFrame if the frame doesn't have the HasImageRequest bit since it's a no-op in that case. r=dholbert
MozReview-Commit-ID: 4LlIFN7tARr
2017-07-05 23:07:11 +02:00
Jeff Muizelaar b1f8ce5e9c Bug 1378483 - Allow TextLayers in the parent process. r=mattwoodrow.
This fixes text using a painted layer in the Chrome.
2017-07-05 15:38:01 -04:00
Kartikaya Gupta cad9534e69 Bug 1377090 - Turn gfxMatrix into a typedef for MatrixDouble. r=jrmuizel
Most of this patch is updating a few places that use gfxMatrix to use
the equivalent-but-differently-named functions on MatrixDouble:
- Translate/Rotate/Scale get turned into PreTranslate/PreRotate/PreScale
- Transform(Point) gets turned into TransformPoint(Point)
- gfxMatrix::TransformBounds(gfxRect) gets turned into
  gfxRect::TransformBoundsBy(gfxMatrix).
- gfxMatrix::Transform(gfxRect) gets turned into
  gfxRect::TransformBy(gfxMatrix).
The last two functions are added in this patch as convenience wrappers
to gfxRect instead of Matrix.h because we don't want Matrix.h to "know"
about gfxRect (to avoid adding gecko dependencies on Moz2D). Once we
turn gfxRect into a typedef for RectDouble these will be eliminated
anyway.

MozReview-Commit-ID: BnOjHzmOSKn

--HG--
extra : rebase_source : cf1692d1f0d44a4b05d684a66678739181a426d5
2017-07-05 11:18:49 -04:00
Kartikaya Gupta 1c54bb2347 Bug 1377090 - Make the Matrix class templated so we can instantiate it with a double type. r=bas
This extracts a BaseMatrix template of which Matrix is now a particular
specialization. The BaseMatrix allows us to reuse the same code for
floats and doubles, much like the other "base" classes (BasePoint,
BaseRect, etc.).

MozReview-Commit-ID: HO7bA83S9E0

--HG--
extra : rebase_source : dcd84d9a978cdea00bb54eb11eefcca9c6635901
2017-07-05 11:18:48 -04:00
Carsten "Tomcat" Book 49921c11be Merge mozilla-central to autoland 2017-07-05 13:05:51 +02:00
Carsten "Tomcat" Book b72c4833d5 merge mozilla-inbound to mozilla-central a=merge 2017-07-05 13:01:22 +02:00
Morris Tseng b01c8dcc1a Bug 1376855 - Support nsDisplayBullet in layers free mode. r=kats
MozReview-Commit-ID: 8fCufpOLejH

--HG--
extra : rebase_source : a2a4024b8282336d60f7e9c416e93513860866d7
2017-06-28 13:39:34 -07:00
Morris Tseng eb94eb3e03 Bug 1376855 - Support nsDisplayImage in layers free mode. r=kats
MozReview-Commit-ID: 5oCmmBXwfv2

--HG--
extra : rebase_source : a51aca897df386a5d3c1e5c9426609913162a99f
2017-06-28 15:12:36 -07:00
Morris Tseng 3ebdf834e1 Bug 1376855 - Support nsDisplayVideo in layers free mode. r=kats,sotaro
MozReview-Commit-ID: HyelfkHokrw

--HG--
extra : rebase_source : 02cccf4b0029d98c453a4a59a2d1416548976af7
2017-06-28 15:12:25 -07:00
Morris Tseng 77424afaa9 Bug 1376855 - Introduce WebRenderUserData and WebRenderImageData. r=kats
Layers are retained between transaction and we store some data in the layers.
Thus, if we no longer use layers, we need find another storage to place
those data. I use frame's property to retain WebRenderUserData between
transaction.

MozReview-Commit-ID: Ku5VGBXa3w6

--HG--
extra : rebase_source : 636653f78d1d6c310726a1a2c944141dc691decc
2017-06-28 15:03:27 -07:00
Mats Palmgren 7271bffe14 Bug 1377713 - Use an AutoTArray in GetScrollPortSizeExcludingHeadersAndFooters to avoid malloc/free in most cases. r=tn
MozReview-Commit-ID: 61rJb3cFNio
2017-07-05 02:04:15 +02:00
Hiroyuki Ikezoe 1da5513453 Bug 1377648 - Check summary frame instead of summary element on removing the summary. r=heycam
In case of removing summary element, we need to check details *frame* children
instead of details *element* children since the summary element has been
already removed from details element children list.

MozReview-Commit-ID: GEzDId9CYf9

--HG--
extra : rebase_source : 50834606413b916a3c0d6074a7a52e8bdbe845a0
2017-07-05 15:52:37 +09:00
Ethan Lin 82a7c2b5e4 Bug 1372118 - Part3. Implement CreateWebRenderCommands for text, transform and background color. r=jrmuizel, r=kats
MozReview-Commit-ID: JRoSjygSFHc
2017-06-30 17:23:20 -07:00
Ethan Lin 17960f3f3e Bug 1372118 - Part2. Use new interface of CreateWebRenderCommands for non-image display items. r=jrmuizel, r=kats
MozReview-Commit-ID: BcmRjQhDEyf
2017-06-30 17:23:20 -07:00
Boris Zbarsky 5bd9b06ca0 Bug 1376640. Fix dynamic updates when an inline that sits between a first-letter and its block changes style. r=heycam
MozReview-Commit-ID: 8osMUpYVRvR
2017-06-28 22:19:35 -07:00
Carsten "Tomcat" Book f32372e861 Backed out changeset 2992d5af6251 (bug 1376640) for assertion failures like Assertion failure: mOwner == ExpectedOwnerForChild(aFrame) (Missed some frame in the hierarchy?) 2017-06-29 08:22:08 +02:00
Boris Zbarsky 991d1134d8 Bug 1376640. Fix dynamic updates when an inline that sits between a first-letter and its block changes style. r=heycam
MozReview-Commit-ID: 8osMUpYVRvR
2017-06-28 22:19:35 -07:00
Masayuki Nakano 5a78a77b68 Bug 1375825 - part2: ContentEventHandler::ExpandToClusterBoundary() should check the return value of nsTextFrame::PeekOffsetCharacter() r=jfkthame
ContentEventHandler::ExpandToClusterBoundary() doesn't check the return value of nsTextFrame::PeekOffsetCharacter().  Therefore, it may set its result to reversed offset. (e.g., when aForward is true and offset is 6, the result may be 5.  When aForward is false and offset is 5, the result may be 6.)

For avoiding that, ContentEventHandler::ExpandToClusterBoundary() should check the result and only when it returns nsIFrame::FOUND, it should compute the proper offset.

On the other hand, it's too bad for ContentEventHandler that nsTextFrame::PeekOffsetCharacter() to return nsIFrame::CONTINUE_UNSELECTABLE when the user-select style is "all" because IME doesn't expect such cases.

Therefore, this patch adds additional argument to nsIFrame::PeekOffsetCharacter(), aOptions which is a struct containing bool members.  The reason why it's not a bit mask enum is, such struct doesn't cause simple mistake at checking the value and the code is shorter.  When mIgnoreUserStyleAll of it is true, this patch makes nsTextFrame not return nsIFrame::CONTINUE_UNSELECTABLE.

MozReview-Commit-ID: ACNNBTP92YZ

--HG--
extra : rebase_source : bd85da902e7fb59135d15514cb20a5599a4a640b
2017-06-29 10:58:16 +09:00
Bobby Holley e61dcedcb3 Bug 1376655 - Stop using EnsureSameStructsCached in ViewportFrame::UpdateStyle. r=emilio 2017-06-28 10:08:37 -07:00
Bobby Holley 5681b4713c Bug 1376655 - Use ServoStyleContext in more places. r=emilio 2017-06-28 10:08:36 -07:00
Emilio Cobos Álvarez 10227381d3 Bug 1375674: Track the owner that represents the changes handled, and fix a bunch of issues while at it. r=heycam
In particular, this fixes:

 * Restyling of <area> elements that reuse the primary frame mapping for the
   image map.

 * Restyling of children of display: contents elements when the display:
   contents element generates a hint.

 * Restyling of out-of-flows (if my analysis in the bug is right).

 * Restyling of the ::backdrop pseudo-element.

 * Restyling of the Viewport frame.

I only managed to do a reftest for the second one, but the rest of them are
covered by the assertions added.

MozReview-Commit-ID: E7QtiQ1vPqu

--HG--
extra : rebase_source : 89085d96103ca743ba95ba61feeac68d24e8d307
2017-06-23 19:31:35 +02:00
Emilio Cobos Álvarez 97d4bc23fb Bug 1375674: Don't use the table change hints for the table wrapper frame. r=heycam
MozReview-Commit-ID: 7Qe07N6zvIt

--HG--
extra : rebase_source : be0658c4af20c2eaaa93b5ec18694ef4fa0febcd
2017-06-23 19:30:16 +02:00
Carsten "Tomcat" Book 9c5ccdbab2 Merge mozilla-central to autoland 2017-06-27 15:15:58 +02:00