Commit Graph

15750 Commits

Author SHA1 Message Date
Jeremy Chen
546697763f Bug 1287728 - part1: explicitly define default value for RestyleResult. r=heycam
After explicitly define default value for RestyleResult, we have a value
starting from 0 now. So, we can drop the explicity numbering.

MozReview-Commit-ID: 1UlpkUT6mAL

--HG--
extra : rebase_source : 441da4a5def8b9c8340cc3048d8dba5ddaae3b87
2016-07-19 21:10:59 +08:00
Emilio Cobos Álvarez
dd78b9aaef Bug 1287542: stylo: Actually post a restyle event to the restyle manager on content state change. r=bholley
This was somehow a leftover from Bug 1286445.

MozReview-Commit-ID: 1bGKsNvm1qn

--HG--
extra : rebase_source : d888a1f804afb991a4eb90a7e74065b90a805744
2016-07-18 11:28:57 -07:00
Emilio Cobos Álvarez
a77d2878ce Bug 1287542: stylo: Implement ServoRestyleManager::HasPendingRestyles() r=bholley
MozReview-Commit-ID: JeDly0eqjka

--HG--
extra : rebase_source : 7d5673ba2199e6e1a564d4d22e705058447bc49d
2016-07-18 11:28:27 -07:00
Jeremy Chen
3f03fe838d Bug 1287308 - part2: remove old NS_STYLE_HINT_NONE constant. r=dbaron
Remove NS_STYLE_HINT_NONE definition in nsChangeHint.
Fix related debug log in RestyleManager.

MozReview-Commit-ID: 4pA8u8MQDnv

--HG--
extra : rebase_source : 66bbfa54eb35f1de2318787a610b6e401262b28a
2016-07-17 22:20:22 +08:00
Jeremy Chen
9d8ddf9b2d Bug 1287308 - part1: replace uses of NS_STYLE_HINT_NONE with nsChangeHint(0). r=dbaron
MozReview-Commit-ID: CN66AimiuEu

--HG--
extra : rebase_source : 6caaa30e9afa8645ea31c4918230ba2ec53bc74a
2016-07-17 22:20:21 +08:00
Emilio Cobos Álvarez
ec307d8059 Bug 1286445: stylo: Unset restyle frames appropriately after regenerating style contexts. r=heycam
MozReview-Commit-ID: IgG4KOESJUY
2016-07-16 16:22:12 -07:00
Emilio Cobos Álvarez
1a49c35a07 Bug 1286445: stylo: Support restyles of non-pseudo content on state change. r=heycam
This includes, for example :hover.

Also removes the call to IsStyledByServo() in the document constructor, it's not
only unnecessary, but also we call UpdateStyleBackendType() too early.

MozReview-Commit-ID: 4YfCdmLoSxu
2016-07-16 16:22:12 -07:00
Tooru Fujisawa
5343dbd6c2 Bug 1285658 - Part 2: Use less-erroneous value while calculating border corner dimensions. r=jrmuizel 2016-07-16 10:39:44 +09:00
L. David Baron
d6df5b5f4a Bug 1287011 - Remove preference gfx.filter.nearest.force-enabled. r=gw280
This preference was added in bug 747274, and the need for it (i.e.,
having it default to a different value on Android) was removed a few
weeks later in bug 750598.

Whether we honor the preference depends on which drawing function we go
through, which bug 720531 will make even more inconsistent than it
already is (by causing it to be honored for border-image-repeat: space,
but not other values of border-image-repeat).

Rather than trying to clean it up, it seems best to remove it, since its
initial purpose appears to have been having a different default on
Android, which we longer need.

MozReview-Commit-ID: IFW2Ukwx4fH

--HG--
extra : transplant_source : q1%22Ad%D2%AF%8E%E5%E2%257C%A3%9F%95%DB%A5%92%B2
2016-07-16 07:39:47 +08:00
Carsten "Tomcat" Book
7c0644d587 Merge mozilla-central to mozilla-inbound 2016-07-14 11:56:37 +02:00
Carsten "Tomcat" Book
bfcc10319e merge mozilla-inbound to mozilla-central a=merge 2016-07-14 11:45:54 +02:00
Timothy Nikkel
8dab980fec Bug 1271714. When creating the wrap list item that contains the display list for a frame make sure to use a scroll clip that includes content in the display list. r=mstange
In nsIFrame::BuildDisplayListForChild for certain types of frames we create wrap list items to wrap the constructed display list to make those items inseperable.

We were using the current scroll clip by default when creating these items, but that scroll clip may not contain all the content in the display list if we traversed into an out of flow frame whose containing block is an ancestor of the current frame. The CurrentAncestorScrollClipForStackingContextContents keeps track of exactly this. (Its name might be a little misleading as we may not be dealing with a true stacking context here. Nevertheless it does contain the correct clip.)

We also need to initialize the value of mStackingContextAncestorSC when we create an AutoSaveRestore because we are now using that value sometimes without calling Enter/ExitStackingContext (which initializes mStackingContextAncestorSC).
2016-07-13 01:08:18 -05:00
Kartikaya Gupta
982bc8ba1f Bug 1284586 - Disable paint-skipping for scrollframes that we detect as having a CSS-clipped descendant. r=mstange
MozReview-Commit-ID: AvjokFZMwdd
2016-07-13 16:05:53 -04:00
cku
0e37181d38 Bug 1258510 - Part 1. Use the return value of nsCSSRendering::PaintBackgroundWithSC. r=mstange
MozReview-Commit-ID: D1gKBng8hnJ

--HG--
extra : rebase_source : 430c41d7bf5754169d5e485ea43ca96c8490efdd
2016-07-12 01:22:54 +08:00
Carsten "Tomcat" Book
c3393c7dd8 Backed out changeset 0d582c239872 (bug 1271714) for test failures 2016-07-13 09:44:45 +02:00
Timothy Nikkel
5cc9ab83c9 Bug 1271714. When creating the wrap list item that contains the display list for a frame make sure to use a scroll clip that includes content in the display list. r=mstange
In nsIFrame::BuildDisplayListForChild for certain types of frames we create wrap list items to wrap the constructed display list to make those items inseperable.

We were using the current scroll clip by default when creating these items, but that scroll clip may not contain all the content in the display list if we traversed into an out of flow frame whose containing block is an ancestor of the current frame. The CurrentAncestorScrollClipForStackingContextContents keeps track of exactly this. (Its name might be a little misleading as we may not be dealing with a true stacking context here. Nevertheless it does contain the correct clip.)

We also need to initialize the value of mStackingContextAncestorSC when we create an AutoSaveRestore because we are now using that value sometimes without calling Enter/ExitStackingContext (which initializes mStackingContextAncestorSC).
2016-07-13 01:08:18 -05:00
Nicholas Nethercote
a913f99107 Bug 1285554 - Remove remnants of widget/qt. r=dougt,mshal.
Because bug 1282866 removed Qt support but missed a bunch of things.
* * *
Bug 1285554 - more

--HG--
extra : rebase_source : c48d2485f1fdf1c961e08d91651bbca41e3a1a53
2016-07-12 09:16:45 +10:00
Lee Salzman
16ca3223d9 Bug 1286317 - part 1 - remove Qt widget usage from gfx. r=jrmuizel 2016-07-12 20:27:57 -04:00
Carsten "Tomcat" Book
66a84ab34f Merge mozilla-central to autoland 2016-07-12 16:45:24 +02:00
Ting-Yu Lin
ad4f98ca69 Bug 1285273 - Bail out early if ptFrame died in SelectWordOrShortcut(). r=masayuki
Check ptFrame is still alive after calling
ChangeFocusToOrClearOldFocus() and IMEStateManager::NotifyIME().

MozReview-Commit-ID: DtjoxtRIDdK

--HG--
extra : rebase_source : ff6d18eb15d719d4f00dce249e2a33f5a4823203
2016-07-10 14:36:02 +08:00
Carsten "Tomcat" Book
6139c05b2d Merge mozilla-central to mozilla-inbound 2016-07-11 16:24:23 +02:00
Carsten "Tomcat" Book
0d2c8ddbb2 Merge mozilla-central to autoland 2016-07-11 11:51:22 +02:00
Hiroyuki Ikezoe
685a35fbc5 Bug 1279403 - Part 1: Force to apply corresponding change hint if there is no corresponding layer to generate display item even if animation's segment is transform:none or 100% opacity. r=birtles
To create a stacking context for animations on transform:none segment,
we need to set NS_FRAME_MAY_BE_TRANSFORMED.  The fix is comming in part 2.

