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