Buildfix after r158182 for GCC 4.6
https://bugs.webkit.org/show_bug.cgi?id=123442

Patch by Jozsef Berta <jberta@inf.u-szeged.hu> on 2013-11-04
Reviewed by Csaba Osztrogonác.

Added explicit "friend class", because  GCC 4.6 doesn't support extended friend declaration (c++11)

* dom/ScopedEventQueue.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158566 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make more CSSValue subclass constructors return PassRef.
<https://webkit.org/b/123731>

Make the constructor helpers for the following classes return
PassRef instead of PassRefPtr:

    - CSSFontValue
    - CSSImageSetValue
    - CSSUnicodeRangeValue
    - WebKitCSSArrayFunctionValue
    - WebKitCSSFilterValue
    - WebKitCSSMatFunctionValue
    - WebKitCSSMixFunctionValue
    - WebKitCSSShaderValue
    - WebKitCSSTransformValue

Reviewed by Antti Koivisto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158567 268f45cc-cd09-0410-ab3c-d52691b4dbfc
HTMLAllCollection is always rooted at a Document.
<https://webkit.org/b/123724>

Tighten up HTMLAllCollection by making the constructor take a
Document& instead of a ContainerNode&. Drive-by application of
FINAL and PassRef also happened.

Reviewed by Antti Koivisto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158568 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[webcore/dom] Remove extra header includes from cpp files.
https://bugs.webkit.org/show_bug.cgi?id=123720

Patch by Santosh Mahto <santosh.ma@samsung.com> on 2013-11-04
Reviewed by Andreas Kling.

Removing redundant headers from dom related cpp files.

* dom/Attr.cpp:
* dom/CharacterData.cpp:
* dom/ChildListMutationScope.cpp:
* dom/ChildNodeList.cpp:
* dom/ContainerNode.cpp:
* dom/ContainerNodeAlgorithms.cpp:
* dom/DOMNamedFlowCollection.cpp:
* dom/DatasetDOMStringMap.cpp:
* dom/Document.cpp:
* dom/DocumentEventQueue.cpp:
* dom/DocumentMarkerController.cpp:
* dom/DocumentOrderedMap.cpp:
* dom/DocumentStyleSheetCollection.cpp:
* dom/Element.cpp:
* dom/ElementRareData.cpp:
* dom/Event.cpp:
* dom/EventContext.cpp:
* dom/EventDispatcher.cpp:
* dom/EventTarget.cpp:
* dom/ExceptionBase.cpp:
* dom/FocusEvent.cpp:
* dom/InlineStyleSheetOwner.cpp:
* dom/KeyboardEvent.cpp:
* dom/LiveNodeList.cpp:
* dom/MessageEvent.cpp:
* dom/MessagePort.cpp:
* dom/MouseRelatedEvent.cpp:
* dom/MutationEvent.cpp:
* dom/MutationObserver.cpp:
* dom/MutationObserverInterestGroup.cpp:
* dom/MutationObserverRegistration.cpp:
* dom/MutationRecord.cpp:
* dom/NameNodeList.cpp:
* dom/NamedFlowCollection.cpp:
* dom/NamedNodeMap.cpp:
* dom/Node.cpp:
* dom/NodeIterator.cpp:
* dom/NodeTraversal.cpp:
* dom/PositionIterator.cpp:
* dom/ProcessingInstruction.cpp:
* dom/Range.cpp:
* dom/RegisteredEventListener.cpp:
* dom/ScopedEventQueue.cpp:
* dom/ScriptElement.cpp:
* dom/ScriptRunner.cpp:
* dom/SelectorQuery.cpp:
* dom/ShadowRoot.cpp:
* dom/StyledElement.cpp:
* dom/TagNodeList.cpp:
* dom/Text.cpp:
* dom/TextEvent.cpp:
* dom/TouchEvent.cpp:
* dom/TreeScope.cpp:
* dom/TreeScopeAdopter.cpp:
* dom/TreeWalker.cpp:
* dom/UIEvent.cpp:
* dom/UserActionElementSet.cpp:
* dom/UserTypingGestureIndicator.cpp:
* dom/VisitedLinkState.cpp:
* dom/WebKitNamedFlow.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158569 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION: RenderStyle is leaked when not creating renderer for display:none
<https://webkit.org/b/123726>

Source/WebCore:

Explicitly drop the RenderStyle reference in RenderElement::createFor
if we decide to not create any renderer.

Reviewed by Antti Koivisto.

Test: fast/css/renderstyle-leak-with-display-none.html

* rendering/RenderElement.cpp:
(WebCore::RenderElement::createFor):

LayoutTests:

Reviewed by Antti Koivisto.

* fast/css/renderstyle-leak-with-display-none-expected.txt: Added.
* fast/css/renderstyle-leak-with-display-none.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158570 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LabelsNodeList always is always rooted at a LabelableElement.
<https://webkit.org/b/123730>

Tighten up LabelsNodeList by enforcing that it's only rooted to
a LabelableElement. Also marked the class FINAL and made its
create() helper return PassRef.

Reviewed by Antti Koivisto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158571 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Some more RenderChildIterator deployment.
<https://webkit.org/b/123735>

Convert another handful of loops to use childrenOfType<RenderFoo>
iterators, mostly for skipping over uninteresting text renderers.

Reviewed by Antti Koivisto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158572 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CSSPrimitiveValue color constructors should return PassRef.
<https://webkit.org/b/123728>

Make CSSPrimitiveValue::createColor() and the corresponding
CSSValuePool helper functions return PassRef<CSSPrimitiveValue>.

Also made CSSValuePool slightly less stupid when hitting the upper
size limit on the color value cache: instead of throwing out cache
and rebuilding it from scratch, just remove one value at random.

Reviewed by Antti Koivisto.


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