Commit Graph

20129 Commits

Author SHA1 Message Date
Ting-Yu Lin
73b1eb5bc6 Bug 1550869 - Stop undraggable images from being selected by a single-clicking. r=emilio
This is a rework for the issue in bug 1516963.

The condition `aFrame->IsFrameOfType(nsIFrame::eReplaced)` was added to
avoid breaking
editor/libeditor/tests/test_abs_positioner_positioning_elements.html
because it contains blockified (position:absolute) images in
contenteditable, and we don't want these images to use frame edge. But
for non-editable undraggable images, which have display:inline, we want
them to use frame edge to avoid being selected by a single-clicking.
Note that non-editable draggable images use a different code patch to
handle their operations.

I think it easier to understand by checking the frame types directly. As
for images, we want non-editable images to use frame edge, but not those
editable ones because editor has its own logic to handle all the
dragging operations, etc. Using frame edge for editable images makes
them undraggable, and fails
test_abs_positioner_positioning_elements.html.

Add more tests for empty inline-grid, inline-flex, inline-table, video,
to ensure the behavior is not changed. We don't want them to be selected
by a single-clicking, either.

Note I only test video's selection is collapsed when single-clicking
because I failed to turn off picture-in-picture on <video> in
test_reftests_with_caret.html.

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

--HG--
extra : moz-landing-system : lando
2019-06-18 05:30:35 +00:00
Logan Smyth
a1de03c27b Bug 1529345 - Part 2: Add Gecko infrastructure for receiving notifications about debugger-related events. r=jimb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D30565

--HG--
extra : moz-landing-system : lando
2019-06-17 04:36:29 +00:00
Bas Schouten
88c1c3d944 Bug 1553254 - Part 2: Add some first performance probes to our codebase for some basic, easy to measure things. r=brennie
Differential Revision: https://phabricator.services.mozilla.com/D32877

--HG--
extra : rebase_source : b2d474400a2b09eeb5194845c1c4cd717de00513
2019-05-28 20:58:06 +02:00
Oana Pop Rus
b93335c27f Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-06-13 13:04:19 +03:00
Oana Pop Rus
1133b6716d Merge inbound to mozilla-central. a=merge 2019-06-13 12:55:51 +03:00
Ting-Yu Lin
dbbf8bb804 Bug 1524411 - Null-check kid in nsLayoutUtils::GetFirstLinePosition(). r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D34247

--HG--
extra : moz-landing-system : lando
2019-06-13 04:20:55 +00:00
Emilio Cobos Álvarez
4e5f983137 Bug 1488953 - Use a script runner for scrollport events. r=mats
This is consistent with the scroll area events too, and allows us to
remove the WillPaintObserver stuff.

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

--HG--
extra : moz-landing-system : lando
2019-06-13 02:30:25 +00:00
Peter Van der Beken
8b00dd9ff2 Bug 1490044 - Move all prefs used in WebIDL to StaticPrefs. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D33507

--HG--
extra : moz-landing-system : lando
2019-06-13 09:00:59 +00:00
Jean-Yves Avenard
b0082c7c5b Bug 1558770 - Remove non-functional test. r=kats
The test is supposed to test that changing the preference layers.acceleration.disabled doesn't cause a crash, but this pref is only read on startup well before the test has a chance to run and switch the pref.

It's not doing anything.

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

--HG--
extra : moz-landing-system : lando
2019-06-13 00:35:30 +00:00
Ryan Hunt
d7b4b6a1a4 Bug 1558482 - Restrict the composition size to the visibleRect for OOP-iframes. r=kats
Even if we don't have a root displayport, the composition size is still used for
displayport margins calculations. For extremely tall iframes, this will create
a displayport that is way to big. We should instead report a composition size that
is equivalent to the visible rect for OOP-iframes.

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

--HG--
extra : rebase_source : 1f43cb16a0841eb3cd892401c83a46d56276cf2e
2019-06-11 07:57:52 -05:00
Ryan Hunt
d4e1195aed Bug 1558482 - Apply visibleRect and scaling when painting. r=mattwoodrow
visibleRect should affect both WR/layers, and scaling will only affect
layers.

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

