Commit Graph

12728 Commits

Author SHA1 Message Date
Wes Kocher
3de1ea925a Backed out changeset 54933b5b96f1 (bug 1260324) for frequent windows reftest failures a=backout CLOSED TREE 2016-08-23 13:50:14 -07:00
Timothy Nikkel
9e89a17b91 Bug 1260324. Don't draw garbage to the screen if an image doesn't happen to be decoded. r=seth
Layout has been using imgIContainer::IsOpaque to determine if the image will draw opaquely to all pixels it covers, and doing culling based on this.

However imgIContainer::IsOpaque doesn't guarantee anything. It only describes if the image, when in a decoded state, has all opaque pixels. So if the image doesn't have fully decoded frames around (because they got discarded) it may not draw opaquely to all of its pixels.

So we create a new function that first checks if there is a fully decoded frame.
2016-08-22 21:15:38 -05:00
Xidorn Quan
a154442a7e Bug 1200469 part 1 - Avoid using fallback cursor if from the same frame. r=tnikkel,smaug
MozReview-Commit-ID: A2Ku0TND66L

--HG--
extra : amend_source : 186b672b7e55affaf2f30a737346da5fde4aa343
2016-08-19 23:37:14 +10:00
Jonathan Kew
477e0a395a Bug 1288975 - Make innerText use nsCaseTransformTextRunFactory::TransformString to implement text-transform, so that it benefits from language-specific behaviors. r=mats 2016-08-20 00:08:24 +01:00
Bobby Holley
412f98cac5 Bug 1296509 - Optimize GetFlattenedTreeParent. r=smaug
We need to call it on some hot paths in stylo, and this allows us to do
quick inline check before delegating to the slow path.
2016-08-19 14:43:53 -07:00
Ryan VanderMeulen
ce55e7b71a Merge m-c to inbound. a=merge 2016-08-19 09:59:49 -04:00
Ryan VanderMeulen
01c4e8cc1b Merge inbound to m-c. a=merge 2016-08-19 09:52:53 -04:00
Jonathan Kew
0cb66c8d3a Bug 1280887 - patch 3 - Get rid of the mTextRunsToDelete array now that the frame's textruns are refcounted and will know when to die by themselves. r=mats 2016-08-19 13:14:37 +01:00
Jonathan Kew
95a82f84cc Bug 1280887 - patch 2 - Make gfxTextRun refcounted, replace usage of UniquePtr<> with RefPtr<> for textruns, and make nsTextFrame hold a strong reference to its run(s). r=mats 2016-08-19 13:14:22 +01:00
Cameron McCormack
792c4f4eb0 Bug 1295852 - Part 4: Check for generated content containers more precisely when reflowing grid containers. r=me
I'm not convinced that we can actually get regular content
<_moz_generated_content_before> elements in here, since it's only if
CompareTreePosition returned 0 that we look at the element name,
but might be best to make this test stronger in any case.

MozReview-Commit-ID: 8CgxcU9AbDA

--HG--
extra : rebase_source : 4a47ed62895d83f720ec7ccfde253e2c1945b34f
2016-08-19 11:46:43 +08:00
Nicholas Nethercote
67af4817e9 Bug 1293596 (part 2) - Rework nsIWidget bounds getters. r=mstange.
This patch makes GetBounds(), GetScreenBounds() and GetClientBounds() more
obviously infallible, like existing functions such as GetNaturalBounds() and
GetClientSize(). This results in clearer behaviour in nsCocoaWindow.mm if
Objective C exceptions occur. Along the way, the patch removes some useless
failure checks for these functions.

The patch also removes the NS_IMETHOD from GetRestoredBounds and makes that
function MOZ_MUST_USE.
2016-08-19 09:03:04 +10:00
Phil Ringnalda
bf198cf202 Backed out 2 changesets (bug 1198135) for e10s reftest assertion failures
CLOSED TREE

Backed out changeset 05d5dee06384 (bug 1198135)
Backed out changeset 0d6ede0caa26 (bug 1198135)
2016-08-18 19:23:26 -07:00
Matt Woodrow
b2a3b682b3 Bug 1198135 - Part 2: Compute the scrolled rect stored by ScrollFrameHelper as what will actually be scrollable. r=dbaron
--HG--
extra : rebase_source : 3b47a778798069531d804393724b14194342866a
2016-08-18 16:09:47 +12:00
Matt Woodrow
06275ce493 Bug 1198135 - Part 1: Recompute all required overflow areas when scrolling. r=dbaron
--HG--
extra : rebase_source : a9e34de77013548aa8a456f171ec77e58930af81
2016-08-18 16:08:17 +12:00
Wes Kocher
66098b3d43 Merge m-c to autoland, a=merge 2016-08-17 17:25:57 -07:00
Nathan Froyd
d9759d258f Bug 1295192 - part 1 - remove CPP_THROW_NEW on layout struct operator new overloads that forward to nsPresShell::AllocateByObjectID; r=dholbert
Structs in our style system use an arena-style allocation system,
managed by the presshell to which they belong.  All of the relevant
overloads that forward allocation requests to the presshell declare
themselves as CPP_THROW_NEW, which indicates that they do not throw
exceptions.  The C++ specification states that operator new overloads
that declare themselves to not throw exceptions require a null check on
their return value.  However, the relevant presshell allocation method,
AllocateByObjectID, is infallible and will never return a null pointer.

