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

600 Коммитов

Автор SHA1 Сообщение Дата
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
Sylvestre Ledru dc6401042e Bug 1373625 - Silence a -Wunused-lambda-capture warning in nsContainerFrame.cpp r=dholbert
MozReview-Commit-ID: 6PaCykerJHw

--HG--
extra : rebase_source : 1df6744a57536d79cc2e24df19a85f216105f013
2017-06-16 14:08:20 +02: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 d53b7949ed Bug 1367206 - Iterate the frame property list once to collect which child list properties we have. r=jfkthame
MozReview-Commit-ID: BHZTjYP4pJp
2017-06-03 19:25:56 +02:00
Mats Palmgren 6a061ca6cf Bug 1369037 - Make the assertions about NS_FRAME_PART_OF_IBSPLIT stricter and update the associated frame properties in nsContainerFrame::DestroyFrom instead of nsFrame::DestroyFrom. r=jfkthame
MozReview-Commit-ID: G8NQ70xzkQU
2017-05-31 21:29:49 +02:00
Jonathan Kew a8f81efd8e Bug 1365982 - Attach frame properties to each frame instead of looking them up in a hashtable on the prescontext. r=mats
--HG--
rename : layout/base/FramePropertyTable.cpp => layout/base/FrameProperties.cpp
rename : layout/base/FramePropertyTable.h => layout/base/FrameProperties.h
2017-05-27 12:36:00 +01:00
Mats Palmgren 154f4890bf Bug 1362886 part 2 - Devirtualize the IsLeaf() method by doing an array lookup instead. r=jfkthame
MozReview-Commit-ID: 1zm9rFhRVZ3
2017-05-26 12:11:12 +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
Mats Palmgren 9dc89e761d Bug 1350925 part 2 - Assert that we're given clean ReflowOutput overflow areas in ReflowChild. rs=dholbert
MozReview-Commit-ID: 1rRcC76jWxN
2017-04-18 22:35:05 +02:00
Mats Palmgren bf4cac95a4 Bug 1348665 part 5 - Remove the aFrame param to ReparentFrameViewTo and make it a member function instead. r=tnikkel
MozReview-Commit-ID: HStZiMcSOZa
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
Mats Palmgren d13aaf9ce0 Bug 1340771 part 1 - Rename nsWeakFrame to AutoWeakFrame (automated change). r=tn
MozReview-Commit-ID: 8pl4nyeGEkr
2017-03-01 18:03:14 +01:00
Ting-Yu Lin d5c6d28836 Bug 775624 Part 16 - Convert NS_INLINE_IS_BREAK_BEFORE to a method. r=dholbert
MozReview-Commit-ID: 8vxRpqbZNnk

--HG--
extra : rebase_source : 195e2da23d64da9e9a888968a45eaae2e6539585
2017-02-14 16:05:24 +08:00
Ting-Yu Lin 19a2af3275 Bug 775624 Part 11 - Convert NS_MergeReflowStatusInto() to a method. r=dholbert
Also, remove NS_FRAME_TRUNCATED and NS_FRAME_REFLOW_NEXTINFLOW because both
are used only by NS_MergeReflowStatusInto().

MozReview-Commit-ID: LsPOji9j2e

--HG--
extra : rebase_source : 7cf1421c066f0f8df3e8402b84ae0f584cad2d11
2017-02-13 17:15:01 +08:00
Ting-Yu Lin 11579e0ce5 Bug 775624 Part 9 - Convert NS_FRAME_REFLOW_NEXTINFLOW to use bit-field and methods. r=dholbert
MozReview-Commit-ID: 1TXOShK62X8

--HG--
extra : rebase_source : df0b26da3aefc239f11c28ccc746062e88ab86a3
2017-02-13 14:56:45 +08:00
Ting-Yu Lin b7c479e1c2 Bug 775624 Part 8 - Remove NS_FRAME_SET_OVERFLOW_INCOMPLETE. r=dholbert
This patch is written by the help of the following script.

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

rename "NS_FRAME_SET_OVERFLOW_INCOMPLETE\(\*([a-zA-Z0-9.*]*)\)" "\1->SetOverflowIncomplete()"
rename "NS_FRAME_SET_OVERFLOW_INCOMPLETE\(([a-zA-Z0-9.*]*)\)" "\1.SetOverflowIncomplete()"

MozReview-Commit-ID: EJOIs84vwev

--HG--
extra : rebase_source : 59a5ac827f57e7a0e50910f5a813c44560baeb00
2017-02-11 23:18:04 +08:00
Ting-Yu Lin f7a393e947 Bug 775624 Part 5 - Remove NS_FRAME_IS_COMPLETE. r=dholbert
This patch is written by the help of the following script.

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

