Title: [247805] trunk/Source/WebCore
- Revision
- 247805
- Author
- [email protected]
- Date
- 2019-07-24 17:52:10 -0700 (Wed, 24 Jul 2019)
Log Message
Web Inspector: REGRESSION: Overlay: highlighting a ::before/::after shows the node info of the parent instead
https://bugs.webkit.org/show_bug.cgi?id=200051
Reviewed by Joseph Pecoraro.
When highlighting a pseudo-element, only use the parent node for selector information. All
rendering data should still come from the pseudo-element itself.
* inspector/InspectorOverlay.cpp:
(WebCore::drawShapeHighlight):
(WebCore::InspectorOverlay::drawElementTitle):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (247804 => 247805)
--- trunk/Source/WebCore/ChangeLog 2019-07-25 00:44:58 UTC (rev 247804)
+++ trunk/Source/WebCore/ChangeLog 2019-07-25 00:52:10 UTC (rev 247805)
@@ -1,5 +1,19 @@
2019-07-24 Devin Rousso <[email protected]>
+ Web Inspector: REGRESSION: Overlay: highlighting a ::before/::after shows the node info of the parent instead
+ https://bugs.webkit.org/show_bug.cgi?id=200051
+
+ Reviewed by Joseph Pecoraro.
+
+ When highlighting a pseudo-element, only use the parent node for selector information. All
+ rendering data should still come from the pseudo-element itself.
+
+ * inspector/InspectorOverlay.cpp:
+ (WebCore::drawShapeHighlight):
+ (WebCore::InspectorOverlay::drawElementTitle):
+
+2019-07-24 Devin Rousso <[email protected]>
+
Web Inspector: support `console.screenshot` with subclasses of CanvasRenderingContext
https://bugs.webkit.org/show_bug.cgi?id=199305
Modified: trunk/Source/WebCore/inspector/InspectorOverlay.cpp (247804 => 247805)
--- trunk/Source/WebCore/inspector/InspectorOverlay.cpp 2019-07-25 00:44:58 UTC (rev 247804)
+++ trunk/Source/WebCore/inspector/InspectorOverlay.cpp 2019-07-25 00:52:10 UTC (rev 247805)
@@ -277,11 +277,7 @@
static void drawShapeHighlight(GraphicsContext& context, Node& node, Highlight::Bounds& bounds)
{
- Element* element = effectiveElementForNode(node);
- if (!element)
- return;
-
- RenderObject* renderer = element->renderer();
+ RenderObject* renderer = node.renderer();
if (!renderer || !is<RenderBox>(renderer))
return;
@@ -289,12 +285,15 @@
if (!shapeOutsideInfo)
return;
- const Color shapeHighlightColor(96, 82, 127, 204);
+ Frame* containingFrame = node.document().frame();
+ if (!containingFrame)
+ return;
- Frame* containingFrame = element->document().frame();
FrameView* containingView = containingFrame->view();
FrameView* mainView = containingFrame->page()->mainFrame().view();
+ const Color shapeHighlightColor(96, 82, 127, 204);
+
Shape::DisplayPaths paths;
shapeOutsideInfo->computedShape().buildDisplayPaths(paths);
@@ -843,7 +842,7 @@
if (!element)
return;
- RenderObject* renderer = element->renderer();
+ RenderObject* renderer = node.renderer();
if (!renderer)
return;
@@ -871,9 +870,9 @@
}
String elementPseudoType;
- if (element->isBeforePseudoElement())
+ if (node.isBeforePseudoElement())
elementPseudoType = "::before"_s;
- else if (element->isAfterPseudoElement())
+ else if (node.isAfterPseudoElement())
elementPseudoType = "::after"_s;
String elementWidth;
@@ -883,7 +882,7 @@
elementWidth = String::number(adjustForAbsoluteZoom(roundToInt(modelObject->offsetWidth()), *modelObject));
elementHeight = String::number(adjustForAbsoluteZoom(roundToInt(modelObject->offsetHeight()), *modelObject));
} else {
- FrameView* containingView = element->document().frame()->view();
+ FrameView* containingView = node.document().frame()->view();
IntRect boundingBox = snappedIntRect(containingView->contentsToRootView(renderer->absoluteBoundingBoxRect()));
elementWidth = String::number(boundingBox.width());
elementHeight = String::number(boundingBox.height());
@@ -894,8 +893,8 @@
WebCore::AXObjectCache::enableAccessibility();
String elementRole;
- if (AXObjectCache* axObjectCache = element->document().axObjectCache()) {
- if (AccessibilityObject* axObject = axObjectCache->getOrCreate(element))
+ if (AXObjectCache* axObjectCache = node.document().axObjectCache()) {
+ if (AccessibilityObject* axObject = axObjectCache->getOrCreate(&node))
elementRole = axObject->computedRoleString();
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes