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