--HG--
extra : rebase_source : 49273db3e10088c9493f693d5f8b58864dcb01aa
2019-06-11 07:52:12 -05:00
Ting-Yu Lin
0702152462 Bug 1549867 - Add a crashtest. r=jfkthame
This test no longer crashes after fixing bug 1524431.

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

--HG--
extra : moz-landing-system : lando
2019-06-11 16:23:29 +00:00
Dorel Luca
fe1531cfc1 Merge mozilla-inbound to mozilla-central. a=merge 2019-06-12 15:05:58 +03:00
Emilio Cobos Álvarez
a45852130e Bug 1558352 - Ensure canvas anonymous content is always created before constructing the document element frame's children. r=TYLin
Right now that doesn't happen, so you can run into problems like the one
described in bug 1492582 comment 30 for popups.

This is a bit annoying, but it's more consistent with how regular anonymous
content works already:

  https://searchfox.org/mozilla-central/rev/0da35261b6789eec65476dbdd4913df6e235af6d/layout/base/nsCSSFrameConstructor.cpp#9644

It's still not 100% consistent, since the root element's frame would still end
up first in the frame tree, but I think that's both less important and harder to
change. I've left a comment to that effect in the code.

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

--HG--
extra : moz-landing-system : lando
2019-06-12 10:09:28 +00:00
Sean Feng
36865676e1 Bug 1512388 - Add loading cross domain iframes in background r=smaug
This patch adds the ability to load cross domain iframes in the
background to make the top level documents finish earlier.

This is an experiment feature that we'll keep it disabled by default.

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

--HG--
extra : moz-landing-system : lando
2019-06-11 20:43:40 +00:00
Emilio Cobos Álvarez
a0516ce321 Bug 1505489 - Invalidate the style of the element when the part attribute changes. r=heycam
I think that, given ::part() right now (without forwarding) cannot affect
descendants (and eager pseudo-elements are handled as part of the normal element
restyling process), it is not worth the effort to add more complex invalidation.

But we can always re-evaluate.

Depends on D32642

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

--HG--
extra : moz-landing-system : lando
2019-06-11 17:42:00 +00:00
Ting-Yu Lin
307ef73912 Bug 1524431 Part 2 - Check IsBidiSplittable() before processing the ancestor frames. r=jfkthame
The idea is to check IsBidiSplittable() in more places to prevent fixed
continuations created by column-span from becoming fluid ones.

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

--HG--
extra : moz-landing-system : lando
2019-06-11 19:27:57 +00:00
Ting-Yu Lin
6904399bd9 Bug 1524431 Part 1 - Revert Bug 1520722 Part 2. r=jfkthame
This reverts the modification to nsBidiPresUtils.cpp in Bug 1520722 Part
2, but keeps the test added. Next part will fix the problem in a proper
way.

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

--HG--
extra : moz-landing-system : lando
2019-06-11 16:21:57 +00:00
Boris Zbarsky
d5a8a4a595 Bug 1557793 part 3. Change the signatures of various nsContentUtils localization methods to play nicer with the new stringbundle API. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D34201

--HG--
extra : moz-landing-system : lando
2019-06-08 21:26:12 +00:00
Olli Pettay
963b9d833d Bug 1556769, ensure UnsuppressAndInvalidate is called even if paint suppression isn't used, r=emilio
UnsuppressAndInvalidate updates focus state among others, so it needs to be called even if paint suppression itself
isn't used. An example of a such case is when PresShell is created after Document's readyState is already Document::READYSTATE_COMPLETE.

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

--HG--
extra : moz-landing-system : lando
2019-06-11 11:03:38 +00:00
Jonathan Watt
d46e1691fe Bug 1558349. Stop calling SetIsPrintPreview in nsDocumentViewer::PrepareToStartLoad. r=bobowen
This code predates our use of a static clone to print.  Nowadays we never
navigate in the (dedicated) print preview tab.

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

--HG--
extra : rebase_source : f4b8c03e0dde5b96e2e848892623e6f88a365095
2019-06-04 22:53:09 +01:00
Botond Ballo
c210aca308 Bug 1558276 - Make layers.dump and layers.dump-host-layers synonyms. r=kats
Now they both work in opt builds, and they both work with advanced layers.

For consistency, layers.dump-client-layers is also modified to work in
opt builds.

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