Note that in case of animations which has properties preventing running on
the compositor, e.g., width or height, corresponding layer is not created
at all, but even in such cases, we normally set valid change hint for such
animations in each tick, i.e. restyles in each tick. For example:

div.animate([{ opacity: 1, width: '100px' }, { opacity: 0, width: '200px' }], 1000);

This animation causes restyles in every ticks without this patch, this patch
does not affect such animations at all. The only animations which will be
affected by this patch are animations which has opacity/transform but
did not have those properies. e.g,  setting transform by setKeyframes or
changing target element from other target which prevents running on the
compositor, etc.

MozReview-Commit-ID: 78fYqyX8uDX

--HG--
extra : rebase_source : c4a6ef244f26f3d808fd2c6a5f80c1a15478ae31
2016-07-11 08:27:02 +09:00
Chris Peterson
43c2748f66 Bug 1277775 - Replace MOZ_CONSTEXPR{_VAR,_TMPL} with constexpr. r=froydnj 2016-07-08 14:39:53 -07:00
Wes Kocher
2a800a6763 Merge fx-team to central, a=merge CLOSED TREE 2016-07-08 15:02:31 -07:00
Carsten "Tomcat" Book
37cacb6747 Merge mozilla-central to fx-team 2016-07-08 12:17:32 +02:00
Timothy Nikkel
7220b22c54 Bug 1285409. Store out of flow data for frames we are going to descent into anyways (despite no intersection with the dirty rect) so we have the correct clip for them. r=mattwoodrow
If the frame already has the NS_FRAME_FORCE_DISPLAY_LIST_DESCEND_INTO bit we are going to descend into it anyways, so we may as well store the oof data so we can have the correct clip.

Sometimes we add the bit after this test though, so it doesn't allow us to have the proper clip in all cases.
2016-07-08 00:25:18 -05:00
Jan Henning
47101d08ae Bug 1282902 - Part 3 - Let the MobileViewportManager recalculate the saved resolution if the display width changed before restoring. r=kats
The mobile session store saves the current document resolution in order to restore the previous zoom level when restoring a page. If the display width has changed since the session data was captured (e.g. because the device was rotated), the resolution might have to be scaled appropriately.
Currently, the session store does this scaling by itself by comparing the stored and current window widths, however this implementation is slightly simplified and doesn't cover all use cases, which means some pages can be restored at a wrong zoom level after rotation. To correctly cover all cases, the session store would have to compare viewport widths, too.

Because the MobileViewportManager doesn't wait for the session store to set the restore resolution, the latter has to call setRestoreResolution() as early as possible in order to guarantee that the restore resolution is set before the first paint of the document. Therefore the session store currently calls this after receiving a LocationChange notification. However at that time, the correct viewport for the current document is not yet available, which means the resolution cannot be recalculated by the session store at that point.

Therefore, this patch changes the approach taken and lets the MVM handle all resolution calculations instead. The session store now simply passes the stored previous display dimensions along with the previous document resolution to the MVM, which can then compare them to the current display and viewport widths and scale the resolution appropriately before using it during first paint.


MozReview-Commit-ID: IGxWw87yftK

--HG--
extra : transplant_source : e%8D%BD%26%D2%C3%8E5%E3%2B%C0t%BA%DB%C1%BBs%3F%13%1F
2016-07-01 21:23:25 +02:00
Jan Henning
070a561665 Bug 1282902 - Part 2 - Extract resolution scaling into separate function. r=kats
We'll want to use this during first-paint, too, in order to correctly scale the resolution as received by the session store if we're restoring a previous tab. Therefore we extract this code into a separate helper function.

MozReview-Commit-ID: KCdvmyrP4mJ

--HG--
extra : transplant_source : c%BD%99%9D%F8%9EW%D2%8B%BD%E0a%82%ED%3B%EE%EF%ACl%D6
2016-07-02 22:15:19 +02:00
Tooru Fujisawa
b3fcb7c13a Bug 1285658 - Remove a gap between dashed side and dashed corner if border radius is not an integer. r=jrmuizel 2016-07-10 06:18:12 +09:00
Masayuki Nakano
f382711dc3 Bug 1260651 part.59 Rename nsEditor to mozilla::EditorBase (and also their file names) r=mccr8
This patch also renames:

EditorInputEventDispatcher -> mozilla::EditorInputEventDispatcher

And some variable names are renamed from aEditor or mEditor to aEditorBase or mEditorBase for making their types clearer.

MozReview-Commit-ID: 2FCXWpLMn8e

