Commit Graph

13848 Commits

Author SHA1 Message Date
Ting-Yu Lin
2923be5074 Bug 1290276 Part 8 - Update test expectations after implementing XBL <stylesheet> for stylo. r=heycam
Disable 461917-1.xhtml under dom/xul/crashtests/ because I cannot reproduce
it locally.

Annotate assert-if on some crashtests (bug 1370830). Other modifications are
all removal of fails-if.

MozReview-Commit-ID: 6Q2A5M5rOry

--HG--
extra : rebase_source : b282a919fcda6287fe2eaa6b139a11f2663ad578
2017-05-31 16:44:38 -07:00
Ryan VanderMeulen
9b7a73b65a Merge m-c to autoland. a=merge
UPGRADE_NSPR_RELEASE UPGRADE_NSS_RELEASE

--HG--
extra : amend_source : a59e53ba2f8db608f613f21ad6da2b5be8814aa4
2017-06-07 22:55:56 -04:00
Mats Palmgren
a99de96d28 Bug 1367207 part 1 - Add a nsIFrame bool:1 member to track whether the frame has some image requests associated with it. Skip the call to DropRequestsForFrame() on frame destruction if the bit isn't set. r=dholbert
MozReview-Commit-ID: 5CLpsQgJkCv
2017-06-07 15:22:41 +02:00
Masatoshi Kimura
01c2dc7a45 Bug 1326738 - Check for user-disabled images as well as broken images to determine if the broken icon should be displayed. r=tnikkel
MozReview-Commit-ID: CseLBP8aI75

--HG--
extra : rebase_source : 0f34cc82b1089bf339417e0b7de77d2865c3cc8b
2017-06-02 23:19:48 +09:00
sotaro
e19a847326 Bug 1359993 - Reduce invalidation of video r=nical 2017-06-05 20:55:14 +09:00
Mats Palmgren
3717a95c70 Bug 1367209 part 3 - Add a generic frame state bit, NS_FRAME_HAS_CSS_COUNTERS, to indicate that a frame maybe has some counter styles and thus be known by nsCounterManager. r=jfkthame
If a frame doesn't have that bit then skip mCounterManager.DestroyNodesFor()
when the frame is destroyed because it's definitely not known by
the CounterManager.

MozReview-Commit-ID: Ky3575QvZME
2017-06-04 16:45:15 +02:00
Sebastian Hengst
92499bc6cf merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-06-03 20:18:26 +02:00
Mats Palmgren
d53b7949ed Bug 1367206 - Iterate the frame property list once to collect which child list properties we have. r=jfkthame
MozReview-Commit-ID: BHZTjYP4pJp
2017-06-03 19:25:56 +02:00
Carsten "Tomcat" Book
efccdfdb0a merge mozilla-inbound to mozilla-central a=merge 2017-06-02 14:22:17 +02:00
Ethan Lin
c0df57e679 Bug 1369264 - Part1. Enable column rule layer by default. r=pchang 2017-06-02 11:55:11 +08:00
Jeff Hajewski
12f7c1e837 Bug 1369448 - Change NS_STYLE_WHITESPACE macro definitions to enum class; r=manishearth
MozReview-Commit-ID: HUXYWXk8eiI
2017-06-01 15:37:22 -07:00
Cameron McCormack
d790c15258 Bug 1368617 - Ensure continuing text frames for floating ::first-letters will inherit from a ::first-line. r=dbaron
MozReview-Commit-ID: 4plrZYMZ8S4

--HG--
extra : rebase_source : d7d03d8f61060f019a574e1c4c126a9c238f8a5f
2017-06-02 16:49:56 +08:00
Lee Salzman
a025094cbf Bug 1305036 - implement nsDisplayTextOverflowMarker::GetComponentAlphaBounds to handle ellipsis with subpixel AA. r=mstange
MozReview-Commit-ID: Bedd3JIvzKy
2017-06-01 17:08:54 -04:00
Jonathan Kew
9593c3715f Bug 1369355 - Simplify nsIFrame::GetOverflowAreasProperty, as callers already know whether a property is present. r=mats 2017-06-01 15:34:46 +01:00
Botond Ballo
52ab6c0bae Bug 1365761 - Do not dispatch mouse-move events targeted as a slider frame to web content. r=smaug
MozReview-Commit-ID: Cpi7orSO7dS

--HG--
extra : rebase_source : 30bd643922409f47eb2318938a07e7543337d625
2017-06-05 15:05:47 -04:00
Ryan VanderMeulen
b2f44e5181 Merge inbound to m-c. a=merge 2017-05-31 20:25:52 -04:00
Brad Werth
9f3994b7ed Bug 1355675 Part 1: Add optional inCSSUnits parameters to GetTransformMatrix and GetTransformToAncestor. r=mattwoodrow
MozReview-Commit-ID: EA5uqeoUWE3

