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