Граф коммитов

522 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez b8950ca8f0 Bug 1428144: Remove some dead nsIFrame code. r=mats
MozReview-Commit-ID: Aaj6XLp3LnA

--HG--
extra : rebase_source : 8c8555f539f29275d570931f0d6bce6817a7d3c3
2018-01-04 20:37:11 +01:00
Mats Palmgren fb3dd87715 Bug 1424528 part 2 - Remove nsDidReflowStatus param in DidReflow declarations (automated change). r=dholbert
MozReview-Commit-ID: 44pchGXzYL7
2017-12-14 16:21:49 +01:00
Ting-Yu Lin 264402226f Bug 1417376 Part 3 - Pass nsPoint parameters by const references instead of values. r=mats
It's good to save some copy constructor calls.

MozReview-Commit-ID: 6TveqwkOvc0

--HG--
extra : rebase_source : 02e678f985c074f6c972cf8478e233aa5e4607db
2017-11-15 17:55:36 +08:00
Mats Palmgren 25cd0c37f7 Bug 1400618 part 1 - Collect NAC / generated content and call DestroyAnonymousContent / UnbindFromTree on those after the frames are destroyed. r=bz
MozReview-Commit-ID: 2trDgeJPw25
2017-11-07 01:20:33 +01:00
Daniel Holbert 680815cd6e Bug 1412346 part 5: (automated patch) Switch a bunch of C++ files in layout to use our standard mode lines. r=jfkthame
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file to use the exact C++ mode lines from the
     Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: EuRsDue63tK

--HG--
extra : rebase_source : 3356d4b80ff6213935192e87cdbc9103fec6084c
2017-10-27 10:33:53 -07:00
Nicholas Nethercote d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
L. David Baron 41e56eef86 Bug 1405875 - Remove old dump/compare regression data methods on frames, and nsIFrameUtil interface and implementation. r=mats
These became unused as a result of the removal of nsRegressionTester and
the removal of the printing debug file mechanism, earlier in this patch
sequence.

MozReview-Commit-ID: 9Tftf2AjpPb
2017-10-05 11:15:57 -07:00
Ting-Yu Lin 35273fdc6c Bug 1341009 - Pass const reference instead of value for nsReflowStatus. r=dholbert
It's good to save a copy constructor call.

Also, make nsBlockFrame::SplitFloat() return void because the only
caller (BlockReflowInput::FlowAndPlaceFloat()) doesn't check its return
value, and (more importantly) because it only ever returns NS_OK.

MozReview-Commit-ID: 9LmDCXd7xGS

--HG--
extra : rebase_source : ea5fb41890c4ca58cd1d7f400a7c1becd66c3fdd
2017-09-13 15:47:51 +08:00
L. David Baron d4c979a87f Bug 1377497 - Pass the correct writing mode to SizeComputationInput::DisplayInitOffsetsEnter. r=jfkthame
This avoids asserting when the writing mode doesn't correspond to the
one stored (DEBUG-only) in aPercentBasis.

MozReview-Commit-ID: KKqms9X17SS
2017-07-07 09:20:56 -07:00
Sebastian Hengst 629ef010df Backed out changeset f07caa23cdbb (bug 1377497) for bustage at layout/generic/ReflowInput.cpp:2543: macro "DISPLAY_INIT_OFFSETS" passed 6 arguments, but takes just 5. r=backout on a CLOSED TREE
--HG--
extra : amend_source : 3666e631a99bdda91c09e2a1237e0e4ab65fdfba
2017-07-07 18:52:50 +02:00
L. David Baron 609b65745d Bug 1377497 - Pass the correct writing mode to SizeComputationInput::DisplayInitOffsetsEnter. r=jfkthame
This avoids asserting when the writing mode doesn't correspond to the
one stored (DEBUG-only) in aPercentBasis.

MozReview-Commit-ID: KKqms9X17SS

