Commit Graph

77 Commits

Author SHA1 Message Date
Tom Tung
dc2648e8f2 Bug 1348050 - Part 3: Mark channel as urgent-start for loading image. r=baku,mayhemer
This part is mainly to mark the channel as urgent-start if src related
attributes in HTMLImageElement and HTMLInputElement is set and the channel is
open due to user interaction. Unfortunately, we cannot just check the event
state just after creating channel since some loading image tasks will be queue
and execute in stable state. Thus, I store the event state in elements and
pass it to the place where create the channel.

MozReview-Commit-ID: GBdAkPfVzsn
2017-04-25 09:17:38 +08:00
Kirk Steuber
9386a2f3e1 Bug 1359556 - Optimize cloneNode by preinitializing attribute and child arrays r=bz
Currently, attribute and child arrays (implemented in dom/base/nsAttrAndChildArray.h) start out empty. When cloning, the array ends up being resized multiple times in order to add the attributes and children that are being cloned from the original node. This would be quicker if the array was initialized to the correct size in the first place so that resizes are not necessary.

However, preallocating space for children is only necessary when performing a deep clone. Therefore, an additional parameter is being added to the Clone, CopyInnerTo, and CloneDocHelper methods to indicate whether preallocation of children should happen. Attributes are copied either way, so that part of the array is preallocated in both cases.

MozReview-Commit-ID: 3iVezeAKXnI
2017-04-20 12:57:48 -07:00
Manish Goregaokar
cbde7ac997 Bug 1330051; Reparse style attribute when adopting across style backends; r=bz
MozReview-Commit-ID: LWN57KApiMu
2017-03-24 15:28:19 -07:00
Boris Zbarsky
d40e452ea9 Bug 656197 part 1. Remove the generic attr preparsing mechanism from BeforeSetAttr and just preparse class attributes directly in the one place that needs to do it. r=smaug
This removes the requirement that BeforeSetAttr comes before AttributeWillChange
(which needs the preparsed new value).

