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

27 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 039592f4d8 Bug 1682003 - Avoid UTF-8 -> UTF-16 conversion during CSSOM serialization. r=heycam
This lifts a bunch of string conversions higher up the stack, but allows
us to make the servo code use utf-8 unconditionally, and seemed faster
in my benchmarking (see comment 0).

It should also make a bunch of attribute setters faster too (like
setting .cssText), now that we use UTF8String for them (we couldn't
because we couldn't specify different string types for the getter and
setters).

Differential Revision: https://phabricator.services.mozilla.com/D99590
2020-12-17 14:04:35 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Simon Giesecke d39b639f56 Bug 1652942 - Remove some unnecessary includes of Element.h. r=smaug
Depends on D83632

Differential Revision: https://phabricator.services.mozilla.com/D83633
2020-07-15 13:55:24 +00:00
Emilio Cobos Álvarez bc36653df5 Bug 1449861 - Use UTF8String for some CSSOM APIs. r=bzbarsky
In particular, the ones where we transcode unconditionally atm (property names
and such).

There are others like cssText getters and setters which are a bit harder,
because I either need to rewrite all our serialization code to work with UTF8
(which is fine, but a lot of work), or teach webidl to have a setter that takes
UTF8String as input but returns DOMString as output (which is at best hacky).

Differential Revision: https://phabricator.services.mozilla.com/D58631

--HG--
extra : moz-landing-system : lando
2020-01-04 10:36:49 +00:00
Daisuke Akatsuka c6a47f400c Bug 1571650: Add an API to change the style of AnonymousContent from devtools. r=smaug
DevTools is using AnonymousContent to highlight the element inspecting.
And now, the z-order of highlighting became to be importance. In case of normal
element, we can change the z-order by z-index or order of DOM. However,
AnonymousContent does not have the such the way to change the z-order from
DevTools side. This patch introduces an API to change the style, and makes the
z-order changeable by the z-index.

Differential Revision: https://phabricator.services.mozilla.com/D41927

--HG--
extra : moz-landing-system : lando
2019-08-16 07:38:39 +00:00
Ciure Andrei c8c4bf08bf Backed out 4 changesets (bug 1571650) for AddressSanitizer failures CLOSED TREE
Backed out changeset 9c93a75bc692 (bug 1571650)
Backed out changeset 9f62e449f9ca (bug 1571650)
Backed out changeset 48438a9d64f1 (bug 1571650)
Backed out changeset eaef1d403d31 (bug 1571650)
2019-08-14 18:51:36 +03:00
Daisuke Akatsuka cbfbede5a3 Bug 1571650: Add an API to change the style of AnonymousContent from devtools. r=smaug
DevTools is using AnonymousContent to highlight the element inspecting.
And now, the z-order of highlighting became to be importance. In case of normal
element, we can change the z-order by z-index or order of DOM. However,
AnonymousContent does not have the such the way to change the z-order from
DevTools side. This patch introduces an API to change the style, and makes the
z-order changeable by the z-index.

Differential Revision: https://phabricator.services.mozilla.com/D41927

--HG--
extra : moz-landing-system : lando
2019-08-14 09:39:54 +00:00
Olli Pettay ab42137d71 Bug 1538794, add AnonymousContent.getTargetIdForEvent to be able to detect the event target in anonymous content, r=baku
Differential Revision: https://phabricator.services.mozilla.com//D24955

--HG--
extra : rebase_source : 85fd7443f018b0733826f316e3d79eaa93bac02d
extra : amend_source : c330a92b8c237c6464afb279ef9ffe69e4ce3baa
2019-03-26 21:40:29 +02:00
Emilio Cobos Álvarez d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
"Emilio Cobos Álvarez" f3d30ca484 Bug 1472020 - Make AccessibleCaret a bit saner. r=bz,TYLin
Avoid processing anon content in nsCanvasFrame, then getting more anon content
via AccessibleCaretEventHub::Init. Instead call Init before creating the custom
content container. We could also throw a script runner at it I guess, but this
prevents the reentrancy issue.

Avoid cloning nodes during layout, just use the same node (already cloned in
InsertAnonymousContent) instead.

The RemoveChild in GetAnonymousContent to handle the reframes instead of cloning
around is a bit hacky, but I don't think it's really worth extending
PostDestroyData for this special case.

