Commit Graph

12691 Commits

Author SHA1 Message Date
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
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
Matt Woodrow
193414f9a8 Bug 1237102 - Make sure we don't generate invalidations for children of opacity:0 frames, even when plugins are present. r=tnikkel 2016-08-10 15:15:28 +12:00
Ting-Yu Lin
b8899e7e16 Bug 1293604 - Replace NS_STYLE_FLOAT_* with StyleFloat enum class. r=dbaron
MozReview-Commit-ID: 4K6TyIm6cs3

--HG--
extra : rebase_source : b6210815b7c03d5634fdddf8080a3da4e090d194
2016-08-09 17:32:54 +08:00
Phil Ringnalda
cd4986a6d0 Bug 1207914 - Skip test_bug632379.xul on Linux for constant timeouts 2016-08-07 15:26:35 -07:00
Markus Stange
ebb461c874 Bug 1012752 - Snap scrolled area to layer pixels. r=tnikkel
We want the maximum scroll position to be aligned with layer pixels. That way
we don't have to re-rasterize the scrolled contents once scrolling hits the
edge of the scrollable area.

Here's how we determine the maximum scroll position: We get the scroll port
rect, snapped to layer pixels. Then we get the scrolled rect and also snap
that to layer pixels. The maximum scroll position is set to the difference
between right/bottom edges of these rectangles.
Now the scrollable area is computed by adding this maximum scroll position
to the unsnapped scroll port size.
The underlying idea here is: Pretend we have overflow:visible so that the
scrolled contents start at (0, 0) relative to the scroll port and spill over
the scroll port edges. When these contents are rendered, their rendering is
snapped to layer pixels. We want those exact pixels to be accessible by
scrolling.

This way of computing the snapped scrollable area ensures that, if you scroll
to the maximum scroll position, the right/bottom edges of the rendered
scrolled contents line up exactly with the right/bottom edges of the scroll
port. The scrolled contents are neither cut off nor are they moved too far.
(This is something that no other browser engine gets completely right, see the
testcase in bug 1012752.)

There are also a few disadvantages to this solution. We snap to layer pixels,
and the size of a layer pixel can depend on the zoom level, the document
resolution, the current screen's scale factor, and CSS transforms. The snap
origin is the position of the reference frame. So a change to any of these
things can influence the scrollable area and the maximum scroll position.
This patch does not make us adjust the current scroll position in the event
that the maximum scroll position changes such that the current scroll position
would be out of range, unless there's a reflow of the scrolled contents. This
means that we can sometimes render a slightly inconsistent state where the
current scroll position exceeds the maximum scroll position. We can fix this
once it turns out to be a problem; I doubt that it will be a problem because
none of the other browsers seems to prevent this problem either.

The size of the scrollable area is exposed through the DOM properties
scrollWidth and scrollHeight. At the moment, these are integer properties, so
their value is rounded to the nearest CSS pixel. Before this patch, the
returned value would always be within 0.5 CSS pixels of the value that layout
computed for the content's scrollable overflow based on the CSS styles of the
contents.
Now that scrollWidth and scrollHeight also depend on pixel snapping, their
values can deviate by up to one layer pixel from what the page might expect
based on the styles of the contents. This change requires a few changes to
existing tests.
The fact that scrollWidth and scrollHeight can change based on the position of
the scrollable element and the zoom level / resolution may surprise some web
pages. However, this also seems to happen in Edge. Edge seems to always round
scrollWidth and scrollHeight upwards, possibly to their equivalent of layout
device pixels.

MozReview-Commit-ID: 3LFV7Lio4tG

--HG--
extra : rebase_source : 3e4e0b60493397e61283aa1d7fd93d7c197dec29
extra : source : d43c2d5e87f31ff47d7f3ada66c3f5f27cef84a9
2016-08-04 23:51:58 -04:00
Matt Woodrow
bf8a0ba830 Bug 1287122 - Make sure we build nsDisplayOpacity if we need it, since useOpacity already takes svg effects into account. r=dbaron
--HG--
extra : rebase_source : 7a9952fe0ed3a579083bd324002d44ab735d0735
2016-08-05 10:37:46 +12:00
Ravi Shankar
61b118d165 Bug 1291667 - Change NS_STYLE_USER_SELECT_* constants to enum classes; r=heycam,manishearth
MozReview-Commit-ID: IcDt3XYvdlj

--HG--
extra : rebase_source : ea426ac572b6adfc09fd9440e45a0c26adde4373
2016-08-10 21:42:21 +05:30
Emilio Cobos Álvarez
ff065c3a99 Bug 1288938: Allow passing different reasons to dirty a non display SVG text frame. r=heycam
Otherwise, when a glyph changes, we might end up doing too much work, destroying
the text-run and the observer that dirtied the frame, causing an assertion when
trying to delete it from the observer set.

