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

16134 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 6159d9a874 Bug 1546697 - Make BaselineSharingGroup an enum class. r=dholbert
It looked a bit weird when mixed up with the other enum classes I'm about to
rename.

Depends on D28679

Differential Revision: https://phabricator.services.mozilla.com/D28680

--HG--
extra : moz-landing-system : lando
2019-04-25 22:42:13 +00:00
Emilio Cobos Álvarez 3e1e7ce302 Bug 1547138 - IntrinsicSize shouldn't use nsStyleCoord. r=dholbert
We have a better type to represent "a coord or nothing", and that's Maybe.

This code is shorter, and I think reads generally better / is less easy to
misuse.

I wrote this on top of bug 1547126 so there shouldn't be conflicts.

Differential Revision: https://phabricator.services.mozilla.com/D28921

--HG--
extra : moz-landing-system : lando
2019-04-25 23:48:14 +00:00
Daniel Holbert 26a606eda1 Bug 1547126: Give nsIFrame::IntrinsicSize a convenience constructor that takes nscoord-valued width and height. r=TYLin
This patch shouldn't affect behavior; it's just simplifying existing code with
a new convenience constructor.

Differential Revision: https://phabricator.services.mozilla.com/D28918

--HG--
extra : moz-landing-system : lando
2019-04-25 23:44:53 +00:00
Hiroyuki Ikezoe db7bfb0117 Bug 1546835 - Adjust start position of the target element as scroll offset in the scroll element. r=jfkthame
Depends on D28755

Differential Revision: https://phabricator.services.mozilla.com/D28756

--HG--
extra : moz-landing-system : lando
2019-04-25 12:54:11 +00:00
Dorel Luca 00afc0acfa Backed out changeset bd68b6dfd83e (bug 1546985) for Reftest failures. CLOSED TREE 2019-04-26 01:13:56 +03:00
Jonathan Kew d877c4bb12 Bug 1546985 - Use JoinStyle::ROUND when stroking glyph outlines, to avoid artifacts at sharp corners. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D28855

--HG--
extra : moz-landing-system : lando
2019-04-25 17:34:52 +00:00
Masayuki Nakano 2933c032e7 Bug 1545342 - part 3: Move remaining public enum of nsIPresShell to mozilla namespace in mozilla/PresShellForwards.h and make them enum class r=smaug
This patch moves remaining public `enum` of `nsIPresShell` to `mozilla`
namespace in `mozilla/PresShellForwards.h` and make them `enum class`es.

Additionally, some methods which use the moving `enum`s from `nsIPresShell`
to `PresShell`.

Differential Revision: https://phabricator.services.mozilla.com/D28607

--HG--
extra : moz-landing-system : lando
2019-04-25 05:04:23 +00:00
Masayuki Nakano 3622509485 Bug 1545342 - part 2: Make some public enum of nsIPresShell move to mozilla namespace and defined as enum class in PresShellForwards.h r=smaug
This patch moves some `enum` in `nsIPresShell` which are in public scope into
`mozilla` namespace and change them as `enum class`es.

Unfortunately, only "where to scroll" enum is just defines constants of
percentages of scroll destination.  Therefore, this patch makes only them
as `static const`.

Differential Revision: https://phabricator.services.mozilla.com/D28606

--HG--
extra : moz-landing-system : lando
2019-04-25 05:04:15 +00:00
Masayuki Nakano 5932f01d53 Bug 1545342 - part 1: Create mozilla/PresShellForwards.h and move global enums/constants in nsIPresShell.h and mozilla/PresShell.h into the new one r=smaug
This patch creates new header, `mozilla/PresShellForwards.h`.  It should have
all forward declarations of global class/struct in `nsIPresShell.h` and
`mozilla/PresShell.h`.

Additionally, this moves all `enum`s and `constant`s in them into the new file
with changing them to `enum class`es.

This will make other headers which require only specific types in the header
files not include them.

Differential Revision: https://phabricator.services.mozilla.com/D28605

--HG--
extra : moz-landing-system : lando
2019-04-25 05:02:20 +00:00
Ting-Yu Lin ee1f1f5d22 Bug 1546223 Part 5 - Change ReflowInput::InitConstraints() to use Maybe for containing block size. r=dholbert
There are some minor behavior changes come with this.

1) Change the default containing block size to (NS_UNCONSTRAINEDSIZE,
   NS_UNCONSTRAINEDSIZE). I think this is more reasonable than (-1, -1).