The callers of all of these methods are therefore doing useless
(compiler-generated) null checks.  Let's get rid of those useless checks
by removing the CPP_THROW_NEW annotations.  This change declares these
methods will return non-null pointers and throw exceptions in case of
errors--but as we don't use exceptions, and AllocateByObjectID will
abort on OOM, everything works out OK.
2016-08-17 15:28:45 -04:00
Wes Kocher
c84ec3b3f3 Merge m-c to inbound, a=merge 2016-08-16 22:06:58 -07:00
Jonathan Chan
4b87f11bd9 Bug 1293739 - Part 1: Rename nsCSSProperty to nsCSSPropertyID. r=dholbert
This patch is generated by the following commands (note: if you're running
using OS X's sed, which accepts slightly different flags, you'll have to
specify an actual backup suffix in -i, or use gsed from Homebrew):

  hg stat -c \
  | cut -c 3-  \
  | tr '\n' '\0' \
  | xargs -0 -P 8 gsed --follow-symlinks 's/\bnsCSSProperty\b/nsCSSPropertyID/g' -i''

Then:

  hg mv layout/style/nsCSSProperty.h layout/style/nsCSSPropertyID.h

... and finally, manually renaming nsCSSProperty in the include guard in
nsCSSProperty.h.

MozReview-Commit-ID: ZV6jyvmLfA

--HG--
rename : layout/style/nsCSSProperty.h => layout/style/nsCSSPropertyID.h
2016-08-16 18:37:48 -07:00
Gregory Szorc
1794619188 Backed out changesets dcdb85fc5517, 702bca0deee2, 9cKX8gC1ATA (bug 1293739) for build bustage; a=bustage
The merge from inbound to central conflicted with the merge from
autoland to central, it appears. Per tree rules, the commit from the
autoland repo wins and the inbound commit gets backed out.

CLOSED TREE

--HG--
extra : amend_source : 927e1cdfa8e55ccbd873d404d905caf6871c8c4f
extra : histedit_source : 07095868c3f767258e1d7d2645193bf4811b13bb%2Ca49ae5a28bf6e67298b6208ee9254c25a2539712
2016-08-16 17:50:40 -07:00
Wes Kocher
48b8d407c8 Merge inbound to central, a=merge
a=release to get around the webidl hook for a comment-only change

--HG--
extra : amend_source : f7e57101e1a25d3cf3536a256898ec2a21c54b38
2016-08-16 17:05:30 -07:00
Wes Kocher
57773cd69e Backed out 4 changesets (bug 1295192) for being a possible cause of crashtest assertions CLOSED TREE
Backed out changeset 7f10779fe019 (bug 1295192)
Backed out changeset e683dce4197a (bug 1295192)
Backed out changeset 67d12eaa8074 (bug 1295192)
Backed out changeset 44f143a01f78 (bug 1295192)
2016-08-16 11:22:04 -07:00
Ting-Yu Lin
151d2fc6c8 Bug 1294628 - Replace block reflow input flags with a bit fields struct. r=dholbert
MozReview-Commit-ID: 2ZSm9hTrsuh

--HG--
extra : rebase_source : 2d44e6c8e1856274d466ed1c523ff6cbf793b4e7
2016-08-12 15:28:45 +08:00
Nathan Froyd
fa4f709cfd Bug 1295192 - part 1 - remove CPP_THROW_NEW on layout struct operator new overloads that forward to nsPresShell::AllocateByObjectID; r=dholbert
Structs in our style system use an arena-style allocation system,
managed by the presshell to which they belong.  All of the relevant
overloads that forward allocation requests to the presshell declare
themselves as CPP_THROW_NEW, which indicates that they do not throw
exceptions.  The C++ specification states that operator new overloads
that declare themselves to not throw exceptions require a null check on
their return value.  However, the relevant presshell allocation method,
AllocateByObjectID, is infallible and will never return a null pointer.

