Stop including SecurityOrigin.h where unnecessary
https://bugs.webkit.org/show_bug.cgi?id=115897

Reviewed by Antti Koivisto.

Move rarely called functions out of line so headers don't have to include SecurityOrigin.h

* Modules/indexeddb/IDBFactoryBackendImpl.h:
* Modules/webdatabase/DatabaseBackendBase.cpp:
(WebCore::DatabaseBackendBase::databaseDebugName):
* Modules/webdatabase/DatabaseBackendBase.h:
(DatabaseBackendBase):
* Modules/webdatabase/DatabaseSync.h:
* bindings/js/JSDOMWindowCustom.h:
* html/parser/XSSAuditor.cpp:
* loader/ThreadableLoader.cpp:
(WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions):
(WebCore::ThreadableLoaderOptions::~ThreadableLoaderOptions):
(WebCore::ThreadableLoader::create):
* loader/ThreadableLoader.h:
(ThreadableLoaderOptions):
* loader/WorkerThreadableLoader.cpp:
* workers/DedicatedWorkerContext.cpp:
* workers/DedicatedWorkerThread.cpp:
* workers/SharedWorkerContext.cpp:
* workers/WorkerThread.cpp:
* workers/WorkerThread.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149864 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove ScriptController::updateSecurityOrigin
https://bugs.webkit.org/show_bug.cgi?id=115895

Reviewed by Antti Koivisto.

ScriptController::updateSecurityOrigin is just dead code now that the V8 bindings are gone.

* bindings/js/ScriptController.cpp:
* bindings/js/ScriptController.h:
* dom/Document.cpp:
(WebCore::Document::setIsViewSource):
(WebCore::Document::setDomain):
* dom/Document.h:
(Document):
* dom/SecurityContext.cpp:
(WebCore::SecurityContext::enforceSandboxFlags):
* dom/SecurityContext.h:
(SecurityContext):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149865 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Begin making SecurityOrigin immutable
https://bugs.webkit.org/show_bug.cgi?id=115898

Reviewed by Andreas Kling.

Replace SecurityOrigin::setDomainFromDOM and SecurityOrigin::grantUniversalAccess with
member functions that return new SecurityOrigin objects.

* dom/Document.cpp:
(WebCore::Document::setDomain):
Update the security origin to one returned by copyWithDomainSetFromDOM.

(WebCore::Document::initSecurityContext):
Set the security origin to one returned by copyWithUniversalAccessGranted().

* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::SecurityOrigin):
Add a new constructor that takes all the member variables as parameters. This is a little unwieldy at the moment,
but all the boolean parameters could be replaced by a bitmask of flags.

(WebCore::SecurityOrigin::isolatedCopy):
Call the new constructor.

(WebCore::SecurityOrigin::copyWithDomainSetFromDOM):
Return a new security origin with m_domainWasSetInDOM set to true and the domain updated.

(WebCore::SecurityOrigin::copyWithUniversalAccessGranted):
Return a new security origin with m_universalAccess set to true.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149866 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove overflow dead code
https://bugs.webkit.org/show_bug.cgi?id=115893

Reviewed by Antti Koivisto.

The patch removes unused public overflow accesor functions from RenderOverflow and InlineFlowBox.

Tests: no tests, code cleanup.

* rendering/InlineFlowBox.h: Removed logicalLeftLayoutOverflow and logicalRightLayoutOverflow.
* rendering/RenderOverflow.h: Removed setMinYLayoutOverflow, setMaxYLayoutOverflow,
    setMinXLayoutOverflow, setMaxXLayoutOverflow, setMinYVisualOverflow, setMaxYVisualOverflow,
    setMinXVisualOverflow and setMaxXVisualOverflow.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149867 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Add my email to a few watchlists.

* Scripts/webkitpy/common/config/watchlist:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149868 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r149866.
http://trac.webkit.org/changeset/149866
https://bugs.webkit.org/show_bug.cgi?id=115898

