[GTK][EFL][NIX] Do not use PrintContext, Frame and DocumentLoader in Errors
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Jan 2014 07:37:46 +0000 (07:37 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Jan 2014 07:37:46 +0000 (07:37 +0000)
commitbcb46cf8c33909f7af39202ab2c8d2011382a173
tree59a2508b86a14995e8c2f24810b269cd77083146
parent63184864529a0cc2bc0038dce39e3f9be5dba2f2
[GTK][EFL][NIX] Do not use PrintContext, Frame and DocumentLoader in Errors
https://bugs.webkit.org/show_bug.cgi?id=127047

Reviewed by Martin Robinson.

Source/WebCore:

Using PrintContext, Frame and DocumentLoader in platform is a
layering violation.
Change printing error methods to receive a failing URL instead of
receiving a PrintContext that was used only to get the failing
URL.

* platform/efl/ErrorsEfl.cpp:
(WebCore::printError):
(WebCore::printerNotFoundError):
(WebCore::invalidPageRangeToPrint):
* platform/efl/ErrorsEfl.h:
* platform/gtk/ErrorsGtk.cpp:
(WebCore::printError):
(WebCore::printerNotFoundError):
(WebCore::invalidPageRangeToPrint):
* platform/gtk/ErrorsGtk.h:
* platform/nix/ErrorsNix.cpp:
(WebCore::printError):
(WebCore::printerNotFoundError):
(WebCore::invalidPageRangeToPrint):
* platform/nix/ErrorsNix.h:

Source/WebKit2:

* WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
(WebKit::WebPrintOperationGtk::frameURL): Helper function to get
the URL of the frame being printed.
(WebKit::WebPrintOperationGtk::print): Use frameURL() as failing
URL for printing errors.
* WebProcess/WebPage/gtk/WebPrintOperationGtk.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@162118 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/efl/ErrorsEfl.cpp
Source/WebCore/platform/efl/ErrorsEfl.h
Source/WebCore/platform/gtk/ErrorsGtk.cpp
Source/WebCore/platform/gtk/ErrorsGtk.h
Source/WebCore/platform/nix/ErrorsNix.cpp
Source/WebCore/platform/nix/ErrorsNix.h
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp
Source/WebKit2/WebProcess/WebPage/gtk/WebPrintOperationGtk.h