--HG--
extra : transplant_source : %0Eh%09F%17%15%0D%D1%D3%DA%9B%85%21z%ED%3Dx%EA%F9%E8
2017-07-07 09:20:56 -07:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Masayuki Nakano 5a78a77b68 Bug 1375825 - part2: ContentEventHandler::ExpandToClusterBoundary() should check the return value of nsTextFrame::PeekOffsetCharacter() r=jfkthame
ContentEventHandler::ExpandToClusterBoundary() doesn't check the return value of nsTextFrame::PeekOffsetCharacter().  Therefore, it may set its result to reversed offset. (e.g., when aForward is true and offset is 6, the result may be 5.  When aForward is false and offset is 5, the result may be 6.)

For avoiding that, ContentEventHandler::ExpandToClusterBoundary() should check the result and only when it returns nsIFrame::FOUND, it should compute the proper offset.

On the other hand, it's too bad for ContentEventHandler that nsTextFrame::PeekOffsetCharacter() to return nsIFrame::CONTINUE_UNSELECTABLE when the user-select style is "all" because IME doesn't expect such cases.

Therefore, this patch adds additional argument to nsIFrame::PeekOffsetCharacter(), aOptions which is a struct containing bool members.  The reason why it's not a bit mask enum is, such struct doesn't cause simple mistake at checking the value and the code is shorter.  When mIgnoreUserStyleAll of it is true, this patch makes nsTextFrame not return nsIFrame::CONTINUE_UNSELECTABLE.

MozReview-Commit-ID: ACNNBTP92YZ

--HG--
extra : rebase_source : bd85da902e7fb59135d15514cb20a5599a4a640b
2017-06-29 10:58:16 +09:00
cku c0d6329f0c Bug 265894 - Part 6. Create symbol frame in nsCSSFrameConstructor. r=heycam
MozReview-Commit-ID: LgO1WKo46Pu

--HG--
extra : rebase_source : 291aaeddb7162bfa69384fb02a8fd9ba16fb59d5
2017-06-14 21:53:34 +08:00
Cameron McCormack 139e81fb2f Bug 1364361 - Part 1: Refactor frame anon box restyling machinery so it can return a list of anon boxes. r=bholley,bz
MozReview-Commit-ID: 3InVAUw8djN
* * *
Bug 1364361 - Followup to address review comment. r=me

MozReview-Commit-ID: IpdoSon9MAj

--HG--
extra : rebase_source : 086c49319d3847099614d65c8bb9d924f4e9be38
2017-06-16 17:22:33 +08:00
Sebastian Hengst 9365133d05 Backed out changeset e7ec499159f7 (bug 1364361) for bustage at nsIFrame.h:3348: bad implicit conversion constructor for 'OwnedAnonBox'. r=backout 2017-06-16 11:19:03 +02:00
Cameron McCormack b76836a0c6 Bug 1364361 - Part 1: Refactor frame anon box restyling machinery so it can return a list of anon boxes. r=bholley,bz
MozReview-Commit-ID: 3InVAUw8djN
* * *
Bug 1364361 - Followup to address review comment. r=me

MozReview-Commit-ID: IpdoSon9MAj

--HG--
extra : rebase_source : 8a6a9b88d678c52be8fa6f64b2664a08634a4a98
2017-06-16 15:32:40 +08:00
Sebastian Hengst fe67a32efc Backed out changeset 12db2d364b64 (bug 1364361) for heap write hazard. r=backout 2017-06-16 09:27:42 +02:00
Cameron McCormack eaf366ae43 Bug 1364361 - Part 1: Refactor frame anon box restyling machinery so it can return a list of anon boxes. r=bholley,bz
MozReview-Commit-ID: 3InVAUw8djN

--HG--
extra : rebase_source : 83d5e20a9ec92a35c015386828b0c53c6c4eaeb5
2017-05-22 13:14:32 +08:00
Alexis Beingessner adb013669b Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel
MozReview-Commit-ID: K1WUIOnvazF
2017-06-13 11:00:10 -04:00
Sebastian Hengst f3bf820bfd Backed out changeset 3d1ce85e6348 (bug 1088760) for bustage, at least on Android at layout/generic/nsPluginFrame.cpp:1612. r=backout 2017-06-13 00:30:03 +02:00
Alexis Beingessner c75211cb95 Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel
MozReview-Commit-ID: K1WUIOnvazF
2017-06-12 17:32:48 -04: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 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
Emilio Cobos Álvarez 23bce99ae1 Bug 1361051: rename mozilla::FrameType to mozilla::LayoutFrameType. r=xidorn
This avoids conflicts with mozilla::dom::FrameType.

MozReview-Commit-ID: 7aEMbHRaTFk

--HG--
extra : rebase_source : 2d01321f5ce0ec8c0e3f70984674f82678034b3c
2017-05-01 19:32:52 +02:00
Emilio Cobos Álvarez e44543aad4 Bug 1360241: Devirtualize nsIFrame::GetType. r=heycam
MozReview-Commit-ID: 5Nzhyta5Hle

--HG--
extra : rebase_source : c2e9d4bfb9239f5e851d110cd7dff98c1e1a8d8b
2017-04-30 17:30:08 +02:00
Eric Rahm 89708e6a2a Bug 1353143 - Part 5: Replace direct usage of PR_LogPrint. r=froydnj
This replaces the usage of |PR_LogPrint| with either |printf_stderr| or
|MOZ_LOG| where appropriate. |printf_stderr| is used where a logger is not
actually available or if log levels are not being used as expected.
2017-04-04 14:36:21 -07:00
Mats Palmgren 896c347cb8 Bug 1348665 part 2 - Remove the ViewProperty and store the nsView* in a field on the relevant frame classes instead. r=tnikkel
The relevant frame classes are:
SubDocumentFrame
ListControlFrame (only when used for (non-e10s?) comboboxes)
PluginFrame
ViewportFrame
MenuPopupFrame

The view is now created in the frame's Init() method, except for
ViewportFrame which has its view assigned by the frame constructor
via a SetView() call.

MozReview-Commit-ID: 4O7Hm1yqwIp
2017-03-21 01:22:13 +01:00
Mats Palmgren 48fe777dbb Bug 1348665 part 1 - Move a few nsView related methods from nsContainerFrame to nsIFrame/nsFrame (idempotent patch). r=dholbert
Views are used for PluginFrame which inherits nsFrame, not nsContainerFrame,
so it's more appropriate that these methods should live in nsIFrame/nsFrame.

MozReview-Commit-ID: 87EgCnkF5YT
2017-03-21 01:22:13 +01:00
Boris Zbarsky 50936b7afe Bug 1343771. Fix stylo to properly update styles on the anonymous block inside a table cell. r=emilio
MozReview-Commit-ID: 8LnPTKVxxVc
2017-03-03 16:14:39 -05:00
Mats Palmgren e8c6fd3388 Bug 1342801 - Store the 'writing-mode' used value on nsIFrame and make GetWritingMode non-virtual. r=jfkthame
MozReview-Commit-ID: HPhuxjDbOdh
2017-02-28 18:58:30 +01:00
Ting-Yu Lin 9c347956ae Bug 775624 Part 1 - Convert nsReflowStatus to a class mimicking uint32_t. r=dholbert
Lay down the foundation for this refactor work so that nsReflowStatus could
be converted to bit-fields piece by piece, and each patch can be built (but
may not pass tests).

This change causes some build warnings, due to some debug logs printing
nsReflowStatus as an integer, but that will be fixed by Part 24 later.

All the operators related to uint32_t will be removed at the end of this
patch series by Part 23.

The yoda conditions are swapped in order to build successfully.

DisplayReflowExit() incorrectly declares aStatus as uint32_t. Change it to
const reference because nsReflowStatus is now a class.

MozReview-Commit-ID: 5DOpaP85ywJ

--HG--
extra : rebase_source : 53ca0750b5f764fcbf7ba2d00c9ec606aed704c2
2017-02-10 17:29:10 +08:00
Tom Tromey 3fc18f2e33 Bug 1060419 - make nsFrame.cpp use VsprintfLiteral, r=froydnj
MozReview-Commit-ID: 8g4E4mLj289

--HG--
extra : rebase_source : e8e8ef49694f8d6a6ff331ab25f5ab1f48ee48d9
2016-12-09 14:03:53 -10:00
Neerja Pancholi 2d0231a9be Bug 1166147 - Part3: Override GetWritingMode() and make it more robustly defer to root element, to avoid truncating printed vertical-WM docs. r=dholbert
MozReview-Commit-ID: IYM3gzf1CpS

