Commit Graph

12584 Commits

Author SHA1 Message Date
Kearwood (Kip) Gilbert
9edca3c9e4 Bug 1022818 - Part 2: Implement Smooth Scrolling. r=bz
- Updated ScrollTo method in nsGlobalWindow to accept a
  mozilla::dom::ScrollOptions parameter to select between the instant
  and smooth MSD motion.
- Updated WebIDL binding boilerplate scrolling functions in nsGlobalWindow
  to pass the correct value of mozilla::dom::ScrollBehavior to the
  implementation and functions, activating smooth scrolling.
- These functions will need to be updated again to support the scroll-behavior
  CSS property in Bug 1010538.

--HG--
extra : rebase_source : 7c9ce94d09fed5c4aea63442d683876c0a9a2e50
2014-08-05 15:01:34 -07:00
Ting-Yu Lin
93c2d2c4b4 Bug 1057256 - Part 3 - Make touch caret handle events before selection carets. r=roc 2014-08-25 02:50:00 +02:00
Ting-Yu Lin
3277fc6dc5 Bug 1057256 - Part 2 - Add null pointer check for touch and selection carets. r=roc
TouchCaret::IsDisplayable() contains more null pointer check. It covers
what's original there in TouchCaret::HandleEvent().
2014-08-25 02:50:00 +02:00
Ting-Yu Lin
9a407aec80 Bug 1057256 - Part 1 - Remove NS_ENSURE_TRUE in SelectionCarets.cpp. r=roc
Remove NS_ENSURE_TRUE and NS_ENSURE_TRUE_VOID since they are deprecated,
and we do not need to print log in plain null pointer check.
2014-08-25 02:50:00 +02:00
Morris Tseng
ce44192262 Bug 1056457 - Remove batch changes in selection carets. r=roc 2014-08-20 20:23:00 +02:00
Botond Ballo
2d925240e4 Bug 1057528 - Allow multiplying/dividing CoordTyped by ScaleFactor. r=kats 2014-08-22 17:26:46 -04:00
L. David Baron
7465178016 Bug 1057129 patch 3 - Post restyles from CheckAnimationRule directly to pseudo-elements. r=birtles
This matches patch 2, and also fixes an incorrect use of eRestyle_Self
on the parents of pseudo-elements in order to restyle those
pseudo-elements, where it would not previously have been effective.

