Source/JavaScriptCore:
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-09-25  Brian J. Burg  <burg@cs.washington.edu>
2
3         Web Replay: Check event loop input extents during replay too
4         https://bugs.webkit.org/show_bug.cgi?id=136316
5
6         Reviewed by Timothy Hatcher.
7
8         Sometimes we see different nondeterminism during capture and replay
9         executions, so we should support determinism checks during replay too.
10
11         Move the withinEventLoopInputExtent flag to the base class.
12
13         No new tests, no behavior changed.
14
15         * replay/CapturingInputCursor.cpp:
16         (WebCore::CapturingInputCursor::CapturingInputCursor):
17         (WebCore::CapturingInputCursor::setWithinEventLoopInputExtent): Deleted.
18         * replay/CapturingInputCursor.h:
19         * replay/EventLoopInput.cpp:
20         (WebCore::EventLoopInputExtent::EventLoopInputExtent):
21         (WebCore::EventLoopInputExtent::~EventLoopInputExtent):
22         Make m_cursor a pointer and add a new constructor so we can conditionally
23         enter event loop input extents. This is useful in some network replay situations.
24
25         * replay/EventLoopInput.h:
26         * replay/ReplayController.cpp:
27         (WebCore::ReplayController::willDispatchEvent): Expand the assertion to include replaying.
28
29 2014-09-25  Jeremy Jones  <jeremyj@apple.com>
30
31         Race in ref pointer for WebVideoFullscreenInterfaceAVKit.
32         https://bugs.webkit.org/show_bug.cgi?id=137123
33
34         Reviewed by Eric Carlson.
35
36         Add WebThreadRun to prevent race with RefPtr of WebVideoFullscreenInterfaceAVKit.
37
38         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
39         (-[WebVideoFullscreenController didSetupFullscreen]): add WebThreadRun
40         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
41         (WebVideoFullscreenInterfaceAVKit::setDuration): ditto
42         (WebVideoFullscreenInterfaceAVKit::setCurrentTime): ditto
43         (WebVideoFullscreenInterfaceAVKit::setRate): ditto
44         (WebVideoFullscreenInterfaceAVKit::setVideoDimensions): ditto
45         (WebVideoFullscreenInterfaceAVKit::setSeekableRanges): ditto
46         (WebVideoFullscreenInterfaceAVKit::setAudioMediaSelectionOptions): ditto
47         (WebVideoFullscreenInterfaceAVKit::setLegibleMediaSelectionOptions): ditto
48         (WebVideoFullscreenInterfaceAVKit::setExternalPlayback): ditto
49         (WebVideoFullscreenInterfaceAVKit::setupFullscreen): ditto
50         (WebVideoFullscreenInterfaceAVKit::enterFullscreen): ditto
51         (WebVideoFullscreenInterfaceAVKit::exitFullscreen): ditto
52         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreen): ditto
53         (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): ditto
54
55 2014-09-25  Chris Dumez  <cdumez@apple.com>
56
57         Unreviewed iOS build fix after r173944.
58
59         Add a missing header include.
60         See <rdar://problem/18454708> for more details.
61
62         * html/parser/HTMLTreeBuilder.cpp:
63
64 2014-09-25  Christophe Dumez  <cdumez@apple.com>
65
66         Stop using legacy NODE_TYPE_CASTS() macro in svg/
67         https://bugs.webkit.org/show_bug.cgi?id=137106
68
69         Reviewed by Ryosuke Niwa.
70
71         Stop using legacy NODE_TYPE_CASTS() in svg/ and use the new
72         SPECIALIZE_TYPE_TRAITS_*() macro instead so that is<>() / downcast<>()
73         can be used for those types.
74
75         No new tests, no behavior change.
76
77         * css/CSSComputedStyleDeclaration.cpp:
78         (WebCore::ComputedStyleExtractor::propertyValue):
79         * dom/Element.h:
80         * dom/Node.h:
81         (WebCore::is):
82         * dom/make_names.pl:
83         (printTypeHelpers):
84         * html/HTMLElement.h:
85         * html/HTMLMediaElement.h:
86         * html/HTMLPlugInImageElement.h:
87         * html/LabelableElement.h:
88         * mathml/MathMLElement.h:
89         Rename NodeTypeCastTraits::is() to NodeTypeCastTraits::isType() to
90         avoid naming conflict with the global is<>() function. This was an
91         issue when is<>() was called from one of the template specializations.
92
93         * rendering/svg/RenderSVGBlock.h:
94         (WebCore::RenderSVGBlock::graphicsElement):
95         * rendering/svg/RenderSVGGradientStop.cpp:
96         (WebCore::RenderSVGGradientStop::gradientElement):
97         * rendering/svg/RenderSVGInline.h:
98         (WebCore::RenderSVGInline::graphicsElement):
99         * rendering/svg/RenderSVGResourceClipper.cpp:
100         (WebCore::RenderSVGResourceClipper::pathOnlyClipping):
101         * rendering/svg/RenderSVGResourceContainer.cpp:
102         (WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke):
103         * rendering/svg/RenderSVGShape.h:
104         (WebCore::RenderSVGShape::graphicsElement):
105         * rendering/svg/RenderSVGTransformableContainer.h:
106         * rendering/svg/SVGRenderSupport.cpp:
107         (WebCore::SVGRenderSupport::updateMaskedAncestorShouldIsolateBlending):
108         * rendering/svg/SVGRenderTreeAsText.cpp:
109         (WebCore::operator<<):
110         * rendering/svg/SVGRenderingContext.cpp:
111         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
112         * rendering/svg/SVGResources.cpp:
113         (WebCore::targetReferenceFromResource):
114         * svg/SVGAElement.cpp:
115         (WebCore::SVGAElement::defaultEventHandler):
116         * svg/SVGAnimateElement.cpp:
117         (WebCore::SVGAnimateElement::calculateAnimatedValue):
118         (WebCore::isSVGAnimateElement): Deleted.
119         Use is<>() / downcast<>() where appropriate.
120
121         * svg/SVGAnimateElement.h:
122         (WebCore::isSVGAnimateElement):
123         Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS() and add
124         overload for isSVGAnimateElement() taking an SVGElement in argument to
125         bypass the is<SVGElement>() check when the input type is an SVGElement.
126
127         * svg/SVGAnimationElement.cpp:
128         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
129         * svg/SVGElement.cpp:
130         (WebCore::SVGElement::getBoundingBox):
131         Use is<>() / downcast<>() where appropriate.
132
133         * svg/SVGElement.h:
134         * svg/SVGFilterPrimitiveStandardAttributes.h:
135         Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS() and drop
136         the pre-existing NodeTypeCastTraits template specialization as it is
137         now generated by the macro.
138
139         * svg/SVGGradientElement.cpp:
140         (WebCore::isSVGGradientElement): Deleted.
141         * svg/SVGGradientElement.h:
142         (WebCore::isSVGGradientElement):
143         Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS() and add
144         overload for isSVGAnimateElement() taking an SVGElement in argument to
145         bypass the is<SVGElement>() check when the input type is an SVGElement.
146
147         * svg/SVGGraphicsElement.h:
148         (WebCore::isSVGGraphicsElement):
149         Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS().
150
151         * svg/SVGLinearGradientElement.cpp:
152         (WebCore::SVGLinearGradientElement::collectGradientAttributes):
153         * svg/SVGLocatable.cpp:
154         (WebCore::SVGLocatable::getTransformToElement):
155         * svg/SVGPolyElement.cpp:
156         (WebCore::SVGPolyElement::synchronizePoints):
157         (WebCore::SVGPolyElement::lookupOrCreatePointsWrapper):
158         (WebCore::isSVGPolyElement): Deleted.
159         Use is<>() / downcast<>() where appropriate.
160
161         * svg/SVGPolyElement.h:
162         (WebCore::isSVGPolyElement):
163         Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS() and add
164         overload for isPolyElement() taking an SVGElement in argument to
165         bypass the is<SVGElement>() check when the input type is an SVGElement.
166
167         * svg/SVGRadialGradientElement.cpp:
168         (WebCore::SVGRadialGradientElement::collectGradientAttributes):
169         * svg/SVGTextContentElement.cpp:
170         (WebCore::SVGTextContentElement::synchronizeTextLength):
171         (WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper):
172         (WebCore::SVGTextContentElement::elementFromRenderer):
173         Use is<>() / downcast<>() where appropriate.
174
175         * svg/SVGTextContentElement.h:
176         WebCore::isSVGTextContentElement):
177         Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS().
178
179         * svg/SVGUseElement.cpp:
180         (WebCore::SVGUseElement::toClipPath):
181         Use is<>() / downcast<>() where appropriate. Also use tighter typing
182         for value returned by shadowTreeElement().
183
184         * svg/animation/SVGSMILElement.cpp:
185         (WebCore::SVGSMILElement::buildPendingResource):
186         (WebCore::SVGSMILElement::connectConditions):
187         (WebCore::SVGSMILElement::disconnectConditions):
188         Use is<>() / downcast<>() where appropriate.
189
190         * svg/animation/SVGSMILElement.h:
191         (WebCore::isSVGSMILElement):
192         Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS() and drop
193         the pre-existing NodeTypeCastTraits template specialization as it is
194         now generated by the macro.
195
196 2014-09-25  Brent Fulgham  <bfulgham@apple.com>
197
198         Minor refactoring to mediaType/presentationType
199         https://bugs.webkit.org/show_bug.cgi?id=137085
200
201         Reviewed by Eric Carlson.
202
203         Add overloads for presentationType for the audio and video
204         HTML elements so that we don't have to explicity check the
205         tag name (via string comparison) to identify the type of
206         element.
207
208         No new tests. Should create no change in behavior.
209
210         * html/HTMLAudioElement.h: Overload presentationType to always
211         indicate audio type.
212         * html/HTMLMediaElement.cpp:
213         (WebCore::HTMLMediaElement::mediaType): Use the presentationType
214         method implementation, rather than duplicating that code.
215         * html/HTMLVideoElement.h: Overload presentationType to always
216         return video type.
217
218 2014-09-25  Javier Fernandez  <jfernandez@igalia.com>
219
220         ASSERTION FAILED: columnCount in WebCore::CSSParser::parseGridTemplateAreasRow
221         https://bugs.webkit.org/show_bug.cgi?id=136945
222
223         Reviewed by Sergio Villar Senin.
224
225         Checking out whether the grid-template-areas value contains a white-space only
226         string, which is not valid as it does not produce a cell token.
227
228         Test: fast/css-grid-layout/grid-template-areas-empty-string-crash.html
229
230         * css/CSSParser.cpp:
231         (WebCore::CSSParser::parseGridTemplateAreasRow):
232
233 2014-09-25  Csaba Osztrogonác  <ossy@webkit.org>
234
235         Remove WinCE port from trunk
236         https://bugs.webkit.org/show_bug.cgi?id=136951
237
238         Reviewed by Alex Christensen.
239
240         * Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp:
241         * PlatformWinCE.cmake: Removed.
242         * accessibility/AXObjectCache.cpp:
243         * editing/FrameSelection.cpp:
244         (WebCore::FrameSelection::modifyMovingRight):
245         * loader/icon/wince/IconDatabaseWinCE.cpp: Removed.
246         * page/EventHandler.cpp:
247         (WebCore::EventHandler::sendContextMenuEventForKey):
248         * page/Settings.cpp:
249         * page/win/EventHandlerWin.cpp:
250         (WebCore::EventHandler::createDraggingDataTransfer):
251         * platform/ContextMenu.h:
252         * platform/DragImage.cpp:
253         * platform/FileSystem.h:
254         * platform/graphics/BitmapImage.cpp:
255         (WebCore::BitmapImage::mayFillWithSolidColor):
256         * platform/graphics/FontGlyphs.cpp:
257         (WebCore::FontGlyphs::glyphDataAndPageForCharacter):
258         * platform/graphics/FontPlatformData.h:
259         * platform/graphics/ImageBufferData.h:
260         * platform/graphics/MediaPlayer.cpp:
261         * platform/graphics/SimpleFontData.h:
262         * platform/graphics/opentype/OpenTypeUtilities.cpp:
263         (WebCore::renameAndActivateFont):
264         * platform/graphics/opentype/OpenTypeUtilities.h:
265         * platform/graphics/win/DIBPixelData.cpp:
266         (WebCore::DIBPixelData::setRGBABitmapAlpha):
267         * platform/graphics/win/GDIExtras.cpp: Removed.
268         * platform/graphics/win/GDIExtras.h:
269         (WebCore::hasAlphaBlendSupport):
270         (WebCore::alphaBlendIfSupported):
271         * platform/graphics/win/IconWin.cpp:
272         (WebCore::Icon::createIconForFiles):
273         (WebCore::Icon::paint):
274         * platform/graphics/win/SimpleFontDataWin.cpp:
275         (WebCore::SimpleFontData::initGDIFont):
276         (WebCore::SimpleFontData::platformDestroy):
277         (WebCore::SimpleFontData::boundsForGDIGlyph):
278         (WebCore::SimpleFontData::widthForGDIGlyph):
279         (WebCore::SimpleFontData::scriptFontProperties):
280         * platform/graphics/wince/FontCacheWinCE.cpp: Removed.
281         * platform/graphics/wince/FontCustomPlatformData.cpp: Removed.
282         * platform/graphics/wince/FontCustomPlatformData.h: Removed.
283         * platform/graphics/wince/FontPlatformData.cpp: Removed.
284         * platform/graphics/wince/FontPlatformData.h: Removed.
285         * platform/graphics/wince/FontWinCE.cpp: Removed.
286         * platform/graphics/wince/GlyphPageTreeNodeWinCE.cpp: Removed.
287         * platform/graphics/wince/GradientWinCE.cpp: Removed.
288         * platform/graphics/wince/GraphicsContextWinCE.cpp: Removed.
289         * platform/graphics/wince/ImageBufferDataWince.h: Removed.
290         * platform/graphics/wince/ImageBufferWinCE.cpp: Removed.
291         * platform/graphics/wince/ImageWinCE.cpp: Removed.
292         * platform/graphics/wince/MediaPlayerPrivateWinCE.h: Removed.
293         * platform/graphics/wince/MediaPlayerProxy.cpp: Removed.
294         * platform/graphics/wince/MediaPlayerProxy.h: Removed.
295         * platform/graphics/wince/PathWinCE.cpp: Removed.
296         * platform/graphics/wince/PlatformPathWinCE.cpp: Removed.
297         * platform/graphics/wince/PlatformPathWinCE.h: Removed.
298         * platform/graphics/wince/SharedBitmap.cpp: Removed.
299         * platform/graphics/wince/SharedBitmap.h: Removed.
300         * platform/graphics/wince/SimpleFontDataWinCE.cpp: Removed.
301         * platform/graphics/wince/WinCEGraphicsExtras.h: Removed.
302         * platform/image-decoders/jpeg/JPEGImageDecoder.h:
303         * platform/network/win/NetworkStateNotifierWin.cpp:
304         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
305         * platform/win/COMPtr.h:
306         * platform/win/ClipboardUtilitiesWin.cpp:
307         * platform/win/ContextMenuItemWin.cpp:
308         * platform/win/ContextMenuWin.cpp:
309         (WebCore::ContextMenu::getContextMenuItems):
310         (WebCore::ContextMenu::createPlatformContextMenuFromItems):
311         * platform/win/DragImageWin.cpp:
312         (WebCore::dragLabelFont):
313         * platform/win/FileSystemWin.cpp:
314         (WebCore::pathByAppendingComponent):
315         (WebCore::pathGetFileName):
316         (WebCore::storageDirectory):
317         * platform/win/LoggingWin.cpp:
318         (WebCore::logLevelString):
319         * platform/win/PasteboardWin.cpp:
320         (WebCore::PasteboardOwnerWndProc):
321         (WebCore::Pasteboard::createForCopyAndPaste):
322         (WebCore::pathRemoveBadFSCharacters):
323         (WebCore::filesystemPathFromUrlOrTitle):
324         (WebCore::createGlobalHDropContent):
325         * platform/win/PlatformMouseEventWin.cpp:
326         (WebCore::messageToEventType):
327         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
328         * platform/win/PlatformScreenWin.cpp:
329         (WebCore::deviceInfoForWidget):
330         (WebCore::screenIsMonochrome):
331         * platform/win/PopupMenuWin.cpp:
332         (WebCore::PopupMenuWin::show):
333         (WebCore::PopupMenuWin::paint):
334         (WebCore::PopupMenuWin::registerClass):
335         (WebCore::PopupMenuWin::wndProc):
336         * platform/win/ScrollbarThemeWin.cpp:
337         (WebCore::ScrollbarThemeWin::paintButton):
338         * platform/win/SharedBufferWin.cpp:
339         * platform/win/SharedTimerWin.cpp:
340         (WebCore::TimerWindowWndProc):
341         (WebCore::initializeOffScreenTimerWindow):
342         (WebCore::queueTimerProc):
343         (WebCore::setSharedTimerFireInterval):
344         (WebCore::stopSharedTimer):
345         * platform/win/SoftLinking.h:
346         * platform/win/SystemInfo.cpp:
347         (WebCore::windowsVersion):
348         (WebCore::processorArchitecture):
349         (WebCore::architectureTokenForUAString):
350         * platform/win/WCDataObject.cpp:
351         (WebCore::WCDataObject::CopyMedium):
352         * plugins/PluginDatabase.cpp:
353         * plugins/PluginView.cpp:
354         (WebCore::PluginView::stop):
355         * plugins/PluginViewNone.cpp:
356         * plugins/win/PluginDatabaseWin.cpp:
357         (WebCore::addWindowsMediaPlayerPluginDirectory):
358         (WebCore::addMacromediaPluginDirectories):
359         * plugins/win/PluginPackageWin.cpp:
360         (WebCore::PluginPackage::load):
361         * plugins/win/PluginViewWin.cpp:
362         (WebCore::setUpOffscreenPaintingHooks):
363         (WebCore::registerPluginView):
364         (WebCore::PluginView::wndProc):
365         (WebCore::PluginView::updatePluginWidget):
366         (WebCore::PluginView::paintIntoTransformedContext):
367         (WebCore::PluginView::paint):
368         (WebCore::PluginView::handleMouseEvent):
369         (WebCore::PluginView::setParent):
370         (WebCore::PluginView::setNPWindowRect):
371         (WebCore::PluginView::platformStart):
372         * rendering/RenderThemeWinCE.cpp: Removed.
373         * rendering/RenderThemeWinCE.h: Removed.
374         * storage/wince/DatabaseThreadWinCE.cpp: Removed.
375         * storage/wince/DatabaseThreadWinCE.h: Removed.
376         * storage/wince/StorageThreadWinCE.cpp: Removed.
377         * storage/wince/StorageThreadWinCE.h: Removed.
378
379 2014-09-25  Carlos Garcia Campos  <cgarcia@igalia.com>
380
381         Unreviewed. Fix GTK+ build after r173944.
382
383         * page/ContextMenuController.cpp: Add missing include.
384
385 2014-09-24  Christophe Dumez  <cdumez@apple.com>
386
387         Use tighter typing for render objects in RenderGeometryMap
388         https://bugs.webkit.org/show_bug.cgi?id=137102
389
390         Reviewed by Ryosuke Niwa.
391
392         Use tighter typing for render objects in RenderGeometryMap for clarity
393         and efficiency.
394
395         In particular, using RenderElement type instead of RenderObject
396         in canMapBetweenRenderers() allows us to call the faster
397         RenderElement::style() instead of RenderObject::style().
398
399         No new tests, no behavior change.
400
401         * rendering/RenderGeometryMap.cpp:
402         (WebCore::canMapBetweenRenderers):
403         (WebCore::RenderGeometryMap::pushMappingsToAncestor):
404
405 2014-09-24  Christophe Dumez  <cdumez@apple.com>
406
407         Add initial is<>() / downcast<>() support for any type of Nodes
408         https://bugs.webkit.org/show_bug.cgi?id=137056
409
410         Reviewed by Benjamin Poulain.
411
412         Add initial is<>() / downcast<>() support for any type of Nodes, not
413         just Elements by:
414         - Moving the is<>() / downcast<>() declarations from Element.h to
415           Node.h
416         - Introducing a SPECIALIZE_TYPE_TRAITS_*() macro that generates the
417           needed template specializations for is<>() / downcast<>() to work.
418           This macro will replace NODE_TYPE_CASTS() entirely once the code base
419           is fully ported.
420
421         This patch makes use of SPECIALIZE_TYPE_TRAITS_*() macro for
422         HTMLFormControlElement, that is an HTMLElement for which the template
423         specializations cannot be automatically generated because it requires
424         special handling.
425
426         This patch also makes use of SPECIALIZE_TYPE_TRAITS_*() macro for
427         DocumentFragment to show that it can be used for non-Element Nodes.
428
429         No new tests, no behavior change.
430
431         * accessibility/AccessibilityNodeObject.cpp:
432         (WebCore::AccessibilityNodeObject::isReadOnly):
433         (WebCore::AccessibilityNodeObject::isRequired):
434         (WebCore::AccessibilityNodeObject::isControl):
435         * css/SelectorCheckerTestFunctions.h:
436         (WebCore::isAutofilled):
437         (WebCore::isDisabled):
438         (WebCore::isEnabled):
439         * css/StyleResolver.cpp:
440         (WebCore::StyleResolver::canShareStyleWithElement):
441         (WebCore::StyleResolver::adjustRenderStyle):
442         * dom/Document.cpp:
443         (WebCore::Document::importNode):
444         (WebCore::Document::setFocusedElement):
445         * dom/DocumentFragment.h:
446         (WebCore::isDocumentFragment):
447         * dom/Element.cpp:
448         (WebCore::Element::focus):
449         * dom/Element.h:
450         (WebCore::is): Deleted.
451         (WebCore::downcast): Deleted.
452         * dom/Node.h:
453         (WebCore::is):
454         (WebCore::downcast):
455         * dom/make_names.pl:
456         (printTypeHelpers):
457         * editing/FrameSelection.cpp:
458         (WebCore::scanForForm):
459         * editing/TextIterator.cpp:
460         (WebCore::isRendererReplacedElement):
461         * html/FormAssociatedElement.h:
462         * html/HTMLElement.h:
463         * html/HTMLFieldSetElement.cpp:
464         (WebCore::updateFromControlElementsAncestorDisabledStateUnder):
465         (WebCore::HTMLFieldSetElement::refreshElementsIfNeeded):
466         * html/HTMLFormControlElement.cpp:
467         (WebCore::HTMLFormControlElement::enclosingFormControlElement):
468         * html/HTMLFormControlElement.h:
469         (WebCore::isHTMLFormControlElement):
470         * html/HTMLFormElement.cpp:
471         (WebCore::HTMLFormElement::submitImplicitly):
472         (WebCore::submitElementFromEvent):
473         (WebCore::HTMLFormElement::validateInteractively):
474         (WebCore::HTMLFormElement::submit):
475         (WebCore::HTMLFormElement::reset):
476         (WebCore::HTMLFormElement::formElementIndex):
477         (WebCore::HTMLFormElement::defaultButton):
478         (WebCore::HTMLFormElement::checkInvalidControlsAndCollectUnhandled):
479         (WebCore::HTMLFormElement::documentDidResumeFromPageCache):
480         * html/HTMLMediaElement.h:
481         * html/HTMLPlugInImageElement.h:
482         * html/HTMLSummaryElement.cpp:
483         (WebCore::isClickableControl):
484         * html/LabelableElement.h:
485         * html/RadioNodeList.cpp:
486         (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
487         (WebCore::RadioNodeList::elementMatches):
488         * html/parser/HTMLConstructionSite.cpp:
489         (WebCore::HTMLConstructionSite::findFosterSite):
490         * html/parser/HTMLTreeBuilder.cpp:
491         (WebCore::disallowTelephoneNumberParsing):
492         * loader/FormSubmission.cpp:
493         (WebCore::FormSubmission::create):
494         * mathml/MathMLElement.h:
495         * page/ContextMenuController.cpp:
496         (WebCore::ContextMenuController::populate):
497         * page/Frame.cpp:
498         (WebCore::Frame::searchForLabelsBeforeElement):
499         * rendering/RenderButton.cpp:
500         (WebCore::RenderButton::formControlElement):
501         * rendering/RenderLayer.cpp:
502         (WebCore::RenderLayer::resize):
503         * rendering/RenderTheme.cpp:
504         (WebCore::RenderTheme::isReadOnlyControl):
505         * svg/SVGElement.h:
506         * svg/SVGFilterPrimitiveStandardAttributes.h:
507         * svg/animation/SVGSMILElement.h:
508
509 2014-09-24  Darin Adler  <darin@apple.com>
510
511         Old Turkic characters behave as left-to-right instead of right-to-left, because they are encoded as surrogate pairs.
512         https://bugs.webkit.org/show_bug.cgi?id=70029
513
514         Reviewed by Dan Bernstein.
515
516         Test: fast/text/international/old-turkic-direction.html
517
518         * CMakeLists.txt: Added InlineIterator.cpp.
519         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
520         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
521         * WebCore.xcodeproj/project.pbxproj: Ditto.
522         * rendering/RenderingAllInOne.cpp: Ditto.
523
524         * rendering/InlineIterator.cpp: Added.
525         (WebCore::InlineIterator::surrogateTextDirection): New function used to compute the direction
526         when a surrogate pair is involved.
527         * rendering/InlineIterator.h: Made the characterAt function private.
528         (WebCore::InlineIterator::previousInSameNode): Took out unneeded range check. A zero will underflow
529         and become a large number and the characterAt function will return 0 in that case.
530         (WebCore::InlineIterator::direction): Added code to check U16_IS_SINGLE before calling
531         u_charDirection, and call surrogateTextDirection instead.
532
533 2014-09-24  Christophe Dumez  <cdumez@apple.com>
534
535         Unreviewed build fix after r173941.
536
537         Rename shadow to m_shadow.
538
539         * rendering/TextPainter.h:
540         (WebCore::ShadowApplier::shadowIsCompletelyCoveredByText):
541
542 2014-09-22  Myles C. Maxfield  <mmaxfield@apple.com>
543
544         REGRESSION: Text with a zero offset, zero blur shadow vanishes
545         https://bugs.webkit.org/show_bug.cgi?id=136801
546
547         Reviewed by Darin Adler.
548
549         This patch performs some cleanup regarding TextPainter's shadow logic and handles an
550         additional case of empty shadows. Previously, there was tight coupling between
551         applyShadowToGraphicalContext() and paintTextWithShadows(), as they both used a
552         collection of variables to determine how shadows are to be drawn. This complexity has
553         been moved into a helper class, ShadowApplier, which performs what
554         applyShadowToGraphicsContext() used to do, and cleans up correctly in its destructor.
555         This removes the tight coupling mentioned earlier.
556
557         Test: fast/text/empty-shadow.html
558
559         * rendering/InlineTextBox.cpp:
560         (WebCore::InlineTextBox::applyShadowToGraphicsContext): Moved to ShadowApplier.
561         * rendering/InlineTextBox.h: Deleted applyShadowToGraphicsContext signature.
562         * rendering/TextPainter.cpp:
563         (WebCore::ShadowApplier::ShadowApplier): Perform the contents of applyShadowToGraphicsContext()
564         (WebCore::ShadowApplier::~ShadowApplier): Undo the work done previously
565         (WebCore::paintTextWithShadows): Create a ShadowApplier to do the relevant shadow work. In addition,
566         refactor some boolean flags to more meaningful ones with relation to the computation at hand.
567         (WebCore::isEmptyShadow): Moved to TextPainter.h, named shadowIsCompletelyCoveredByText()
568         * rendering/TextPainter.h:
569         (WebCore::ShadowApplier::ShadowApplier): Moved from InlineTextBox::applyShadowToGraphicsContext().
570         (WebCore::ShadowApplier::extraOffset): Getter.
571         (WebCore::ShadowApplier::~ShadowApplier): Moved from TextPainter::paintTextWithShadows().
572         (WebCore::isLastShadowIteration): Helper function.
573         (WebCore::shadowIsCompletelyCoveredByText): Determines whether or not we should not draw the shadow.
574         * rendering/svg/SVGInlineTextBox.cpp:
575         (WebCore::SVGInlineTextBox::paintTextWithShadows): Update to use ShadowApplier.
576
577 2014-09-24  Brian J. Burg  <burg@cs.washington.edu>
578
579         Web Inspector: subtract elapsed time while debugger is paused from profile nodes
580         https://bugs.webkit.org/show_bug.cgi?id=136796
581
582         Reviewed by Timothy Hatcher.
583
584         * inspector/TimelineRecordFactory.cpp:
585         (WebCore::buildInspectorObject):
586
587 2014-09-24  Christophe Dumez  <cdumez@apple.com>
588
589         Use is<HTML*Element>() instead of isHTML*Element() - Part 1
590         https://bugs.webkit.org/show_bug.cgi?id=137068
591
592         Reviewed by Ryosuke Niwa.
593
594         Start using is<HTML*Element>() instead of isHTML*Element().
595         Remaining usages will be updated in a follow-up patch to
596         reduce the size of the change.
597
598         No new tests, no behavior change.
599
600         * accessibility/AccessibilityListBoxOption.cpp:
601         (WebCore::AccessibilityListBoxOption::isSelected):
602         (WebCore::AccessibilityListBoxOption::canSetSelectedAttribute):
603         (WebCore::AccessibilityListBoxOption::stringValue):
604         (WebCore::AccessibilityListBoxOption::listBoxOptionParentNode):
605         * accessibility/AccessibilityMediaControls.cpp:
606         (WebCore::AccessibilityMediaTimeline::valueDescription):
607         * accessibility/AccessibilityMenuListOption.cpp:
608         (WebCore::AccessibilityMenuListOption::setElement):
609         * accessibility/AccessibilityMenuListPopup.cpp:
610         (WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
611         * accessibility/AccessibilityNodeObject.cpp:
612         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
613         (WebCore::AccessibilityNodeObject::isNativeTextControl):
614         (WebCore::AccessibilityNodeObject::isNativeImage):
615         (WebCore::AccessibilityNodeObject::isInputImage):
616         (WebCore::AccessibilityNodeObject::isReadOnly):
617         (WebCore::AccessibilityNodeObject::valueForRange):
618         (WebCore::AccessibilityNodeObject::maxValueForRange):
619         (WebCore::AccessibilityNodeObject::minValueForRange):
620         (WebCore::isNodeActionElement):
621         (WebCore::AccessibilityNodeObject::titleElementText):
622         (WebCore::AccessibilityNodeObject::visibleText):
623         (WebCore::AccessibilityNodeObject::title):
624         (WebCore::AccessibilityNodeObject::colorValue):
625         (WebCore::accessibleNameForNode):
626         * accessibility/AccessibilityRenderObject.cpp:
627         (WebCore::AccessibilityRenderObject::isFileUploadButton):
628         (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
629         (WebCore::AccessibilityRenderObject::setValue):
630         (WebCore::AccessibilityRenderObject::accessibilityHitTest):
631         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
632         (WebCore::AccessibilityRenderObject::addTextFieldChildren):
633         * accessibility/atk/AXObjectCacheAtk.cpp:
634         (WebCore::notifyChildrenSelectionChange):
635         * css/SelectorCheckerTestFunctions.h:
636         (WebCore::isDisabled):
637         (WebCore::isEnabled):
638         (WebCore::isChecked):
639         * css/StyleResolver.cpp:
640         (WebCore::StyleResolver::adjustRenderStyle):
641         * dom/EventDispatcher.cpp:
642         (WebCore::EventDispatcher::dispatchEvent):
643         * editing/FrameSelection.cpp:
644         (WebCore::FrameSelection::selectAll):
645         * editing/ReplaceSelectionCommand.cpp:
646         (WebCore::ReplaceSelectionCommand::shouldPerformSmartReplace):
647         * editing/VisibleSelection.cpp:
648         (WebCore::VisibleSelection::isInPasswordField):
649         * editing/cocoa/HTMLConverter.mm:
650         (HTMLConverter::_processElement):
651         * editing/gtk/EditorGtk.cpp:
652         (WebCore::elementURL):
653         * editing/ios/EditorIOS.mm:
654         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
655         * editing/markup.cpp:
656         (WebCore::StyledMarkupAccumulator::appendText):
657         (WebCore::isPlainTextMarkup):
658         (WebCore::collectElementsToRemoveFromFragment):
659         * html/HTMLCollection.cpp:
660         (WebCore::isMatchingElement):
661         * html/HTMLEmbedElement.cpp:
662         (WebCore::HTMLEmbedElement::rendererIsNeeded):
663         * html/HTMLFormControlElement.cpp:
664         (WebCore::shouldAutofocus):
665         * html/HTMLFormElement.cpp:
666         (WebCore::HTMLFormElement::getTextFieldValues):
667         (WebCore::HTMLFormElement::formElementIndex):
668         * html/HTMLImageLoader.cpp:
669         (WebCore::HTMLImageLoader::dispatchLoadEvent):
670         (WebCore::HTMLImageLoader::notifyFinished):
671         * html/HTMLNameCollection.cpp:
672         (WebCore::DocumentNameCollection::elementMatchesIfIdAttributeMatch):
673         (WebCore::DocumentNameCollection::elementMatchesIfNameAttributeMatch):
674         (WebCore::DocumentNameCollection::elementMatches):
675         * html/HTMLOptGroupElement.cpp:
676         (WebCore::HTMLOptGroupElement::recalcSelectOptions):
677         (WebCore::HTMLOptGroupElement::ownerSelectElement):
678         * html/HTMLOptionElement.cpp:
679         (WebCore::HTMLOptionElement::index):
680         (WebCore::HTMLOptionElement::ownerSelectElement):
681         * html/HTMLSelectElement.cpp:
682         (WebCore::HTMLSelectElement::add):
683         (WebCore::HTMLSelectElement::value):
684         (WebCore::HTMLSelectElement::setValue):
685         (WebCore::HTMLSelectElement::childShouldCreateRenderer):
686         (WebCore::HTMLSelectElement::setLength):
687         (WebCore::HTMLSelectElement::nextValidIndex):
688         (WebCore::HTMLSelectElement::saveLastSelection):
689         (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
690         (WebCore::HTMLSelectElement::updateListBoxSelection):
691         (WebCore::HTMLSelectElement::listBoxOnChange):
692         (WebCore::HTMLSelectElement::recalcListItems):
693         (WebCore::HTMLSelectElement::selectedIndex):
694         (WebCore::HTMLSelectElement::selectOption):
695         (WebCore::HTMLSelectElement::optionToListIndex):
696         (WebCore::HTMLSelectElement::listToOptionIndex):
697         (WebCore::HTMLSelectElement::deselectItemsWithoutValidation):
698         (WebCore::HTMLSelectElement::saveFormControlState):
699         (WebCore::HTMLSelectElement::searchOptionsForValue):
700         (WebCore::HTMLSelectElement::restoreFormControlState):
701         (WebCore::HTMLSelectElement::appendFormData):
702         (WebCore::HTMLSelectElement::reset):
703         (WebCore::HTMLSelectElement::updateSelectedState):
704         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
705         (WebCore::HTMLSelectElement::lastSelectedListIndex):
706         (WebCore::HTMLSelectElement::optionAtIndex):
707         (WebCore::HTMLSelectElement::accessKeySetSelectedIndex):
708         (WebCore::HTMLSelectElement::length):
709         * html/HTMLTagNames.in:
710         * html/RadioInputType.cpp:
711         (WebCore::RadioInputType::handleKeydownEvent):
712         (WebCore::RadioInputType::isKeyboardFocusable):
713         * html/parser/HTMLConstructionSite.cpp:
714         (WebCore::hasImpliedEndTag):
715         * html/parser/HTMLElementStack.cpp:
716         (WebCore::HTMLNames::isSelectScopeMarker):
717         * html/parser/HTMLTreeBuilder.cpp:
718         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
719         (WebCore::HTMLTreeBuilder::processStartTag):
720         (WebCore::HTMLTreeBuilder::processEndTag):
721         * html/shadow/MediaControlElementTypes.cpp:
722         (WebCore::mediaControlElementType):
723         * loader/FormSubmission.cpp:
724         (WebCore::FormSubmission::create):
725         * loader/FrameLoader.cpp:
726         (WebCore::FrameLoader::handleFallbackContent):
727         * loader/ImageLoader.cpp:
728         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
729         * loader/SubframeLoader.cpp:
730         (WebCore::SubframeLoader::requestObject):
731         * loader/archive/cf/LegacyWebArchive.cpp:
732         (WebCore::LegacyWebArchive::create):
733         * page/Chrome.cpp:
734         (WebCore::Chrome::setToolTip):
735         * page/EventHandler.cpp:
736         (WebCore::isSubmitImage):
737         (WebCore::EventHandler::handleMousePressEvent):
738         * page/FocusController.cpp:
739         (WebCore::clearSelectionIfNeeded):
740         * page/FrameView.cpp:
741         (WebCore::FrameView::addEmbeddedObjectToUpdate):
742         (WebCore::FrameView::updateEmbeddedObject):
743         * page/PageSerializer.cpp:
744         (WebCore::frameOwnerURLAttributeName):
745         * page/SpatialNavigation.cpp:
746         (WebCore::canScrollInDirection):
747         * rendering/HitTestResult.cpp:
748         (WebCore::HitTestResult::altDisplayString):
749         (WebCore::HitTestResult::absoluteImageURL):
750         (WebCore::HitTestResult::absolutePDFURL):
751         (WebCore::HitTestResult::isContentEditable):
752         * rendering/RenderBlockFlow.cpp:
753         (WebCore::resizeTextPermitted):
754         * rendering/RenderBox.cpp:
755         (WebCore::RenderBox::sizesLogicalWidthToFitContent):
756         * rendering/RenderButton.cpp:
757         (WebCore::RenderButton::updateFromElement):
758         (WebCore::RenderButton::canHaveGeneratedChildren):
759         * rendering/RenderDetailsMarker.cpp:
760         (WebCore::RenderDetailsMarker::isOpen):
761         * rendering/RenderFileUploadControl.cpp:
762         (WebCore::RenderFileUploadControl::uploadButton):
763         * rendering/RenderImage.cpp:
764         (WebCore::RenderImage::updateAltText):
765         * rendering/RenderListBox.cpp:
766         (WebCore::RenderListBox::updateFromElement):
767         (WebCore::RenderListBox::addFocusRingRects):
768         (WebCore::RenderListBox::paintItemForeground):
769         (WebCore::RenderListBox::paintItemBackground):
770         * rendering/RenderMenuList.cpp:
771         (WebCore::selectedOptionCount):
772         (RenderMenuList::updateOptionsWidth):
773         (RenderMenuList::setTextFromOption):
774         (RenderMenuList::itemText):
775         (RenderMenuList::itemIsEnabled):
776         (RenderMenuList::itemIsSelected):
777         * rendering/RenderTheme.cpp:
778         (WebCore::RenderTheme::paintSliderTicks):
779         * testing/Internals.cpp:
780         (WebCore::Internals::selectColorInColorChooser):
781         (WebCore::Internals::wasLastChangeUserEdit):
782         (WebCore::Internals::isSelectPopupVisible):
783         * xml/parser/XMLDocumentParserLibxml2.cpp:
784         (WebCore::XMLDocumentParser::startElementNs):
785
786 2014-09-24  Eric Carlson  <eric.carlson@apple.com>
787
788         [iOS] Remove MediaPlayer::setHasPlaybackTargetAvailabilityListeners
789         https://bugs.webkit.org/show_bug.cgi?id=137075
790
791         Reviewed by Dean Jackson.
792
793         No new tests, this just removes unused code.
794
795         * platform/graphics/MediaPlayer.cpp:
796         (WebCore::MediaPlayer::setHasPlaybackTargetAvailabilityListeners): Deleted.
797         * platform/graphics/MediaPlayer.h:
798         * platform/graphics/MediaPlayerPrivate.h:
799         (WebCore::MediaPlayerPrivateInterface::setHasPlaybackTargetAvailabilityListeners): Deleted.
800
801 2014-09-21  Timothy Hatcher  <timothy@apple.com>
802
803         Make the Web Inspector use a separate web process.
804
805         https://bugs.webkit.org/show_bug.cgi?id=135120
806
807         Reviewed by Anders Carlsson.
808
809         * English.lproj/Localizable.strings: Updated.
810
811         * WebCore.exp.in:
812         * WebCore.xcodeproj/project.pbxproj:
813         * bindings/js/ScriptGlobalObject.h:
814         * bindings/js/ScriptState.h:
815         * inspector/InspectorFrontendHost.h:
816         * inspector/InspectorPageAgent.h:
817         * page/Chrome.h:
818         Exported a few functions and private headers.
819
820         * inspector/InspectorController.cpp:
821         (WebCore::InspectorController::InspectorController):
822         (WebCore::InspectorController::setInspectorFrontendClient):
823         (WebCore::InspectorController::hasInspectorFrontendClient):
824         (WebCore::InspectorController::show):
825         * inspector/InspectorController.h:
826         Make InspectorFrontendClient a pointer instead of a std::unique_ptr.
827         This makes it easier to implement InspectorFrontendClient as
828         part of an existing object that is externally owned.
829
830         * testing/Internals.cpp:
831         (WebCore::Internals::openDummyInspectorFrontend):
832         (WebCore::Internals::closeDummyInspectorFrontend):
833         * testing/Internals.h:
834         Change InspectorFrontendClientDummy from being moved to owned.
835
836 2014-09-23  Dean Jackson  <dino@apple.com>
837
838         [Yosemite] Button text doesn't go white while pushing the button, like it does for real buttons
839         https://bugs.webkit.org/show_bug.cgi?id=137054
840         rdar://problem/17559038
841
842         Reviewed by Sam Weinig.
843
844         On Yosemite and above, system buttons paint with white-ish text when they
845         are pressed. Since this isn't exposed by API, I've hardcoded the value
846         into RenderThemeMac.
847
848         The actual state is exposed by adding a :active rule to html.css that
849         uses a new CSSValueKeyword: ActiveButtonText.
850
851         Unfortunately I can't find a way to test this, because the active state isn't
852         testable. We should really expose the Inspector's forcePseudoState function into
853         window.internals.
854
855         * css/CSSValueKeywords.in: Add "activebuttontext".
856         * css/html.css:
857         (input[type="button"]:active, input[type="submit"]:active, input[type="reset"]:active, input[type="file"]::-webkit-file-upload-button:active, button:active): New rule for active
858         button elements.
859         * rendering/RenderTheme.cpp:
860         (WebCore::RenderTheme::systemColor): Handle CSSValueActivebuttontext as black.
861         * rendering/RenderThemeMac.mm:
862         (WebCore::RenderThemeMac::systemColor): Handle CSSValueActivebuttontext as
863         white with 75% opacity.
864
865 2014-09-24  Christophe Dumez  <cdumez@apple.com>
866
867         Use is<SVG*Element>() instead of isSVG*Element()
868         https://bugs.webkit.org/show_bug.cgi?id=137058
869
870         Reviewed by Dirk Schulze.
871
872         Use is<SVG*Element>() instead of isSVG*Element() and drop support for
873         generated isSVG*Element().
874
875         No new tests, no behavior change.
876
877         * css/CSSCursorImageValue.cpp:
878         (WebCore::resourceReferencedByCursorElement):
879         * css/StyleResolver.cpp:
880         (WebCore::StyleResolver::useSVGZoomRulesForLength):
881         * dom/DocumentStyleSheetCollection.cpp:
882         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
883         * dom/ScriptElement.cpp:
884         (WebCore::toScriptElementIfPossible):
885         * dom/make_names.pl:
886         (printTypeHelpers):
887         * editing/gtk/EditorGtk.cpp:
888         (WebCore::elementURL):
889         * rendering/HitTestResult.cpp:
890         (WebCore::HitTestResult::absoluteImageURL):
891         (WebCore::HitTestResult::isLiveLink):
892         * rendering/svg/RenderSVGEllipse.cpp:
893         (WebCore::RenderSVGEllipse::calculateRadiiAndCenter):
894         * rendering/svg/RenderSVGTransformableContainer.cpp:
895         (WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
896         * rendering/svg/SVGPathData.cpp:
897         (WebCore::updatePathFromCircleElement):
898         * rendering/svg/SVGRenderTreeAsText.cpp:
899         (WebCore::operator<<):
900         * rendering/svg/SVGResources.cpp:
901         (WebCore::targetReferenceFromResource):
902         * svg/SVGAltGlyphDefElement.cpp:
903         (WebCore::SVGAltGlyphDefElement::hasValidGlyphElements):
904         * svg/SVGAltGlyphElement.cpp:
905         (WebCore::SVGAltGlyphElement::hasValidGlyphElements):
906         * svg/SVGAnimateMotionElement.cpp:
907         (WebCore::SVGAnimateMotionElement::hasValidAttributeType):
908         * svg/SVGDocument.cpp:
909         (WebCore::SVGDocument::rootElement):
910         * svg/SVGElement.cpp:
911         (WebCore::SVGElement::isOutermostSVGSVGElement):
912         (WebCore::SVGElement::ownerSVGElement):
913         (WebCore::SVGElement::viewportElement):
914         * svg/SVGFEComponentTransferElement.cpp:
915         (WebCore::SVGFEComponentTransferElement::build):
916         * svg/SVGFELightElement.cpp:
917         (WebCore::SVGFELightElement::findLightElement):
918         * svg/SVGFontData.cpp:
919         (WebCore::SVGFontData::applySVGGlyphSelection):
920         * svg/SVGFontElement.cpp:
921         (WebCore::SVGFontElement::ensureGlyphCache):
922         * svg/SVGFontFaceElement.cpp:
923         (WebCore::SVGFontFaceElement::associatedFontElement):
924         (WebCore::SVGFontFaceElement::rebuildFontFace):
925         * svg/SVGFontFaceSrcElement.cpp:
926         (WebCore::SVGFontFaceSrcElement::srcValue):
927         (WebCore::SVGFontFaceSrcElement::childrenChanged):
928         * svg/SVGGlyphElement.cpp:
929         (WebCore::SVGGlyphElement::invalidateGlyphCache):
930         * svg/SVGHKernElement.cpp:
931         (WebCore::SVGHKernElement::insertedInto):
932         (WebCore::SVGHKernElement::removedFrom):
933         * svg/SVGLengthContext.cpp:
934         (WebCore::SVGLengthContext::determineViewport):
935         * svg/SVGLocatable.cpp:
936         (WebCore::isViewportElement):
937         * svg/SVGMPathElement.cpp:
938         (WebCore::SVGMPathElement::pathElement):
939         (WebCore::SVGMPathElement::notifyParentOfPathChange):
940         * svg/SVGPathElement.cpp:
941         (WebCore::SVGPathElement::invalidateMPathDependencies):
942         * svg/SVGPatternElement.cpp:
943         (WebCore::SVGPatternElement::collectPatternAttributes):
944         * svg/SVGSVGElement.cpp:
945         (WebCore::SVGSVGElement::setupInitialView):
946         * svg/SVGUseElement.cpp:
947         (WebCore::dumpInstanceTree):
948         (WebCore::SVGUseElement::expandUseElementsInShadowTree):
949         * svg/SVGVKernElement.cpp:
950         (WebCore::SVGVKernElement::insertedInto):
951         (WebCore::SVGVKernElement::removedFrom):
952
953 2014-09-24  Benjamin Poulain  <bpoulain@apple.com>
954
955         Remove the style marking from :nth-child()
956         https://bugs.webkit.org/show_bug.cgi?id=137055
957
958         Reviewed by Andreas Kling.
959
960         Previously, :nth-child() had to mark the RenderStyle as unique in order
961         to prevent it from being used for style sharing.
962
963         After r173229, :nth-child() use the more generic element marking
964         "StyleIsAffectedByPreviousSibling".
965
966         In StyleResolver::canShareStyleWithElement(), StyleIsAffectedByPreviousSibling
967         is already used to prevent style sharing of those elements, making the "Unique"
968         flag redundant.
969
970         Since it is now useless, remove the style marking from SelectorChecker and the CSS JIT.
971
972         Tests: fast/css/nth-child-style-sharing-even.html
973                fast/css/nth-child-style-sharing-fixed-integer.html
974                fast/css/nth-child-style-sharing-odd.html
975
976         * css/SelectorChecker.cpp:
977         (WebCore::SelectorChecker::checkOne):
978         * cssjit/SelectorCompiler.cpp:
979         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
980         (WebCore::SelectorCompiler::setElementChildIndexAndUpdateStyle): Deleted.
981         * rendering/style/RenderStyle.h:
982
983 2014-09-23  Chris Dumez  <cdumez@apple.com>
984
985         Add support for is<HTML*Element>() for type checking
986         https://bugs.webkit.org/show_bug.cgi?id=137015
987
988         Reviewed by Benjamin Poulain.
989
990         Add support for is<HTML*Element>() for type checking while keeping
991         support for the legacy toHTML*Element() form until the code base is
992         ported.
993
994         toHTML*Element() helpers are now macros to the new is<HTML*Element>()
995         type checking helpers.
996
997         No new tests, no behavior change.
998
999         * dom/Document.cpp:
1000         (WebCore::Document::setTitle):
1001         * dom/Element.cpp:
1002         (WebCore::Element::childShouldCreateRenderer):
1003         * dom/Element.h:
1004         (WebCore::is):
1005         (WebCore::downcast):
1006         (WebCore::isElementOfType): Deleted.
1007         * dom/ElementAncestorIterator.h:
1008         (WebCore::lineageOfType):
1009         * dom/ElementIterator.h:
1010         (WebCore::findElementAncestorOfType):
1011         * dom/ElementTraversal.h:
1012         (WebCore::Traversal<ElementType>::firstChildTemplate):
1013         (WebCore::Traversal<ElementType>::lastChildTemplate):
1014         (WebCore::Traversal<ElementType>::firstWithinTemplate):
1015         (WebCore::Traversal<ElementType>::lastWithinTemplate):
1016         (WebCore::Traversal<ElementType>::nextTemplate):
1017         (WebCore::Traversal<ElementType>::previous):
1018         (WebCore::Traversal<ElementType>::nextSibling):
1019         (WebCore::Traversal<ElementType>::previousSibling):
1020         (WebCore::Traversal<ElementType>::nextSkippingChildren):
1021         * dom/TypedElementDescendantIterator.h:
1022         (WebCore::TypedElementDescendantIteratorAdapter<ElementType>::from):
1023         (WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::from):
1024         * dom/make_names.pl:
1025         (printTypeHelpers):
1026
1027 2014-09-23  Benjamin Poulain  <bpoulain@apple.com>
1028
1029         The style resolution cache applies properties incorrectly whenever direction != ltr
1030         https://bugs.webkit.org/show_bug.cgi?id=137052
1031
1032         Reviewed by Andreas Kling.
1033
1034         The optimization r135021 introduced a bug whenever the direction of subtree is not
1035         uniform in the whole page.
1036
1037         When StyleResolver::applyMatchedProperties() resolves the style, some properties are
1038         resolved differently based on the writing-mode and the direction.
1039
1040         In isCacheableInMatchedPropertiesCache(), the cases for writing-mode are already handled
1041         by not caching any style with anything else than the default.
1042         The direction was ignored, causing the bugs solved here.
1043
1044         Tests: css3/flexbox/flex-flow-2.html
1045                fast/css/style-resolver-cache-direction-1.html
1046                fast/css/style-resolver-cache-direction-2.html
1047                fast/css/style-resolver-cache-direction-3.html
1048
1049         * css/StyleResolver.cpp:
1050         (WebCore::isCacheableInMatchedPropertiesCache):
1051
1052 2014-09-23  Chris Dumez  <cdumez@apple.com>
1053
1054         Have CSS classes' methods return more references
1055         https://bugs.webkit.org/show_bug.cgi?id=137036
1056
1057         Reviewed by Ryosuke Niwa.
1058
1059         Have CSS classes' methods return more references instead of pointers
1060         when possible.
1061
1062         No new tests, no behavior change.
1063
1064         * css/CSSFontFaceRule.cpp:
1065         (WebCore::CSSFontFaceRule::style):
1066         * css/CSSFontFaceRule.h:
1067         * css/CSSGroupingRule.cpp:
1068         (WebCore::CSSGroupingRule::cssRules):
1069         * css/CSSGroupingRule.h:
1070         * css/CSSImportRule.cpp:
1071         (WebCore::CSSImportRule::media):
1072         * css/CSSImportRule.h:
1073         * css/CSSPageRule.cpp:
1074         (WebCore::CSSPageRule::style):
1075         * css/CSSPageRule.h:
1076         * css/CSSStyleRule.cpp:
1077         (WebCore::CSSStyleRule::style):
1078         * css/CSSStyleRule.h:
1079         * css/WebKitCSSKeyframeRule.cpp:
1080         (WebCore::WebKitCSSKeyframeRule::style):
1081         * css/WebKitCSSKeyframeRule.h:
1082         * css/WebKitCSSKeyframesRule.cpp:
1083         (WebCore::WebKitCSSKeyframesRule::cssRules):
1084         * css/WebKitCSSKeyframesRule.h:
1085         * css/WebKitCSSViewportRule.cpp:
1086         (WebCore::WebKitCSSViewportRule::style):
1087         * css/WebKitCSSViewportRule.h:
1088         * inspector/InspectorStyleSheet.cpp:
1089         (WebCore::asCSSRuleList):
1090         (WebCore::fillMediaListChain):
1091         (WebCore::InspectorStyleSheet::setRuleSelector):
1092         (WebCore::InspectorStyleSheet::deleteRule):
1093         (WebCore::InspectorStyleSheet::buildObjectForSelectorList):
1094         (WebCore::InspectorStyleSheet::buildObjectForRule):
1095         (WebCore::InspectorStyleSheet::styleForId):
1096         (WebCore::InspectorStyleSheet::ruleIndexByStyle):
1097         (WebCore::InspectorStyleSheet::ruleId):
1098         (WebCore::InspectorStyleSheet::revalidateStyle):
1099
1100 2014-09-23  Roger Fong  <roger_fong@apple.com>
1101
1102         [Windows] Enable CSS Supports Rule on Windows.
1103
1104         * css/CSSAllInOne.cpp:
1105
1106 2014-09-23  Christophe Dumez  <cdumez@apple.com>
1107
1108         Unreviewed build fix after r173893.
1109
1110         Partial revert of r173893 to fix debug builds.
1111
1112         * accessibility/AccessibilityNodeObject.cpp:
1113         (WebCore::AccessibilityNodeObject::text):
1114         * bindings/js/JSDOMWindowCustom.cpp:
1115         (WebCore::namedItemGetter):
1116         (WebCore::JSDOMWindow::getOwnPropertySlot):
1117         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
1118         * css/SelectorChecker.cpp:
1119         (WebCore::SelectorChecker::checkOne):
1120         * cssjit/SelectorCompiler.cpp:
1121         (WebCore::SelectorCompiler::makeContextStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
1122         (WebCore::SelectorCompiler::makeElementStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
1123         (WebCore::SelectorCompiler::isPlaceholderShown):
1124         * dom/Document.cpp:
1125         (WebCore::Document::processHttpEquiv):
1126         * dom/Element.cpp:
1127         (WebCore::Element::insertedInto):
1128         (WebCore::Element::removedFrom):
1129         (WebCore::Element::updateName):
1130         (WebCore::Element::updateId):
1131         * editing/Editor.cpp:
1132         (WebCore::Editor::selectionForCommand):
1133         (WebCore::findFirstMarkable):
1134         * editing/FrameSelection.cpp:
1135         (WebCore::FrameSelection::selectAll):
1136         * html/HTMLElement.cpp:
1137         (WebCore::HTMLElement::matchesReadWritePseudoClass):
1138         (WebCore::HTMLElement::directionality):
1139         * html/HTMLImageElement.cpp:
1140         (WebCore::HTMLImageElement::parseAttribute):
1141         * html/HTMLObjectElement.cpp:
1142         (WebCore::HTMLObjectElement::updateDocNamedItem):
1143         * html/HTMLPlugInImageElement.cpp:
1144         (WebCore::addPlugInsFromNodeListMatchingPlugInOrigin):
1145         * html/HTMLTextFormControlElement.cpp:
1146         (WebCore::enclosingTextFormControl):
1147         * page/FrameView.cpp:
1148         (WebCore::FrameView::addEmbeddedObjectToUpdate):
1149         (WebCore::FrameView::updateEmbeddedObject):
1150         * rendering/HitTestResult.cpp:
1151         (WebCore::HitTestResult::absolutePDFURL):
1152         * rendering/RenderEmbeddedObject.cpp:
1153         (WebCore::RenderEmbeddedObject::paintContents):
1154         (WebCore::RenderEmbeddedObject::layout):
1155         * rendering/RenderSnapshottedPlugIn.cpp:
1156         (WebCore::RenderSnapshottedPlugIn::plugInImageElement):
1157         * rendering/RenderTextControl.cpp:
1158         (WebCore::RenderTextControl::textFormControlElement):
1159         * rendering/RenderThemeMac.mm:
1160         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
1161         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
1162         * testing/Internals.cpp:
1163         (WebCore::Internals::visiblePlaceholder):
1164
1165 2014-09-22  Wenson Hsieh  <wenson_hsieh@apple.com>
1166
1167         Implement snapping behavior for Mac overflow scrolling
1168         https://bugs.webkit.org/show_bug.cgi?id=135774
1169
1170         Reviewed by Beth Dakin.
1171
1172         Hooks into AxisScrollSnapAnimator to implement overflow scroll snapping on Mac.
1173
1174         We need to find a way to test this!
1175
1176         * dom/Element.cpp:
1177         (WebCore::Element::dispatchWheelEvent):
1178         * page/EventHandler.cpp:
1179         (WebCore::handleWheelEventInAppropriateEnclosingBoxForSingleAxis):
1180         * platform/ScrollAnimator.cpp:
1181         (WebCore::ScrollAnimator::handleWheelEvent):
1182         (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers):
1183         (WebCore::ScrollAnimator::scrollOffsetInAxis):
1184         (WebCore::ScrollAnimator::immediateScrollInAxis):
1185         (WebCore::ScrollAnimator::startScrollSnapTimer):
1186         (WebCore::ScrollAnimator::stopScrollSnapTimer):
1187         (WebCore::ScrollAnimator::horizontalScrollSnapTimerFired):
1188         (WebCore::ScrollAnimator::verticalScrollSnapTimerFired):
1189         * platform/ScrollAnimator.h:
1190         * platform/mac/AxisScrollSnapAnimator.h:
1191         * platform/mac/AxisScrollSnapAnimator.mm:
1192         (WebCore::AxisScrollSnapAnimator::AxisScrollSnapAnimator):
1193         (WebCore::AxisScrollSnapAnimator::beginScrollSnapAnimation):
1194         (WebCore::AxisScrollSnapAnimator::endScrollSnapAnimation):
1195         (WebCore::AxisScrollSnapAnimator::initializeGlideParameters):
1196         * rendering/RenderLayer.cpp:
1197         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
1198
1199 2014-09-23  Chris Dumez  <cdumez@apple.com>
1200
1201         Use downcast<HTML*Element>() instead of toHTML*Element()
1202         https://bugs.webkit.org/show_bug.cgi?id=137007
1203
1204         Reviewed by Benjamin Poulain.
1205
1206         Use downcast<HTML*Element>() instead of toHTML*Element() and drop
1207         transition macros for toHTML*Element().
1208
1209         This patch also cleans up the surrounding code.
1210
1211         No new tests, no behavior change.
1212
1213         * accessibility/AXObjectCache.cpp:
1214         (WebCore::AXObjectCache::focusedUIElementForPage):
1215         (WebCore::AXObjectCache::labelChanged):
1216         * accessibility/AccessibilityListBox.cpp:
1217         (WebCore::AccessibilityListBox::canSetSelectedChildrenAttribute):
1218         (WebCore::AccessibilityListBox::addChildren):
1219         * accessibility/AccessibilityListBoxOption.cpp:
1220         (WebCore::AccessibilityListBoxOption::isSelected):
1221         (WebCore::AccessibilityListBoxOption::stringValue):
1222         (WebCore::AccessibilityListBoxOption::listBoxOptionParentNode):
1223         * accessibility/AccessibilityMediaControls.cpp:
1224         (WebCore::AccessibilityMediaTimeline::valueDescription):
1225         * accessibility/AccessibilityMenuListOption.cpp:
1226         (WebCore::AccessibilityMenuListOption::isEnabled):
1227         (WebCore::AccessibilityMenuListOption::isSelected):
1228         (WebCore::AccessibilityMenuListOption::setSelected):
1229         (WebCore::AccessibilityMenuListOption::stringValue):
1230         * accessibility/AccessibilityMenuListPopup.cpp:
1231         (WebCore::AccessibilityMenuListPopup::addChildren):
1232         * accessibility/AccessibilityNodeObject.cpp:
1233         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
1234         (WebCore::AccessibilityNodeObject::isNativeTextControl):
1235         (WebCore::AccessibilityNodeObject::isNativeImage):
1236         (WebCore::AccessibilityNodeObject::isInputImage):
1237         (WebCore::AccessibilityNodeObject::isMultiSelectable):
1238         (WebCore::AccessibilityNodeObject::isReadOnly):
1239         (WebCore::AccessibilityNodeObject::valueForRange):
1240         (WebCore::AccessibilityNodeObject::maxValueForRange):
1241         (WebCore::AccessibilityNodeObject::minValueForRange):
1242         (WebCore::isNodeActionElement):
1243         (WebCore::AccessibilityNodeObject::alternativeText):
1244         (WebCore::AccessibilityNodeObject::visibleText):
1245         (WebCore::AccessibilityNodeObject::title):
1246         (WebCore::AccessibilityNodeObject::text):
1247         (WebCore::AccessibilityNodeObject::stringValue):
1248         (WebCore::AccessibilityNodeObject::colorValue):
1249         (WebCore::accessibleNameForNode):
1250         * accessibility/AccessibilityRenderObject.cpp:
1251         (WebCore::AccessibilityRenderObject::isFileUploadButton):
1252         (WebCore::AccessibilityRenderObject::stringValue):
1253         (WebCore::AccessibilityRenderObject::labelElementContainer):
1254         (WebCore::AccessibilityRenderObject::internalLinkElement):
1255         (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
1256         (WebCore::AccessibilityRenderObject::url):
1257         (WebCore::AccessibilityRenderObject::setValue):
1258         (WebCore::AccessibilityRenderObject::getDocumentLinks):
1259         (WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest):
1260         (WebCore::AccessibilityRenderObject::accessibilityHitTest):
1261         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1262         (WebCore::AccessibilityRenderObject::addTextFieldChildren):
1263         (WebCore::AccessibilityRenderObject::stringValueForMSAA):
1264         (WebCore::AccessibilityRenderObject::isLinked):
1265         * accessibility/AccessibilitySlider.cpp:
1266         (WebCore::AccessibilitySlider::inputElement):
1267         (WebCore::AccessibilitySliderThumb::elementRect):
1268         * accessibility/AccessibilityTable.cpp:
1269         (WebCore::AccessibilityTable::tableElement):
1270         (WebCore::AccessibilityTable::title):
1271         * accessibility/atk/AXObjectCacheAtk.cpp:
1272         (WebCore::notifyChildrenSelectionChange):
1273         * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
1274         (optionFromSelection):
1275         (webkitAccessibleSelectionGetSelectionCount):
1276         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
1277         (webkitAccessibleTableGetCaption):
1278         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1279         (webkitAccessibleGetDescription):
1280         * accessibility/ios/AccessibilityObjectIOS.mm:
1281         (WebCore::AccessibilityObject::accessibilityPasswordFieldLength):
1282         * bindings/js/JSDOMWindowCustom.cpp:
1283         (WebCore::namedItemGetter):
1284         (WebCore::JSDOMWindow::getOwnPropertySlot):
1285         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
1286         * bindings/js/JSHTMLDocumentCustom.cpp:
1287         (WebCore::JSHTMLDocument::nameGetter):
1288         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
1289         (WebCore::JSHTMLFrameSetElement::nameGetter):
1290         * bindings/js/JSNodeCustom.cpp:
1291         (WebCore::isReachableFromDOM):
1292         * css/SelectorChecker.cpp:
1293         (WebCore::SelectorChecker::checkOne):
1294         * css/SelectorCheckerTestFunctions.h:
1295         (WebCore::isChecked):
1296         * css/StyleResolver.cpp:
1297         (WebCore::StyleResolver::adjustRenderStyle):
1298         * css/StyleSheetList.cpp:
1299         (WebCore::StyleSheetList::getNamedItem):
1300         * cssjit/SelectorCompiler.cpp:
1301         (WebCore::SelectorCompiler::makeContextStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
1302         (WebCore::SelectorCompiler::makeElementStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
1303         (WebCore::SelectorCompiler::isPlaceholderShown):
1304         * dom/CurrentScriptIncrementer.h:
1305         (WebCore::CurrentScriptIncrementer::CurrentScriptIncrementer):
1306         * dom/DataTransfer.cpp:
1307         (WebCore::DataTransfer::setDragImage):
1308         * dom/Document.cpp:
1309         (WebCore::Document::setTitle):
1310         (WebCore::Document::processHttpEquiv):
1311         (WebCore::Document::iconURLs):
1312         * dom/DocumentOrderedMap.cpp:
1313         (WebCore::keyMatchesMapName):
1314         (WebCore::keyMatchesLowercasedMapName):
1315         (WebCore::keyMatchesLowercasedUsemap):
1316         (WebCore::DocumentOrderedMap::getElementByMapName):
1317         (WebCore::DocumentOrderedMap::getElementByLowercasedMapName):
1318         (WebCore::DocumentOrderedMap::getElementByLowercasedUsemap):
1319         (WebCore::DocumentOrderedMap::getElementByLabelForAttribute):
1320         * dom/DocumentStyleSheetCollection.cpp:
1321         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
1322         * dom/Element.cpp:
1323         (WebCore::Element::insertedInto):
1324         (WebCore::Element::removedFrom):
1325         (WebCore::Element::updateName):
1326         (WebCore::Element::updateId):
1327         (WebCore::Element::updateLabel):
1328         (WebCore::Element::ensureCachedHTMLCollection):
1329         * dom/EventDispatcher.cpp:
1330         (WebCore::EventDispatcher::dispatchEvent):
1331         * dom/ScriptElement.cpp:
1332         (WebCore::toScriptElementIfPossible):
1333         * dom/VisitedLinkState.cpp:
1334         (WebCore::linkHashForElement):
1335         (WebCore::VisitedLinkState::determineLinkStateSlowCase):
1336         * dom/make_names.pl:
1337         (printTypeHelpers):
1338         * editing/Editor.cpp:
1339         (WebCore::Editor::selectionForCommand):
1340         (WebCore::imageElementFromImageDocument):
1341         (WebCore::findFirstMarkable):
1342         * editing/FrameSelection.cpp:
1343         (WebCore::FrameSelection::selectAll):
1344         (WebCore::scanForForm):
1345         * editing/MarkupAccumulator.cpp:
1346         (WebCore::MarkupAccumulator::serializeNodesWithNamespaces):
1347         * editing/ReplaceSelectionCommand.cpp:
1348         (WebCore::ReplaceSelectionCommand::shouldPerformSmartReplace):
1349         * editing/VisibleSelection.cpp:
1350         (WebCore::VisibleSelection::nonBoundaryShadowTreeRootNode):
1351         (WebCore::VisibleSelection::isInPasswordField):
1352         * editing/cocoa/HTMLConverter.mm:
1353         (HTMLConverter::_processElement):
1354         * editing/ios/EditorIOS.mm:
1355         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
1356         * editing/markup.cpp:
1357         (WebCore::isPlainTextMarkup):
1358         * html/ColorInputType.cpp:
1359         (WebCore::ColorInputType::suggestions):
1360         * html/FTPDirectoryDocument.cpp:
1361         (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
1362         (WebCore::FTPDirectoryDocumentParser::createBasicDocument):
1363         * html/FormAssociatedElement.cpp:
1364         (WebCore::FormAssociatedElement::findAssociatedForm):
1365         * html/HTMLAnchorElement.cpp:
1366         (WebCore::appendServerMapMousePosition):
1367         * html/HTMLAreaElement.cpp:
1368         (WebCore::HTMLAreaElement::imageElement):
1369         * html/HTMLCollection.cpp:
1370         (WebCore::isMatchingElement):
1371         * html/HTMLElement.cpp:
1372         (WebCore::HTMLElement::matchesReadWritePseudoClass):
1373         (WebCore::HTMLElement::setInnerHTML):
1374         (WebCore::HTMLElement::directionality):
1375         * html/HTMLEmbedElement.cpp:
1376         (WebCore::HTMLEmbedElement::rendererIsNeeded):
1377         * html/HTMLFieldSetElement.cpp:
1378         (WebCore::HTMLFieldSetElement::refreshElementsIfNeeded):
1379         * html/HTMLFormControlElement.cpp:
1380         (WebCore::HTMLFormControlElement::computeIsDisabledByFieldsetAncestor):
1381         (WebCore::shouldAutofocus):
1382         * html/HTMLFormControlsCollection.cpp:
1383         (WebCore::HTMLFormControlsCollection::formControlElements):
1384         (WebCore::HTMLFormControlsCollection::formImageElements):
1385         * html/HTMLFormElement.cpp:
1386         (WebCore::HTMLFormElement::getTextFieldValues):
1387         (WebCore::HTMLFormElement::assertItemCanBeInPastNamesMap):
1388         * html/HTMLImageElement.cpp:
1389         (WebCore::HTMLImageElement::parseAttribute):
1390         * html/HTMLImageLoader.cpp:
1391         (WebCore::HTMLImageLoader::notifyFinished):
1392         * html/HTMLInputElement.cpp:
1393         (WebCore::HTMLInputElement::dataList):
1394         (WebCore::HTMLInputElement::setupDateTimeChooserParameters):
1395         * html/HTMLKeygenElement.cpp:
1396         (WebCore::HTMLKeygenElement::shadowSelect):
1397         * html/HTMLLegendElement.cpp:
1398         (WebCore::HTMLLegendElement::virtualForm):
1399         * html/HTMLMediaElement.cpp:
1400         (WebCore::HTMLMediaElement::parseAttribute):
1401         * html/HTMLNameCollection.cpp:
1402         (WebCore::DocumentNameCollection::elementMatchesIfIdAttributeMatch):
1403         (WebCore::DocumentNameCollection::elementMatchesIfNameAttributeMatch):
1404         (WebCore::DocumentNameCollection::elementMatches):
1405         * html/HTMLObjectElement.cpp:
1406         (WebCore::HTMLObjectElement::updateDocNamedItem):
1407         (WebCore::HTMLObjectElement::containsJavaApplet):
1408         * html/HTMLOptGroupElement.cpp:
1409         (WebCore::HTMLOptGroupElement::recalcSelectOptions):
1410         (WebCore::HTMLOptGroupElement::ownerSelectElement):
1411         * html/HTMLOptionElement.cpp:
1412         (WebCore::HTMLOptionElement::ownerDataListElement):
1413         (WebCore::HTMLOptionElement::ownerSelectElement):
1414         * html/HTMLOptionsCollection.cpp:
1415         (WebCore::HTMLOptionsCollection::add):
1416         * html/HTMLOptionsCollection.h:
1417         * html/HTMLPlugInImageElement.cpp:
1418         (WebCore::addPlugInsFromNodeListMatchingPlugInOrigin):
1419         * html/HTMLSelectElement.cpp:
1420         (WebCore::HTMLSelectElement::hasPlaceholderLabelOption):
1421         (WebCore::HTMLSelectElement::value):
1422         (WebCore::HTMLSelectElement::setValue):
1423         (WebCore::HTMLSelectElement::saveLastSelection):
1424         (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
1425         (WebCore::HTMLSelectElement::updateListBoxSelection):
1426         (WebCore::HTMLSelectElement::listBoxOnChange):
1427         (WebCore::HTMLSelectElement::recalcListItems):
1428         (WebCore::HTMLSelectElement::selectedIndex):
1429         (WebCore::HTMLSelectElement::selectOption):
1430         (WebCore::HTMLSelectElement::deselectItemsWithoutValidation):
1431         (WebCore::HTMLSelectElement::saveFormControlState):
1432         (WebCore::HTMLSelectElement::searchOptionsForValue):
1433         (WebCore::HTMLSelectElement::restoreFormControlState):
1434         (WebCore::HTMLSelectElement::appendFormData):
1435         (WebCore::HTMLSelectElement::reset):
1436         (WebCore::HTMLSelectElement::updateSelectedState):
1437         (WebCore::HTMLSelectElement::lastSelectedListIndex):
1438         (WebCore::HTMLSelectElement::optionAtIndex):
1439         (WebCore::HTMLSelectElement::accessKeySetSelectedIndex):
1440         * html/HTMLSummaryElement.cpp:
1441         (WebCore::HTMLSummaryElement::detailsElement):
1442         * html/HTMLTableElement.cpp:
1443         (WebCore::HTMLTableElement::caption):
1444         * html/HTMLTablePartElement.cpp:
1445         (WebCore::HTMLTablePartElement::findParentTable):
1446         * html/HTMLTableRowElement.cpp:
1447         (WebCore::HTMLTableRowElement::rowIndex):
1448         * html/HTMLTableRowsCollection.cpp:
1449         (WebCore::HTMLTableRowsCollection::rowAfter):
1450         (WebCore::HTMLTableRowsCollection::lastRow):
1451         (WebCore::HTMLTableRowsCollection::customElementAfter):
1452         * html/HTMLTableRowsCollection.h:
1453         * html/HTMLTemplateElement.cpp:
1454         (WebCore::HTMLTemplateElement::cloneNode):
1455         * html/HTMLTextFormControlElement.cpp:
1456         (WebCore::enclosingTextFormControl):
1457         * html/ImageDocument.cpp:
1458         (WebCore::ImageDocument::createDocumentStructure):
1459         * html/LabelsNodeList.cpp:
1460         (WebCore::LabelsNodeList::elementMatches):
1461         * html/MediaDocument.cpp:
1462         (WebCore::MediaDocumentParser::createDocumentStructure):
1463         (WebCore::descendentVideoElement):
1464         (WebCore::ancestorVideoElement):
1465         (WebCore::MediaDocument::replaceMediaElementTimerFired):
1466         * html/PluginDocument.cpp:
1467         (WebCore::PluginDocumentParser::createDocumentStructure):
1468         * html/RadioInputType.cpp:
1469         (WebCore::RadioInputType::handleKeydownEvent):
1470         (WebCore::RadioInputType::isKeyboardFocusable):
1471         * html/RadioNodeList.cpp:
1472         (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
1473         * html/RangeInputType.cpp:
1474         (WebCore::RangeInputType::updateTickMarkValues):
1475         * html/parser/HTMLConstructionSite.cpp:
1476         (WebCore::insert):
1477         (WebCore::HTMLConstructionSite::insertTextNode):
1478         (WebCore::HTMLConstructionSite::ownerDocumentForCurrentNode):
1479         * html/parser/HTMLTreeBuilder.cpp:
1480         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
1481         * html/shadow/DetailsMarkerControl.cpp:
1482         (WebCore::DetailsMarkerControl::rendererIsNeeded):
1483         * html/shadow/MediaControlElements.cpp:
1484         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
1485         * html/shadow/MeterShadowElement.cpp:
1486         (WebCore::MeterShadowElement::meterElement):
1487         * html/shadow/ProgressShadowElement.cpp:
1488         (WebCore::ProgressShadowElement::progressElement):
1489         * html/shadow/TextControlInnerElements.cpp:
1490         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
1491         (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
1492         (WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents):
1493         * inspector/InspectorCSSAgent.cpp:
1494         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
1495         * inspector/InspectorDOMAgent.cpp:
1496         (WebCore::InspectorDOMAgent::buildObjectForNode):
1497         * loader/FormSubmission.cpp:
1498         (WebCore::FormSubmission::create):
1499         * loader/FrameLoader.cpp:
1500         (WebCore::FrameLoader::handleFallbackContent):
1501         * loader/ImageLoader.cpp:
1502         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
1503         * loader/SubframeLoader.cpp:
1504         (WebCore::SubframeLoader::requestObject):
1505         * page/Chrome.cpp:
1506         (WebCore::Chrome::setToolTip):
1507         * page/DragController.cpp:
1508         (WebCore::DragController::draggableElement):
1509         * page/EventHandler.cpp:
1510         (WebCore::isSubmitImage):
1511         * page/FocusController.cpp:
1512         (WebCore::FocusController::advanceFocusDirectionally):
1513         * page/FrameView.cpp:
1514         (WebCore::FrameView::addEmbeddedObjectToUpdate):
1515         (WebCore::FrameView::updateEmbeddedObject):
1516         * page/PageSerializer.cpp:
1517         (WebCore::PageSerializer::serializeFrame):
1518         * page/SpatialNavigation.cpp:
1519         (WebCore::FocusCandidate::FocusCandidate):
1520         * page/ios/FrameIOS.mm:
1521         (WebCore::ancestorRespondingToClickEvents):
1522         * rendering/HitTestResult.cpp:
1523         (WebCore::HitTestResult::altDisplayString):
1524         (WebCore::HitTestResult::absolutePDFURL):
1525         (WebCore::HitTestResult::enterFullscreenForVideo):
1526         (WebCore::HitTestResult::mediaControlsEnabled):
1527         (WebCore::HitTestResult::isLiveLink):
1528         (WebCore::HitTestResult::isContentEditable):
1529         * rendering/RenderButton.cpp:
1530         (WebCore::RenderButton::updateFromElement):
1531         * rendering/RenderCounter.cpp:
1532         (WebCore::planCounter):
1533         * rendering/RenderEmbeddedObject.cpp:
1534         (WebCore::RenderEmbeddedObject::paintContents):
1535         (WebCore::RenderEmbeddedObject::layout):
1536         * rendering/RenderFieldset.h:
1537         * rendering/RenderFileUploadControl.cpp:
1538         (WebCore::RenderFileUploadControl::inputElement):
1539         (WebCore::RenderFileUploadControl::uploadButton):
1540         * rendering/RenderFrame.cpp:
1541         (WebCore::RenderFrame::frameElement):
1542         * rendering/RenderFrameSet.cpp:
1543         (WebCore::RenderFrameSet::frameSetElement):
1544         * rendering/RenderHTMLCanvas.cpp:
1545         (WebCore::RenderHTMLCanvas::canvasElement):
1546         * rendering/RenderIFrame.cpp:
1547         (WebCore::RenderIFrame::iframeElement):
1548         * rendering/RenderImage.cpp:
1549         (WebCore::RenderImage::RenderImage):
1550         (WebCore::RenderImage::paintAreaElementFocusRing):
1551         (WebCore::RenderImage::paintIntoRect):
1552         (WebCore::RenderImage::imageMap):
1553         (WebCore::RenderImage::updateAltText):
1554         * rendering/RenderLayerBacking.cpp:
1555         (WebCore::canvasCompositingStrategy):
1556         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
1557         (WebCore::RenderLayerBacking::updateConfiguration):
1558         * rendering/RenderLayerCompositor.cpp:
1559         (WebCore::RenderLayerCompositor::requiresCompositingForCanvas):
1560         * rendering/RenderListBox.cpp:
1561         (WebCore::RenderListBox::selectElement):
1562         (WebCore::RenderListBox::updateFromElement):
1563         (WebCore::RenderListBox::paintItemForeground):
1564         (WebCore::RenderListBox::paintItemBackground):
1565         * rendering/RenderListItem.cpp:
1566         (WebCore::RenderListItem::calcValue):
1567         (WebCore::RenderListItem::updateListMarkerNumbers):
1568         * rendering/RenderMarquee.cpp:
1569         (WebCore::RenderMarquee::marqueeSpeed):
1570         * rendering/RenderMenuList.cpp:
1571         (WebCore::selectedOptionCount):
1572         (RenderMenuList::selectElement):
1573         (RenderMenuList::updateOptionsWidth):
1574         (RenderMenuList::setTextFromOption):
1575         (RenderMenuList::itemText):
1576         (RenderMenuList::itemIsSelected):
1577         * rendering/RenderMeter.cpp:
1578         (WebCore::RenderMeter::meterElement):
1579         * rendering/RenderProgress.cpp:
1580         (WebCore::RenderProgress::progressElement):
1581         * rendering/RenderSlider.cpp:
1582         (WebCore::RenderSlider::element):
1583         * rendering/RenderSnapshottedPlugIn.cpp:
1584         (WebCore::RenderSnapshottedPlugIn::plugInImageElement):
1585         * rendering/RenderTextControl.cpp:
1586         (WebCore::RenderTextControl::textFormControlElement):
1587         * rendering/RenderTextControlMultiLine.cpp:
1588         (WebCore::RenderTextControlMultiLine::textAreaElement):
1589         * rendering/RenderTextControlSingleLine.cpp:
1590         (WebCore::RenderTextControlSingleLine::inputElement):
1591         * rendering/RenderTheme.cpp:
1592         (WebCore::RenderTheme::paintSliderTicks):
1593         * rendering/RenderThemeIOS.mm:
1594         (WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
1595         * rendering/RenderThemeMac.mm:
1596         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
1597         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
1598         * rendering/RenderVideo.cpp:
1599         (WebCore::RenderVideo::videoElement):
1600         * svg/graphics/SVGImageCache.cpp:
1601         (WebCore::SVGImageCache::imageForRenderer):
1602         * svg/svgtags.in:
1603         Generate helpers to SVGAElement so that isSVGAElement() can be used
1604         instead of hasTagName(SVGNames::aTag). I did such update in this
1605         patch.
1606
1607         * testing/Internals.cpp:
1608         (WebCore::Internals::visiblePlaceholder):
1609         (WebCore::Internals::wasLastChangeUserEdit):
1610         (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
1611         (WebCore::Internals::isSelectPopupVisible):
1612         * xml/parser/XMLDocumentParserLibxml2.cpp:
1613         (WebCore::XMLDocumentParser::startElementNs):
1614
1615 2014-09-23  Chris Dumez  <cdumez@apple.com>
1616
1617         Have DataTransfer::files() return a reference
1618         https://bugs.webkit.org/show_bug.cgi?id=137039
1619
1620         Reviewed by Ryosuke Niwa.
1621
1622         Have DataTransfer::files() return a reference instead of a pointer as
1623         it can never return null.
1624
1625         No new tests, no behavior change.
1626
1627         * dom/DataTransfer.cpp:
1628         (WebCore::DataTransfer::files):
1629         * dom/DataTransfer.h:
1630
1631 2014-09-23  Chris Dumez  <cdumez@apple.com>
1632
1633         Have NamedNodeMap::element() and DOMStringMap::element() return a reference
1634         https://bugs.webkit.org/show_bug.cgi?id=137040
1635
1636         Reviewed by Ryosuke Niwa.
1637
1638         Have NamedNodeMap::element() and DOMStringMap::element() return a
1639         reference instead of a pointer as they can never return null.
1640
1641         No new tests, no behavior change.
1642
1643         * dom/DatasetDOMStringMap.h:
1644         * dom/NamedNodeMap.h:
1645         (WebCore::NamedNodeMap::element):
1646
1647 2014-09-23  Chris Dumez  <cdumez@apple.com>
1648
1649         Have DOMImplementation::document() and Element::attributes() return references
1650         https://bugs.webkit.org/show_bug.cgi?id=137035
1651
1652         Reviewed by Andreas Kling.
1653
1654         Have DOMImplementation::document() and Element::attributes() return
1655         references instead of pointers as they can never return null.
1656
1657         No new tests, no behavior change.
1658
1659         * bindings/scripts/CodeGeneratorJS.pm:
1660         (GenerateImplementation):
1661         Update the JS Bindings code generator to use WTF::getPtr() in a couple
1662         more places so that the implementation can return references instead
1663         of pointers even when [GenerateIsReachable=xxx] IDL extended attribute
1664         is used.
1665
1666         * dom/DOMImplementation.h:
1667         (WebCore::DOMImplementation::document):
1668         * dom/Element.cpp:
1669         (WebCore::Element::attributes):
1670         * dom/Element.h:
1671         (WebCore::Node::attributes):
1672
1673 2014-09-23  Chris Dumez  <cdumez@apple.com>
1674
1675         Have Document::ensureTemplateDocument() return a reference
1676         https://bugs.webkit.org/show_bug.cgi?id=137033
1677
1678         Reviewed by Ryosuke Niwa.
1679
1680         Have Document::ensureTemplateDocument() return a reference instead of
1681         a pointer as it can never return null.
1682
1683         No new tests, no behavior change.
1684
1685         * dom/Document.cpp:
1686         (WebCore::Document::ensureTemplateDocument):
1687         * dom/Document.h:
1688         * editing/markup.cpp:
1689         (WebCore::createFragmentForInnerOuterHTML):
1690         * html/HTMLTemplateElement.cpp:
1691         (WebCore::HTMLTemplateElement::content):
1692         (WebCore::HTMLTemplateElement::didMoveToNewDocument):
1693
1694 2014-09-23  Chris Dumez  <cdumez@apple.com>
1695
1696         Have Document::accessSVGExtensions() return a reference
1697         https://bugs.webkit.org/show_bug.cgi?id=137030
1698
1699         Reviewed by Ryosuke Niwa.
1700
1701         Have Document::accessSVGExtensions() return a reference instead of a
1702         pointer as it can never return null.
1703
1704         No new tests, no behavior change.
1705
1706         * dom/ContainerNode.cpp:
1707         (WebCore::ContainerNode::removeChild):
1708         (WebCore::ContainerNode::removeChildren):
1709         * dom/Document.cpp:
1710         (WebCore::Document::commonTeardown):
1711         (WebCore::Document::implicitClose):
1712         (WebCore::Document::accessSVGExtensions):
1713         * dom/Document.h:
1714         * dom/Element.cpp:
1715         (WebCore::Element::~Element):
1716         (WebCore::Element::removedFrom):
1717         * editing/markup.cpp:
1718         (WebCore::isPlainTextMarkup):
1719         * history/CachedFrame.cpp:
1720         (WebCore::CachedFrameBase::restore):
1721         * rendering/FilterEffectRenderer.cpp:
1722         (WebCore::FilterEffectRenderer::buildReferenceFilter):
1723         * rendering/svg/RenderSVGResource.cpp:
1724         (WebCore::removeFromCacheAndInvalidateDependencies):
1725         * rendering/svg/RenderSVGResourceContainer.cpp:
1726         (WebCore::svgExtensionsFromElement):
1727         * rendering/svg/RenderSVGResourceContainer.h:
1728         (WebCore::getRenderSVGResourceContainerById):
1729         (WebCore::getRenderSVGResourceById):
1730         * rendering/svg/SVGResources.cpp:
1731         (WebCore::registerPendingResource):
1732         (WebCore::SVGResources::buildCachedResources):
1733         * rendering/svg/SVGResourcesCache.cpp:
1734         (WebCore::resourcesCacheFromRenderer):
1735         (WebCore::SVGResourcesCache::resourceDestroyed):
1736         * svg/SVGElement.cpp:
1737         (WebCore::SVGElement::~SVGElement):
1738         (WebCore::SVGElement::reportAttributeParsingError):
1739         (WebCore::SVGElement::removedFrom):
1740         (WebCore::SVGElement::viewportElement):
1741         (WebCore::SVGElement::attributeChanged):
1742         (WebCore::SVGElement::buildPendingResourcesIfNeeded):
1743         (WebCore::SVGElement::accessDocumentSVGExtensions): Deleted.
1744         * svg/SVGElement.h:
1745         * svg/SVGFEConvolveMatrixElement.cpp:
1746         (WebCore::SVGFEConvolveMatrixElement::parseAttribute):
1747         * svg/SVGFEGaussianBlurElement.cpp:
1748         (WebCore::SVGFEGaussianBlurElement::parseAttribute):
1749         * svg/SVGFEImageElement.cpp:
1750         (WebCore::SVGFEImageElement::clearResourceReferences):
1751         (WebCore::SVGFEImageElement::buildPendingResource):
1752         * svg/SVGFitToViewBox.cpp:
1753         (WebCore::SVGFitToViewBox::parseViewBox):
1754         * svg/SVGFontFaceElement.cpp:
1755         (WebCore::SVGFontFaceElement::insertedInto):
1756         (WebCore::SVGFontFaceElement::removedFrom):
1757         * svg/SVGMPathElement.cpp:
1758         (WebCore::SVGMPathElement::buildPendingResource):
1759         (WebCore::SVGMPathElement::clearResourceReferences):
1760         * svg/SVGPathElement.cpp:
1761         (WebCore::SVGPathElement::parseAttribute):
1762         (WebCore::SVGPathElement::invalidateMPathDependencies):
1763         * svg/SVGPolyElement.cpp:
1764         (WebCore::SVGPolyElement::parseAttribute):
1765         * svg/SVGSVGElement.cpp:
1766         (WebCore::SVGSVGElement::~SVGSVGElement):
1767         (WebCore::SVGSVGElement::insertedInto):
1768         (WebCore::SVGSVGElement::removedFrom):
1769         * svg/SVGTRefElement.cpp:
1770         (WebCore::SVGTRefElement::detachTarget):
1771         (WebCore::SVGTRefElement::buildPendingResource):
1772         * svg/SVGTextPathElement.cpp:
1773         (WebCore::SVGTextPathElement::clearResourceReferences):
1774         (WebCore::SVGTextPathElement::buildPendingResource):
1775         * svg/SVGUseElement.cpp:
1776         (WebCore::SVGUseElement::clearResourceReferences):
1777         (WebCore::SVGUseElement::buildPendingResource):
1778         (WebCore::SVGUseElement::toClipPath):
1779         (WebCore::SVGUseElement::buildInstanceTree):
1780         * svg/animation/SVGSMILElement.cpp:
1781         (WebCore::SVGSMILElement::clearResourceReferences):
1782         (WebCore::SVGSMILElement::buildPendingResource):
1783
1784 2014-09-23  Joseph Pecoraro  <pecoraro@apple.com>
1785
1786         Web Inspector: Should be able to attach a debugger to a JSContext before anything is executed
1787         https://bugs.webkit.org/show_bug.cgi?id=136893
1788
1789         Reviewed by Timothy Hatcher.
1790
1791         Automatic inspection is currently disabled for web pages.
1792         This just updates the interfaces that changed.
1793
1794         * WebCore.exp.in:
1795         * inspector/InspectorController.cpp:
1796         (WebCore::InspectorController::connectFrontend):
1797         (WebCore::InspectorController::show):
1798         * inspector/InspectorController.h:
1799         * page/PageDebuggable.cpp:
1800         (WebCore::PageDebuggable::connect):
1801         * page/PageDebuggable.h:
1802         * testing/Internals.cpp:
1803         (WebCore::Internals::openDummyInspectorFrontend):
1804
1805 2014-09-23  Eduardo Lima Mitev  <elima@igalia.com>
1806
1807         [GTK] Adds implementation of subtle crypto HMAC algorithm
1808         https://bugs.webkit.org/show_bug.cgi?id=133320
1809
1810         Reviewed by Philippe Normand.
1811
1812         Tests are already in place under crypto/subtle/hmac-*.html
1813
1814         * crypto/gtk/CryptoAlgorithmHMACGtk.cpp:
1815         (WebCore::getGnutlsDigestAlgorithm):
1816         (WebCore::calculateSignature):
1817         (WebCore::CryptoAlgorithmHMAC::platformSign):
1818         (WebCore::CryptoAlgorithmHMAC::platformVerify):
1819
1820 2014-09-23  Eduardo Lima Mitev  <elima@igalia.com>
1821
1822         [GTK] Adds implementation of Subtle Crypto digest algorithms
1823         https://bugs.webkit.org/show_bug.cgi?id=133319
1824
1825         Reviewed by Philippe Normand.
1826
1827         Tests are already in place under crypto/subtle/sha-*.html
1828
1829         * crypto/gtk/CryptoDigestGtk.cpp:
1830         (WebCore::CryptoDigest::CryptoDigest):
1831         (WebCore::CryptoDigest::~CryptoDigest):
1832         (WebCore::CryptoDigest::create):
1833         (WebCore::CryptoDigest::addBytes):
1834         (WebCore::CryptoDigest::computeHash):
1835
1836 2014-09-15  Sergio Villar Senin  <svillar@igalia.com>
1837
1838         [CSS Grid Layout] Do not grow tracks when the growth factor is 0
1839         https://bugs.webkit.org/show_bug.cgi?id=136575
1840
1841         Reviewed by Darin Adler.
1842
1843         A couple of performance optimizations for the track sizing
1844         algorithm. On the one hand we avoid the computation of the
1845         available logical space share if the track has no growth potential
1846         (the current breadth is the maximum breadth) and on the other
1847         hand, we avoid calling RenderGrid::distributeSpaceToTracks() if
1848         the available logical space is not greater than 0.
1849
1850         The combined effect of these two changes is an impressive +16%
1851         improvement in auto-grid-lots-of-data.html performance test.
1852
1853         No new tests as there is no change in the functionality.
1854
1855         * rendering/RenderGrid.cpp:
1856         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
1857         (WebCore::RenderGrid::distributeSpaceToTracks):
1858
1859 2014-09-23  Ion Rosca  <rosca@adobe.com>
1860
1861         [CSS Blending] The composited layers isolated by the page group should blend with the default white background color.
1862         https://bugs.webkit.org/show_bug.cgi?id=136563
1863
1864         Reviewed by Simon Fraser.
1865
1866         If a blending layer is not isolated, then it should blend with a white backdrop:
1867         http://dev.w3.org/fxtf/compositing-1/#pagebackdrop
1868
1869         Tests: css3/blending/blend-mode-body-composited-child-background-color.html
1870                css3/blending/blend-mode-body-composited-child.html
1871
1872         * rendering/RenderLayerBacking.cpp:
1873         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
1874         If the isolating composited layer is the root renderer, then it should have a backing store
1875         into which the initial white backdrop will be painted.
1876
1877 2014-09-22  Christophe Dumez  <cdumez@apple.com>
1878
1879         Unreviewed build fix after r173859.
1880
1881         Partial revert to fix debug build after r173859.
1882
1883         * accessibility/AccessibilityRenderObject.cpp:
1884         (WebCore::AccessibilityRenderObject::remoteSVGRootElement):
1885         * html/HTMLFrameOwnerElement.cpp:
1886         (WebCore::HTMLFrameOwnerElement::getSVGDocument):
1887         * page/EventHandler.cpp:
1888         (WebCore::EventHandler::handleMousePressEvent):
1889         (WebCore::EventHandler::handleMouseMoveEvent):
1890         (WebCore::EventHandler::handleMouseReleaseEvent):
1891         * page/Frame.cpp:
1892         (WebCore::Frame::setPageAndTextZoomFactors):
1893         * page/FrameView.cpp:
1894         (WebCore::FrameView::scrollToAnchor):
1895         * rendering/svg/RenderSVGBlock.h:
1896         (WebCore::RenderSVGBlock::graphicsElement):
1897         * rendering/svg/RenderSVGGradientStop.cpp:
1898         (WebCore::RenderSVGGradientStop::gradientElement):
1899         * rendering/svg/RenderSVGInline.h:
1900         (WebCore::RenderSVGInline::graphicsElement):
1901         * rendering/svg/RenderSVGResourceClipper.cpp:
1902         (WebCore::RenderSVGResourceClipper::pathOnlyClipping):
1903         * rendering/svg/RenderSVGResourceContainer.cpp:
1904         (WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke):
1905         * rendering/svg/RenderSVGShape.h:
1906         (WebCore::RenderSVGShape::graphicsElement):
1907         * rendering/svg/RenderSVGTransformableContainer.h:
1908         * rendering/svg/SVGRenderSupport.cpp:
1909         (WebCore::SVGRenderSupport::updateMaskedAncestorShouldIsolateBlending):
1910         * rendering/svg/SVGRenderTreeAsText.cpp:
1911         (WebCore::operator<<):
1912         * rendering/svg/SVGRenderingContext.cpp:
1913         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
1914         * rendering/svg/SVGResources.cpp:
1915         (WebCore::targetReferenceFromResource):
1916         * svg/SVGAElement.cpp:
1917         (WebCore::SVGAElement::defaultEventHandler):
1918         * svg/SVGAnimateElement.cpp:
1919         (WebCore::SVGAnimateElement::calculateAnimatedValue):
1920         * svg/SVGAnimationElement.cpp:
1921         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
1922         * svg/SVGElement.cpp:
1923         (WebCore::SVGElement::getBoundingBox):
1924         * svg/SVGLinearGradientElement.cpp:
1925         (WebCore::SVGLinearGradientElement::collectGradientAttributes):
1926         * svg/SVGLocatable.cpp:
1927         (WebCore::SVGLocatable::getTransformToElement):
1928         * svg/SVGPolyElement.cpp:
1929         (WebCore::SVGPolyElement::synchronizePoints):
1930         (WebCore::SVGPolyElement::lookupOrCreatePointsWrapper):
1931         * svg/SVGRadialGradientElement.cpp:
1932         (WebCore::SVGRadialGradientElement::collectGradientAttributes):
1933         * svg/SVGTextContentElement.cpp:
1934         (WebCore::SVGTextContentElement::synchronizeTextLength):
1935         (WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper):
1936         (WebCore::SVGTextContentElement::elementFromRenderer):
1937         * svg/SVGUseElement.cpp:
1938         (WebCore::SVGUseElement::toClipPath):
1939         * svg/animation/SVGSMILElement.cpp:
1940         (WebCore::SVGSMILElement::connectConditions):
1941         (WebCore::SVGSMILElement::disconnectConditions):
1942         * svg/graphics/SVGImage.cpp:
1943         (WebCore::SVGImage::hasSingleSecurityOrigin):
1944         (WebCore::SVGImage::setContainerSize):
1945         (WebCore::SVGImage::containerSize):
1946         (WebCore::SVGImage::embeddedContentBox):
1947         (WebCore::SVGImage::hasRelativeWidth):
1948         (WebCore::SVGImage::hasRelativeHeight):
1949         (WebCore::SVGImage::computeIntrinsicDimensions):
1950         (WebCore::SVGImage::startAnimation):
1951         (WebCore::SVGImage::stopAnimation):
1952
1953 2014-09-22  Simon Fraser  <simon.fraser@apple.com>
1954
1955         Ensure that layout is up-to-date before hit-testing via RenderView
1956         https://bugs.webkit.org/show_bug.cgi?id=136651
1957
1958         Reviewed by David Hyatt.
1959
1960         Ensure that layout is up-to-date before we do hit-testing via the RenderView.
1961         Previously, RenderLayer::hitTest() called updateLayout(), but it's better
1962         to push that responsibility onto RenderView before entering the RenderLayer
1963         tree.
1964         
1965         Make callers a little more consistent in getting the RenderView via
1966         Frame::contentRenderer(), though perhaps we should remove that and just
1967         call Document::renderView() everywhere.
1968
1969         * accessibility/AccessibilityObject.cpp:
1970         (WebCore::AccessibilityObject::press): Hit test via the RenderView, rather
1971         than doing so on the RenderView's layer, to ensure that we updateLayout().
1972         * accessibility/AccessibilityRenderObject.cpp:
1973         (WebCore::AccessibilityRenderObject::accessibilityHitTest): This code calls
1974         hitTest() on arbitrary layers, so needs to explicitly update layout.
1975         * editing/FrameSelection.cpp:
1976         (WebCore::FrameSelection::contains):
1977         * page/EventHandler.cpp:
1978         (WebCore::EventHandler::eventMayStartDrag):
1979         (WebCore::EventHandler::updateSelectionForMouseDrag):
1980         (WebCore::EventHandler::hitTestResultAtPoint): The explicit updateLayout() is
1981         no longer needed.
1982         (WebCore::EventHandler::updateCursor):
1983         (WebCore::EventHandler::handleWheelEvent):
1984         (WebCore::EventHandler::hoverTimerFired):
1985         (WebCore::hitTestResultInFrame):
1986         * page/Frame.cpp:
1987         (WebCore::Frame::contentRenderer):
1988         * rendering/RenderLayer.cpp:
1989         (WebCore::RenderLayer::hitTest):
1990         * rendering/RenderView.cpp:
1991         (WebCore::RenderView::hitTest): Here's where we ensure that layout is up-to-date.
1992
1993 2014-09-22  Christophe Dumez  <cdumez@apple.com>
1994
1995         Use downcast<SVG*Element>() instead of toSVG*Element()
1996         https://bugs.webkit.org/show_bug.cgi?id=137004
1997
1998         Reviewed by Benjamin Poulain.
1999
2000         Use downcast<SVG*Element>() instead of toSVG*Element() for casting SVG
2001         Elements and get rid of the transition toSVG*Element() macros.
2002
2003         Also use downcast<MathML*Element>() instead of toMathML*Element() for
2004         casting MathML Elements.
2005
2006         The HTML Elements casting counterparts will be taken care of in a
2007         separate patch.
2008
2009         No new tests, no behavior change.
2010
2011         * accessibility/AccessibilityNodeObject.cpp:
2012         (WebCore::AccessibilityNodeObject::alternativeText):
2013         (WebCore::AccessibilityNodeObject::accessibilityDescription):
2014         * accessibility/AccessibilityRenderObject.cpp:
2015         (WebCore::AccessibilityRenderObject::remoteSVGRootElement):
2016         * bindings/js/JSElementCustom.cpp:
2017         (WebCore::toJSNewlyCreated):
2018         * bindings/js/JSNodeCustom.cpp:
2019         (WebCore::createWrapperInline):
2020         * css/CSSComputedStyleDeclaration.cpp:
2021         (WebCore::ComputedStyleExtractor::propertyValue):
2022         * css/CSSCursorImageValue.cpp:
2023         (WebCore::resourceReferencedByCursorElement):
2024         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
2025         * css/ElementRuleCollector.cpp:
2026         (WebCore::ElementRuleCollector::matchAllRules):
2027         * css/StyleResolver.cpp:
2028         (WebCore::StyleResolver::locateCousinList):
2029         (WebCore::StyleResolver::canShareStyleWithElement):
2030         (WebCore::StyleResolver::locateSharedStyle):
2031         * dom/DocumentStyleSheetCollection.cpp:
2032         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
2033         * dom/Element.cpp:
2034         (WebCore::Element::synchronizeAllAttributes):
2035         (WebCore::Element::synchronizeAttribute):
2036         (WebCore::Element::boundsInRootViewSpace):
2037         (WebCore::Element::getBoundingClientRect):
2038         (WebCore::Element::childShouldCreateRenderer):
2039         (WebCore::Element::fastAttributeLookupAllowed):
2040         * dom/EventDispatcher.cpp:
2041         (WebCore::eventTargetRespectingTargetRules):
2042         * dom/ScriptElement.cpp:
2043         (WebCore::toScriptElementIfPossible):
2044         * dom/make_names.pl:
2045         (printTypeHelpers):
2046         * html/HTMLFrameOwnerElement.cpp:
2047         (WebCore::HTMLFrameOwnerElement::getSVGDocument):
2048         * inspector/InspectorCSSAgent.cpp:
2049         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
2050         * mathml/MathMLElement.cpp:
2051         (WebCore::MathMLElement::isPhrasingContent):
2052         (WebCore::MathMLElement::childShouldCreateRenderer):
2053         (WebCore::MathMLElement::attributeChanged):
2054         * mathml/MathMLElement.h:
2055         (WebCore::Node::hasTagName):
2056         * mathml/MathMLSelectElement.cpp:
2057         (WebCore::MathMLSelectElement::getSelectedSemanticsChild):
2058         * page/EventHandler.cpp:
2059         (WebCore::EventHandler::handleMousePressEvent):
2060         (WebCore::EventHandler::handleMouseMoveEvent):
2061         (WebCore::EventHandler::handleMouseReleaseEvent):
2062         (WebCore::instanceAssociatedWithShadowTreeElement):
2063         * page/Frame.cpp:
2064         (WebCore::Frame::setPageAndTextZoomFactors):
2065         * page/FrameView.cpp:
2066         (WebCore::FrameView::scrollToAnchor):
2067         * rendering/RenderTableCell.cpp:
2068         (WebCore::RenderTableCell::parseColSpanFromDOM):
2069         (WebCore::RenderTableCell::parseRowSpanFromDOM):
2070         (WebCore::RenderTableCell::computePreferredLogicalWidths):
2071         * rendering/mathml/RenderMathMLMenclose.cpp:
2072         (WebCore::RenderMathMLMenclose::addChild):
2073         (WebCore::RenderMathMLMenclose::computePreferredLogicalWidths):
2074         (WebCore::RenderMathMLMenclose::updateLogicalHeight):
2075         (WebCore::RenderMathMLMenclose::paint):
2076         * rendering/svg/RenderSVGBlock.h:
2077         (WebCore::RenderSVGBlock::graphicsElement):
2078         * rendering/svg/RenderSVGForeignObject.cpp:
2079         (WebCore::RenderSVGForeignObject::foreignObjectElement):
2080         * rendering/svg/RenderSVGGradientStop.cpp:
2081         (WebCore::RenderSVGGradientStop::gradientElement):
2082         * rendering/svg/RenderSVGGradientStop.h:
2083         * rendering/svg/RenderSVGImage.cpp:
2084         (WebCore::RenderSVGImage::imageElement):
2085         * rendering/svg/RenderSVGInline.h:
2086         (WebCore::RenderSVGInline::graphicsElement):
2087         * rendering/svg/RenderSVGModelObject.cpp:
2088         (WebCore::getElementCTM):
2089         (WebCore::RenderSVGModelObject::checkIntersection):
2090         (WebCore::RenderSVGModelObject::checkEnclosure):
2091         * rendering/svg/RenderSVGModelObject.h:
2092         (WebCore::RenderSVGModelObject::element):
2093         * rendering/svg/RenderSVGRect.cpp:
2094         (WebCore::RenderSVGRect::rectElement):
2095         * rendering/svg/RenderSVGResource.cpp:
2096         (WebCore::removeFromCacheAndInvalidateDependencies):
2097         * rendering/svg/RenderSVGResourceClipper.cpp:
2098         (WebCore::RenderSVGResourceClipper::pathOnlyClipping):
2099         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
2100         * rendering/svg/RenderSVGResourceClipper.h:
2101         * rendering/svg/RenderSVGResourceContainer.cpp:
2102         (WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke):
2103         * rendering/svg/RenderSVGResourceFilter.h:
2104         * rendering/svg/RenderSVGResourceLinearGradient.h:
2105         * rendering/svg/RenderSVGResourceMarker.h:
2106         * rendering/svg/RenderSVGResourceMasker.h:
2107         * rendering/svg/RenderSVGResourcePattern.cpp:
2108         (WebCore::RenderSVGResourcePattern::patternElement):
2109         * rendering/svg/RenderSVGResourceRadialGradient.h:
2110         * rendering/svg/RenderSVGRoot.cpp:
2111         (WebCore::RenderSVGRoot::svgSVGElement):
2112         * rendering/svg/RenderSVGShape.h:
2113         (WebCore::RenderSVGShape::graphicsElement):
2114         * rendering/svg/RenderSVGText.cpp:
2115         (WebCore::RenderSVGText::textElement):
2116         * rendering/svg/RenderSVGTextPath.cpp:
2117         (WebCore::RenderSVGTextPath::textPathElement):
2118         (WebCore::RenderSVGTextPath::layoutPath):
2119         * rendering/svg/RenderSVGTransformableContainer.cpp:
2120         (WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
2121         * rendering/svg/RenderSVGTransformableContainer.h:
2122         * rendering/svg/RenderSVGViewportContainer.cpp:
2123         (WebCore::RenderSVGViewportContainer::svgSVGElement):
2124         * rendering/svg/SVGPathData.cpp:
2125         (WebCore::updatePathFromLineElement):
2126         (WebCore::updatePathFromPathElement):
2127         (WebCore::updatePathFromPolygonElement):
2128         (WebCore::updatePathFromPolylineElement):
2129         * rendering/svg/SVGRenderSupport.cpp:
2130         (WebCore::SVGRenderSupport::layoutChildren):
2131         (WebCore::SVGRenderSupport::applyStrokeStyleToContext):
2132         (WebCore::SVGRenderSupport::updateMaskedAncestorShouldIsolateBlending):
2133         * rendering/svg/SVGRenderTreeAsText.cpp:
2134         (WebCore::operator<<):
2135         * rendering/svg/SVGRenderingContext.cpp:
2136         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
2137         * rendering/svg/SVGResources.cpp:
2138         (WebCore::targetReferenceFromResource):
2139         (WebCore::SVGResources::buildCachedResources):
2140         * rendering/svg/SVGTextLayoutEngine.cpp:
2141         (WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath):
2142         * svg/SVGAElement.cpp:
2143         (WebCore::SVGAElement::createElementRenderer):
2144         (WebCore::SVGAElement::defaultEventHandler):
2145         * svg/SVGAltGlyphDefElement.cpp:
2146         (WebCore::SVGAltGlyphDefElement::hasValidGlyphElements):
2147         * svg/SVGAltGlyphElement.cpp:
2148         (WebCore::SVGAltGlyphElement::hasValidGlyphElements):
2149         * svg/SVGAnimateElement.cpp:
2150         (WebCore::SVGAnimateElement::calculateAnimatedValue):
2151         * svg/SVGAnimatedTransformList.cpp:
2152         (WebCore::SVGAnimatedTransformListAnimator::SVGAnimatedTransformListAnimator):
2153         * svg/SVGAnimationElement.cpp:
2154         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
2155         (WebCore::SVGAnimationElement::adjustForInheritance):
2156         * svg/SVGDocument.cpp:
2157         (WebCore::SVGDocument::rootElement):
2158         * svg/SVGElement.cpp:
2159         (WebCore::SVGElement::ownerSVGElement):
2160         (WebCore::SVGElement::viewportElement):
2161         (WebCore::SVGElement::getBoundingBox):
2162         (WebCore::SVGElement::childShouldCreateRenderer):
2163         (WebCore::SVGElement::title):
2164         (WebCore::SVGElement::updateRelativeLengthsInformation):
2165         * svg/SVGElement.h:
2166         (WebCore::Node::hasTagName):
2167         * svg/SVGFEComponentTransferElement.cpp:
2168         (WebCore::SVGFEComponentTransferElement::build):
2169         * svg/SVGFEImageElement.cpp:
2170         (WebCore::SVGFEImageElement::buildPendingResource):
2171         * svg/SVGFilterElement.cpp:
2172         (WebCore::SVGFilterElement::childShouldCreateRenderer):
2173         * svg/SVGFilterPrimitiveStandardAttributes.h:
2174         (WebCore::isSVGFilterPrimitiveStandardAttributes):
2175         * svg/SVGFontData.cpp:
2176         (WebCore::SVGFontData::applySVGGlyphSelection):
2177         * svg/SVGFontElement.cpp:
2178         (WebCore::SVGFontElement::ensureGlyphCache):
2179         * svg/SVGFontFaceElement.cpp:
2180         (WebCore::SVGFontFaceElement::rebuildFontFace):
2181         * svg/SVGFontFaceFormatElement.cpp:
2182         (WebCore::SVGFontFaceFormatElement::childrenChanged):
2183         * svg/SVGFontFaceSrcElement.cpp:
2184         (WebCore::SVGFontFaceSrcElement::srcValue):
2185         (WebCore::SVGFontFaceSrcElement::childrenChanged):
2186         * svg/SVGFontFaceUriElement.cpp:
2187         (WebCore::SVGFontFaceUriElement::childrenChanged):
2188         * svg/SVGGlyphElement.cpp:
2189         (WebCore::SVGGlyphElement::invalidateGlyphCache):
2190         * svg/SVGGraphicsElement.h:
2191         (WebCore::isSVGGraphicsElement):
2192         * svg/SVGHKernElement.cpp:
2193         (WebCore::SVGHKernElement::insertedInto):
2194         (WebCore::SVGHKernElement::removedFrom):
2195         * svg/SVGImageLoader.cpp:
2196         (WebCore::SVGImageLoader::dispatchLoadEvent):
2197         * svg/SVGLengthContext.cpp:
2198         (WebCore::SVGLengthContext::determineViewport):
2199         * svg/SVGLinearGradientElement.cpp:
2200         (WebCore::setGradientAttributes):
2201         (WebCore::SVGLinearGradientElement::collectGradientAttributes):
2202         * svg/SVGLocatable.cpp:
2203         (WebCore::SVGLocatable::nearestViewportElement):
2204         (WebCore::SVGLocatable::farthestViewportElement):
2205         (WebCore::SVGLocatable::computeCTM):
2206         (WebCore::SVGLocatable::getTransformToElement):
2207         * svg/SVGMPathElement.cpp:
2208         (WebCore::SVGMPathElement::buildPendingResource):
2209         (WebCore::SVGMPathElement::pathElement):
2210         (WebCore::SVGMPathElement::notifyParentOfPathChange):
2211         * svg/SVGMarkerElement.cpp:
2212         (WebCore::SVGMarkerElement::synchronizeOrientType):
2213         (WebCore::SVGMarkerElement::lookupOrCreateOrientTypeWrapper):
2214         * svg/SVGPathElement.cpp:
2215         (WebCore::SVGPathElement::invalidateMPathDependencies):
2216         (WebCore::SVGPathElement::lookupOrCreateDWrapper):
2217         (WebCore::SVGPathElement::synchronizeD):
2218         * svg/SVGPathSegList.cpp:
2219         (WebCore::SVGPathSegList::commitChange):
2220         * svg/SVGPatternElement.cpp:
2221         (WebCore::SVGPatternElement::collectPatternAttributes):
2222         * svg/SVGPolyElement.cpp:
2223         (WebCore::SVGPolyElement::synchronizePoints):
2224         (WebCore::SVGPolyElement::lookupOrCreatePointsWrapper):
2225         * svg/SVGRadialGradientElement.cpp:
2226         (WebCore::setGradientAttributes):
2227         (WebCore::SVGRadialGradientElement::collectGradientAttributes):
2228         * svg/SVGSVGElement.cpp:
2229         (WebCore::SVGSVGElement::setupInitialView):
2230         * svg/SVGTextContentElement.cpp:
2231         (WebCore::SVGTextContentElement::synchronizeTextLength):
2232         (WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper):
2233         (WebCore::SVGTextContentElement::elementFromRenderer):
2234         * svg/SVGTextContentElement.h:
2235         (WebCore::isSVGTextContentElement):
2236         * svg/SVGTextPathElement.cpp:
2237         (WebCore::SVGTextPathElement::buildPendingResource):
2238         * svg/SVGUseElement.cpp:
2239         (WebCore::dumpInstanceTree):
2240         (WebCore::SVGUseElement::buildPendingResource):
2241         (WebCore::SVGUseElement::toClipPath):
2242         (WebCore::SVGUseElement::buildInstanceTree):
2243         (WebCore::SVGUseElement::hasCycleUseReferencing):
2244         (WebCore::SVGUseElement::expandUseElementsInShadowTree):
2245         (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements):
2246         * svg/SVGVKernElement.cpp:
2247         (WebCore::SVGVKernElement::insertedInto):
2248         (WebCore::SVGVKernElement::removedFrom):
2249         * svg/SVGViewSpec.cpp:
2250         (WebCore::SVGViewSpec::viewTarget):
2251         * svg/animation/SVGSMILElement.cpp:
2252         (WebCore::SVGSMILElement::buildPendingResource):
2253         (WebCore::SVGSMILElement::connectConditions):
2254         (WebCore::SVGSMILElement::disconnectConditions):
2255         * svg/animation/SVGSMILElement.h:
2256         (WebCore::isSVGSMILElement):
2257         * svg/graphics/SVGImage.cpp:
2258         (WebCore::SVGImage::hasSingleSecurityOrigin):
2259         (WebCore::SVGImage::setContainerSize):
2260         (WebCore::SVGImage::containerSize):
2261         (WebCore::SVGImage::embeddedContentBox):
2262         (WebCore::SVGImage::hasRelativeWidth):
2263         (WebCore::SVGImage::hasRelativeHeight):
2264         (WebCore::SVGImage::computeIntrinsicDimensions):
2265         (WebCore::SVGImage::startAnimation):
2266         (WebCore::SVGImage::stopAnimation):
2267         * svg/graphics/filters/SVGFEImage.cpp:
2268         (WebCore::FEImage::platformApplySoftware):
2269         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
2270         (WebCore::SVGAnimatedPathSegListPropertyTearOff::animValDidChange):
2271         * svg/properties/SVGPathSegListPropertyTearOff.cpp:
2272         (WebCore::SVGPathSegListPropertyTearOff::contextElement):
2273
2274 2014-09-22  Pratik Solanki  <psolanki@apple.com>
2275
2276         Follow on fix for [iOS] ASSERTION FAILED: WTF::isMainThread() in WebCore::memoryCache() when using WebKit1
2277         https://bugs.webkit.org/show_bug.cgi?id=136962
2278
2279         Rubber-stamped by Simon Fraser.
2280
2281         Remove the const per review comment. It is not needed.
2282
2283         * loader/cocoa/DiskCacheMonitorCocoa.mm:
2284         (WebCore::DiskCacheMonitor::DiskCacheMonitor):
2285
2286 2014-09-22  Simon Fraser  <simon.fraser@apple.com>
2287
2288         Move nodeFromPoint() back to Document where it belongs
2289         https://bugs.webkit.org/show_bug.cgi?id=137012
2290
2291         Reviewed by Zalan Bujtas.
2292
2293         nodeFromPoint() was moved into TreeScope for ShadowDOM work, but now we can move
2294         it back to its logical place.
2295         
2296         Make versions of elementFromPoint and caretRangeFromPoint that take LayoutPoints,
2297         and change the current scale/offset code to be in layout units (which results
2298         in a small behavior change).
2299         
2300         elementFromPoint(int, int) and caretRangeFromPoint(int, int) are still required
2301         for bindings code.
2302
2303         * dom/Document.cpp:
2304         (WebCore::Document::nodeFromPoint):
2305         (WebCore::Document::elementFromPoint):
2306         (WebCore::Document::caretRangeFromPoint):
2307         * dom/Document.h:
2308         (WebCore::Document::elementFromPoint): Move logic from TreeScope::elementFromPoint()
2309         here.
2310         * dom/TreeScope.cpp:
2311         (WebCore::nodeFromPoint): Deleted.
2312         (WebCore::TreeScope::elementFromPoint): Deleted.
2313         * dom/TreeScope.h:
2314
2315 2014-09-22  Benjamin Poulain  <bpoulain@apple.com>
2316
2317         Add the baseline implementation of :nth-child(An+B of selector-list)
2318         https://bugs.webkit.org/show_bug.cgi?id=136975
2319
2320         Reviewed by Darin Adler.
2321
2322         Tests: fast/css/nth-child-of-classname.html
2323                fast/css/nth-child-of-complex-selector.html
2324                fast/css/nth-child-of-compound-selector.html
2325                fast/css/nth-child-of-tagname.html
2326                fast/selectors/nth-child-of-basics.html
2327                fast/selectors/nth-child-of-class-style-update.html
2328                fast/selectors/nth-child-of-complex-selectors.html
2329                fast/selectors/nth-child-of-selector-list.html
2330
2331         * css/SelectorChecker.cpp:
2332         (WebCore::SelectorChecker::checkOne):
2333         Pretty basic:
2334         -Go over the previous siblings.
2335         -For each sibling, test the selector list. If it matches, increase the count.
2336
2337         * cssjit/SelectorCompiler.cpp:
2338         (WebCore::SelectorCompiler::addPseudoClassType):
2339         Skip any case of the new selector. This will be implemented separately.
2340
2341 2014-09-19  Myles C. Maxfield  <mmaxfield@apple.com>
2342
2343         Implement 'vhea', 'vmtx', and 'kern' tables in SVG -> OTF converter
2344         https://bugs.webkit.org/show_bug.cgi?id=136971
2345
2346         Reviewed by Darin Adler.
2347
2348         This patch fills in the tables related to vertical metrics and kerning. The vertical metrics tables are
2349         fairly straightforward. On the other hand, the 'kern' table has subtables which can be in a variety
2350         of formats; however, according to Microsoft, Windows only allows one particular format, which doesn't
2351         allow for ranges of glyphs to be described and therefore might lead to a large 'kern' table size. In
2352         the interest of platform agnosticism I have implemented this particular format, and have not actually
2353         witnessed any extremely large 'kern' tables in any of the fonts that I have looked at.
2354
2355         I also added basic support for the horiz-origin-x and horiz-origin-y SVG properties, though support
2356         might not be perfect based on my testing.
2357
2358         Regarding testing, after this patch, almost all of our SVG fonts tests pass (barring tiny rebaselining;
2359         the platform font system calculates slightly different advances than we did. These differences are tiny
2360         and expected from such a dramatic shift in text handling engines.) There are around two dozen failing
2361         tests left that look like they are actually indiciative of code problems.
2362
2363         * svg/SVGFontElement.cpp:
2364         (WebCore::SVGFontElement::ensureGlyphCache): Refactor to accept new signature of
2365         SVG*KernElement::build*KerningPair().
2366         * svg/SVGHKernElement.cpp:
2367         (WebCore::SVGHKernElement::buildHorizontalKerningPair): Refactor to allow for intermediate data to be
2368         returned, which the SVG -> OTF font converter can use.
2369         * svg/SVGHKernElement.h: New signature for buildHorizontalKerningPair().
2370         * svg/SVGToOTFFontConversion.cpp:
2371         (WebCore::SVGToOTFFontConverter::GlyphData::GlyphData): Save the glyph's vertical advance along with
2372         the glyph's horizontal advance.
2373         (WebCore::SVGToOTFFontConverter::KerningData::KerningData): This data represents a record in one of
2374         the two 'kern' subtables, and as such needs to be sorted.
2375         (WebCore::SVGToOTFFontConverter::KerningData::operator<): Sort comparator.
2376         (WebCore::SVGToOTFFontConverter::appendHEADTable): Save the unitsPerEm locally to save a conditional.
2377         (WebCore::SVGToOTFFontConverter::appendHHEATable): Ditto.
2378         (WebCore::SVGToOTFFontConverter::appendHMTXTable): Ditto. Also use the horizontal advance as opposed to
2379         the vertical advance.
2380         (WebCore::SVGToOTFFontConverter::appendOS2Table): Save the unitsPerEm locally to save a conditional.
2381         Also if the average advance isn't found in the font, use the missing glyph's advance. If there is no
2382         missing glyph, bail and use the unitsPerEm.
2383         (WebCore::SVGToOTFFontConverter::appendVORGTable): If the default vertical origin isn't found in the
2384         font, use the missing glyphs's vertical origin. If there is no missing glyph, bail and use 0.
2385         (WebCore::SVGToOTFFontConverter::appendVHEATable): Parallel of 'hhea' table, except for vertical info.
2386         (WebCore::SVGToOTFFontConverter::appendVMTXTable): Parallel of 'hmtx' table, except for vertical info.
2387         (WebCore::SVGToOTFFontConverter::appendKerningHelperFields): Computes and appends 4 fields that font
2388         parsers need in order to do a binary search on the kern records.
2389         (WebCore::SVGToOTFFontConverter::addCodepointRanges): For each codepoint in the ranges, look up its
2390         representative glyph and append it to a set.
2391         (WebCore::SVGToOTFFontConverter::addCodepoints): For each codepoint in the range, look up its
2392         representative glyph and append it to a set.
2393         (WebCore::SVGToOTFFontConverter::addGlyphNames): For each glyph name, look up its representative glyph
2394         and append it to a set.
2395         (WebCore::SVGToOTFFontConverter::computeKerningData): Call SVG*KernElement::build*KerningPair() and
2396         iterate through all the data it returned, building up records into a Vector.
2397         (WebCore::SVGToOTFFontConverter::appendKERNTable): Go through the vector that computeKerningData()
2398         returned and actually write out the two subtables. One is for horizontal kerning and the other is for
2399         vertical kerning.
2400         (WebCore::CFFBuilder::CFFBuilder): Use the position of the glyph origin to perform the initial moveto
2401         command.
2402         (WebCore::transcodeGlyphPaths): Get the glyph's origin and pass it to the CFFBuilder.
2403         (WebCore::SVGToOTFFontConverter::appendGlyphData): Templated overloading so that the missing glyph
2404         gets a null SVGGlyphElement pointer but the rest of the glyphs get a non-null one.
2405         (WebCore::SVGToOTFFontConverter::processGlyphElement): Called on both SVGGlyphElements and
2406         SVGMissingGlyphElements, this pulls out information from the element and computs its path information.
2407         (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter): Use the new templated version of
2408         processGlyphElement so we can get the same glyph parsing behavior on SVGMissingGlyphElements. In
2409         addition, populate two maps for the kerning table creation function to use.
2410         (WebCore::SVGToOTFFontConverter::convertSVGToOTFFont): Append new tables.
2411         * svg/SVGVKernElement.cpp:
2412         (WebCore::SVGVKernElement::buildVerticalKerningPair): Refactor to allow for intermediate data to be
2413         returned, which the SVG -> OTF font converter can use.
2414         * svg/SVGVKernElement.h: New signature for buildVerticalKerningPair().
2415
2416 2014-09-22  Alexey Proskuryakov  <ap@apple.com>
2417
2418         WebSocket crash when a connection is closed from server side
2419         https://bugs.webkit.org/show_bug.cgi?id=137009
2420         rdar://problem/18333977
2421         rdar://problem/12708225
2422
2423         Reviewed by Brady Eidson.
2424
2425         I don't think that this can be tested with our test server.
2426
2427         * Modules/websockets/WebSocketChannel.cpp:
2428         (WebCore::WebSocketChannel::WebSocketChannel): Added logging.
2429         (WebCore::WebSocketChannel::~WebSocketChannel): Ditto.
2430         (WebCore::WebSocketChannel::close): Protect self, because startClosingHandshake
2431         can release the last reference.
2432         (WebCore::WebSocketChannel::fail): Added an assertion that the channel is always
2433         closed after this function.
2434         (WebCore::WebSocketChannel::startClosingHandshake): Protect self, and don't change
2435         the stack from closed back to closing if after failing to send closing handshake.
2436         (WebCore::WebSocketChannel::processOutgoingFrameQueue): Protect self.
2437
2438 2014-09-22  David Hyatt  <hyatt@apple.com>
2439
2440         Bad cast in isValidColumnSpanner.
2441         https://bugs.webkit.org/show_bug.cgi?id=133380.
2442
2443         Reviewed by Simon Fraser.
2444
2445         Added fast/multicol/multicol-crazy-nesting.html
2446
2447         * rendering/RenderMultiColumnFlowThread.cpp:
2448         (WebCore::isValidColumnSpanner):
2449         The crawl up the chain looking for unsplittable objects should use containing blocks
2450         and not be casting to parent boxes. You can have an inline in the parent chain, so
2451         this was not the right way to walk up the tree.
2452
2453 2014-09-22  David Hyatt  <hyatt@apple.com>
2454
2455         ASSERT in RenderMultiColumnSet::requiresBalancing.
2456         https://bugs.webkit.org/show_bug.cgi?id=136376.
2457
2458         Reviewed by David Kilzer.
2459
2460         Added fast/multicol/multicol-selection.html.
2461
2462         * rendering/RenderMultiColumnFlowThread.cpp:
2463         (WebCore::isValidColumnSpanner):
2464         Don't allow an object to become a spanner if it does not have the flow
2465         thread as its containing block. Otherwise the flow thread won't get notified
2466         of spanner placeholder insertions, and so the spanner ends up orphaned.
2467
2468 2014-09-19  Brent Fulgham  <bfulgham@apple.com>
2469
2470         [Win] Implement cap height in SimpleFontDataWin to enable initial-letter support for Windows.
2471         https://bugs.webkit.org/show_bug.cgi?id=136841
2472
2473         Reviewed by David Hyatt.
2474
2475         * platform/graphics/win/SimpleFontDataCGWin.cpp:
2476         (WebCore::SimpleFontData::platformInit): Add missing calls to set up our fonts.
2477
2478 2014-09-22  Eric Carlson  <eric.carlson@apple.com>
2479
2480         Update HTMLMediaElement logging
2481         https://bugs.webkit.org/show_bug.cgi?id=136991
2482
2483         Reviewed by Alexey Proskuryakov.
2484
2485         No new tests, only logging was changed.
2486
2487         * html/HTMLMediaElement.cpp:
2488         (WebCore::HTMLMediaElement::HTMLMediaElement):
2489         (WebCore::HTMLMediaElement::~HTMLMediaElement):
2490         (WebCore::HTMLMediaElement::parseAttribute):
2491
2492 2014-09-22  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
2493
2494         REGRESSION(r173631): It broke the !ENABLE(VIDEO) build
2495         https://bugs.webkit.org/show_bug.cgi?id=136946
2496
2497         Reviewed by Jer Noble.
2498
2499         No new tests required, no new functionality.
2500
2501         * page/DragController.cpp:
2502         (WebCore::DragController::startDrag):
2503
2504 2014-09-22  Mihnea Ovidenie  <mihnea@adobe.com>
2505
2506         [CSSRegions] Use nullptr in regions code
2507         https://bugs.webkit.org/show_bug.cgi?id=137001
2508
2509         Reviewed by Andrei Bucur.
2510
2511         No new tests as no new functionality is introduced.
2512
2513         * dom/DOMNamedFlowCollection.cpp:
2514         (WebCore::DOMNamedFlowCollection::item):
2515         (WebCore::DOMNamedFlowCollection::namedItem):
2516         * dom/NamedFlowCollection.cpp:
2517         (WebCore::NamedFlowCollection::flowByName):
2518         * dom/WebKitNamedFlow.cpp:
2519         (WebCore::WebKitNamedFlow::WebKitNamedFlow):
2520         * rendering/RenderFlowThread.cpp:
2521         (WebCore::RenderFlowThread::getLayerListForRegion):
2522         (WebCore::RenderFlowThread::regionForCompositedLayer):
2523         (WebCore::RenderFlowThread::regionAtBlockOffset):
2524         (WebCore::RenderFlowThread::mapFromFlowToRegion):
2525         (WebCore::RenderFlowThread::firstRegion):
2526         (WebCore::RenderFlowThread::lastRegion):
2527         (WebCore::RenderFlowThread::currentActiveRenderBox):
2528         * rendering/RenderNamedFlowThread.cpp:
2529         (WebCore::RenderNamedFlowThread::nextRendererForElement):
2530
2531 2014-09-17  Philippe Normand  <pnormand@igalia.com>
2532
2533         [GStreamer] Cannot play Vimeo video
2534         https://bugs.webkit.org/show_bug.cgi?id=134969
2535
2536         Reviewed by Sergio Villar Senin.
2537
2538         Ensure the GStreamer HTTP source element also sends cookies when
2539         it's sending its requests. Some streaming platforms such as Vimeo
2540         do server-side cookie checks on incoming requests before serving
2541         media data.
2542
2543         Test: http/tests/media/hls/video-cookie.html
2544
2545         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2546         (webKitWebSrcStart): Set first-party cookie URL to the request so
2547         the ResourceLoader properly sets cookies in the HTTP request.
2548
2549 2014-09-22  Mihnea Ovidenie  <mihnea@adobe.com>
2550
2551         Leverage RenderLayerBacking::renderer() instead of m_owningLayer.renderer()
2552         https://bugs.webkit.org/show_bug.cgi?id=136954
2553
2554         Reviewed by Darin Adler.
2555
2556         No new tests just refactoring.
2557
2558         * rendering/RenderLayerBacking.cpp:
2559         (WebCore::RenderLayerBacking::updateCompositedBounds):
2560         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
2561         (WebCore::RenderLayerBacking::paintIntoLayer):
2562
2563 2014-09-22  Mihnea Ovidenie  <mihnea@adobe.com>
2564
2565         [CSS Regions] Assertion failure and null dereference crash when using animations and regions
2566         https://bugs.webkit.org/show_bug.cgi?id=136918
2567
2568         Reviewed by Andrei Bucur.
2569
2570         In some situations, for instance when an image has an attached animation, the style change caused by the animation
2571         triggers a geometry update for the backing store associated with the image's layer. This may occur before
2572         the layout for the image has finished.
2573
2574         Moreover, if the image in such situation - having a composited layer - is displayed in a region,
2575         sicne the layout did not finish yet, the mappings between the layers of the elements collected in the named flow
2576         and the regions associated with the named flow are not updated and cannot be used.
2577
2578         Therefore in those situations, we have to bail out early and use these mappings only after the layout has finished.
2579
2580         This patch also changes RenderLayerBacking method updateAfterDescendents -> updateAfterDescendants.
2581
2582         Test: fast/regions/animated-image-in-region.html
2583
2584         * rendering/RenderFlowThread.cpp:
2585         (WebCore::RenderFlowThread::cachedRegionForCompositedLayer):
2586         * rendering/RenderLayer.cpp:
2587         (WebCore::RenderLayer::calculateClipRects):
2588         * rendering/RenderLayerBacking.cpp:
2589         (WebCore::RenderLayerBacking::updateAfterDescendants):
2590         * rendering/RenderLayerBacking.h:
2591         * rendering/RenderLayerCompositor.cpp:
2592         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
2593         (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
2594         (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
2595
2596 2014-09-21  Chris Dumez  <cdumez@apple.com>
2597
2598         Generate Element casting helper functions
2599         https://bugs.webkit.org/show_bug.cgi?id=136839
2600
2601         Reviewed by Darin Adler.
2602
2603         Generate Element casting helper functions instead of requiring explicit
2604         use of NODE_TYPE_CASTS() macro. Casting is now done using the following
2605         form: downcast<HTMLDivElement>(), instead of toHTMLDivElement().
2606
2607         The previous form (i.e. toHTMLDivElement()) is still supported for now
2608         by generating macros that convert these calls into the new form, until
2609         the code base is ported to the new casting helpers.
2610
2611         The plan is also to use is<HTMLDivElement>() instead of
2612         isHTMLDivElement() for consistency but this was not changed in this
2613         patch to avoid blowing up the size.
2614
2615         This CL also updates the way we convert a JSValue into an
2616         implementation pointer. Instead of using toHTMLDivElement(), which
2617         looked like a cast, we now use JSHTMLDivElement::toWrapped(). This
2618         avoids conflicting with the toXXXElement() macros and makes it
2619         clearer this is not a simple cast.
2620
2621         No new tests, no behavior change.
2622
2623         * Modules/plugins/QuickTimePluginReplacement.mm:
2624         (WebCore::QuickTimePluginReplacement::installReplacement):
2625         * WebCore.exp.in:
2626         * bindings/js/JSAudioBufferSourceNodeCustom.cpp:
2627         (WebCore::JSAudioBufferSourceNode::setBuffer):
2628         * bindings/js/JSBlobCustom.cpp:
2629         (WebCore::constructJSBlob):
2630         * bindings/js/JSCommandLineAPIHostCustom.cpp:
2631         (WebCore::JSCommandLineAPIHost::getEventListeners):
2632         (WebCore::JSCommandLineAPIHost::databaseId):
2633         (WebCore::JSCommandLineAPIHost::storageId):
2634         * bindings/js/JSDOMFormDataCustom.cpp:
2635         (WebCore::toHTMLFormElementOrNull):
2636         (WebCore::constructJSDOMFormData):
2637         (WebCore::JSDOMFormData::append):
2638         (WebCore::toHTMLFormElement): Deleted.
2639         * bindings/js/JSDOMStringListCustom.cpp:
2640         (WebCore::JSDOMStringList::toWrapped):
2641         (WebCore::toDOMStringList): Deleted.
2642         * bindings/js/JSDOMWindowCustom.cpp:
2643         (WebCore::JSDOMWindow::toWrapped):
2644         (WebCore::toDOMWindow): Deleted.
2645         * bindings/js/JSDictionary.cpp:
2646         (WebCore::JSDictionary::convertValue):
2647         * bindings/js/JSDocumentCustom.cpp:
2648         (WebCore::JSDocument::createTouchList):
2649         * bindings/js/JSEventTargetCustom.cpp:
2650         (WebCore::JSEventTarget::toWrapped):
2651         (WebCore::toEventTarget): Deleted.
2652         * bindings/js/JSExceptionBase.cpp:
2653         (WebCore::toExceptionBase):
2654         * bindings/js/JSHTMLMediaElementCustom.cpp:
2655         (WebCore::JSHTMLMediaElement::setController):
2656         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
2657         (WebCore::JSHTMLOptionsCollection::add):
2658         (WebCore::JSHTMLOptionsCollection::remove):
2659         * bindings/js/JSHTMLSelectElementCustom.cpp:
2660         (WebCore::JSHTMLSelectElement::remove):
2661         (WebCore::selectIndexSetter):
2662         * bindings/js/JSInspectorFrontendHostCustom.cpp:
2663         (WebCore::JSInspectorFrontendHost::showContextMenu):
2664         * bindings/js/JSMessageEventCustom.cpp:
2665         (WebCore::handleInitMessageEvent):
2666         * bindings/js/JSMessagePortCustom.cpp:
2667         (WebCore::fillMessagePortArray):
2668         * bindings/js/JSNodeCustom.cpp:
2669         (WebCore::JSNode::insertBefore):
2670         (WebCore::JSNode::replaceChild):
2671         (WebCore::JSNode::removeChild):
2672         (WebCore::JSNode::appendChild):
2673         * bindings/js/JSNodeFilterCustom.cpp:
2674         (WebCore::JSNodeFilter::toWrapped):
2675         (WebCore::toNodeFilter): Deleted.
2676         * bindings/js/JSSubtleCryptoCustom.cpp:
2677         (WebCore::JSSubtleCrypto::encrypt):
2678         (WebCore::JSSubtleCrypto::decrypt):
2679         (WebCore::JSSubtleCrypto::sign):
2680         (WebCore::JSSubtleCrypto::verify):
2681         (WebCore::JSSubtleCrypto::exportKey):
2682         (WebCore::JSSubtleCrypto::wrapKey):
2683         (WebCore::JSSubtleCrypto::unwrapKey):
2684         * bindings/js/JSWebGLRenderingContextCustom.cpp:
2685         (WebCore::JSWebGLRenderingContext::getAttachedShaders):
2686         (WebCore::JSWebGLRenderingContext::getProgramParameter):
2687         (WebCore::JSWebGLRenderingContext::getShaderParameter):
2688         (WebCore::JSWebGLRenderingContext::getUniform):
2689         (WebCore::dataFunctionf):
2690         (WebCore::dataFunctioni):
2691         (WebCore::dataFunctionMatrix):
2692         * bindings/js/JSXMLHttpRequestCustom.cpp:
2693         (WebCore::JSXMLHttpRequest::send):
2694         * bindings/js/SerializedScriptValue.cpp:
2695         (WebCore::CloneSerializer::dumpIfTerminal):
2696         * bindings/scripts/CodeGeneratorJS.pm:
2697         (GenerateHeader):
2698         (GenerateImplementation):
2699         (GenerateParametersCheck):
2700         (JSValueToNative):
2701         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2702         (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
2703         (WebCore::JSTestActiveDOMObject::toWrapped):
2704         (WebCore::toTestActiveDOMObject): Deleted.
2705         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
2706         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2707         (WebCore::JSTestCustomNamedGetter::toWrapped):
2708         (WebCore::toTestCustomNamedGetter): Deleted.
2709         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
2710         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2711         (WebCore::JSTestEventConstructor::toWrapped):
2712         (WebCore::toTestEventConstructor): Deleted.
2713         * bindings/scripts/test/JS/JSTestEventConstructor.h:
2714         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2715         (WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
2716         (WebCore::JSTestEventTarget::toWrapped):
2717         (WebCore::toTestEventTarget): Deleted.
2718         * bindings/scripts/test/JS/JSTestEventTarget.h:
2719         * bindings/scripts/test/JS/JSTestException.cpp:
2720         (WebCore::JSTestException::toWrapped):
2721         (WebCore::toTestException): Deleted.
2722         * bindings/scripts/test/JS/JSTestException.h:
2723         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2724         (WebCore::JSTestGenerateIsReachable::toWrapped):
2725         (WebCore::toTestGenerateIsReachable): Deleted.
2726         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
2727         * bindings/scripts/test/JS/JSTestInterface.cpp:
2728         (WebCore::setJSTestInterfaceImplementsNode):
2729         (WebCore::setJSTestInterfaceSupplementalNode):
2730         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
2731         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
2732         (WebCore::JSTestInterface::toWrapped):
2733         (WebCore::toTestInterface): Deleted.
2734         * bindings/scripts/test/JS/JSTestInterface.h:
2735         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2736         (WebCore::JSTestMediaQueryListListener::toWrapped):
2737         (WebCore::toTestMediaQueryListListener): Deleted.
2738         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
2739         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2740         (WebCore::JSTestNamedConstructor::toWrapped):
2741         (WebCore::toTestNamedConstructor): Deleted.
2742         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
2743         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
2744         (WebCore::JSTestNondeterministic::toWrapped):
2745         (WebCore::toTestNondeterministic): Deleted.
2746         * bindings/scripts/test/JS/JSTestNondeterministic.h:
2747         * bindings/scripts/test/JS/JSTestObj.cpp:
2748         (WebCore::setJSTestObjTestObjAttr):
2749         (WebCore::setJSTestObjXMLObjAttr):
2750         (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
2751         (WebCore::setJSTestObjWithScriptStateAttributeRaises):
2752         (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
2753         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
2754         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
2755         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
2756         (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
2757         (WebCore::setJSTestObjMutablePoint):
2758         (WebCore::setJSTestObjImmutablePoint):
2759         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
2760         (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
2761         (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
2762         (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
2763         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
2764         (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
2765         (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
2766         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
2767         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
2768         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
2769         (WebCore::jsTestObjPrototypeFunctionConvert1):
2770         (WebCore::jsTestObjPrototypeFunctionConvert2):
2771         (WebCore::jsTestObjPrototypeFunctionConvert4):
2772         (WebCore::jsTestObjPrototypeFunctionConvert5):
2773         (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithSequence):
2774         (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithArray):
2775         (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
2776         (WebCore::JSTestObj::toWrapped):
2777         (WebCore::toTestObj): Deleted.
2778         * bindings/scripts/test/JS/JSTestObj.h:
2779         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2780         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors3):
2781         (WebCore::JSTestOverloadedConstructors::toWrapped):
2782         (WebCore::toTestOverloadedConstructors): Deleted.
2783         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
2784         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2785         (WebCore::JSTestSerializedScriptValueInterface::toWrapped):
2786         (WebCore::toTestSerializedScriptValueInterface): Deleted.
2787         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
2788         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2789         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
2790         (WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude):
2791         (WebCore::JSTestTypedefs::toWrapped):
2792         (WebCore::toTestTypedefs): Deleted.
2793         * bindings/scripts/test/JS/JSTestTypedefs.h:
2794         * bindings/scripts/test/JS/JSattribute.cpp:
2795         (WebCore::JSattribute::toWrapped):
2796         (WebCore::toattribute): Deleted.
2797         * bindings/scripts/test/JS/JSattribute.h:
2798         * bindings/scripts/test/JS/JSreadonly.cpp:
2799         (WebCore::JSreadonly::toWrapped):
2800         (WebCore::toreadonly): Deleted.
2801         * bindings/scripts/test/JS/JSreadonly.h:
2802         * dom/Element.h:
2803         (WebCore::downcast):
2804         * dom/make_names.pl:
2805         (printTypeHelpers):
2806         * html/HTMLAnchorElement.h:
2807         * html/HTMLAreaElement.h:
2808         * html/HTMLAudioElement.h:
2809         * html/HTMLBaseElement.h:
2810         * html/HTMLBodyElement.h:
2811         * html/HTMLCanvasElement.h:
2812         * html/HTMLDataListElement.h:
2813         * html/HTMLDetailsElement.h:
2814         * html/HTMLDivElement.h:
2815         * html/HTMLEmbedElement.h:
2816         * html/HTMLFieldSetElement.h:
2817         * html/HTMLFormElement.h:
2818         * html/HTMLFrameElement.h:
2819         * html/HTMLFrameSetElement.h:
2820         * html/HTMLHtmlElement.h:
2821         * html/HTMLIFrameElement.h:
2822         * html/HTMLImageElement.h:
2823         * html/HTMLInputElement.h:
2824         * html/HTMLLabelElement.h:
2825         * html/HTMLLegendElement.h:
2826         * html/HTMLLinkElement.h:
2827         * html/HTMLMapElement.h:
2828         * html/HTMLMarqueeElement.h:
2829         * html/HTMLMetaElement.h:
2830         * html/HTMLMeterElement.h:
2831         * html/HTMLOListElement.h:
2832         * html/HTMLObjectElement.h:
2833         * html/HTMLOptGroupElement.h:
2834         * html/HTMLOptionElement.h:
2835         * html/HTMLParamElement.h:
2836         * html/HTMLProgressElement.h:
2837         * html/HTMLScriptElement.h:
2838         * html/HTMLSelectElement.h:
2839         * html/HTMLSourceElement.h:
2840         * html/HTMLStyleElement.h:
2841         * html/HTMLSummaryElement.h:
2842         * html/HTMLTableCaptionElement.h:
2843         * html/HTMLTableElement.h:
2844         * html/HTMLTableRowElement.h:
2845         * html/HTMLTemplateElement.h:
2846         * html/HTMLTextAreaElement.h:
2847         * html/HTMLTitleElement.h:
2848         * html/HTMLTrackElement.h:
2849         * html/HTMLVideoElement.h:
2850         * inspector/InspectorDOMAgent.cpp:
2851         (WebCore::InspectorDOMAgent::scriptValueAsNode):
2852         * mathml/MathMLMencloseElement.h:
2853         * svg/SVGAltGlyphDefElement.h:
2854         * svg/SVGAltGlyphElement.h:
2855         * svg/SVGAltGlyphItemElement.h:
2856         * svg/SVGAnimateMotionElement.h:
2857         * svg/SVGAnimateTransformElement.h:
2858         * svg/SVGCircleElement.h:
2859         * svg/SVGClipPathElement.h:
2860         * svg/SVGCursorElement.h:
2861         * svg/SVGEllipseElement.h:
2862         * svg/SVGFEDistantLightElement.h:
2863         * svg/SVGFEFuncAElement.h:
2864         * svg/SVGFEFuncBElement.h:
2865         * svg/SVGFEFuncGElement.h:
2866         * svg/SVGFEFuncRElement.h:
2867         * svg/SVGFEMergeNodeElement.h:
2868         * svg/SVGFEPointLightElement.h:
2869         * svg/SVGFESpotLightElement.h:
2870         * svg/SVGFilterElement.h:
2871         * svg/SVGFontElement.h:
2872         * svg/SVGFontFaceElement.h:
2873         * svg/SVGFontFaceNameElement.h:
2874         * svg/SVGFontFaceSrcElement.h:
2875         * svg/SVGFontFaceUriElement.h:
2876         * svg/SVGForeignObjectElement.h:
2877         * svg/SVGGlyphElement.h:
2878         * svg/SVGGlyphRefElement.h:
2879         * svg/SVGHKernElement.h:
2880         * svg/SVGImageElement.h:
2881         * svg/SVGLineElement.h:
2882         * svg/SVGLinearGradientElement.h:
2883         * svg/SVGMPathElement.h:
2884         * svg/SVGMarkerElement.h:
2885         * svg/SVGMaskElement.h:
2886         * svg/SVGMissingGlyphElement.h:
2887         * svg/SVGPathElement.h:
2888         * svg/SVGPatternElement.h:
2889         * svg/SVGPolygonElement.h:
2890         * svg/SVGPolylineElement.h:
2891         * svg/SVGRadialGradientElement.h:
2892         * svg/SVGRectElement.h:
2893         * svg/SVGSVGElement.h:
2894         * svg/SVGScriptElement.h:
2895         * svg/SVGStopElement.h:
2896         * svg/SVGStyleElement.h:
2897         * svg/SVGTextElement.h:
2898         * svg/SVGTextPathElement.h:
2899         * svg/SVGTitleElement.h:
2900         * svg/SVGUseElement.h:
2901         * svg/SVGVKernElement.h:
2902         * svg/SVGViewElement.h:
2903
2904 2014-09-21  Christophe Dumez  <cdumez@apple.com>
2905
2906         Fix post-mortem nits for r173724
2907         https://bugs.webkit.org/show_bug.cgi?id=136986
2908
2909         Reviewed by Darin Adler.
2910
2911         Fix post-mortem nits for r173724.
2912
2913         No new tests, no behavior change.
2914
2915         * editing/EditingStyle.cpp:
2916         (WebCore::HTMLAttributeEquivalent::attributeValueAsCSSValue):
2917         (WebCore::HTMLFontSizeEquivalent::attributeValueAsCSSValue):
2918         Use nullptr instead of 0.
2919
2920         * editing/SplitElementCommand.cpp:
2921         (WebCore::SplitElementCommand::doUnapply):
2922         Use getIdAttribute() / setIdAttribute().
2923
2924         * rendering/RenderTableCell.cpp:
2925         (WebCore::RenderTableCell::computePreferredLogicalWidths):
2926         Use fastHasAttribute() for nowrap and do an early return to avoid
2927         calling styleOrColLogicalWidth() if the nowrap attribute is missing.
2928
2929 2014-09-21  Filip Pizlo  <fpizlo@apple.com>
2930
2931         Unreviewed, speculative build fix.
2932         
2933         If you use typed arrays, you gotta include runtime/TypedArrayInlines.h.
2934
2935         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
2936
2937 2014-09-19  Jer Noble  <jer.noble@apple.com>
2938
2939         [EME][Mac] Support secure proof of key release in the com.apple.fps.2_0 keysystem.
2940         https://bugs.webkit.org/show_bug.cgi?id=136898
2941
2942         Reviewed by Eric Carlson.
2943
2944         Add support for proof of key release to the CDM by supporting a new "mime" type called
2945         "keyrelease". When a session of type "keyrelease" is created, the initData is the server
2946         certificate, the keyMessage contains the first stored proof of key release if present,
2947         and closing the session will remove that proof from storage.
2948
2949         * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
2950         (WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystemAndMimeType):
2951         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
2952         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
2953         (WebCore::CDMSessionMediaSourceAVFObjC::CDMSessionMediaSourceAVFObjC):
2954         (WebCore::CDMSessionMediaSourceAVFObjC::generateKeyRequest):
2955         (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys):
2956         (WebCore::sessionStorageDirectory):
2957         (WebCore::CDMSessionMediaSourceAVFObjC::update):
2958         (WebCore::CDMSessionMediaSourceAVFObjC::generateKeyReleaseMessage):
2959
2960 2014-09-19  Jer Noble  <jer.noble@apple.com>
2961
2962         [Media][Mac] Buffered range slides around as you resize a window
2963         https://bugs.webkit.org/show_bug.cgi?id=136960
2964
2965         Reviewed by Dean Jackson.
2966
2967         Rather than using a canvas as the background image for the timeline slider, use a generated SVG image
2968         to represent the buffered ranges.
2969
2970         * Modules/mediacontrols/mediaControlsApple.css:
2971         (audio::-webkit-media-controls-timeline):
2972         * Modules/mediacontrols/mediaControlsApple.js:
2973         (Controller.prototype.createControls):
2974         (Controller.prototype.updateProgress):
2975
2976 2014-09-19  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2977
2978         [CoordinatedGraphics][EFL] window.scrollTo(x, y) doesn't work when fixed layout is enabled
2979         https://bugs.webkit.org/show_bug.cgi?id=136917
2980
2981         Reviewed by Darin Adler.
2982
2983         When fixed layout is enabled, scrollTo doesn't work on EFL port with coordinated graphics.
2984         Since updateScrollbars() doesn't update scroll position when delegatesScrolling() is enabled. 
2985         To fix this issue, EFL port should update scroll position based on WK2 port. This patch
2986         update scroll position in FrameView::requestScrollPositionUpdate() as Mac port.
2987
2988         TestWebKitAPI: Tools/TestWebKitAPI/Tests/WebKit2/efl/WKViewScrollTo
2989
2990         * page/FrameView.cpp:
2991         (WebCore::FrameView::requestScrollPositionUpdate):
2992
2993 2014-09-19  Brent Fulgham  <bfulgham@apple.com>
2994
2995         Latching in iframes is not working as expected
2996         https://bugs.webkit.org/show_bug.cgi?id=136729
2997         <rdar://problem/18370549>
2998
2999         Reviewed by Simon Fraser.
3000
3001         Test: platform/mac/fast/scrolling/scrolling-iframe-100pct.html
3002
3003         Correct latching behavior by moving the concept of latching from the event handler to the main frame.
3004         The event handlers are per-document, and can improperly latch to the iframe element (rather than the
3005         scrollable content of the iframe) resulting in incorrect behavior.
3006
3007         Also move the wheel event delta tracking to the main frame, as this is similarly "top-level" in nature.
3008
3009         * WebCore.vcxproj/WebCore.vcxproj: Add new LatchedState class.
3010         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
3011         * WebCore.xcodeproj/project.pbxproj: Ditto.
3012         * page/EventHandler.cpp:
3013         (WebCore::EventHandler::EventHandler): Update constructor after moving some members to the new
3014         LatchedState object.
3015         (WebCore::EventHandler::clear): Call 'clear' on the LatchedState class.
3016         (WebCore::EventHandler::platformRecordWheelEvent):  Update for new LatchedState class.
3017         (WebCore::EventHandler::handleWheelEvent): Ditto.
3018         (WebCore::EventHandler::clearLatchedState): Ditto.
3019         (WebCore::EventHandler::defaultWheelEventHandler): Ditto.
3020         * page/EventHandler.h:
3021         * page/LatchedState.cpp: Added.
3022         (WebCore::LatchedState::LatchedState):
3023         (WebCore::LatchedState::~LatchedState):
3024         (WebCore::LatchedState::clear):
3025         (WebCore::LatchedState::setWheelEventElement):
3026         (WebCore::LatchedState::setWidgetIsLatched):
3027         (WebCore::LatchedState::setPreviousWheelScrolledElement):
3028         (WebCore::LatchedState::setScrollableContainer):
3029         * page/LatchedState.h: Added.
3030         (WebCore::LatchedState::wheelEventElement):
3031         (WebCore::LatchedState::frame):
3032         (WebCore::LatchedState::setFrame):
3033         (WebCore::LatchedState::widgetIsLatched):
3034         (WebCore::LatchedState::previousWheelScrolledElement):
3035         (WebCore::LatchedState::scrollableContainer):
3036         (WebCore::LatchedState::startedGestureAtScrollLimit):
3037         (WebCore::LatchedState::setStartedGestureAtScrollLimit):
3038         * page/MainFrame.cpp:
3039         (WebCore::MainFrame::MainFrame): Update for new members (LatchedState and WheelEventDeltaTracker)
3040         * page/MainFrame.h:
3041         * page/mac/EventHandlerMac.mm:
3042         (WebCore::EventHandler::platformPrepareForWheelEvents): Use mainFrame-located latching information.
3043         (WebCore::EventHandler::platformRecordWheelEvent): Use mainFrame-located wheel event delta tracking.
3044         (WebCore::EventHandler::platformCompleteWheelEvent): Make sure to use the latched frame as well as
3045         the latched element so that events get routed properly.
3046         (WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent): Update for new mainFrame
3047         location for latched state information.
3048
3049 2014-09-19  Chris Dumez  <cdumez@apple.com>
3050
3051         Minimize virtual function calls in MarkupAccumulator
3052         https://bugs.webkit.org/show_bug.cgi?id=136957
3053
3054         Reviewed by Benjamin Poulain.
3055
3056         This patch minimizes the number of virtual function calls in
3057         MarkupAccumulator by:
3058         - De-virtualizing MarkupAccumulator::appendString(), which is never
3059           overridden
3060         - Having MarkupAccumulator::appendEndTag() virtual function take an
3061           Element in argument instead of a Node, as it only applies to Element.
3062           Also add a non-virtual overload that takes a Node in argument and
3063           that does the isElementNode() check so that we don't need to explicitly
3064           do the check at each call site.
3065
3066         No new tests, no behavior change.
3067
3068         * editing/MarkupAccumulator.cpp:
3069         (WebCore::MarkupAccumulator::appendEndTag):
3070         (WebCore::MarkupAccumulator::shouldSelfClose):
3071         (WebCore::MarkupAccumulator::appendEndMarkup):
3072         * editing/MarkupAccumulator.h:
3073         (WebCore::MarkupAccumulator::appendEndTag):
3074         * page/PageSerializer.cpp:
3075         (WebCore::SerializerMarkupAccumulator::appendEndTag):
3076
3077 2014-09-19  Pratik Solanki  <psolanki@apple.com>
3078
3079         [iOS] ASSERTION FAILED: WTF::isMainThread() in WebCore::memoryCache() when using WebKit1
3080         https://bugs.webkit.org/show_bug.cgi?id=136962
3081         <rdar://problem/18342344>
3082
3083         Reviewed by Geoffrey Garen.
3084
3085         The disk cache monitor callback code was being executed on the main thread. This is wrong
3086         when the web thread is being used in WebKit1 on iOS. The code needs to run on the web
3087         thread. Use WebThreadRun to dispatch the block to the web thread. This works for WebKit2 as
3088         well since when web thread is not being used, WebThreadRun invokes the block directly.
3089
3090         * loader/cocoa/DiskCacheMonitorCocoa.mm:
3091         (WebCore::DiskCacheMonitor::DiskCacheMonitor):
3092
3093 2014-09-19  Jer Noble  <jer.noble@apple.com>
3094
3095         Unreviewed build fix; pass duration into the lambda.
3096
3097         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3098         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationChanged):
3099
3100 2014-09-19  Dean Jackson  <dino@apple.com>
3101
3102         Multithreaded WebGL is a bad idea - remove it
3103         https://bugs.webkit.org/show_bug.cgi?id=136964
3104         <rdar://problem/18399858>
3105
3106         Reviewed by Brent Fulgham.
3107
3108         We should not allow multithreaded GL access. Remove the
3109         feature.
3110
3111         * html/canvas/WebGLRenderingContext.cpp:
3112         (WebCore::WebGLRenderingContext::create):
3113         * page/Settings.in:
3114         * platform/graphics/GraphicsContext3D.h:
3115         (WebCore::GraphicsContext3D::Attributes::Attributes):
3116         * platform/graphics/mac/GraphicsContext3DMac.mm:
3117         (WebCore::GraphicsContext3D::GraphicsContext3D):
3118
3119 2014-09-19  Eric Carlson  <eric.carlson@apple.com>
3120
3121         [MSE][Mac] work around AVSampleBufferRenderSynchronizer early callbacks
3122         https://bugs.webkit.org/show_bug.cgi?id=136958
3123
3124         Reviewed by Jer Noble.
3125
3126         No new tests, we have been unable to come up with a test case that reproduces
3127         this issue reliably.
3128
3129         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3130         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationChanged): Set the synchronizer
3131             time to duration when the duration time observer is called early. Add more logging.
3132
3133 2014-09-19  Benjamin Poulain  <bpoulain@apple.com>
3134
3135         CSS JIT: allocate the minimum required register count in debug
3136         https://bugs.webkit.org/show_bug.cgi?id=136933
3137
3138         Reviewed by Andreas Kling.
3139
3140         It is hard to catch bugs of minimumRegisterRequirements() because every CPU has a different
3141         number of registers available by default.
3142
3143         This patch aims at improving testing by creating artificial register pressure when running
3144         in debug. When running in debug, we no longer allocate all the available registers right away.
3145         Instead, we allocate just enough to satisfy minimumRegisterRequirements().
3146
3147         The expectation with this is that under-allocation would be detected quicker since they would
3148         crash debug builds.
3149
3150         * cssjit/RegisterAllocator.h:
3151         (WebCore::RegisterAllocator::RegisterAllocator):
3152         (WebCore::RegisterAllocator::reserveCallerSavedRegisters):
3153         (WebCore::RegisterAllocator::availableRegisterCount): Deleted.
3154         * cssjit/SelectorCompiler.cpp:
3155         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
3156
3157 2014-09-19  Benjamin Poulain  <bpoulain@apple.com>
3158
3159         Add a size check for CSSSelector
3160         https://bugs.webkit.org/show_bug.cgi?id=136882
3161
3162         Reviewed by Christophe Dumez.
3163
3164         * css/CSSSelector.cpp:
3165
3166 2014-09-19  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
3167
3168         REGRESSION(r173464): It broke the !ENABLE(PICTURE_SIZES) build
3169         https://bugs.webkit.org/show_bug.cgi?id=136942
3170
3171         Reviewed by Simon Fraser.
3172
3173         * html/HTMLImageElement.cpp:
3174         (WebCore::HTMLImageElement::parseAttribute):
3175
3176 2014-09-19  Simon Fraser  <simon.fraser@apple.com>
3177
3178         Provide a default argument for the most commonly used HitTestRequest variant
3179         https://bugs.webkit.org/show_bug.cgi?id=136653
3180
3181         Reviewed by Darin Adler.
3182
3183         Make the default HitTestRequest flags be ReadOnly | Active | DisallowShadowContent
3184         and change call sites using the default flags to use a HitTestRequest temporary.
3185
3186         * dom/TreeScope.cpp:
3187         (WebCore::nodeFromPoint):
3188         * editing/FrameSelection.cpp:
3189         (WebCore::FrameSelection::contains):
3190         * page/DragController.cpp:
3191         (WebCore::elementUnderMouse):
3192         * page/EventHandler.cpp:
3193         (WebCore::EventHandler::handleMouseDraggedEvent):
3194         (WebCore::EventHandler::handleMousePressEvent):
3195         * rendering/HitTestRequest.h:
3196         (WebCore::HitTestRequest::HitTestRequest):
3197
3198 2014-09-19  Chris Dumez  <cdumez@apple.com>
3199
3200         Allow DOM methods to return references instead of pointers
3201         https://bugs.webkit.org/show_bug.cgi?id=136931
3202
3203         Reviewed by Sam Weinig.
3204
3205         It is common practice in WebKit to have methods return a reference
3206         instead of a pointer if the pointer can never be null. However, this
3207         unfortunately did not work for DOM methods (functions called by JS
3208         bindings). This prevented further refactoring.
3209
3210         This patch brings support for having DOM methods to return references
3211         instead of pointers when the pointer cannot be null. The generated
3212         bindings were calling WTF::getPtr() on the pointer type returned by
3213         the implementation already (in case it was a smart pointer type).
3214         This patch leverages this by having WTF::getPtr() convert reference
3215         arguments into raw pointers.
3216
3217         This patch also updates a few DOM methods on Document and Element
3218         classes to return a reference instead of a pointer, to test the change.
3219         There are likely more DOM methods that can be updated though.
3220
3221         No new tests, no behavior change.
3222
3223         * accessibility/AccessibilityObject.cpp:
3224         (WebCore::AccessibilityObject::classList):
3225         * bindings/js/JSDOMBinding.h:
3226         (WTF::getPtr): Deleted.
3227         * dom/Document.cpp:
3228         (WebCore::Document::implementation):
3229         (WebCore::Document::webkitGetNamedFlows):
3230         (WebCore::Document::namedFlows):
3231         (WebCore::Document::setXMLVersion):
3232         (WebCore::Document::setXMLStandalone):
3233         (WebCore::Document::securityPolicy):
3234         (WebCore::Document::styleSheets):
3235         * dom/Document.h:
3236         (WebCore::Document::timing):
3237         * dom/Element.cpp:
3238         (WebCore::Element::classList):
3239         (WebCore::Element::dataset):
3240         * dom/Element.h:
3241         * html/shadow/MediaControlElements.cpp:
3242         (WebCore::MediaControlPanelElement::setPosition):
3243         (WebCore::MediaControlPanelElement::resetPosition):
3244         (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):
3245         * html/track/VTTRegion.cpp:
3246         (WebCore::VTTRegion::displayLastTextTrackCueBox):
3247         (WebCore::VTTRegion::willRemoveTextTrackCueBox):
3248         * inspector/InspectorCSSAgent.cpp:
3249         (WebCore::InspectorCSSAgent::getAllStyleSheets):
3250         (WebCore::InspectorCSSAgent::getNamedFlowCollection):
3251         * page/PerformanceTiming.cpp:
3252         (WebCore::PerformanceTiming::documentTiming):
3253         * rendering/FlowThreadController.cpp:
3254         (WebCore::FlowThreadController::ensureRenderFlowThreadWithName):
3255
3256 2014-09-19  Daniel Bates  <dabates@apple.com>
3257
3258         Always assume internal SDK when building configuration Production
3259         https://bugs.webkit.org/show_bug.cgi?id=136925
3260         <rdar://problem/18362399>
3261
3262         Reviewed by Dan Bernstein.
3263
3264         As a side effect of this change we will always enable ENABLE_TOUCH_EVENTS, ENABLE_IOS_{GESTURE, TOUCH}_EVENTS,
3265         and ENABLE_XSLT when either building configuration Production or building with the Internal SDK.
3266
3267         * Configurations/Base.xcconfig:
3268
3269 2014-09-19  Chris Dumez  <cdumez@apple.com>
3270
3271         Optimize MarkupAccumulator::appendText()
3272         https://bugs.webkit.org/show_bug.cgi?id=136935
3273
3274         Reviewed by Benjamin Poulain.
3275
3276         MarkupAccumulator::appendText() was calling the generic appendNodeValue()
3277         method to append the text. appendNodeValue() supports any kind of Node and
3278         thus calls the Node::nodeValue() virtual function.
3279
3280         Since appendText() is the only caller to appendNodeValue(), this patch
3281         inlines the code in appendText() and makes it specific to Text Node, and
3282         thus more efficient. The code now calls CharacterData::data() instead of
3283         the Node::nodeValue() virtual function. This patch also updates
3284         CharacterData::data() to return a const reference to avoid copying the
3285         return value.
3286
3287         No new tests, no behavior change.
3288
3289         * dom/CharacterData.h:
3290         (WebCore::CharacterData::data):
3291         * editing/MarkupAccumulator.cpp:
3292         (WebCore::MarkupAccumulator::appendText):
3293         (WebCore::MarkupAccumulator::appendNodeValue): Deleted.
3294         * editing/MarkupAccumulator.h:
3295
3296 2014-09-18  Carlos Garcia Campos  <cgarcia@igalia.com>
3297
3298         [GTK] Dot not allow to create delete-on-destroy GMainLoopSources
3299         https://bugs.webkit.org/show_bug.cgi?id=136923
3300
3301         Reviewed by Gustavo Noronha Silva.
3302
3303         * platform/gtk/GtkDragAndDropHelper.cpp:
3304         (WebCore::GtkDragAndDropHelper::handleDragLeave): Use GMainLoopSource::scheduleAndDeleteOnDestroy().
3305
3306 2014-09-18  Roger Fong  <roger_fong@apple.com>
3307
3308         Add a move operator and constructor override to HashSet.
3309         https://bugs.webkit.org/show_bug.cgi?id=136934.
3310
3311         * dom/Node.cpp:
3312         (WebCore::Document::invalidateNodeListAndCollectionCaches): Remove the now unneeded call to clear the HashSet.
3313
3314 2014-09-18  Roger Fong  <roger_fong@apple.com>
3315
3316         [Windows] Media tests all fail because they cannot find localized strings.
3317         
3318         * rendering/RenderThemeSafari.cpp:
3319         (WebCore::RenderThemeSafari::mediaControlsScript):
3320         Make sure to use localized strings files in RenderThemeSafari.
3321
3322 2014-09-18  Simon Fraser  <simon.fraser@apple.com>
3323
3324         Remove generator/yield terminology in RenderInline's GeneratorContext
3325         https://bugs.webkit.org/show_bug.cgi?id=119278
3326
3327         Reviewed by Sam Weinig.
3328         
3329         Get rid of the icky Generator/yield syntax used for collecting rects in RenderInline.
3330         Just replace the operator() with an explicit addRect().
3331         
3332         Also some drive-by nullptr cleanup, and removing default arguments from
3333         addChildIgnoringContinuation() calls.
3334
3335         * rendering/RenderInline.cpp:
3336         (WebCore::RenderInline::willBeDestroyed):
3337         (WebCore::RenderInline::styleDidChange):
3338         (WebCore::RenderInline::splitInlines):
3339         (WebCore::RenderInline::addChildToContinuation):
3340         (WebCore::RenderInline::generateLineBoxRects):
3341         (WebCore::RenderInline::generateCulledLineBoxRects):
3342         * rendering/RenderInline.h:
3343
3344 2014-09-18  Jeremy Jones  <jeremyj@apple.com>
3345
3346         Improve fullscreen video rotation animation.
3347         https://bugs.webkit.org/show_bug.cgi?id=136870
3348
3349         Reviewed by Simon Fraser.
3350
3351         Instead of setting the frame on the video layer, set position and bounds separately. This allows the position to be synchronized with the rest of the animation.
3352         When using a fencePort to synchronize animations, if the fence times out, pivoting around the center provides a better fallback.
3353
3354         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3355         (-[WebAVVideoLayer setVideoSublayer:]): added
3356         (-[WebAVVideoLayer videoSublayer]): added
3357         (-[WebAVVideoLayer setBounds:]):  set position and bounds insted of frame.
3358         (WebVideoFullscreenInterfaceAVKit::setupFullscreen): use setVideoSublayer
3359         * platform/ios/WebVideoFullscreenModelVideoElement.mm:
3360         (WebVideoFullscreenModelVideoElement::setVideoFullscreenLayer): set bounds and anchorPoint instead of frame
3361         (WebVideoFullscreenModelVideoElement::setVideoLayerFrame): set bounds instead of frame.
3362
3363 2014-09-17  Myles C. Maxfield  <mmaxfield@apple.com>
3364
3365         Text laid out with the SVG -> OTF font converter does not have the same metrics as with the SVG font code path
3366         https://bugs.webkit.org/show_bug.cgi?id=136907
3367
3368         Reviewed by Darin Adler.
3369
3370         There are three things that are causing text laid out with the SVG -> OTF font converter to not have metrics that
3371         measure our existing SVG codepath. They are:
3372
3373         1. Creating a font with a 0 ascent or descent makes OS X think that something is wrong with the font, and take
3374         a different codepath when trying to parse ascent and descent information. This patch checks for this condition
3375         and sets the ascent/descent to 1 FUnit instead (which is generally much smaller than a pixel).
3376         2. Our SVG font codepath hardcodes a line gap of 1/10th of the font size for every font. This patch makes the
3377         font converter obey this.
3378         3. The converter was not allowing for default glyph advances as per the SVG font specification. This patch
3379         does so.
3380
3381         No new tests yet, but they will come soon! I promise!
3382
3383         * svg/SVGToOTFFontConversion.cpp:
3384         (WebCore::SVGToOTFFontConverter::appendHHEATable):
3385         (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):
3386
3387 2014-09-18  Daniel Bates  <dabates@apple.com>
3388
3389         REGRESSION (r168921): SVG elements may be unnecessarily rebuilt
3390         https://bugs.webkit.org/show_bug.cgi?id=136373
3391
3392         Reviewed by David Kilzer.
3393
3394         Fixes an issue where a SVG element may be unnecessarily rebuilt. In particular,
3395         it is unnecessary to rebuild a SVG element that will be removed from the document.
3396
3397         Test: svg/custom/remove-subtree-including-use-with-child-textpath-that-references-earlier-path.html
3398
3399         * svg/SVGDocumentExtensions.cpp:
3400         (WebCore::SVGDocumentExtensions::removeAllElementReferencesForTarget): Modified to remove a SVG element
3401         from the list of elements to be rebuilt.
3402
3403 2014-09-18  Joseph Pecoraro  <pecoraro@apple.com>
3404
3405         Unreviewed rollout r173731. Broke multiple builds.
3406
3407         * WebCore.exp.in:
3408         * inspector/InspectorController.cpp:
3409         (WebCore::InspectorController::connectFrontend):
3410         (WebCore::InspectorController::show):
3411         * inspector/InspectorController.h:
3412         * page/PageDebuggable.cpp:
3413         (WebCore::PageDebuggable::connect):
3414         * page/PageDebuggable.h:
3415         * testing/Internals.cpp:
3416         (WebCore::Internals::openDummyInspectorFrontend):
3417
3418 2014-09-18  Beth Dakin  <bdakin@apple.com>
3419
3420         ASSERT in RenderBox::instrinsicScrollbarLogicalWidth opening the inspector
3421         https://bugs.webkit.org/show_bug.cgi?id=136929
3422
3423         Reviewed by Simon Fraser.
3424
3425         This is a regression from http://trac.webkit.org/changeset/173668 
3426         This code is wrong after that change because it assumes that overflow:scroll will 
3427         always have a scrollbar. That is no longer the case. We need to check to make sure 
3428         it’s an overflow:scroll that does NOT have overflow:auto behavior.
3429
3430         * rendering/RenderBox.cpp:
3431         (WebCore::RenderBox::instrinsicScrollbarLogicalWidth):
3432
3433 2014-09-18  Joseph Pecoraro  <pecoraro@apple.com>
3434
3435         Web Inspector: Should be able to attach a debugger to a JSContext before anything is executed
3436         https://bugs.webkit.org/show_bug.cgi?id=136893