Bug 161932 - Merge Element::ScrollToOptions and DOMWindow::ScrollToOptions
Summary: Merge Element::ScrollToOptions and DOMWindow::ScrollToOptions
Status: RESOLVED DUPLICATE of bug 162912
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
: 161643 (view as bug list)
Depends on: 162912
Blocks:
  Show dependency treegraph
 
Reported: 2016-09-13 15:38 PDT by Chris Dumez
Modified: 2016-10-06 13:25 PDT (History)
13 users (show)

See Also:


Attachments
Patch (14.61 KB, patch)
2016-09-13 15:41 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (14.64 KB, patch)
2016-09-13 22:00 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2016-09-13 15:38:44 PDT
Merge Element::ScrollToOptions and DOMWindow::ScrollToOptions.
Comment 1 Simon Fraser (smfr) 2016-09-13 15:40:19 PDT
*** Bug 161643 has been marked as a duplicate of this bug. ***
Comment 2 Chris Dumez 2016-09-13 15:41:44 PDT
Created attachment 288739 [details]
Patch
Comment 3 Simon Fraser (smfr) 2016-09-13 15:42:41 PDT
Comment on attachment 288739 [details]
Patch

Sneaky inline!
Comment 4 WebKit Commit Bot 2016-09-13 16:29:54 PDT
Comment on attachment 288739 [details]
Patch

Clearing flags on attachment: 288739

Committed r205887: <http://trac.webkit.org/changeset/205887>
Comment 5 WebKit Commit Bot 2016-09-13 16:30:01 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Ryan Haddad 2016-09-13 21:46:26 PDT
This change appears to have broken the Windows build:

https://build.webkit.org/builders/Apple%20Win%20Release%20%28Build%29/builds/80457
Comment 7 Chris Dumez 2016-09-13 21:53:02 PDT
(In reply to comment #6)
> This change appears to have broken the Windows build:
> 
> https://build.webkit.org/builders/Apple%20Win%20Release%20%28Build%29/builds/
> 80457

C:\cygwin\home\buildbot\slave\win-release\build\WebKitBuild\Release\DerivedSources\WebCore\JSElement.cpp(145): error C2766: explicit specialization; 'WTF::Optional<WebCore::ScrollToOptions> WebCore::convertDictionary<WebCore::ScrollToOptions>(JSC::ExecState &,JSC::JSValue)' has already been defined (compiling source file C:\cygwin\home\buildbot\slave\win-release\build\Source\WebCore\DerivedSources.cpp) [C:\cygwin\home\buildbot\slave\win-release\build\WebKitBuild\Release\Source\WebCore\WebCoreDerivedSources.vcxproj]
  C:\cygwin\home\buildbot\slave\win-release\build\WebKitBuild\Release\DerivedSources\WebCore\JSDOMWindow.cpp(647): note: see previous definition of 'convertDictionary' (compiling source file C:\cygwin\home\buildbot\slave\win-release\build\Source\WebCore\DerivedSources.cpp)

Hmm. The inlining trick did not work on Windows :(
Comment 8 Chris Dumez 2016-09-13 21:59:06 PDT
Reverted r205887 for reason:

Broke the Windows build

Committed r205897: <http://trac.webkit.org/changeset/205897>
Comment 9 Chris Dumez 2016-09-13 22:00:21 PDT
Created attachment 288771 [details]
Patch
Comment 10 Chris Dumez 2016-09-13 22:18:29 PDT
ALWAYS_INLINE does not seem to work on Windows either. Looks like we're going to have to find another way.
Comment 11 Sam Weinig 2016-09-13 23:43:10 PDT
Instead of inlining, does wrapping the functions in an anonymous namespace work?
Comment 12 Chris Dumez 2016-09-14 09:37:58 PDT
(In reply to comment #11)
> Instead of inlining, does wrapping the functions in an anonymous namespace
> work?

This does not seem to work. I believe the template declaration and its specializations need to be in the same namespace.

Error:
/Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/JSElement.cpp:116:58: error: no function template matches function template specialization 'convertDictionary'
namespace { template<> Optional<Element::ShadowRootInit> convertDictionary<Element::ShadowRootInit>(ExecState& state, JSValue value)
Comment 13 Chris Dumez 2016-10-06 13:25:39 PDT

*** This bug has been marked as a duplicate of bug 162912 ***