This should all be temporary, since this code can go away with bug
960465, when animation phases are removed.
2014-08-24 21:48:22 -07:00
L. David Baron
f96287c656 Bug 1057098 - Rename ElementRestyler::Restyle{Before,After}Pseudo to MaybeReframeFor{Before,After}Pseudo. r=bzbarsky 2014-08-24 21:48:21 -07:00
Jonathan Kew
50cb6e6264 bug 1046950 pt 4 - convert ComputeSizeWithIntrinsicDimensions to logical-coord parameters. r=smontagu 2014-08-24 15:34:57 +01:00
Emma Benoit
64a26a7b66 bug 1030741 - Make FrameMetrics::mIsRoot private and add getter/setter methods to manipulate it. r=kats 2014-08-23 19:09:10 -04:00
Kartikaya Gupta
0bcb34fd1e Bug 912700 - Audit all uses of FrameMetrics::mViewport and wrap it in getter/setters. r=botond 2014-08-22 23:18:56 -04:00
Wes Kocher
a8d80abaf6 Merge m-c to inbound a=merge 2014-08-22 17:05:17 -07:00
Wes Kocher
c725a726be Merge inbound to m-c a=merge 2014-08-22 16:47:32 -07:00
Olli Pettay
d72906c30d Bug 314095 - Eliminate nsIContent::GetDocument, r=jst
--HG--
extra : rebase_source : dd8f690940825b298a478b65b68a57418a9962ff
2014-08-22 23:11:27 +03:00
Seth Fowler
4cd9e3e8e6 Bug 1043560 - Refactor the imgIContainer::Draw API. r=tn,dholbert,jwatt,mwu,mattwoodrow,roc sr=jrmuizel
--HG--
extra : rebase_source : b5ed02cb200ece12a07328613dca217e9d975703
2014-08-22 13:12:38 -07:00
Kartikaya Gupta
08b5038258 Bug 1055605 - Replace MOZ_ANDROID_OMTC with MOZ_WIDGET_ANDROID. r=BenWa 2014-08-22 15:26:56 -04:00
C.J. Ku
ad92a99a8a Bug 974242 - Registry and handle FullZoomChange chrome event in TabChild. r=tn, r=kats
--HG--
extra : rebase_source : 05a700f9071d30b87916ffa949acfed776f21f0c
2014-08-21 19:37:00 -04:00
Benoit Girard
0d295d7249 Bug 1010584 - Part 1: Introduce RenderTargetPixel. r=mwoodrow 2014-07-30 14:36:15 -04:00
Markus Stange
b88537eeb0 Bug 1055585 - Add nsITheme::NeedToClearBackgroundBehindWidget and create nsDisplayClearBackground if the theme needs it for a widget. r=roc 2014-08-20 17:26:11 +02:00
Markus Stange
51ee57a6a9 Bug 1055585 - Call nsDisplayList::SetNeedsTransparentSurface when adding a display item that NeedToForceTransparentSurfaceForItem to a layer. r=roc 2014-08-20 17:25:19 +02:00
Markus Stange
5a3e2e40cf Bug 1055585 - Make nsDisplayClearBackground force drawing into a transparent surface. r=roc 2014-08-20 17:24:39 +02:00
Markus Stange
e7720a7604 Bug 1055585 - Add nsDisplayClearBackground. r=roc 2014-08-20 17:16:41 +02:00
Daniel Holbert
4752030d6b Bug 1053035: Don't give <body> its own scroll frame, when it's styled as 'flex' or 'grid' and we've propagated its scrollability to the viewport. r=mats 2014-08-20 08:01:32 -07:00
John Daggett
5ab27c310b Bug 1041951 - parse font-variant as a shorthand for font feature subproperties. r=dbaron 2014-08-20 16:54:25 +09:00
Matt Woodrow
c44fd8ca74 Bug 1030124 - If the nsDisplayTransform frame isn't actually transformed (and not a reference frame), then apply the coordinate space change offset when we compute the transform for the preserve-3d
parent. r=roc
2014-08-20 17:43:26 +12:00
Seth Fowler
5ba894ef8c Bug 35168 - Backout 4 changesets (e15a7a0c8f70, 852b5ce53278, f36adee1958f, 479ff28f783f) for B2G bustage and reftest failures ON A CLOSED TREE
--HG--
extra : amend_source : 2be4ad526c51311c6f03b2681dd3961c1502c303
2014-08-19 20:37:14 -07:00
Seth Fowler
e4bac7857e Bug 35168 (Part 2) - Allow relative positioning of internal table objects. r=dbaron 2014-08-19 18:24:58 -07:00
Ryan VanderMeulen
8df0faf2d0 Merge m-c to inbound. a=merge 2014-08-19 16:25:33 -04:00
Botond Ballo
ffebd18f0b Bug 923512 - Introduce strongly-typed coordinate classes. r=kats,Bas
--HG--
extra : rebase_source : 22e5fe577ea503aede765c70e16c0bf875c4a9fd
2014-08-19 13:08:16 -04:00
Botond Ballo
cd5407cec3 Bug 923512 - Transition the TransformTo<>() functions from gfx3DMatrix to Matrix4x4. r=kats
--HG--
extra : rebase_source : 3a82faa2e95b889cb19db5cc24e24d74e6498f08
2014-08-06 12:52:04 -04:00
Robert O'Callahan
139b358c46 Bug 1048752. Part 39: Call SelectionLanguageChange even when bidi keyboard is not available, for consistency, and fix broken tests. r=jfkthame
--HG--
extra : rebase_source : c25d92fbc1d2237c35de80f0273dc00e81d0444d
2014-08-13 01:27:02 +12:00
Robert O'Callahan
96711a9de4 Bug 1048752. Part 37: GetGeometryForFrame should return a rect instead of an nsresult. r=tn
--HG--
extra : rebase_source : f49846cc50de2a3a616a991d81b38bf6c1d9a2c5
2014-08-06 17:19:32 +12:00
Robert O'Callahan
98d88074ed Bug 1048752. Part 36: Remove ancient horizontal rules. r=tn
--HG--
extra : rebase_source : 7537ad3060b7703565d2a259109fae96e238e0a4
2014-08-06 17:19:31 +12:00
Robert O'Callahan
754d094377 Bug 1048752. Part 35: Remove GetFrameSelection (unused). r=tn
--HG--
extra : rebase_source : 4b528b7de79bf3f1e03891cb093d16a111605c2c
2014-08-06 17:19:31 +12:00
Robert O'Callahan
80f5312883 Bug 1048752. Part 34: Handle null selection returned by GetSelection(). r=tn
Previous changes broke this. Tests caught it.

