Bug 58473 - REGRESSION: Links are clickable when a contentEditable is set to true
Summary: REGRESSION: Links are clickable when a contentEditable is set to true
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: All OS X 10.5
: P2 Normal
Assignee: Enrica Casucci
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2011-04-13 13:14 PDT by Enrica Casucci
Modified: 2011-04-13 15:41 PDT (History)
5 users (show)

See Also:


Attachments
Patch (5.33 KB, patch)
2011-04-13 13:36 PDT, Enrica Casucci
no flags Details | Formatted Diff | Diff
Patch2 (5.37 KB, patch)
2011-04-13 13:48 PDT, Enrica Casucci
mitz: review+
Details | Formatted Diff | Diff
Follow-up patch (2.97 KB, patch)
2011-04-13 14:56 PDT, Enrica Casucci
no flags Details | Formatted Diff | Diff
Patch4 (4.23 KB, patch)
2011-04-13 15:18 PDT, Enrica Casucci
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Enrica Casucci 2011-04-13 13:14:14 PDT
Repro steps:
1. Launch Safari and navigate to http://www.mozilla.org/editor/midasdemo/
2. Paste in the editor some content previously copied that contains links.
3. Click on one of the links

Expected
No navigation takes place.

Actual
The page pointed by the link gets loaded in the editor frame.
Comment 1 Enrica Casucci 2011-04-13 13:14:34 PDT
<rdar://problem/9256793>
Comment 2 Enrica Casucci 2011-04-13 13:36:34 PDT
Created attachment 89444 [details]
Patch
Comment 3 mitz 2011-04-13 13:40:23 PDT
Comment on attachment 89444 [details]
Patch

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

> Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h:53
> +enum WKEditableLinkBehavior {
> +    WKEditableLinkDefaultBehavior,
> +    WKEditableLinkAlwaysLive,
> +    WKEditableLinkOnlyLiveWithShiftKey,
> +    WKEditableLinkLiveWhenNotFocused,
> +    WKEditableLinkNeverLive
> +};
> +typedef enum WKEditableLinkBehavior WKEditableLinkBehavior;

CF-style constants should be prefixed with a lowercase k. These are also missing the word “Behavior”.
Comment 4 Enrica Casucci 2011-04-13 13:48:46 PDT
Created attachment 89447 [details]
Patch2

Addresses Dan's comments.
Comment 5 Enrica Casucci 2011-04-13 14:27:20 PDT
http://trac.webkit.org/changeset/83766
Comment 6 Enrica Casucci 2011-04-13 14:56:07 PDT
Created attachment 89469 [details]
Follow-up patch
Comment 7 WebKit Review Bot 2011-04-13 14:59:11 PDT
Attachment 89469 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/ChangeLog', u'Source/WebKit..." exit_code: 1

Source/WebKit2/UIProcess/API/C/WKAPICast.h:190:  A case label should not be indented, but line up with its switch statement.  [whitespace/indent] [4]
Source/WebKit2/UIProcess/API/C/WKPreferences.cpp:34:  Alphabetical sorting problem.  [build/include_order] [4]
Total errors found: 2 in 3 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 Enrica Casucci 2011-04-13 15:18:36 PDT
Created attachment 89476 [details]
Patch4
Comment 9 mitz 2011-04-13 15:21:00 PDT
Comment on attachment 89476 [details]
Patch4

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

> Source/WebKit2/UIProcess/API/C/WKAPICast.h:46
> +#include <WebCore/Settings.h>

Strange that this is needed here.

> Source/WebKit2/UIProcess/API/C/WKPreferences.cpp:34
> +#include <WebCore/Settings.h>

Ditto.
Comment 10 WebKit Review Bot 2011-04-13 15:21:09 PDT
Attachment 89476 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/ChangeLog', u'Source/WebKit..." exit_code: 1

Source/WebKit2/UIProcess/API/C/WKAPICast.h:190:  A case label should not be indented, but line up with its switch statement.  [whitespace/indent] [4]
Source/WebKit2/UIProcess/API/C/WKAPICast.h:209:  A case label should not be indented, but line up with its switch statement.  [whitespace/indent] [4]
Source/WebKit2/UIProcess/API/C/WKPreferences.cpp:34:  Alphabetical sorting problem.  [build/include_order] [4]
Total errors found: 3 in 3 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 11 Enrica Casucci 2011-04-13 15:41:25 PDT
http://trac.webkit.org/changeset/83778.
Addressed style issues before landing.