WebCoreSupport needs objects each of which follows major WebCore objects
authormorrita@google.com <morrita@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Jul 2012 11:26:50 +0000 (11:26 +0000)
committermorrita@google.com <morrita@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Jul 2012 11:26:50 +0000 (11:26 +0000)
commitc093468b06bb4bc14d9ca1029db2856576827eed
treebd52d8d43c796f41b8d21770446623cad46f7cf2
parent5ce8867e589cbde83b6595cc767249dcd3220484
WebCoreSupport needs objects each of which follows major WebCore objects
https://bugs.webkit.org/show_bug.cgi?id=88499

Reviewed by Alexey Proskuryakov.

Source/WebCore:

This change

- Makes Internals rough lifetime to follow Document.
  Note that Internals can survive longer than Document in same case.
  Internals::m_document is cleared when the document destruction is notified.
- Makes InternalSettings rough lifetime to follow the Page.
  This is done by making InternalSettings a supplement of the page.
  Now InternalSettings object is created per Page instead of per Frame.

Per-test setting clearance is done by newly introduced InternalSettings::Backup,
which recovers the modified settings and refreshes it for each time a test starts.

* WebCore.exp.in:
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::from):
(WebCore::InternalSettings::~InternalSettings):
(WebCore::InternalSettings::InternalSettings):
(WebCore::InternalSettings::reset):
(WebCore::InternalSettings::settings):
(WebCore::InternalSettings::setFixedElementsLayoutRelativeToFrame):
(WebCore::InternalSettings::setFixedPositionCreatesStackingContext):
(WebCore::InternalSettings::allowRoundingHacks):
(WebCore::InternalSettings::userPreferredLanguages):
(WebCore::InternalSettings::setUserPreferredLanguages):
(WebCore::InternalSettings::setShouldDisplayTrackKind):
(WebCore::InternalSettings::shouldDisplayTrackKind):
(WebCore::InternalSettings::setPagination):
* testing/InternalSettings.h:
(Backup):
(InternalSettings):
(WebCore::InternalSettings::page):
* testing/InternalSettings.idl:
* testing/Internals.cpp:
(WebCore::Internals::Internals):
(WebCore):
(WebCore::Internals::contextDocument):
(WebCore::Internals::frame):
(WebCore::Internals::settings):
(WebCore::Internals::setPagination): Replaced as an alias.
(WebCore::Internals::userPreferredLanguages): Replaced as an alias.
(WebCore::Internals::setUserPreferredLanguages): Replaced as an alias.
(WebCore::Internals::setShouldDisplayTrackKind): Replaced as an alias.
(WebCore::Internals::shouldDisplayTrackKind): Replaced as an alias.
(WebCore::Internals::emitInspectorDidBeginFrame):
(WebCore::Internals::emitInspectorDidCancelFrame):
(WebCore::Internals::allowRoundingHacks): Replaced as an alias.
* testing/Internals.h:
(WebCore):
(Internals):
* testing/js/WebCoreTestSupport.cpp:
(WebCoreTestSupport::injectInternalsObject):
(WebCoreTestSupport::resetInternalsObject):
* testing/v8/WebCoreTestSupport.cpp:
(WebCoreTestSupport::injectInternalsObject):
(WebCoreTestSupport::resetInternalsObject):

Source/WebKit2:

Added exporting symbols.

* win/WebKit2.def:
* win/WebKit2CFLite.def:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@122326 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/testing/InternalSettings.cpp
Source/WebCore/testing/InternalSettings.h
Source/WebCore/testing/InternalSettings.idl
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/js/WebCoreTestSupport.cpp
Source/WebCore/testing/v8/WebCoreTestSupport.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/win/WebKit2.def
Source/WebKit2/win/WebKit2CFLite.def
Source/autotools/symbols.filter