rename "NS_FRAME_IS_COMPLETE\(([a-zA-Z0-9.*]*)\)" "\1.IsComplete()"

MozReview-Commit-ID: GOd4y2N6dcz

--HG--
extra : rebase_source : aa8b11d3a756c9e7c521e6ffd70713af0174bd98
2017-02-11 22:45:07 +08:00
Ting-Yu Lin 99ebdf6cf3 Bug 775624 Part 4 - Remove NS_FRAME_IS_FULLY_COMPLETE. r=dholbert
This patch is written by the help of the following script.

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

rename "NS_FRAME_IS_FULLY_COMPLETE\(([a-zA-Z0-9.*]*)\)" "\1.IsFullyComplete()"

MozReview-Commit-ID: GOd4y2N6dcz

--HG--
extra : rebase_source : 200639e836cebe26fd77cde21f478fd027e1725f
2017-02-11 22:38:48 +08:00
Timothy Nikkel 4bb75904c6 Bug 1322257. Always position child views in nsContainerFrame::ReflowChild. r=dholbert
If we move the frame then we need to move any descendant views, not just if the frame itself has a view.
2016-12-20 13:49:32 -06:00
Daniel Holbert 10b4c0ba70 Bug 1321387 part 4: Add #includes to some .cpp files in layout/generic, to provide types/definitions used in those files. r=TYLin
These newly-included headers' types are all used directly in the affected files.

MozReview-Commit-ID: 5NEA1QhSJKN

--HG--
extra : rebase_source : 3a9244fcb2a074df1c929de800ddd6cbc1f730e8
2016-11-30 14:51:12 -08:00
Ting-Yu Lin c9cfd878cb Bug 1317588 Part 2 - Remove mozilla::css::Side typedef. r=mats
This patch is written with the help of 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 "css::Side" "Side"

MozReview-Commit-ID: DPV6vivpPUp

--HG--
extra : rebase_source : 9c4f66dc9d2b26c89a4517fba4ff9c5db413411b
2016-11-18 16:28:38 +08:00
Ting-Yu Lin 55e3c801ba Bug 1271549 - Remove details and summary preference. r=bz
Bug 1259889 Part 2 [1] cannot be reverted cleanly, so I manually undo those
changes in this patch. That is, remove the ability for html.css to
invalidate dynamically since it was added specifically for details element.

Although reftest-stylo.list explicit mentions "DO NOT EDIT!", but I still
remove details pref from the file, since it doesn't harm to edit it anyway.

[1] https://hg.mozilla.org/mozilla-central/rev/30aaf3805b56

MozReview-Commit-ID: FsyTGQTxujh

--HG--
extra : rebase_source : 25e5a05a8a5a47642772da69f427631fa07e232d
2016-11-16 14:02:58 +08: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
Daniel Holbert 4c7bd3c17e Bug 1269046 part 5: If an abspos child's offset depends on CSS Box Alignment, ask nsContainerFrame for the alignment enum to use, and align with CSSAlignUtils. r=mats
Right now, this method has only one stub impl, in nsContainerFrame; a later
patch will add a more interesting (overriding) impl in nsFlexContainerFrame.

MozReview-Commit-ID: 3U3vTTX4vdm
2016-10-31 08:58:18 -07:00
Adam Velebil 33caf18ccc Bug 1313565 - Convert NS_STYLE_ORIENT_* to enum class ; r=manishearth,xidorn
MozReview-Commit-ID: LHT6Aa2ojlf

--HG--
extra : rebase_source : cad726aee8e14d7ae60b899a76fcd26edb608507
2016-10-28 06:17:20 +02:00
Emilio Cobos Álvarez 619cb14d87 Bug 1299066: Make NS_STYLE_DISPLAY_* an enum class. Prefer indexing instead of linear search in the frame constructor r=heycam,bz
The main renaming was generated with the following python script:

```

import sys
import re

CAMEL_CASE_REGEX = re.compile(r"(^|_|-)([A-Z])([A-Z]+)")
DISPLAY_REGEX = re.compile(r"\bNS_STYLE_DISPLAY_([^M][A-Z_]+)\b")

def to_camel_case(ident):
  return re.sub(CAMEL_CASE_REGEX,
                lambda m: m.group(2) + m.group(3).lower(), ident)

def constant_to_enum(constant):
  return "StyleDisplay::" + to_camel_case(constant) + ("_" if constant == "NONE" else "")

def process_line(line):
  return re.sub(DISPLAY_REGEX,
                lambda m: constant_to_enum(m.group(1)), line)

lines = []
with open(sys.argv[1], "r") as f:
  for line in f:
    lines.append(process_line(line))

with open(sys.argv[1], "w") as f:
  for line in lines:
    f.write(line)
```

