Bug 48969 - Need a way to test in WebKit2 whether a form field contains marked text
Summary: Need a way to test in WebKit2 whether a form field contains marked text
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: 2010-11-03 19:14 PDT by Enrica Casucci
Modified: 2010-11-04 11:29 PDT (History)
2 users (show)

See Also:


Attachments
Patch (14.89 KB, patch)
2010-11-03 19:30 PDT, Enrica Casucci
ap: 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 2010-11-03 19:14:42 PDT
This is required to support autofill.
Comment 1 Enrica Casucci 2010-11-03 19:30:12 PDT
Created attachment 72897 [details]
Patch
Comment 2 Alexey Proskuryakov 2010-11-04 10:45:50 PDT
Comment on attachment 72897 [details]
Patch

+    // Need to declare these attribute names because AppKit exports them but does not make them available in API or SPI headers.
+    
+    extern NSString *NSMarkedClauseSegmentAttributeName;

This one is in 10.5 SDK.

+    extern NSString *NSTextInputReplacementRangeAttributeName;

This one is not - please file a bug, and reference it in a comment.

+    BOOL _isSelectionInPasswordField;

Since you added this, you probably already know that there is some advanced trickery going on to make sure that password fields are handled correctly by input methods. This is not relevant to this patch, but I wanted to be sure that you look into that later.


+    Frame* frame = m_page->corePage()->focusController()->focusedOrMainFrame();
+    if (!frame)
+        return;

Why ask for main frame if there is no focused one?

r=me
Comment 3 Enrica Casucci 2010-11-04 11:29:19 PDT
(In reply to comment #2)
> (From update of attachment 72897 [details])
> +    // Need to declare these attribute names because AppKit exports them but does not make them available in API or SPI headers.
> +    
> +    extern NSString *NSMarkedClauseSegmentAttributeName;
> 
> This one is in 10.5 SDK.
> 
> +    extern NSString *NSTextInputReplacementRangeAttributeName;
> 
> This one is not - please file a bug, and reference it in a comment.

Done.

> 
> +    BOOL _isSelectionInPasswordField;
> 
> Since you added this, you probably already know that there is some advanced trickery going on to make sure that password fields are handled correctly by input methods. This is not relevant to this patch, but I wanted to be sure that you look into that later.

Yes! 

> 
> 
> +    Frame* frame = m_page->corePage()->focusController()->focusedOrMainFrame();
> +    if (!frame)
> +        return;
> 
> Why ask for main frame if there is no focused one?

Sorry, just copy/paste mistake.

> 
> r=me
Comment 4 Enrica Casucci 2010-11-04 11:29:56 PDT
Committed revision 71347.