author | Markus Stange <mstange@themasta.com> |
Wed, 14 Aug 2013 13:29:11 +0200 | |
changeset 142633 | 886ac3dd391fded3394e283090066a4a03d34294 |
parent 142632 | 7532cb4b2e4b2605a68bbff860d473b63961eebb |
child 142634 | 63faf921fa5ccd06ae6fb7e72952a7bacb0789b4 |
push id | 25104 |
push user | emorley@mozilla.com |
push date | Thu, 15 Aug 2013 10:56:09 +0000 |
treeherder | mozilla-central@31c08ca022b3 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | roc |
bugs | 904539 |
milestone | 26.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
layout/generic/nsFrame.cpp | file | annotate | diff | comparison | revisions | |
layout/generic/nsIFrame.h | file | annotate | diff | comparison | revisions |
--- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -3532,16 +3532,31 @@ nsIFrame::ContentOffsets nsIFrame::GetCo // to the same visual position? } nsIFrame::ContentOffsets nsFrame::CalcContentOffsetsFromFramePoint(nsPoint aPoint) { return OffsetsForSingleFrame(this, aPoint); } +void +nsIFrame::AssociateImage(const nsStyleImage& aImage, nsPresContext* aPresContext) +{ + if (aImage.GetType() != eStyleImageType_Image) { + return; + } + + imgIRequest *req = aImage.GetImageData(); + mozilla::css::ImageLoader* loader = + aPresContext->Document()->StyleImageLoader(); + + // If this fails there's not much we can do ... + loader->AssociateRequestToFrame(req, this); +} + NS_IMETHODIMP nsFrame::GetCursor(const nsPoint& aPoint, nsIFrame::Cursor& aCursor) { FillCursorInformationFromStyle(StyleUserInterface(), aCursor); if (NS_STYLE_CURSOR_AUTO == aCursor.mCursor) { // If this is editable, I-beam cursor is better for most elements. aCursor.mCursor =
--- a/layout/generic/nsIFrame.h +++ b/layout/generic/nsIFrame.h @@ -25,17 +25,16 @@ #include "nsStyleContext.h" #include "nsStyleStruct.h" #include "nsStyleStructFwd.h" #include "nsHTMLReflowMetrics.h" #include "nsFrameList.h" #include "nsIContent.h" #include "nsAlgorithm.h" #include "mozilla/layout/FrameChildList.h" -#include "mozilla/css/ImageLoader.h" #include "FramePropertyTable.h" #include "mozilla/TypedEnum.h" #include "nsDirection.h" #include <algorithm> #include "nsITheme.h" #ifdef ACCESSIBILITY #include "mozilla/a11y/AccTypes.h" @@ -1361,29 +1360,17 @@ public: virtual ContentOffsets GetContentOffsetsFromPointExternal(nsPoint aPoint, uint32_t aFlags = 0) { return GetContentOffsetsFromPoint(aPoint, aFlags); } /** * Ensure that aImage gets notifed when the underlying image request loads * or animates. */ - void AssociateImage(const nsStyleImage& aImage, nsPresContext* aPresContext) - { - if (aImage.GetType() != eStyleImageType_Image) { - return; - } - - imgIRequest *req = aImage.GetImageData(); - mozilla::css::ImageLoader* loader = - aPresContext->Document()->StyleImageLoader(); - - // If this fails there's not much we can do ... - loader->AssociateRequestToFrame(req, this); - } + void AssociateImage(const nsStyleImage& aImage, nsPresContext* aPresContext); /** * This structure holds information about a cursor. mContainer represents a * loaded image that should be preferred. If it is not possible to use it, or * if it is null, mCursor should be used. */ struct MOZ_STACK_CLASS Cursor { nsCOMPtr<imgIContainer> mContainer;