The callers of all of these methods are therefore doing useless
(compiler-generated) null checks.  Let's get rid of those useless checks
by removing the CPP_THROW_NEW annotations.  This change declares these
methods will return non-null pointers and throw exceptions in case of
errors--but as we don't use exceptions, and AllocateByObjectID will
abort on OOM, everything works out OK.
2016-08-16 17:05:39 -04:00
Jonathan Chan
9c62a2c11c Bug 1293739 - Part 1: Rename nsCSSProperty to nsCSSPropertyID. r=dholbert
This patch is generated by the following commands (note: if you're running
using OS X's sed, which accepts slightly different flags, you'll have to
specify an actual backup suffix in -i, or use gsed from Homebrew):

  hg stat -c \
  | cut -c 3-  \
  | tr '\n' '\0' \
  | xargs -0 -P 8 gsed --follow-symlinks 's/\bnsCSSProperty\b/nsCSSPropertyID/g' -i''

Then:

  hg mv layout/style/nsCSSProperty.h layout/style/nsCSSPropertyID.h

... and finally, manually renaming nsCSSProperty in the include guard in
nsCSSProperty.h.

MozReview-Commit-ID: ZV6jyvmLfA

--HG--
rename : layout/style/nsCSSProperty.h => layout/style/nsCSSPropertyID.h
2016-08-09 16:28:19 -07:00
Wes Kocher
2253eb9510 Merge m-c to inbound, a=merge 2016-08-15 14:53:49 -07:00
Wes Kocher
d602abb016 Merge inbound to central, a=merge 2016-08-15 14:20:38 -07:00
Igor
175543fda8 Bug 1293384 - Part 2: Rename Snprintf.h header to Sprintf.h. r=froydnj 2016-08-14 23:43:21 -07:00
Igor
a57972337d Bug 1293384 - Part 1: Rename snprintf_literal to SprintfLiteral. r=froydnj 2016-08-14 23:44:00 -07:00
L. David Baron
44704d92a0 Bug 1294918 - Add helper method nsIFrame::IsFixedPosContainingBlock. r=dholbert
MozReview-Commit-ID: 6Bt1y176lAG

--HG--
extra : rebase_source : df5715d87f794b924c41a049437c530743246808
2016-08-12 18:39:45 -07:00
L. David Baron
6660436867 Bug 1294918 - Fix spelling of method name nsIFrame::IsAbsPosContainingBlock. r=dholbert
This misspelling was introduced in bug 1125767, changeset b9951cca6d1f.

MozReview-Commit-ID: KQNlLelY2Kn

--HG--
extra : rebase_source : 7b2b8379da23b06737b462dd4c316b5758d807a9
2016-08-12 18:39:45 -07:00
Wes Kocher
4aec37ca6e Merge m-c to autoland, a=merge 2016-08-12 16:30:03 -07:00
Wes Kocher
e9097643d5 Merge inbound to central, a=merge 2016-08-12 13:44:29 -07:00
Michael Layzell
aa89e8fd55 Bug 1293001 - Part 1: Change the BinaryName of nsIFrameLoaderOwner::frameLoader (which overloaded another virtual method) to FrameLoaderXPCOM, r=froydnj
MozReview-Commit-ID: Db3z2DP5qba
2016-08-11 15:49:39 -04:00
Jonathan Kew
40d2863267 Bug 1291016 - Track source-string position of possible prefix. r=heycam 2016-08-11 09:08:22 +01:00
Benoit Girard
f9f95c59d4 Bug 1264530 - Hold on to Plugin Instance to survive frame poisoning. r=jimm
MozReview-Commit-ID: JHbce46rDBN
2016-08-10 16:21:01 -04:00
Nicholas Nethercote
8f51d02c97 Bug 1293117 (part 5) - Change many NS_METHOD occurrences to NS_IMETHOD. r=froydnj.
This patch makes the following changes on many in-class methods.

- NS_METHOD F() override;      --> NS_IMETHOD F() override;
- NS_METHOD F() override {...} --> NS_IMETHOD F() override {...}
- NS_METHOD F() final;         --> NS_IMETHOD F() final;
- NS_METHOD F() final {...}    --> NS_IMETHOD F() final {...}

Using NS_IMETHOD is the preferred way of marking in-class virtual methods.
Although these transformations add an explicit |virtual|, they are safe --
there's an implicit |virtual| anyway because |override| and |final| only work
with virtual methods.

--HG--
extra : rebase_source : 3010fade82a170eab7f13d81bf61b02cd693f3cf
2016-08-08 10:54:50 +10:00
Masayuki Nakano
925390facb Bug 1286464 part.11 nsTextFrame::GetCharacterRectsInRange() shouldn't compute character rect at the first character in next nsTextFrame r=jfkthame
nsTextFrame::GetCharacterRectsInRange() handles a character at the end offset of its content as in it. However, it causes odd result when the caller wants first text rect in the next nsTextFrame. E.g., if end of query range is at the next nsTextFrame's first character, currently, it returns the last character as in same line.