--HG--
rename : editor/libeditor/nsEditor.cpp => editor/libeditor/EditorBase.cpp
rename : editor/libeditor/nsEditor.h => editor/libeditor/EditorBase.h
2016-07-08 13:10:13 +09:00
Masayuki Nakano
9b6e26f0bb Bug 1260651 part.56 Rename nsHTMLEditor to mozilla::HTMLEditor and related stuff r=mccr8
This patch renames classes/structs as:

nsHTMLEditor -> mozilla::HTMLEditor
nsHTMLEditor::BlobReader -> mozilla::HTMLEditor::BlobReader
SetSelectionAfterTableEdit -> mozilla::AutoSelectionSetterAfterTableEdit

nsHTMLEditor.h -> HTMLEditor.h (exposed as mozilla/editor/HTMLEditor.h)
nsHTMLAbsPosition.cpp -> HTMLAbsPositionEditor.cpp
nsHTMLAnonymousUtils.cpp -> HTMLAnonymousNodeEditor.cpp
nsHTMLDataTransfer.cpp -> HTMLEditorDataTransfer.cpp
nsHTMLEditorStyle.cpp -> HTMLStyleEditor.cpp
nsHTMLInlineTableEditor.cpp -> HTMLInlineTableEditor.cpp
nsHTMLObjectResizer.cpp -> HTMLEditorObjectResizer.cpp
nsTableEditor.cpp -> HTMLTableEditor.cpp

These new file names are clearer names which related to HTMLEditor than old names.

MozReview-Commit-ID: DTWaoFvy0DF

--HG--
rename : editor/libeditor/nsHTMLAbsPosition.cpp => editor/libeditor/HTMLAbsPositionEditor.cpp
rename : editor/libeditor/nsHTMLAnonymousUtils.cpp => editor/libeditor/HTMLAnonymousNodeEditor.cpp
rename : editor/libeditor/nsHTMLEditor.cpp => editor/libeditor/HTMLEditor.cpp
rename : editor/libeditor/nsHTMLEditor.h => editor/libeditor/HTMLEditor.h
rename : editor/libeditor/nsHTMLDataTransfer.cpp => editor/libeditor/HTMLEditorDataTransfer.cpp
rename : editor/libeditor/nsHTMLObjectResizer.cpp => editor/libeditor/HTMLEditorObjectResizer.cpp
rename : editor/libeditor/nsHTMLInlineTableEditor.cpp => editor/libeditor/HTMLInlineTableEditor.cpp
rename : editor/libeditor/nsHTMLEditorStyle.cpp => editor/libeditor/HTMLStyleEditor.cpp
rename : editor/libeditor/nsTableEditor.cpp => editor/libeditor/HTMLTableEditor.cpp
2016-07-09 11:42:33 +09:00
Kartikaya Gupta
e0f363fe61 Bug 1255555 - When a frame reconstruction triggers caret elements to be cloned, ensure the dummy touch listeners are re-registered on the clones. r=tylin
MozReview-Commit-ID: 8txWmd64LC9
2016-07-11 08:16:39 -04:00
Olli Pettay
4aaedb4570 Bug 1277722, release touch objects even if dispatching touchend fails, r=masayuki
--HG--
extra : rebase_source : 33bf5c39621a6a3e82beccfb4f9d2a41aa2880aa
2016-07-07 15:43:23 +03:00
Carsten "Tomcat" Book
79a926a3d8 Backed out changeset 24ec7aba60e7 (bug 1283302) for testfailures in 518172-1b.html 2016-07-07 08:20:32 +02:00
Jet Villegas
838c4e24dc Bug 1283302: Sets the default value for nglayout.initialpaint.delay to 5ms (was 250 ms) per user research conclusions. r=mattwoodrow 2016-07-06 19:08:29 -07:00
Emilio Cobos Álvarez
289ca90dc4 Bug 1285474: Add mozilla::RestyleManagerBase to share logic between RestyleManager and ServoRestyleManager. r=bholley
Partially implement some restyling APIs to take rid of some gecko-only code
paths.

MozReview-Commit-ID: L5i6Kr2Qars
2016-07-12 00:33:57 -07:00
Cameron McCormack
acd21d26c0 Bug 1285474: Decide style system backend type for documents earlier. r=bholley
MozReview-Commit-ID: 7A4t3957CWe
2016-07-12 00:33:57 -07:00
Emilio Cobos Álvarez
474ff66ca4 Bug 1285474: stylo: Add dirtiness-tracking hooks for Servo and convenient methods. r=bholley
Also, guard with asserts the access to the new shared flags.

