RenderScrollbar: Map of scrollbar parts should use RenderPtr.
<https://webkit.org/b/126367>

Turn RenderScrollbar::m_parts into HashMap of RenderPtrs. This makes
renderer destruction automatic and lets us remove some code.

Reviewed by Antti Koivisto.

* rendering/RenderPtr.h:

    Add HashTraits for RenderPtr so we can use them as values in
    WTF hash tables.

* rendering/RenderScrollbar.h:
* rendering/RenderScrollbar.cpp:
(WebCore::RenderScrollbar::~RenderScrollbar):
(WebCore::RenderScrollbar::setParent):
(WebCore::RenderScrollbar::updateScrollbarParts):
(WebCore::RenderScrollbar::updateScrollbarPart):

    Remove now-unneeded kludges of logic to manually delete scrollbar
    part renderers in various scenarios.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161200 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Unreviewed build fix after r160903 when ACCESSIBILITY is disabled

* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::children):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161201 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the build by exposing some more scrolling state node headers
as Private in WebCore.framework.

* WebCore.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161202 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove ChromeClient::fullScreenRendererChanged().
<https://webkit.org/b/126370>

This hook was added in r75277 to notify WebFullScreenController when
the full screen renderer changed. In r110216 the code was refactored,
making this notification unnecessary.

Reviewed by Antti Koivisto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove stale ScriptProfiler methods
https://bugs.webkit.org/show_bug.cgi?id=126373

Reviewed by Darin Adler.

No new tests, No change behavior.

* bindings/js/ScriptProfiler.h: Remove dead code.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161204 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove public attachRenderTree
https://bugs.webkit.org/show_bug.cgi?id=126368

Reviewed by Andreas Kling.

Remove the remaining explicit render tree construction.

* dom/Document.cpp:
(WebCore::Document::createRenderTree):
        
   Use recalcStyle() instead of calling attachRenderTree directly.

* html/HTMLViewSourceDocument.cpp:
(WebCore::HTMLViewSourceDocument::addText):
        
    Remove forgotten attachTextRenderer.

* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::InsertionPoint):
        
    Remove willAttachRenderers/didAttachRenderers hack.

* html/shadow/InsertionPoint.h:
(WebCore::toInsertionPoint):
* loader/PlaceholderDocument.cpp:
(WebCore::PlaceholderDocument::createRenderTree):
        
    Seriously, nothing to do here.

* style/StyleResolveTree.cpp:
(WebCore::Style::attachDistributedChildren):
(WebCore::Style::attachChildren):
(WebCore::Style::detachDistributedChildren):
(WebCore::Style::detachChildren):
        
    Making attaching and detaching distributed insertion point children part of ResolveTree internals.

* style/StyleResolveTree.h:
        
    Remove interfaces with no clients.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Attempt to fix the build of WebCore's code generator on CMake based system
https://bugs.webkit.org/show_bug.cgi?id=126271

Reviewed by Sam Weinig.

* CMakeLists.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161206 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove PlaceholderDocument
https://bugs.webkit.org/show_bug.cgi?id=126382

Reviewed by Andreas Kling.

Remove PlaceholderDocument class and replace it with a bit in Document.

* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::createRenderTree):
* dom/Document.h:
        
    Also make Synthesized a construction flag instead of a boolean parameter.

(WebCore::Document::createNonRenderedPlaceholder):
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::HTMLDocument):
* html/HTMLDocument.h:
(WebCore::HTMLDocument::create):
(WebCore::HTMLDocument::createSynthesizedDocument):
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::createDocument):
* loader/PlaceholderDocument.cpp: Removed.
* loader/PlaceholderDocument.h: Removed.
* pdf/ios/PDFDocument.h:
(WebCore::PDFDocument::PDFDocument):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161207 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Always resolve style from root
https://bugs.webkit.org/show_bug.cgi?id=126380

Reviewed by Andreas Kling.
        
Forced style resolve that does not start from the root is never really correct. 
Remove the few remaining instances.

* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::setResetStyleInheritance):
        
    Update style asynchronously.

* dom/ShadowRoot.h:
* dom/Text.h:
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::createElementRenderer):
(WebCore::HTMLPlugInImageElement::documentWillSuspendForPageCache):
(WebCore::HTMLPlugInImageElement::documentDidResumeFromPageCache):
        
    Delete the render tree synchronously on suspend and rebuild it asynchronously on resume.
    No need for m_customStyleForPageCache hack.

* html/HTMLPlugInImageElement.h:
        
    Remove m_customStyleForPageCache.

* style/StyleResolveTree.cpp:
* style/StyleResolveTree.h:
        
    Remove Element version of resolveTree from the interface.

* svg/SVGUseElement.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161208 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Support <box> values computed style for 'clip-path' property
https://bugs.webkit.org/show_bug.cgi?id=126148

Reviewed by Simon Fraser.

Source/WebCore:

Calculate computed style for 'clip-path' property.

Updated tests to check for computed style.

* css/BasicShapeFunctions.cpp: Add box value bounding-box.
(WebCore::valueForBox):
(WebCore::boxForValue):
* css/CSSComputedStyleDeclaration.cpp: Return the computed style
    for 'clip-path'.
(WebCore::ComputedStyleExtractor::propertyValue):
* css/DeprecatedStyleBuilder.cpp: Create CSSValueLists for 'clip-th'.
(WebCore::ApplyPropertyClipPath::applyValue):
* rendering/ClipPathOperation.h: Add bounding-box value.
(WebCore::ShapeClipPathOperation::pathForReferenceRect):
(WebCore::ShapeClipPathOperation::setReferenceBox):
(WebCore::ShapeClipPathOperation::referenceBox):
(WebCore::BoxClipPathOperation::create):
(WebCore::BoxClipPathOperation::pathForReferenceRect):
(WebCore::BoxClipPathOperation::referenceBox):
(WebCore::BoxClipPathOperation::BoxClipPathOperation):
* rendering/shapes/ShapeInfo.h: Add bounding-box value.
(WebCore::ShapeInfo::setShapeSize):
(WebCore::ShapeInfo::logicalTopOffset):
(WebCore::ShapeInfo::logicalLeftOffset):
* rendering/style/BasicShapes.cpp: Add bounding-box value.
(WebCore::BasicShape::referenceBoxSize):
* rendering/style/BasicShapes.h:

LayoutTests:

Test computed style of 'clip-path' property.

* fast/masking/parsing-clip-path-shape.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161209 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Simplify the insides of DocumentSharedObjectPool and reduce memory usage.

Merging Blink r164152 by Elliott Sprehn.

Instead of storing an OwnPtr to an object that has a pointer to the
ShareableElementData as well as a pointer into the ShareableElementData
and the length we can just store a RefPtr to the SharableElementData.

This also reduces the memory usage of the pool by 2 pointers per entry.

* dom/DocumentSharedObjectPool.h:
* dom/DocumentSharedObjectPool.cpp:
(WebCore::attributeHash):
(WebCore::hasSameAttributes):
(WebCore::DocumentSharedObjectPool::cachedShareableElementDataWithAttributes):

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