So, it should stop handling next frame's first character as in it.

MozReview-Commit-ID: 7WteerisrZp

--HG--
extra : rebase_source : 97653f1ed04a6a03373cd53613d92aba45fbe38b
2016-07-21 16:24:37 +09:00
Masayuki Nakano
e2ec5e1e8a Bug 1257446 part.3 nsTextFrame::GetCharacterRectsInRange() shouldn't call gfxSkipCharsIterator::AdvanceOriginal() before checking if the current offset has already been reached to the end for avoiding assertions r=jfkthame
New eQueryTextRectArray causes a lot of assertions in various automated tests. The cause is that nsTextFrame::GetCharacterRectsInRange() calls gfxSkipCharsIterator::AdvanceOriginal(1) at the end of the |for| loop *without* checking if the iterator has already reached to the end.

MozReview-Commit-ID: 3KFxA11uOUc

--HG--
extra : rebase_source : 407c47897cad8c2e4929ed1226073302faaecee2
2016-07-14 22:02:15 +09:00
Randall Barker
9a3fae864f Bug 1291373 - [geckoview] part 3, Remove MOZ_ANDROID_APZ r=botond,snorp 2016-08-16 14:33:43 -07:00
Pranaydeep Singh
650f2fa5b3 Bug 1293738 - Remove unneeded aWM arg from some FlexboxAxisTracker methods. r=dholbert, r=emilio
--HG--
extra : rebase_source : 526edb1d41155c8fd70abe45473d0bacefd80975
2016-08-12 05:43:06 +05:30
Jimmy Wang
6d8584507f Bug 1261299 - Only update nsClipboard::sSelectionCache in nsSelection.cpp when the selection listener is on the same process as the focused window where the selection occured or became active. r=smaug
MozReview-Commit-ID: KARKdc8G0nI

--HG--
extra : rebase_source : 1a5bc0fcb4ea607c46916df04199fda5161d64ab
2016-08-03 19:08:33 -04:00
Jimmy Wang
a2bf6b970a Bug 1261299 - Update the selection cache on repaint to handle when a pre-existing selection becomes active aka the current selection. r=smaug
MozReview-Commit-ID: HrTQnHd12rg

--HG--
extra : rebase_source : bd727de70576a39da3cd3fab1754330c41add768
2016-07-27 16:05:37 -04:00
Jonathan Kew
76f40e7bdc Bug 1280887 - patch 1 - Declare a bunch of gfxTextRun* variables as const pointers, for clarity. r=mats 2016-07-07 13:51:24 +01:00
Emilio Cobos Álvarez
ddbd14670c Bug 1000957: For single-line flex containers, clamp the flex line to container's min/max cross size. r=dholbert
MozReview-Commit-ID: 9Kqg0lPnkv0
2016-08-10 15:46:35 -07:00
Emilio Cobos Álvarez
15e65891fc Bug 1000957: Whitespace cleanup in nsFlexContainerFrame::Reflow. r=dholbert
MozReview-Commit-ID: 1kGrL6Ji0Rp
2016-08-10 15:46:30 -07:00
Emilio Cobos Álvarez
e456bd1f3c Bug 1000957: Uncomment some flexbox warnings referencing fixed bugs. r=dholbert
MozReview-Commit-ID: COy0I1nm3DU
2016-08-10 15:46:21 -07:00
Carsten "Tomcat" Book
553a2da922 merge mozilla-inbound to mozilla-central a=merge 2016-08-10 15:54:26 +02:00
Sebastian Hengst
6ed5110691 Backed out changeset ff84b85aa1cb (bug 1291667) for asserting at nsRuleNode.cpp:1322 and failing mochitests and reftests. r=backout 2016-08-10 12:59:15 +02:00
Ravi Shankar
049a72eb4c Bug 1291667 - Change NS_STYLE_USER_SELECT_* constants to enum classes; r=Manishearth,heycam
MozReview-Commit-ID: 2qBMmQrtuR9
2016-08-10 13:57:32 +08:00
Nicholas Nethercote
e7f10a07fd Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm.
This patch makes most Run() declarations in subclasses of nsIRunnable have the
same form: |NS_IMETHOD Run() override|.

As a result of these changes, I had to add |override| to a couple of other
functions to satisfy clang's -Winconsistent-missing-override warning.

--HG--
extra : rebase_source : 815d0018b0b13329bb5698c410f500dddcc3ee12
2016-08-08 12:18:10 +10:00