Broke tests

* dom/Document.cpp:
(WebCore::Document::setDomain):
(WebCore::Document::initSecurityContext):
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::SecurityOrigin):
(WebCore::SecurityOrigin::isolatedCopy):
(WebCore::SecurityOrigin::setDomainFromDOM):
(WebCore::SecurityOrigin::grantUniversalAccess):
* page/SecurityOrigin.h:
(SecurityOrigin):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149869 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed EFL gardening.

Skip several remaining shadow dom tests and rebaseline a few others.

* platform/efl/TestExpectations:
* platform/efl/fast/images/crossfade-client-not-removed-crash-expected.txt: Added.
* platform/efl/fast/js/dom-static-property-for-in-iteration-expected.txt:
* platform/efl/inspector/console/command-line-api-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149870 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove ScriptInstance.h
https://bugs.webkit.org/show_bug.cgi?id=115900

Reviewed by Andreas Kling.

Remove yet another abstraction now that we don't support V8.

* GNUmakefile.list.am:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/ScriptController.h:
(Bindings):
(ScriptController):
* bindings/js/ScriptControllerMac.mm:
(WebCore::ScriptController::createScriptInstanceForWidget):
* bindings/js/ScriptInstance.h: Removed.
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::getInstance):
* html/HTMLPlugInElement.h:
(Bindings):
(HTMLPlugInElement):
* platform/graphics/wince/MediaPlayerProxy.h:
(WebMediaPlayerProxy):
* rendering/RenderEmbeddedObject.cpp:
* rendering/RenderSnapshottedPlugIn.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening.

* platform/qt/fast/js/global-constructors-attributes-expected.txt: Rebaselining after r149845.
* platform/qt/inspector/console/command-line-api-expected.txt: Added after r149829.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149872 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix build.

* bindings/js/ScriptController.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149873 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed EFL gardening.

Rebaseline fast/dom/Range/getClientRects.html for EFL port.
Skip accessibility/poorly-formed-aria-table.html introduced in
r149858 but failing on EFL port.

* platform/efl/TestExpectations:
* platform/efl/fast/dom/Range/getClientRects-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149874 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Move myself to the reviewers list.

* Scripts/webkitpy/common/config/contributors.json:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149875 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix build after r149864.

Unreviewed build fix.

* loader/ThreadableLoader.h: include <wtf/text/AtomicString.h>
when building with RESOURCE_TIMING enabled.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149876 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add my new address to contributors.json. (Unreviewed)

* Scripts/webkitpy/common/config/contributors.json:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149877 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Fix the ENABLE(SHARED_WORKERS) build after r149864.

* workers/SharedWorkerThread.cpp: include "SecurityOrigin.h"

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149878 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Remove unnecessary GLIB_CHECK_VERSION #ifdefs
https://bugs.webkit.org/show_bug.cgi?id=115904

Reviewed by Martin Robinson.

Source/WebCore:

* bindings/gobject/WebKitDOMEventTarget.cpp:
* platform/gtk/GtkVersioning.c:
* platform/gtk/GtkVersioning.h:

Source/WebKit2:

* UIProcess/API/gtk/tests/TestInspectorServer.cpp:
(startTestServerMonitor):
* UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp:
(startTestServerMonitor):

Source/WTF:

* wtf/gobject/GRefPtr.cpp:

Tools:

* ImageDiff/gtk/ImageDiff.cpp:
(main):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149879 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don't trust character widths for internal OS X fonts in form controls
https://bugs.webkit.org/show_bug.cgi?id=115883
<rdar://problem/13817757>

Reviewed by Darin Adler.

We ignore the character width for a bunch of fonts when predicting
the width of a form control. Some of the internal fonts in OS X are
not in the ignored list. Rather than add them, simply test for
fonts whose family begins with a period character ".".

* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::hasValidAvgCharWidth): Return false for
    any family that starts with "."

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149880 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r149652): Videos do not play on cnn.com, just black box
https://bugs.webkit.org/show_bug.cgi?id=115887

Reviewed by Antti Koivisto.

Source/WebCore:

The bug was caused by window and document named item maps counting the same element twice
when it has the same id and name attribute values. Fixed the bug by avoiding to add or remove
an element per id and name attribute updates when it had already been added or removed by
name and id attribute updates respectively.

We do this by checking whether the other attribute affects the element's precense in window
and document named item maps and avoiding to add or remove the attribute when they do and
the other attribute is present in updateId and updateName.

Consider a scenario when an object element has id "foo", and name attribute is about to be also
set to "foo". If the id attribute doesn't affect element's presense in window or document
named item maps, we're done. If it does, then the maps already have this element so we don't
want to add it again. Conversely, if the element already has id and name attributes set to
"foo", and we're moving the id attribute, then we want to remove the element from the maps only
if the id doesn't affect the presence of the element in the maps.

Unfortuntely, this logic doesn't work when we're inserting or removing an element on its entirely
because updateId and updateName are called when both id and name attributes are present so skip
this step (AlwaysUpdateHTMLDocumentNamedItemMaps) for the id attribute to break the symmetry.

Test: fast/dom/HTMLDocument/image-with-same-id-and-name.html
      fast/dom/HTMLDocument/object-with-same-id-and-name.html

* dom/Element.cpp:
(WebCore::Element::insertedInto): Call updateId and updateName with
AlwaysUpdateHTMLDocumentNamedItemMaps.
(WebCore::Element::removedFrom): Ditto.
(WebCore::Element::updateName): Don't add or remove this element if the id attribute has already
done so except when we're inserting, removing, or cloning an element.
(WebCore::Element::updateId): Ditto for the name attribute.
(WebCore::Element::cloneAttributesFromElement): Added a comment and assert that we never call this
function when this element is in the document. We can't update window and documemt named item
maps here because image element's id attribute value, for example, is present in the document's
named item map if it has a name attribute. Since this function calls updateId and updateName
before updating attributes, this check is going to fail in DocumentNameCollection's
nodeMatchesIfIdAttributeMatch and bad things will happen.

* dom/Element.h:

* editing/ReplaceNodeWithSpanCommand.cpp:
(WebCore::swapInNodePreservingAttributesAndChildren): Clone children and attributes before
inserting the swapped span to avoid hitting the assertion in cloneAttributesFromElement we added.

* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute):

* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::updateDocNamedItem):

LayoutTests:

Add regression tests.

* fast/dom/HTMLDocument/image-with-same-id-and-name-expected.txt: Added.
* fast/dom/HTMLDocument/image-with-same-id-and-name.html: Added.
* fast/dom/HTMLDocument/object-with-same-id-and-name-expected.txt: Added.
* fast/dom/HTMLDocument/object-with-same-id-and-name.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149881 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove MemoryUsageSupport class
https://bugs.webkit.org/show_bug.cgi?id=115913

Reviewed by Andreas Kling.

MemoryUsageSupport was just used by a single call site in InspectorTimelineAgent,
and the function called always returns zero on all platforms! Remove it.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorMemoryAgent.cpp:
* inspector/InspectorTimelineAgent.cpp:
(WebCore):
(WebCore::InspectorTimelineAgent::setNativeHeapStatistics):
* platform/MemoryUsageSupport.cpp: Removed.
* platform/MemoryUsageSupport.h: Removed.
* platform/qt/MemoryUsageSupportQt.cpp: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149882 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Module Cairo fails to build under jhbuild
https://bugs.webkit.org/show_bug.cgi?id=115854

Patch by Brian Holt <brian.holt@samsung.com> on 2013-05-10
Reviewed by Martin Robinson.

Make cairo depend on glib in jhbuild.modules.

* gtk/jhbuild.modules:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149883 268f45cc-cd09-0410-ab3c-d52691b4dbfc