And the following shell commands:

```
find . -name '*.cpp' -exec python display.py {} \;
find . -name '*.h' -exec python display.py {} \;
```

MozReview-Commit-ID: 91xYCbLC2Vf
2016-09-01 20:41:17 -07:00
Mats Palmgren 70a3ff3851 Bug 1171419 part 10 - Rename RenumberLists() to RenumberList(). r=xidorn 2016-09-01 17:36:23 +02:00
Mats Palmgren 0d83513904 Bug 1171419 part 6 - Move nsBlockFrame::AttributeChanged <ol> handling to nsContainerFrame so that it works not just for blocks. r=xidorn 2016-09-01 17:36:22 +02:00
Mats Palmgren a09260b96b Bug 1171419 part 5 - Implement nsContainerFrame::RenumberChildFrames and make RenumberFrameAndDescendants deal with flex/grid containers too. r=xidorn 2016-09-01 17:36:22 +02:00
Mats Palmgren 68fa5f865f Bug 1171419 part 4 - Move nsBlockFrame::RenumberLists to nsContainerFrame and generalize it. r=xidorn 2016-09-01 17:36:22 +02:00
Mats Palmgren 4d1e047ac5 Bug 1171419 part 3 - Override RenumberFrameAndDescendants in nsPlaceholderFrame instead and deal with it there rather than nsContainerFrame. r=xidorn 2016-09-01 17:36:22 +02:00
Mats Palmgren 6e54c147d1 Bug 1171419 part 2 - Remove useless aPresContext param from RenumberLists. r=xidorn 2016-09-01 17:36:22 +02:00
Mats Palmgren caa4e63ee5 Bug 1171419 part 1 - Move some list-item numbering code from nsBlockFrame to nsContainerFrame. r=xidorn
Drop the aPresContext and aBlockFrame params from RenumberListsInBlock
and rename it RenumberChildFrames.  Use 'this' instead of aBlockFrame.
Rename RenumberListsFor to RenumberFrameAndDescendants.
2016-09-01 17:36:22 +02:00
Ravi Shankar 149cb6c819 Bug 1297982 - Replace NS_STYLE_BOX_DECORATION_BREAK_* with enum class; r=xidorn
MozReview-Commit-ID: 9Cli68UpKdz

--HG--
extra : rebase_source : aa43e54c5e5501cbfee29437c5fcfc0216823bd8
2016-08-26 12:44:32 +05:30
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
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 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 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
Mats Palmgren eeceb11ef1 Bug 1278080 - Make nsContainerFrame::RemoveFrame deal with overflow containers. r=dholbert 2016-06-10 02:56:23 +02:00
Mats Palmgren 88e4ba9cfe Bug 1271392 part 3 - Only merge in children from the EOC list that don't already have a prev-in-flow in this frame. r=dholbert 2016-05-18 13:49:33 +02:00
L. David Baron c760cfbbb8 Bug 1053986 - Rename nsIFrame::GetMaxSize to GetXULMaxSize, and related methods. r=dholbert
Written purely with sed, over .h and .cpp files in layout/.

MozReview-Commit-ID: 39fYXMz7kqR
2016-04-20 21:28:31 -07:00
L. David Baron 814003bbcc Bug 1053986 - Rename nsIFrame::GetMinSize to GetXULMinSize, and related methods. r=dholbert
Written purely with sed, over .h and .cpp files in layout/.

MozReview-Commit-ID: Jhe3o3kIOe0
2016-04-20 21:28:31 -07:00
Mats Palmgren d4dfb9f81d Bug 645647 part 4 - Add an 'm' prefix to some members to follow our naming conventions. r=dholbert 2016-04-14 01:32:12 +02:00
Timothy Nikkel 42e0b26d3f Bug 1261698. Make ReparentFrameViewTo return void because it always returns NS_OK. r=mats 2016-04-06 01:26:42 -05:00
Timothy Nikkel d94e6fb6a4 Bug 1261698. Remove comment that is not relevant in nsContainerFrame.cpp.
And one that is very obvious.
2016-04-06 01:26:42 -05:00
Timothy Nikkel 6414e49434 Bug 1261698. Don't descend into child frames looking for views in ReparentFrameViewTo if the frame doesn't have the NS_FRAME_HAS_CHILD_WITH_VIEW bit set. r=mats 2016-04-06 01:26:41 -05:00