--HG--
extra : moz-landing-system : lando
2019-06-10 20:34:34 +00:00
Jonathan Watt
9ff8f044a3 Bug 1558071. Rename nsIWebBrowserPrint.printPreviewNavigate to printPreviewScrollToPage. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D34297

--HG--
extra : rebase_source : 58343bee2ce7e2761fcc93b8e842051a14cf3684
extra : amend_source : ff72ab52d1274f0bcfad59f30c43364af05a0310
2019-06-03 12:48:21 +01:00
Jonathan Watt
02015da744 Bug 1558072. Inline the nsDocumentViewer::ReturnToGalleyPresentation code to its single caller. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D34296

--HG--
extra : rebase_source : 51d3d47d6c2e24ae49247cc8496afa5924ab9eda
extra : amend_source : 6cdc328683a450001ca50f783c803d865483e219
2019-06-03 10:10:42 +01:00
Emilio Cobos Álvarez
95bca607dd Bug 1487216 - Measure memory usage of RDL. r=mattwoodrow,miko
For now I added everything to the same bucket, but I wrote this so it should be
easy to add more buckets as needed (either to mArenaSizes, or more specific ones
like the style system has). But this is probably enough for now.

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

--HG--
extra : moz-landing-system : lando
2019-06-09 22:58:24 +00:00
Brindusan Cristian
e97b017e63 Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-06-10 00:47:15 +03:00
Matt Woodrow
ff1b844924 Bug 1554832 - Only force a default background color for the cross-process root content document. r=rhunt
Depends on D34099

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

--HG--
extra : moz-landing-system : lando
2019-06-07 15:24:59 +00:00
Matt Woodrow
93d89e035e Bug 1554832 - Check only for in process content documents in AssumeAllFramesVisible. r=tnikkel
Depends on D34098

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

--HG--
extra : moz-landing-system : lando
2019-06-07 06:59:02 +00:00
Matt Woodrow
bf2de70741 Bug 1554832 - Add versions of nsPresContext::IsRootContentDocument to specify whether you want to consider OOP parent documents. r=rhunt
Differential Revision: https://phabricator.services.mozilla.com/D34098

--HG--
extra : moz-landing-system : lando
2019-06-07 15:24:47 +00:00
Jonathan Kew
a2f7229746 Bug 1553874 - Add crashtest. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D34246

--HG--
extra : moz-landing-system : lando
2019-06-08 18:42:30 +00:00
Boris Zbarsky
4fcc4016bd Bug 1557905. Stop using [array] in nsIFontEnumerator. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D34265

--HG--
extra : moz-landing-system : lando
2019-06-08 08:50:47 +00:00
Jonathan Watt
88526e9eac Bug 1557878. Replace nsIWebBrowserPrint::enumerateDocumentNames with a getter for the top document's name. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D34260

--HG--
extra : rebase_source : cbac94e78d57371ec1f4bdfcd1739367fb79f864
2019-05-30 11:43:16 +01:00
Jonathan Watt
09d6c311f9 Bug 1557681. Rename nsPrintJob::Cancelled() to Cancel(). r=bobowen
"Cancelled" sounds like it's a query and should return a bool.  In fact this
method sets state in response to a nsIWebBrowserPrint.cancel() being called.

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

--HG--
extra : rebase_source : 97797d906b84ed18a258881a31722179d50943f7
extra : amend_source : c0e1b61f13b2a8ccaec7cc995841948deabbe041
2019-05-29 07:14:46 +01:00
Bob Owen
049e2169cc Bug 1464032 Part 5: Make sure the DrawTarget can create a similar DrawTarget when falling back to empty surface. r=mstange
Otherwise, we crash in the content process when we try to record this.
2018-12-02 14:14:19 +00:00
Miko Mynttinen
9bf262cb7f Bug 1490404 - Part 3: Move debug logging out from nsLayoutUtils::PaintFrame() r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D33681

--HG--
extra : moz-landing-system : lando
2019-06-06 17:54:16 +00:00
Miko Mynttinen
6c57050ada Bug 1490404 - Part 2: Add retained display list statistics r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D33680

--HG--
extra : moz-landing-system : lando
2019-06-06 17:54:14 +00:00
Miko Mynttinen
fbfcf25cc9 Bug 1490404 - Part 1: Be more consistent with display list and display list builder pointers and references r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D33679