Differential Revision: https://phabricator.services.mozilla.com/D1889
2018-08-13 11:56:48 +02:00
Kris Maglione 4275cd1039 Bug 1406278: Part 1 - Pass subject principal to SetAttribute and friends. r=bz
In order to tailor certain security checks to the caller that is attempting to
load a particular piece of content, we need to be able to attach an
appropriate triggering principal to the corresponding requests. Since most
HTML content is loaded based on attribute values, that means capturing the
subject principal of the caller who sets those attributes, which means making
it available to AfterSetAttr hooks.

MozReview-Commit-ID: BMDL2Uepg0X

--HG--
extra : rebase_source : 25e438c243700a9368c393e40e3a6002d968d6c8
2017-10-09 14:33:38 -07:00
Cameron McCormack 0c4867b06c Bug 1346623 - Part 2: Add an API to get computed style values through an AnonymousContent object. r=bholley
MozReview-Commit-ID: Dbvuk16CjFT

--HG--
extra : rebase_source : 2c40e4cd9ce08d6f2a5feb13293cc151de6deb80
2017-03-16 22:46:43 +08:00
Carsten "Tomcat" Book 1c400b7ed3 Backed out changeset 39ee9556d4a0 (bug 1346623) 2017-03-17 08:18:53 +01:00
Cameron McCormack d47e6354c6 Bug 1346623 - Part 2: Add an API to get computed style values through an AnonymousContent object. r=bholley
MozReview-Commit-ID: Dbvuk16CjFT

--HG--
extra : rebase_source : 2c40e4cd9ce08d6f2a5feb13293cc151de6deb80
2017-03-16 22:46:43 +08:00
Markus Stange bf8d999061 Bug 1302551 - Add AnonymousContent::SetCutoutRectsForElement to allow a more efficient find bar highlighter implementation. r=smaug
This part just sets a cutoutregion property on the element node and schedules a paint.
The next part will check for that property and create a display item for the element
in question.

MozReview-Commit-ID: EbPr8it5Lpw
2016-09-15 14:58:15 -04:00
Mike de Boer 3e295e6280 Bug 1290914 - support Element.animate() on AnonymousContent nodes through the AnonymousContent.setAnimationForElement() method. r=bz
MozReview-Commit-ID: 39QPaCea7Dx
2016-09-08 22:38:53 +02:00
Ting-Yu Lin 02f58e267d Bug 1292904 Part 1 - Use element id to get caret child element. r=mtseng
The children of the caret element already have unique class name like
"image" or "bar", we could change the class name to be id, and use id to
locate them.

MozReview-Commit-ID: HLZecyAEYXv

--HG--
extra : rebase_source : 04b59a4d639ad45d2b564f48de15c2f23752fdaf
2016-08-18 15:09:19 +08:00
Aryeh Gregor 931f67e573 Bug 1193762 part 6 - Return raw pointer, not nsCOMPtr; r=froydnj
This could alternatively have been fixed by changing
AccessibleCaret::CaretElement to return an nsCOMPtr instead of a raw
pointer, but I chose to change this in the other direction instead, to
match the accepted convention.
2016-05-01 21:29:23 +03:00
Matteo Ferretti a4a5938dc3 Bug 1212477 - Needs a way to access to <canvas>'s context (2d, webgl) from Anonymous Content API; r=roc;r=smaug 2015-11-15 14:48:32 +01:00
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Andrew McCreight 9e8f4b219e Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Ehsan Akhgari 883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Boris Zbarsky d0ebde3bb7 Bug 1117172 part 2. Change the non-wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, Codegen.py, and
StructuredClone.cpp.  The rest of this diff was generated by running the following commands:

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/WrapObject\((JSContext *\* *(?:aCx|cx)),(\s*)(JS::MutableHandle<JSObject\*> aReflector)/WrapObject(\1,\2JS::Handle<JSObject*> aGivenProto,\2\3/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx)), this, aReflector/\1, this, aGivenProto, aReflector/'
2015-03-19 10:13:32 -04:00
Peter Van der Beken dc3a33aa88 Bug 1096328 - Remove nativeOwnership from Bindings.conf, make rooting analysis happy. r=bz.
--HG--
extra : rebase_source : 54a1e408aec6c7485152f18693047b2992251aff
2015-01-08 22:56:42 +01:00
Patrick Brosset 159aa067df Bug 1020244 - Ability to insert AnonymousContent nodes in the canvasFrame via a chrome-only Document API; r=smaug; r=roc; r=ehsan 2014-10-28 11:15:25 +01:00
Patrick Brosset f510bc6ce1 Bug 1020244 - AnonymousContent API and implementation; r=smaug 2014-10-28 11:15:21 +01:00