Bug 197862 - Missing cursor/caret showing in search field on google.com
Summary: Missing cursor/caret showing in search field on google.com
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-05-13 17:31 PDT by Wenson Hsieh
Modified: 2019-05-14 22:24 PDT (History)
6 users (show)

See Also:


Attachments
Patch (7.76 KB, patch)
2019-05-14 09:13 PDT, Wenson Hsieh
simon.fraser: review+
Details | Formatted Diff | Diff
For EWS (7.90 KB, patch)
2019-05-14 20:28 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wenson Hsieh 2019-05-13 17:31:20 PDT
<rdar://problem/50291989>
Comment 1 Wenson Hsieh 2019-05-14 09:13:42 PDT
Created attachment 369857 [details]
Patch
Comment 2 Wenson Hsieh 2019-05-14 11:24:08 PDT
  TestWTF.vcxproj -> C:\cygwin\home\buildbot\WebKit\WebKitBuild\Release\bin32\TestWTF.exe
  : No such file or directory at /home/buildbot/WebKit/Source/WebCore/bindings/scripts/preprocess-idls.pl line 105.
  Died at C:/cygwin/home/buildbot/WebKit/Source/WebCore/bindings/scripts/generate-bindings-all.pl line 85.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(209,5): error MSB6006: "cmd.exe" exited with code 2. [C:\cygwin\home\buildbot\WebKit\WebKitBuild\Release\Source\WebCore\WebCoreBindings.vcxproj]

It’s not clear to me how to fix this, or what’s going wrong :/

From some quick searches, it looks like this is due to a bad command line invocation during build?
Comment 3 Simon Fraser (smfr) 2019-05-14 15:54:22 PDT
Comment on attachment 369857 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=369857&action=review

> Source/WebCore/rendering/RenderLayer.cpp:6812
> +        layer->calculateRects({ renderViewLayer, TemporaryClipRects }, LayoutRect::infiniteRect(), layerBounds, backgroundRect, foregroundRect, layer->offsetFromAncestor(renderViewLayer));

I think this is the same as AbsoluteClipRects.

I think you can just do:

auto rect = layer.backgroundClipRect(RenderLayer::ClipRectsContext(rootLayer, AbsoluteClipRects)).rect().

Ideally factor this out into a lambda so it's clear you're hopping up a frame in each loop iteration.
Comment 4 Wenson Hsieh 2019-05-14 16:04:41 PDT
Comment on attachment 369857 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=369857&action=review

>> Source/WebCore/rendering/RenderLayer.cpp:6812
>> +        layer->calculateRects({ renderViewLayer, TemporaryClipRects }, LayoutRect::infiniteRect(), layerBounds, backgroundRect, foregroundRect, layer->offsetFromAncestor(renderViewLayer));
> 
> I think this is the same as AbsoluteClipRects.
> 
> I think you can just do:
> 
> auto rect = layer.backgroundClipRect(RenderLayer::ClipRectsContext(rootLayer, AbsoluteClipRects)).rect().
> 
> Ideally factor this out into a lambda so it's clear you're hopping up a frame in each loop iteration.

Oh nice! I'll try out backgroundClipRect, and pull this logic out into a lambda function.
Comment 5 Wenson Hsieh 2019-05-14 20:12:23 PDT
(In reply to Wenson Hsieh from comment #4)
> Comment on attachment 369857 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=369857&action=review
> 
> >> Source/WebCore/rendering/RenderLayer.cpp:6812
> >> +        layer->calculateRects({ renderViewLayer, TemporaryClipRects }, LayoutRect::infiniteRect(), layerBounds, backgroundRect, foregroundRect, layer->offsetFromAncestor(renderViewLayer));
> > 
> > I think this is the same as AbsoluteClipRects.
> > 
> > I think you can just do:
> > 
> > auto rect = layer.backgroundClipRect(RenderLayer::ClipRectsContext(rootLayer, AbsoluteClipRects)).rect().
> > 
> > Ideally factor this out into a lambda so it's clear you're hopping up a frame in each loop iteration.
> 
> Oh nice! I'll try out backgroundClipRect, and pull this logic out into a
> lambda function.

After a bit of digging, RenderLayer::backgroundClipRect seems to compute clip rects for the layer's parent, rather than the layer itself (this difference is exercised in one of my test cases, hide-selection-in-empty-overflow-hidden-container.html). For the time being, I think I'll stick with the call to calculateRects.
Comment 6 Wenson Hsieh 2019-05-14 20:28:19 PDT
Created attachment 369920 [details]
For EWS
Comment 7 WebKit Commit Bot 2019-05-14 21:58:02 PDT
Comment on attachment 369920 [details]
For EWS

Clearing flags on attachment: 369920

Committed r245317: <https://trac.webkit.org/changeset/245317>