--HG--
extra : rebase_source : 20f365b3f6074fe18d4aaa7f81baf64f3b64e8de
2014-08-06 17:19:31 +12:00
Robert O'Callahan
25c1a49e6d Bug 1048752. Part 33: A zero blink rate should mean the caret is always on. r=tn
Previous changes broke this.

--HG--
extra : rebase_source : d0dc9bd22f93f40465b3448cf20050ac725ee560
2014-08-06 17:19:31 +12:00
Robert O'Callahan
967ecc3283 Bug 1048752. Part 32: Rename DrawAtPosition to SetCaretPosition and don't make it turn off blinking. r=tn
There's no need for this method to turn off blinking anymore. Its only
caller already calls SetCaretReadOnly to achieve the same effect. That
means we don't actually need the mIsBlinking flag after all.

--HG--
extra : rebase_source : 9d4c31282ed280c0f822f1d9f7fa8ae1c2ba6cab
2014-08-06 17:19:31 +12:00
Robert O'Callahan
8e137f0061 Bug 1048752. Part 31: nsCaret.h must be the first #include in nsCaret.cpp. r=tn
Also cleans up a couple of other ordering issues.

--HG--
extra : rebase_source : 3c5e3f4b56cf3d11b73e9d495fc6c2c8a8170e5f
2014-08-06 17:19:30 +12:00
Robert O'Callahan
22cca61b31 Bug 1048752. Part 30: Simplify caret blinking logic. r=tn
A few things got mashed together here:
-- Inline KillTimer/PrimeTimer into their callers.
-- Instead of having to call StopBlinking and StartBlinking together,
change StartBlinking to ResetBlinking and have it set up
the correct blink state and reset the blink cycle.
-- nsCaret::NotifySelectionChange needs a SchedulePaint
-- nsCaret::DrawAtPosition needs a ResetBlinking

--HG--
extra : rebase_source : abc7fd78c4f20b787b212e1e3f13226a1ccff16b
2014-08-06 17:19:30 +12:00
Robert O'Callahan
e2388b41b8 Bug 1048752. Part 29: mVisible is never true in nsCaret::Init. r=tn
--HG--
extra : rebase_source : 7fd2386e3f5ea667bc0ff4948182187d56647482
2014-08-06 17:19:30 +12:00
Robert O'Callahan
02949541da Bug 1048752. Part 28: Remove unused fields and rename mLast* to mOverride*. r=tn
--HG--
extra : rebase_source : 71f40b16935dc57b2ea8674ebb28d93cfe85567d
2014-08-06 17:19:30 +12:00
Robert O'Callahan
2730385743 Bug 1048752. Part 27: Remove obsolete caret state logic and just SchedulePaint as needed. r=tn
This is the core of the whole patch set.