2) mContainingBlockSize is used to cache only the block size passing
   though constructor, Init(), or the invalid (-1, -1). This patch makes
   it cache the value computed by ComputeContainingBlockRectangle().

   Note that mContainingBlockSize is used only in
   nsTableWrapperFrame::InitChildReflowInput() to set the inner table
   frame's containing block to be the same as the outer table frame's.
   We don't change this behavior by caching more. Because even if the
   inner frame use the invalid cached (-1, -1) containing block size
   from the outer reflow input, it still computes the block size again
   in InitConstraints(). (Inner table's cb is the same as the outer
   table's per InitCBReflowInput().)

Differential Revision: https://phabricator.services.mozilla.com/D28586

--HG--
extra : moz-landing-system : lando
2019-04-24 22:23:59 +00:00
Ting-Yu Lin 49cfcc232c Bug 1546223 Part 4 - Mechanically replace pointer with Maybe for ReflowInput's optional containing block size. r=dholbert
There's no behavior change in this patch.

Differential Revision: https://phabricator.services.mozilla.com/D28426

--HG--
extra : moz-landing-system : lando
2019-04-24 17:35:31 +00:00
Ting-Yu Lin ee7ae91e94 Bug 1546223 Part 3 - Use in-class member initializer for some of the member variables. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D28438

--HG--
extra : moz-landing-system : lando
2019-04-24 17:35:31 +00:00
Ting-Yu Lin 77038b9a3a Bug 1546223 Part 2 - Use in-class member initializer for those which were in constructor body. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D28428

--HG--
extra : moz-landing-system : lando
2019-04-24 00:20:05 +00:00
Ting-Yu Lin 328026b148 Bug 1546223 Part 1 - Use in-class member initializer for those which were in initializer list. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D28427

--HG--
extra : moz-landing-system : lando
2019-04-24 17:35:05 +00:00
Ting-Yu Lin a3bbe609b6 Bug 1546223 Part 0 - Remove unused NOISY_VERTICAL_ALIGN. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D28429

--HG--
extra : moz-landing-system : lando
2019-04-24 17:35:05 +00:00
Hiroyuki Ikezoe 47d31247b1 Bug 1546057 - Use the clamped destination position for overflow checks. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D28578

--HG--
extra : moz-landing-system : lando
2019-04-24 21:56:26 +00:00
Brindusan Cristian b3b1ca15aa Merge mozilla-central to autoland. a=merge CLOSED TREE
--HG--
rename : dom/ipc/TabChild.cpp => dom/ipc/BrowserChild.cpp
rename : dom/ipc/TabParent.cpp => dom/ipc/BrowserParent.cpp
rename : dom/ipc/TabParent.h => dom/ipc/BrowserParent.h
2019-04-25 01:43:17 +03:00
Brindusan Cristian f92b05e5f0 Merge inbound to mozilla-central. a=merge
--HG--
rename : dom/ipc/TabParent.cpp => dom/ipc/BrowserParent.cpp
2019-04-25 00:54:01 +03:00
Emilio Cobos Álvarez 761f6c8751 Bug 1546739 - Fix detection of intrinsic size dependence of images. r=dholbert
Fixed width and height is not a strong enough condition.

min/max-width with intrinsic size keywords makes the final size of the image
also depend on the intrinsic size. Don't optimize away reflows when the
intrinsic size changes if they're used.

Differential Revision: https://phabricator.services.mozilla.com/D28720

--HG--
extra : moz-landing-system : lando
2019-04-24 20:05:34 +00:00
Jeremy Chen e67424a97d Bug 1283222 - Do not record soft break opportunities for out-of-flow frames. r=emilio
We do want to record soft break opportunity after a frame whose content can't
be part of the existing in-flow text run, since this normally should be a text run
boundary. However, though an out-of-flow frame can't be part of the existing
in-flow text run, it also doesn't break it either. In fact, the texts after the
out-of-flow frames are able to continue the existing in-flow text run. So,
introducing a line-break-after opportunity in this case may cause an unexpected
line break for every out-of-flow frame.

In this patch, we add a condition to prevent us from recording soft break
opportunities for out-of-flow frames.

Differential Revision: https://phabricator.services.mozilla.com/D28625

--HG--
extra : moz-landing-system : lando
2019-04-24 14:04:23 +00:00
Cosmin Sabou 5d756e5a09 Backed out 2 changesets (bug 1283222) for build bustages on nsLineLayout. CLOSED TREE
Backed out changeset fb82d1aa97d0 (bug 1283222)
Backed out changeset 093bf5cadbcc (bug 1283222)
2019-04-24 15:50:59 +03:00
Jeremy Chen a547906720 Bug 1283222 - Do not record soft break opportunities for out-of-flow frames. r=emilio
We do want to record soft break opportunity after a frame whose content can't
be part of the existing in-flow text run, since this normally should be a text run
boundary. However, though an out-of-flow frame can't be part of the existing
in-flow text run, it also doesn't break it either. In fact, the texts after the
out-of-flow frames are able to continue the existing in-flow text run. So,
introducing a line-break-after opportunity in this case may cause an unexpected
line break for every out-of-flow frame.

In this patch, we add a condition to prevent us from recording soft break
opportunities for out-of-flow frames.

Differential Revision: https://phabricator.services.mozilla.com/D28625

--HG--
extra : moz-landing-system : lando
2019-04-24 12:25:25 +00:00
Daniel Holbert e6f89af496 Bug 1546210: Refactor nsHTMLCanvasFrame::ComputeSize to use existing helper functions and avoid redundant GetCanvasSize() call. r=TYLin
This patch should not affect behavior; the new implementation is
identical to the old one, but with better sharing of code.

Also: I'm removing the code-comment saying that the intrinsic ratio
is unused, because it's not really useful and it's unclear to me that
it's strictly true. There are several cases in the function we pass it
to, nsFrame::ComputeSizeWithIntrinsicDimensions, that use the ratio
and that look reachable as long as we have 'width:auto' in CSS.

Differential Revision: https://phabricator.services.mozilla.com/D28416

--HG--
extra : moz-landing-system : lando
2019-04-23 04:20:20 +00:00
sotaro 601b513435 Bug 1543621 - Move Y flip handling to AsyncImagePipelineManager::ApplyAsyncImageForPipeline() r=nical
With webrender, current gecko does not handle SurfaceTexture.getTransformMatrix() yet. SurfaceTexture is used for video decoding and WebGL. On both usages, when getTransformMatrix() is not handled, it actually worked as bottom left origin. Then gecko need to ignore y flip. AsyncImagePipelineManager::ApplyAsyncImageForPipeline() is a good place to handle the situations, since it handles canvas and video frame rendering. Long term solution is going to be handled by Bug 1507076.

Differential Revision: https://phabricator.services.mozilla.com/D28315

--HG--
extra : moz-landing-system : lando
2019-04-23 12:29:24 +00:00
Hiroyuki Ikezoe c29cf5f2aa Bug 1546038 - Include scroll-margin areas into snap area. r=botond
This patch also renames `targetRect` to `snapArea` to represent it more
accurately.

Differential Revision: https://phabricator.services.mozilla.com/D28307

--HG--
extra : moz-landing-system : lando
2019-04-23 03:58:57 +00:00
Hiroyuki Ikezoe 7356d7a696 Bug 1544198 - Use the proper frame to get scroll-snap-type value on the root element. r=botond
Now scroll-snap-type property on body element doesn't affect scroll position
so that scrollTo-scrollBy-snaps.html is needed to be modified to specify
scroll-snap-type on html.

Differential Revision: https://phabricator.services.mozilla.com/D27987

--HG--
extra : moz-landing-system : lando
2019-04-23 01:16:02 +00:00
Hiroyuki Ikezoe eb6519bbae Bug 1544198 - Split ScrolLFrameHelper::ComputeScrollSnapInto into two functions. r=botond
The one is for the scroll snap module v1 implementation, the other is for the
old scroll snap implementation.  Now both functions have the same pieces of
code to get scroll-snap-type values, but for v1 implemention in the next commit
we will use GetFrameForScrollSnap() to get the value instead.

Differential Revision: https://phabricator.services.mozilla.com/D27986

--HG--
extra : moz-landing-system : lando
2019-04-23 01:12:38 +00:00
Hiroyuki Ikezoe 7b325b6485 Bug 1544198 - Factor out the function to get the frame for scroll-snap-type and scroll-padding. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D27985

--HG--
extra : moz-landing-system : lando
2019-04-23 01:12:24 +00:00
Hiroyuki Ikezoe dd202d6998 Bug 1544198 - Use the proper writing-mode for scroll-snap for viewport. r=jfkthame
In the CSS writing mode spec [1], the writing mode for the document should be
taken from body, GetFrameForDir() is the function to get the corresponding frame
for writing-mode.

A web platform test for this case will be added at the last of this commit
series.  Unfortunately as of this commit, we can't introduce proper test cases
since there is another issue on scroll-snap-type which will be fixed in
subsequent commits.

[1] https://drafts.csswg.org/css-writing-modes-4/#principal-flow

Differential Revision: https://phabricator.services.mozilla.com/D27984

--HG--
extra : moz-landing-system : lando
2019-04-23 01:12:09 +00:00
Miko Mynttinen 84624b4a42 Bug 1540785 - Part 2: Devirtualize nsDisplayItemBase::GetPerFrameKey() r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D27580

--HG--
extra : moz-landing-system : lando
2019-04-22 19:58:01 +00:00
Miko Mynttinen f579c8f5c5 Bug 1540785 - Part 1: Introduce nsDisplayItemBase r=mattwoodrow
***

Differential Revision: https://phabricator.services.mozilla.com/D27579

--HG--
extra : moz-landing-system : lando
2019-04-22 19:57:59 +00:00
Sylvestre Ledru a1dce6440a Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D28329

--HG--
extra : moz-landing-system : lando
2019-04-22 16:35:03 +00:00
Ryan Hunt d6509bb237 Bug 1534395 - Rename TabChild to BrowserChild. r=nika
This commit renames TabChild to BrowserChild.

Differential Revision: https://phabricator.services.mozilla.com/D28135

--HG--
rename : dom/base/InProcessTabChildMessageManager.cpp => dom/base/InProcessBrowserChildMessageManager.cpp
rename : dom/base/InProcessTabChildMessageManager.h => dom/base/InProcessBrowserChildMessageManager.h
rename : dom/ipc/TabChild.cpp => dom/ipc/BrowserChild.cpp
rename : dom/ipc/TabChild.h => dom/ipc/BrowserChild.h
extra : rebase_source : e7fcfb845a971a2760e73d517e24da18ce2551b5
extra : histedit_source : d1991334ccb107fe56e478865f22fd97b041a317
2019-04-09 17:39:01 -05:00
Srujana Peddinti b44e48bff4 Bug 1259660 - Moved mozilla::WidgetMosueEventBase::buttonType in MouseEvents.h to mozilla::MouseButton in EventForwards.h, and mozilla::WidgetMouseEventBase::buttonsFlag to mozilla::MouseButtonsFlag r=masayuki
Moved mozilla::WidgetMosueEventBase::buttonType in MouseEvents.h to mozilla::MouseButton in EventForwards.h, and mozilla::WidgetMouseEventBase::buttonsFlag to mozilla::MouseButtonsFlag so that any referer in header files do not need to include MouseEvents.h only for referring them. Instead, they just need to include EventForwards.h. Now when MouseEvents.h is changed, the rebuild speed becomes faster.

Differential Revision: https://phabricator.services.mozilla.com/D25325

--HG--
extra : moz-landing-system : lando
2019-04-21 20:13:34 +00:00
Srujana Peddinti 5f185eb5aa Bug 1259660 - Cleaned up WidgetMouseEventBase by renaming WidgetMouseEventBase::button to WidgetMouseEventBase::mButton. r=masayuki
Renamed all class member instances from WidgetMouseEventBase::button to WidgetMouseEventBase::mButton.

Differential Revision: https://phabricator.services.mozilla.com/D25309

--HG--
extra : moz-landing-system : lando
2019-04-21 18:17:10 +00:00
Ting-Yu Lin b18f4b64c3 Bug 1411422 - Make percentage block size children work without "height:100%" in ::-moz-column-set and ::-moz-column-content. r=dbaron
After introducing column-span, the ColumnSetWrapperFrame can have more
than one ColumnSetFrame children if there's any column-span:all child.
Thus we cannot use "height:100%" to pass block size information down to
the -moz-column-content's children.

Skip column span wrapper in nsIFrame::IsBlockWrapper() so that the
percentage column-span:all works.

Before this patch, the height of column contents are set to 100% of the
multicol container, so if the previous in-flows of column content
anonymous boxes consume all the height, later in-flows's height are all
0. In this patch, we don't restrict column-content's height, so their
height are calculated based on their children's height.
column-contain-1a.html passes because it can now correctly calculate the
union of all the column content's rect to find the correct sticky
positioning.

Differential Revision: https://phabricator.services.mozilla.com/D27627

--HG--
extra : moz-landing-system : lando
2019-04-19 22:02:45 +00:00
Ting-Yu Lin 74149656b7 Bug 1545328 Part 7 - Fix a typo in FindBestBalanceBSize(). r=mats
Differential Revision: https://phabricator.services.mozilla.com/D28157

--HG--
extra : moz-landing-system : lando
2019-04-19 05:43:16 +00:00
Ting-Yu Lin 4319b2077b Bug 1545328 Part 6 - Mark some nsColumnSetFrame methods "const". r=mats
Also, move GetAvailableContentBSize() to non-public section because it's
only used by nsColumnSetFrame.

Differential Revision: https://phabricator.services.mozilla.com/D28014

--HG--
extra : moz-landing-system : lando
2019-04-19 05:43:14 +00:00
Ting-Yu Lin de008d4346 Bug 1545328 Part 5 - Move "feasible" result into ColumnBalanceData, and make reflow methods return ColumnBalanceData. r=mats
ColumnBalanceData is reset in the beginning of ReflowChildren(), so I
make ReflowChildren() return a fresh ColumnBalanceData so that it's
easier (at least for me) to understand the data is recomputed in
every reflow iteration.

Also, FindBestBalanceBSize() uses ColumnBalanceData as an input to begin
its column balancing iteration. Make the argument pass by value so that
the caller's copy won't be modified.

Differential Revision: https://phabricator.services.mozilla.com/D28013

--HG--
extra : moz-landing-system : lando
2019-04-19 05:43:04 +00:00
Ting-Yu Lin 8f603f3d9c Bug 1545328 Part 4 - Replace "height" with "block-size" in comments. r=mats
I manually search "height" and replace it with "block-size" if the code
around it uses logical coordinates.

Differential Revision: https://phabricator.services.mozilla.com/D28012

--HG--
extra : moz-landing-system : lando
2019-04-19 05:43:00 +00:00
Ting-Yu Lin f8ad4e052f Bug 1545328 Part 3 - Stop exposing ClampUsedColumnWidth() in the header. r=mats
The static function is used only in nsColumnSetFrame's implementation.

Differential Revision: https://phabricator.services.mozilla.com/D28011

--HG--
extra : moz-landing-system : lando
2019-04-19 05:42:56 +00:00
Ting-Yu Lin d66a448af7 Bug 1545328 Part 2 - Remove "virtual" keywords for methods that already have "override". r=mats
Differential Revision: https://phabricator.services.mozilla.com/D28010

--HG--
extra : moz-landing-system : lando
2019-04-19 05:42:46 +00:00
Ting-Yu Lin b37f9457e7 Bug 1545328 Part 1 - Change two FindBestBalanceBSize()'s arguments to be passed by value. r=mats
No code after FindBestBalanceBSize() is interested in
aUnboundedLastColumn and aRunWasFeasible, so they don't need to be
input/output arguments.

Differential Revision: https://phabricator.services.mozilla.com/D28009

--HG--
extra : moz-landing-system : lando
2019-04-19 06:43:56 +00:00
Alexis Beingessner 72aa57aea1 Bug 1544895 - revert back to old bad bounds to pick lesser evil for now. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D27965

--HG--
extra : moz-landing-system : lando
2019-04-18 13:03:28 +00:00
Markus Stange 1278948ebb Bug 1543944 - Don't mark nsDisplayVideo as opaque for now because we were using a rectangle that's too big. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D27979

--HG--
extra : moz-landing-system : lando
2019-04-18 17:22:29 +00:00
Andreea Pavel e5b695eefd Merge mozilla-inbound to mozilla-central. a=merge 2019-04-19 00:36:23 +03:00
Dan Glastonbury ea351adb8a Bug 1526972 - P8: Reset InInvalidSubtree when processing unrelated frames. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D26141

--HG--
extra : moz-landing-system : lando
2019-04-18 02:41:33 +00:00
Dan Glastonbury def88697c2 Bug 1526972 - P6: Mark invalidated SubDocument frame as modified. r=miko,mattwoodrow
Depends on D24463

Differential Revision: https://phabricator.services.mozilla.com/D26139

--HG--
extra : moz-landing-system : lando
2019-04-18 02:38:24 +00:00
Dan Glastonbury d361d6bc8e Bug 1526972 - P1: Compress bool state into bit flags. r=miko
Also move to first cache-line (64-bytes) of nsDisplayItem to improve D-cache hit
when accessing mFrame, mItemFlags, etc.

Differential Revision: https://phabricator.services.mozilla.com/D26134

--HG--
extra : moz-landing-system : lando
2019-04-18 02:38:13 +00:00
Mats Palmgren 1bbce77110 Bug 1544874 - Add missing baseline alignment for non-legacy ::marker boxes when aligning to a "block line". r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D27960

--HG--
extra : rebase_source : b92f1273fd048bbeaf9c19ce4688125853d7a974
2019-04-17 18:21:21 +02:00