MozReview-Commit-ID: 87C6Mjc7ARh
2017-03-16 14:50:41 -04:00
Manish Goregaokar
be24bd2d60 Bug 1329093 - Part 4: stylo: Delay SVG mapped attr resolution till later; r=bz
MozReview-Commit-ID: 2GvHPg1egjS
2017-03-09 17:46:26 -08:00
Manish Goregaokar
a08e03025a Bug 1334330 - Part 11: stylo: Use ServoUtils abstraction for GenericSpecifiedValues to remove virtual dispatch overhead in nostylo mode; r=bz,emilio
MozReview-Commit-ID: 8yGWs2uOjES
2017-01-26 16:51:01 -08:00
Manish Goregaokar
2d1e54b302 Bug 1334330 - Part 3: stylo: Use GenericSpecifiedValue abstraction in elements using only common mappers; r=bz,emilio
MozReview-Commit-ID: B8vg4ZiqRGK
2017-01-26 16:51:01 -08:00
Manish Goregaokar
7e8e84c24b Bug 1334330 - Part 1: stylo: Abstractify nsMappedAttributes to work on arbitrary containers of specified value data; r=bz,emilio
MozReview-Commit-ID: BSM4TC9RKot
2017-01-26 13:39:13 -08:00
Sylvestre Ledru
500cc2a74a Bug 1336994 - Fix two -Wmax-unsigned-zero warnings (std::max(unsigned int, 0u) r=bz
MozReview-Commit-ID: LX663JqH3lM
2017-02-06 16:06:55 +01:00
Cameron McCormack
5f9911da79 Bug 1328832 - Part 2: Rename mozFlushType to mozilla::FlushType and make it an enum class. r=bzbarsky
MozReview-Commit-ID: D3fIngSHSsl
2017-01-05 15:31:56 +08:00
Edgar Chen
0a3392a555 Bug 1317901 - Ensure image loads don't short-circuit if element's adopting steps are run; r=jdm
MozReview-Commit-ID: Cbg3EHtyL8f
2016-11-18 15:54:21 +08:00
Boris Zbarsky
ab063f5422 Bug 1318576. Remove entries from a form's past names map when an element is removed from the form, even if that element doesn't have a name or id anymore. r=baku 2016-11-21 12:34:02 -05:00
Stone Shih
b921261b1b Bug 1305458 Part1: Rename nsIDOMEventTarget::PreHandleEvent to nsIDOMEventTarget::GetEventTargetParent. r=smaug
MozReview-Commit-ID: FM3vDUyLOCb
2016-10-21 10:11:07 +08:00
Edgar Chen
f1406505a9 Bug 1308069 - Clear pending error event fired by src="" case if src changed before it fired. r=bz
MozReview-Commit-ID: B8f975mZNN9
2016-10-06 12:30:35 +08:00
Josh Matthews
98f135d622 Bug 1307185 - Ensure image loads don't short-circuit if the element changed trees since the last load. r=echen 2016-10-04 13:50:33 -04:00
Edgar Chen
109b9de59f Bug 1306007 - Part 2: Drop the unused arguments of TryCreateResponsiveSelector(); r=jdm
MozReview-Commit-ID: ALvLYaBhP7W
2016-04-16 16:50:02 -04:00
Edgar Chen
eaabbe4dea Bug 1306007 - Part 1: Remove srcset/picture feature control preference; r=jdm,smaug
MozReview-Commit-ID: BsyTHeqiGZL
2016-04-16 18:07:56 -04:00
Josh Matthews
6c12d8cdb2 Bug 1268182 - Allow image loads to short-circuit after selecting a source if the new source URL matches the previous one URL. r=echen 2016-09-26 14:17:38 -04:00
Nicholas Nethercote
1f65390cc9 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.
2016-08-08 12:18:10 +10:00
Jeremy Chen
7f7e952b2b Bug 906116 - part3.3: Replace NS_STYLE_HINT_FRAMECHANGE with nsChangeHint_ReconstructFrame. r=dbaron
Use ReconstructFrame to replace NS_STYLE_HINT_FRAMECHANGE in many places, such
as HTML*Element::GetAttributeChangeHint and HTMLFrameSetElement::SetAttr.

MozReview-Commit-ID: EHbc4RMeuu0
2016-07-06 13:06:14 +08:00
Carsten "Tomcat" Book
de5949e087 Backed out changeset 8c1f9996a7d6 (bug 906116) 2016-07-06 05:40:06 +02:00
Jeremy Chen
7d67fc920f Bug 906116 - part3.3: Replace NS_STYLE_HINT_FRAMECHANGE with nsChangeHint_ReconstructFrame. r=dbaron
Use ReconstructFrame to replace NS_STYLE_HINT_FRAMECHANGE in many places, such
as HTML*Element::GetAttributeChangeHint and HTMLFrameSetElement::SetAttr.

MozReview-Commit-ID: EHbc4RMeuu0
2016-07-06 09:59:56 +08:00
Stone Shih
9d8370d252 Bug 1260704 - Instead of handling mouse up event, we handle mouse click event to trigger links. r=smaug 2016-05-16 15:45:43 +08:00
Thomas Nguyen
95d5e9b396 Bug 1223838 - Fix wrong policy associated with empty string. r=fkiefer,hsivonen
MozReview-Commit-ID: 7kFH39cegmH
2016-05-30 15:17:45 +08:00
Jeremy Chen
e18b390d40 Bug 1273766 - part3: purge NS_UpdateHint inline. r=heycam
MozReview-Commit-ID: IIOT9jq8hOl
2016-05-23 11:26:03 +08:00
Boris Zbarsky
da1b7b9d44 Bug 909633. Remove the HTML Microdata API, since no one else ended up implementing it and now it's been removed from the spec. r=bkelly,jgraham 2016-05-20 23:13:17 -04:00
Thomas Nguyen
4ed2def6a9 Bug 1261298 - W3C referrer policy attribute is not passed to image. r=jdm
MozReview-Commit-ID: 3S642wheFu1
2016-05-11 09:38:05 +08:00
Edgar Chen
8cf4fa9947 Bug 1264467 - Force a reload only when crossOrigin's state is really changed. r=jdm
MozReview-Commit-ID: F0wvy4TkPiQ
2016-04-14 18:53:44 -04:00
Aryeh Gregor
065ff1dee3 Bug 881000 - Reflect img.lowsrc as a URL, not string; r=bz 2016-05-05 21:29:54 +03:00
Kyle Huey
b972c94d0f Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-05-05 01:45:00 -07:00
Edgar Chen
aeed512b76 Bug 1193349 - Part 2: Force a reload only when a source/img is really removed from a picture; r=jdm
MozReview-Commit-ID: 96ui8rQf4uz
2016-04-22 22:36:54 +08:00
Edgar Chen
db0868d04c Bug 1193349 - Part 1: Force a reload only when a source/img is really inserted into a picture; r=jdm
MozReview-Commit-ID: 4FfTwg1nRFO
2016-05-04 10:21:45 +08:00
Carsten "Tomcat" Book
aadd508ffe Backed out changeset 85ce8cb0639a (bug 1268313) 2016-04-29 14:21:16 +02:00
Kyle Huey
e62a0823c9 Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-04-28 14:08:25 -07:00
Josh Matthews
6119192126 Bug 1134194 - Ensure that load events are dispatched for all cases when a responsive source updates. r=johns
MozReview-Commit-ID: DZmJCAIuhQb
2016-01-06 15:40:09 -05:00
Kyle Huey
a9cf047227 Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
Edgar Chen
795f06d105 Bug 1264825 - Fix remaining failures in update-the-source-set.html; r=jdm
MozReview-Commit-ID: CO6z83SS3Nb
2016-03-18 22:16:00 +08:00
Jonathan Watt
d714197cfc Bug 1263782 - Kill off the deprecated nsINode::IsInDoc(). r=baku 2016-03-31 11:58:25 +01:00
Josh Matthews
7dd3fd3633 Bug 1259482 - Ensure that image loads are never dropped on the floor when queued for later. r=johns 2016-03-30 12:39:59 -04:00
Kyle Huey
e95edb30a9 Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Olli Pettay
ac62904551 Bug 1233259, only in-document images should respond to viewport changes, r=mystor 2015-12-18 03:48:47 +02:00
Andrew McCreight
2564b6bce5 Bug 1230110 - HTMLImageElement should call its superclass's DestroyContent(). r=smaug 2015-12-03 14:03:12 -08:00
Wes Kocher
aa5d55b53d Backed out 2 changesets (bug 1230118, bug 1230110) for windows debug assertions in browser_perf-categories-js-calltree.js
Backed out changeset a9ce85f77af9 (bug 1230118)
Backed out changeset b9d8d05aa4ee (bug 1230110)
2015-12-03 15:38:04 -08:00
Andrew McCreight
44d08333b8 Bug 1230110 - HTMLImageElement should call its superclass's DestroyContent(). r=smaug 2015-12-03 14:03:12 -08:00
Bobby Holley
2458093fc1 Bug 773429 - Remove dom.disable_image_src_set. r=khuey 2015-11-23 14:08:34 -08:00
Michael Layzell
2bf048f526 Bug 1166138 - Make img srcset react to resize/viewport changes, r=jdm 2015-11-12 09:39:23 -05:00
Nathan Froyd
4e6d8f6705 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi
2015-10-18 01:24:48 -04:00
Ms2ger
8251e83cfd Bug 1193637 - Use IsMap() in HTMLImageElement::PreHandleEvent; r=mrbkap 2015-09-10 13:49:19 +02:00
Nathan Froyd
fa9b239f05 Bug 968923 - part 5b - add nsIDOMWindowUtils::forceUseCounterFlush; r=bz
Use counter submission normally happens at document destruction.  For
testing use counters, however, we need to have use counters updated in
telemetry at deterministic points.  Therefore, we provide a method on
nsIDOMWindowUtils that forces use counters out to telemetry so we can
examine them.
2015-03-17 15:25:35 -04:00
Robert O'Callahan
e53ead4eb4 Bug 1184842. Allow BeforeSetAttr to preparse aValue. r=peterv
We will pass the preparsed value into AttributeWillChange.
2015-08-01 17:14:06 +12:00