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