<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>213277</bug_id>
          
          <creation_ts>2020-06-16 17:32:13 -0700</creation_ts>
          <short_desc>[WinCairo][WK2]  The entire content area is unnecessarily repainted just by clicking a text</short_desc>
          <delta_ts>2020-06-16 19:23:12 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit2</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Fujii Hironori">fujii</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1663327</commentid>
    <comment_count>0</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2020-06-16 17:32:13 -0700</bug_when>
    <thetext>[WinCairo]  The entire content area is repainted unnecessarily just by clicking a text

I observe this issue with WinCairo WebKit2, but not with WinCairo WebKit1.
You need to use your debugger to obverse this issue.

1. Put a break point at DrawingAreaCoordinatedGraphics::setNeedsDisplay in web process
2. Open a simple non-AC mode page. For example, http://example.com/
3. Click a text in the page
4. The break point is hit

Callstack:

&gt; WebKit2.dll!WebKit::DrawingAreaCoordinatedGraphics::setNeedsDisplay() Line 91	C++
&gt; WebKit2.dll!WebKit::DrawingAreaCoordinatedGraphics::scheduleRenderingUpdate() Line 355	C++
&gt; WebKit2.dll!WebKit::WebPage::scheduleFullEditorStateUpdate() Line 6309	C++
&gt; WebKit2.dll!WebKit::WebPage::didChangeSelectionOrOverflowScrollPosition() Line 5592	C++
&gt; WebKit2.dll!WebKit::WebPage::didChangeSelection() Line 5544	C++
&gt; WebKit2.dll!WebKit::WebEditorClient::respondToChangedSelection(WebCore::Frame * frame=0x00000159996a9d10) Line 247	C++
&gt; WebKit2.dll!WebCore::Editor::respondToChangedSelection(const WebCore::VisibleSelection &amp; __formal={...}, WTF::OptionSet&lt;enum WebCore::FrameSelection::SetSelectionOption&gt; options={...}) Line 3669	C++
&gt; WebKit2.dll!WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance(const WebCore::VisibleSelection &amp; newSelectionPossiblyWithoutDirection={...}, WTF::OptionSet&lt;enum WebCore::FrameSelection::SetSelectionOption&gt; options={...}, WebCore::FrameSelection::CursorAlignOnScroll align=AlignCursorOnScrollIfNeeded, WebCore::TextGranularity granularity=CharacterGranularity) Line 402	C++
&gt; WebKit2.dll!WebCore::FrameSelection::setSelection(const WebCore::VisibleSelection &amp; selection={...}, WTF::OptionSet&lt;enum WebCore::FrameSelection::SetSelectionOption&gt; options={...}, WebCore::AXTextStateChangeIntent intent={...}, WebCore::FrameSelection::CursorAlignOnScroll align=AlignCursorOnScrollIfNeeded, WebCore::TextGranularity granularity=CharacterGranularity) Line 412	C++
&gt; WebKit2.dll!WebCore::FrameSelection::setSelectionByMouseIfDifferent(const WebCore::VisibleSelection &amp; passedNewSelection={...}, WebCore::TextGranularity granularity=CharacterGranularity, WebCore::FrameSelection::EndPointsAdjustmentMode endpointsAdjustmentMode=DoNotAdjust) Line 329	C++
&gt; WebKit2.dll!WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart(WebCore::Node * targetNode=0x00000159dda58010, const WebCore::VisibleSelection &amp; selection={...}, WebCore::TextGranularity granularity=CharacterGranularity) Line 551	C++
&gt; WebKit2.dll!WebCore::EventHandler::handleMousePressEventSingleClick(const WebCore::MouseEventWithHitTestResults &amp; event={...}) Line 754	C++
&gt; WebKit2.dll!WebCore::EventHandler::handleMousePressEvent(const WebCore::MouseEventWithHitTestResults &amp; event={...}) Line 853	C++
&gt; WebKit2.dll!WebCore::EventHandler::handleMousePressEvent(const WebCore::PlatformMouseEvent &amp; platformMouseEvent={...}) Line 1851	C++
&gt; WebKit2.dll!WebCore::UserInputBridge::handleMousePressEvent(const WebCore::PlatformMouseEvent &amp; mouseEvent={...}, WebCore::InputSource __formal=User) Line 58	C++
&gt; WebKit2.dll!WebKit::handleMouseEvent(const WebKit::WebMouseEvent &amp; mouseEvent={...}, WebKit::WebPage * page=0x0000015999677330) Line 2721	C++
&gt; WebKit2.dll!WebKit::WebPage::mouseEvent(const WebKit::WebMouseEvent &amp; mouseEvent={...}) Line 2788	C++
&gt; WebKit2.dll!IPC::callMemberFunctionImpl&lt;WebKit::WebPage,void (__cdecl WebKit::WebPage::*)(WebKit::WebMouseEvent const &amp;),std::tuple&lt;WebKit::WebMouseEvent&gt;,0&gt;(WebKit::WebPage * object=0x0000015999677330, void(WebKit::WebPage::*)(const WebKit::WebMouseEvent &amp;) function=0x00000022be0fd5b0, std::tuple&lt;WebKit::WebMouseEvent&gt; &amp;&amp; args={...}, std::integer_sequence&lt;unsigned __int64,0&gt; __formal={...}) Line 42	C++
&gt; WebKit2.dll!IPC::callMemberFunction&lt;WebKit::WebPage,void (__cdecl WebKit::WebPage::*)(WebKit::WebMouseEvent const &amp;),std::tuple&lt;WebKit::WebMouseEvent&gt;,std::integer_sequence&lt;unsigned __int64,0&gt;&gt;(std::tuple&lt;WebKit::WebMouseEvent&gt; &amp;&amp; args={...}, WebKit::WebPage * object=0x0000015999677330, void(WebKit::WebPage::*)(const WebKit::WebMouseEvent &amp;) function=0x00000022be0fd690) Line 48	C++
&gt; WebKit2.dll!IPC::handleMessage&lt;Messages::WebPage::MouseEvent,WebKit::WebPage,void (__cdecl WebKit::WebPage::*)(WebKit::WebMouseEvent const &amp;)&gt;(IPC::Decoder &amp; decoder={...}, WebKit::WebPage * object=0x0000015999677330, void(WebKit::WebPage::*)(const WebKit::WebMouseEvent &amp;) function=0x00000022be0fe360) Line 115	C++
&gt; WebKit2.dll!WebKit::WebPage::didReceiveWebPageMessage(IPC::Connection &amp; connection={...}, IPC::Decoder &amp; decoder={...}) Line 1072	C++
&gt; WebKit2.dll!WebKit::WebPage::didReceiveMessage(IPC::Connection &amp; connection={...}, IPC::Decoder &amp; decoder={...}) Line 4607	C++
&gt; WebKit2.dll!IPC::MessageReceiverMap::dispatchMessage(IPC::Connection &amp; connection={...}, IPC::Decoder &amp; decoder={...}) Line 124	C++
&gt; WebKit2.dll!WebKit::WebProcess::didReceiveMessage(IPC::Connection &amp; connection={...}, IPC::Decoder &amp; decoder={...}) Line 770	C++
&gt; WebKit2.dll!IPC::Connection::dispatchMessage(IPC::Decoder &amp; decoder={...}) Line 1002	C++
&gt; WebKit2.dll!IPC::Connection::dispatchMessage(std::unique_ptr&lt;IPC::Decoder,std::default_delete&lt;IPC::Decoder&gt;&gt; message={...}) Line 1072	C++
&gt; WebKit2.dll!IPC::Connection::dispatchOneIncomingMessage() Line 1140	C++
&gt; WebKit2.dll!IPC::Connection::enqueueIncomingMessage::__l2::&lt;lambda&gt;() Line 979	C++
&gt; WebKit2.dll!WTF::Detail::CallableWrapper&lt;void &lt;lambda&gt;(void),void&gt;::call() Line 52	C++
&gt; WTF.dll!WTF::Function&lt;void __cdecl(void)&gt;::operator()() Line 85	C++
&gt; WTF.dll!WTF::RunLoop::performWork() Line 141	C++
&gt; WTF.dll!WTF::RunLoop::wndProc(HWND__ * hWnd=0x0000000000390bfe, unsigned int message=1025, unsigned __int64 wParam=1484337169072, __int64 lParam=0) Line 57	C++
&gt; WTF.dll!WTF::RunLoop::RunLoopWndProc(HWND__ * hWnd=0x0000000000390bfe, unsigned int message=1025, unsigned __int64 wParam=1484337169072, __int64 lParam=0) Line 39	C++
&gt; user32.dll!00007ffb15755c0d()	Unknown
&gt; user32.dll!00007ffb15755602()	Unknown
&gt; WTF.dll!WTF::RunLoop::run() Line 74	C++
&gt; WebKit2.dll!WebKit::AuxiliaryProcessMain&lt;WebKit::WebProcess,WebKit::WebProcessMainWin&gt;(int argc=7, char * * argv=0x0000015999626fe0) Line 69	C++
&gt; WebKit2.dll!WebKit::WebProcessMain(int argc=7, char * * argv=0x0000015999626fe0) Line 58	C++
&gt; WebKitWebProcess.exe!main(int argc=7, char * * argv=0x0000015999626fe0) Line 35	C++
&gt; [Inline Frame] WebKitWebProcess.exe!invoke_main() Line 78	C++
&gt; WebKitWebProcess.exe!__scrt_common_main_seh() Line 288	C++
&gt; kernel32.dll!00007ffb14ca7bd4()	Unknown
&gt; ntdll.dll!00007ffb16c4ce51()	Unknown</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1663358</commentid>
    <comment_count>1</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2020-06-16 19:23:12 -0700</bug_when>
    <thetext>There is a FIXME comment in WebPage::scheduleFullEditorStateUpdate()

&gt;     // FIXME: Scheduling a compositing layer flush here can be more expensive than necessary.
&gt;     // Instead, we should just compute and send post-layout editor state during the next frame.

It was added by:
Bug 193070 – REGRESSION (r239441): [iOS] Selection UI sometimes doesn&apos;t change after tapping &quot;select all&quot; in the callout bar</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>