--HG--
extra : rebase_source : d57f895a356dfa106cf99c1411216f05b0914620
2017-05-30 09:05:52 -07:00
Mats Palmgren
6a061ca6cf Bug 1369037 - Make the assertions about NS_FRAME_PART_OF_IBSPLIT stricter and update the associated frame properties in nsContainerFrame::DestroyFrom instead of nsFrame::DestroyFrom. r=jfkthame
MozReview-Commit-ID: G8NQ70xzkQU
2017-05-31 21:29:49 +02:00
Mats Palmgren
26214cbd6f bug 1369015 - Remove a useless do_QueryFrame() call. r=jfkthame
GetParent() already returns a nsContainerFrame* so there's no need to
do_QueryFrame that to a nsContainerFrame* !

MozReview-Commit-ID: B8CwGkUWIoT
2017-05-31 21:29:49 +02:00
Mats Palmgren
357e4b9560 bug 1368547 part 2 - Remove nsFrameManager/PresShell methods dealing with placeholders and introduce a nsIFrame::GetPlaceholderFrame() convenience method. r=jfkthame
MozReview-Commit-ID: GBUiUBqJxhQ
2017-05-31 21:29:49 +02:00
Mats Palmgren
2cecf134ac bug 1368547 part 1 - Remove nsFrameManagerBase::mPlaceholderMap and store the placeholder on a frame property on the out-of-flow instead. r=jfkthame
MozReview-Commit-ID: 6AOxc2XgtO1
2017-05-31 21:29:49 +02:00
Jonathan Kew
db627c3bfb Bug 1368369 - pt 1 - Use nsTArray instead of AutoTArray in FrameProperties, and embed the FrameProperties object directly in nsIFrame. r=mats 2017-05-31 19:52:53 +01:00
Jonathan Kew
20b8376ffd Bug 1368654 - pt 1 - Implement memory reporter support for FrameProperties. r=mats 2017-05-31 19:52:47 +01:00
Masayuki Nakano
3f6dead134 Bug 1368521 Selection::SelectFrames() shouldn't skip first content invalidation if it's different from handled text node r=mats
The first node of |iter| in Selection::SelectFrames() may be different from the start parent of given range.  Therefore, if they are different, it shouldn't skip first item of |iter|.

MozReview-Commit-ID: DgE2dSziaxo

--HG--
extra : rebase_source : b35f52d194bf437cc79d1917ad497ebb1a8c27f0
2017-05-31 15:57:53 +09:00
Carsten "Tomcat" Book
1a0d9545b9 merge mozilla-inbound to mozilla-central a=merge 2017-05-31 11:28:43 +02:00
Morris Tseng
eace48c34e Bug 1367332 - Don't build image layer if image map is presence. r=mattwoodrow
MozReview-Commit-ID: 5w43NRlTL6d

--HG--
extra : rebase_source : 1f27df0662f798d4b9dc460e0125a4de6c6e9408
2017-05-24 16:16:40 +08:00
Masayuki Nakano
e7a81b2984 Bug 1367460 Shouldn't make focused editing host blurred when moving selection with Selection API r=smaug
Chromium doesn't make focused editing host blurred when a Selection API method call moves selection to a non-editable node.  Let's follow same behavior for compatibility with both Chromium and Gecko 54.

MozReview-Commit-ID: HXmYX18HVA5

--HG--
extra : rebase_source : 61a380b9f08abc1049d72cc3dd0c4d262f9eaff9
2017-05-30 18:07:22 +09:00
Masayuki Nakano
47fb9898f8 Bug 1367740 Selection::Collapse() should reuse old nsRange instance if it's not referred by anybody r=mats
Selection::Collapse() removes all ranges first, then, adds a collapsed range which is a new instance of nsRange.

However, new nsRange's initialize cost isn't cheap. It needs to add itself to mutation observer and computes common ancestor.  However, Selection::Collapse() doesn't move the range to different document.  If old range is reusable, we can avoid to remove old range from mutation observer and add new range to mutation observer, and also we can avoid to recompute common ancestor if the node is not changed, e.g., only offset is changed in selected node.

MozReview-Commit-ID: BoCBod7WVr5

--HG--
extra : rebase_source : 9ccee28aebba355ebb1137ebc1d02e7d8a30aedf
2017-05-25 18:04:55 +09:00
Masayuki Nakano
61af94acbd Bug 1367683 Optimize initializing nsRange r=smaug
nsRange::DoSetRange() adds/remove its root to/from mutation observer, initializes common ancestor, registers itself to the common ancestor, unregisters itself from old common ancestor, and notifies selection listeners of selection change.

However, those runtime cost is expensive but on the other hand, a lot of callers set both start and end of the range and that causes calling DoSetRange() twice.

This patch renames Set() to SetStartAndEnd() for easier to understand the meaning and make it call DoSetRange() only once.

MozReview-Commit-ID: FRV55tuBAgg

--HG--
extra : rebase_source : 67adf929cf119e2425f7d3741651217522094590
2017-05-30 13:18:25 +09:00
Xidorn Quan
ac6cc1d36a Bug 1368418 part 3 - Remove nsCategoryImp. r=emk
MozReview-Commit-ID: 5qCoeqfM2s5

--HG--
extra : rebase_source : 6dc1693ce61bea4ec35469a3388c75a9fb64e5b3
2017-05-29 16:17:39 +10:00
Masayuki Nakano
5b4491bb2c Bug 1368408 Selection::SelectFrames() can assume that the result of nsRange::GetStartParent(), nsRange::GetEndParent() and nsIContentIterator::GetCurrentNode() never returns nullptr in it r=mats
Selection::SelectFrames() is an internal method of Selection, it always handles positioned range.  So, neither aRange->GetStartParent() nor aRange->GetEndParent() never returns nullptr.

Additionally, nsIContentIterator::GetCurrentNode() shouldn't return nullptr until IsDone() returns true.

MozReview-Commit-ID: 1IS4nMLukt

--HG--
extra : rebase_source : a4eee06580519adf2233f535abfdf50ac8730a19
2017-05-29 14:25:11 +09:00
Masayuki Nakano
3b818bdc60 Bug 1368397 part 4 - Rename Selection::setAnchorFocusRange() to Selection::SetAnchorFocusRange() r=mats
MozReview-Commit-ID: BhiGhxSAUbl

--HG--
extra : rebase_source : f47167119cace1bf313710b5e05c922e793e9df5
2017-05-30 13:26:09 +09:00
Masayuki Nakano
241b3fdf37 Bug 1368397 part 3 - Rename Selection::addTableCellRange() to Selection::AddTableCellRange() r=mats
MozReview-Commit-ID: 2koKrL8pyKT

--HG--
extra : rebase_source : c197e311eb2f30ee1c09c9e7b3734cebabd22f36
2017-05-29 13:31:11 +09:00
Masayuki Nakano
24f6ae8001 Bug 1368397 part 2 - Rename Selection::getTableCellLocationFromRange() to Selection::GetTableCellLocationFromRange() r=mats
MozReview-Commit-ID: 8P8Tq9u0xEz

--HG--
extra : rebase_source : fb8f0fd15334c08cc318bb45786181f669467b01
2017-05-29 13:11:57 +09:00
Masayuki Nakano
79dec39e8b Bug 1368397 part 1 - Rename Selection::selectFrames() to Selection::SelectFrames() r=mats
MozReview-Commit-ID: FaZeLqVwgOK

--HG--
extra : rebase_source : e9c87b48d89231cdd2bf6c942382a541e326ace7
2017-05-29 12:27:09 +09:00
Sebastian Hengst
8ee2c326d2 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: DFuSLSPqTVl
2017-05-29 00:51:05 +02:00
Jonathan Kew
ee384ef57b Bug 1368249 - Create nsIFrame::AddProperty API for use when the property is known to not already exist, and use to optimize some call sites. r=mats 2017-05-28 13:16:55 +01:00
Sebastian Hengst
99f17a4e95 Backed out changeset 59c0589220ec (bug 1368249) unused function GetNormalPosition at nsIFrame.h:1073. r=backout 2017-05-28 15:38:15 +02:00
Jonathan Kew
1f8beade4e Bug 1368249 - Create nsIFrame::AddProperty API for use when the property is known to not already exist, and use to optimize some call sites. r=mats 2017-05-28 13:16:55 +01:00
Jonathan Kew
c7c53d4a41 Bug 1368251 - Check frame state bit before looking up InvalidationRect() property. r=mats 2017-05-28 11:22:39 +01:00
Jonathan Kew
a8f81efd8e Bug 1365982 - Attach frame properties to each frame instead of looking them up in a hashtable on the prescontext. r=mats
--HG--
rename : layout/base/FramePropertyTable.cpp => layout/base/FrameProperties.cpp
rename : layout/base/FramePropertyTable.h => layout/base/FrameProperties.h
2017-05-27 12:36:00 +01:00
Masayuki Nakano
b923eafc5c Bug 1367690 Optimize Selection::selectFrames() r=mats
Selection::selectFrames() always creates two content iterators.  However, if the range is in a node and it doesn't have children, we don't need walk the DOM tree.  So, it should create content iterators only when they are necessary.

Additionally, both Selection::selectFrames() and Selection::SelectAllFramesForContent() handle first content twice, but it's not necessary.

Finally, they query interface to retrieve nsIContent* from nsINode* a lot.

This patch fixes those issues too.

MozReview-Commit-ID: 5bfYz6Zuqkg

--HG--
extra : rebase_source : cb65a313f1a9af0e0520e3fece7c065d11018aa0
2017-05-28 09:37:10 +09:00
Bas Schouten
cf309d5907 Bug 1367906: Cache the presence of rounded corners upon style changes. r=dbaron r=mattwoodrow
Profiling indicates a significant amount of time is spent during displaylist building accessing style information in order to detect border radii. This is a cost that for frames with no border radii only needs to be paid when the style changes.

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

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

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

MozReview-Commit-ID: 1N0AkCGo1ol
2017-05-26 12:11:11 +02:00
Mats Palmgren
ec6b1ef065 Bug 1364805 part 1 - Make every concrete frame class be a NS_DECL_QUERYFRAME_TARGET. r=jfkthame
MozReview-Commit-ID: Gy9gcEYupeY
2017-05-26 12:11:11 +02:00