Remove public attachRenderTree
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-01-01  Antti Koivisto  <antti@apple.com>
2
3         Remove public attachRenderTree
4         https://bugs.webkit.org/show_bug.cgi?id=126368
5
6         Reviewed by Andreas Kling.
7
8         Remove the remaining explicit render tree construction.
9
10         * dom/Document.cpp:
11         (WebCore::Document::createRenderTree):
12         
13            Use recalcStyle() instead of calling attachRenderTree directly.
14
15         * html/HTMLViewSourceDocument.cpp:
16         (WebCore::HTMLViewSourceDocument::addText):
17         
18             Remove forgotten attachTextRenderer.
19
20         * html/shadow/InsertionPoint.cpp:
21         (WebCore::InsertionPoint::InsertionPoint):
22         
23             Remove willAttachRenderers/didAttachRenderers hack.
24
25         * html/shadow/InsertionPoint.h:
26         (WebCore::toInsertionPoint):
27         * loader/PlaceholderDocument.cpp:
28         (WebCore::PlaceholderDocument::createRenderTree):
29         
30             Seriously, nothing to do here.
31
32         * style/StyleResolveTree.cpp:
33         (WebCore::Style::attachDistributedChildren):
34         (WebCore::Style::attachChildren):
35         (WebCore::Style::detachDistributedChildren):
36         (WebCore::Style::detachChildren):
37         
38             Making attaching and detaching distributed insertion point children part of ResolveTree internals.
39
40         * style/StyleResolveTree.h:
41         
42             Remove interfaces with no clients.
43
44 2014-01-01  Seokju Kwon  <seokju@webkit.org>
45
46         Remove stale ScriptProfiler methods
47         https://bugs.webkit.org/show_bug.cgi?id=126373
48
49         Reviewed by Darin Adler.
50
51         No new tests, No change behavior. 
52
53         * bindings/js/ScriptProfiler.h: Remove dead code.
54
55 2014-01-01  Andreas Kling  <akling@apple.com>
56
57         Remove ChromeClient::fullScreenRendererChanged().
58         <https://webkit.org/b/126370>
59
60         This hook was added in r75277 to notify WebFullScreenController when
61         the full screen renderer changed. In r110216 the code was refactored,
62         making this notification unnecessary.
63
64         Reviewed by Antti Koivisto.
65
66 2014-01-01  Simon Fraser  <simon.fraser@apple.com>
67
68         Fix the build by exposing some more scrolling state node headers
69         as Private in WebCore.framework.
70
71         * WebCore.xcodeproj/project.pbxproj:
72
73 2014-01-01  Ryuan Choi  <ryuan.choi@samsung.com>
74
75         [EFL] Unreviewed build fix after r160903 when ACCESSIBILITY is disabled
76
77         * accessibility/AccessibilityObject.h:
78         (WebCore::AccessibilityObject::children):
79
80 2014-01-01  Andreas Kling  <akling@apple.com>
81
82         RenderScrollbar: Map of scrollbar parts should use RenderPtr.
83         <https://webkit.org/b/126367>
84
85         Turn RenderScrollbar::m_parts into HashMap of RenderPtrs. This makes
86         renderer destruction automatic and lets us remove some code.
87
88         Reviewed by Antti Koivisto.
89
90         * rendering/RenderPtr.h:
91
92             Add HashTraits for RenderPtr so we can use them as values in
93             WTF hash tables.
94
95         * rendering/RenderScrollbar.h:
96         * rendering/RenderScrollbar.cpp:
97         (WebCore::RenderScrollbar::~RenderScrollbar):
98         (WebCore::RenderScrollbar::setParent):
99         (WebCore::RenderScrollbar::updateScrollbarParts):
100         (WebCore::RenderScrollbar::updateScrollbarPart):
101
102             Remove now-unneeded kludges of logic to manually delete scrollbar
103             part renderers in various scenarios.
104
105 2014-01-01  Antti Koivisto  <antti@apple.com>
106
107         Remove reattachRenderTree
108         https://bugs.webkit.org/show_bug.cgi?id=126366
109
110         Reviewed by Andreas Kling.
111
112         Remove the last remaining client.
113
114         * html/HTMLSelectElement.cpp:
115         (WebCore::HTMLSelectElement::parseAttribute):
116         
117             Reconstruct render tree asynchronously.
118
119         (WebCore::HTMLSelectElement::scrollToSelection):
120         (WebCore::HTMLSelectElement::setOptionsChangedOnRenderer):
121         (WebCore::HTMLSelectElement::selectOption):
122         
123             It is not safe to cast the renderer based on usesMenuList test. Switch to RenderObject::isMenuList test.
124
125         (WebCore::HTMLSelectElement::parseMultipleAttribute):
126         
127             Reconstruct render tree asynchronously.
128
129         (WebCore::HTMLSelectElement::platformHandleKeydownEvent):
130         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
131         (WebCore::HTMLSelectElement::defaultEventHandler):
132         * style/StyleResolveTree.cpp:
133         * style/StyleResolveTree.h:
134         
135             Remove the function.
136
137 2014-01-01  Simon Fraser  <simon.fraser@apple.com>
138
139         Create a ThreadedScrollingTree subclass of ScrollingTree, and push all knowledge of the scrolling thread into it
140         https://bugs.webkit.org/show_bug.cgi?id=126362
141
142         Reviewed by Sam Weinig.
143
144         Eventually we'll have a ScrollingTree in situations where there is no scrolling
145         thread, so make the ScrollingTree base class thread-agnostic (but threadsafe),
146         and subclass it in ThreadedScrollingTree for scrolling-thread-specific functionality.
147         
148         The ScrollingTree base class also no longer needs to know about the
149         ScrollingCoordinator.
150
151         ScrollingCoordinatorMac creates a ThreadedScrollingTree.
152
153         * WebCore.exp.in:
154         * WebCore.xcodeproj/project.pbxproj: Add ThreadedScrollingTree.*
155         Make some headers Private that we'll need in WebKit2 soon.
156         * page/scrolling/ScrollingStateTree.h: Drive-by cleanup: clone() was unimplemented.
157         * page/scrolling/ScrollingTree.cpp:
158         (WebCore::ScrollingTree::ScrollingTree):
159         (WebCore::ScrollingTree::~ScrollingTree):
160         (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously): Wrap up some logic that
161         involves taking the mutex, so ThreadedScrollingTree can conveniently call it.
162         (WebCore::ScrollingTree::handleWheelEvent):
163         (WebCore::ScrollingTree::commitNewTreeState):
164         (WebCore::ScrollingTree::setMainFrameScrollPosition):
165         (WebCore::ScrollingTree::isHandlingProgrammaticScroll):
166         * page/scrolling/ScrollingTree.h:
167         (WebCore::ScrollingTree::isThreadedScrollingTree):
168         (WebCore::ScrollingTree::invalidate):
169         * page/scrolling/ThreadedScrollingTree.cpp: Added.
170         (WebCore::ThreadedScrollingTree::create):
171         (WebCore::ThreadedScrollingTree::ThreadedScrollingTree):
172         (WebCore::ThreadedScrollingTree::~ThreadedScrollingTree):
173         (WebCore::ThreadedScrollingTree::tryToHandleWheelEvent):
174         (WebCore::ThreadedScrollingTree::handleWheelEvent):
175         (WebCore::derefScrollingCoordinator):
176         (WebCore::ThreadedScrollingTree::invalidate):
177         (WebCore::ThreadedScrollingTree::commitNewTreeState):
178         (WebCore::ThreadedScrollingTree::updateMainFrameScrollPosition):
179         (WebCore::ThreadedScrollingTree::handleWheelEventPhase):
180         * page/scrolling/ThreadedScrollingTree.h: Added.
181         (WebCore::ThreadedScrollingTree::isThreadedScrollingTree):
182         * page/scrolling/mac/ScrollingCoordinatorMac.h:
183         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
184         (WebCore::ScrollingCoordinatorMac::ScrollingCoordinatorMac):
185         (WebCore::ScrollingCoordinatorMac::handleWheelEvent):
186
187 2014-01-01  Andreas Kling  <akling@apple.com>
188
189         FrameView: Store scroll corner renderer in a RenderPtr.
190         <https://webkit.org/b/126364>
191
192         Make FrameView::m_scrollCorner a RenderPtr<RenderScrollbarPart> and
193         remove two manual destroy() calls.
194
195         Reviewed by Antti Koivisto.
196
197 2014-01-01  Antti Koivisto  <antti@apple.com>
198
199         Remove elementChildren/elementDescendants shorthands
200         https://bugs.webkit.org/show_bug.cgi?id=126363
201
202         Reviewed by Anders Carlsson.
203
204         Just use childrenOfType<Element>/descendantsOfType<Element> instead. They are not that much longer
205         and consistency is valuable.
206
207         * accessibility/AccessibilityNodeObject.cpp:
208         (WebCore::AccessibilityNodeObject::canvasHasFallbackContent):
209         (WebCore::siblingWithAriaRole):
210         * accessibility/AccessibilityTable.cpp:
211         (WebCore::AccessibilityTable::isDataTable):
212         * css/StyleInvalidationAnalysis.cpp:
213         (WebCore::StyleInvalidationAnalysis::invalidateStyle):
214         * dom/ChildNodeList.cpp:
215         (WebCore::ChildNodeList::namedItem):
216         * dom/Document.cpp:
217         (WebCore::Document::buildAccessKeyMap):
218         (WebCore::Document::childrenChanged):
219         * dom/Element.cpp:
220         (WebCore::Element::resetComputedStyle):
221         * dom/ElementChildIterator.h:
222         * dom/ElementDescendantIterator.h:
223         * dom/SelectorQuery.cpp:
224         (WebCore::elementsForLocalName):
225         (WebCore::anyElement):
226         (WebCore::SelectorDataList::executeSingleTagNameSelectorData):
227         (WebCore::SelectorDataList::executeSingleClassNameSelectorData):
228         (WebCore::SelectorDataList::executeSingleSelectorData):
229         (WebCore::SelectorDataList::executeSingleMultiSelectorData):
230         * editing/ApplyStyleCommand.cpp:
231         (WebCore::ApplyStyleCommand::cleanupUnstyledAppleStyleSpans):
232         * editing/ReplaceSelectionCommand.cpp:
233         (WebCore::removeHeadContents):
234         * editing/markup.cpp:
235         (WebCore::completeURLs):
236         * html/HTMLFieldSetElement.cpp:
237         (WebCore::HTMLFieldSetElement::refreshElementsIfNeeded):
238         * html/HTMLObjectElement.cpp:
239         (WebCore::HTMLObjectElement::containsJavaApplet):
240         * loader/PlaceholderDocument.cpp:
241         (WebCore::PlaceholderDocument::createRenderTree):
242         * rendering/RenderChildIterator.h:
243         * svg/SVGSVGElement.cpp:
244         (WebCore::SVGSVGElement::getElementById):
245         * svg/SVGUseElement.cpp:
246         (WebCore::subtreeContainsDisallowedElement):
247         (WebCore::removeDisallowedElementsFromSubtree):
248
249 2014-01-01  Antti Koivisto  <antti@apple.com>
250
251         Do less synchronous render tree construction
252         https://bugs.webkit.org/show_bug.cgi?id=126359
253
254         Reviewed by Anders Carlsson.
255
256         Remove some now-unnecessary attachRenderTree calls.
257
258         * html/HTMLDetailsElement.cpp:
259         (WebCore::HTMLDetailsElement::parseAttribute):
260         * html/HTMLInputElement.cpp:
261         (WebCore::HTMLInputElement::parseAttribute):
262         * html/HTMLObjectElement.cpp:
263         (WebCore::HTMLObjectElement::renderFallbackContent):
264         * html/HTMLPlugInElement.cpp:
265         (WebCore::HTMLPlugInElement::didAddUserAgentShadowRoot):
266         * html/HTMLPlugInImageElement.cpp:
267         (WebCore::HTMLPlugInImageElement::willRecalcStyle):
268         (WebCore::HTMLPlugInImageElement::createShadowIFrameSubtree):
269         (WebCore::HTMLPlugInImageElement::restartSnapshottedPlugIn):
270         * html/HTMLViewSourceDocument.cpp:
271         (WebCore::HTMLViewSourceDocument::createContainingTable):
272         (WebCore::HTMLViewSourceDocument::addSpanWithClassName):
273         (WebCore::HTMLViewSourceDocument::addLine):
274         (WebCore::HTMLViewSourceDocument::finishLine):
275         (WebCore::HTMLViewSourceDocument::addBase):
276         (WebCore::HTMLViewSourceDocument::addLink):
277         * xml/XMLErrors.cpp:
278         (WebCore::XMLErrors::insertErrorMessageBlock):
279
280 2014-01-01  Simon Fraser  <simon.fraser@apple.com>
281
282         Updating the scrolling tree should use references to state nodes
283         https://bugs.webkit.org/show_bug.cgi?id=126360
284
285         Reviewed by Anders Carlsson.
286
287         Change functions related to ScrollingTreeNode updating to take
288         const references to state nodes rather than pointers.
289
290         * page/scrolling/ScrollingStateNode.h:
291         (WebCore::ScrollingStateNode::hasChangedProperty):
292         * page/scrolling/ScrollingTree.cpp:
293         (WebCore::ScrollingTree::commitNewTreeState):
294         (WebCore::ScrollingTree::updateTreeFromStateNode): The node can be nil so
295         this continues to take a pointer.
296         (WebCore::ScrollingTree::removeDestroyedNodes):
297         * page/scrolling/ScrollingTree.h:
298         * page/scrolling/ScrollingTreeNode.h:
299         (WebCore::ScrollingTreeNode::updateAfterChildren):
300         * page/scrolling/ScrollingTreeScrollingNode.cpp:
301         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
302         * page/scrolling/ScrollingTreeScrollingNode.h:
303         * page/scrolling/mac/ScrollingTreeFixedNode.h:
304         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
305         (WebCore::ScrollingTreeFixedNode::updateBeforeChildren):
306         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
307         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
308         (WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren):
309         (WebCore::ScrollingTreeScrollingNodeMac::updateAfterChildren):
310         * page/scrolling/mac/ScrollingTreeStickyNode.h:
311         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
312         (WebCore::ScrollingTreeStickyNode::updateBeforeChildren):
313
314 2014-01-01  Simon Fraser  <simon.fraser@apple.com>
315
316         Add a typedef for PlatformLayerID on GraphicsLayer, and migrate RemoteLayerTreeTransaction to use it
317         https://bugs.webkit.org/show_bug.cgi?id=126346
318
319         Reviewed by Tim Horton.
320
321         Remote scrolling tree code is soon going to use RemoteLayerTreeTransaction::LayerID,
322         so it makes more sense to put this layerID type on GraphicsLayer as
323         GraphicsLayer::PlatformLayerID.
324         
325         Also add some type cast macros for PlatformCALayer and subclasses, and use them
326         where appropriate.
327
328         * platform/graphics/GraphicsLayer.h:
329         * platform/graphics/ca/GraphicsLayerCA.cpp:
330         (WebCore::GraphicsLayerCA::setName):
331         * platform/graphics/ca/PlatformCALayer.h:
332         (WebCore::PlatformCALayer::isPlatformCALayerMac):
333         (WebCore::PlatformCALayer::isPlatformCALayerRemote):
334         (WebCore::PlatformCALayer::PlatformCALayer):
335         * platform/graphics/ca/mac/PlatformCALayerMac.h:
336
337 2013-12-31  Simon Fraser  <simon.fraser@apple.com>
338
339         ScrollingStateNodes should have a reference to the ScrollingStateTree
340         https://bugs.webkit.org/show_bug.cgi?id=126348
341
342         Reviewed by Sam Weinig.
343
344         Make ScrollingStateNodes always belong to a ScrollingStateTree, and thus
345         have a reference to the tree rather than a pointer. When cloning nodes,
346         they are adopted by a new ScrollingStateTree, which adds them to its
347         node map (which didn't happen before).
348         
349         In subclasses access the ScrollingStateTree through a member function.
350
351         * page/scrolling/ScrollingStateFixedNode.cpp:
352         (WebCore::ScrollingStateFixedNode::create):
353         (WebCore::ScrollingStateFixedNode::ScrollingStateFixedNode):
354         (WebCore::ScrollingStateFixedNode::clone):
355         (WebCore::ScrollingStateFixedNode::updateConstraints):
356         * page/scrolling/ScrollingStateFixedNode.h:
357         * page/scrolling/ScrollingStateNode.cpp:
358         (WebCore::ScrollingStateNode::ScrollingStateNode):
359         (WebCore::ScrollingStateNode::cloneAndReset):
360         (WebCore::ScrollingStateNode::cloneAndResetChildren):
361         (WebCore::ScrollingStateNode::willBeRemovedFromStateTree):
362         * page/scrolling/ScrollingStateNode.h:
363         (WebCore::ScrollingStateNode::scrollingStateTree):
364         * page/scrolling/ScrollingStateScrollingNode.cpp:
365         (WebCore::ScrollingStateScrollingNode::create):
366         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
367         (WebCore::ScrollingStateScrollingNode::clone):
368         (WebCore::ScrollingStateScrollingNode::setViewportRect):
369         (WebCore::ScrollingStateScrollingNode::setTotalContentsSize):
370         (WebCore::ScrollingStateScrollingNode::setScrollOrigin):
371         (WebCore::ScrollingStateScrollingNode::setScrollableAreaParameters):
372         (WebCore::ScrollingStateScrollingNode::setFrameScaleFactor):
373         (WebCore::ScrollingStateScrollingNode::setNonFastScrollableRegion):
374         (WebCore::ScrollingStateScrollingNode::setWheelEventHandlerCount):
375         (WebCore::ScrollingStateScrollingNode::setSynchronousScrollingReasons):
376         (WebCore::ScrollingStateScrollingNode::setScrollBehaviorForFixedElements):
377         (WebCore::ScrollingStateScrollingNode::setRequestedScrollPosition):
378         (WebCore::ScrollingStateScrollingNode::setHeaderHeight):
379         (WebCore::ScrollingStateScrollingNode::setFooterHeight):
380         * page/scrolling/ScrollingStateScrollingNode.h:
381         * page/scrolling/ScrollingStateStickyNode.cpp:
382         (WebCore::ScrollingStateStickyNode::create):
383         (WebCore::ScrollingStateStickyNode::ScrollingStateStickyNode):
384         (WebCore::ScrollingStateStickyNode::clone):
385         (WebCore::ScrollingStateStickyNode::updateConstraints):
386         * page/scrolling/ScrollingStateStickyNode.h:
387         * page/scrolling/ScrollingStateTree.cpp:
388         (WebCore::ScrollingStateTree::attachNode):
389         (WebCore::ScrollingStateTree::commit):
390         (WebCore::ScrollingStateTree::addNode):
391         * page/scrolling/ScrollingStateTree.h:
392         * page/scrolling/mac/ScrollingStateNodeMac.mm:
393         (WebCore::ScrollingStateNode::setScrollLayer):
394         * page/scrolling/mac/ScrollingStateScrollingNodeMac.mm:
395         (WebCore::ScrollingStateScrollingNode::setCounterScrollingLayer):
396         (WebCore::ScrollingStateScrollingNode::setHeaderLayer):
397         (WebCore::ScrollingStateScrollingNode::setFooterLayer):
398         (WebCore::ScrollingStateScrollingNode::setScrollbarPaintersFromScrollbars):
399
400 2013-12-31  Simon Fraser  <simon.fraser@apple.com>
401
402         Give ScrollingStateNodes a nodeType()
403         https://bugs.webkit.org/show_bug.cgi?id=126347
404
405         Reviewed by Tim Horton.
406
407         When we start serializing ScrollingStateNodes to send to the UI process,
408         it's more convenient if they have a nodeType member rather than virtual functions,
409         so give them one, and fix the casting macros to use it. This allows us to use
410         a switch() on node creation, so the compiler will tell us if we forgot to create
411         a node type.
412
413         * page/scrolling/ScrollingStateFixedNode.cpp:
414         (WebCore::ScrollingStateFixedNode::ScrollingStateFixedNode):
415         * page/scrolling/ScrollingStateFixedNode.h:
416         * page/scrolling/ScrollingStateNode.cpp:
417         (WebCore::ScrollingStateNode::ScrollingStateNode):
418         * page/scrolling/ScrollingStateNode.h: const ScrollingNodeType field
419         (can't be modified after construction), and move the m_scrollingStateTree
420         member after it (the awkward protected:/private: will be cleaned up in a later patch).
421         (WebCore::ScrollingStateNode::nodeType):
422         * page/scrolling/ScrollingStateScrollingNode.cpp:
423         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
424         * page/scrolling/ScrollingStateScrollingNode.h:
425         * page/scrolling/ScrollingStateStickyNode.cpp:
426         (WebCore::ScrollingStateStickyNode::ScrollingStateStickyNode):
427         * page/scrolling/ScrollingStateStickyNode.h:
428         * page/scrolling/ScrollingTree.cpp:
429         (WebCore::ScrollingTree::updateTreeFromStateNode):
430
431 2013-12-31  Andreas Kling  <akling@apple.com>
432
433         Out-of-line RenderStyle substructure copying helpers.
434         <https://webkit.org/b/126340>
435
436         This shrinks the .access() calls by moving memory allocation logic
437         out-of-line, though I'm really doing this to make Instruments.app
438         allocations output more readable.
439
440         Writes to e.g 'font' or 'color' will now be grouped under a single
441         StyleInheritedData::copy() call instead of being spread out over
442         setFontDescription(), setLineHeight(), setColor(), etc.
443
444         Reviewed by Anders Carlsson.
445
446 2013-12-31  Andreas Kling  <akling@apple.com>
447
448         RenderListItem should store its marker in a RenderPtr.
449         <https://webkit.org/b/126298>
450
451         Make RenderListItem::m_marker a RenderPtr<RenderListMarker> and
452         remove two manual destroy() calls. Tweaked code to reduce nesting.
453
454         Reviewed by Anders Carlsson.
455
456 2013-12-31  Andreas Kling  <akling@apple.com>
457
458         Element's renderer factory should return RenderPtrs.
459         <https://webkit.org/b/126318>
460
461         Rename Element::createRenderer() to createElementRenderer() and have
462         it return RenderPtr<RenderElement>. Propagate signature until it
463         builds again.
464
465         We leakPtr() the renderer at two call sites when handing things over
466         to raw pointer API. This'll get tidied up in subsequent patches.
467
468         Reviewed by Sam Weinig.
469
470 2013-12-31  Carlos Garcia Campos  <cgarcia@igalia.com>
471
472         [SOUP] Return early in ResourceHandle::receivedCancellation if the load has already cancelled
473         https://bugs.webkit.org/show_bug.cgi?id=126287
474
475         Reviewed by Martin Robinson.
476
477         This situation can happen when using the network process, because
478         the ReceivedCancellation message can be received when the resource
479         loader has already been removed, but the authentication challenge
480         still has a reference to the ResourceHandleClient.
481
482         * platform/network/soup/ResourceHandleSoup.cpp:
483         (WebCore::ResourceHandle::receivedCancellation):
484
485 2013-12-31  Carlos Garcia Campos  <cgarcia@igalia.com>
486
487         [SOUP] The initiating page is lost after a redirection
488         https://bugs.webkit.org/show_bug.cgi?id=126293
489
490         Reviewed by Martin Robinson.
491
492         The initiating page id is attached to the initial soup request
493         object, but not to the one created after a redirection.
494
495         * platform/network/soup/ResourceHandleSoup.cpp:
496         (WebCore::createSoupRequestAndMessageForHandle): Call
497         setSoupRequestInitiatingPageIDFromNetworkingContext() here if the
498         soup request is created successfully.
499         (WebCore::ResourceHandle::start): Remove the call to
500         setSoupRequestInitiatingPageIDFromNetworkingContext().
501
502 2013-12-31  Carlos Garcia Campos  <cgarcia@igalia.com>
503
504         [SOUP] Implement ResourceHandle::continueWillSendRequest()
505         https://bugs.webkit.org/show_bug.cgi?id=126291
506
507         Reviewed by Martin Robinson.
508
509         * platform/network/soup/ResourceHandleSoup.cpp:
510         (WebCore::continueAfterWillSendRequest): Helper function that
511         continues with the load after willSendRequest has been called.
512         (WebCore::doRedirect): Call continueAfterWillSendRequest() when
513         client doesn't use async callbacks.
514         (WebCore::ResourceHandle::continueWillSendRequest): Call
515         continueAfterWillSendRequest().
516
517 2013-12-30  Carlos Garcia Campos  <cgarcia@igalia.com>
518
519         [SOUP] willSendRequest doesn't work after a redirect
520         https://bugs.webkit.org/show_bug.cgi?id=126290
521
522         Reviewed by Martin Robinson.
523
524         The problem is that we are creating the new soup request for the
525         redirect before calling ResourceHandleClient::willSendRequest() so
526         that any change made to the request by the client is ignored.
527
528         * platform/network/soup/ResourceHandleSoup.cpp:
529         (WebCore::doRedirect): Create the new soup request and soup
530         message for the redirect after calling willSendRequest() on the
531         client.
532
533 2013-12-30  Andreas Kling  <akling@apple.com>
534
535         InputType should return input renderers wrapped in RenderPtr.
536         <https://webkit.org/b/126307>
537
538         Rename InputType::createRenderer() to createInputRenderer() and
539         make it return RenderPtr<RenderElement>. Also made it non-const.
540
541         Reviewed by Anders Carlsson.
542
543 2013-12-30  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
544
545         Cleanup static_cast<HTMLFormElement*> by using toHTMLFormElement()
546         https://bugs.webkit.org/show_bug.cgi?id=126309
547
548         Reviewed by Andreas Kling.
549
550         To detect bad type casts, it would be good to use toHTMLFormElement() instead of
551         using manual type cast. Additionally FORM_ASSOCIATED_ELEMENT_TYPE_CASTS is introduced newly
552         to do it.
553
554         No new tests, no behavior changes.
555
556         * html/FormAssociatedElement.h:
557         * html/HTMLFormControlElement.h:
558         * html/HTMLFormElement.cpp:
559         (WebCore::HTMLFormElement::submitImplicitly):
560         (WebCore::HTMLFormElement::validateInteractively):
561         (WebCore::HTMLFormElement::submit):
562         (WebCore::HTMLFormElement::reset):
563         (WebCore::HTMLFormElement::defaultButton):
564         (WebCore::HTMLFormElement::checkInvalidControlsAndCollectUnhandled):
565         (WebCore::HTMLFormElement::documentDidResumeFromPageCache):
566         * loader/FormSubmission.cpp:
567         (WebCore::FormSubmission::create):
568
569 2013-12-30  Anders Carlsson  <andersca@apple.com>
570
571         Replace yield() and pauseBriefly() with std::this_thread::yield()
572         https://bugs.webkit.org/show_bug.cgi?id=126105
573
574         Reviewed by Sam Weinig.
575
576         * platform/sql/SQLiteDatabase.cpp:
577         (WebCore::SQLiteDatabase::interrupt):
578
579 2013-12-30  Andreas Kling  <akling@apple.com>
580
581         Rename createRenderObject() to createRenderer().
582
583         Somewhat rubber-stamped by Antti Koivisto.
584
585 2013-12-30  Andreas Kling  <akling@apple.com>
586
587         Document should store its RenderView in a RenderPtr.
588         <https://webkit.org/b/126299>
589
590         Make Document::m_renderView a RenderPtr<RenderView> and remove one
591         manual destroy() call. Also removed the setRenderView() helper and
592         inlined it at the two call sites.
593
594         Reviewed by Antti Koivisto.
595
596 2013-12-30  Martin Robinson  <mrobinson@igalia.com>
597
598         [CMake] [GTK] Add support for GObject introspection
599         https://bugs.webkit.org/show_bug.cgi?id=126162
600
601         Reviewed by Daniel Bates.
602
603         * PlatformGTK.cmake: Build a list of WebKitDOM headers and expose it to the
604         parent scope of the build.
605
606 2013-12-30  Andreas Kling  <akling@apple.com>
607
608         Text::createTextRenderer() should return a RenderPtr.
609         <https://webkit.org/b/126292>
610
611         Make createTextRenderer() return a RenderPtr and remove one manual
612         destroy() call. Also, since it should always return a valid object,
613         I turned a null check into an assertion instead.
614
615         Reviewed by Antti Koivisto.
616
617 2013-12-30  Antti Koivisto  <antti@apple.com>
618
619         Remove attachChild
620         https://bugs.webkit.org/show_bug.cgi?id=126288
621
622         Reviewed by Andreas Kling.
623
624         * dom/ContainerNode.cpp:
625         (WebCore::destroyRenderTreeIfNeeded):
626         
627             Rename detachChild and move the tests here.
628
629         (WebCore::ContainerNode::takeAllChildrenFrom):
630         
631             No need to call attachRenderTree explicitly anymore.
632
633         (WebCore::ContainerNode::removeBetween):
634
635 2013-12-29  Andreas Kling  <akling@apple.com>
636
637         RenderLayer: Store corner and resizer renderers in RenderPtrs.
638         <https://webkit.org/b/126274>
639
640         Turn RenderLayer::m_scrollCorner and m_resizer into RenderPtrs.
641         Removed manual destroy() calls as appropriate. Also tweaked some
642         code to reduce nesting.
643
644         Reviewed by Anders Carlsson.
645
646 2013-12-30  Antti Koivisto  <antti@apple.com>
647
648         XML document builder should create render tree asynchronously
649         https://bugs.webkit.org/show_bug.cgi?id=126285
650
651         Reviewed by Andreas Kling.
652         
653         Stop creating renderers explicitly. 
654         Fix SVG <use> element to not rely on parse time render tree construction.
655
656         * svg/SVGUseElement.cpp:
657         (WebCore::SVGUseElement::svgAttributeChanged):
658         
659             Remove renderer check, we may not have created the render tree yet.
660
661         (WebCore::SVGUseElement::willAttachRenderers):
662         
663             Switch to willAttachRenderers from willRecalcStyle. The latter is only called as long as style
664             recalc doesn't start creating new renderers.
665
666         (WebCore::SVGUseElement::invalidateShadowTree):
667         
668             Remove renderer check, we may not have created the render tree yet. 
669             Invalidate with ReconstructRenderTree so willAttachRenderers will always get called.
670
671         * svg/SVGUseElement.h:
672         * xml/parser/XMLDocumentParser.cpp:
673         (WebCore::XMLDocumentParser::exitText):
674         * xml/parser/XMLDocumentParserLibxml2.cpp:
675         (WebCore::XMLDocumentParser::startElementNs):
676         (WebCore::XMLDocumentParser::cdataBlock):
677         
678             Remove explicit call to attachRenderTree. The render tree will be created lazily.
679
680 2013-12-29  Joone Hur  <joone.hur@intel.com>
681
682         Reverted r156742. The same fix was reverted from Blink due to heap-use-after-free on ClusterFuzz.
683         https://bugs.webkit.org/show_bug.cgi?id=126275
684
685         https://codereview.chromium.org/102993011
686
687         Reviewed by Darin Adler.
688
689         * rendering/RenderBlock.cpp:
690         (WebCore::RenderBlock::updateFirstLetter):
691
692 2013-12-29  ChangSeok Oh  <changseok.oh@collabora.com>
693
694         Remove unused functions in GraphicsContext3D.cpp
695         https://bugs.webkit.org/show_bug.cgi?id=126265
696
697         Reviewed by Andreas Kling.
698
699         platformGraphicsContext3D, platformTexture and platformLayer in GC3D.cpp
700         seem not used by any ports.
701
702         No new tests, no functionality changed.
703
704         * platform/graphics/GraphicsContext3D.cpp:
705
706 2013-12-29  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
707
708         Fix build error on 64bit debug build.
709         https://bugs.webkit.org/show_bug.cgi?id=126248
710
711         r161076 used ‘%lli’(for long long int) for int64_t(aka long int).
712         However, in a 64bit compile, int64_t is 'long int', not a 'long long int'.
713         To support 32bit and 64bit, we use static_cast<long long>.
714
715         * Modules/indexeddb/IDBTransactionBackend.cpp:
716         (WebCore::IDBTransactionBackend::commit):
717
718 2013-12-29  Antti Koivisto  <antti@apple.com>
719
720         Remove some accidental commented out code.
721
722         * testing/Internals.cpp:
723         (WebCore::Internals::mallocStatistics):
724
725 2013-12-29  Antti Koivisto  <antti@apple.com>
726
727         Fix build.
728
729         * xml/parser/XMLDocumentParser.cpp:
730
731 2013-12-29  Antti Koivisto  <antti@apple.com>
732
733         Remove Node::attached()
734         https://bugs.webkit.org/show_bug.cgi?id=126276
735
736         Reviewed by Sam Weinig.
737
738         Node::attached() is poorly defined. Replace it with renderer() and inRenderedDocument() tests as appropriate.
739         
740         Also remove some unnecessary explicit attachRenderTree/detachRenderTree calls from the tree builders.
741
742 2013-12-29  Andreas Kling  <akling@apple.com>
743
744         RenderLayer: Store reflection renderer in a RenderPtr.
745         <https://webkit.org/b/126273>
746
747         Reviewed by Anders Carlsson.
748
749         * rendering/RenderLayer.h:
750         * rendering/RenderLayer.cpp:
751         (WebCore::RenderLayer::RenderLayer):
752         (WebCore::RenderLayer::calculateClipRects):
753
754             Turn RenderLayer::m_reflection into a RenderPtr<RenderReplica>
755             instead of a raw pointer.
756
757         * WebCore.xcodeproj/project.pbxproj:
758
759             Add RenderPtr.h to private headers.
760
761 2013-12-28  Andreas Kling  <akling@apple.com>
762
763         Add an owning smart pointer for RenderObjects and start using it.
764         <https://webkit.org/b/126251>
765
766         This patch adds a RenderPtr pointer, essentially an OwnPtr for
767         RenderObjects. The difference is that RenderPtr destroys the object
768         by calling destroy() on it.
769
770         This is necessary to implement the willBeDestroyed() mechanism in
771         RenderObject that notifies renderers just before they are about to
772         be deleted, while they can still do tree traversal, etc.
773
774         I also added a make_unique-alike helper so you can write:
775
776             auto renderer = createRenderObject<RenderImage>(...);
777
778         Put it all to use by making ContentData::createRenderer() return
779         RenderPtr<RenderObject> instead of raw RenderObject*.
780
781         Reviewed by Antti Koivisto.
782
783 2013-12-28  Benjamin Poulain  <benjamin@webkit.org>
784
785         Add a missing include path for GTK
786         https://bugs.webkit.org/show_bug.cgi?id=126257
787
788         Reviewed by Philippe Normand.
789
790         * GNUmakefile.am:
791
792 2013-12-28  Carlos Garcia Campos  <cgarcia@igalia.com>
793
794         Unreviewed. Update GObject DOM symbols file after r160733.
795
796         * bindings/gobject/webkitdom.symbols:
797
798 2013-12-28  Carlos Garcia Campos  <cgarcia@igalia.com>
799
800         [GTK] Downloads are broken with the network process enabled
801         https://bugs.webkit.org/show_bug.cgi?id=126131
802
803         Reviewed by Martin Robinson.
804
805         The problem is that the network process crashes when trying to
806         convert the handle to a download, because at that point the
807         download has finished and the handle is NULL. This happens because
808         we are not implementing ResourceHandle::continueDidReceiveResponse().
809
810         * platform/network/soup/ResourceHandleSoup.cpp:
811         (WebCore::nextMultipartResponsePartCallback): Call
812         continueAfterDidReceiveResponse() when not using async callbacks.
813         (WebCore::sendRequestCallback): Ditto.
814         (WebCore::continueAfterDidReceiveResponse): Helper function that
815         continues the load after didReceiveResponse.
816         (WebCore::ResourceHandle::continueDidReceiveResponse): Call
817         continueAfterDidReceiveResponse().
818
819 2013-12-27  Daniel Bates  <dabates@apple.com>
820
821         Another attempt to fix the Windows build after <http://trac.webkit.org/changeset/161106>
822         (https://bugs.webkit.org/show_bug.cgi?id=126180)
823
824         * WebCore.vcxproj/WebCore.vcxproj.filters: Add files platform/audio/{AudioSession, AudioSessionListener}.h
825         * WebCore.vcxproj/WebCoreCommon.props: Add directory WebCore/platform/audio to the list of
826         include directories.
827
828 2013-12-27  Daniel Bates  <dabates@apple.com>
829
830         Attempt to fix the Windows build after <http://trac.webkit.org/changeset/161106>
831         (https://bugs.webkit.org/show_bug.cgi?id=126180)
832
833         Add files platform/audio/AudioSession.{cpp, h} and platform/audio/AudioSessionListener.h
834         to the Visual Studio project. Note, the contents of these files are guarded by USE(AUDIO_SESSION),
835         which is only enabled on Mac and iOS at the time of writing.
836
837         I thought to try this approach to fix the build so as to avoid adding an extraneous
838         USE(AUDIO_SESSION)-guard around the #include "AudioSession.h" in Settings.cpp since
839         the contents of the file AudioSession.h is guarded by USE(AUDIO_SESSION).
840
841         * WebCore.vcxproj/WebCore.vcxproj:
842
843 2013-12-27  Daniel Bates  <dabates@apple.com>
844
845         [iOS] Upstream WebCore/page changes
846         https://bugs.webkit.org/show_bug.cgi?id=126180
847
848         Reviewed by Darin Adler.
849
850         * WebCore.xcodeproj/project.pbxproj:
851         * dom/EventNames.h:
852         (WebCore::EventNames::isGestureEventType): Added.
853         * page/AlternativeTextClient.h: Do not define WTF_USE_DICTATION_ALTERNATIVES when building for iOS.
854         * page/Chrome.cpp:
855         (WebCore::Chrome::Chrome):
856         (WebCore::Chrome::dispatchViewportPropertiesDidChange): Added; guarded by PLATFORM(IOS).
857         (WebCore::Chrome::setCursor): Make this an empty function when building for iOS.
858         (WebCore::Chrome::setCursorHiddenUntilMouseMoves): Ditto.
859         (WebCore::Chrome::didReceiveDocType): Added; iOS-specific.
860         * page/Chrome.h:
861         (WebCore::Chrome::setDispatchViewportDataDidChangeSuppressed): Added; guarded by PLATFORM(IOS).
862         * page/ChromeClient.h:
863         (WebCore::ChromeClient::didFlushCompositingLayers): Added; guarded by PLATFORM(IOS).
864         (WebCore::ChromeClient::fetchCustomFixedPositionLayoutRect): Added; guarded by PLATFORM(IOS).
865         (WebCore::ChromeClient::updateViewportConstrainedLayers): Added; guarded by PLATFORM(IOS).
866         * page/DOMTimer.cpp:
867         (WebCore::DOMTimer::install): Added iOS-specific code.
868         (WebCore::DOMTimer::fired): Ditto.
869         * page/DOMWindow.cpp:
870         (WebCore::DOMWindow::DOMWindow): Ditto.
871         (WebCore::DOMWindow::innerHeight): Ditto.
872         (WebCore::DOMWindow::innerWidth): Ditto.
873         (WebCore::DOMWindow::scrollX): Ditto.
874         (WebCore::DOMWindow::scrollY): Ditto.
875         (WebCore::DOMWindow::scrollBy): Ditto.
876         (WebCore::DOMWindow::scrollTo): Ditto.
877         (WebCore::DOMWindow::clearTimeout): Ditto.
878         (WebCore::DOMWindow::addEventListener): Ditto.
879         (WebCore::DOMWindow::incrementScrollEventListenersCount): Added; guarded by PLATFORM(IOS).
880         (WebCore::DOMWindow::decrementScrollEventListenersCount): Added; guarded by PLATFORM(IOS).
881         (WebCore::DOMWindow::resetAllGeolocationPermission): Added; Also added FIXME comment.
882         (WebCore::DOMWindow::removeEventListener): Added iOS-specific code.
883         (WebCore::DOMWindow::dispatchEvent): Modified to prevent dispatching duplicate pageshow and pagehide
884         events per <http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#event-pageshow>.
885         (WebCore::DOMWindow::removeAllEventListeners): Added iOS-specific code.
886         * page/DOMWindow.h:
887         * page/DOMWindow.idl: Added IOS_GESTURE_EVENTS-guarded attributes: ongesture{change, end, start}. Also
888         added IOS_TOUCH_EVENTS-guarded attributes: {Touch, TouchList}Constructor.
889         * page/EditorClient.h:
890         * page/EventHandler.cpp:
891         (WebCore::EventHandler::EventHandler): Added iOS-specific code.
892         (WebCore::EventHandler::clear): Ditto.
893         (WebCore::EventHandler::startPanScrolling): Make this an empty function when building for iOS.
894         (WebCore::EventHandler::handleMousePressEvent): Modified to invalidate a click when the clicked node is
895         null. Also, opt out of code for updating the scrollbars as UIKit manages scrollbars on iOS.
896         (WebCore::EventHandler::handleMouseMoveEvent): Opt of code for updating the scrollbars and cursor when building on iOS.
897         (WebCore::hitTestResultInFrame): Made this a file-local static function since it's only used in EventHandler.cpp.
898         (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled): Added iOS-specific code.
899         * page/EventHandler.h:
900         * page/FocusController.h:
901         * page/Frame.cpp:
902         (WebCore::Frame::Frame): Added iOS-specific code.
903         (WebCore::Frame::scrollOverflowLayer): Added; iOS-specific.
904         (WebCore::Frame::overflowAutoScrollTimerFired): Added; iOS-specific.
905         (WebCore::Frame::startOverflowAutoScroll): Added; iOS-specific.
906         (WebCore::Frame::checkOverflowScroll): Added; iOS-specific.
907         (WebCore::Frame::willDetachPage): Added iOS-specific code.
908         (WebCore::Frame::createView): Ditto.
909         (WebCore::Frame::setSelectionChangeCallbacksDisabled): Added; iOS-specific.
910         (WebCore::Frame::selectionChangeCallbacksDisabled): Added; iOS-specific.
911         * page/Frame.h:
912         (WebCore::Frame::timersPaused): Added; guarded by PLATFORM(IOS).
913         * page/FrameView.cpp:
914         (WebCore::FrameView::FrameView): Added iOS-specific code.
915         (WebCore::FrameView::clear): Ditto.
916         (WebCore::FrameView::flushCompositingStateForThisFrame): Ditto.
917         (WebCore::FrameView::graphicsLayerForPlatformWidget): Added.
918         (WebCore::FrameView::scheduleLayerFlushAllowingThrottling): Added.
919         (WebCore::FrameView::layout): Added iOS-specific code.
920         (WebCore::countRenderedCharactersInRenderObjectWithThreshold): Added; helper function used by FrameView::renderedCharactersExceed().
921         Also added FIXME comment.
922         (WebCore::FrameView::renderedCharactersExceed): Added.
923         (WebCore::FrameView::visibleContentsResized): Added iOS-specific code.
924         (WebCore::FrameView::adjustTiledBackingCoverage): Ditto.
925         (WebCore::FrameView::performPostLayoutTasks): Ditto.
926         (WebCore::FrameView::sendResizeEventIfNeeded): Ditto.
927         (WebCore::FrameView::paintContents): Added iOS-specific code. Also added FIXME comments.
928         (WebCore::FrameView::setUseCustomFixedPositionLayoutRect): Added; iOS-specific.
929         (WebCore::FrameView::setCustomFixedPositionLayoutRect): Added; iOS-specific.
930         (WebCore::FrameView::updateFixedPositionLayoutRect): Added; iOS-specific.
931         * page/FrameView.h:
932         * page/Navigator.cpp:
933         (WebCore::Navigator::standalone): Added; iOS-specific.
934         * page/Navigator.h:
935         * page/Navigator.idl: Added WTF_PLATFORM_IOS-guarded attribute: standalone. Also added FIXME comment.
936         * page/NavigatorBase.cpp:
937         (WebCore::NavigatorBase::platform): Added iOS-specific code.
938         * page/Page.h:
939         (WebCore::Page::hasCustomHTMLTokenizerTimeDelay): Added; guarded by PLATFORM(IOS). Also added FIXME comment
940         to remove this method.
941         (WebCore::Page::customHTMLTokenizerTimeDelay): Added; guarded by PLATFORM(IOS). Also added FIXME comment
942         to remove this method.
943         * page/PageGroup.cpp:
944         (WebCore::PageGroup::removeVisitedLink): Added.
945         * page/PageGroup.h:
946         * page/Settings.cpp:
947         (WebCore::Settings::Settings):
948         (WebCore::Settings::setScriptEnabled): Added; guarded by PLATFORM(IOS).
949         (WebCore::Settings::setStandalone): Added; guarded by PLATFORM(IOS).
950         (WebCore::Settings::setAudioSessionCategoryOverride): Added; guarded by PLATFORM(IOS).
951         (WebCore::Settings::audioSessionCategoryOverride): Added; guarded by PLATFORM(IOS).
952         (WebCore::Settings::setNetworkDataUsageTrackingEnabled): Added; guarded by PLATFORM(IOS).
953         (WebCore::Settings::networkDataUsageTrackingEnabled): Added; guarded by PLATFORM(IOS).
954         (WebCore::sharedNetworkInterfaceNameGlobal): Added; guarded by PLATFORM(IOS).
955         (WebCore::Settings::setNetworkInterfaceName): Added; guarded by PLATFORM(IOS).
956         (WebCore::Settings::networkInterfaceName): Added; guarded by PLATFORM(IOS).
957         * page/Settings.h:
958         (WebCore::Settings::setMaxParseDuration): Added; guarded by PLATFORM(IOS). Also added FIXME comment.
959         (WebCore::Settings::maxParseDuration): Added; guarded by PLATFORM(IOS). Also added FIXME comment.
960         (WebCore::Settings::standalone): Added; guarded by PLATFORM(IOS).
961         (WebCore::Settings::setTelephoneNumberParsingEnabled): Added; guarded by PLATFORM(IOS).
962         (WebCore::Settings::telephoneNumberParsingEnabled): Added; guarded by PLATFORM(IOS).
963         (WebCore::Settings::setMediaDataLoadsAutomatically): Added; guarded by PLATFORM(IOS).
964         (WebCore::Settings::mediaDataLoadsAutomatically): Added; guarded by PLATFORM(IOS).
965         (WebCore::Settings::setShouldTransformsAffectOverflow): Added; guarded by PLATFORM(IOS).
966         (WebCore::Settings::shouldTransformsAffectOverflow): Added; guarded by PLATFORM(IOS).
967         (WebCore::Settings::setShouldDispatchJavaScriptWindowOnErrorEvents): Added; guarded by PLATFORM(IOS).
968         (WebCore::Settings::shouldDispatchJavaScriptWindowOnErrorEvents): Added; guarded by PLATFORM(IOS).
969         (WebCore::Settings::setAlwaysUseBaselineOfPrimaryFont): Added; guarded by PLATFORM(IOS).
970         (WebCore::Settings::alwaysUseBaselineOfPrimaryFont): Added; guarded by PLATFORM(IOS).
971         (WebCore::Settings::setAlwaysUseAcceleratedOverflowScroll): Added; guarded by PLATFORM(IOS).
972         (WebCore::Settings::alwaysUseAcceleratedOverflowScroll): Added; guarded by PLATFORM(IOS).
973         * page/Settings.in: Added IOS_AIRPLAY-guarded setting: mediaPlaybackAllowsAirPlay.
974         * page/animation/CSSPropertyAnimation.cpp:
975         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): Added iOS-specific code and FIXME comment.
976         * page/ios/EventHandlerIOS.mm: Added.
977         * page/ios/FrameIOS.mm: Added.
978         * page/mac/ChromeMac.mm:
979         * page/mac/PageMac.cpp:
980         (WebCore::Page::addSchedulePair): Opt out of code when building for iOS.
981         (WebCore::Page::removeSchedulePair): Ditto.
982         * page/mac/SettingsMac.mm:
983         (WebCore::Settings::shouldEnableScreenFontSubstitutionByDefault): Added iOS-specific code.
984         * page/mac/WebCoreFrameView.h:
985
986 2013-12-27  Gavin Barraclough  <barraclough@apple.com>
987
988         Merge PageVisibilityState & ViewState::IsVisible in WebKit2
989         https://bugs.webkit.org/show_bug.cgi?id=126214
990
991         Reviewed by Alexey Proskuryakov.
992
993         WebKit2 redundantly tracks the visibility of the view through two mechanisms - the visibility
994         state, and the view state. Remove visibility state from the WebKit2 layer. The visibility
995         state also tracks the prerender state - so split this out and handle it separately (a change
996         we should make in WebCore, too).
997
998         WebCore - changes the API tests exposed a bug, a view should only ever come out of the
999         prerender state when it becomes visible - redundant notifications that the view is still
1000         hidden should be ignored.
1001
1002         * page/Page.cpp:
1003         (WebCore::Page::setVisibilityState):
1004             - ignore visibility state change to hidden, if the current state is prerender.
1005
1006 2013-12-27  Joseph Pecoraro  <pecoraro@apple.com>
1007
1008         Unreviewed Windows build fix for r160946.
1009
1010         Add another file to the Windows InspectorAllInOne.cpp.
1011
1012         * inspector/InspectorAllInOne.cpp:
1013
1014 2013-12-27  Commit Queue  <commit-queue@webkit.org>
1015
1016         Unreviewed, rolling out r161096.
1017         http://trac.webkit.org/changeset/161096
1018         https://bugs.webkit.org/show_bug.cgi?id=126256
1019
1020         Made lots of tests crash (Requested by ap on #webkit).
1021
1022         * dom/ContainerNode.cpp:
1023         (WebCore::ContainerNode::insertBefore):
1024         (WebCore::ContainerNode::replaceChild):
1025         (WebCore::willRemoveChildren):
1026         (WebCore::ContainerNode::appendChild):
1027         * dom/Document.cpp:
1028         (WebCore::Document::visibilityStateChanged):
1029         (WebCore::Document::moveNodeIteratorsToNewDocument):
1030         (WebCore::Document::updateRangesAfterChildrenChanged):
1031         (WebCore::Document::nodeChildrenWillBeRemoved):
1032         (WebCore::Document::nodeWillBeRemoved):
1033         (WebCore::Document::textInserted):
1034         (WebCore::Document::textRemoved):
1035         (WebCore::Document::textNodesMerged):
1036         (WebCore::Document::textNodeSplit):
1037         (WebCore::Document::documentWillSuspendForPageCache):
1038         (WebCore::Document::documentDidResumeFromPageCache):
1039         (WebCore::Document::mediaVolumeDidChange):
1040         (WebCore::Document::privateBrowsingStateDidChange):
1041         (WebCore::Document::captionPreferencesChanged):
1042         (WebCore::Document::validateAutoSizingNodes):
1043         (WebCore::Document::resetAutoSizingNodes):
1044         (WebCore::Document::webkitExitFullscreen):
1045         * dom/MutationObserver.cpp:
1046         (WebCore::MutationObserver::disconnect):
1047         (WebCore::MutationObserver::getObservedNodes):
1048         (WebCore::MutationObserver::deliver):
1049         * dom/MutationObserverInterestGroup.cpp:
1050         (WebCore::MutationObserverInterestGroup::isOldValueRequested):
1051         (WebCore::MutationObserverInterestGroup::enqueueMutationRecord):
1052         * dom/MutationObserverRegistration.cpp:
1053         (WebCore::MutationObserverRegistration::clearTransientRegistrations):
1054         (WebCore::MutationObserverRegistration::addRegistrationNodesToSet):
1055         * dom/Node.cpp:
1056         (WebCore::Node::dumpStatistics):
1057         (WebCore::Document::invalidateNodeListAndCollectionCaches):
1058         (WebCore::NodeListsNodeData::invalidateCaches):
1059         (WebCore::Node::didMoveToNewDocument):
1060         (WebCore::collectMatchingObserversForMutation):
1061         (WebCore::Node::notifyMutationObserversNodeWillDetach):
1062         * dom/NodeRareData.h:
1063         (WebCore::NodeListsNodeData::adoptDocument):
1064         * dom/ScriptExecutionContext.cpp:
1065         (WebCore::ScriptExecutionContext::~ScriptExecutionContext):
1066         (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjects):
1067         (WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
1068         (WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
1069         (WebCore::ScriptExecutionContext::stopActiveDOMObjects):
1070         (WebCore::ScriptExecutionContext::closeMessagePorts):
1071         (WebCore::ScriptExecutionContext::adjustMinimumTimerInterval):
1072         (WebCore::ScriptExecutionContext::didChangeTimerAlignmentInterval):
1073         * dom/WebKitNamedFlow.cpp:
1074         (WebCore::WebKitNamedFlow::getRegionsByContent):
1075         (WebCore::WebKitNamedFlow::getRegions):
1076         (WebCore::WebKitNamedFlow::getContent):
1077
1078 2013-12-26  Sam Weinig  <sam@webkit.org>
1079
1080         Convert some of WebCore/dom over to range-for loops
1081         https://bugs.webkit.org/show_bug.cgi?id=126250
1082
1083         Reviewed by Andreas Kling.
1084
1085         * dom/ContainerNode.cpp:
1086         * dom/Document.cpp:
1087         * dom/MutationObserver.cpp:
1088         * dom/MutationObserverInterestGroup.cpp:
1089         * dom/MutationObserverRegistration.cpp:
1090         * dom/Node.cpp:
1091         * dom/NodeRareData.h:
1092         * dom/ScriptExecutionContext.cpp:
1093         * dom/WebKitNamedFlow.cpp:
1094
1095 2013-12-26  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1096
1097         [Nix] Cleanup Source/WebCore/PlatformNix.cmake
1098         https://bugs.webkit.org/show_bug.cgi?id=126226
1099
1100         Reviewed by Csaba Osztrogonác.
1101
1102         No new tests needed.
1103
1104         * PlatformNix.cmake:
1105
1106 2013-12-26  Joseph Pecoraro  <pecoraro@apple.com>
1107
1108         Unreviewed attempt at Windows build fix.
1109
1110         I think Window's "AllInOne.cpp" is causing a using namespace JSC
1111         to cause naming conflicts between Inspector::TypeBuilder::Debugger::types
1112         and JSC::types. So removing the ambiguity.
1113
1114         * inspector/InjectedScript.cpp:
1115         (WebCore::InjectedScript::getProperties):
1116         (WebCore::InjectedScript::wrapCallFrames):
1117
1118 2013-12-22  Andreas Kling  <akling@apple.com>
1119
1120         Make Text::createTextRenderer() take a const RenderStyle&.
1121         <https://webkit.org/b/126136>
1122
1123         Nuke a FIXME about constifying a RenderStyle& local.
1124
1125         Reviewed by Anders Carlsson.
1126
1127 2013-12-22  Andreas Kling  <akling@apple.com>
1128
1129         Move more inlines from RenderObject to RenderElement.
1130         <https://webkit.org/b/126134>
1131
1132         Lift some inline functions that use style() from RenderObject over
1133         to RenderElement, making them branchless.
1134
1135         Reviewed by Anders Carlsson.
1136
1137 2013-12-26  ChangSeok Oh  <changseok.oh@collabora.com>
1138
1139         Unreviewed build fix after r159526.
1140         isBoxValue is used at out of ENABLE_CSS_SHAPES gaurd. It causes a compile failure.
1141         So I moved isBoxValue to out side of ENABLE_CSS_SHAPES.
1142
1143         * css/CSSParser.cpp:
1144
1145 2013-12-25  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1146
1147         Set m_pos as private in InlineIterator, and use getter and setter functions.
1148         https://bugs.webkit.org/show_bug.cgi?id=125614
1149
1150         Reviewed by Alexey Proskuryakov.
1151
1152         InlineIterator has been exported m_pos as public directly though it is member variable.
1153         This patch set it as private, and add getter/setter functions for it.
1154
1155         No new tests, no behavior changes.
1156
1157         * rendering/InlineIterator.h:
1158         (WebCore::InlineIterator::setOffset):
1159         (WebCore::operator==):
1160         (WebCore::operator!=):
1161         (WebCore::InlineBidiResolver::appendRun):
1162         * rendering/RenderBlockLineLayout.cpp:
1163         (WebCore::RenderBlockFlow::appendRunsForObject):
1164         (WebCore::constructBidiRunsForLine):
1165         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
1166         (WebCore::RenderBlockFlow::matchedEndLine):
1167         (WebCore::LineBreaker::nextSegmentBreak):
1168         * rendering/line/BreakingContextInlineHeaders.h:
1169         (WebCore::BreakingContext::handleBR):
1170         (WebCore::BreakingContext::handleFloat):
1171         (WebCore::iteratorIsBeyondEndOfRenderCombineText):
1172         (WebCore::ensureCharacterGetsLineBox):
1173         (WebCore::BreakingContext::handleText):
1174         (WebCore::checkMidpoints):
1175         (WebCore::BreakingContext::handleEndOfLine):
1176         * rendering/line/TrailingObjects.cpp:
1177         (WebCore::TrailingObjects::updateMidpointsForTrailingBoxes):
1178
1179 2013-12-25  Kim Byung Jun  <bj1987.kim@samsung.com>
1180
1181         [EFL] Delete file.edc and file_*.png.
1182         https://bugs.webkit.org/show_bug.cgi?id=125134
1183
1184         Reviewed by Gyuyoung Kim.
1185
1186         File_theme uses button form.
1187
1188         * platform/efl/DefaultTheme/CMakeLists.txt:
1189         * platform/efl/DefaultTheme/default.edc:
1190         * platform/efl/DefaultTheme/widget/file/file.edc: Removed.
1191         * platform/efl/DefaultTheme/widget/file/file_focus.png: Removed.
1192         * platform/efl/DefaultTheme/widget/file/file_hover.png: Removed.
1193         * platform/efl/DefaultTheme/widget/file/file_normal.png: Removed.
1194         * platform/efl/DefaultTheme/widget/file/file_press.png: Removed.
1195
1196 2013-12-25  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1197
1198         [Nix] Adding createDragImageIconForCachedImageFilename method to DragImageNix
1199         https://bugs.webkit.org/show_bug.cgi?id=126230
1200
1201         Reviewed by Daniel Bates.
1202
1203         Also returning nullptr in other functions that were returning 0 as a pointer.
1204
1205         * platform/nix/DragImageNix.cpp:
1206         (WebCore::createDragImageFromImage):
1207         (WebCore::createDragImageIconForCachedImage):
1208         (WebCore::createDragImageIconForCachedImageFilename):
1209
1210 2013-12-25  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1211
1212         [Nix] Fixing DragData::asFragment signature in DragDataNix.cpp
1213         https://bugs.webkit.org/show_bug.cgi?id=126229
1214
1215         Reviewed by Daniel Bates.
1216
1217         * platform/nix/DragDataNix.cpp:
1218         (WebCore::DragData::asFragment):
1219
1220 2013-12-25  Commit Queue  <commit-queue@webkit.org>
1221
1222         Unreviewed, rolling out r161033 and r161074.
1223         http://trac.webkit.org/changeset/161033
1224         http://trac.webkit.org/changeset/161074
1225         https://bugs.webkit.org/show_bug.cgi?id=126240
1226
1227         Oliver says that a rollout would be better (Requested by ap on
1228         #webkit).
1229
1230         * bindings/js/JSDOMWindowCustom.cpp:
1231         (WebCore::JSDOMWindow::put):
1232         * bindings/objc/WebScriptObject.mm:
1233         (-[WebScriptObject setValue:forKey:]):
1234         * bindings/scripts/CodeGeneratorJS.pm:
1235         (GenerateImplementation):
1236         * bindings/scripts/test/JS/JSTestInterface.cpp:
1237         (WebCore::JSTestInterface::putByIndex):
1238         * bridge/NP_jsobject.cpp:
1239         (_NPN_SetProperty):
1240
1241 2013-12-25  Brady Eidson  <beidson@apple.com>
1242
1243         DatabaseProcess: Implement version changing
1244         https://bugs.webkit.org/show_bug.cgi?id=126099
1245
1246         Reviewed by Sam Weinig.
1247
1248         No new tests (No change in WebCore behavior).
1249
1250         * Modules/indexeddb/IDBTransactionBackend.cpp:
1251         (WebCore::IDBTransactionBackend::commit): Update some logging.
1252
1253         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
1254         (WebCore::IDBDatabaseBackend::VersionChangeOperation::perform): Move some things that used to be in
1255           IDBServerConnectionLevelDB::changeDatabaseVersion to this cross-platform location.
1256         * Modules/indexeddb/IDBTransactionBackendOperations.h:
1257         (WebCore::IDBDatabaseBackend::VersionChangeOperation::transaction):
1258
1259         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
1260         (WebCore::IDBServerConnectionLevelDB::changeDatabaseVersion): Move the actual updating of the database backend
1261           metadata to the VersionChangeOperation.
1262
1263 2013-12-25  Martin Robinson  <mrobinson@igalia.com>
1264
1265         [GTK] [CMake] Clean up generated sources directories
1266         https://bugs.webkit.org/show_bug.cgi?id=126216
1267
1268         Reviewed by Gustavo Noronha Silva.
1269
1270         * PlatformGTK.cmake: Use the new directory variables.
1271
1272 2013-12-25  Dirk Schulze  <krit@webkit.org>
1273
1274         Support <box> values parsing on 'clip-path' property
1275         https://bugs.webkit.org/show_bug.cgi?id=126147
1276
1277         Reviewed by Ryosuke Niwa.
1278
1279         Support parsing of the background reference boxes, margin-box and bounding-box.
1280         A box will be a reference box and define the origin for a basic shape.
1281         If no basic shape is specified, the box defines the clipping path itself.
1282         The specification text follows the changes to CSS Shapes now.
1283
1284         https://dvcs.w3.org/hg/FXTF/raw-file/3f213145303e/css-masking-1/index.html#the-clip-path
1285
1286         Existing parsing test have been extended to test box values as well.
1287
1288         * css/CSSParser.cpp:
1289         (WebCore::CSSParser::parseValue):
1290         (WebCore::CSSParser::parseClipPath):
1291         * css/CSSParser.h:
1292         * css/CSSValueKeywords.in:
1293         * css/DeprecatedStyleBuilder.cpp:
1294         (WebCore::ApplyPropertyClipPath::applyValue):
1295
1296 2013-12-25  David Kilzer  <ddkilzer@apple.com>
1297
1298         [iOS] Upstream WebCore/pdf changes
1299         http://webkit.org/b/126097
1300
1301         Reviewed by Sam Weinig.
1302
1303         * WebCore.xcodeproj/project.pbxproj: Added files to project.
1304         * pdf/ios/PDFDocument.cpp: Added.
1305         (WebCore::PDFDocumentParser::create):
1306         (WebCore::PDFDocumentParser::document):
1307         (WebCore::PDFDocumentParser::PDFDocumentParser):
1308         (WebCore::PDFDocument::createParser):
1309         * pdf/ios/PDFDocument.h: Added.
1310         (WebCore::PDFDocument::create):
1311         (WebCore::PDFDocument::PDFDocument):
1312
1313 2013-12-24  Commit Queue  <commit-queue@webkit.org>
1314
1315         Unreviewed, rolling out r160959.
1316         http://trac.webkit.org/changeset/160959
1317         https://bugs.webkit.org/show_bug.cgi?id=126222
1318
1319         Caused Windows build to fail (Requested by rfong on #webkit).
1320
1321         * platform/sql/SQLiteDatabase.cpp:
1322         (WebCore::SQLiteDatabase::interrupt):
1323
1324 2013-12-24  Ryosuke Niwa  <rniwa@webkit.org>
1325
1326         Unreviewed, rolling out r161051.
1327         http://trac.webkit.org/changeset/161051
1328         https://bugs.webkit.org/show_bug.cgi?id=45994
1329
1330         Caused two DFG tests to hit assertions due to a separate bug
1331
1332         * xml/XMLHttpRequest.cpp:
1333         (WebCore::XMLHttpRequest::status):
1334         (WebCore::XMLHttpRequest::statusText):
1335         * xml/XMLHttpRequest.h:
1336         * xml/XMLHttpRequest.idl:
1337
1338 2013-12-24  Mihnea Ovidenie  <mihnea@adobe.com>
1339
1340         [CSSRegions] Crash while repainting an invalid region
1341         https://bugs.webkit.org/show_bug.cgi?id=126152
1342
1343         Reviewed by Daniel Bates.
1344
1345         An invalid region, part of a dependency cycle, should not attempt to repaint content from
1346         its associated named flow, otherwise there may be the case of an infinite repaint cycle,
1347         resulting in a crash due to a stack overflow.
1348
1349         Test: fast/regions/repaint/invalid-region-repaint-crash.html
1350
1351         * rendering/RenderLayer.cpp:
1352         (WebCore::RenderLayer::repaintIncludingDescendants):
1353
1354 2013-12-23  Ryosuke Niwa  <rniwa@webkit.org>
1355
1356         XMLHttpRequest: status and statusText throw DOM Exception 11 when the state is UNSENT or OPENED.
1357         https://bugs.webkit.org/show_bug.cgi?id=45994
1358
1359         Reviewed by Alexey Proskuryakov.
1360
1361         Merged https://chromium.googlesource.com/chromium/blink/+/23c90460de16e04c5aba7ed942fba76cb79fdb9b.
1362
1363         Latest XHR spec says that XHR should return 0 and an empty string when it's in UNSENT or OPENED state
1364         or error flag is set: http://www.w3.org/TR/2012/WD-XMLHttpRequest-20121206/#the-status-attribute
1365
1366         * xml/XMLHttpRequest.cpp:
1367         (WebCore::XMLHttpRequest::status):
1368         (WebCore::XMLHttpRequest::statusText):
1369         * xml/XMLHttpRequest.h:
1370         * xml/XMLHttpRequest.idl:
1371
1372 2013-12-23  Ryosuke Niwa  <rniwa@webkit.org>
1373
1374         Crash in ReplaceSelectionCommand
1375         https://bugs.webkit.org/show_bug.cgi?id=126107
1376
1377         Reviewed by Benjamin Poulain.
1378
1379         Merge https://chromium.googlesource.com/chromium/blink/+/c1ebe5c1e808daf9db5e348a8d0ab32570b9f7a5
1380         except the test since it doesn't reproduce the crash in WebKit.
1381
1382         * editing/ReplaceSelectionCommand.cpp:
1383         (WebCore::ReplaceSelectionCommand::doApply):
1384
1385 2013-12-23  Benjamin Poulain  <benjamin@webkit.org>
1386
1387         Add the pseudo classes link and any-link to the Selector Code Generator
1388         https://bugs.webkit.org/show_bug.cgi?id=126196
1389
1390         Reviewed by Ryosuke Niwa.
1391
1392         * cssjit/SelectorCompiler.cpp:
1393         (WebCore::SelectorCompiler::addPseudoType):
1394         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
1395         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLink):
1396         * dom/Node.h:
1397         (WebCore::Node::flagIsElement):
1398         (WebCore::Node::flagIsLink):
1399         Fix the type to match TrustedImm32.
1400
1401 2013-12-23  Benjamin Poulain  <benjamin@webkit.org>
1402
1403         Add the experimental CSS code generator files to the remaining build systems
1404         https://bugs.webkit.org/show_bug.cgi?id=126192
1405
1406         Reviewed by Sam Weinig.
1407
1408         * CMakeLists.txt:
1409         * GNUmakefile.list.am:
1410         * WebCore.vcxproj/WebCore.vcxproj:
1411         * WebCore.vcxproj/WebCore.vcxproj.filters:
1412
1413 2013-12-23  Benjamin Poulain  <benjamin@webkit.org>
1414
1415         Add the pseudo class :focus to the Selector Code Generator
1416         https://bugs.webkit.org/show_bug.cgi?id=126189
1417
1418         Reviewed by Ryosuke Niwa.
1419
1420         * cssjit/SelectorCompiler.cpp:
1421         (WebCore::SelectorCompiler::addPseudoType):
1422         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
1423         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
1424         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFocused):
1425
1426 2013-12-23  Ryosuke Niwa  <rniwa@webkit.org>
1427
1428         Remove boolean argument from Element::setChildrenAffectBy* methods
1429         https://bugs.webkit.org/show_bug.cgi?id=126183
1430
1431         Reviewed by Daniel Bates.
1432
1433         Merge https://chromium.googlesource.com/chromium/blink/+/066ef2fa78336b2b65052cb17cb81b367fe7dbbf
1434
1435         These functions are never called with false.
1436
1437         * css/SelectorChecker.cpp:
1438         (WebCore::SelectorChecker::checkOne):
1439         * dom/Element.cpp:
1440         (WebCore::Element::setChildrenAffectedByActive):
1441         (WebCore::Element::setChildrenAffectedByDrag):
1442         * dom/Element.h:
1443         (WebCore::Element::setChildrenAffectedByHover):
1444
1445 2013-12-23  Tim Horton  <timothy_horton@apple.com>
1446
1447         Fix the iOS build after r161013 and r160672.
1448
1449         * WebCore.exp.in:
1450         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1451         (PlatformCALayerMac::updateCustomAppearance):
1452
1453 2013-12-23  Oliver Hunt  <oliver@apple.com>
1454
1455         Refactor PutPropertySlot to be aware of custom properties
1456         https://bugs.webkit.org/show_bug.cgi?id=126187
1457
1458         Reviewed by msaboff.
1459
1460         Update the bindings code generation and custom objects
1461         to the new function signatures
1462
1463         * bindings/js/JSDOMWindowCustom.cpp:
1464         (WebCore::JSDOMWindow::put):
1465         * bindings/objc/WebScriptObject.mm:
1466         (-[WebScriptObject setValue:forKey:]):
1467         * bindings/scripts/CodeGeneratorJS.pm:
1468         (GenerateImplementation):
1469         * bindings/scripts/test/JS/JSTestInterface.cpp:
1470         (WebCore::JSTestInterface::putByIndex):
1471         * bridge/NP_jsobject.cpp:
1472         (_NPN_SetProperty):
1473
1474 2013-12-23  Benjamin Poulain  <benjamin@webkit.org>
1475
1476         Add class matching to the Selector Code Generator
1477         https://bugs.webkit.org/show_bug.cgi?id=126176
1478
1479         Reviewed by Antti Koivisto.
1480
1481         Add selector matching based on classname to the Selector Compiler.
1482
1483         * cssjit/SelectorCompiler.cpp:
1484         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
1485         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementDataMatching):
1486         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasClasses):
1487         * dom/ElementData.h:
1488         (WebCore::ElementData::classNamesMemoryOffset):
1489         * dom/SpaceSplitString.h:
1490         (WebCore::SpaceSplitStringData::sizeMemoryOffset):
1491         (WebCore::SpaceSplitStringData::tokensMemoryOffset):
1492
1493 2013-12-23  Daniel Bates  <dabates@apple.com>
1494
1495         [iOS] Upstream WebCore/storage changes
1496         https://bugs.webkit.org/show_bug.cgi?id=125913
1497
1498         Reviewed by David Kilzer.
1499
1500         * storage/StorageAreaSync.cpp:
1501         (WebCore::StorageAreaSync::openDatabase): Added iOS-specific code.
1502         (WebCore::StorageAreaSync::sync): Ditto.
1503         * storage/StorageTracker.cpp:
1504         (WebCore::StorageTracker::openTrackerDatabase): Ditto.
1505         (WebCore::StorageTracker::syncImportOriginIdentifiers): Ditto.
1506         (WebCore::StorageTracker::syncFileSystemAndTrackerDatabase): Ditto.
1507         (WebCore::StorageTracker::syncSetOriginDetails): Ditto.
1508         (WebCore::StorageTracker::syncDeleteAllOrigins): Ditto.
1509         (WebCore::StorageTracker::syncDeleteOrigin): Ditto.
1510         (WebCore::StorageTracker::databasePathForOrigin): Ditto.
1511
1512 2013-12-23  Daniel Bates  <dabates@apple.com>
1513
1514         Fix the iOS build following <http://trac.webkit.org/changeset/160236>
1515         (https://bugs.webkit.org/show_bug.cgi?id=125239)
1516
1517         * rendering/RenderBlock.h:
1518         * rendering/RenderBox.cpp:
1519         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned): Substitute view() for &view().
1520         * rendering/RenderLayer.cpp:
1521         (WebCore::RenderLayer::scrollTo): Fix indentation of closing brace.
1522         * rendering/RenderLayerCompositor.cpp: Include MainFrame.h.
1523         (WebCore::RenderLayerCompositor::contentsScaleMultiplierForNewTiles): Check that page->mainFrame().view()
1524         is non-null; also add explicit #else clause.
1525         (WebCore::RenderLayerCompositor::ensureRootLayer): Fix up main frame check.
1526         * rendering/RenderTheme.h:
1527         (WebCore::RenderTheme::paintFileUploadIconDecorations): Substitute rect for r.
1528         * rendering/RenderThemeIOS.mm:
1529         (WebCore::RenderThemeIOS::paintTextFieldDecorations): Use .get() to access underlying NeverDestroyed item.
1530         (WebCore::RenderThemeIOS::systemFont):
1531         * rendering/RenderView.cpp:
1532         (WebCore::fixedPositionOffset): Substitute frameView.scrollOffset() for frameView->scrollOffset().
1533
1534 2013-12-23  Ryosuke Niwa  <rniwa@webkit.org>
1535
1536         Minor optimization in FrameSelection::setNonDirectionalSelectionIfNeeded()
1537         https://bugs.webkit.org/show_bug.cgi?id=126108
1538
1539         Reviewed by Benjamin Poulain.
1540
1541         Merge https://chromium.googlesource.com/chromium/blink/+/237b987c324e2e389a9e0350293bfaf16a5e201d
1542
1543         * editing/FrameSelection.cpp:
1544         (WebCore::FrameSelection::setNonDirectionalSelectionIfNeeded):
1545
1546 2013-12-23  Ryosuke Niwa  <rniwa@webkit.org>
1547
1548         Use isDocumentFragment() instead of comparing nodeType() with Node::DOCUMENT_FRAGMENT_NODE
1549         https://bugs.webkit.org/show_bug.cgi?id=126178
1550
1551         Reviewed by Antti Koivisto.
1552
1553         Inspired by https://chromium.googlesource.com/chromium/blink/+/a622cb80af2bfb0c5d91123cbcfa4fa72a06554c
1554
1555         Use inline Node::isDocumentFragment() instead of virtual nodeType().
1556
1557         * dom/ContainerNode.cpp:
1558         (WebCore::collectChildrenAndRemoveFromOldParent):
1559         * dom/Document.cpp:
1560         (WebCore::Document::canReplaceChild):
1561
1562 2013-12-23  Gwang Yoon Hwang  <ryumiel@company100.net>
1563
1564         Clear ScratchBuffer::m_lastLayerSize when clearing the scratch buffer.
1565         https://bugs.webkit.org/show_bug.cgi?id=126150
1566
1567         Reviewed by Simon Fraser.
1568
1569         Since ScratchBuffer::clearScratchBuffer only clears m_lastRadius,
1570         ShadowBlur doesn't draw shadow into the re-created scratch buffer if it
1571         tries to draw shadow without blurRadius.
1572
1573         Clear m_lastLayerSize to empty is enought to ensure that there is no
1574         drawn contents in the scratch buffer.
1575
1576         No new tests due to the flaky nature of reproducing the issue.
1577
1578         * platform/graphics/ShadowBlur.cpp:
1579         (WebCore::ScratchBuffer::clearScratchBuffer):
1580
1581 2013-12-23  Benjamin Poulain  <benjamin@webkit.org>
1582
1583         Add id matching to the Selector Code Generator
1584         https://bugs.webkit.org/show_bug.cgi?id=126154
1585
1586         Reviewed by Antti Koivisto.
1587
1588         Compile matching for #id selectors. IDs are Atomic String so it is just a matter
1589         of comparing the pointers.
1590
1591         No attempt is made at optimizing for the double #id case because such problem
1592         do not really happen outside tests.
1593
1594         * cssjit/SelectorCompiler.cpp:
1595         (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment):
1596         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
1597         (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
1598         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
1599         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementDataMatching):
1600         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasId):
1601         * dom/Element.h:
1602         (WebCore::Element::elementDataMemoryOffset):
1603         * dom/ElementData.h:
1604         (WebCore::ElementData::idForStyleResolutionMemoryOffset):
1605
1606 2013-12-23  Oliver Hunt  <oliver@apple.com>
1607
1608         Update custom setter implementations to perform type checks
1609         https://bugs.webkit.org/show_bug.cgi?id=126171
1610
1611         Reviewed by Daniel Bates.
1612
1613         Update the bindings code generator for setters so that they perform a real
1614         type check.
1615
1616         * bindings/scripts/CodeGeneratorJS.pm:
1617         (GenerateAttributeEventListenerCall):
1618         (GenerateHeader):
1619         (GenerateImplementation):
1620         * bindings/scripts/test/JS/JSTestInterface.cpp:
1621         (WebCore::setJSTestInterfaceConstructorImplementsStaticAttr):
1622         (WebCore::setJSTestInterfaceImplementsStr2):
1623         (WebCore::setJSTestInterfaceImplementsStr3):
1624         (WebCore::setJSTestInterfaceImplementsNode):
1625         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
1626         (WebCore::setJSTestInterfaceSupplementalStr2):
1627         (WebCore::setJSTestInterfaceSupplementalStr3):
1628         (WebCore::setJSTestInterfaceSupplementalNode):
1629         * bindings/scripts/test/JS/JSTestInterface.h:
1630         * bindings/scripts/test/JS/JSTestObj.cpp:
1631         (WebCore::setJSTestObjConstructorStaticStringAttr):
1632         (WebCore::setJSTestObjTestSubObjEnabledBySettingConstructor):
1633         (WebCore::setJSTestObjEnumAttr):
1634         (WebCore::setJSTestObjByteAttr):
1635         (WebCore::setJSTestObjOctetAttr):
1636         (WebCore::setJSTestObjShortAttr):
1637         (WebCore::setJSTestObjUnsignedShortAttr):
1638         (WebCore::setJSTestObjLongAttr):
1639         (WebCore::setJSTestObjLongLongAttr):
1640         (WebCore::setJSTestObjUnsignedLongLongAttr):
1641         (WebCore::setJSTestObjStringAttr):
1642         (WebCore::setJSTestObjTestObjAttr):
1643         (WebCore::setJSTestObjXMLObjAttr):
1644         (WebCore::setJSTestObjCreate):
1645         (WebCore::setJSTestObjReflectedStringAttr):
1646         (WebCore::setJSTestObjReflectedIntegralAttr):
1647         (WebCore::setJSTestObjReflectedUnsignedIntegralAttr):
1648         (WebCore::setJSTestObjReflectedBooleanAttr):
1649         (WebCore::setJSTestObjReflectedURLAttr):
1650         (WebCore::setJSTestObjReflectedCustomIntegralAttr):
1651         (WebCore::setJSTestObjReflectedCustomBooleanAttr):
1652         (WebCore::setJSTestObjReflectedCustomURLAttr):
1653         (WebCore::setJSTestObjTypedArrayAttr):
1654         (WebCore::setJSTestObjAttrWithGetterException):
1655         (WebCore::setJSTestObjAttrWithSetterException):
1656         (WebCore::setJSTestObjStringAttrWithGetterException):
1657         (WebCore::setJSTestObjStringAttrWithSetterException):
1658         (WebCore::setJSTestObjCustomAttr):
1659         (WebCore::setJSTestObjWithScriptStateAttribute):
1660         (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
1661         (WebCore::setJSTestObjWithScriptStateAttributeRaises):
1662         (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
1663         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
1664         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
1665         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
1666         (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
1667         (WebCore::setJSTestObjConditionalAttr1):
1668         (WebCore::setJSTestObjConditionalAttr2):
1669         (WebCore::setJSTestObjConditionalAttr3):
1670         (WebCore::setJSTestObjConditionalAttr4Constructor):
1671         (WebCore::setJSTestObjConditionalAttr5Constructor):
1672         (WebCore::setJSTestObjConditionalAttr6Constructor):
1673         (WebCore::setJSTestObjAnyAttribute):
1674         (WebCore::setJSTestObjMutablePoint):
1675         (WebCore::setJSTestObjImmutablePoint):
1676         (WebCore::setJSTestObjStrawberry):
1677         (WebCore::setJSTestObjStrictFloat):
1678         (WebCore::setJSTestObjId):
1679         (WebCore::setJSTestObjReplaceableAttribute):
1680         (WebCore::setJSTestObjNullableLongSettableAttribute):
1681         (WebCore::setJSTestObjNullableStringValue):
1682         (WebCore::setJSTestObjAttributeWithReservedEnumType):
1683         * bindings/scripts/test/JS/JSTestObj.h:
1684         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1685         (WebCore::setJSTestSerializedScriptValueInterfaceValue):
1686         (WebCore::setJSTestSerializedScriptValueInterfaceCachedValue):
1687         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1688         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1689         (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
1690         (WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
1691         (WebCore::setJSTestTypedefsAttrWithGetterException):
1692         (WebCore::setJSTestTypedefsAttrWithSetterException):
1693         (WebCore::setJSTestTypedefsStringAttrWithGetterException):
1694         (WebCore::setJSTestTypedefsStringAttrWithSetterException):
1695         * bindings/scripts/test/JS/JSTestTypedefs.h:
1696
1697 2013-12-23  Lucas Forschler  <lforschler@apple.com>
1698
1699         <rdar://problem/15682948> Update copyright strings
1700
1701         Reviewed by Dan Bernstein
1702
1703         * Info.plist:
1704
1705 2013-12-23  Commit Queue  <commit-queue@webkit.org>
1706
1707         Unreviewed, rolling out r160945.
1708         http://trac.webkit.org/changeset/160945
1709         https://bugs.webkit.org/show_bug.cgi?id=126164
1710
1711         Seems to have broken multiple canvas tests (Requested by ap on
1712         #webkit).
1713
1714         * WebCore.xcodeproj/project.pbxproj:
1715         * platform/graphics/cg/ImageBufferBackingStoreCache.cpp: Removed.
1716         * platform/graphics/cg/ImageBufferBackingStoreCache.h: Removed.
1717         * platform/graphics/cg/ImageBufferCG.cpp:
1718         (WebCore::createIOSurface):
1719         (WebCore::ImageBuffer::ImageBuffer):
1720         (WebCore::ImageBuffer::~ImageBuffer):
1721
1722 2013-12-23  Eric Carlson  <eric.carlson@apple.com>
1723
1724         AudioSessionManager should be MediaSessionManager
1725         https://bugs.webkit.org/show_bug.cgi?id=126087
1726
1727         Reviewed by Jer Noble.
1728
1729         No new tests, no change in functionality.
1730
1731         * WebCore.xcodeproj/project.pbxproj: Change file names.
1732
1733         * html/HTMLMediaElement.cpp:
1734         (WebCore::HTMLMediaElement::HTMLMediaElement): MediaSessionManagerToken::create() takes a client
1735             interface instead of the media type.
1736         * html/HTMLMediaElement.h:
1737
1738         * platform/audio/AudioSessionListener.h: Include <wtf/Noncopyable.h>.
1739         
1740         AudioSessionManager.* -> MediaSessionManager.*
1741         * platform/audio/AudioSessionManager.cpp: Removed.
1742         * platform/audio/AudioSessionManager.h: Removed.
1743         * platform/audio/MediaSessionManager.cpp: Copied from Source/WebCore/platform/audio/AudioSessionManager.cpp.
1744         (MediaSessionManagerToken::create):
1745         (MediaSessionManagerToken::MediaSessionManagerToken):
1746         (MediaSessionManagerToken::~MediaSessionManagerToken):
1747         (MediaSessionManager::sharedManager):
1748         (MediaSessionManager::MediaSessionManager):
1749         (MediaSessionManager::has):
1750         (MediaSessionManager::count):
1751         (MediaSessionManager::addToken):
1752         (MediaSessionManager::removeToken):
1753         (MediaSessionManager::updateSessionState):
1754         * platform/audio/MediaSessionManager.h: Copied from Source/WebCore/platform/audio/AudioSessionManager.h.
1755
1756         * platform/audio/mac/AudioDestinationMac.cpp:
1757         (WebCore::AudioDestinationMac::AudioDestinationMac): MediaSessionManagerToken::create() takes a
1758             client interface instead of the media type.
1759         * platform/audio/mac/AudioDestinationMac.h:
1760
1761         * platform/audio/mac/AudioSessionMac.cpp:
1762         * platform/audio/mac/AudioSessionManagerMac.cpp: Removed.
1763         * platform/audio/mac/MediaSessionManagerMac.cpp: Copied from Source/WebCore/platform/audio/mac/AudioSessionManagerMac.cpp.
1764         (MediaSessionManager::updateSessionState):
1765
1766 2013-12-23  Zan Dobersek  <zdobersek@igalia.com>
1767
1768         webkit gtk 2.2.3 stable tarball compilation error
1769         https://bugs.webkit.org/show_bug.cgi?id=125987
1770
1771         Reviewed by Gustavo Noronha Silva.
1772
1773         Only try including <gdk/gdkwayland.h> and using GDK_IS_WAYLAND_DISPLAY if the Wayland support has been
1774         enabled and when not compiling with GTK+ 2 (which occurs when building for libPlatformGtk2).
1775
1776         * platform/graphics/GLContext.cpp:
1777         (WebCore::GLContext::createContextForWindow):
1778
1779 2013-12-23  Piotr Grad  <p.grad@samsung.com>
1780
1781         [GStreamer] video/audio seeking is not unified.
1782         https://bugs.webkit.org/show_bug.cgi?id=125852
1783
1784         Reviewed by Philippe Normand.
1785
1786         This bug is fixing regression with seeking audio/video elements and unifies seeking
1787         in MediaPlayerPrivateGStreamer.
1788
1789         Test: media/video-seek-with-negative-playback.html
1790
1791         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1792         (WebCore::MediaPlayerPrivateGStreamer::seek):
1793         (WebCore::MediaPlayerPrivateGStreamer::seekIncludingRate):
1794         (WebCore::MediaPlayerPrivateGStreamer::setRate):
1795         (WebCore::MediaPlayerPrivateGStreamer::updateStates):
1796         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1797
1798 2013-12-23  ChangSeok Oh  <changseok.oh@collabora.com>
1799
1800         [GTK][WK2] WebGL is not working with GLES
1801         https://bugs.webkit.org/show_bug.cgi?id=126138
1802
1803         Reviewed by Martin Robinson.
1804
1805         m_texture has been unnecessarily regenerated. It's generated in GraphicsContext3D
1806         constructor for offscreen rendering. And m_compositorTexture is used by only Mac port.
1807         They create it in their GraphicsContext3D constructor so that we don't need to recreate it
1808         in GC3DOpenGLES::reshapeFBOs.
1809
1810         No new tests since no functionality changed.
1811
1812         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
1813         (WebCore::GraphicsContext3D::~GraphicsContext3D):
1814         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
1815         (WebCore::GraphicsContext3D::reshapeFBOs):
1816         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
1817         (WebCore::GraphicsContext3D::reshapeFBOs):
1818
1819 2013-12-22  Benjamin Poulain  <bpoulain@apple.com>
1820
1821         Create a skeleton for CSS Selector code generation
1822         https://bugs.webkit.org/show_bug.cgi?id=126044
1823
1824         Reviewed by Antti Koivisto and Gavin Barraclough.
1825
1826         Add CSSCompiler, which provides the basic infrastructure to compile
1827         CSS Selectors on x86_64.
1828
1829         Compilation happens in two phases.
1830         1) The various matching and relation of each CSSSelector is aggregated into units
1831            matching a single element: SelectorFragment.
1832            SelectorFragment also knows about the relations between different fragments,
1833            and contains all the information to generate the code for a particular element.
1834         2) The compiler then goes over the fragments, and generate code based on the information
1835            of each fragment.
1836
1837         It the current state, SelectorCompiler only compiles the tag matching selectors and
1838         any of the relation between selectors.
1839
1840         Depending on the relation and position of a fragment, failure on traversal or matching
1841         does not necessarily causes the complete selector. A failure can cause matching to
1842         resume from the parent or the sibling of a previously visisted node.
1843         The implementation of this is done through the BacktrackingAction. In case of failure,
1844         the next starting state is setup and the program counter jumps back to the appropriate
1845         starting point.
1846
1847         When backtracking, the method used to save the starting point depends on the type
1848         of backtracking.
1849         The child/parent relation (">") is very common so it uses an additional register to keep
1850         the next starting point (m_descendantBacktrackingStart).
1851         The indirect sibling relation ("~") is much less common and uses the stack to save
1852         the next starting point.
1853
1854         * WebCore.xcodeproj/project.pbxproj:
1855         * cssjit/SelectorCompiler.cpp: Added.
1856         (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment):
1857         (WebCore::SelectorCompiler::compileSelector):
1858         (WebCore::SelectorCompiler::fragmentRelationForSelectorRelation):
1859         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
1860         (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
1861         (WebCore::SelectorCompiler::updateChainStates):
1862         (WebCore::SelectorCompiler::isFirstAncestor):
1863         (WebCore::SelectorCompiler::isFirstAdjacent):
1864         (WebCore::SelectorCompiler::isAfterChildRelation):
1865         (WebCore::SelectorCompiler::solveBacktrackingAction):
1866         (WebCore::SelectorCompiler::requiresAdjacentTail):
1867         (WebCore::SelectorCompiler::requiresDescendantTail):
1868         (WebCore::SelectorCompiler::SelectorCodeGenerator::computeBacktrackingInformation):
1869         (WebCore::SelectorCompiler::testIsElementFlagOnNode):
1870         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToParentElement):
1871         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateParentElementTreeWalker):
1872         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAncestorTreeWalker):
1873         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToPreviousAdjacent):
1874         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
1875         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateIndirectAdjacentTreeWalker):
1876         (WebCore::SelectorCompiler::SelectorCodeGenerator::markParentElementIfResolvingStyle):
1877         (WebCore::SelectorCompiler::SelectorCodeGenerator::linkFailures):
1878         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAdjacentBacktrackingTail):
1879         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDescendantBacktrackingTail):
1880         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateBacktrackingTailsIfNeeded):
1881         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
1882         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasTagName):
1883         * cssjit/SelectorCompiler.h: Added.
1884         (WebCore::SelectorCompilationStatus::SelectorCompilationStatus):
1885         (WebCore::SelectorCompilationStatus::operator Status):
1886         (WebCore::SelectorCompiler::simpleSelectorCheckerFunction):
1887         (WebCore::SelectorCompiler::selectorCheckerFunctionWithCheckingContext):
1888         * dom/Element.cpp:
1889         (WebCore::Element::setChildrenAffectedByDirectAdjacentRules):
1890         (WebCore::Element::setChildrenAffectedByForwardPositionalRules):
1891         * dom/Element.h:
1892         (WebCore::Element::tagQNameMemoryOffset):
1893         (WebCore::Element::setChildrenAffectedByForwardPositionalRules):
1894         * dom/Node.h:
1895         (WebCore::Node::parentNodeMemoryOffset):
1896         (WebCore::Node::previousSiblingMemoryOffset):
1897         (WebCore::Node::nodeFlagsMemoryOffset):
1898         (WebCore::Node::flagIsElement):
1899         * dom/QualifiedName.h:
1900         (WebCore::QualifiedName::QualifiedNameImpl::localNameMemoryOffset):
1901         (WebCore::QualifiedName::QualifiedNameImpl::namespaceMemoryOffset):
1902         (WebCore::QualifiedName::implMemoryOffset):
1903
1904 2013-12-22  Mihnea Ovidenie  <mihnea@adobe.com>
1905
1906         [CSSRegions] Crash when trying to select content from invalid region
1907         https://bugs.webkit.org/show_bug.cgi?id=126113
1908
1909         Reviewed by Antti Koivisto.
1910
1911         After fix for https://bugs.webkit.org/show_bug.cgi?id=120769, positionForPoint for a region attempts to use the associated named flow to perform its task.
1912         However, this should happen only when the region is valid. If the region is invalid, part of a dependency cycle, positionForPoint should behave as usual
1913         for a block instead of a region, otherwise it may run into an infinite loop due to cyclic dependencies and a crash will occur.
1914
1915         This patch ensures that positionForPoint region specifie behaviour is followed only if the region is valid - not part of a dependency cycle.
1916
1917         Test: fast/regions/selection/invalid-region-selection-crash.html
1918
1919         * rendering/RenderRegion.cpp:
1920         (WebCore::RenderRegion::positionForPoint):
1921
1922 2013-12-21  Dirk Schulze  <krit@webkit.org>
1923
1924         Start refactoring Filter code to reuse CachedSVGDocument for clipPath
1925         https://bugs.webkit.org/show_bug.cgi?id=126069
1926
1927         Reviewed by Andreas Kling.
1928
1929         Smaller refactoring of the CSS filter style resolver code. Previously the code
1930         requested the FilterOperations list from RenderStyle and compared the content
1931         in this list with an internal map. Then the resource loading was triggered.
1932         With the refactoring we do not request the list from RenderStyle anymore but
1933         rely on the hash map data entirely.
1934
1935         * css/StyleResolver.cpp:
1936         (WebCore::StyleResolver::loadPendingSVGDocuments):
1937         * platform/graphics/filters/FilterOperation.h:
1938
1939 2013-12-20  Andy Estes  <aestes@apple.com>
1940
1941         [Mac] Soft-link WebContentAnalysis.framework
1942         https://bugs.webkit.org/show_bug.cgi?id=126102
1943
1944         Reviewed by Dan Bernstein.
1945
1946         * Configurations/WebCore.xcconfig: There's no need to modify LDFLAGS
1947         now that we don't hard link against WebContentAnalysis.framework.
1948         * WebCore.xcodeproj/project.pbxproj: Removed
1949         WebContentAnalysis.framework from the 'Link Binary with Libraries'
1950         build phase.
1951         * platform/mac/ContentFilterMac.mm: Soft-linked
1952         WebContentAnalysis.framework and the WebFilterEvaluator @class.
1953         (WebCore::ContentFilter::ContentFilter): Called getWebFilterEvaluatorClass().
1954         (WebCore::ContentFilter::isEnabled): Ditto.
1955         * platform/mac/SoftLinking.h: Added an implementation of
1956         SOFT_LINK_PRIVATE_FRAMEWORK().
1957
1958 2013-12-21  Antti Koivisto  <antti@apple.com>
1959
1960         Unreviewed, rolling out r160916.
1961         http://trac.webkit.org/changeset/160916
1962         https://bugs.webkit.org/show_bug.cgi?id=126073
1963
1964         Roll out a temporary fix. The underlying issue was fixed.
1965
1966         * accessibility/AccessibilityRenderObject.cpp:
1967         (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
1968         (WebCore::AccessibilityRenderObject::~AccessibilityRenderObject):
1969         (WebCore::AccessibilityRenderObject::detach):
1970         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
1971         * accessibility/AccessibilityRenderObject.h:
1972
1973 2013-12-21  Antti Koivisto  <antti@apple.com>
1974
1975         Figure out if node is focusable without requiring renderer
1976         https://bugs.webkit.org/show_bug.cgi?id=126118
1977
1978         Reviewed by Andreas Kling.
1979
1980         * dom/Element.cpp:
1981         (WebCore::Element::computedStyle):
1982         
1983             Use inDocument() test instead of the attached() test. We can compute style for anything that
1984             is in document.
1985
1986         * dom/Node.cpp:
1987         (WebCore::Node::isContentEditable):
1988         (WebCore::Node::isContentRichlyEditable):
1989         (WebCore::Node::hasEditableStyle):
1990         
1991             Use computedStyle instead of getting the style from renderer. Computed style gets constructed
1992             on demand if renderer does not exist. If it does then the existing style is used.
1993
1994         (WebCore::Node::isEditableToAccessibility):
1995         (WebCore::Node::canStartSelection):
1996         (WebCore::Node::isRootEditableElement):
1997         (WebCore::Node::rootEditableElement):
1998         * dom/Node.h:
1999         (WebCore::Node::hasEditableStyle):
2000         (WebCore::Node::hasRichlyEditableStyle):
2001         
2002             Renamed from rendererIsEditable since these no longer require renderer.
2003
2004         (WebCore::HTMLElement::supportsFocus):
2005         
2006             Stop calling updateStyleIfNeeded() and forcing render tree construction.
2007
2008 2013-12-21  Carlos Garcia Campos  <cgarcia@igalia.com>
2009
2010         [SOUP] ResourceHandleSoup should use async client callbacks when client uses async callbacks
2011         https://bugs.webkit.org/show_bug.cgi?id=126006
2012
2013         Reviewed by Martin Robinson.
2014
2015         This fixes WebKit2 loader client unit tests when using the network
2016         process.
2017
2018         * platform/network/ResourceHandle.cpp:
2019         * platform/network/soup/ResourceHandleSoup.cpp:
2020         (WebCore::doRedirect): Call willSendRequestAsync on the client
2021         when usesAsyncCallbacks returns true.
2022         (WebCore::nextMultipartResponsePartCallback): Call
2023         didReceiveResponseAsync on the client when usesAsyncCallbacks
2024         returns true.
2025         (WebCore::sendRequestCallback): Ditto.
2026         (WebCore::ResourceHandle::continueWillSendRequest): Empty
2027         implementation for now because the default one asserts.
2028         (WebCore::ResourceHandle::continueDidReceiveResponse): Ditto.
2029         (WebCore::ResourceHandle::continueShouldUseCredentialStorage): Ditto.
2030
2031 2013-12-20  Anders Carlsson  <andersca@apple.com>
2032
2033         Replace yield() and pauseBriefly() with std::this_thread::yield()
2034         https://bugs.webkit.org/show_bug.cgi?id=126105
2035
2036         Reviewed by Sam Weinig.
2037
2038         * platform/sql/SQLiteDatabase.cpp:
2039         (WebCore::SQLiteDatabase::interrupt):
2040
2041 2013-12-20  Ryosuke Niwa  <rniwa@webkit.org>
2042
2043         Assert that RootInlineBox::setLineBreakInfo should is never called on a RenderInline without line boxes
2044         https://bugs.webkit.org/show_bug.cgi?id=126101
2045
2046         Reviewed by Simon Fraser.
2047
2048         Merge assertions added in https://chromium.googlesource.com/chromium/blink/+/716ac74fd475b581d69c0aa8ec2d806201c3a420
2049
2050         The code change was not merged since we never hit the added assertion on the attached test case in WebKit.
2051
2052         * rendering/RootInlineBox.cpp:
2053         (WebCore::RootInlineBox::setLineBreakInfo):
2054
2055 2013-12-20  Joseph Pecoraro  <pecoraro@apple.com>
2056
2057         Web Inspector: Remove the references to Node in InjectedScript
2058         https://bugs.webkit.org/show_bug.cgi?id=126091
2059
2060         Reviewed by Timothy Hatcher.
2061
2062         Remove the last DOM references from InjectedScript so that
2063         InjectedScript can move down into JavaScriptCore. The only
2064         remaining references were to Nodes, which are all just thin
2065         wrappers around existing functions. Move Node / JSNode (JSValue)
2066         conversion into InspectorDOMAgent, where it was used.
2067
2068         No new tests, no observable change in functionality.
2069
2070         * bindings/js/JSInjectedScriptHostCustom.cpp:
2071         * inspector/InjectedScript.cpp:
2072         (WebCore::InjectedScript::inspectObject):
2073         (WebCore::InjectedScript::releaseObject):
2074         * inspector/InjectedScript.h:
2075         * inspector/InjectedScriptHost.h:
2076         * inspector/InjectedScriptSource.js:
2077         * inspector/InspectorDOMAgent.cpp:
2078         (WebCore::InspectorDOMAgent::focusNode):
2079         (WebCore::InspectorDOMAgent::highlightNode):
2080         (WebCore::InspectorDOMAgent::requestNode):
2081         (WebCore::InspectorDOMAgent::nodeForObjectId):
2082         (WebCore::InspectorDOMAgent::resolveNode):
2083         (WebCore::InspectorDOMAgent::scriptValueAsNode):
2084         (WebCore::InspectorDOMAgent::nodeAsScriptValue):
2085         * inspector/InspectorDOMAgent.h:
2086         * inspector/PageConsoleAgent.cpp:
2087
2088 2013-12-20  Myles C. Maxfield  <mmaxfield@apple.com>
2089
2090         Faster implementation of text-decoration-skip: ink
2091         https://bugs.webkit.org/show_bug.cgi?id=125718
2092
2093         Reviewed by Simon Fraser.
2094
2095         This new implementation of text-decoration-skip: ink extracts
2096         each glyph into a path, then decomposes each path into a series
2097         of contours. It then intersects each contour with the top and
2098         bottom of the underline (by approximating the contour with a line).
2099         It then draws underlines in between these intersection regions.
2100
2101         Tests for text-decoration-skip: ink already exist in
2102         fast/css3-text/css3-text-decoration/text-decoration-skip
2103
2104         * platform/graphics/Font.h: Signature of new function
2105         * platform/graphics/mac/FontMac.mm:
2106         (WebCore::GlyphIterationState::GlyphIterationState): Persistent
2107         between calls to findPathIntersections
2108         (WebCore::findIntersectionPoint): Calculates an intersection point
2109         between two lines
2110         (WebCore::findPathIntersections): Called by CGPathApply to find
2111         intersections of each contour
2112         (WebCore::Font::intersectionPoints): Function to get the places
2113         where an underline would intersect a TextRun.
2114         * rendering/InlineTextBox.cpp:
2115         (WebCore::compareTuples): Used for sorting intersection ranges
2116         (WebCore::translateIntersectionPointsToSkipInkBoundaries): Converts
2117         a sequence of intersection points to the locations where
2118         text-decoration-skip: ink should draw underlines
2119         (WebCore::drawSkipInkUnderline): Draws a sequence of short underlines
2120         (WebCore::InlineTextBox::paintDecoration):
2121         * rendering/TextPainter.cpp:
2122         (WebCore::TextPainter::intersectionPoints): Calls Font::intersectionPoints
2123         * rendering/TextPainter.h:
2124
2125 2013-12-20  Joseph Pecoraro  <pecoraro@apple.com>
2126
2127         Web Inspector: Give the CommandLineAPIModule its own Host object, making InjectedScriptHost viable for a JS Context
2128         https://bugs.webkit.org/show_bug.cgi?id=126082
2129
2130         Reviewed by Timothy Hatcher.
2131
2132         Extract CommandLineAPIHost from InjectedScriptHost. The command line API contained
2133         a bunch of DOM specific JavaScript that would not be suitable for a pure JavaScript
2134         environment. Now that the DOM related code is in this WebCore only module, give this
2135         module a host object that WebCore will provide.
2136
2137         No new tests, no observable change in functionality.
2138
2139         * CMakeLists.txt:
2140         * DerivedSources.cpp:
2141         * DerivedSources.make:
2142         * GNUmakefile.list.am:
2143         * UseJSC.cmake:
2144         * WebCore.vcxproj/WebCore.vcxproj:
2145         * WebCore.vcxproj/WebCore.vcxproj.filters:
2146         * WebCore.xcodeproj/project.pbxproj:
2147         * bindings/js/JSBindingsAllInOne.cpp:
2148         Add new files.
2149
2150         * bindings/js/JSCommandLineAPIHostCustom.cpp: Added.
2151         (WebCore::JSCommandLineAPIHost::inspectedObject):
2152         (WebCore::getJSListenerFunctions):
2153         (WebCore::JSCommandLineAPIHost::getEventListeners):
2154         (WebCore::JSCommandLineAPIHost::inspect):
2155         (WebCore::JSCommandLineAPIHost::databaseId):
2156         (WebCore::JSCommandLineAPIHost::storageId):
2157         * bindings/js/JSInjectedScriptHostCustom.cpp:
2158         * inspector/CommandLineAPIHost.cpp: Copied from Source/WebCore/inspector/InjectedScriptHost.cpp.
2159         (WebCore::CommandLineAPIHost::create):
2160         (WebCore::CommandLineAPIHost::CommandLineAPIHost):
2161         (WebCore::CommandLineAPIHost::~CommandLineAPIHost):
2162         (WebCore::CommandLineAPIHost::disconnect):
2163         (WebCore::CommandLineAPIHost::inspectImpl):
2164         (WebCore::CommandLineAPIHost::getEventListenersImpl):
2165         (WebCore::CommandLineAPIHost::clearConsoleMessages):
2166         (WebCore::CommandLineAPIHost::copyText):
2167         (WebCore::CommandLineAPIHost::InspectableObject::get):
2168         (WebCore::CommandLineAPIHost::addInspectedObject):
2169         (WebCore::CommandLineAPIHost::clearInspectedObjects):
2170         (WebCore::CommandLineAPIHost::inspectedObject):
2171         (WebCore::CommandLineAPIHost::databaseIdImpl):
2172         (WebCore::CommandLineAPIHost::storageIdImpl):
2173         * inspector/CommandLineAPIHost.h: Copied from Source/WebCore/inspector/InjectedScriptHost.h.
2174         (WebCore::CommandLineAPIHost::init):
2175         * inspector/CommandLineAPIHost.idl: Copied from Source/WebCore/inspector/InjectedScriptHost.idl.
2176         * inspector/CommandLineAPIModule.cpp:
2177         These are almost all pure copies from InjectedScriptHost files. Cleaned up a bit.
2178
2179         * inspector/InjectedScriptModule.h:
2180         * inspector/InjectedScriptModule.cpp:
2181         (WebCore::InjectedScriptModule::ensureInjected):
2182         Modules can now define a host object when they are getting injected.
2183
2184         (WebCore::CommandLineAPIModule::host):
2185         * inspector/CommandLineAPIModule.h:
2186         Provide a CommandLineAPIHost, host object.
2187
2188         * inspector/InjectedScriptCanvasModule.h:
2189         * inspector/InjectedScriptCanvasModule.cpp:
2190         (WebCore::InjectedScriptCanvasModule::host):
2191         No host object is needed for the CanvasModule.
2192
2193         * inspector/InjectedScriptSource.js:
2194         * inspector/CommandLineAPIModuleSource.js:
2195         When injecting a module, pass on an optional host object to
2196         the module's source. Move a little more code between the
2197         two files. The two files are very tightly coupled right now.
2198
2199         * inspector/InjectedScriptHost.cpp:
2200         (WebCore::InjectedScriptHost::create):
2201         * inspector/InjectedScriptHost.h:
2202         (WebCore::InjectedScriptHost::~InjectedScriptHost):
2203         (WebCore::InjectedScriptHost::InjectedScriptHost):
2204         * inspector/InjectedScriptHost.idl:
2205         Move any command line specific logic to CommandLineAPIHost classes.
2206
2207         * inspector/InjectedScriptManager.cpp:
2208         (WebCore::InjectedScriptManager::disconnect):
2209         * inspector/InjectedScriptManager.h:
2210         (WebCore::InjectedScriptManager::commandLineAPIHost):
2211         * inspector/InspectorConsoleAgent.cpp:
2212         (WebCore::InspectorConsoleAgent::addInspectedHeapObject):
2213         * inspector/InspectorController.cpp:
2214         (WebCore::InspectorController::InspectorController):
2215         * inspector/InspectorHeapProfilerAgent.cpp:
2216         (WebCore::InspectorHeapProfilerAgent::resetState):
2217         * inspector/InspectorProfilerAgent.cpp:
2218         (WebCore::InspectorProfilerAgent::resetState):
2219         * inspector/PageConsoleAgent.cpp:
2220         (WebCore::PageConsoleAgent::addInspectedNode):
2221         * inspector/PageInjectedScriptManager.cpp:
2222         (WebCore::PageInjectedScriptManager::PageInjectedScriptManager):
2223         (WebCore::PageInjectedScriptManager::disconnect):
2224         * inspector/PageInjectedScriptManager.h:
2225         * inspector/WorkerInspectorController.cpp:
2226         (WebCore::WorkerInspectorController::WorkerInspectorController):
2227         An InjectedScriptManager may optionally have a commandLineAPIHost object.
2228         If it does, initialize it, and send it messages.
2229
2230 2013-12-09  Myles C. Maxfield  <mmaxfield@apple.com>
2231
2232         Allow ImageBuffer to re-use IOSurfaces
2233         https://bugs.webkit.org/show_bug.cgi?id=125477
2234
2235         Reviewed by Geoff Garen.
2236
2237         This test adds a static class, ImageBufferBackingStoreCache, that vends
2238         IOSurfaces. It remembers IOSurfaces that have been returned to it until
2239         a configurable timeout.
2240
2241         The storage used by this class is in the form of a HashMap from a
2242         bucketed size to the IOSurface. There are many other data structures
2243         that could be used, but this implementation gives a 80% hit rate on
2244         normal browsing of some example sites with Canvas and
2245         text-decoration-skip: ink. Because the buckets are fairly
2246         small (rounding the width and height up to multiples of 8), traversing the
2247         bucket contents takes on average 2 steps. 
2248
2249         Test: fast/canvas/canvas-backing-store-reuse.html
2250
2251         * WebCore.xcodeproj/project.pbxproj: Added new caching class
2252         * platform/graphics/cg/ImageBufferBackingStoreCache.cpp: Added.
2253         (WebCore::createIOSurface): Moved from ImageBufferCG.cpp
2254         (WebCore::ImageBufferBackingStoreCache::timerFired): Forget the cache
2255         contents
2256         (WebCore::ImageBufferBackingStoreCache::schedulePurgeTimer):
2257         (WebCore::ImageBufferBackingStoreCache::get): Static getter
2258         (WebCore::ImageBufferBackingStoreCache::ImageBufferBackingStoreCache):
2259         (WebCore::ImageBufferBackingStoreCache::insertIntoCache): Memory-management
2260         creation function
2261         (WebCore::ImageBufferBackingStoreCache::takeFromCache): Memory-management
2262         deletion function
2263         (WebCore::ImageBufferBackingStoreCache::isAcceptableSurface): Does this cached
2264         IOSurface fit the bill?
2265         (WebCore::ImageBufferBackingStoreCache::tryTakeFromCache): Lookup
2266         a bucket and walk through its contents
2267         (WebCore::ImageBufferBackingStoreCache::getOrAllocate): Public function
2268         for clients who want a IOSurface from the cache
2269         (WebCore::ImageBufferBackingStoreCache::deallocate): Public
2270         function for clients to return an IOSurface to the pool
2271         * platform/graphics/cg/ImageBufferBackingStoreCache.h: Added.
2272         * platform/graphics/cg/ImageBufferCG.cpp: Update to use new cache
2273         (WebCore::ImageBuffer::ImageBuffer):
2274         (WebCore::ImageBuffer::~ImageBuffer):
2275
2276 2013-12-20  Simon Fraser  <simon.fraser@apple.com>
2277
2278         Change "threaded scrolling" terminology to "asynchronous scrolling"
2279         https://bugs.webkit.org/show_bug.cgi?id=126094
2280
2281         Reviewed by Tim Horton.
2282
2283         Rename ENABLE_THREADED_SCROLLING to ENABLE_ASYNC_SCROLLING, and change
2284         references to "main thread scrolling" to "synchronous scrolling".
2285         
2286         In a few places, functions with names like shouldUpdateScrollLayerPositionOnMainThread()
2287         were actually returning SynchronousScrollingReasons, so rename them appropriately.
2288
2289         * WebCore.exp.in:
2290         * page/FrameView.cpp:
2291         (WebCore::FrameView::shouldUpdateCompositingLayersAfterScrolling):
2292         (WebCore::FrameView::isRubberBandInProgress):
2293         (WebCore::FrameView::requestScrollPositionUpdate):
2294         (WebCore::FrameView::updatesScrollLayerPositionOnMainThread):
2295         (WebCore::FrameView::wheelEvent):
2296         * page/Page.cpp:
2297         (WebCore::Page::synchronousScrollingReasonsAsText):
2298         * page/Page.h:
2299         * page/scrolling/ScrollingCoordinator.cpp:
2300         (WebCore::ScrollingCoordinator::create):
2301         (WebCore::ScrollingCoordinator::ScrollingCoordinator):
2302         (WebCore::ScrollingCoordinator::frameViewHasSlowRepaintObjectsDidChange):
2303         (WebCore::ScrollingCoordinator::frameViewFixedObjectsDidChange):
2304         (WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):
2305         (WebCore::ScrollingCoordinator::synchronousScrollingReasons):
2306         (WebCore::ScrollingCoordinator::updateSynchronousScrollingReasons):
2307         (WebCore::ScrollingCoordinator::setForceSynchronousScrollLayerPositionUpdates):
2308         (WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText):
2309         * page/scrolling/ScrollingCoordinator.h:
2310         (WebCore::ScrollingCoordinator::shouldUpdateScrollLayerPositionSynchronously):
2311         (WebCore::ScrollingCoordinator::setSynchronousScrollingReasons):
2312         * page/scrolling/ScrollingStateFixedNode.cpp:
2313         * page/scrolling/ScrollingStateFixedNode.h:
2314         * page/scrolling/ScrollingStateNode.cpp:
2315         * page/scrolling/ScrollingStateNode.h:
2316         * page/scrolling/ScrollingStateScrollingNode.cpp:
2317         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
2318         (WebCore::ScrollingStateScrollingNode::setSynchronousScrollingReasons):
2319         (WebCore::ScrollingStateScrollingNode::dumpProperties):
2320         * page/scrolling/ScrollingStateScrollingNode.h: Awkward "ReasonsForSynchronousScrolling" to avoid
2321         conflict with the enum called SynchronousScrollingReasons.
2322         * page/scrolling/ScrollingStateStickyNode.cpp:
2323         * page/scrolling/ScrollingStateStickyNode.h:
2324         * page/scrolling/ScrollingStateTree.cpp:
2325         * page/scrolling/ScrollingStateTree.h:
2326         * page/scrolling/ScrollingThread.cpp:
2327         * page/scrolling/ScrollingThread.h:
2328         * page/scrolling/ScrollingTree.cpp:
2329         * page/scrolling/ScrollingTree.h:
2330         * page/scrolling/ScrollingTreeNode.cpp:
2331         * page/scrolling/ScrollingTreeNode.h:
2332         * page/scrolling/ScrollingTreeScrollingNode.cpp:
2333         (WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode):
2334         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
2335         * page/scrolling/ScrollingTreeScrollingNode.h:
2336         (WebCore::ScrollingTreeScrollingNode::synchronousScrollingReasons):
2337         (WebCore::ScrollingTreeScrollingNode::shouldUpdateScrollLayerPositionSynchronously):
2338         * page/scrolling/mac/ScrollingCoordinatorMac.h:
2339         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2340         (WebCore::ScrollingCoordinatorMac::setSynchronousScrollingReasons):
2341         (WebCore::ScrollingCoordinatorMac::commitTreeState):
2342         * page/scrolling/mac/ScrollingStateNodeMac.mm:
2343         * page/scrolling/mac/ScrollingStateScrollingNodeMac.mm:
2344         * page/scrolling/mac/ScrollingThreadMac.mm:
2345         * page/scrolling/mac/ScrollingTreeFixedNode.h:
2346         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
2347         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
2348         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
2349         (WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren):
2350         (WebCore::ScrollingTreeScrollingNodeMac::scrollPosition):
2351         (WebCore::ScrollingTreeScrollingNodeMac::setScrollPositionWithoutContentEdgeConstraints):
2352         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
2353         (WebCore::logThreadedScrollingMode):
2354         * page/scrolling/mac/ScrollingTreeStickyNode.h:
2355         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
2356         * platform/Scrollbar.cpp:
2357         (WebCore::Scrollbar::supportsUpdateOnSecondaryThread):
2358         * platform/graphics/TiledBacking.h:
2359         * platform/graphics/ca/mac/TileController.mm:
2360         (WebCore::TileController::TileController):
2361         (WebCore::TileController::updateTileCoverageMap):
2362         * platform/mac/MemoryPressureHandlerMac.mm:
2363         (WebCore::MemoryPressureHandler::releaseMemory):
2364         * rendering/RenderLayer.cpp:
2365         (WebCore::RenderLayer::setupFontSubpixelQuantization):
2366         * rendering/RenderLayerBacking.cpp:
2367         (WebCore::computeTileCoverage):
2368         * testing/Internals.cpp:
2369         (WebCore::Internals::mainThreadScrollingReasons):
2370         * testing/Internals.idl:
2371
2372 2013-12-20  Tim Horton  <timothy_horton@apple.com>
2373
2374         Revert r160327, r160273, and r160260.
2375
2376         We'll come up with something less aggressive, as this doesn't quite work.
2377
2378         * loader/cache/CachedImage.h:
2379         * loader/cache/CachedResource.h:
2380         * loader/cache/MemoryCache.cpp:
2381         (WebCore::MemoryCache::pruneLiveResourcesToSize):
2382         * platform/graphics/BitmapImage.cpp:
2383         (WebCore::BitmapImage::destroyDecodedDataIfNecessary):
2384         * platform/graphics/BitmapImage.h:
2385         * platform/graphics/Image.h:
2386
2387 2013-12-20  Anders Carlsson  <andersca@apple.com>
2388
2389         PostAttachCallbackDisabler should take a Document
2390         https://bugs.webkit.org/show_bug.cgi?id=126090
2391
2392         Reviewed by Andreas Kling.
2393
2394         suspendPostAttachCallbacks and resumePostAttachCallbacks always only get the document from the
2395         container node, so make them static member functions that take a Document&. Also, move PostAttachCallbackDisabler
2396         to Element.h in preparation for moving post attach callback handling to Element.
2397
2398         * dom/ContainerNode.cpp:
2399         (WebCore::ContainerNode::suspendPostAttachCallbacks):
2400         (WebCore::ContainerNode::resumePostAttachCallbacks):
2401         * dom/ContainerNode.h:
2402         * dom/Element.h:
2403         (WebCore::PostAttachCallbackDisabler::PostAttachCallbackDisabler):
2404         (WebCore::PostAttachCallbackDisabler::~PostAttachCallbackDisabler):
2405         * style/StyleResolveTree.cpp:
2406         (WebCore::Style::attachRenderTree):
2407
2408 2013-12-20  Anders Carlsson  <andersca@apple.com>
2409
2410         Move scheduleSetNeedsStyleRecalc to HTMLFrameOwnerElement
2411         https://bugs.webkit.org/show_bug.cgi?id=126083
2412
2413         Reviewed by Antti Koivisto.
2414
2415         scheduleSetNeedsStyleRecalc is only ever called on HTMLFrameOwnerElement, so
2416         move it there, remove the Node implementation and make it non-virtual.
2417
2418         * dom/ContainerNode.cpp:
2419         * dom/ContainerNode.h:
2420         * dom/Node.h:
2421         * html/HTMLFrameOwnerElement.cpp:
2422         (WebCore::needsStyleRecalcCallback):
2423         (WebCore::HTMLFrameOwnerElement::scheduleSetNeedsStyleRecalc):
2424         * html/HTMLFrameOwnerElement.h:
2425
2426 2013-12-20  Andy Estes  <aestes@apple.com>
2427
2428         Remove an unneeded include of WebCoreSystemInterface.h.
2429
2430         Rubber-stamped by Dan Bernstein.
2431
2432         * platform/mac/ContentFilterMac.mm:
2433
2434 2013-12-20  Anders Carlsson  <andersca@apple.com>
2435
2436         Node post attach callbacks should use references
2437         https://bugs.webkit.org/show_bug.cgi?id=126081
2438
2439         Reviewed by Antti Koivisto.
2440
2441         * dom/ContainerNode.cpp:
2442         (WebCore::ContainerNode::queuePostAttachCallback):
2443         (WebCore::ContainerNode::dispatchPostAttachCallbacks):
2444         (WebCore::needsStyleRecalcCallback):
2445         (WebCore::ContainerNode::scheduleSetNeedsStyleRecalc):
2446         * dom/ContainerNode.h:
2447         * html/HTMLFormControlElement.cpp:
2448         (WebCore::focusPostAttach):
2449         (WebCore::HTMLFormControlElement::didAttachRenderers):
2450         (WebCore::updateFromElementCallback):
2451         (WebCore::HTMLFormControlElement::didRecalcStyle):
2452         * html/HTMLPlugInImageElement.cpp:
2453         (WebCore::HTMLPlugInImageElement::didAttachRenderers):
2454         (WebCore::HTMLPlugInImageElement::updateWidgetCallback):
2455         (WebCore::HTMLPlugInImageElement::startLoadingImageCallback):
2456         * html/HTMLPlugInImageElement.h:
2457
2458 2013-12-20  Joseph Pecoraro  <pecoraro@apple.com>
2459
2460         Web Inspector: Extract CommandLineAPI into its own InjectedScriptModule
2461         https://bugs.webkit.org/show_bug.cgi?id=126038
2462
2463         Reviewed by Timothy Hatcher.
2464
2465         Only inject the CommandLineAPIModule once, when the InjectedScript
2466         is first created. This avoids running a small snippet of JavaScript
2467         to check if the module is loaded every time we fetch the InjectedScript.
2468
2469         * CMakeLists.txt:
2470         * GNUmakefile.list.am:
2471         * WebCore.vcxproj/WebCore.vcxproj:
2472         * WebCore.vcxproj/WebCore.vcxproj.filters:
2473         * WebCore.xcodeproj/project.pbxproj:
2474         * inspector/InspectorAllInOne.cpp:
2475         Add new files to the build.
2476
2477         * inspector/InjectedScriptManager.h:
2478         * inspector/InjectedScriptManager.cpp:
2479         (WebCore::InjectedScriptManager::createForPage):
2480         (WebCore::InjectedScriptManager::injectedScriptFor):
2481         (WebCore::InjectedScriptManager::didCreateInjectedScript):
2482         Add didCreateInjectedScript hook for a subclass to inject more scripts.
2483
2484         * inspector/PageInjectedScriptManager.h: Added.
2485         * inspector/PageInjectedScriptManager.cpp: Added.
2486         (WebCore::PageInjectedScriptManager::didCreateInjectedScript):
2487         For pages, inject the CommandLineAPIModule.
2488
2489         * inspector/PageRuntimeAgent.cpp:
2490         (WebCore::PageRuntimeAgent::injectedScriptForEval):
2491         This is replaced by PageInjectedScriptManager, we no longer need
2492         to do extra work every time we fetch the injectedScriptForEval.
2493
2494 2013-12-20  Joseph Pecoraro  <pecoraro@apple.com>
2495
2496         Web Inspector: Extract CommandLineAPI into its own InjectedScriptModule
2497         https://bugs.webkit.org/show_bug.cgi?id=126038
2498
2499         Reviewed by Timothy Hatcher.
2500
2501         No tests, no observable change in behavior.
2502
2503         Move the CommandLineAPI source into its own module. Load the module
2504         in InjectedScripts for WebCore::Pages. Not for workers.
2505
2506         Moving CommandLineAPI into it's own module moves it from being inside
2507         the same anonymous function to being evaluated outside the anonymous
2508         function. To connect the two InjectedScript passes itself to the
2509         injected module, and the CommandLineAPI module places its class on the
2510         injectedScript as injectedScript.CommandLineAPI.
2511
2512         This essentially makes the CommandLineAPI module an InjectedScript
2513         extension. InjectedScriptSource checks for the existence of
2514         this.CommandLineAPI to see if the fuller version is available. Otherwise
2515         it falls back to a BasicCommandLineAPI which only exposes "$_",
2516         which is the "last evaluated result". That will be useful for JS Contexts
2517         and Workers.
2518
2519         At the same time, this patch makes InjectedScriptModule more generic,
2520         to support being used in a pure JavaScript environment, meaning one
2521         without "window" as the global object.
2522
2523         * CMakeLists.txt:
2524         * DerivedSources.make:
2525         * GNUmakefile.am:
2526         * GNUmakefile.list.am:
2527         * WebCore.vcxproj/WebCore.vcxproj:
2528         * WebCore.vcxproj/WebCore.vcxproj.filters:
2529         * WebCore.xcodeproj/project.pbxproj:
2530         * inspector/InspectorAllInOne.cpp:
2531         Add files. Minify the CommandLineAPIModuleSource in generation.
2532
2533         * inspector/CommandLineAPIModule.h: Added.
2534         * inspector/CommandLineAPIModule.cpp: Added.
2535         (WebCore::CommandLineAPIModule::CommandLineAPIModule):
2536         (WebCore::CommandLineAPIModule::injectIfNeeded):
2537         (WebCore::CommandLineAPIModule::source):
2538         Inject the module that doesn't return an object, its just evaluated code
2539         extending the original InjectedScript.
2540
2541         * inspector/InjectedScriptModule.h:
2542         * inspector/InjectedScriptModule.cpp:
2543         (WebCore::InjectedScriptModule::ensureInjected):
2544         Only ASSERT the result was an object if the Module claims it returns an object.
2545
2546         * inspector/InjectedScriptCanvasModule.h:
2547         (WebCore::InjectedScriptCanvasModule::returnsObject):
2548         Return an object used later to call into the CanvasModule.
2549
2550         * inspector/PageRuntimeAgent.cpp:
2551         (WebCore::PageRuntimeAgent::injectedScriptForEval):
2552         Ensure the CommandLineAPIModule is loaded in the Page's InjectedScript.
2553
2554         * inspector/CommandLineAPIModuleSource.js: Added.
2555         Create the CommandLineAPI class and place it on injectedScript.
2556
2557         * inspector/InjectedScriptSource.js:
2558         (InjectedScript.prototype._evaluateOn):
2559         Inject either the BasicCommandLineAPI or extended CommandLineAPI.
2560         Derive the globalObject dynamically instead of assuming window.
2561         Inject the commandLineAPI on window.console or the globalObject based on context.
2562         Audit and rename uses of "window" to something like globalObject.
2563
2564 2013-12-20  Tim Horton  <timothy_horton@apple.com>
2565
2566         WebKit2 View Gestures: Implement smartMagnifyWithEvent: and make it work
2567         https://bugs.webkit.org/show_bug.cgi?id=125752
2568         <rdar://problem/15664245>
2569
2570         Reviewed by Anders Carlsson.
2571
2572         * WebCore.exp.in:
2573         Add some exports.
2574
2575 2013-12-20  Antti Koivisto  <antti@apple.com>
2576
2577         http/tests/misc/object-image-error.html asserts
2578         https://bugs.webkit.org/show_bug.cgi?id=126074
2579
2580         Reviewed by Andreas Kling.
2581
2582         * html/HTMLPlugInImageElement.cpp:
2583         (WebCore::HTMLPlugInImageElement::didAttachRenderers):
2584         (WebCore::HTMLPlugInImageElement::updateWidgetCallback):
2585         (WebCore::HTMLPlugInImageElement::startLoadingImage):
2586         (WebCore::HTMLPlugInImageElement::startLoadingImageCallback):
2587         * html/HTMLPlugInImageElement.h:
2588         
2589             Start image load from post-attach so we don't re-enter attach when image load fails synchronously.
2590
2591 2013-12-20  Antti Koivisto  <antti@apple.com>
2592
2593         Crashes in AccessibilityRenderObject::computeAccessibilityIsIgnored()
2594         https://bugs.webkit.org/show_bug.cgi?id=126073
2595
2596         Reviewed by Ryosuke Niwa.
2597
2598         Prevent the crash and try to catch in debug why it is happening.
2599
2600         * accessibility/AccessibilityRenderObject.cpp:
2601         (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
2602         (WebCore::AccessibilityRenderObject::~AccessibilityRenderObject):
2603         (WebCore::AccessibilityRenderObject::detach):
2604         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
2605         * accessibility/AccessibilityRenderObject.h:
2606
2607 2013-12-20  Antti Koivisto  <antti@apple.com>
2608
2609         Fix asserting accesibility tests.
2610
2611         * html/HTMLElement.cpp:
2612         (WebCore::HTMLElement::supportsFocus): Accessibility code checks focus status during painting.
2613
2614 2013-12-20  Zan Dobersek  <zdobersek@igalia.com>
2615
2616         Unreviewed GTK build fix after r160909.
2617         Remove remaining uses of AttachLazily in code specific to the GTK port.
2618
2619         * html/shadow/MediaControlsGtk.cpp:
2620         (WebCore::MediaControlsGtk::initializeControls):
2621         (WebCore::MediaControlsGtk::createTextTrackDisplay):
2622
2623 2013-12-19  Antti Koivisto  <antti@apple.com>
2624
2625         Create render tree lazily
2626         https://bugs.webkit.org/show_bug.cgi?id=120685
2627
2628         Reviewed by Andreas Kling.
2629
2630         We currently recompute style and construct renderer for each DOM node immediately after they are added to 
2631         the tree. This is often inefficient as the style may change immediately afterwards and the work needs to be
2632         redone. 
2633         
2634         With this patch we always compute style and construct render tree lazily, either on style recalc timer or
2635         synchronously when they are needed. It also removes the 'attached' bit. If document has render tree then
2636         all nodes are conceptually "attached" even if this happens lazily.
2637         
2638         The patch slightly changes behavior of implicit CSS transitions. A synchronous style change during parsing
2639         may not trigger the animation anymore as laziness means we don't see anything changing. This matches Firefox
2640         and Chrome in our test cases.
2641         
2642         * WebCore.exp.in:
2643         * bindings/js/JSNodeCustom.cpp:
2644         (WebCore::JSNode::insertBefore):
2645         (WebCore::JSNode::replaceChild):
2646         (WebCore::JSNode::appendChild):
2647         
2648             All attaching is now lazy, remove AttachLazily.
2649
2650         * css/CSSComputedStyleDeclaration.cpp:
2651         (WebCore::ComputedStyleExtractor::propertyValue):
2652         
2653             SVG renderers with !isValid() have empty display property value for some reason. Keep the behavior.
2654
2655         * dom/ContainerNode.cpp:
2656         (WebCore::ContainerNode::insertBefore):
2657         (WebCore::ContainerNode::parserInsertBefore):
2658         (WebCore::ContainerNode::replaceChild):
2659         (WebCore::ContainerNode::appendChild):
2660         (WebCore::ContainerNode::parserAppendChild):
2661         (WebCore::ContainerNode::updateTreeAfterInsertion):
2662         * dom/ContainerNode.h:
2663         * dom/Document.cpp:
2664         (WebCore::Document::~Document):
2665         (WebCore::Document::updateStyleIfNeeded):
2666         (WebCore::Document::createRenderTree):
2667         (WebCore::Document::destroyRenderTree):
2668         
2669             Remove attach bit maintenance.
2670
2671         (WebCore::Document::webkitDidExitFullScreenForElement):
2672         
2673             Do lazy render tree reconstruction after returning from full screen. That is the only reliable way
2674             to get the render tree back to decent shape.
2675
2676         * dom/Element.cpp:
2677         (WebCore::Element::isFocusable):
2678         
2679             Remove pointless !renderer()->needsLayout() assert.
2680
2681         (WebCore::Element::addShadowRoot):
2682         (WebCore::Element::childShouldCreateRenderer):
2683         (WebCore::Element::resetComputedStyle):
2684         
2685             Take care to reset computed style in all descendants. attachRenderTree no longer does this.
2686
2687         * dom/Element.h:
2688         * dom/Node.cpp:
2689         (WebCore::Node::insertBefore):
2690         (WebCore::Node::replaceChild):
2691         (WebCore::Node::appendChild):
2692         (WebCore::Node::setNeedsStyleRecalc):
2693         
2694             Propagate ReconstructRenderTree.
2695
2696         (WebCore::Node::attached):
2697         
2698             Emulate the behavior of old attached bit for now so existing code calling this mostly stays working.
2699
2700         * dom/Node.h:
2701         
2702             Add new ReconstructRenderTree value for StyleChangeType.
2703
2704         * dom/Range.cpp:
2705         (WebCore::Range::isPointInRange):
2706         (WebCore::Range::comparePoint):
2707         (WebCore::Range::compareNode):
2708         (WebCore::Range::intersectsNode):
2709         * editing/AppendNodeCommand.cpp:
2710         (WebCore::AppendNodeCommand::doApply):
2711         * editing/CompositeEditCommand.cpp:
2712         (WebCore::CompositeEditCommand::canRebalance):
2713         * editing/InsertNodeBeforeCommand.cpp:
2714         (WebCore::InsertNodeBeforeCommand::doApply):
2715         * html/HTMLDetailsElement.cpp:
2716         (WebCore::HTMLDetailsElement::didAddUserAgentShadowRoot):
2717         * html/HTMLDocument.cpp:
2718         (WebCore::HTMLDocument::activeElement):
2719         * html/HTMLElement.cpp:
2720         (WebCore::HTMLElement::setInnerText):
2721         
2722             TextControlInnerTextElement always preserves newline even if it doesn't have style yet.
2723
2724         (WebCore::HTMLElement::supportsFocus):
2725         * html/HTMLEmbedElement.cpp:
2726         (WebCore::HTMLEmbedElement::parseAttribute):
2727         * html/HTMLFormControlElement.cpp:
2728         (WebCore::shouldAutofocus):
2729         
2730             Don't autofocus until we have renderer.
2731
2732         * html/HTMLFormControlElementWithState.cpp:
2733         (WebCore::HTMLFormControlElementWithState::shouldSaveAndRestoreFormControlState):
2734         * html/HTMLFrameElementBase.cpp:
2735         (WebCore::HTMLFrameElementBase::didNotifySubtreeInsertions):
2736         * html/HTMLInputElement.cpp:
2737         (WebCore::HTMLInputElement::updateType):
2738         
2739             Lazy render tree construction.
2740
2741         (WebCore::HTMLInputElement::parseAttribute):
2742         (WebCore::HTMLInputElement::defaultEventHandler):
2743         * html/HTMLMediaElement.cpp:
2744         (WebCore::HTMLMediaElement::parseAttribute):
2745         * html/HTMLObjectElement.cpp:
2746         (WebCore::HTMLObjectElement::parseAttribute):
2747         * html/HTMLSummaryElement.cpp:
2748         (WebCore::HTMLSummaryElement::didAddUserAgentShadowRoot):
2749         * html/parser/HTMLConstructionSite.cpp:
2750         (WebCore::executeTask):
2751         
2752             Don't attach renderer after construction.
2753
2754         * html/parser/HTMLTreeBuilder.cpp:
2755         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
2756         * html/shadow/ContentDistributor.cpp:
2757         (WebCore::ContentDistributor::invalidateDistribution):
2758         * html/shadow/InsertionPoint.cpp:
2759         (WebCore::InsertionPoint::willAttachRenderers):
2760         (WebCore::InsertionPoint::willDetachRenderers):
2761         * html/shadow/MediaControlElements.cpp:
2762         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
2763         * html/shadow/MediaControls.cpp:
2764         (WebCore::MediaControls::createTextTrackDisplay):
2765         * html/shadow/MediaControlsApple.cpp:
2766         (WebCore::MediaControlsApple::createControls):
2767         * html/track/TextTrackCue.cpp:
2768         (WebCore::TextTrackCue::getDisplayTree):
2769         * loader/PlaceholderDocument.cpp:
2770         (WebCore::PlaceholderDocument::createRenderTree):
2771         * loader/cache/CachedResourceLoader.cpp:
2772         (WebCore::CachedResourceLoader::preload):
2773         * style/StyleResolveTree.cpp:
2774         (WebCore::Style::attachTextRenderer):
2775         (WebCore::Style::detachTextRenderer):
2776         
2777             Remove attached bit maintenance.
2778
2779         (WebCore::Style::attachChildren):
2780         (WebCore::Style::attachShadowRoot):
2781         (WebCore::Style::attachRenderTree):
2782         (WebCore::Style::detachShadowRoot):
2783         (WebCore::Style::detachRenderTree):
2784         (WebCore::Style::resolveLocal):
2785         * svg/SVGTests.cpp:
2786         (WebCore::SVGTests::handleAttributeChange):
2787         
2788             Make lazy.
2789
2790         * testing/Internals.cpp:
2791         (WebCore::Internals::attached):
2792         (WebCore::Internals::elementRenderTreeAsText):
2793         (WebCore::Internals::markerAt):
2794         (WebCore::Internals::nodesFromRect):
2795
2796 2013-12-20  Andreas Kling  <akling@apple.com>
2797
2798         Devirtualize RenderElement::setStyle().
2799         <https://webkit.org/b/126065>
2800
2801         setStyle() was only virtual in order to let RenderSVGBlock override
2802         the display type in some cases. Devirtualized it and moved the fixup
2803         logic to StyleResolver::adjustRenderStyle().
2804
2805         This hack had an evil twin in RenderElement::initializeStyle() that
2806         also goes away. FIXME--!
2807
2808         Based on a Blink change by Elliott Sprehn.
2809
2810         Reviewed by Antti Koivisto.
2811
2812 2013-12-20  Radu Stavila  <stavila@adobe.com>
2813
2814         [CSS Regions] When changing flow-from/flow-into on :hover, elements overflowing the region are not correctly repainted
2815         https://bugs.webkit.org/show_bug.cgi?id=117259
2816
2817         Reviewed by Antti Koivisto.
2818
2819         When computing the repaint rect for a region, the existing visual overflow must be taken into consideration.
2820         For this purpose, I overridden the visualOverflowRect method in RenderNamedFlowFragment, which ends up being
2821         called from RenderBox::clippedOverflowRectForRepaint. 
2822
2823         Test: fast/regions/hover-single-flow-from-none-overflow.html
2824               fast/regions/hover-single-flow-from-none-overflow-top.html
2825
2826         * rendering/RenderNamedFlowFragment.cpp:
2827         (WebCore::RenderNamedFlowFragment::visualOverflowRect):
2828         * rendering/RenderNamedFlowFragment.h:
2829
2830 2013-12-20  Mario Sanchez Prada  <mario.prada@samsung.com>
2831
2832         Programmatically-inserted children lack accessibility events
2833         https://bugs.webkit.org/show_bug.cgi?id=100275
2834
2835         Reviewed by Chris Fleizach.
2836
2837         Test: accessibility/children-changed-sends-notification.html
2838
2839         Emit children-changed::add and children-changed::remove whenever
2840         an object has been added/removed to the accessibility hierarchy,
2841         that is, when a new AtkObject is being attached/detached.
2842
2843         * accessibility/AXObjectCache.h:
2844         (WebCore::AXObjectCache::detachWrapper): Added a new parameter and
2845         updated all the prototypes in different ports.
2846         * accessibility/AXObjectCache.cpp:
2847         (WebCore::AXObjectCache::~AXObjectCache): Call detachWrapper()
2848         specifying that we do it because the cache is being destroyed.
2849         (WebCore::AXObjectCache::remove): Call detachWrapper() specifying
2850         that we do it because an accessible element is being destroyed.
2851
2852         * accessibility/atk/AXObjectCacheAtk.cpp:
2853         (WebCore::AXObjectCache::detachWrapper): Emit the children-changed
2854         signal when needed. We rely on the cached reference to the parent
2855         AtkObject (using the implementation of atk_object_get_parent from
2856         the AtkObject class) to find the right object to emit the signal
2857         from here, since the accessibility hierarchy from WebCore will no
2858         longer be accessible at this point.
2859         (WebCore::AXObjectCache::attachWrapper): Emit the children-change
2860         signal from here unless we are in the middle of a layout update,
2861         trying to provide as much information (e.g. the offset) as possible.
2862         (WebCore::AXObjectCache::postPlatformNotification): Make sure we
2863         update (touch) the subtree under an accessibility object whenever
2864         we receive AXChildrenChanded from WebCore, to ensure that those
2865         objects will also be visible rightaway to ATs, and that those get
2866         properly notified of the event at that very same moment.
2867
2868         * accessibility/ios/AXObjectCacheIOS.mm:
2869         (WebCore::AXObjectCache::detachWrapper): Updated function signature.
2870         * accessibility/mac/AXObjectCacheMac.mm:
2871         (WebCore::AXObjectCache::detachWrapper): Ditto.
2872         * accessibility/win/AXObjectCacheWin.cpp:
2873         (WebCore::AXObjectCache::detachWrapper): Ditto.
2874
2875         * accessibility/AccessibilityObject.cpp:
2876         (WebCore::AccessibilityObject::children): Add the option ot
2877         request the AccessibilityChildrenVector without updating it if
2878         needed, to avoid maybe recreating the child subtree when trying to
2879         get the offset of a newly attached element from attachWrapper.
2880         * accessibility/AccessibilityObject.h:
2881
2882 2013-12-20  Laszlo Vidacs  <lvidacs.u-szeged@partner.samsung.com>
2883
2884         Move function calls outside loop in dom
2885         https://bugs.webkit.org/show_bug.cgi?id=125916
2886
2887         Reviewed by Csaba Osztrogonác.
2888
2889         Do not call length() in each iteration.
2890
2891         * dom/Element.cpp:
2892         (WebCore::Element::cloneAttributesFromElement):
2893         * dom/Node.cpp:
2894         (WebCore::Node::dumpStatistics):
2895
2896 2013-12-19  Beth Dakin  <bdakin@apple.com>
2897
2898         REGRESSION: cnn.com will continue to reveal 1 px of overhang after rubber-banding 
2899         at the top
2900         https://bugs.webkit.org/show_bug.cgi?id=126054
2901
2902         Reviewed by Simon Fraser.
2903
2904         This regression was caused by http://trac.webkit.org/changeset/160791 It turns out 
2905         that the line of code I removed was not always a no-op. In some instances, like on 
2906         cnn.com, it would ensure that our final scroll position after a rubber-band was 
2907         not something within the overhang area. It was still wrong in its assumption that 
2908         rubber-band is always bouncing back the spot it originated from. So this patch 
2909         continues to ignore the rubber-bands origin, and instead finds the nearest point 
2910         that is not in the overhang area, and scrolls to that point instead of the origin.
2911
2912         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
2913         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
2914         (WebCore::ScrollingTreeScrollingNodeMac::adjustScrollPositionToBoundsIfNecessary):
2915         * platform/mac/ScrollAnimatorMac.h:
2916         * platform/mac/ScrollAnimatorMac.mm:
2917         (WebCore::ScrollAnimatorMac::adjustScrollPositionToBoundsIfNecessary):
2918         * platform/mac/ScrollElasticityController.h:
2919         * platform/mac/ScrollElasticityController.mm:
2920         (WebCore::ScrollElasticityController::snapRubberBandTimerFired):
2921
2922 2013-12-19  Simon Fraser  <simon.fraser@apple.com>
2923
2924         Clarify the behavior of composited canvases
2925         https://bugs.webkit.org/show_bug.cgi?id=126042
2926
2927         Reviewed by Tim Horton.
2928
2929         Different platforms composite 2D and 3D canvases in different ways.
2930         
2931         "Accelerated 2D" canvases, and WebGL are always set as GraphicsLayer
2932         contents.
2933         
2934         "IOSurface" canvases (Mac and iOS-only) get a compositing layer, but
2935         paint into it (because this is fast, and a convenient way to get
2936         synchronization).
2937         
2938         So make these behaviors explicit in RenderLayerBacking and RenderLayerCompositor.
2939         No behavior changes on OS X, bug fix on iOS.
2940
2941         * rendering/RenderLayerBacking.cpp:
2942         (WebCore::canvasCompositingStrategy):
2943         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
2944         (WebCore::RenderLayerBacking::containsPaintedContent):
2945         (WebCore::RenderLayerBacking::contentChanged):
2946         * rendering/RenderLayerBacking.h:
2947         * rendering/RenderLayerCompositor.cpp:
2948         (WebCore::RenderLayerCompositor::requiresCompositingForCanvas):
2949
2950 2013-12-19  Joseph Pecoraro  <pecoraro@apple.com>
2951
2952         Web Inspector: Add InspectorFrontendHost.debuggableType to let the frontend know it's backend is JavaScript or Web
2953         https://bugs.webkit.org/show_bug.cgi?id=126016
2954
2955         Reviewed by Timothy Hatcher.
2956
2957         * inspector/InspectorFrontendHost.cpp:
2958         (WebCore::InspectorFrontendHost::debuggableType):
2959         * inspector/InspectorFrontendHost.h:
2960         * inspector/InspectorFrontendHost.idl:
2961         Expose the debuggableType to the frontend. In WebCore it is always a "web" type.
2962
2963 2013-12-19  Benjamin Poulain  <benjamin@webkit.org>
2964
2965         Add an utility class to simplify generating function calls
2966         https://bugs.webkit.org/show_bug.cgi?id=125972
2967
2968         Reviewed by Geoffrey Garen.
2969
2970         FunctionCall is a little helper class to make function calls from the JIT
2971         in 3 or 4 lines.
2972
2973         FunctionCall takes a StackAllocator, a RegisterAllocator and a function pointer.
2974         When the call is generated, the helper saves the registers as necessary, aligns
2975         the stack, does the call, restores the stack, and restore the registers.
2976
2977         * cssjit/FunctionCall.h: Added.
2978         (WebCore::FunctionCall::FunctionCall):
2979         (WebCore::FunctionCall::setFunctionAddress):
2980         (WebCore::FunctionCall::setFirstArgument):
2981         (WebCore::FunctionCall::call):
2982
2983         (WebCore::FunctionCall::callAndBranchOnCondition): Most test functions used
2984         with FunctionCall return a boolean. When the boolean is the sole purpose of the function
2985         call, this provides an easy way to branch on the boolean without worrying about registers.
2986
2987         The return register is tested first, then all the saved registers are restored from the stack
2988         (which can include the return register), finally the flags are used for a jump.
2989
2990         (WebCore::FunctionCall::prepareAndCall):
2991         (WebCore::FunctionCall::cleanupPostCall):
2992         (WebCore::FunctionCall::saveAllocatedRegisters):
2993         (WebCore::FunctionCall::restoreAllocatedRegisters):
2994         * WebCore.xcodeproj/project.pbxproj:
2995         * cssjit/FunctionCall.h: Added.
2996         (WebCore::FunctionCall::FunctionCall):
2997         (WebCore::FunctionCall::setFunctionAddress):
2998         (WebCore::FunctionCall::setFirstArgument):
2999         (WebCore::FunctionCall::call):
3000         (WebCore::FunctionCall::callAndBranchOnCondition):
3001         (WebCore::FunctionCall::prepareAndCall):
3002         (WebCore::FunctionCall::cleanupPostCall):
3003         (WebCore::FunctionCall::saveAllocatedRegisters):
3004         (WebCore::FunctionCall::restoreAllocatedRegisters):
3005
3006 2013-12-19  Anders Carlsson  <andersca@apple.com>
3007
3008         Begin stubbing out the KeyedDecoder class
3009         https://bugs.webkit.org/show_bug.cgi?id=126031
3010
3011         Reviewed by Andreas Kling.
3012
3013         KeyedDecoder is going to be the new way to decode back forward trees.
3014
3015         * history/HistoryItem.cpp:
3016         (WebCore::HistoryItem::decodeBackForwardTree):
3017         * history/HistoryItem.h:
3018         * platform/KeyedCoding.h:
3019         (WebCore::KeyedDecoder::~KeyedDecoder):
3020
3021 2013-12-19  Oliver Hunt  <oliver@apple.com>
3022
3023         DOM bindings should use thisValue for attributes
3024         https://bugs.webkit.org/show_bug.cgi?id=126011
3025
3026         Reviewed by Antti Koivisto.
3027
3028         Make all standard DOM attributes use the thisValue instead
3029         of the slot object.  This requires using a dynamic cast in
3030         the attribute getters. Happily for normal uses this a single
3031         indirect load and pointer compare, and we were already doing
3032         it for many attributes.
3033
3034         Alas it's too expensive to do this on the window object still
3035         due to the proxy indirection that intercepts global variable
3036         access.  I'll correct this in a follow on patch (bug 126013).
3037
3038         A number of custom getters have also been updated to use the
3039         thisValue and full type checks.
3040
3041         This patch still leaves the index and generic named getters
3042         on the slot based model as fixing these cases requires more
3043         complicated changes.
3044
3045         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3046         (WebCore::cssPropertyGetterPixelOrPosPrefixCallback):
3047         (WebCore::cssPropertyGetterCallback):
3048         * bindings/js/JSPluginElementFunctions.cpp:
3049         (WebCore::pluginElementPropertyGetter):
3050         * bindings/scripts/CodeGeneratorJS.pm:
3051         (GenerateImplementation):
3052         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3053         (WebCore::jsTestActiveDOMObjectExcitingAttr):
3054         (WebCore::jsTestActiveDOMObjectConstructor):
3055         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
3056         (WebCore::jsTestCustomNamedGetterConstructor):
3057         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3058         (WebCore::jsTestEventConstructorAttr1):
3059         (WebCore::jsTestEventConstructorAttr2):
3060         (WebCore::jsTestEventConstructorConstructor):
3061         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3062         (WebCore::jsTestEventTargetConstructor):
3063         * bindings/scripts/test/JS/JSTestException.cpp:
3064         (WebCore::jsTestExceptionName):
3065         (WebCore::jsTestExceptionConstructor):
3066         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
3067         (WebCore::jsTestGenerateIsReachableConstructor):
3068         * bindings/scripts/test/JS/JSTestInterface.cpp:
3069         (WebCore::jsTestInterfaceConstructorImplementsStaticReadOnlyAttr):
3070         (WebCore::jsTestInterfaceConstructorImplementsStaticAttr):
3071         (WebCore::jsTestInterfaceImplementsStr1):
3072         (WebCore::jsTestInterfaceImplementsStr2):
3073         (WebCore::jsTestInterfaceImplementsStr3):
3074         (WebCore::jsTestInterfaceImplementsNode):
3075         (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
3076         (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
3077         (WebCore::jsTestInterfaceSupplementalStr1):
3078         (WebCore::jsTestInterfaceSupplementalStr2):
3079         (WebCore::jsTestInterfaceSupplementalStr3):
3080         (WebCore::jsTestInterfaceSupplementalNode):
3081         (WebCore::jsTestInterfaceConstructor):
3082         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3083         (WebCore::jsTestMediaQueryListListenerConstructor):
3084         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3085         (WebCore::jsTestNamedConstructorConstructor):
3086         * bindings/scripts/test/JS/JSTestNode.cpp:
3087         (WebCore::jsTestNodeConstructor):
3088         * bindings/scripts/test/JS/JSTestObj.cpp:
3089         (WebCore::jsTestObjReadOnlyLongAttr):
3090         (WebCore::jsTestObjReadOnlyStringAttr):
3091         (WebCore::jsTestObjReadOnlyTestObjAttr):
3092         (WebCore::jsTestObjConstructorStaticReadOnlyLongAttr):
3093         (WebCore::jsTestObjConstructorStaticStringAttr):
3094         (WebCore::jsTestObjConstructorTestSubObj):
3095         (WebCore::jsTestObjTestSubObjEnabledBySettingConstructor):
3096         (WebCore::jsTestObjEnumAttr):
3097         (WebCore::jsTestObjByteAttr):
3098         (WebCore::jsTestObjOctetAttr):
3099         (WebCore::jsTestObjShortAttr):
3100         (WebCore::jsTestObjUnsignedShortAttr):
3101         (WebCore::jsTestObjLongAttr):
3102         (WebCore::jsTestObjLongLongAttr):
3103         (WebCore::jsTestObjUnsignedLongLongAttr):
3104         (WebCore::jsTestObjStringAttr):
3105         (WebCore::jsTestObjTestObjAttr):
3106         (WebCore::jsTestObjXMLObjAttr):
3107         (WebCore::jsTestObjCreate):
3108         (WebCore::jsTestObjReflectedStringAttr):
3109         (WebCore::jsTestObjReflectedIntegralAttr):
3110         (WebCore::jsTestObjReflectedUnsignedIntegralAttr):
3111         (WebCore::jsTestObjReflectedBooleanAttr):
3112         (WebCore::jsTestObjReflectedURLAttr):
3113         (WebCore::jsTestObjReflectedCustomIntegralAttr):
3114         (WebCore::jsTestObjReflectedCustomBooleanAttr):
3115         (WebCore::jsTestObjReflectedCustomURLAttr):
3116         (WebCore::jsTestObjTypedArrayAttr):
3117         (WebCore::jsTestObjAttrWithGetterException):
3118         (WebCore::jsTestObjAttrWithSetterException):
3119         (WebCore::jsTestObjStringAttrWithGetterException):
3120         (WebCore::jsTestObjStringAttrWithSetterException):
3121         (WebCore::jsTestObjCustomAttr):
3122         (WebCore::jsTestObjWithScriptStateAttribute):
3123         (WebCore::jsTestObjWithScriptExecutionContextAttribute):
3124         (WebCore::jsTestObjWithScriptStateAttributeRaises):
3125         (WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
3126         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttribute):
3127         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
3128         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
3129         (WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute):
3130         (WebCore::jsTestObjConditionalAttr1):
3131         (WebCore::jsTestObjConditionalAttr2):
3132         (WebCore::jsTestObjConditionalAttr3):
3133         (WebCore::jsTestObjConditionalAttr4Constructor):
3134         (WebCore::jsTestObjConditionalAttr5Constructor):
3135         (WebCore::jsTestObjConditionalAttr6Constructor):
3136         (WebCore::jsTestObjCachedAttribute1):
3137         (WebCore::jsTestObjCachedAttribute2):
3138         (WebCore::jsTestObjAnyAttribute):
3139         (WebCore::jsTestObjContentDocument):
3140         (WebCore::jsTestObjMutablePoint):
3141         (WebCore::jsTestObjImmutablePoint):
3142         (WebCore::jsTestObjStrawberry):
3143         (WebCore::jsTestObjStrictFloat):
3144         (WebCore::jsTestObjDescription):
3145         (WebCore::jsTestObjId):
3146         (WebCore::jsTestObjHash):
3147         (WebCore::jsTestObjReplaceableAttribute):
3148         (WebCore::jsTestObjNullableDoubleAttribute):
3149         (WebCore::jsTestObjNullableLongAttribute):
3150         (WebCore::jsTestObjNullableBooleanAttribute):
3151         (WebCore::jsTestObjNullableStringAttribute):
3152         (WebCore::jsTestObjNullableLongSettableAttribute):
3153         (WebCore::jsTestObjNullableStringValue):
3154         (WebCore::jsTestObjAttribute):
3155         (WebCore::jsTestObjAttributeWithReservedEnumType):
3156         (WebCore::jsTestObjConstructor):
3157         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3158         (WebCore::jsTestOverloadedConstructorsConstructor):
3159         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3160         (WebCore::jsTestSerializedScriptValueInterfaceValue):
3161         (WebCore::jsTestSerializedScriptValueInterfaceReadonlyValue):
3162         (WebCore::jsTestSerializedScriptValueInterfaceCachedValue):
3163         (WebCore::jsTestSerializedScriptValueInterfacePorts):
3164         (WebCore::jsTestSerializedScriptValueInterfaceCachedReadonlyValue):
3165         (WebCore::jsTestSerializedScriptValueInterfaceConstructor):
3166         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3167         (WebCore::jsTestTypedefsUnsignedLongLongAttr):
3168         (WebCore::jsTestTypedefsImmutableSerializedScriptValue):
3169         (WebCore::jsTestTypedefsConstructorTestSubObj):
3170         (WebCore::jsTestTypedefsAttrWithGetterException):
3171         (WebCore::jsTestTypedefsAttrWithSetterException):
3172         (WebCore::jsTestTypedefsStringAttrWithGetterException):
3173         (WebCore::jsTestTypedefsStringAttrWithSetterException):
3174         (WebCore::jsTestTypedefsConstructor):
3175         * bindings/scripts/test/JS/JSattribute.cpp:
3176         (WebCore::jsattributeReadonly):
3177         (WebCore::jsattributeConstructor):
3178         * bindings/scripts/test/JS/JSreadonly.cpp:
3179         (WebCore::jsreadonlyConstructor):
3180         * bridge/runtime_array.cpp:
3181         (JSC::RuntimeArray::lengthGetter):
3182         * bridge/runtime_method.cpp:
3183         (JSC::RuntimeMethod::lengthGetter):
3184
3185 2013-12-19  Andy Estes  <aestes@apple.com>
3186
3187         Remove WebFilterEvaluator wrappers from WebKitSystemInterface
3188         https://bugs.webkit.org/show_bug.cgi?id=126028
3189
3190         Reviewed by Anders Carlsson.
3191
3192         It's overkill to pipe access to WebFilterEvaluator through
3193         WebKitSystemInterface. Instead, include WebFilterEvaluator.h when it
3194         exists and re-declare WebFilterEvaluator when it doesn't.
3195         
3196         WebKitSystemInterface used to soft-link WebContentAnalysis.framework
3197         since OS X 10.7 didn't contain this framework. Since we no longer
3198         support 10.7, we can now directly link against the framework.
3199
3200         * Configurations/WebCore.xcconfig: Add /System/Library/PrivateHeaders
3201         to the system framework search path at both compile and link time so
3202         that we can find WebContentAnalysis.framework.
3203         * WebCore.exp.in: Don't export removed symbols.
3204         * WebCore.xcodeproj/project.pbxproj: Added WebContentAnalysis.framework
3205         to the 'Link Binary With Libraries' build phase.
3206         * platform/mac/ContentFilterMac.mm: Included WebFilterEvaluator.h when
3207         it exists and re-declared WebFilterEvaluator when it doesn't.
3208         (WebCore::ContentFilter::ContentFilter): Directly called a method on
3209         m_platformContentFilter rather than going through WKSI.
3210         (WebCore::ContentFilter::isEnabled): Ditto.
3211         (WebCore::ContentFilter::addData): Ditto.
3212         (WebCore::ContentFilter::finishedAddingData): Ditto.
3213         (WebCore::ContentFilter::needsMoreData): Ditto.
3214         (WebCore::ContentFilter::didBlockData): Ditto.
3215         * platform/mac/WebCoreSystemInterface.h: Removed function pointers for
3216         calling into WKSI.
3217         * platform/mac/WebCoreSystemInterface.mm: Ditto.
3218
3219 2013-12-19  Andreas Kling  <akling@apple.com>
3220
3221         Use CascadedProperties for page and keyframe style resolution as well.
3222         <https://webkit.org/b/125997>
3223
3224         Port StyleResolver's styleForKeyframe() and styleForPage() over to
3225         the new property cascading code. Neither of them care about !important
3226         or matched properties caches, so the code is very simple.
3227
3228         Removed the old applyMatchedProperties and applyProperties code with
3229         low/high priority passes.
3230
3231         Reviewed by Antti Koivisto.
3232
3233 2013-12-19  Eric Carlson  <eric.carlson@apple.com>
3234
3235         tryAddEventListener uses local PassRefPtr<>
3236         https://bugs.webkit.org/show_bug.cgi?id=126001
3237
3238         Reviewed by Daniel Bates.
3239
3240         * dom/Node.cpp:
3241         (WebCore::tryAddEventListener): Put PassRefPtr<EventListener> parameter into a local RefPtr
3242             because it is sometimes used twice.
3243
3244 2013-12-19  Ryosuke Niwa  <rniwa@webkit.org>
3245
3246         overflowchanged event could cause a crash
3247         https://bugs.webkit.org/show_bug.cgi?id=125978
3248
3249         Reviewed by Tim Horton.
3250
3251         Made the event asynchrnous by re-using Document's event queuing ability. Also removed
3252         the infrastructure to queue up events in FrameView.
3253
3254         Test: fast/events/overflowchanged-inside-selection-collapse-crash.html
3255
3256         * dom/Document.cpp:
3257         (WebCore::Document::recalcStyle):
3258         (WebCore::Document::enqueueOverflowEvent):
3259         * dom/Document.h:
3260         * page/FrameView.cpp:
3261         (WebCore::FrameView::FrameView):
3262         (WebCore::FrameView::~FrameView):
3263         (WebCore::FrameView::layout):
3264         (WebCore::FrameView::performPostLayoutTasks):
3265         (WebCore::FrameView::updateOverflowStatus):
3266         * page/FrameView.h:
3267         * rendering/RenderBlock.cpp:
3268         (WebCore::OverflowEventDispatcher::~OverflowEventDispatcher):
3269         * rendering/RenderLayer.cpp:
3270         (WebCore::RenderLayer::scrollRectToVisible):
3271         * rendering/RenderMarquee.cpp:
3272         (WebCore::RenderMarquee::start):
3273
3274 2013-12-19  Daniel Bates  <dabates@apple.com>
3275
3276         Fix the Windows build after <http://trac.webkit.org/changeset/160841>
3277         (https://bugs.webkit.org/show_bug.cgi?id=125879)
3278
3279         Add ENABLE(CACHE_PARTITIONING)-guard around call to ResourceRequest::setCachePartition()
3280         as this function is only compiled when building with cache partitioning enabled.
3281
3282         * loader/cache/MemoryCache.cpp:
3283         (WebCore::MemoryCache::addImageToCache):
3284
3285 2013-12-19  Daniel Bates  <dabates@apple.com>
3286
3287         [iOS] Upstream WebCore/accessibility changes
3288         https://bugs.webkit.org/show_bug.cgi?id=125925
3289
3290         Reviewed by Chris Fleizach.
3291
3292         * accessibility/AccessibilityRenderObject.cpp:
3293         (WebCore::AccessibilityRenderObject::visiblePositionForPoint): Opt out of code when building for iOS.
3294
3295 2013-12-19  Alex Christensen  <achristensen@webkit.org>
3296
3297         [WinCairo] Compile fix for VS2013 when using ACCELERATED_COMPOSITING.
3298         https://bugs.webkit.org/show_bug.cgi?id=124866
3299
3300         Reviewed by Darin Adler.
3301
3302         * platform/graphics/TiledBackingStore.cpp:
3303         (WebCore::TiledBackingStore::TiledBackingStore):
3304         * platform/graphics/TiledBackingStore.h:
3305         Added constructor overload to avoid compile errors
3306         from using MSVC's make_unique as a default parameter.
3307
3308 2013-12-19  Daniel Bates  <dabates@apple.com>
3309
3310         [iOS] Upstream WebCore/loader changes
3311         https://bugs.webkit.org/show_bug.cgi?id=125879
3312
3313         Reviewed by Darin Adler.
3314
3315         * WebCore.exp.in: Added symbols for MemoryCache::{addImageToCache, removeImageFromCache}().
3316         * loader/DocumentLoader.cpp:
3317         (WebCore::areAllLoadersPageCacheAcceptable): Added.
3318         (WebCore::DocumentLoader::DocumentLoader): Initialize m_subresourceLoadersArePageCacheAcceptable.
3319         (WebCore::DocumentLoader::stopLoading): Modified to conditionally call areAllLoadersPageCacheAcceptable().
3320         (WebCore::DocumentLoader::handleSubstituteDataLoadSoon): Modified to query FrameLoader::loadsSynchronously()
3321         whether to load substitute data immediately or to schedule a load.
3322         (WebCore::DocumentLoader::responseReceived): Modified to create a content filer when the response protocol
3323         is either HTTP or HTTPS, assuming content filtering is enabled.
3324         (WebCore::DocumentLoader::dataReceived): Modified to call DocumentLoader::setContentFilterForBlockedLoad()
3325         as appropriate.
3326         (WebCore::DocumentLoader::clearMainResourceLoader): Added PLATFORM(IOS)-guarded code. Also added a
3327         FIXME comment to remove the PLATFORM(IOS)-guard once we upstream the iOS changes to ResourceRequest.h.
3328         (WebCore::DocumentLoader::setResponseMIMEType): Added; guard by PLATFORM(IOS). Also added FIXME comment.
3329         (WebCore::DocumentLoader::startLoadingMainResource): Added PLATFORM(IOS)-guarded code. Also added a
3330         FIXME comment to remove the PLATFORM(IOS)-guard once we upstream the iOS changes to ResourceRequest.h.
3331         I also substituted static NeverDestroyed<> for DEFINE_STATIC_LOCAL.
3332         (WebCore::DocumentLoader::setContentFilterForBlockedLoad): Added; guarded by USE(CONTENT_FILTERING).
3333         (WebCore::DocumentLoader::handleContentFilterRequest): Added; guarded by USE(CONTENT_FILTERING) and PLATFORM(IOS).
3334         Also added a FIXME comment to remove the PLATFORM(IOS) guard inside its function body once we upstream
3335         file ContentFilterIOS.mm and implement ContentFilter::requestUnblockAndDispatchIfSuccessful() for Mac.
3336         * loader/DocumentLoader.h:
3337         (WebCore::DocumentLoader::setResponse): Added; guard by PLATFORM(IOS). Also added a FIXME comment as
3338         this method seems to violate the encapsulation of DocumentLoader.
3339         (WebCore::DocumentLoader::subresourceLoadersArePageCacheAcceptable): Added.
3340         (WebCore::DocumentLoader::documentURL): Added; returns the URL of the document resulting from the DocumentLoader.
3341         * loader/DocumentWriter.cpp:
3342         (WebCore::DocumentWriter::createDocument): Added iOS-specific code to create a PDF document.
3343         * loader/EmptyClients.cpp:
3344         (WebCore::EmptyChromeClient::openDateTimeChooser): Opt out of compiling this code for iOS. Also substituted
3345         nullptr for 0.
3346         * loader/EmptyClients.h:
3347         * loader/FrameLoader.cpp:
3348         (WebCore::FrameLoader::FrameProgressTracker::~FrameProgressTracker):
3349         (WebCore::FrameLoader::FrameLoader): Initialize m_loadsSynchronously.
3350         (WebCore::FrameLoader::initForSynthesizedDocument): Added; guarded by PLATFORM(IOS). Also added FIXME comment.
3351         (WebCore::FrameLoader::checkCompleted): Added iOS-specific code with FIXME comment.
3352         (WebCore::FrameLoader::willLoadMediaElementURL): Added iOS-specific code.
3353         (WebCore::FrameLoader::stopForUserCancel): Added iOS-specific code and FIXME comment.
3354         (WebCore::FrameLoader::commitProvisionalLoad): Added iOS-specific code and FIXME comment.
3355         (WebCore::FrameLoader::transitionToCommitted): Opt out of ENABLE(TOUCH_EVENTS) logic when building for iOS.
3356         (WebCore::FrameLoader::didFirstLayout): Added iOS-specific code.
3357         (WebCore::FrameLoader::connectionProperties): Added; guarded by PLATFORM(IOS).
3358         (WebCore::createWindow): Added iOS-specific code and FIXME comment.
3359         * loader/FrameLoader.h:
3360         (WebCore::FrameLoader::setLoadsSynchronously): Added.
3361         (WebCore::FrameLoader::loadsSynchronously): Added.
3362         * loader/FrameLoaderClient.h:
3363         * loader/HistoryController.cpp:
3364         (WebCore::HistoryController::restoreScrollPositionAndViewState): Opt out of scroll position logic when building for iOS.
3365         (WebCore::HistoryController::replaceCurrentItem): Added.
3366         * loader/HistoryController.h:
3367         * loader/PlaceholderDocument.h: Changed access control of constructor from private to protected and removed the FINAL
3368         keyword from the class so that we can subclass PlaceholderDocument on iOS.
3369         * loader/PolicyChecker.cpp:
3370         (WebCore::PolicyChecker::checkNavigationPolicy): Added USE(QUICK_LOOK)- and USE(CONTENT_FILTERING)-guarded code.
3371         * loader/ResourceBuffer.cpp:
3372         (WebCore::ResourceBuffer::shouldUsePurgeableMemory): Added; guarded by PLATFORM(IOS).
3373         * loader/ResourceBuffer.h:
3374         * loader/ResourceLoadNotifier.cpp:
3375         (WebCore::ResourceLoadNotifier::dispatchWillSendRequest): Added USE(QUICK_LOOK)-guarded code.
3376         * loader/ResourceLoadScheduler.cpp:
3377         (WebCore::ResourceLoadScheduler::scheduleSubresourceLoad): Added iOS-specific code.
3378         (WebCore::ResourceLoadScheduler::scheduleLoad): Ditto.
3379         (WebCore::ResourceLoadScheduler::remove): Added iOS-specific code with FIXME comment.
3380         (WebCore::ResourceLoadScheduler::crossOriginRedirectReceived): Added null-check for variable oldHost. Also added
3381         iOS-specific code.
3382         (WebCore::ResourceLoadScheduler::servePendingRequests): Added iOS-specific code.
3383         * loader/ResourceLoader.cpp:
3384         (WebCore::ResourceLoader::init): Ditto.
3385         (WebCore::ResourceLoader::willSendRequest): Ditto.
3386         (WebCore::ResourceLoader::connectionProperties): Added; guarded by PLATFORM(IOS).
3387         * loader/ResourceLoader.h:
3388         (WebCore::ResourceLoader::startLoading): Added; guarded by PLATFORM(IOS).
3389         (WebCore::ResourceLoader::iOSOriginalRequest): Added; iOS-specific.
3390         * loader/SubframeLoader.cpp:
3391         (WebCore::SubframeLoader::loadPlugin): Added iOS-specific code.
3392         * loader/SubresourceLoader.cpp:
3393         (WebCore::SubresourceLoader::create): Ditto.
3394         (WebCore::SubresourceLoader::startLoading): Added; guarded by PLATFORM(IOS).
3395         (WebCore::SubresourceLoader::didFinishLoading): Added iOS-specific code.
3396         (WebCore::SubresourceLoader::willCancel): Ditto.
3397         (WebCore::SubresourceLoader::notifyDone): Ditto.
3398         (WebCore::SubresourceLoader::releaseResources): Ditto.
3399         * loader/SubresourceLoader.h:
3400         * loader/appcache/ApplicationCacheStorage.cpp:
3401         (WebCore::ApplicationCacheStorage::loadCacheGroup): Added iOS-specific code.
3402         (WebCore::ApplicationCacheStorage::loadManifestHostHashes): Ditto.
3403         (WebCore::ApplicationCacheStorage::cacheGroupForURL): Ditto.
3404         (WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL): Ditto.
3405         (WebCore::ApplicationCacheStorage::calculateQuotaForOrigin): Ditto.
3406         (WebCore::ApplicationCacheStorage::calculateUsageForOrigin): Ditto.
3407         (WebCore::ApplicationCacheStorage::calculateRemainingSizeForOriginExcludingCache): Ditto.
3408         (WebCore::ApplicationCacheStorage::storeUpdatedQuotaForOrigin): Ditto.
3409         (WebCore::ApplicationCacheStorage::executeSQLCommand): Ditto.
3410         (WebCore::ApplicationCacheStorage::verifySchemaVersion): Ditto.
3411         (WebCore::ApplicationCacheStorage::openDatabase): Ditto.
3412         (WebCore::ApplicationCacheStorage::executeStatement): Ditto.
3413         (WebCore::ApplicationCacheStorage::store): Ditto.
3414         (WebCore::ApplicationCacheStorage::storeUpdatedType): Ditto.
3415         (WebCore::ApplicationCacheStorage::ensureOriginRecord): Ditto.
3416         (WebCore::ApplicationCacheStorage::loadCache): Ditto.
3417         (WebCore::ApplicationCacheStorage::remove): Ditto.
3418         (WebCore::ApplicationCacheStorage::empty): Ditto.
3419         (WebCore::ApplicationCacheStorage::storeCopyOfCache): Ditto.
3420         (WebCore::ApplicationCacheStorage::manifestURLs): Ditto.
3421         (WebCore::ApplicationCacheStorage::cacheGroupSize): Ditto.
3422         (WebCore::ApplicationCacheStorage::deleteCacheGroup): Ditto.
3423         (WebCore::ApplicationCacheStorage::vacuumDatabaseFile): Ditto.
3424         * loader/cache/CachedImage.cpp:
3425         (WebCore::CachedImage::CachedImage): Added.
3426         (WebCore::CachedImage::imageSizeForRenderer): Added iOS-specific code.
3427         (WebCore::CachedImageManual::CachedImageManual): Added; guarded by USE(CF). Also added FIXME comment to incorporate
3428         the functionality of this class into CachedImage and to remove the USE(CF)-guard once we make MemoryCache::addImageToCache()
3429         platform-independent.
3430         (WebCore::CachedImageManual::mustRevalidateDueToCacheHeaders): Added; guarded by USE(CF).
3431         * loader/cache/CachedImage.h: Removed FINAL keyword from class so that we can define derived class CachedImageManual.
3432         (WebCore::CachedImage::isManual): Added; guarded by USE(CF). Also added FIXME comment.
3433         (WebCore::CachedImageManual::addFakeClient): Added; guarded by USE(CF).
3434         (WebCore::CachedImageManual::removeFakeClient): Added; guarded by USE(CF).
3435         * loader/cache/CachedResource.cpp:
3436         (WebCore::CachedResource::load): Added iOS-specific code.
3437         * loader/cache/CachedResource.h:
3438         * loader/cache/CachedResourceLoader.cpp:
3439         (WebCore::CachedResourceLoader::loadDone): Added argument shouldPerformPostLoadActions, defaults to true. Modified
3440         to conditionally call performPostLoadActions() with respect to the argument shouldPerformPostLoadActions.
3441         (WebCore::CachedResourceLoader::preload): Added iOS-specific code.
3442         (WebCore::CachedResourceLoader::checkForPendingPreloads): Ditto.
3443         * loader/cache/CachedResourceLoader.h:
3444         * loader/cache/MemoryCache.cpp:
3445    &