MozReview-Commit-ID: H9UFFHRPmiu
2016-07-12 00:33:57 -07:00
Emilio Cobos Álvarez
5990bbc7d5 Bug 1285474: stylo: Add nsINode method for knowing if the current document is using Servo's style back-end. r=bholley
MozReview-Commit-ID: 3sRE7BZj1tu
2016-07-12 00:33:57 -07:00
Timothy Nikkel
8b8ea4c0be Bug 1276467. Enforce that any items creating when we descend into an out-of-flow for which we don't have the proper clip are invisible. r=mattwoodrow
Just giving them an empty visible rect isn't enough because the initial visible rect can be ignored when we compute visibility.

When we enter an out of flow without saved clip data we set a flag on the builder indicating all items created should be invisible. When we enter a visible out of flow (ie one with saved clip data) inside the first out of flow we clear the flag so items created inside the second out of flow can be visible.
2016-07-12 00:49:11 -05:00
Matt Woodrow
0fc40ccc57 Bug 1279202 - Make sure that deferring a resize of a document schedules a layout flush, not just a style one. r=dbaron 2016-07-14 18:39:35 +12:00
Jeremy Chen
a02cef6a08 Bug 906116 - part4: Remove NS_STYLE_HINT_FRAMECHANGE. r=dbaron
MozReview-Commit-ID: IXPWY2B6k48

--HG--
extra : rebase_source : 0156bbbc463a6e532cfdc0e007b470cb595c52d1
2016-07-06 13:06:14 +08:00
Jeremy Chen
122a1b7056 Bug 906116 - part3.3: Replace NS_STYLE_HINT_FRAMECHANGE with nsChangeHint_ReconstructFrame. r=dbaron
Use ReconstructFrame to replace NS_STYLE_HINT_FRAMECHANGE in many places, such
as HTML*Element::GetAttributeChangeHint and HTMLFrameSetElement::SetAttr.

MozReview-Commit-ID: EHbc4RMeuu0

--HG--
extra : rebase_source : afffc0d2ee2861a58dee82f0af06a67f4b8e3a78
2016-07-06 13:06:14 +08:00
Jeremy Chen
0094cd236f Bug 906116 - part2: Fix comment for nsChangeHint_ReconstructFrame. r=dbaron
The comment for nsChangeHint_ReconstructFrame is out-of-date.

In RestyleManager::ProcessRestyledFrames, we actually ignore all of the other
hints if ReconstructFrame is set. The old version was written when
ReconstructFrame was listed last. So, update the comment.

MozReview-Commit-ID: 97wMrW6S6ID

--HG--
extra : rebase_source : d76815f8cadd7ddc6babc65e24d197717269625f
2016-07-06 13:06:13 +08:00
Carsten "Tomcat" Book
de3628dc26 Backed out changeset d84c0edb6912 (bug 906116) 2016-07-06 05:40:08 +02:00
Carsten "Tomcat" Book
45017d7986 Backed out changeset 8c1f9996a7d6 (bug 906116) 2016-07-06 05:40:06 +02:00
Carsten "Tomcat" Book
c9dc6a368d Backed out changeset 1ec6e0357c42 (bug 906116) 2016-07-06 05:40:05 +02:00
Jeremy Chen
b915e25c11 Bug 906116 - part4: Remove NS_STYLE_HINT_FRAMECHANGE. r=dbaron
MozReview-Commit-ID: IXPWY2B6k48

--HG--
extra : rebase_source : 63c31419f19c6fdfaebab4947cb881fe9ed7a820
2016-07-06 09:59:56 +08:00
Jeremy Chen
160b96f9a4 Bug 906116 - part3.3: Replace NS_STYLE_HINT_FRAMECHANGE with nsChangeHint_ReconstructFrame. r=dbaron
Use ReconstructFrame to replace NS_STYLE_HINT_FRAMECHANGE in many places, such
as HTML*Element::GetAttributeChangeHint and HTMLFrameSetElement::SetAttr.

MozReview-Commit-ID: EHbc4RMeuu0

--HG--
extra : rebase_source : f5163608c88362595ef5af5fcd36fa64c9c79ce7
2016-07-06 09:59:56 +08:00