diff options
author | hiroshige <hiroshige@chromium.org> | 2016-03-25 17:50:09 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-26 00:52:02 +0000 |
commit | a4581858f57e20724f9b8a3166ef9c864f79a758 (patch) | |
tree | e4cd0359bc77080c16949c5f287f939906bb0aff /third_party/WebKit/Source/core/layout/LayoutImage.h | |
parent | a36877470caa77972faf9a1313eba92d8cd67fde (diff) | |
download | chromium_src-a4581858f57e20724f9b8a3166ef9c864f79a758.zip chromium_src-a4581858f57e20724f9b8a3166ef9c864f79a758.tar.gz chromium_src-a4581858f57e20724f9b8a3166ef9c864f79a758.tar.bz2 |
Split ImageResourceClient into ResourceClient and ImageResourceObserver [1/2]
We are planning to move ResourceClient to on-heap, but LayoutObject (an
ImageResourceClient subclass) is hard to move to on-heap.
This series of CLs splits ImageResourceClient into
- ResourceClient (notified via Resource, to be moved to Oilpan heap) and
- ImageResourceObserver (notified via ImageObserver, to remain non-heap)
and makes LayoutObject to be ImageResourceObserver but not ResourceClient.
This is the [1/2] CL that
- Splits ImageResourceClient into ResourceClient and ImageResourceObserver,
- Makes LayoutObject and all of its subclasses (except for LayoutImage and its
subclasses) to be ImageResourceObserver but not ResourceClient.
LayoutImage will be made non-ResourceClient by the [2/2] CL:
https://codereview.chromium.org/1728313003/.
Original CL: https://codereview.chromium.org/1697713002/ by Nate Chapin.
In addition to Nate's original CL (Patch Set 1), this CL:
- Fixes layout test (Patch Set 2).
- Reuses ResourceClientWalker to iterate ImageResourceObserver (Patch Set 3).
- Handles ResourceClient and ImageResourceObserver more similarly (Patch Set 4).
- Renames methods to reflect whether they are for both ResourceClient and
ImageResourceObserver (Patch Set 6).
BUG=587663
Review URL: https://codereview.chromium.org/1706083002
Cr-Commit-Position: refs/heads/master@{#383425}
Diffstat (limited to 'third_party/WebKit/Source/core/layout/LayoutImage.h')
-rw-r--r-- | third_party/WebKit/Source/core/layout/LayoutImage.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/third_party/WebKit/Source/core/layout/LayoutImage.h b/third_party/WebKit/Source/core/layout/LayoutImage.h index b162c7e..c81ed4e 100644 --- a/third_party/WebKit/Source/core/layout/LayoutImage.h +++ b/third_party/WebKit/Source/core/layout/LayoutImage.h @@ -26,6 +26,7 @@ #define LayoutImage_h #include "core/CoreExport.h" +#include "core/fetch/ResourceClient.h" #include "core/layout/LayoutImageResource.h" #include "core/layout/LayoutReplaced.h" @@ -43,7 +44,7 @@ class HTMLMapElement; // // The class is image type agnostic as it only manipulates decoded images. // See LayoutImageResource that holds this image. -class CORE_EXPORT LayoutImage : public LayoutReplaced { +class CORE_EXPORT LayoutImage : public LayoutReplaced, public ResourceClient { public: // These are the paddings to use when displaying either alt text or an image. static const unsigned short paddingWidth = 4; @@ -77,6 +78,7 @@ public: } const char* name() const override { return "LayoutImage"; } + String debugName() const final { return LayoutObject::debugName(); } protected: bool needsPreferredWidthsRecalculation() const final; |