WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
136076
Expose injected bundle SPI to get a node's URL element, get the visible selection range of that element, and snapshot that range
https://bugs.webkit.org/show_bug.cgi?id=136076
Summary
Expose injected bundle SPI to get a node's URL element, get the visible selec...
Peyton Randolph
Reported
2014-08-19 10:42:55 PDT
Expose injected bundle SPI to get a node's URL element, get the visible selection range of that element, and snapshot that range
Attachments
Patch
(17.38 KB, patch)
2014-08-19 10:48 PDT
,
Peyton Randolph
no flags
Details
Formatted Diff
Diff
Patch
(16.98 KB, patch)
2014-08-19 11:11 PDT
,
Peyton Randolph
no flags
Details
Formatted Diff
Diff
Patch
(16.98 KB, patch)
2014-08-19 14:06 PDT
,
Peyton Randolph
no flags
Details
Formatted Diff
Diff
Patch
(17.61 KB, patch)
2014-08-19 15:53 PDT
,
Peyton Randolph
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Peyton Randolph
Comment 1
2014-08-19 10:48:01 PDT
Created
attachment 236814
[details]
Patch
mitz
Comment 2
2014-08-19 11:08:38 PDT
Comment on
attachment 236814
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=236814&action=review
> Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:79 > +WKBundleNodeHandleRef WKBundleNodeHandleGetURLElementHandle(WKBundleNodeHandleRef elementHandle); > +
What’s this? I think you left it in here by mistake.
> Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleRangeHandle.cpp:36 > +using namespace WebCore;
We’ve moved away from using namespace WebCore in WebKit2. Just namespace-qualify what you use below.
> Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:136 > + PaintBehavior cachedPaintBehavior = frameView->paintBehavior();
We normally call something like this “oldPaintBehavior” or “savedPaintBehavior”.
Peyton Randolph
Comment 3
2014-08-19 11:11:50 PDT
Created
attachment 236817
[details]
Patch
Peyton Randolph
Comment 4
2014-08-19 11:12:13 PDT
(In reply to
comment #2
)
> (From update of
attachment 236814
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=236814&action=review
> > > Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:79 > > +WKBundleNodeHandleRef WKBundleNodeHandleGetURLElementHandle(WKBundleNodeHandleRef elementHandle); > > + > > What’s this? I think you left it in here by mistake.
You're right. Removed.
> > > Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleRangeHandle.cpp:36 > > +using namespace WebCore; > > We’ve moved away from using namespace WebCore in WebKit2. Just namespace-qualify what you use below.
Removed.
> > > Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:136 > > + PaintBehavior cachedPaintBehavior = frameView->paintBehavior(); > > We normally call something like this “oldPaintBehavior” or “savedPaintBehavior”.
Changed.
Tim Horton
Comment 5
2014-08-19 11:54:13 PDT
Comment on
attachment 236817
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=236817&action=review
> Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:48 > + PassRefPtr<InjectedBundleNodeHandle> URLElementHandle() const;
https://www.webkit.org/coding/coding-style.html#names-basic
says that URL should be lowercase in all of these instances.
Peyton Randolph
Comment 6
2014-08-19 14:06:29 PDT
Created
attachment 236824
[details]
Patch
Peyton Randolph
Comment 7
2014-08-19 14:06:50 PDT
(In reply to
comment #5
)
> (From update of
attachment 236817
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=236817&action=review
> > > Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:48 > > + PassRefPtr<InjectedBundleNodeHandle> URLElementHandle() const; > >
https://www.webkit.org/coding/coding-style.html#names-basic
says that URL should be lowercase in all of these instances.
Fixed.
Tim Horton
Comment 8
2014-08-19 14:17:31 PDT
Comment on
attachment 236824
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=236824&action=review
> Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:119 > + float scaleFactor = (options & SnapshotOptionsExcludeDeviceScaleFactor) ? 1 : frame->page()->deviceScaleFactor();
It would be nice if we could share this middle block of code with InjectedBundleNodeHandle (and WebPage, etc.), but I'm not sure where to put it.
WebKit Commit Bot
Comment 9
2014-08-19 14:52:32 PDT
Comment on
attachment 236824
[details]
Patch Rejecting
attachment 236824
[details]
from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-01', 'build', '--no-clean', '--no-update', '--build-style=release', '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: 0AnchorTypeE", referenced from: __ZNK6WebKit24InjectedBundleNodeHandle12visibleRangeEv in InjectedBundleNodeHandle.o __ZN7WebCore18lastPositionInNodeEPNS_4NodeE in InjectedBundleNodeHandle.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) ** BUILD FAILED ** The following build commands failed: Ld /Volumes/Data/EWS/WebKit/WebKitBuild/Release/WebKit.framework/Versions/A/WebKit normal x86_64 (1 failure) Full output:
http://webkit-queues.appspot.com/results/4618171210268672
Peyton Randolph
Comment 10
2014-08-19 15:53:25 PDT
Created
attachment 236829
[details]
Patch
WebKit Commit Bot
Comment 11
2014-08-19 16:33:46 PDT
Comment on
attachment 236829
[details]
Patch Clearing flags on attachment: 236829 Committed
r172780
: <
http://trac.webkit.org/changeset/172780
>
WebKit Commit Bot
Comment 12
2014-08-19 16:33:50 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