WebKit Bugzilla
Attachment 340455 Details for
Bug 128482
: Web Inspector: element details hanger in inspector overlay should have better placement logic
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-128482-20180515180828.patch (text/plain), 2.92 KB, created by
Matt Baker
on 2018-05-15 18:08:28 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Matt Baker
Created:
2018-05-15 18:08:28 PDT
Size:
2.92 KB
patch
obsolete
>Subversion Revision: 231819 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 38451d4f5b7216e91411520ee3799cf6eec4ff3a..4793b17c01abdd0816bb066cf0720bb8140857f2 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2018-05-15 Matt Baker <mattbaker@apple.com> >+ >+ Web Inspector: element details hanger in inspector overlay should have better placement logic >+ https://bugs.webkit.org/show_bug.cgi?id=128482 >+ <rdar://problem/16020709> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ When determining the best position for the hovered element details "tooltip", >+ perform placement tests in view space, not canvas space, and account for the >+ top content inset. >+ >+ * inspector/InspectorOverlayPage.js: >+ (reset): Drive by fix: added missing `.height`. >+ (_drawElementTitle): >+ > 2018-05-15 Devin Rousso <webkit@devinrousso.com> > > Web Inspector: Add rulers and guides >diff --git a/Source/WebCore/inspector/InspectorOverlayPage.js b/Source/WebCore/inspector/InspectorOverlayPage.js >index bf7d56dbe8bad176efc4c793da3bfb32187fafcc..d9215fe401ea69905788a1f6b741feef4c3450f8 100644 >--- a/Source/WebCore/inspector/InspectorOverlayPage.js >+++ b/Source/WebCore/inspector/InspectorOverlayPage.js >@@ -137,7 +137,7 @@ function reset(payload) > document.getElementById("element-title-container").textContent = ""; > document.body.classList.remove("dimmed"); > >- document.getElementById("log").style.setProperty("top", DATA.contentInset + "px"); >+ document.getElementById("log").style.setProperty("top", DATA.contentInset.height + "px"); > } > > function DOMBuilder(tagName, className) >@@ -338,20 +338,24 @@ function _drawElementTitle(elementData, fragmentHighlight, scroll) > anchorTop -= scroll.y; > anchorBottom -= scroll.y; > >- if (boxX + titleWidth > canvas.width) >- boxX = canvas.width - titleWidth - 2; >+ var viewportWidth = DATA.viewportSize.width; >+ if (boxX + titleWidth > viewportWidth) >+ boxX = viewportWidth - titleWidth - 2; >+ >+ var viewportHeight = DATA.viewportSize.height; >+ var viewportTop = DATA.contentInset.height; > > var boxY; >- if (anchorTop > canvas.height) { >+ if (anchorTop > viewportHeight) { > boxY = canvas.height - titleHeight - arrowHeight; > renderArrowDown = true; >- } else if (anchorBottom < 0) { >+ } else if (anchorBottom < viewportTop) { > boxY = arrowHeight; > renderArrowUp = true; >- } else if (anchorBottom + titleHeight + arrowHeight < canvas.height) { >+ } else if (anchorBottom + titleHeight + arrowHeight < viewportHeight) { > boxY = anchorBottom + arrowHeight - 4; > renderArrowUp = true; >- } else if (anchorTop - titleHeight - arrowHeight > 0) { >+ } else if (anchorTop - titleHeight - arrowHeight > viewportTop) { > boxY = anchorTop - titleHeight - arrowHeight + 3; > renderArrowDown = true; > } else
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 128482
: 340455 |
340457
|
340458
|
340460