--HG--
extra : rebase_source : fa8afc85a6f3139c3c8f296ed3a469a87020a746
2017-01-30 13:22:45 -08:00
Daniel Holbert 1c1b78e4b7 Bug 1331756 part 4: Miscellaneous whitespace cleanup in nsFrame.h - reindent args, rewrap long methods (whitespace-only, no review)
MozReview-Commit-ID: 6zsFJ8om369
2017-01-17 16:27:03 -08:00
Daniel Holbert 835931f57f Bug 1331756 part 3: Remove extra space character between return value & function name, in some nsFrame.h method declarations. (whitespace-only, no review)
MozReview-Commit-ID: ANyG6tB2NJP
2017-01-17 16:27:03 -08:00
Daniel Holbert e9a569a3a8 Bug 1331756 part 2: Drop redundant 'virtual' keyword from nsFrame method overrides. r=xidorn
(This patch creates some mis-indentation issues; I'll fix those up in a
subsequent whitespace-only patch.)

MozReview-Commit-ID: 7gi8kmi8ZAF
2017-01-17 16:27:03 -08:00
Daniel Holbert ec6d60e965 Bug 1331756 part 1: Drop redundant 'virtual' keyword from some macros that declare nsIFrame method overrides. r=xidorn
MozReview-Commit-ID: EjPoyunTLsc
2017-01-17 16:27:02 -08:00
L. David Baron 813fb8c039 Bug 1320815 - Make nsIFrame::IsSelectable non-virtual, and move implementation from nsFrame to nsIFrame. r=xidorn
MozReview-Commit-ID: HphEFug7EbQ

--HG--
extra : rebase_source : 86fe78f54940b1866ab737013658082799e09ef9
2016-11-28 15:31:29 -08:00
Mats Palmgren a6089b50fc Bug 1300369 part 9 - Add a ComputeSizeFlags param to nsFrame::ComputeSizeWithIntrinsicDimensions (idempotent patch). r=dholbert 2016-11-05 02:57:06 +01:00
Mats Palmgren ddb49488f0 Bug 1300369 part 8 - Move nsLayoutUtils::ComputeSizeWithIntrinsicDimensions to a nsFrame method (idempotent patch). r=dholbert 2016-11-05 02:57:06 +01:00
Mats Palmgren e78d14df88 Bug 1300369 part 4 - Refactor all ComputeAutoSize methods to take the full ComputeSizeFlags instead of just a "bool aShrinkWrap" for the eShrinkWrap flag (idempotent patch). r=dholbert 2016-11-05 02:57:06 +01: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
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 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 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
Ting-Yu Lin 154af05659 Bug 1277129 Part 1d - Rename nsCSSOffsetState to SizeComputationInput. 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 nsCSSOffsetState SizeComputationInput

MozReview-Commit-ID: GUJ99qNiSwD

--HG--
extra : rebase_source : cf4e6c35338e1e9d4ee106305548075b2c1bdcb1
2016-07-21 18:36:35 +08:00
Ting-Yu Lin 820f88de49 Bug 1277129 Part 1c - Rename nsHTMLReflowState 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 -e "s/$1/$2/g" "{}" \;
}

rename nsHTMLReflowState ReflowInput

MozReview-Commit-ID: 9r9vdVv1pXc

--HG--
extra : rebase_source : 623ec822996ba0ea0058dd137acf5a658cdea04a
2016-07-21 18:36:35 +08:00
Ting-Yu Lin d444310eb1 Bug 1277129 Part 1b - Rename nsHTMLReflowState.h/cpp to ReflowInput.h/cpp and fix #includes. r=dbaron
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 "nsHTMLReflowState\.h" "mozilla\/ReflowInput\.h"

MozReview-Commit-ID: FjwHA4YRHNv

--HG--
rename : layout/generic/nsHTMLReflowState.cpp => layout/generic/ReflowInput.cpp
rename : layout/generic/nsHTMLReflowState.h => layout/generic/ReflowInput.h
extra : rebase_source : e4215620717df436a51243cee689286cfabc7c71
2016-07-21 18:36:34 +08:00