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