|
|
DescriptionPhase II Step 2: Remove setIsPlaceholder() in updateImage()
Design doc:
https://docs.google.com/document/d/1O-fB83mrE0B_V8gzXNqHgmRLCvstTB4MMi3RnVLr8bE/edit#heading=h.1rxkos5samv7
Previsouly, |m_isPlaceholder| is cleared in updateImage(), if:
- isEntireResource() is true, AND
- (1) The HTTP status code is not 4XX or 5XX OR
(2) the response has no DecodeError,
to prevent creating of placeholder and reloading.
However, this causes timing and code dependencies from
ImageResourceContent::updateImage()
to |ImageResource::m_isPlaceholder|
and ImageResource::reloadIfLoFiOrPlaceholderImage().
This CL removes the dependencies and thus
ImageResourceInfo::setIsPlaceholder(),
by making |ImageResource::m_isPlaceholder| a tri-state enum
(renamed as |ImageResource::placeholderOption|):
- DoNotReloadPlaceholder (previously m_isPlaceholder == false)
- ReloadPlaceholderOnDecodeError (new state)
- ShowAndReloadPlaceholderAlways (previously m_isPlaceholder == true)
and setting it when receiving ResourceResponse.
This CL preserves the behavior of a placeholder ImageResource:
If isEntireResource() && (1):
Behavior: Placeholder is not created && !shouldReloadBrokenPlaceholder().
Previously: because |m_isPlaceholder| is cleared in updateImage().
Now: because |m_placeholderOption| is set to |DoNotReloadPlaceholder|.
If isEntireResource() && not (1) && (2):
Behavior: Placeholder is not created && !shouldReloadBrokenPlaceholder().
Previously: because |m_isPlaceholder| is cleared in updateImage().
Now: because |m_placeholderOption| is set to |ReloadPlaceholderOnDecodeError|
and DecodeError does NOT occur because (2) is true.
If isEntireResource() && not (1) && not (2):
Behavior: Placeholder is not created && shouldReloadBrokenPlaceholder().
Previously: because updateImage() creates placeholder only if (2) is true
and |m_isPlaceholder| is NOT cleared in updateImage().
Now: because |m_placeholderOption| is set to |ReloadPlaceholderOnDecodeError|
and DecodeError does occur because (2) is false.
Otherwise:
Not affected.
BUG=667641, 677188
Review-Url: https://codereview.chromium.org/2650113002
Cr-Commit-Position: refs/heads/master@{#455282}
Committed: https://chromium.googlesource.com/chromium/src/+/810f7ecd76b0aba74f0a215dbd00b8e8cc5705ba
Patch Set 1 #Patch Set 2 : fix #Patch Set 3 : Rebase #Patch Set 4 : Rebase #Patch Set 5 : Rebase #Patch Set 6 : Rebase #Patch Set 7 : Rebase #Patch Set 8 : compile fix #
Total comments: 4
Patch Set 9 : Rebase #Patch Set 10 : Reflect yhirano comments #Patch Set 11 : Rebase #Patch Set 12 : Rebase. #
Dependent Patchsets: Messages
Total messages: 51 (42 generated)
Description was changed from ========== Remove timing dependencies around ImageResourceInfo::setIsPlaceholder() BUG= ========== to ========== Remove timing dependencies around ImageResourceInfo::setIsPlaceholder() Previsouly, |m_isPlaceholder| is cleared in updateImage(), if: - isEntireResource() is true, AND - (1) The HTTP status code is not 4XX or 5XX OR (2) the response has no DecodeError, to prevent creating of placeholder and reloading. However, this causes timing and code dependencies from ImageResourceContent::updateImage() to |ImageResource::m_isPlaceholder| and ImageResource::reloadIfLoFiOrPlaceholderImage(). This CL makes |ImageResource::m_isPlaceholder| a tri-state enum (renamed as |ImageResource::placeholderOption|: - DoNotReloadPlaceholder (previously m_isPlaceholder == false) - ReloadPlaceholderOnDecodeError (new state) - ShowAndReloadPlaceholderAlways (previously m_isPlaceholder == true) and set it when receiving ResourceResponse, to remove these dependencies. This CL preserves the behavior of placeholder ImageResource: If isEntireResource() && (1): Behavior: Placeholder is not created && !shouldReloadBrokenPlaceholder(). Previously: because |m_isPlaceholder| is cleared in updateImage(). Now: because |m_placeholderOption| is set to |DoNotReloadPlaceholder|. If isEntireResource() && not (1) && (2): Behavior: Placeholder is not created && !shouldReloadBrokenPlaceholder(). Previously: because |m_isPlaceholder| is cleared in updateImage(). Now: because |m_placeholderOption| is set to |ReloadPlaceholderOnDecodeError| and DecodeError does NOT occur because (2) is true. If isEntireResource() && not (1) && not (2): Behavior: Placeholder is not created && shouldReloadBrokenPlaceholder(). Previously: because updateImage() creates placeholder only if (2) is true and |m_isPlaceholder| is NOT cleared in updateImage(). Now: because |m_placeholderOption| is set to |ReloadPlaceholderOnDecodeError| and DecodeError does occur because (2) is false. This CL doesn't affect the behavior when |isPlaceholder| is false or isEntireResource() is false. BUG=667641, 677188 ==========
Description was changed from ========== Remove timing dependencies around ImageResourceInfo::setIsPlaceholder() Previsouly, |m_isPlaceholder| is cleared in updateImage(), if: - isEntireResource() is true, AND - (1) The HTTP status code is not 4XX or 5XX OR (2) the response has no DecodeError, to prevent creating of placeholder and reloading. However, this causes timing and code dependencies from ImageResourceContent::updateImage() to |ImageResource::m_isPlaceholder| and ImageResource::reloadIfLoFiOrPlaceholderImage(). This CL makes |ImageResource::m_isPlaceholder| a tri-state enum (renamed as |ImageResource::placeholderOption|: - DoNotReloadPlaceholder (previously m_isPlaceholder == false) - ReloadPlaceholderOnDecodeError (new state) - ShowAndReloadPlaceholderAlways (previously m_isPlaceholder == true) and set it when receiving ResourceResponse, to remove these dependencies. This CL preserves the behavior of placeholder ImageResource: If isEntireResource() && (1): Behavior: Placeholder is not created && !shouldReloadBrokenPlaceholder(). Previously: because |m_isPlaceholder| is cleared in updateImage(). Now: because |m_placeholderOption| is set to |DoNotReloadPlaceholder|. If isEntireResource() && not (1) && (2): Behavior: Placeholder is not created && !shouldReloadBrokenPlaceholder(). Previously: because |m_isPlaceholder| is cleared in updateImage(). Now: because |m_placeholderOption| is set to |ReloadPlaceholderOnDecodeError| and DecodeError does NOT occur because (2) is true. If isEntireResource() && not (1) && not (2): Behavior: Placeholder is not created && shouldReloadBrokenPlaceholder(). Previously: because updateImage() creates placeholder only if (2) is true and |m_isPlaceholder| is NOT cleared in updateImage(). Now: because |m_placeholderOption| is set to |ReloadPlaceholderOnDecodeError| and DecodeError does occur because (2) is false. This CL doesn't affect the behavior when |isPlaceholder| is false or isEntireResource() is false. BUG=667641, 677188 ========== to ========== Phase II Step 2: Remove setIsPlaceholder() in updateImage() Previsouly, |m_isPlaceholder| is cleared in updateImage(), if: - isEntireResource() is true, AND - (1) The HTTP status code is not 4XX or 5XX OR (2) the response has no DecodeError, to prevent creating of placeholder and reloading. However, this causes timing and code dependencies from ImageResourceContent::updateImage() to |ImageResource::m_isPlaceholder| and ImageResource::reloadIfLoFiOrPlaceholderImage(). This CL makes |ImageResource::m_isPlaceholder| a tri-state enum (renamed as |ImageResource::placeholderOption|: - DoNotReloadPlaceholder (previously m_isPlaceholder == false) - ReloadPlaceholderOnDecodeError (new state) - ShowAndReloadPlaceholderAlways (previously m_isPlaceholder == true) and set it when receiving ResourceResponse, to remove these dependencies. This CL preserves the behavior of placeholder ImageResource: If isEntireResource() && (1): Behavior: Placeholder is not created && !shouldReloadBrokenPlaceholder(). Previously: because |m_isPlaceholder| is cleared in updateImage(). Now: because |m_placeholderOption| is set to |DoNotReloadPlaceholder|. If isEntireResource() && not (1) && (2): Behavior: Placeholder is not created && !shouldReloadBrokenPlaceholder(). Previously: because |m_isPlaceholder| is cleared in updateImage(). Now: because |m_placeholderOption| is set to |ReloadPlaceholderOnDecodeError| and DecodeError does NOT occur because (2) is true. If isEntireResource() && not (1) && not (2): Behavior: Placeholder is not created && shouldReloadBrokenPlaceholder(). Previously: because updateImage() creates placeholder only if (2) is true and |m_isPlaceholder| is NOT cleared in updateImage(). Now: because |m_placeholderOption| is set to |ReloadPlaceholderOnDecodeError| and DecodeError does occur because (2) is false. This CL doesn't affect the behavior when |isPlaceholder| is false or isEntireResource() is false. BUG=667641, 677188 ==========
The CQ bit was checked by hiroshige@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_compile_dbg on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_comp...)
The CQ bit was checked by hiroshige@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_compile_dbg on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_comp...)
Description was changed from ========== Phase II Step 2: Remove setIsPlaceholder() in updateImage() Previsouly, |m_isPlaceholder| is cleared in updateImage(), if: - isEntireResource() is true, AND - (1) The HTTP status code is not 4XX or 5XX OR (2) the response has no DecodeError, to prevent creating of placeholder and reloading. However, this causes timing and code dependencies from ImageResourceContent::updateImage() to |ImageResource::m_isPlaceholder| and ImageResource::reloadIfLoFiOrPlaceholderImage(). This CL makes |ImageResource::m_isPlaceholder| a tri-state enum (renamed as |ImageResource::placeholderOption|: - DoNotReloadPlaceholder (previously m_isPlaceholder == false) - ReloadPlaceholderOnDecodeError (new state) - ShowAndReloadPlaceholderAlways (previously m_isPlaceholder == true) and set it when receiving ResourceResponse, to remove these dependencies. This CL preserves the behavior of placeholder ImageResource: If isEntireResource() && (1): Behavior: Placeholder is not created && !shouldReloadBrokenPlaceholder(). Previously: because |m_isPlaceholder| is cleared in updateImage(). Now: because |m_placeholderOption| is set to |DoNotReloadPlaceholder|. If isEntireResource() && not (1) && (2): Behavior: Placeholder is not created && !shouldReloadBrokenPlaceholder(). Previously: because |m_isPlaceholder| is cleared in updateImage(). Now: because |m_placeholderOption| is set to |ReloadPlaceholderOnDecodeError| and DecodeError does NOT occur because (2) is true. If isEntireResource() && not (1) && not (2): Behavior: Placeholder is not created && shouldReloadBrokenPlaceholder(). Previously: because updateImage() creates placeholder only if (2) is true and |m_isPlaceholder| is NOT cleared in updateImage(). Now: because |m_placeholderOption| is set to |ReloadPlaceholderOnDecodeError| and DecodeError does occur because (2) is false. This CL doesn't affect the behavior when |isPlaceholder| is false or isEntireResource() is false. BUG=667641, 677188 ========== to ========== Phase II Step 2: Remove setIsPlaceholder() in updateImage() Design doc: https://docs.google.com/document/d/1O-fB83mrE0B_V8gzXNqHgmRLCvstTB4MMi3RnVLr8... Previsouly, |m_isPlaceholder| is cleared in updateImage(), if: - isEntireResource() is true, AND - (1) The HTTP status code is not 4XX or 5XX OR (2) the response has no DecodeError, to prevent creating of placeholder and reloading. However, this causes timing and code dependencies from ImageResourceContent::updateImage() to |ImageResource::m_isPlaceholder| and ImageResource::reloadIfLoFiOrPlaceholderImage(). This CL makes |ImageResource::m_isPlaceholder| a tri-state enum (renamed as |ImageResource::placeholderOption|: - DoNotReloadPlaceholder (previously m_isPlaceholder == false) - ReloadPlaceholderOnDecodeError (new state) - ShowAndReloadPlaceholderAlways (previously m_isPlaceholder == true) and set it when receiving ResourceResponse, to remove these dependencies. This CL preserves the behavior of placeholder ImageResource: If isEntireResource() && (1): Behavior: Placeholder is not created && !shouldReloadBrokenPlaceholder(). Previously: because |m_isPlaceholder| is cleared in updateImage(). Now: because |m_placeholderOption| is set to |DoNotReloadPlaceholder|. If isEntireResource() && not (1) && (2): Behavior: Placeholder is not created && !shouldReloadBrokenPlaceholder(). Previously: because |m_isPlaceholder| is cleared in updateImage(). Now: because |m_placeholderOption| is set to |ReloadPlaceholderOnDecodeError| and DecodeError does NOT occur because (2) is true. If isEntireResource() && not (1) && not (2): Behavior: Placeholder is not created && shouldReloadBrokenPlaceholder(). Previously: because updateImage() creates placeholder only if (2) is true and |m_isPlaceholder| is NOT cleared in updateImage(). Now: because |m_placeholderOption| is set to |ReloadPlaceholderOnDecodeError| and DecodeError does occur because (2) is false. This CL doesn't affect the behavior when |isPlaceholder| is false or isEntireResource() is false. BUG=667641, 677188 ==========
Description was changed from ========== Phase II Step 2: Remove setIsPlaceholder() in updateImage() Design doc: https://docs.google.com/document/d/1O-fB83mrE0B_V8gzXNqHgmRLCvstTB4MMi3RnVLr8... Previsouly, |m_isPlaceholder| is cleared in updateImage(), if: - isEntireResource() is true, AND - (1) The HTTP status code is not 4XX or 5XX OR (2) the response has no DecodeError, to prevent creating of placeholder and reloading. However, this causes timing and code dependencies from ImageResourceContent::updateImage() to |ImageResource::m_isPlaceholder| and ImageResource::reloadIfLoFiOrPlaceholderImage(). This CL makes |ImageResource::m_isPlaceholder| a tri-state enum (renamed as |ImageResource::placeholderOption|: - DoNotReloadPlaceholder (previously m_isPlaceholder == false) - ReloadPlaceholderOnDecodeError (new state) - ShowAndReloadPlaceholderAlways (previously m_isPlaceholder == true) and set it when receiving ResourceResponse, to remove these dependencies. This CL preserves the behavior of placeholder ImageResource: If isEntireResource() && (1): Behavior: Placeholder is not created && !shouldReloadBrokenPlaceholder(). Previously: because |m_isPlaceholder| is cleared in updateImage(). Now: because |m_placeholderOption| is set to |DoNotReloadPlaceholder|. If isEntireResource() && not (1) && (2): Behavior: Placeholder is not created && !shouldReloadBrokenPlaceholder(). Previously: because |m_isPlaceholder| is cleared in updateImage(). Now: because |m_placeholderOption| is set to |ReloadPlaceholderOnDecodeError| and DecodeError does NOT occur because (2) is true. If isEntireResource() && not (1) && not (2): Behavior: Placeholder is not created && shouldReloadBrokenPlaceholder(). Previously: because updateImage() creates placeholder only if (2) is true and |m_isPlaceholder| is NOT cleared in updateImage(). Now: because |m_placeholderOption| is set to |ReloadPlaceholderOnDecodeError| and DecodeError does occur because (2) is false. This CL doesn't affect the behavior when |isPlaceholder| is false or isEntireResource() is false. BUG=667641, 677188 ========== to ========== Phase II Step 2: Remove setIsPlaceholder() in updateImage() Design doc: https://docs.google.com/document/d/1O-fB83mrE0B_V8gzXNqHgmRLCvstTB4MMi3RnVLr8... Previsouly, |m_isPlaceholder| is cleared in updateImage(), if: - isEntireResource() is true, AND - (1) The HTTP status code is not 4XX or 5XX OR (2) the response has no DecodeError, to prevent creating of placeholder and reloading. However, this causes timing and code dependencies from ImageResourceContent::updateImage() to |ImageResource::m_isPlaceholder| and ImageResource::reloadIfLoFiOrPlaceholderImage(). This CL removes the dependencies and thus ImageResourceInfo::setIsPlaceholder(), by making |ImageResource::m_isPlaceholder| a tri-state enum (renamed as |ImageResource::placeholderOption|): - DoNotReloadPlaceholder (previously m_isPlaceholder == false) - ReloadPlaceholderOnDecodeError (new state) - ShowAndReloadPlaceholderAlways (previously m_isPlaceholder == true) and setting it when receiving ResourceResponse. This CL preserves the behavior of a placeholder ImageResource: If isEntireResource() && (1): Behavior: Placeholder is not created && !shouldReloadBrokenPlaceholder(). Previously: because |m_isPlaceholder| is cleared in updateImage(). Now: because |m_placeholderOption| is set to |DoNotReloadPlaceholder|. If isEntireResource() && not (1) && (2): Behavior: Placeholder is not created && !shouldReloadBrokenPlaceholder(). Previously: because |m_isPlaceholder| is cleared in updateImage(). Now: because |m_placeholderOption| is set to |ReloadPlaceholderOnDecodeError| and DecodeError does NOT occur because (2) is true. If isEntireResource() && not (1) && not (2): Behavior: Placeholder is not created && shouldReloadBrokenPlaceholder(). Previously: because updateImage() creates placeholder only if (2) is true and |m_isPlaceholder| is NOT cleared in updateImage(). Now: because |m_placeholderOption| is set to |ReloadPlaceholderOnDecodeError| and DecodeError does occur because (2) is false. Otherwise: Not affected. BUG=667641, 677188 ==========
Description was changed from ========== Phase II Step 2: Remove setIsPlaceholder() in updateImage() Design doc: https://docs.google.com/document/d/1O-fB83mrE0B_V8gzXNqHgmRLCvstTB4MMi3RnVLr8... Previsouly, |m_isPlaceholder| is cleared in updateImage(), if: - isEntireResource() is true, AND - (1) The HTTP status code is not 4XX or 5XX OR (2) the response has no DecodeError, to prevent creating of placeholder and reloading. However, this causes timing and code dependencies from ImageResourceContent::updateImage() to |ImageResource::m_isPlaceholder| and ImageResource::reloadIfLoFiOrPlaceholderImage(). This CL removes the dependencies and thus ImageResourceInfo::setIsPlaceholder(), by making |ImageResource::m_isPlaceholder| a tri-state enum (renamed as |ImageResource::placeholderOption|): - DoNotReloadPlaceholder (previously m_isPlaceholder == false) - ReloadPlaceholderOnDecodeError (new state) - ShowAndReloadPlaceholderAlways (previously m_isPlaceholder == true) and setting it when receiving ResourceResponse. This CL preserves the behavior of a placeholder ImageResource: If isEntireResource() && (1): Behavior: Placeholder is not created && !shouldReloadBrokenPlaceholder(). Previously: because |m_isPlaceholder| is cleared in updateImage(). Now: because |m_placeholderOption| is set to |DoNotReloadPlaceholder|. If isEntireResource() && not (1) && (2): Behavior: Placeholder is not created && !shouldReloadBrokenPlaceholder(). Previously: because |m_isPlaceholder| is cleared in updateImage(). Now: because |m_placeholderOption| is set to |ReloadPlaceholderOnDecodeError| and DecodeError does NOT occur because (2) is true. If isEntireResource() && not (1) && not (2): Behavior: Placeholder is not created && shouldReloadBrokenPlaceholder(). Previously: because updateImage() creates placeholder only if (2) is true and |m_isPlaceholder| is NOT cleared in updateImage(). Now: because |m_placeholderOption| is set to |ReloadPlaceholderOnDecodeError| and DecodeError does occur because (2) is false. Otherwise: Not affected. BUG=667641, 677188 ========== to ========== Phase II Step 2: Remove setIsPlaceholder() in updateImage() Design doc: https://docs.google.com/document/d/1O-fB83mrE0B_V8gzXNqHgmRLCvstTB4MMi3RnVLr8... Previsouly, |m_isPlaceholder| is cleared in updateImage(), if: - isEntireResource() is true, AND - (1) The HTTP status code is not 4XX or 5XX OR (2) the response has no DecodeError, to prevent creating of placeholder and reloading. However, this causes timing and code dependencies from ImageResourceContent::updateImage() to |ImageResource::m_isPlaceholder| and ImageResource::reloadIfLoFiOrPlaceholderImage(). This CL removes the dependencies and thus ImageResourceInfo::setIsPlaceholder(), by making |ImageResource::m_isPlaceholder| a tri-state enum (renamed as |ImageResource::placeholderOption|): - DoNotReloadPlaceholder (previously m_isPlaceholder == false) - ReloadPlaceholderOnDecodeError (new state) - ShowAndReloadPlaceholderAlways (previously m_isPlaceholder == true) and setting it when receiving ResourceResponse. This CL preserves the behavior of a placeholder ImageResource: If isEntireResource() && (1): Behavior: Placeholder is not created && !shouldReloadBrokenPlaceholder(). Previously: because |m_isPlaceholder| is cleared in updateImage(). Now: because |m_placeholderOption| is set to |DoNotReloadPlaceholder|. If isEntireResource() && not (1) && (2): Behavior: Placeholder is not created && !shouldReloadBrokenPlaceholder(). Previously: because |m_isPlaceholder| is cleared in updateImage(). Now: because |m_placeholderOption| is set to |ReloadPlaceholderOnDecodeError| and DecodeError does NOT occur because (2) is true. If isEntireResource() && not (1) && not (2): Behavior: Placeholder is not created && shouldReloadBrokenPlaceholder(). Previously: because updateImage() creates placeholder only if (2) is true and |m_isPlaceholder| is NOT cleared in updateImage(). Now: because |m_placeholderOption| is set to |ReloadPlaceholderOnDecodeError| and DecodeError does occur because (2) is false. Otherwise: Not affected. BUG=667641, 677188 ==========
The CQ bit was checked by hiroshige@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...)
hiroshige@chromium.org changed reviewers: + japhet@chromium.org, kouhei@chromium.org, sclittle@chromium.org, yhirano@chromium.org
PTAL.
The CQ bit was checked by hiroshige@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_...)
The CQ bit was checked by hiroshige@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_tsan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
https://codereview.chromium.org/2650113002/diff/140001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/loader/resource/ImageResource.cpp (right): https://codereview.chromium.org/2650113002/diff/140001/third_party/WebKit/Sou... third_party/WebKit/Source/core/loader/resource/ImageResource.cpp:428: m_placeholderOption = ReloadPlaceholderOnDecodeError; Is DoNotReloadPlaceholder => ReloadPlaceholderOnDecodeError transition valid? https://codereview.chromium.org/2650113002/diff/140001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/loader/resource/ImageResource.h (right): https://codereview.chromium.org/2650113002/diff/140001/third_party/WebKit/Sou... third_party/WebKit/Source/core/loader/resource/ImageResource.h:157: enum PlaceholderOption { enum class?
The CQ bit was checked by hiroshige@chromium.org to run a CQ dry run
https://codereview.chromium.org/2650113002/diff/140001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/loader/resource/ImageResource.cpp (right): https://codereview.chromium.org/2650113002/diff/140001/third_party/WebKit/Sou... third_party/WebKit/Source/core/loader/resource/ImageResource.cpp:428: m_placeholderOption = ReloadPlaceholderOnDecodeError; On 2017/02/13 11:36:57, yhirano wrote: > Is DoNotReloadPlaceholder => ReloadPlaceholderOnDecodeError transition valid? Oh, looks invalid. Fixed. https://codereview.chromium.org/2650113002/diff/140001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/loader/resource/ImageResource.h (right): https://codereview.chromium.org/2650113002/diff/140001/third_party/WebKit/Sou... third_party/WebKit/Source/core/loader/resource/ImageResource.h:157: enum PlaceholderOption { On 2017/02/13 11:36:57, yhirano wrote: > enum class? Done.
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm
Thanks! sclittle@, could you also take a look?
On 2017/02/24 18:31:44, hiroshige wrote: > Thanks! > > sclittle@, could you also take a look? Friendly ping. sclittle@, could you take a look?
The CQ bit was checked by hiroshige@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by hiroshige@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
LGTM! Sorry for the delayed review.
The CQ bit was checked by hiroshige@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from yhirano@chromium.org Link to the patchset: https://codereview.chromium.org/2650113002/#ps220001 (title: "Rebase.")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 220001, "attempt_start_ts": 1488921571144810, "parent_rev": "81aeead4d36ae4401894ab0b059d9721a30c9521", "commit_rev": "810f7ecd76b0aba74f0a215dbd00b8e8cc5705ba"}
Message was sent while issue was closed.
Description was changed from ========== Phase II Step 2: Remove setIsPlaceholder() in updateImage() Design doc: https://docs.google.com/document/d/1O-fB83mrE0B_V8gzXNqHgmRLCvstTB4MMi3RnVLr8... Previsouly, |m_isPlaceholder| is cleared in updateImage(), if: - isEntireResource() is true, AND - (1) The HTTP status code is not 4XX or 5XX OR (2) the response has no DecodeError, to prevent creating of placeholder and reloading. However, this causes timing and code dependencies from ImageResourceContent::updateImage() to |ImageResource::m_isPlaceholder| and ImageResource::reloadIfLoFiOrPlaceholderImage(). This CL removes the dependencies and thus ImageResourceInfo::setIsPlaceholder(), by making |ImageResource::m_isPlaceholder| a tri-state enum (renamed as |ImageResource::placeholderOption|): - DoNotReloadPlaceholder (previously m_isPlaceholder == false) - ReloadPlaceholderOnDecodeError (new state) - ShowAndReloadPlaceholderAlways (previously m_isPlaceholder == true) and setting it when receiving ResourceResponse. This CL preserves the behavior of a placeholder ImageResource: If isEntireResource() && (1): Behavior: Placeholder is not created && !shouldReloadBrokenPlaceholder(). Previously: because |m_isPlaceholder| is cleared in updateImage(). Now: because |m_placeholderOption| is set to |DoNotReloadPlaceholder|. If isEntireResource() && not (1) && (2): Behavior: Placeholder is not created && !shouldReloadBrokenPlaceholder(). Previously: because |m_isPlaceholder| is cleared in updateImage(). Now: because |m_placeholderOption| is set to |ReloadPlaceholderOnDecodeError| and DecodeError does NOT occur because (2) is true. If isEntireResource() && not (1) && not (2): Behavior: Placeholder is not created && shouldReloadBrokenPlaceholder(). Previously: because updateImage() creates placeholder only if (2) is true and |m_isPlaceholder| is NOT cleared in updateImage(). Now: because |m_placeholderOption| is set to |ReloadPlaceholderOnDecodeError| and DecodeError does occur because (2) is false. Otherwise: Not affected. BUG=667641, 677188 ========== to ========== Phase II Step 2: Remove setIsPlaceholder() in updateImage() Design doc: https://docs.google.com/document/d/1O-fB83mrE0B_V8gzXNqHgmRLCvstTB4MMi3RnVLr8... Previsouly, |m_isPlaceholder| is cleared in updateImage(), if: - isEntireResource() is true, AND - (1) The HTTP status code is not 4XX or 5XX OR (2) the response has no DecodeError, to prevent creating of placeholder and reloading. However, this causes timing and code dependencies from ImageResourceContent::updateImage() to |ImageResource::m_isPlaceholder| and ImageResource::reloadIfLoFiOrPlaceholderImage(). This CL removes the dependencies and thus ImageResourceInfo::setIsPlaceholder(), by making |ImageResource::m_isPlaceholder| a tri-state enum (renamed as |ImageResource::placeholderOption|): - DoNotReloadPlaceholder (previously m_isPlaceholder == false) - ReloadPlaceholderOnDecodeError (new state) - ShowAndReloadPlaceholderAlways (previously m_isPlaceholder == true) and setting it when receiving ResourceResponse. This CL preserves the behavior of a placeholder ImageResource: If isEntireResource() && (1): Behavior: Placeholder is not created && !shouldReloadBrokenPlaceholder(). Previously: because |m_isPlaceholder| is cleared in updateImage(). Now: because |m_placeholderOption| is set to |DoNotReloadPlaceholder|. If isEntireResource() && not (1) && (2): Behavior: Placeholder is not created && !shouldReloadBrokenPlaceholder(). Previously: because |m_isPlaceholder| is cleared in updateImage(). Now: because |m_placeholderOption| is set to |ReloadPlaceholderOnDecodeError| and DecodeError does NOT occur because (2) is true. If isEntireResource() && not (1) && not (2): Behavior: Placeholder is not created && shouldReloadBrokenPlaceholder(). Previously: because updateImage() creates placeholder only if (2) is true and |m_isPlaceholder| is NOT cleared in updateImage(). Now: because |m_placeholderOption| is set to |ReloadPlaceholderOnDecodeError| and DecodeError does occur because (2) is false. Otherwise: Not affected. BUG=667641, 677188 Review-Url: https://codereview.chromium.org/2650113002 Cr-Commit-Position: refs/heads/master@{#455282} Committed: https://chromium.googlesource.com/chromium/src/+/810f7ecd76b0aba74f0a215dbd00... ==========
Message was sent while issue was closed.
Committed patchset #12 (id:220001) as https://chromium.googlesource.com/chromium/src/+/810f7ecd76b0aba74f0a215dbd00... |