MozReview-Commit-ID: LMQVr6pYFVM
2016-08-03 10:53:37 -07:00
Emilio Cobos Álvarez
e1e6b574d9 Bug 1288938: layout: Move the GlyphObserver to the text run instead of the frame. r=jfkthame
MozReview-Commit-ID: KphTCkcZeid
2016-08-03 10:53:37 -07:00
Tom Schuster
473d3dc22d Bug 1197324 - Fix new warnings. r=froydnj 2016-08-03 14:37:31 +02:00
Jonathan Watt
db80f397f6 Bug 1058040, part 2 - Rename gfxTextContextPaint to SVGContextPaint and add some code comments. r=dholbert 2016-07-22 14:56:09 +01:00
Kartikaya Gupta
ed11c9125a Bug 1241550 - Don't do paint skipping if there are plugin frames anywhere on the page, instead of limiting it to the scrollframe's descendants. r=jimm
MozReview-Commit-ID: 6fzAIrTDgla
2016-08-02 16:43:34 -04:00
David Zbarsky
e0691abc04 Bug 824592 part 3. Get rid of nsIDOMElementCSSInlineStyle. r=peterv 2016-08-02 11:05:38 -07:00
Manish Goregaokar
b756a203ca Bug 1290813 - Correctly number indirect descendants of <ol reversed>; r=xidorn
MozReview-Commit-ID: 6HYtCrgdK13

--HG--
extra : rebase_source : 461d9143cc0775eec2dc6b39f2d13fc5c2fbdf43
2016-08-01 15:54:25 +05:30
Daosheng Mu
994ee1499f Bug 1281215 - Make the outline of SVG container narrows to its children. r=heycam
MozReview-Commit-ID: Ct1mdwmHMw2

--HG--
extra : transplant_source : %FB%8AxsXw%C6Iy%09%9B%AC9%0Da%24%9A%C9%B7%82
2016-07-29 07:35:58 +08:00
Matt Woodrow
e45bc78bff Bug 1282312 - Part 1: Invalidate direct rendering observers for a frame when we schedule a paint due to changes. r=mstange 2016-07-29 17:58:21 +12:00
Wes Kocher
0291de30b7 Backed out changeset 7d6baa38a04c (bug 1288938) for reftest crashes 2016-07-28 22:43:49 -07:00
Emilio Cobos Álvarez
4e30f13399 Bug 1288938: layout: Move the GlyphObserver to the text run instead of the frame. r=jfkthame
MozReview-Commit-ID: KphTCkcZeid
2016-07-28 15:19:14 -07:00
Andi-Bogdan Postelnicu
cb60cc4703 Bug 1282408 - add ignore initialization check flag for bool variables from ScrollReflowInput. r=dbaron
MozReview-Commit-ID: 6IDxHLbSkoJ
2016-07-28 13:57:19 +03:00
Carsten "Tomcat" Book
7293066753 merge mozilla-inbound to mozilla-central a=merge 2016-07-27 16:35:44 +02:00
Ting-Yu Lin
4f426feb17 Bug 1288992 Part 3 - Rename local variables named metrics to reflowOutput. r=dholbert
This patch is edited manually.

MozReview-Commit-ID: 1IsLGrgmDIY

--HG--
extra : rebase_source : 52ad416a2ae56f312976cef6f30a45f03d77c4d1
2016-07-26 17:10:52 +08:00
Ting-Yu Lin
73c4dfa06c Bug 1288992 Part 2 - Rename ReflowMetrics variables to ReflowOutput. r=dholbert
This patch is generated by the following scripts:

function rename() {
find layout\
     -type f\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -r "s/$1/$2/g" "{}" \;
}

rename "([[:alpha:]]*)([rR])eflowMetrics" "\1\2eflowOutput"
rename "gLameReflowOutput" "gLameReflowMetrics"

MozReview-Commit-ID: CBDAau50Ail

--HG--
extra : rebase_source : f6c2358e898e66d8ce2557dea6d7b31d32e3929f
2016-07-26 16:33:52 +08:00
Nicolas Silva
48805c9b3e Bug 1284837 - Disallow implicit conversions from float to integer when creating IntPoint and IntSize objects. r=botond 2016-07-26 16:48:30 +02:00
Manish Goregaokar
52b9ca33f3 Bug 1288383 - Replace NS_STYLE_USER_FOCUS_* with an enum class; r=heycam
MozReview-Commit-ID: A7BYcfsn1tI

--HG--
extra : rebase_source : b893331b173a306143e546f0d403ae25f827fae2
2016-07-25 11:56:40 +05:30
Manish Goregaokar
d78a51cbcc Bug 1288383 - Replace NS_STYLE_FLOAT_EDGE_* with an enum class; r=heycam
MozReview-Commit-ID: FrH5kGWeXkL

--HG--
extra : rebase_source : 73c3446ba07f31f3fbfb6eca304ebe88cccf359a
2016-07-25 11:56:05 +05:30
Tom Tromey
5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Ting-Yu Lin
d77152fcd0 Bug 1277129 Part 7c - Rename various RS variables to RI. r=dbaron
This patch is generated by the following script:

function rename() {
find layout\
     -type f\
     ! -path "./obj*"\
     ! -path "./.git"\
     ! -path "./.hg"\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -r "s/$1/$2/g" "{}" \;
}

rename aChildRS aChildRI
rename aContainingBlockRS aContainingBlockRI
rename aFrameRS aFrameRI
rename aLastRS aLastRI
rename aOuterRS aOuterRI
rename aRS aRI
rename blockHtmlRS blockHtmlRI
rename captionRS captionRI
rename cellRS cellRI
rename childRS childRI
rename firstAncestorRS firstAncestorRI
rename flexContainerRS flexContainerRI
rename gridRS gridRI
rename innerRS innerRI
rename lastButOneRS lastButOneRI
rename LineContainerRS LineContainerRI
rename mBlockRS mBlockRI
rename parentRS parentRI
rename secondAncestorRS secondAncestorRI
rename lastRSSize lastRISize
rename lastRSPadding lastRIPadding

MozReview-Commit-ID: YEgZs3WMow

--HG--
extra : rebase_source : c26050c71a3a5b13ef46e6d3582e581702d49ee8
2016-07-21 18:36:39 +08:00
Ting-Yu Lin
40fcd21b9a Bug 1277129 Part 7b - Rename various ReflowState variables to ReflowInput. r=dbaron
This patch is generated by the following script:

function rename() {
find .\
     -type f\
     ! -path "./obj*"\
     ! -path "./.git"\
     ! -path "./.hg"\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -r "s/$1/$2/g" "{}" \;
}

rename "([[:alpha:]]*)([rR])eflowState(s?)" "\1\2eflowInput\3"

MozReview-Commit-ID: ITFO7uMTkSb

--HG--
extra : rebase_source : c91a2e174a0baec60c1b0111ac7636295004ab35
2016-07-21 18:36:39 +08:00
Ting-Yu Lin
7a5825e82f Bug 1277129 Part 7a - Rename ReflowState to RubyReflowInput in nsRubyBaseContainerFrame. r=dbaron
This is a prerequisite for the mass rename variables whose name
containing ReflowState in the next patch. Otherwise
nsRubyBaseContainerFrame::ReflowInput will conflict with
mozilla::ReflowInput.

MozReview-Commit-ID: KUU51Rjn6z

--HG--
extra : rebase_source : fcb3aefaea40f57e59cc81349b9fcc0f3a88394a
2016-07-21 18:36:38 +08:00
Ting-Yu Lin
55cde36029 Bug 1277129 Part 6b - Rename rendContext to mRenderingContext in SizeComputationInput. r=dbaron
MozReview-Commit-ID: LczLJDtDncy

--HG--
extra : rebase_source : c32e928ae25f94305fb907db89278dce7304a903
2016-07-21 18:36:38 +08:00
Ting-Yu Lin
cd13f0ea71 Bug 1277129 Part 6a - Rename frame to mFrame in SizeComputationInput. r=dbaron
MozReview-Commit-ID: 3SXZ4qEZJc

--HG--
extra : rebase_source : 577d48f047af163585acea95dda311358f5e8c25
2016-07-21 18:36:38 +08:00
Ting-Yu Lin
4053c4c028 Bug 1277129 Part 5c - Rename nsHTMLReflowMetrics to ReflowOutput. r=dbaron
This patch is generated by the following script:

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 "nsHTMLReflowMetrics" "ReflowOutput"

MozReview-Commit-ID: 2HBb7DkooH5

--HG--
extra : rebase_source : acfa442a6483772fcb5748dc6f5e7072e599032a
2016-07-21 18:36:38 +08:00
Ting-Yu Lin
d432242ffc Bug 1277129 Part 5b - Rename nsHTMLReflowMetrics.h/cpp to ReflowOutput.h/cpp and fix #includes. r=dbaron
The modification to nsAbsoluteContainingBlock.h and nsBlockFrame.cpp are
needed to fix the build error due to the file order changed in the unified
build.

The #includes are fixed by the following script:

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 "nsHTMLReflowMetrics\.h" "mozilla\/ReflowOutput\.h"

MozReview-Commit-ID: KWvcG3UtKNn

--HG--
rename : layout/generic/nsHTMLReflowMetrics.cpp => layout/generic/ReflowOutput.cpp
rename : layout/generic/nsHTMLReflowMetrics.h => layout/generic/ReflowOutput.h
extra : rebase_source : dc62fb3ad4d95e732e5985c7ab9f757a0e23abcb
2016-07-21 18:36:37 +08:00
Ting-Yu Lin
6f2f38fcd7 Bug 1277129 Part 5a - Move nsHTMLReflowMetrics into mozilla namespace. r=dbaron
MozReview-Commit-ID: 7xrd1AMd0bz

--HG--
extra : rebase_source : 4faa0b6adc233bb853a8646856dd3dc3e8422566
2016-07-21 18:36:37 +08:00