Now GetPaintGeometry/PaintCaret figure out on their own almost all the state
they need every time we paint. So when caret flags change, all we need
to do is SchedulePaint. We don't need to fiddle with mDrawn and most of the
logic in DrawCaret is obsolete. (In fact, it was duplicated by GetGeometry
and friends, and we're removing that duplication.) EraseCaret, CheckCaretState
and UpdateCaretPosition are also obsolete.

We need to have GetPaintGeometry/PaintCaret choose the correct content node
and offset, either getting them from the Selection or using specific data set by
DrawAtPosition. This logic, plus a bit of other code shared between them, is
put into the helper GetFrameAndOffset.

--HG--
extra : rebase_source : e777605dd2507ae043e9f82d0a30e23aa06e0c12
2014-08-06 17:19:29 +12:00
Robert O'Callahan
eee12a20cd Bug 1048752. Part 26: Move all "should draw caret" responsibility to GetPaintGeometry. r=tn
Instead of checking the mysterious mDrawn state (which is evil and will be
removed), let nsCaret::GetPaintGeometry take sole responsibilty for deciding
whether to draw. It takes the nsStyleUserInterface checks. It also needs to
check blink state, which is made possible by separating blink state into
the mIsBlinkOn flag.

--HG--
extra : rebase_source : 4a4796c37bc9ec7c25ffb2a320f9484cee1dc52f
2014-08-06 17:19:29 +12:00
Robert O'Callahan
dc9e923d16 Bug 1048752. Part 25: Inline MustDrawCaret into IsVisible. r=tn
This also fixes what appears to be a bug. MustDrawCaret returned true
when mShowDuringSelection is set even if the caret would otherwise be
hidden due a popup showing. That doesn't make sense.

--HG--
extra : rebase_source : e05e0892a85448dbc6666e23a0dbc7fa21a9c61e
2014-08-06 17:19:29 +12:00
Robert O'Callahan
150ec76871 Bug 1048752. Part 24: Rename and deCOM Set/GetCaretVisible. r=tn
--HG--
extra : rebase_source : 04249e9b22a62b8f2952515fa48f4ba3227e235e
2014-08-06 17:19:29 +12:00
Robert O'Callahan
7de632d807 Bug 1048752. Part 23: Remove aIgnoreDrawnState from MustDrawCaret. r=tn
--HG--
extra : rebase_source : 20e724ce09deec3987437838ac9f05e84ddbe2fd
2014-08-06 17:19:28 +12:00
Robert O'Callahan
39217b370a Bug 1048752. Part 22: Factor out SelectionLanguageChange call to run early in nsCaret::GetPaintGeometry. r=tn
This code is somewhat tricky. nsCaret::ComputeCaretRects was checking to see
if we have a bidi keyboard, and if so, what direction it's set to.
If the direction changed from the last direction seen for *this caret*,
we fired a SelectionLanguageChange notification on the caret's current
Selection. This looked bogus because the caret can be switched between
selections so it would seem some selections won't get a notification when
they should, but that's how it was. Also, when the SelectionLanguageChange
notification fired we then didn't draw the caret in that iteration, which
seems even more bogus.

This patch fixes all that by moving the logic to fire SelectionLanguageChange
out to GetPaintGeometry and firing the notification every single time without
trying to detect whether the state has changed or not. I carefully examined
the implementation of SelectionLanguageChange and I'm pretty sure it's
idempotent so this should be correct. That doesn't look like an
expensive function, and runs at most once per window paint, so I'm not
worried about perf. Because we now fire SelectionLanguageChange before
reading selection or frame state, it should be fine to carry on after
calling SelectionLanguageChange and drawing the caret based on whatever
changes SelectionLanguageChange has performed.

This also lets us remove mKeyboardRTL, which as noted above seems inherently
bogus.

--HG--
extra : rebase_source : 3ddfd10f6f30033e090e72b4bb43f2695218752e
2014-08-06 17:19:28 +12:00
Robert O'Callahan
1702d93ebd Bug 1048752. Part 21: Instead of storing mCaretRect/mHookRect, recompute them whenever they're needed. r=tn
Also, moves the "If the offset falls outside of the frame" check from
PaintCaret to GetPaintGeometry so we do less work in that case.

UpdateCaretRects is no longer needed.

--HG--
extra : rebase_source : 4b2925952a34d0388ae44c642129ce9015c367ea
2014-08-06 17:19:28 +12:00
Robert O'Callahan
235282831d Bug 1048752. Part 20: Inline GetCaretFrame into its callers. r=tn
This duplicates some code, but later patches will modify the callers and then
eventually we'll re-share common code.

--HG--
extra : rebase_source : 53f4756e87aadf22046972ef9102c190fbb35132
2014-08-06 17:19:28 +12:00
Robert O'Callahan
a1480fca87 Bug 1048752. Part 19: Create nsCaret::GetPaintGeometry to call during painting. r=tn
This is the start of the changes to caret-drawing proper.

The idea is to combine GetCaretFrame and GetCaretRect into a method
GetPaintGeometry which looks like GetGeometry but returns values
needed for painting (i.e. including bidi decorations, and returning
a null frame if we're not supposed to paint due to specific caret
state, e.g. in the "off" phase of the blink cycle).

Mostly a straightforward refactoring but there are a few interesting changes:
-- nsDisplayCaret stores its bounds instead of getting them from nsCaret on
demand. Eventually those bounds will not be stored in nsCaret at all.
-- nsDisplayCaret::GetBounds returns true for aSnap. nsCaret draws snapped
rects, so why not.
-- I removed "if (caretRect.Intersects(aDirtyRect))" in EnterPresShell.
As far as I can tell, this check is incorrect because it doesn't take
transforms into account. Since there's at most one drawn caret per window,
hence we do this at most once per paint, I don't think there's any real
performance advantage to having this check.

--HG--
extra : rebase_source : c98d3a5994478b482d19cc2e2ac83ab51bd17e00
2014-08-06 17:19:28 +12:00