--HG--
extra : moz-landing-system : lando
2019-06-06 17:54:13 +00:00
shindli
3caa33a7ea Merge inbound to mozilla-central. a=merge 2019-06-06 12:57:52 +03:00
Masayuki Nakano
a8f6531a1b Bug 1555645 - Make PresShell::EventHandler::MaybeFlushThrottledStyles() stop handling it when the PresShell does not have root PreShell nor Document r=smaug
The crash reports just tell us that the crash occur due to referring around
address 0 in `PresShell::EventHandler::MaybeFlushThrottledStyles()`.
Therefore, I'm not sure which is the actual reason of the crashes though,
this patch makes it null-check root `PresShell` and its `Document` before
accessing the latter.

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

--HG--
extra : moz-landing-system : lando
2019-06-05 09:28:53 +00:00
Ting-Yu Lin
ed3d08542c Bug 1549267 Part 2 - Improve comments in LayoutConstants.h. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D31697

--HG--
extra : moz-landing-system : lando
2019-06-06 00:04:19 +00:00
Ting-Yu Lin
3a4933eb98 Bug 1549267 Part 1 - Remove NS_INTRINSICSIZE and NS_AUTOHEIGHT. r=mats
This patch is generated by the following steps.

1) Manually delete NS_INTRINSICSIZE and NS_AUTOHEIGHT in LayoutConstants.

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

  rename NS_INTRINSICSIZE NS_UNCONSTRAINEDSIZE
  rename NS_AUTOHEIGHT NS_UNCONSTRAINEDSIZE
```

3) ./mach clang-format

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

--HG--
extra : moz-landing-system : lando
2019-06-04 23:41:20 +00:00
Jonathan Watt
5cd2b5b11e Bug 1557104. Merge nsIPageSequenceFrame and nsSimplePageSequenceFrame. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D33817

--HG--
rename : layout/generic/nsSimplePageSequenceFrame.cpp => layout/generic/nsPageSequenceFrame.cpp
rename : layout/generic/nsSimplePageSequenceFrame.h => layout/generic/nsPageSequenceFrame.h
extra : rebase_source : e75b043af4dbfe4c108f2bfc0e234fd20c5af315
2019-05-22 13:01:33 +01:00
Mihai Alexandru Michis
c70fbfe90e Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2019-06-05 18:56:22 +03:00
Mihai Alexandru Michis
d07d090c31 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2019-06-05 12:59:10 +03:00
Mihai Alexandru Michis
153172de0c Merge inbound to mozilla-central. a=merge 2019-06-05 12:51:25 +03:00
sotaro
3d0c73c202 Bug 1537586 - Address build failure with --disable-printing r=bobowen,froydnj
Make nsIWebBrowserPrint included unconditionally for addressing nsIDocShell.rs build failure.

Remove direct_call of PPrinting and PRemotePrintJob. Their ipdl are built unconditionally, but their derived classes are not built with --disable-printing.

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

--HG--
extra : moz-landing-system : lando
2019-06-05 01:25:36 +00:00
Brian Grinstead
af79f6a5c1 Bug 1556857 - Return true in AttributeChangeRequiresSubtreeRestyle whenever lwtheme attrs change in any chrome doc, not just those with XUL document elements r=emilio
In preparation for an <html> root node in browser.xhtml, we need to react to lwtheme changes correctly.

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

--HG--
extra : source : afa5d3807c8b5810203718e158fa4b185e109f55
2019-06-04 20:43:51 +00:00
Daniel Varga
667d23bec1 Backed out changeset afa5d3807c8b (bug 1556857) for mochitest failure at builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/RefPtr.h:268. On a CLOSED TREE 2019-06-05 02:24:07 +03:00
Brian Grinstead
77639078e9 Bug 1556857 - Return true in AttributeChangeRequiresSubtreeRestyle whenever lwtheme attrs change in any chrome doc, not just those with XUL document elements r=emilio
In preparation for an <html> root node in browser.xhtml, we need to react to lwtheme changes correctly.

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

--HG--
extra : moz-landing-system : lando
2019-06-04 20:43:51 +00:00
Neil Deakin
302fa305ad Bug 1519948, remove XUL box objects, r=bzbarsky
--HG--
extra : rebase_source : 4af617fecf06512aed5882831e64e38d4e7e5e94
2019-06-04 12:45:55 -04:00