WebKit Bugzilla
Attachment 342375 Details for
Bug 186464
: REGRESSION (r230480): Cannot adjust photo position on LinkedIn's profile page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186464-20180609173839.patch (text/plain), 5.52 KB, created by
zalan
on 2018-06-09 17:38:40 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2018-06-09 17:38:40 PDT
Size:
5.52 KB
patch
obsolete
>Subversion Revision: 232644 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 01e79ab39e722aba0211299ad525c7eb440c2509..5b4901381c24e2944bfe1401642398d385e2b7c3 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,22 @@ >+2018-06-09 Zalan Bujtas <zalan@apple.com> >+ >+ REGRESSION (r230480): Cannot adjust photo position on LinkedIn's profile page >+ https://bugs.webkit.org/show_bug.cgi?id=186464 >+ <rdar://problem/40369448> >+ >+ Reviewed by Simon Fraser. >+ >+ The optimization logic for skipping image layout when we only need overflow computation should check if the image actually needs >+ simplified layout only. The needsSimplifiedNormalFlowLayout() flag means that the overflow information needs to be updated but >+ it does not mean that overflow is the only property that we need to recompute. >+ >+ Test: fast/images/positioned-image-when-transform-is-present.html >+ >+ * rendering/RenderImage.cpp: >+ (WebCore::RenderImage::layout): >+ * rendering/RenderObject.h: >+ (WebCore::RenderObject::needsSimplifiedNormalFlowLayoutOnly const): >+ > 2018-06-08 Darin Adler <darin@apple.com> > > [Cocoa] Make more of our soft linking ARC-compatible >diff --git a/Source/WebCore/rendering/RenderImage.cpp b/Source/WebCore/rendering/RenderImage.cpp >index 92422b362a412746f4589f1e6dc732ceb718e84b..acd99a02a56d251123b5d9b7a27829a4a504abdb 100644 >--- a/Source/WebCore/rendering/RenderImage.cpp >+++ b/Source/WebCore/rendering/RenderImage.cpp >@@ -709,7 +709,7 @@ bool RenderImage::canHaveChildren() const > void RenderImage::layout() > { > // Recomputing overflow is required only when child content is present. >- if (needsSimplifiedNormalFlowLayout() && !m_hasShadowControls) { >+ if (needsSimplifiedNormalFlowLayoutOnly() && !m_hasShadowControls) { > clearNeedsLayout(); > return; > } >diff --git a/Source/WebCore/rendering/RenderObject.h b/Source/WebCore/rendering/RenderObject.h >index ccd686e51cbda3708ba966615c3d13ecfe99e77c..bb3f35ea6ff146b2e9b56bc480f43360e63c555c 100644 >--- a/Source/WebCore/rendering/RenderObject.h >+++ b/Source/WebCore/rendering/RenderObject.h >@@ -475,6 +475,7 @@ public: > > bool posChildNeedsLayout() const { return m_bitfields.posChildNeedsLayout(); } > bool needsSimplifiedNormalFlowLayout() const { return m_bitfields.needsSimplifiedNormalFlowLayout(); } >+ bool needsSimplifiedNormalFlowLayoutOnly() const; > bool normalChildNeedsLayout() const { return m_bitfields.normalChildNeedsLayout(); } > > bool preferredLogicalWidthsDirty() const { return m_bitfields.preferredLogicalWidthsDirty(); } >@@ -1094,6 +1095,12 @@ inline bool RenderObject::backgroundIsKnownToBeObscured(const LayoutPoint& paint > return m_bitfields.boxDecorationState() == HasBoxDecorationsAndBackgroundIsKnownToBeObscured; > } > >+inline bool RenderObject::needsSimplifiedNormalFlowLayoutOnly() const >+{ >+ return m_bitfields.needsSimplifiedNormalFlowLayout() && !m_bitfields.needsLayout() && !m_bitfields.normalChildNeedsLayout() >+ && !m_bitfields.posChildNeedsLayout() && !m_bitfields.needsPositionedMovementLayout(); >+} >+ > #if ENABLE(TREE_DEBUGGING) > void printRenderTreeForLiveDocuments(); > void printLayerTreeForLiveDocuments(); >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index fc310f02e345d005888f4c4b495e6877cfdce6c7..f806a9fc068aeccb7f06efcf335ebd4b4684f54b 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,14 @@ >+2018-06-09 Zalan Bujtas <zalan@apple.com> >+ >+ REGRESSION (r230480): Cannot adjust photo position on LinkedIn's profile page >+ https://bugs.webkit.org/show_bug.cgi?id=186464 >+ <rdar://problem/40369448> >+ >+ Reviewed by Simon Fraser. >+ >+ * fast/images/positioned-image-when-transform-is-present-expected.html: Added. >+ * fast/images/positioned-image-when-transform-is-present.html: Added. >+ > 2018-06-08 Brendan McLoughlin <brendan@bocoup.com> > > Sync web-platform-tests repo to 197cdad >diff --git a/LayoutTests/fast/images/positioned-image-when-transform-is-present-expected.html b/LayoutTests/fast/images/positioned-image-when-transform-is-present-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..b1009835e40da4855ac4cfcf8ca11cd517ba27c4 >--- /dev/null >+++ b/LayoutTests/fast/images/positioned-image-when-transform-is-present-expected.html >@@ -0,0 +1,9 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title>This tests that we reposition the image when transform is present.</title> >+</head> >+<body> >+PASS if the image disappears completely. >+</body> >+</html> >diff --git a/LayoutTests/fast/images/positioned-image-when-transform-is-present.html b/LayoutTests/fast/images/positioned-image-when-transform-is-present.html >new file mode 100644 >index 0000000000000000000000000000000000000000..7a9a052d9e2618af55d98b5b079f573a628823e8 >--- /dev/null >+++ b/LayoutTests/fast/images/positioned-image-when-transform-is-present.html >@@ -0,0 +1,32 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title>This tests that we reposition the image when transform is present.</title> >+<style> >+img { >+ position: absolute; >+ top: 10px; >+ left: 10px; >+ width: 100px; >+ height: 100px; >+ transform: translateX(0px); >+} >+ >+div { >+ position: relative; >+ width: 100px; >+ height: 100px; >+ overflow: hidden; >+} >+</style> >+</head> >+<body> >+PASS if the image disappears completely. >+<div><img id=moveOut src="foobar-broken.jpg"></div> >+<script> >+ document.body.offsetHeight; >+ moveOut.style.transform = "translateX(1px)"; >+ moveOut.style.left = "200px"; >+</script> >+</body> >+</html>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186464
:
342370
|
342373
| 342375