WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
174539
[iOS WK2] Presenting an action sheet on an image map prevents selection UI from updating
https://bugs.webkit.org/show_bug.cgi?id=174539
Summary
[iOS WK2] Presenting an action sheet on an image map prevents selection UI fr...
Wenson Hsieh
Reported
2017-07-15 00:10:06 PDT
<
rdar://problem/33307395
>
Attachments
Patch
(21.01 KB, patch)
2017-07-15 01:12 PDT
,
Wenson Hsieh
no flags
Details
Formatted Diff
Diff
Rebase on master
(20.86 KB, patch)
2017-07-15 01:19 PDT
,
Wenson Hsieh
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews123 for ios-simulator-wk2
(10.07 MB, application/zip)
2017-07-15 03:54 PDT
,
Build Bot
no flags
Details
Fix Mac/GTK builds
(21.20 KB, patch)
2017-07-15 15:53 PDT
,
Wenson Hsieh
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews125 for ios-simulator-wk2
(1012.27 KB, application/zip)
2017-07-15 17:20 PDT
,
Build Bot
no flags
Details
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Wenson Hsieh
Comment 1
2017-07-15 01:12:03 PDT
Created
attachment 315535
[details]
Patch
Wenson Hsieh
Comment 2
2017-07-15 01:19:27 PDT
Comment hidden (obsolete)
Created
attachment 315537
[details]
Rebase on master
Build Bot
Comment 3
2017-07-15 03:54:14 PDT
Comment hidden (obsolete)
Comment on
attachment 315537
[details]
Rebase on master
Attachment 315537
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/4124752
New failing tests: http/tests/canvas/canvas-tainted-after-draw-image.html
Build Bot
Comment 4
2017-07-15 03:54:16 PDT
Comment hidden (obsolete)
Created
attachment 315539
[details]
Archive of layout-test-results from ews123 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews123 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.5
Darin Adler
Comment 5
2017-07-15 10:44:44 PDT
Comment on
attachment 315537
[details]
Rebase on master View in context:
https://bugs.webkit.org/attachment.cgi?id=315537&action=review
> Source/WebCore/editing/Editor.cpp:191 > + , m_appearanceUpdatesWereEnabled(frame.selection().updateAppearanceEnabled())
This is calling an iOS-specific function, but it’s in platform-independent code. Need to either wrap it in PLATFORM(IOS) or make some bigger change.
> Source/WebCore/editing/Editor.cpp:194 > + if (options & TemporarySelectionOptionEnableAppearanceUpdates) > + frame.selection().setUpdateAppearanceEnabled(true);
Ditto.
> Source/WebCore/editing/Editor.cpp:216 > + if (m_options & TemporarySelectionOptionEnableAppearanceUpdates) > + m_frame.selection().setUpdateAppearanceEnabled(m_appearanceUpdatesWereEnabled);
Ditto.
> Source/WebCore/editing/Editor.h:112 > +typedef uint8_t TemporarySelectionOptions;
In new code we normally use "using" rather than "typedef".
> Source/WebCore/editing/Editor.h:115 > + WTF_MAKE_FAST_ALLOCATED;
I don’t think we need this. We have no intention of allocating these as separate objects on the heap. I don’t want to add WTF_MAKE_FAST_ALLOCATED to every class.
> Source/WebCore/editing/Editor.h:121 > + Frame& m_frame;
Is it safe for this to be a raw reference to a Frame rather than a Ref<Frame>? I mean it obviously is safe in the one place you are currently using it because there is a "protector" there, but what about longer term as we adopt it in more places? I suggest using Ref<Frame>.
> Source/WebCore/editing/FrameSelection.h:239 > + bool updateAppearanceEnabled() const { return m_updateAppearanceEnabled; }
This function name sounds like a verb phrase, true if I should "update" a flag named "appearance enabled". Maybe isUpdateAppearanceEnabled()? Or maybe come up with a clearer name for this concept some day?
Darin Adler
Comment 6
2017-07-15 10:46:24 PDT
Comment on
attachment 315537
[details]
Rebase on master View in context:
https://bugs.webkit.org/attachment.cgi?id=315537&action=review
>> Source/WebCore/editing/FrameSelection.h:239 >> + bool updateAppearanceEnabled() const { return m_updateAppearanceEnabled; } > > This function name sounds like a verb phrase, true if I should "update" a flag named "appearance enabled". Maybe isUpdateAppearanceEnabled()? Or maybe come up with a clearer name for this concept some day?
Sorry I meant to say: This function name sounds like a verb phrase, a function I should call to "update" a flag named "appearance enabled". But it’s intended to be a noun or adjective phrase I think. Maybe a better name is isUpdateAppearanceEnabled()? Or maybe come up with a clearer name for this concept some day? Because what does "update appearance enabled" mean? Does it mean "appearance updating enabled"? If so, what is "appearance updating"?
Wenson Hsieh
Comment 7
2017-07-15 15:03:45 PDT
Comment on
attachment 315537
[details]
Rebase on master View in context:
https://bugs.webkit.org/attachment.cgi?id=315537&action=review
>> Source/WebCore/editing/Editor.cpp:191 >> + , m_appearanceUpdatesWereEnabled(frame.selection().updateAppearanceEnabled()) > > This is calling an iOS-specific function, but it’s in platform-independent code. Need to either wrap it in PLATFORM(IOS) or make some bigger change.
Yep, fixed.
>> Source/WebCore/editing/Editor.cpp:194 >> + frame.selection().setUpdateAppearanceEnabled(true); > > Ditto.
Fixed.
>> Source/WebCore/editing/Editor.cpp:216 >> + m_frame.selection().setUpdateAppearanceEnabled(m_appearanceUpdatesWereEnabled); > > Ditto.
Fixed.
>> Source/WebCore/editing/Editor.h:112 >> +typedef uint8_t TemporarySelectionOptions; > > In new code we normally use "using" rather than "typedef".
👍 changed to using TemporarySelectionOptions = uint8_t;
>> Source/WebCore/editing/Editor.h:115 >> + WTF_MAKE_FAST_ALLOCATED; > > I don’t think we need this. We have no intention of allocating these as separate objects on the heap. I don’t want to add WTF_MAKE_FAST_ALLOCATED to every class.
Ok! Removed.
>> Source/WebCore/editing/Editor.h:121 >> + Frame& m_frame; > > Is it safe for this to be a raw reference to a Frame rather than a Ref<Frame>? I mean it obviously is safe in the one place you are currently using it because there is a "protector" there, but what about longer term as we adopt it in more places? I suggest using Ref<Frame>.
True -- a Ref<Frame> would be safer here than just a Frame&.
>>> Source/WebCore/editing/FrameSelection.h:239 >>> + bool updateAppearanceEnabled() const { return m_updateAppearanceEnabled; } >> >> This function name sounds like a verb phrase, true if I should "update" a flag named "appearance enabled". Maybe isUpdateAppearanceEnabled()? Or maybe come up with a clearer name for this concept some day? > > Sorry I meant to say: > > This function name sounds like a verb phrase, a function I should call to "update" a flag named "appearance enabled". But it’s intended to be a noun or adjective phrase I think. Maybe a better name is isUpdateAppearanceEnabled()? Or maybe come up with a clearer name for this concept some day? Because what does "update appearance enabled" mean? Does it mean "appearance updating enabled"? If so, what is "appearance updating"?
Good point, updateAppearanceEnabled() doesn't sound like the name of a const getter :| I just chose this name to match the name of the instance variable, but there's no reason it has to be that way. For now, I changed it to isUpdateAppearanceEnabled(), but yes -- we should consider a clearer name for this concept in a future patch. Its purpose is really to determine whether we should go through the render tree to update selection data (start and end offsets, selection state, etc.) when setting the selection. On iOS, we typically bail from this codepath via an early return in FrameSelection::updateAppearance, but for some special purposes (e.g. text indicator snapshotting) we'll need to perform this work, so we temporarily toggle this switch by setting "update appearance enabled" to true.
Wenson Hsieh
Comment 8
2017-07-15 15:53:32 PDT
Created
attachment 315568
[details]
Fix Mac/GTK builds
Build Bot
Comment 9
2017-07-15 17:20:51 PDT
Comment on
attachment 315568
[details]
Fix Mac/GTK builds
Attachment 315568
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/4127737
New failing tests: imported/w3c/IndexedDB-private-browsing/idbfactory_open12.html
Build Bot
Comment 10
2017-07-15 17:20:52 PDT
Created
attachment 315571
[details]
Archive of layout-test-results from ews125 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews125 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.5
Darin Adler
Comment 11
2017-07-15 20:07:39 PDT
Comment on
attachment 315568
[details]
Fix Mac/GTK builds Code looks fine to me, but I am concerned about all the failing tests.
Wenson Hsieh
Comment 12
2017-07-15 20:18:13 PDT
(In reply to Darin Adler from
comment #11
)
> Comment on
attachment 315568
[details]
> Fix Mac/GTK builds > > Code looks fine to me, but I am concerned about all the failing tests.
Thanks! These EWS failures (imported/w3c/IndexedDB-private-browsing/idbfactory_open12.html and http/tests/canvas/canvas-tainted-after-draw-image.html) don't look related, but I'll run them locally to make sure.
Darin Adler
Comment 13
2017-07-15 20:29:28 PDT
I see now. I was looking at the worse run with tons of failing tests, but also clearly not your fault. The canvas-tainted-after-draw-image.html is also failing without your patch, so clearly not caused by the patch, but needs to be fixed by someone!
Darin Adler
Comment 14
2017-07-15 20:29:44 PDT
(In reply to Darin Adler from
comment #13
)
> The canvas-tainted-after-draw-image.html is also failing without your patch, > so clearly not caused by the patch, but needs to be fixed by someone!
To be precise, crashing, not failing.
WebKit Commit Bot
Comment 15
2017-07-15 21:01:34 PDT
Comment on
attachment 315568
[details]
Fix Mac/GTK builds Clearing flags on attachment: 315568 Committed
r219541
: <
http://trac.webkit.org/changeset/219541
>
WebKit Commit Bot
Comment 16
2017-07-15 21:01:35 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug