Node constructor should take Document reference
https://bugs.webkit.org/show_bug.cgi?id=128931

Reviewed by Geoff Garen.

* dom/Attr.cpp:
(WebCore::Attr::Attr):
* dom/CharacterData.h:
(WebCore::CharacterData::CharacterData):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::~ContainerNode):
* dom/ContainerNode.h:
(WebCore::ContainerNode::ContainerNode):
* dom/Document.cpp:
(WebCore::Document::Document):
* dom/Document.h:
(WebCore::Node::Node):
* dom/DocumentFragment.cpp:
(WebCore::DocumentFragment::DocumentFragment):
(WebCore::DocumentFragment::create):
* dom/DocumentFragment.h:
* dom/DocumentType.cpp:
(WebCore::DocumentType::DocumentType):
* dom/Element.h:
(WebCore::Element::Element):
* dom/Entity.h:
(WebCore::Entity::Entity):
* dom/EntityReference.cpp:
(WebCore::EntityReference::EntityReference):
* dom/Node.cpp:
(WebCore::Node::~Node):
(WebCore::Node::willBeDeletedFrom):
* dom/Node.h:
* dom/Notation.cpp:
* dom/Notation.h:
(WebCore::Notation::publicId):
(WebCore::Notation::systemId):
(WebCore::Notation::Notation):
        
    Remove cruft from this non-instantiated class.

* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::ShadowRoot):
(WebCore::ShadowRoot::~ShadowRoot):
* dom/TemplateContentDocumentFragment.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164248 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: Invalid cast in WebCore::AccessibilityTable::isDataTable (CRBug 280352)
<https://webkit.org/b/128925>
<rdar://problem/16087351>

Merged from Blink (patch by Dominic Mazzoni):
https://src.chromium.org/viewvc/blink?revision=159711&view=revision

Reviewed by Oliver Hunt.

Source/WebCore: 

Don't cast to a table cell element unless we are sure it is one.

Test: accessibility/display-table-cell-causes-crash.html

* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::isDataTable):

LayoutTests: 

* accessibility/display-table-cell-causes-crash-expected.txt: Added.
* accessibility/display-table-cell-causes-crash.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164249 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Win] There's another Windows SDK. Make sure we recognize it.
https://bugs.webkit.org/show_bug.cgi?id=128932

Reviewed by Tim Horton.

* Scripts/webkitpy/port/win.py:
(WinPort._ntsd_location):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164250 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make TreeScope::rootNode return a reference
https://bugs.webkit.org/show_bug.cgi?id=128934

Reviewed by Andreas Kling.

It is never null.

* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::collectMatchingRules):
* dom/ContainerNode.h:
(WebCore::Node::isTreeScope):
* dom/Document.cpp:
(WebCore::Document::buildAccessKeyMap):
* dom/DocumentOrderedMap.cpp:
(WebCore::DocumentOrderedMap::add):
(WebCore::DocumentOrderedMap::get):
(WebCore::DocumentOrderedMap::getAllElementsById):
* dom/EventDispatcher.cpp:
(WebCore::EventRelatedNodeResolver::moveToParentOrShadowHost):
(WebCore::eventTargetRespectingTargetRules):
(WebCore::shouldEventCrossShadowBoundary):
* dom/Node.cpp:
(WebCore::Node::containingShadowRoot):
(WebCore::Node::removedFrom):
* dom/ShadowRoot.h:
(WebCore::isShadowRoot):
* dom/TreeScope.h:
(WebCore::TreeScope::rootNode):
* page/DOMSelection.cpp:
(WebCore::DOMSelection::DOMSelection):
* page/DragController.cpp:
(WebCore::asFileInput):
* page/FocusController.cpp:
(WebCore::FocusNavigationScope::rootNode):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164251 268f45cc-cd09-0410-ab3c-d52691b4dbfc
box-shadows get truncated with a combination of transforms and clip: (affects Google Maps)
https://bugs.webkit.org/show_bug.cgi?id=128937

Source/WebCore:

Reviewed by Dean Jackson.

RenderLayer::calculateLayerBounds() incorrectly assumed that if localClipRect() returns
a non-infinite rect, that rect is OK to use as the compositing bounds.

That is not a valid assumption when clip() has a larger rect than the element (e.g.
with negative top/left in the rect). In that case, localClipRect() still just
returns the background rect, but we actually need a larger compositing layer
to show the unclipped parts of descendants.

Fix by detecting clip() that exceeds the renderer bounds, and when it does,
not early returning in the UseLocalClipRectIfPossible clause.

Test: compositing/geometry/css-clip-oversize.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::localClipRect): Do a convertToLayerCoords()
because we need offsetFromRoot later, and we can pass our value down to
calculateRects(). Compute clipExceedsBounds based on the CSS clip rect.
(WebCore::RenderLayer::calculateClipRects): Don't early return if clipExceedsBounds
is true.
* rendering/RenderLayer.h:

LayoutTests:

Reviewed by Dean Jackson.

Test with CSS clip() with a rect larger than the border box, and compositing.

* compositing/geometry/clip-expected.txt: New expectation. This is a progression.
* compositing/geometry/css-clip-oversize-expected.html: Added.
* compositing/geometry/css-clip-oversize.html: Added.

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

* platform/win/TestExpectations: Remove a few duplicate test statements, as well as
some removed test cases.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove view source code
https://bugs.webkit.org/show_bug.cgi?id=127233

Reviewed by Antti Koivisto.

Source/WebCore:

* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::canExecuteScripts):
* css/CSSDefaultStyleSheets.cpp:
* css/CSSDefaultStyleSheets.h:
* css/DocumentRuleSets.cpp:
(WebCore::DocumentRuleSets::appendAuthorStyleSheets):
(WebCore::DocumentRuleSets::collectFeatures):
* css/DocumentRuleSets.h:
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::matchUARules):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::appendAuthorStyleSheets):
(WebCore::StyleResolver::styleForElement):
* css/view-source.css: Removed.
* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocument):
* dom/DOMImplementation.h:
* dom/Document.cpp:
(WebCore::Document::Document):
* dom/Document.h:
* html/HTMLAttributeNames.in:
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::HTMLFrameElementBase):
(WebCore::HTMLFrameElementBase::openURL):
* html/HTMLFrameElementBase.h:
* html/HTMLViewSourceDocument.cpp: Removed.
* html/HTMLViewSourceDocument.h: Removed.
* html/parser/HTMLToken.h:
* html/parser/HTMLViewSourceParser.cpp: Removed.
* html/parser/HTMLViewSourceParser.h: Removed.
* html/parser/TextViewSourceParser.cpp: Removed.
* html/parser/TextViewSourceParser.h: Removed.
* inspector/InspectorOverlayPage.css:
(.tag-name):
(.node-id):
(.class-name):
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::createDocument):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::receivedFirstData):
* page/Frame.cpp:
(WebCore::Frame::Frame):
* page/Frame.h:
* xml/DOMParser.cpp:
(WebCore::DOMParser::parseFromString):
* xml/XMLViewer.css:
(.tag):
* xml/XSLTProcessor.cpp:
(WebCore::XSLTProcessor::createDocumentFromSource):

Source/WebKit/mac:

* WebView/WebView.mm:
* WebView/WebViewPrivate.h:

Source/WebKit/win:

* WebFrame.cpp:
(WebFrame::inViewSourceMode):
(WebFrame::setInViewSourceMode):
* WebView.cpp:
(WebView::setInViewSourceMode):
(WebView::inViewSourceMode):

Source/WebKit2:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164254 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Stop using isMainThread() in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=128940
<rdar://problem/15963666>

Reviewed by Enrica Casucci.

Since isMainThread() has a different meaning when the web thread is enabled on iOS,
just use RunLoop::isMain() to check if we're executing on the main thread.

* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::ensurePathExists):
(WebKit::DatabaseProcess::postDatabaseTask):
(WebKit::DatabaseProcess::performNextDatabaseTask):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::shutdown):
(WebKit::UniqueIDBDatabase::shutdownBackingStore):
(WebKit::UniqueIDBDatabase::didShutdownBackingStore):
(WebKit::UniqueIDBDatabase::deleteDatabase):
(WebKit::UniqueIDBDatabase::getOrEstablishIDBDatabaseMetadata):
(WebKit::UniqueIDBDatabase::openBackingStoreAndReadMetadata):
(WebKit::UniqueIDBDatabase::didOpenBackingStoreAndReadMetadata):
(WebKit::UniqueIDBDatabase::postTransactionOperation):
(WebKit::UniqueIDBDatabase::didCompleteTransactionOperation):
(WebKit::UniqueIDBDatabase::changeDatabaseVersion):
(WebKit::UniqueIDBDatabase::createObjectStore):
(WebKit::UniqueIDBDatabase::deleteObjectStore):
(WebKit::UniqueIDBDatabase::clearObjectStore):
(WebKit::UniqueIDBDatabase::createIndex):
(WebKit::UniqueIDBDatabase::deleteIndex):
(WebKit::UniqueIDBDatabase::putRecord):
(WebKit::UniqueIDBDatabase::getRecord):
(WebKit::UniqueIDBDatabase::openCursor):
(WebKit::UniqueIDBDatabase::cursorAdvance):
(WebKit::UniqueIDBDatabase::cursorIterate):
(WebKit::UniqueIDBDatabase::count):
(WebKit::UniqueIDBDatabase::deleteRange):
(WebKit::UniqueIDBDatabase::openBackingStoreTransaction):
(WebKit::UniqueIDBDatabase::beginBackingStoreTransaction):
(WebKit::UniqueIDBDatabase::commitBackingStoreTransaction):
(WebKit::UniqueIDBDatabase::resetBackingStoreTransaction):
(WebKit::UniqueIDBDatabase::rollbackBackingStoreTransaction):
(WebKit::UniqueIDBDatabase::changeDatabaseVersionInBackingStore):
(WebKit::UniqueIDBDatabase::createObjectStoreInBackingStore):
(WebKit::UniqueIDBDatabase::deleteObjectStoreInBackingStore):
(WebKit::UniqueIDBDatabase::clearObjectStoreInBackingStore):
(WebKit::UniqueIDBDatabase::createIndexInBackingStore):
(WebKit::UniqueIDBDatabase::deleteIndexInBackingStore):
(WebKit::UniqueIDBDatabase::putRecordInBackingStore):
(WebKit::UniqueIDBDatabase::getRecordFromBackingStore):
(WebKit::UniqueIDBDatabase::openCursorInBackingStore):
(WebKit::UniqueIDBDatabase::absoluteDatabaseDirectory):
(WebKit::UniqueIDBDatabase::postMainThreadTask):
(WebKit::UniqueIDBDatabase::performNextMainThreadTask):
(WebKit::UniqueIDBDatabase::postDatabaseTask):
(WebKit::UniqueIDBDatabase::performNextDatabaseTask):
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::generateDatabaseId):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::UniqueIDBDatabaseBackingStoreSQLite):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::~UniqueIDBDatabaseBackingStoreSQLite):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::extractExistingMetadata):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::openSQLiteDatabaseAtPath):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getOrEstablishMetadata):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::establishTransaction):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::beginTransaction):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::commitTransaction):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::resetTransaction):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::rollbackTransaction):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::changeDatabaseVersion):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::createObjectStore):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteObjectStore):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::clearObjectStore):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::createIndex):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteIndex):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::generateKeyNumber):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::updateKeyGeneratorNumber):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::keyExistsInObjectStore):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::putRecord):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::putIndexRecord):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getIndexRecord):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteRecord):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteRange):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRecordFromObjectStore):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRangeRecordFromObjectStore):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::count):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::openCursor):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::advanceCursor):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::iterateCursor):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::notifyCursorsOfChanges):
* NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
(WebKit::NetworkBlobRegistry::shared):
* NetworkProcess/HostRecord.cpp:
(WebKit::HostRecord::scheduleResourceLoader):
(WebKit::HostRecord::addLoaderInProgress):
(WebKit::HostRecord::removeLoader):
* NetworkProcess/NetworkResourceLoadScheduler.cpp:
(WebKit::NetworkResourceLoadScheduler::removeLoader):
(WebKit::NetworkResourceLoadScheduler::receivedRedirect):
(WebKit::NetworkResourceLoadScheduler::removeScheduledLoaders):
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::NetworkResourceLoader):
(WebKit::NetworkResourceLoader::~NetworkResourceLoader):
(WebKit::NetworkResourceLoader::start):
(WebKit::NetworkResourceLoader::cleanup):
(WebKit::NetworkResourceLoader::abort):
(WebKit::NetworkResourceLoader::willSendRequestAsync):
(WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
* NetworkProcess/NetworkResourceLoader.h:
(WebKit::NetworkResourceLoader::setHostRecord):
(WebKit::NetworkResourceLoader::hostRecord):
* NetworkProcess/mac/DiskCacheMonitor.mm:
(WebKit::DiskCacheMonitor::DiskCacheMonitor):
* Shared/AsyncRequest.cpp:
(WebKit::generateRequestID):
* Shared/Authentication/AuthenticationManager.cpp:
(WebKit::generateAuthenticationChallengeID):
(WebKit::AuthenticationManager::establishIdentifierForChallenge):
(WebKit::AuthenticationManager::useCredentialForChallenge):
(WebKit::AuthenticationManager::continueWithoutCredentialForChallenge):
(WebKit::AuthenticationManager::cancelChallenge):
* Shared/Downloads/mac/DownloadMac.mm:
(dispatchOnMainThread):
* Shared/Plugins/NPObjectProxy.cpp:
(WebKit::NPObjectProxy::~NPObjectProxy):
* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
(WebKit::getPluginInfoFromCarbonResources):
* Shared/SessionTracker.cpp:
(WebKit::staticSessionMap):
(WebKit::storageSessionToID):
(WebKit::identifierBase):
(WebKit::SessionTracker::destroySession):
(WebKit::SessionTracker::setIdentifierBase):
* UIProcess/APISession.cpp:
(API::generateID):
(API::Session::defaultSession):
(API::Session::legacyPrivateSession):
* WebProcess/Cookies/WebCookieManager.cpp:
(WebKit::WebCookieManager::dispatchCookiesDidChange):
* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
(WebKit::WebIDBFactoryBackend::open):
(WebKit::WebIDBFactoryBackend::deleteDatabase):
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::generateServerConnectionIdentifier):
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::storageSession):
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::dispatchWheelEvent):

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