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