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