42164be71390e4e7ad69b6bfa21eb8ce792a47d3
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-08-24  Darin Adler  <darin@apple.com>
2
3         Frame::tree should return a reference instead of a pointer
4         https://bugs.webkit.org/show_bug.cgi?id=120259
5
6         Reviewed by Andreas Kling.
7
8         * page/Frame.h:
9         (WebCore::Frame::tree): Return a reference instead of a pointer.
10
11         * bindings/js/JSDOMWindowCustom.cpp:
12         (WebCore::childFrameGetter):
13         (WebCore::indexGetter):
14         (WebCore::JSDOMWindow::getOwnPropertySlot):
15         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
16         (WebCore::JSDOMWindow::setLocation):
17         * bindings/js/PageScriptDebugServer.cpp:
18         (WebCore::PageScriptDebugServer::setJavaScriptPaused):
19         * dom/Document.cpp:
20         (WebCore::canAccessAncestor):
21         (WebCore::Document::adoptNode):
22         (WebCore::Document::canNavigate):
23         (WebCore::Document::findUnsafeParentScrollPropagationBoundary):
24         (WebCore::Document::notifySeamlessChildDocumentsOfStylesheetUpdate):
25         (WebCore::Document::openSearchDescriptionURL):
26         (WebCore::Document::setDesignMode):
27         (WebCore::Document::parentDocument):
28         (WebCore::Document::initSecurityContext):
29         (WebCore::Document::initContentSecurityPolicy):
30         (WebCore::Document::requestFullScreenForElement):
31         (WebCore::Document::webkitExitFullscreen):
32         (WebCore::Document::didRemoveTouchEventHandler):
33         * dom/TreeScope.cpp:
34         (WebCore::focusedFrameOwnerElement):
35         * editing/FrameSelection.cpp:
36         (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected):
37         * history/CachedFrame.cpp:
38         (WebCore::CachedFrameBase::CachedFrameBase):
39         (WebCore::CachedFrameBase::restore):
40         (WebCore::CachedFrame::CachedFrame):
41         * history/CachedPage.cpp:
42         (WebCore::CachedPage::restore):
43         * history/PageCache.cpp:
44         (WebCore::logCanCacheFrameDecision):
45         (WebCore::PageCache::canCachePageContainingThisFrame):
46         * html/HTMLDocument.cpp:
47         (WebCore::HTMLDocument::hasFocus):
48         * html/HTMLPlugInImageElement.cpp:
49         (WebCore::HTMLPlugInImageElement::restartSimilarPlugIns):
50         * inspector/InspectorApplicationCacheAgent.cpp:
51         (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
52         * inspector/InspectorCanvasAgent.cpp:
53         (WebCore::InspectorCanvasAgent::findFramesWithUninstrumentedCanvases):
54         (WebCore::InspectorCanvasAgent::frameNavigated):
55         * inspector/InspectorDOMAgent.cpp:
56         (WebCore::InspectorDOMAgent::documents):
57         * inspector/InspectorFileSystemAgent.cpp:
58         (WebCore::InspectorFileSystemAgent::assertScriptExecutionContextForOrigin):
59         * inspector/InspectorPageAgent.cpp:
60         (WebCore::InspectorPageAgent::getCookies):
61         (WebCore::InspectorPageAgent::deleteCookie):
62         (WebCore::InspectorPageAgent::searchInResources):
63         (WebCore::InspectorPageAgent::findFrameWithSecurityOrigin):
64         (WebCore::InspectorPageAgent::buildObjectForFrame):
65         (WebCore::InspectorPageAgent::buildObjectForFrameTree):
66         * inspector/PageRuntimeAgent.cpp:
67         (WebCore::PageRuntimeAgent::reportExecutionContextCreation):
68         * loader/DocumentLoader.cpp:
69         (WebCore::DocumentLoader::willSendRequest):
70         (WebCore::DocumentLoader::mainResource):
71         * loader/DocumentWriter.cpp:
72         (WebCore::DocumentWriter::createDecoderIfNeeded):
73         * loader/FrameLoader.cpp:
74         (WebCore::FrameLoader::submitForm):
75         (WebCore::FrameLoader::allChildrenAreComplete):
76         (WebCore::FrameLoader::allAncestorsAreComplete):
77         (WebCore::FrameLoader::loadURLIntoChildFrame):
78         (WebCore::FrameLoader::outgoingReferrer):
79         (WebCore::FrameLoader::updateFirstPartyForCookies):
80         (WebCore::FrameLoader::setFirstPartyForCookies):
81         (WebCore::FrameLoader::completed):
82         (WebCore::FrameLoader::started):
83         (WebCore::FrameLoader::loadURL):
84         (WebCore::FrameLoader::loadWithDocumentLoader):
85         (WebCore::FrameLoader::stopAllLoaders):
86         (WebCore::FrameLoader::commitProvisionalLoad):
87         (WebCore::FrameLoader::closeOldDataSources):
88         (WebCore::FrameLoader::prepareForCachedPageRestore):
89         (WebCore::FrameLoader::subframeIsLoading):
90         (WebCore::FrameLoader::subresourceCachePolicy):
91         (WebCore::FrameLoader::detachChildren):
92         (WebCore::FrameLoader::closeAndRemoveChild):
93         (WebCore::FrameLoader::checkLoadComplete):
94         (WebCore::FrameLoader::numPendingOrLoadingRequests):
95         (WebCore::FrameLoader::detachFromParent):
96         (WebCore::FrameLoader::shouldClose):
97         (WebCore::FrameLoader::handleBeforeUnloadEvent):
98         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
99         (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
100         (WebCore::FrameLoader::findFrameForNavigation):
101         (WebCore::FrameLoader::effectiveSandboxFlags):
102         (WebCore::createWindow):
103         * loader/HistoryController.cpp:
104         (WebCore::HistoryController::saveDocumentState):
105         (WebCore::HistoryController::saveDocumentAndScrollState):
106         (WebCore::HistoryController::restoreDocumentState):
107         (WebCore::HistoryController::goToItem):
108         (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
109         (WebCore::HistoryController::recursiveUpdateForCommit):
110         (WebCore::HistoryController::recursiveUpdateForSameDocumentNavigation):
111         (WebCore::HistoryController::initializeItem):
112         (WebCore::HistoryController::createItemTree):
113         (WebCore::HistoryController::recursiveSetProvisionalItem):
114         (WebCore::HistoryController::recursiveGoToItem):
115         (WebCore::HistoryController::currentFramesMatchItem):
116         * loader/NavigationScheduler.cpp:
117         (WebCore::NavigationScheduler::mustLockBackForwardList):
118         (WebCore::NavigationScheduler::scheduleFormSubmission):
119         * loader/ProgressTracker.cpp:
120         (WebCore::ProgressTracker::progressStarted):
121         (WebCore::ProgressTracker::progressCompleted):
122         (WebCore::ProgressTracker::isMainLoadProgressing):
123         * loader/appcache/ApplicationCacheGroup.cpp:
124         (WebCore::ApplicationCacheGroup::selectCache):
125         (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
126         * loader/archive/cf/LegacyWebArchive.cpp:
127         (WebCore::LegacyWebArchive::create):
128         * loader/cache/CachedResourceLoader.cpp:
129         (WebCore::CachedResourceLoader::checkInsecureContent):
130         * loader/icon/IconController.cpp:
131         (WebCore::IconController::urlsForTypes):
132         (WebCore::IconController::startLoader):
133         * page/Chrome.cpp:
134         (WebCore::canRunModalIfDuringPageDismissal):
135         (WebCore::Chrome::windowScreenDidChange):
136         * page/DOMWindow.cpp:
137         (WebCore::DOMWindow::length):
138         (WebCore::DOMWindow::name):
139         (WebCore::DOMWindow::setName):
140         (WebCore::DOMWindow::parent):
141         (WebCore::DOMWindow::top):
142         (WebCore::DOMWindow::open):
143         * page/EventHandler.cpp:
144         (WebCore::EventHandler::scrollRecursively):
145         (WebCore::EventHandler::logicalScrollRecursively):
146         (WebCore::EventHandler::handleMouseMoveEvent):
147         * page/FocusController.cpp:
148         (WebCore::FocusController::setContainingWindowIsVisible):
149         * page/Frame.cpp:
150         (WebCore::parentPageZoomFactor):
151         (WebCore::parentTextZoomFactor):
152         (WebCore::Frame::setPrinting):
153         (WebCore::Frame::shouldUsePrintingLayout):
154         (WebCore::Frame::dispatchVisibilityStateChangeEvent):
155         (WebCore::Frame::willDetachPage):
156         (WebCore::Frame::setPageAndTextZoomFactors):
157         (WebCore::Frame::deviceOrPageScaleFactorChanged):
158         (WebCore::Frame::notifyChromeClientWheelEventHandlerCountChanged):
159         (WebCore::Frame::isURLAllowed):
160         * page/FrameTree.cpp:
161         (WebCore::FrameTree::~FrameTree):
162         (WebCore::FrameTree::setName):
163         (WebCore::FrameTree::transferChild):
164         (WebCore::FrameTree::appendChild):
165         (WebCore::FrameTree::actuallyAppendChild):
166         (WebCore::FrameTree::removeChild):
167         (WebCore::FrameTree::uniqueChildName):
168         (WebCore::FrameTree::scopedChild):
169         (WebCore::FrameTree::scopedChildCount):
170         (WebCore::FrameTree::childCount):
171         (WebCore::FrameTree::child):
172         (WebCore::FrameTree::find):
173         (WebCore::FrameTree::isDescendantOf):
174         (WebCore::FrameTree::traverseNext):
175         (WebCore::FrameTree::traversePreviousWithWrap):
176         (WebCore::FrameTree::deepLastChild):
177         (WebCore::FrameTree::top):
178         (printFrames):
179         (showFrameTree):
180         * page/FrameView.cpp:
181         (WebCore::FrameView::setFrameRect):
182         (WebCore::FrameView::hasCompositedContentIncludingDescendants):
183         (WebCore::FrameView::hasCompositingAncestor):
184         (WebCore::FrameView::flushCompositingStateIncludingSubframes):
185         (WebCore::FrameView::updateCanBlitOnScrollRecursively):
186         (WebCore::FrameView::setIsOverlapped):
187         (WebCore::FrameView::shouldUseLoadTimeDeferredRepaintDelay):
188         (WebCore::FrameView::updateLayerFlushThrottlingInAllFrames):
189         (WebCore::FrameView::serviceScriptedAnimations):
190         (WebCore::FrameView::updateBackgroundRecursively):
191         (WebCore::FrameView::parentFrameView):
192         (WebCore::FrameView::paintContentsForSnapshot):
193         (WebCore::FrameView::setTracksRepaints):
194         (WebCore::FrameView::notifyWidgetsInAllFrames):
195         * page/Location.cpp:
196         (WebCore::Location::ancestorOrigins):
197         * page/Page.cpp:
198         (WebCore::networkStateChanged):
199         (WebCore::Page::~Page):
200         (WebCore::Page::renderTreeSize):
201         (WebCore::Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment):
202         (WebCore::Page::setNeedsRecalcStyleInAllFrames):
203         (WebCore::Page::refreshPlugins):
204         (WebCore::Page::takeAnyMediaCanStartListener):
205         (WebCore::incrementFrame):
206         (WebCore::Page::setDefersLoading):
207         (WebCore::Page::setMediaVolume):
208         (WebCore::Page::setDeviceScaleFactor):
209         (WebCore::Page::setShouldSuppressScrollbarAnimations):
210         (WebCore::Page::didMoveOnscreen):
211         (WebCore::Page::willMoveOffscreen):
212         (WebCore::Page::setIsInWindow):
213         (WebCore::Page::suspendScriptedAnimations):
214         (WebCore::Page::resumeScriptedAnimations):
215         (WebCore::Page::userStyleSheetLocationChanged):
216         (WebCore::Page::allVisitedStateChanged):
217         (WebCore::Page::visitedStateChanged):
218         (WebCore::Page::setDebugger):
219         (WebCore::Page::setMemoryCacheClientCallsEnabled):
220         (WebCore::Page::setMinimumTimerInterval):
221         (WebCore::Page::setTimerAlignmentInterval):
222         (WebCore::Page::dnsPrefetchingStateChanged):
223         (WebCore::Page::collectPluginViews):
224         (WebCore::Page::storageBlockingStateChanged):
225         (WebCore::Page::privateBrowsingStateChanged):
226         (WebCore::Page::checkSubframeCountConsistency):
227         (WebCore::Page::suspendActiveDOMObjectsAndAnimations):
228         (WebCore::Page::resumeActiveDOMObjectsAndAnimations):
229         (WebCore::Page::captionPreferencesChanged):
230         * page/PageGroup.cpp:
231         (WebCore::PageGroup::invalidateInjectedStyleSheetCacheInAllFrames):
232         * page/PageGroupLoadDeferrer.cpp:
233         (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
234         (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
235         * page/PageSerializer.cpp:
236         (WebCore::PageSerializer::serializeFrame):
237         * page/PageThrottler.cpp:
238         (WebCore::PageThrottler::throttlePage):
239         (WebCore::PageThrottler::unthrottlePage):
240         * page/Settings.cpp:
241         (WebCore::setImageLoadingSettings):
242         (WebCore::Settings::setTextAutosizingFontScaleFactor):
243         * page/SpatialNavigation.cpp:
244         (WebCore::rectToAbsoluteCoordinates):
245         * page/animation/AnimationController.cpp:
246         (WebCore::AnimationControllerPrivate::suspendAnimations):
247         (WebCore::AnimationControllerPrivate::resumeAnimations):
248         * page/mac/PageMac.cpp:
249         (WebCore::Page::addSchedulePair):
250         (WebCore::Page::removeSchedulePair):
251         * page/scrolling/ScrollingCoordinator.cpp:
252         (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
253         (WebCore::ScrollingCoordinator::computeCurrentWheelEventHandlerCount):
254         * plugins/PluginView.cpp:
255         (WebCore::PluginView::performRequest):
256         (WebCore::PluginView::load):
257         * rendering/HitTestResult.cpp:
258         (WebCore::HitTestResult::targetFrame):
259         * rendering/RenderLayerCompositor.cpp:
260         (WebCore::RenderLayerCompositor::enclosingCompositorFlushingLayers):
261         (WebCore::RenderLayerCompositor::updateCompositingLayers):
262         (WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange):
263         * rendering/TextAutosizer.cpp:
264         (WebCore::TextAutosizer::processSubtree):
265         * storage/StorageEventDispatcher.cpp:
266         (WebCore::StorageEventDispatcher::dispatchSessionStorageEvents):
267         (WebCore::StorageEventDispatcher::dispatchLocalStorageEvents):
268         * svg/SVGSVGElement.cpp:
269         (WebCore::SVGSVGElement::currentScale):
270         (WebCore::SVGSVGElement::setCurrentScale):
271         * testing/Internals.cpp:
272         (WebCore::Internals::formControlStateOfPreviousHistoryItem):
273         (WebCore::Internals::setFormControlStateOfPreviousHistoryItem):
274         (WebCore::Internals::numberOfScrollableAreas):
275         * xml/parser/XMLDocumentParserLibxml2.cpp:
276         (WebCore::hasNoStyleInformation):
277         Use tree(). instead of tree()->.
278
279 2013-08-24  Andreas Kling  <akling@apple.com>
280
281         Merge Document::viewportSize() logic into RenderView::viewportSize().
282         <https://webkit.org/b/120254>
283
284         Reviewed by Darin Adler.
285
286         RenderView can just ask FrameView (the viewport) about its size directly, no need for
287         a weirdly-placed method on Document.
288
289         * dom/Document.cpp:
290         * rendering/RenderView.cpp:
291         (WebCore::RenderView::viewportSize):
292         * rendering/RenderView.h:
293
294 2013-08-24  Andreas Kling  <akling@apple.com>
295
296         RenderObject::frame() should return a reference.
297         <https://webkit.org/b/120251>
298
299         Reviewed by Darin Adler.
300
301         There is now always a Frame, and we can get to it by walking this path:
302
303             RenderObject -> Document -> RenderView -> FrameView -> Frame
304
305         Removed the customary horde of null checks.
306
307 2013-08-24  Andreas Kling  <akling@apple.com>
308
309         RenderLayer::compositor() should return a reference.
310         <https://webkit.org/b/120250>
311
312         Reviewed by Anders Carlsson.
313
314         It was already converting from a reference to a pointer.
315
316 2013-08-24  Yoav Weiss  <yoav@yoav.ws>
317
318         Eliminate a useless comparison in srcset's candidate selection algorithm
319         https://bugs.webkit.org/show_bug.cgi?id=120235
320
321         There is no point in comparing the last item in the candidates vector to the DPR, since it will be returned anyway. Therefore, the
322         iteration on the candidates vector now skips the last candidate.
323
324         Reviewed by Andreas Kling.
325
326         * html/parser/HTMLParserIdioms.cpp:
327         (WebCore::bestFitSourceForImageAttributes):
328
329 2013-08-24  Andreas Kling  <akling@apple.com>
330
331         RenderObject::view() should return a reference.
332         <https://webkit.org/b/120247>
333
334         Reviewed by Antti Koivisto.
335
336         Now that the lifetime and accessibility characteristics of RenderView are well-defined,
337         we can make RenderObject::view() return a reference, exposing a plethora of unnecessary
338         null checks.
339
340 2013-08-24  Joseph Pecoraro  <pecoraro@apple.com>
341
342         Web Inspector: Cleanup Inspector Agents a bit
343         https://bugs.webkit.org/show_bug.cgi?id=120218
344
345         Reviewed by Andreas Kling.
346
347         Merge https://chromium.googlesource.com/chromium/blink/+/8693dcb8ba42a5c225f516c664fb0f453c8ba6f0.
348
349         * inspector/InspectorCSSAgent.cpp:
350         (WebCore::InspectorCSSAgent::elementForId):
351         * inspector/InspectorStyleSheet.cpp:
352         (ParsedStyleSheet::ParsedStyleSheet):
353         (WebCore::InspectorStyle::setPropertyText):
354         (WebCore::InspectorStyle::populateAllProperties):
355         (WebCore::InspectorStyleSheet::inlineStyleSheetText):
356
357 2013-08-24  Andreas Kling  <akling@apple.com>
358
359         Let Document keep its RenderView during render tree detach.
360         <https://webkit.org/b/120233>
361
362         Reviewed by Antti Koivisto.
363
364         Instead of having "Document::renderer() == NULL" signify that the render tree is being
365         torn down, give Document an explicit flag for this instead.
366
367         This way, we can keep Document's RenderView in place during tree detach.
368
369         * dom/Document.cpp:
370         (WebCore::Document::Document):
371         (WebCore::Document::detach):
372         * dom/Document.h:
373         (WebCore::Document::renderTreeBeingDestroyed):
374         * rendering/RenderObject.h:
375         (WebCore::RenderObject::documentBeingDestroyed):
376
377 2013-08-24  Antti Koivisto  <antti@apple.com>
378
379         Tighten before/after pseudo element accessors
380         https://bugs.webkit.org/show_bug.cgi?id=120204
381
382         Reviewed by Andreas Kling.
383
384         We have generic looking Element::pseudoElement(PseudoID) which only returns before/after pseudo elements.
385         
386         Switch to Element::before/afterPseudoElement(), similarly for setters.
387
388         * WebCore.exp.in:
389         * css/CSSComputedStyleDeclaration.cpp:
390         (WebCore::ComputedStyleExtractor::styledNode):
391         * dom/Element.cpp:
392         (WebCore::Element::~Element):
393         (WebCore::beforeOrAfterPseudeoElement):
394         (WebCore::Element::computedStyle):
395         (WebCore::Element::updatePseudoElement):
396         (WebCore::Element::createPseudoElementIfNeeded):
397         (WebCore::Element::updateBeforePseudoElement):
398         (WebCore::Element::updateAfterPseudoElement):
399         (WebCore::Element::beforePseudoElement):
400         (WebCore::Element::afterPseudoElement):
401         (WebCore::Element::setBeforePseudoElement):
402         (WebCore::Element::setAfterPseudoElement):
403         (WebCore::disconnectPseudoElement):
404         (WebCore::Element::clearBeforePseudoElement):
405         (WebCore::Element::clearAfterPseudoElement):
406         (WebCore::Element::clearStyleDerivedDataBeforeDetachingRenderer):
407         * dom/Element.h:
408         * dom/ElementRareData.h:
409         (WebCore::ElementRareData::beforePseudoElement):
410         (WebCore::ElementRareData::afterPseudoElement):
411         (WebCore::ElementRareData::hasPseudoElements):
412         (WebCore::ElementRareData::~ElementRareData):
413         (WebCore::ElementRareData::clearBeforePseudoElement):
414         (WebCore::ElementRareData::clearAfterPseudoElement):
415         (WebCore::ElementRareData::setBeforePseudoElement):
416         (WebCore::ElementRareData::setAfterPseudoElement):
417         
418             Move detach logic to Element. ElementRareData should not implement semantics.
419
420         * dom/Node.cpp:
421         (WebCore::Node::pseudoAwarePreviousSibling):
422         (WebCore::Node::pseudoAwareNextSibling):
423         (WebCore::Node::pseudoAwareFirstChild):
424         (WebCore::Node::pseudoAwareLastChild):
425         * dom/NodeRenderingTraversal.cpp:
426         (WebCore::NodeRenderingTraversal::nextSiblingSlow):
427         (WebCore::NodeRenderingTraversal::previousSiblingSlow):
428         * rendering/RenderTreeAsText.cpp:
429         (WebCore::writeCounterValuesFromChildren):
430         (WebCore::counterValueForElement):
431         * style/StyleResolveTree.cpp:
432         (WebCore::Style::attachRenderTree):
433         (WebCore::Style::resolveTree):
434         * testing/Internals.cpp:
435         (WebCore::Internals::pauseAnimationAtTimeOnPseudoElement):
436         (WebCore::Internals::pauseTransitionAtTimeOnPseudoElement):
437
438 2013-08-23  Simon Fraser  <simon.fraser@apple.com>
439
440         Improve scrolling behavior in iTunes
441         https://bugs.webkit.org/show_bug.cgi?id=120241
442         <rdar://problem/14825344>
443
444         Reviewed by Sam Weinig.
445
446         When vertically scrolling a page with horizontally scrollable overflow areas,
447         vertical scroll gestures would be interrupted when wheel events with non-zero
448         X deltas were intercepted by the overflow areas.
449         
450         Fix by storing a small history of wheel events deltas and using
451         it to determine of the scroll gesture is primarily vertical or horizontal.
452         When this is detected, avoid dispatching scroll events on the on the
453         non-dominant axis.
454         
455         Currently this behavior is conditionalized to only apply in iTunes.
456
457         * page/EventHandler.cpp:
458         (WebCore::EventHandler::EventHandler):
459         (WebCore::EventHandler::recordWheelEventDelta):
460         (WebCore::deltaIsPredominantlyVertical):
461         (WebCore::EventHandler::dominantScrollGestureDirection):
462         (WebCore::EventHandler::handleWheelEvent):
463         (WebCore::EventHandler::defaultWheelEventHandler):
464         * page/EventHandler.h:
465         * platform/RuntimeApplicationChecks.cpp:
466         (WebCore::applicationIsITunes):
467         * platform/RuntimeApplicationChecks.h:
468
469 2013-08-23  Pratik Solanki  <psolanki@apple.com>
470
471         MediaQuery::expressions() should return a reference
472         <https://webkit.org/b/120215>
473
474         Reviewed by Anders Carlsson.
475
476         m_expressions is never NULL so we can just return a reference.
477
478         * css/MediaList.cpp:
479         (WebCore::reportMediaQueryWarningIfNeeded):
480         * css/MediaQuery.cpp:
481         (WebCore::MediaQuery::MediaQuery):
482         * css/MediaQuery.h:
483         (WebCore::MediaQuery::expressions):
484         * css/MediaQueryEvaluator.cpp:
485         (WebCore::MediaQueryEvaluator::eval):
486
487 2013-08-23  Ryosuke Niwa  <rniwa@webkit.org>
488
489         Build fix after r154515.
490
491         * dom/ElementTraversal.h:
492         (WebCore::Traversal<ElementType>::firstChild):
493         (WebCore::Traversal<ElementType>::lastChild):
494
495 2013-08-23  Andreas Kling  <akling@apple.com>
496
497         Simplify some Settings access where we have a Frame in reach.
498         <http://webkit.org/b/120239>
499
500         Reviewed by Anders Carlsson.
501
502         In three cases where we can grab at a Frame, we can reach all the way to some Settings
503         without having to use pointers.
504
505         * loader/FrameLoader.cpp:
506         (WebCore::FrameLoader::didBeginDocument):
507         * rendering/RenderLayerCompositor.cpp:
508         (WebCore::RenderLayerCompositor::addToOverlapMap):
509         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
510
511 2013-08-23  Jer Noble  <jer.noble@apple.com>
512
513         REGRESSION (r150516): Media controls are messed up on right-to-left webpages
514         https://bugs.webkit.org/show_bug.cgi?id=120234
515
516         Reviewed by Dan Bernstein.
517
518         Test: media/video-rtl.html
519
520         Make the media control panel explicitly direction:ltr. The captions menu and captions
521         display are unaffected, so rtl content will continue to appear rtl there.
522
523         * css/mediaControls.css:
524         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
525
526 2013-08-23  Beth Dakin  <bdakin@apple.com>
527
528         REGRESSION (r132545): Some PDFs generated by WebKit are blank when viewed in 
529         Adobe Reader
530         https://bugs.webkit.org/show_bug.cgi?id=120240
531         -and corresponding-
532         <rdar://problem/14634453>
533
534         Reviewed by Anders Carlsson.
535
536         This patch makes it so that we don’t use the infinite rect for the PDF context, 
537         and it adds WebCoreSystemInterface API to find out if the current content is the 
538         PDF context. 
539
540         * WebCore.exp.in:
541         * platform/graphics/cg/GraphicsContextCG.cpp:
542         (WebCore::GraphicsContext::clipOut):
543         * platform/mac/WebCoreSystemInterface.h:
544         * platform/mac/WebCoreSystemInterface.mm:
545
546 2013-08-23  Eric Carlson  <eric.carlson@apple.com>
547
548         [Mac] some track language tags are not recognized
549         https://bugs.webkit.org/show_bug.cgi?id=119643
550
551         Reviewed by Jere Noble.
552
553         No new tests, existing tests updated.
554
555         * html/HTMLMediaElement.cpp:
556         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_captionDisplayMode from settings
557             if possible.
558         (WebCore::HTMLMediaElement::configureTextTrackGroup): Don't enable a default track when preferences
559             say captions should be disabled. Don't disable an already visible track if we don't find
560             a match unless preferences say captions should be disabled. m_forcedOrAutomaticSubtitleTrackLanguage ->
561             m_subtitleTrackLanguage.
562         (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): If the language of the primary
563             audio track changes, only kick off a text track recalc if caption preference are set to "automatic".
564         * html/HTMLMediaElement.h:
565
566         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
567         (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation): Initialize m_characteristicsChanged
568             and m_delayCharacteristicsChangedNotification.
569         (WebCore::MediaPlayerPrivateAVFoundation::setHasVideo): Call characteristicsChanged.
570         (WebCore::MediaPlayerPrivateAVFoundation::setHasAudio): Ditto.
571         (WebCore::MediaPlayerPrivateAVFoundation::setHasClosedCaptions): Ditto.
572         (WebCore::MediaPlayerPrivateAVFoundation::characteristicsChanged): New, allows us to coalesce 
573             calls to the media player when we know several characteristics may change.
574         (WebCore::MediaPlayerPrivateAVFoundation::setDelayCharacteristicsChangedNotification): Enable or
575             disable notification delay.
576         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
577
578         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
579         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Always call languageOfPrimaryAudioTrack(),
580             a track may have changed so we may have a new language.
581         (WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack): Call [AVAssetTrack languageCode]
582             if [AVAssetTrack extendedLanguageTag] returns NULL in case the media file has an old
583             QuickTime language code.
584
585 2013-08-23  Andreas Kling  <akling@apple.com>
586
587         RenderView::compositor() should return a reference.
588         <https://webkit.org/b/120217>
589
590         Reviewed by Beth Dakin.
591
592         The RenderLayerCompositor is lazily constructed by compositor() and never returns null.
593
594 2013-08-23  Yoav Weiss  <yoav@yoav.ws>
595
596         Fix srcset's image candidate algorithm when DPR exceeds all candidates
597         https://bugs.webkit.org/show_bug.cgi?id=120168
598
599         When the DPR exceeded the 'x' qualifier of all image candidates, none was chosen.
600
601         From the srcset spec: "If there are any entries in candidates that have an associated pixel density that is less than a
602         user-agent-defined value giving the nominal pixel density of the display, then remove them, unless that would remove all the
603         entries, in which case remove only the entries whose associated pixel density is less than the greatest such pixel density."
604
605         Fixed by returning the last one in the list of candidates sorted by their qualifier, in case none of them is equal or greater than
606         DPR.
607         
608         Reviewed by Andreas Kling.
609
610         Test: fast/hidpi/image-srcset-fraction.html
611
612         * html/parser/HTMLParserIdioms.cpp:
613         (WebCore::bestFitSourceForImageAttributes):
614
615 2013-08-23  Chris Fleizach  <cfleizach@apple.com>
616
617         <https://webkit.org/b/113895> Webkit exposes aria-expanded="undefined" as aria-expanded="false" (AXExpanded = NO)
618
619         Reviewed by Darin Adler.
620
621         Don't support the ARIA expanded attribute unless the value is one of the defined ARIA values (true/false).
622
623         Test: platform/mac/accessibility/aria-expanded-not-exposed-when-undefined.html
624
625         * accessibility/AccessibilityObject.cpp:
626         (WebCore::AccessibilityObject::supportsARIAExpanded):
627
628 2013-08-17  Darin Adler  <darin@apple.com>
629
630         <https://webkit.org/b/119945> Some cleanup for PasteboardIOS
631
632         Reviewed by Andreas Kling.
633
634         * platform/ios/PasteboardIOS.mm:
635         (WebCore::Pasteboard::setFrame): Moved this function up near the
636         create functions and constructors.
637         (WebCore::documentFragmentWithRTF): Tweaked formatting.
638         (WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
639         Ditto.
640         (WebCore::utiTypeFromCocoaType): Changed to use early return and removed
641         an unneeded local variable.
642         (WebCore::cocoaTypeFromHTMLClipboardType): Renamed the quaint qType and
643         pbType local variables, and tweaked formatting.
644         (WebCore::Pasteboard::clear): Tweaked comment.
645         (WebCore::Pasteboard::readString): Tweaked formatting.
646         (WebCore::addHTMLClipboardTypesForCocoaType): Tweaked formatting.
647         (WebCore::Pasteboard::writeString): Streamlined logic and tweaked formatting
648         (WebCore::Pasteboard::types): Renamed pbType to just type.
649
650 2013-08-23  Bem Jones-Bey  <bjonesbe@adobe.com>
651
652         Attempt to make it more clear what FloatIntervalSearchAdaptor::collectIfNeeded is doing
653         https://bugs.webkit.org/show_bug.cgi?id=119816
654
655         Reviewed by David Hyatt.
656
657         This is a port from Blink of
658         https://src.chromium.org/viewvc/blink?revision=155885&view=revision
659         Original Patch by Eric Seidel
660
661         Original comments:
662
663         "It seemed to me that template specifications would be clearer than an
664         if.  They also allow for compile-time error checking were a 3rd type
665         of float to come into existance in CSS4. :p
666
667         For any unfamiliar with this method, this the object used for
668         performing a search on a RedBlackTree in WTF.
669
670         We create one of these adaptors, specifying that we want to search for
671         values in a specific (logical) Y interval, and this adaptor is called
672         back for any values in the RBTree cooresponding to that interval
673         range.
674
675         The job of this adaptor is to collect the various values we care
676         about, including the left or right-most offset of the floats in that
677         Y-range as well as what the last (document order) float seen in that
678         range.
679
680         It also collects the remaining available height for the block but I'm
681         less clear on how that parameter is used."
682
683         Note that in addition to the original change, I have made the
684         updateOffsetIfNeeded and rangesIntersect methods inline, as this was
685         shown to be a performance win in
686         https://src.chromium.org/viewvc/blink?revision=156064&view=revision
687         and it seemed a rather trivial change to be subject to a separate
688         patch when porting.
689
690         No new tests, no behavior change.
691
692         * rendering/RenderBlock.cpp:
693         (WebCore::::updateOffsetIfNeeded):
694         (WebCore::::collectIfNeeded):
695         * rendering/RenderBlock.h:
696
697 2013-08-23  David Kilzer  <ddkilzer@apple.com>
698
699         WebCore fails to link due to changes in Objective-C++ ABI in trunk clang
700         <http://webkit.org/b/120183>
701         <rdar://problem/14764114>
702
703         Reviewed by Eric Carlson.
704
705         The trunk version of clang made an ABI change for Objective-C++
706         parameters that caused WebCore to fail to link.  The short-term
707         fix is to change the parameter type from id<protocol> to just id
708         and add an ASSERT that the parameter still conforms to the
709         protocol.
710
711         * platform/DragData.h:
712         (DragDataRef): Change typedef from id<NSDragInfo> to id.
713         * platform/mac/DragDataMac.mm:
714         (WebCore::DragData::DragData): Add ASSERT that checks that the
715         DragDataRef object implements the NSDragInfo protocol.
716
717 2013-08-23  Andreas Kling  <akling@apple.com>
718
719         RenderLayerCompositor::m_renderView should be a reference.
720         <https://webkit.org/b/120210>
721
722         Reviewed by Antti Koivisto.
723
724         The RenderLayerCompositor is always created by a RenderView passing itself to the constructor.
725         By making m_renderView a reference, we flush out some unnecessary null checks.
726         We also gain a pointer-free path to Settings through m_renderView.frameView().frame().settings()
727         so we don't have to make those blocks conditional anymore, reducing ambiguity.
728
729         * rendering/RenderLayerCompositor.cpp:
730         * rendering/RenderLayerCompositor.h:
731         * rendering/RenderView.cpp:
732         (WebCore::RenderView::compositor):
733
734 2013-08-23  Andreas Kling  <akling@apple.com>
735
736         RenderView::frameView() should return a reference.
737         <https://webkit.org/b/120208>
738
739         Reviewed by Antti Koivisto.
740
741         A RenderView should always have a corresponding FrameView, so make frameView()
742         return a reference. Also remove a myriad of now-impossible null checks.
743
744 2013-08-23  Allan Sandfeld Jensen  <allan.jensen@digia.com>
745
746         REGRESSION(r153939) Fix typo in Qt build-files
747
748         Reviewed by Antti Koivisto.
749
750         Fix simple typo in Target.pri introduced in r153939.
751
752         * Target.pri:
753
754 2013-08-23  Antti Koivisto  <antti@apple.com>
755
756         <https://webkit.org/b/120166> Add Traversal<ElementType> template
757
758         Reviewed by Andreas Kling.
759
760         It is common to traverse through a subtree looking for elements of specific type and then casting to the type. This pattern can be generalized.
761         
762         This patch adds a new Traversal<typename ElementType> template. It works like ElementTraversal except that the traversal is limited to the specified type.
763         The patch also uses the template in a bunch of applicable places.
764
765         * WebCore.exp.in:
766         * accessibility/AccessibilityRenderObject.cpp:
767         (WebCore::AccessibilityRenderObject::addImageMapChildren):
768         * dom/Document.cpp:
769         (WebCore::Document::removeTitle):
770         (WebCore::Document::updateBaseURL):
771         (WebCore::Document::processBaseElement):
772         * dom/Element.h:
773         * dom/ElementTraversal.h:
774         (WebCore::::firstChildTemplate):
775         (WebCore::::firstWithinTemplate):
776         (WebCore::::lastChildTemplate):
777         (WebCore::::lastWithinTemplate):
778         (WebCore::::nextTemplate):
779         (WebCore::::previousTemplate):
780         (WebCore::::nextSiblingTemplate):
781         (WebCore::::previousSiblingTemplate):
782         (WebCore::::nextSkippingChildrenTemplate):
783         (WebCore::::firstChild):
784         (WebCore::::lastChild):
785         (WebCore::::firstWithin):
786         (WebCore::::lastWithin):
787         (WebCore::::next):
788         (WebCore::::previous):
789         (WebCore::::nextSibling):
790         (WebCore::::previousSibling):
791         (WebCore::::nextSkippingChildren):
792         (WebCore::ElementTraversal::previousIncludingPseudo):
793         (WebCore::ElementTraversal::nextIncludingPseudo):
794         (WebCore::ElementTraversal::nextIncludingPseudoSkippingChildren):
795         (WebCore::ElementTraversal::pseudoAwarePreviousSibling):
796         * dom/Node.cpp:
797         (WebCore::Node::numberOfScopedHTMLStyleChildren):
798         * dom/NodeIterator.cpp:
799         (WebCore::NodeIterator::NodeIterator):
800         * dom/NodeIterator.h:
801         * dom/Traversal.cpp:
802         (WebCore::NodeIteratorBase::NodeIteratorBase):
803         (WebCore::NodeIteratorBase::acceptNode):
804         * dom/Traversal.h:
805         
806             Renamed existing class called Traversal to less generic NodeIteratorBase.
807
808         * dom/TreeScope.cpp:
809         (WebCore::TreeScope::labelElementForId):
810         (WebCore::TreeScope::findAnchor):
811         * dom/TreeWalker.cpp:
812         (WebCore::TreeWalker::TreeWalker):
813         * dom/TreeWalker.h:
814         * editing/FrameSelection.cpp:
815         (WebCore::scanForForm):
816         * editing/markup.cpp:
817         (WebCore::createContextualFragment):
818         * html/HTMLAnchorElement.h:
819         (WebCore::isHTMLAnchorElement):
820         (WebCore::HTMLAnchorElement):
821         * html/HTMLAreaElement.h:
822         (WebCore::isHTMLAreaElement):
823         (WebCore::HTMLAreaElement):
824         * html/HTMLBaseElement.h:
825         (WebCore::isHTMLBaseElement):
826         (WebCore::HTMLBaseElement):
827         * html/HTMLElement.h:
828         (WebCore::HTMLElement):
829         * html/HTMLFieldSetElement.cpp:
830         (WebCore::HTMLFieldSetElement::invalidateDisabledStateUnder):
831         (WebCore::HTMLFieldSetElement::childrenChanged):
832         (WebCore::HTMLFieldSetElement::legend):
833         * html/HTMLFormControlElement.h:
834         (WebCore::toHTMLFormControlElement):
835         (WebCore::HTMLFormControlElement):
836         * html/HTMLLabelElement.cpp:
837         (WebCore::nodeAsSupportedLabelableElement):
838         (WebCore::HTMLLabelElement::control):
839         * html/HTMLLabelElement.h:
840         (WebCore::isHTMLLabelElement):
841         (WebCore::HTMLLabelElement):
842         * html/HTMLLegendElement.h:
843         (WebCore::isHTMLLegendElement):
844         (WebCore::HTMLLegendElement):
845         * html/HTMLMapElement.cpp:
846         (WebCore::HTMLMapElement::mapMouseEvent):
847         * html/HTMLMediaElement.cpp:
848         (WebCore::HTMLMediaElement::finishParsingChildren):
849         * html/HTMLStyleElement.h:
850         (WebCore::isHTMLStyleElement):
851         (WebCore::HTMLStyleElement):
852         * html/HTMLTitleElement.h:
853         (WebCore::HTMLTitleElement):
854         * html/HTMLTrackElement.h:
855         (WebCore::isHTMLTrackElement):
856         (WebCore::HTMLTrackElement):
857         * html/LabelableElement.h:
858         (WebCore::isLabelableElement):
859         (WebCore::LabelableElement):
860         * rendering/FilterEffectRenderer.cpp:
861         (WebCore::FilterEffectRenderer::buildReferenceFilter):
862         * svg/SVGElement.h:
863         (WebCore::SVGElement):
864         * svg/SVGForeignObjectElement.h:
865         (WebCore::isSVGForeignObjectElement):
866         (WebCore::SVGForeignObjectElement):
867         * svg/SVGSVGElement.cpp:
868         (WebCore::SVGSVGElement::collectIntersectionOrEnclosureList):
869         (WebCore::SVGSVGElement::getElementById):
870         * svg/SVGStyledElement.cpp:
871         (WebCore::SVGStyledElement::title):
872         * svg/SVGTitleElement.h:
873         (WebCore::SVGTitleElement):
874         * svg/animation/SMILTimeContainer.cpp:
875         (WebCore::SMILTimeContainer::updateDocumentOrderIndexes):
876         * svg/animation/SVGSMILElement.cpp:
877         (WebCore::SVGSMILElement::isSMILElement):
878         * svg/animation/SVGSMILElement.h:
879         (WebCore::SVGSMILElement):
880         * svg/graphics/SVGImage.cpp:
881         (WebCore::SVGImage::hasSingleSecurityOrigin):
882
883 2013-08-23  Arpita Bahuguna  <a.bah@samsung.com>
884
885         <br> does not get deleted when inlined after some non-textual content.
886         https://bugs.webkit.org/show_bug.cgi?id=120006
887
888         Reviewed by Ryosuke Niwa.
889
890         deleteSelectionCommand does not handle the case when a <br> element is
891         inlined after some non-textual content (input controls, image etc.).
892
893         When doing a back-delete at the start of a line following such a <br>
894         the two contiguous lines should merge and the <br> should get deleted.
895         Currently, even though the <br> is deleted, another placeholder <br>
896         is incorrectly inserted at the same point, thus effectively there is no
897         change.
898
899         We are incorrectly computing the inline <br> to be at the start of an
900         empty line even though the line is not empty.
901
902         Test: editing/deleting/delete-inline-br.html
903
904         * editing/DeleteSelectionCommand.cpp:
905         (WebCore::DeleteSelectionCommand::handleSpecialCaseBRDelete):
906         Adding a check to verify that the inline <br> is not on an empty line
907         if the end node is not a <br> element itself and it's previous sibling
908         is the start <br> element.
909
910         Basically we check whether there is another node (end node) following
911         the <br>, that the node is not a <br> itself, and that the end node's
912         previous node is the start <br>.
913
914 2013-08-23  Renata Hodovan  <reni@webkit.org>
915
916         Missing null-check in HTMLFormElement::rendererIsNeeded()
917         https://bugs.webkit.org/show_bug.cgi?id=120159
918
919         Reviewed by Ryosuke Niwa.
920
921         Null-check parentRenderer in HTMLFormElement::rendererIsNeeded()
922         and early return.
923
924         Test: fast/forms/missing-parentrenderer-crash.html
925
926         * html/HTMLFormElement.cpp:
927         (WebCore::HTMLFormElement::rendererIsNeeded):
928
929 2013-08-23  Zalan Bujtas  <zalan@apple.com>
930
931         MathML: ASSERTION FAILED: !isPreferredLogicalHeightDirty() in RenderMathMLBlock::preferredLogicalHeight() const
932         https://bugs.webkit.org/show_bug.cgi?id=120157
933
934         Reviewed by Antti Koivisto.
935
936         RenderListMarker needs to be inserted to the render tree before
937         we start computing the preferred logical widths for the associated
938         RenderListItem.
939
940         Test: mathml/mn-as-list-item-assert.html
941
942         * rendering/RenderListItem.cpp:
943         (WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded):
944         (WebCore::RenderListItem::layout):
945         (WebCore::RenderListItem::computePreferredLogicalWidths):
946         * rendering/RenderListItem.h:
947
948 2013-08-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
949
950         Introduce toSVGLinearGradientElement(), and use it
951         https://bugs.webkit.org/show_bug.cgi?id=120154
952
953         Reviewed by Andreas Kling.
954
955         As a step to clean-up static_cast<SVGXXX>, toSVGLinearGradientElement() is added to clean-up
956         static_cast<SVGLinearGradientElement*>.
957
958         * rendering/svg/RenderSVGResourceLinearGradient.cpp:
959         (WebCore::RenderSVGResourceLinearGradient::collectGradientAttributes):
960         * rendering/svg/SVGRenderTreeAsText.cpp:
961         (WebCore::writeSVGResourceContainer):
962         * svg/SVGLinearGradientElement.cpp:
963         (WebCore::SVGLinearGradientElement::collectGradientAttributes):
964         * svg/SVGLinearGradientElement.h:
965         (WebCore::toSVGLinearGradientElement):
966
967 2013-08-22  Simon Fraser  <simon.fraser@apple.com>
968
969         compositing/geometry/bounds-ignores-hidden-dynamic.html has incorrect initial rendering
970         https://bugs.webkit.org/show_bug.cgi?id=119825
971
972         Reviewed by Tim Horton.
973         
974         r137526 and some earlier commits attempted to avoid unconditionally
975         repainting layers when their size changes, because this was causing
976         TiledBacking layers to repaint when the document size changed.
977         
978         However, the approach required that we have good information about
979         whether size changes require a repaint, which in some cases is hard
980         to determine, especially when RenderLayer changes affect our
981         decisions about which layers are composited.
982         
983         Fix by pushing the decision about whether to repaint on size change
984         into GraphicsLayer. The default is to repaint on size change,
985         but GraphicsLayer provides a function that can be overridden to
986         modify this behavior; GraphicsLayerCA does so to avoid repaints
987         when layers with TiledBackings get resized.
988
989         Test: compositing/repaint/repaint-on-layer-grouping-change.html
990
991         * WebCore.exp.in: WebKit2 needs GraphicsLayer::setSize, which is no longer inline.
992         * platform/graphics/GraphicsLayer.cpp:
993         (WebCore::GraphicsLayer::setOffsetFromRenderer):
994         (WebCore::GraphicsLayer::setSize):
995         * platform/graphics/GraphicsLayer.h:
996         (WebCore::GraphicsLayer::shouldRepaintOnSizeChange):
997         * platform/graphics/ca/GraphicsLayerCA.cpp:
998         (WebCore::GraphicsLayerCA::shouldRepaintOnSizeChange):
999         * platform/graphics/ca/GraphicsLayerCA.h:
1000         * rendering/RenderLayerBacking.h: No longer need m_boundsConstrainedByClipping
1001         * rendering/RenderLayerBacking.cpp:
1002         (WebCore::RenderLayerBacking::RenderLayerBacking):
1003         (WebCore::RenderLayerBacking::updateCompositedBounds):
1004         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): setSize takes
1005         care of repainting for us now, so we can remove all the conditional code.
1006
1007 2013-08-22  Simon Fraser  <simon.fraser@apple.com>
1008
1009         Repaint counters are sometimes not in the corner of the compositing layer
1010         https://bugs.webkit.org/show_bug.cgi?id=120176
1011
1012         Reviewed by Beth Dakin.
1013
1014         Sometimes the repaint counters are not in the corner of the compositing layer;
1015         they are either inset, or partially or entirely outside the layer.
1016         
1017         Fix by making sure that we restore the CGContext before drawing
1018         the counter, since the WebCore code may have translated the CTM.
1019         
1020         The counter-painting code saves and restores the context itself,
1021         so this is safe.
1022
1023         * platform/graphics/mac/WebLayer.mm:
1024         (drawLayerContents):
1025
1026 2013-08-22  Tim Horton  <timothy_horton@apple.com>
1027
1028         Unavailable plug-in indicator text is one pixel too low
1029         https://bugs.webkit.org/show_bug.cgi?id=120177
1030         <rdar://problem/14811951>
1031
1032         Reviewed by Kevin Decker.
1033
1034         Move the unavailable plug-in indicator text up one pixel.
1035
1036         * rendering/RenderEmbeddedObject.cpp:
1037         (WebCore::RenderEmbeddedObject::paintReplaced):
1038
1039 2013-08-22  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1040
1041         [SVG2] Merge SVGStyledElement and SVGElement
1042         https://bugs.webkit.org/show_bug.cgi?id=107386
1043
1044         Reviewed by Andreas Kling.
1045
1046         Merge SVGStyledElement into SVGElement to simplify the SVG inheritance
1047         model and match the SVG2 specification:
1048         https://svgwg.org/svg2-draft/single-page.html#types-InterfaceSVGElement
1049
1050         Test: svg/dom/svg2-inheritance.html
1051
1052         * CMakeLists.txt:
1053         * DerivedSources.cpp:
1054         * DerivedSources.make:
1055         * DerivedSources.pri:
1056         * GNUmakefile.list.am:
1057         * Target.pri:
1058         * WebCore.order:
1059         * WebCore.vcxproj/WebCore.vcxproj:
1060         * WebCore.vcxproj/WebCore.vcxproj.filters:
1061         * WebCore.xcodeproj/project.pbxproj:
1062         * accessibility/AccessibilityNodeObject.cpp:
1063         (WebCore::AccessibilityNodeObject::alternativeText):
1064         (WebCore::AccessibilityNodeObject::accessibilityDescription):
1065         * css/SVGCSSStyleSelector.cpp:
1066         * rendering/style/SVGRenderStyle.cpp:
1067         * rendering/svg/RenderSVGContainer.cpp:
1068         (WebCore::RenderSVGContainer::RenderSVGContainer):
1069         * rendering/svg/RenderSVGContainer.h:
1070         * rendering/svg/RenderSVGHiddenContainer.cpp:
1071         (WebCore::RenderSVGHiddenContainer::RenderSVGHiddenContainer):
1072         * rendering/svg/RenderSVGHiddenContainer.h:
1073         * rendering/svg/RenderSVGModelObject.cpp:
1074         (WebCore::RenderSVGModelObject::RenderSVGModelObject):
1075         (WebCore::getElementCTM):
1076         * rendering/svg/RenderSVGModelObject.h:
1077         * rendering/svg/RenderSVGResourceClipper.cpp:
1078         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
1079         (WebCore::RenderSVGResourceClipper::calculateClipContentRepaintRect):
1080         (WebCore::RenderSVGResourceClipper::hitTestClipContent):
1081         * rendering/svg/RenderSVGResourceContainer.cpp:
1082         (WebCore::RenderSVGResourceContainer::RenderSVGResourceContainer):
1083         * rendering/svg/RenderSVGResourceContainer.h:
1084         * rendering/svg/RenderSVGResourceFilter.cpp:
1085         * rendering/svg/RenderSVGResourceFilterPrimitive.h:
1086         * rendering/svg/RenderSVGResourceMarker.cpp:
1087         * rendering/svg/RenderSVGResourceMarker.h:
1088         * rendering/svg/RenderSVGResourceMasker.cpp:
1089         (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
1090         (WebCore::RenderSVGResourceMasker::calculateMaskContentRepaintRect):
1091         * rendering/svg/RenderSVGResourcePattern.cpp:
1092         (WebCore::RenderSVGResourcePattern::createTileImage):
1093         * rendering/svg/RenderSVGRoot.cpp:
1094         (WebCore::RenderSVGRoot::RenderSVGRoot):
1095         * rendering/svg/RenderSVGRoot.h:
1096         * rendering/svg/RenderSVGViewportContainer.cpp:
1097         (WebCore::RenderSVGViewportContainer::RenderSVGViewportContainer):
1098         * rendering/svg/RenderSVGViewportContainer.h:
1099         * rendering/svg/SVGRenderSupport.cpp:
1100         (WebCore::SVGRenderSupport::layoutChildren):
1101         * rendering/svg/SVGRenderTreeAsText.cpp:
1102         * rendering/svg/SVGResources.cpp:
1103         (WebCore::registerPendingResource):
1104         * rendering/svg/SVGResourcesCache.cpp:
1105         * svg/SVGAElement.cpp:
1106         (WebCore::SVGAElement::title):
1107         * svg/SVGAllInOne.cpp:
1108         * svg/SVGAltGlyphDefElement.h:
1109         * svg/SVGAltGlyphItemElement.h:
1110         * svg/SVGAnimateElement.cpp:
1111         * svg/SVGAnimatedType.cpp:
1112         (WebCore::SVGAnimatedType::valueAsString):
1113         (WebCore::SVGAnimatedType::setValueAsString):
1114         * svg/SVGAnimationElement.cpp:
1115         (WebCore::SVGAnimationElement::isTargetAttributeCSSProperty):
1116         (WebCore::SVGAnimationElement::computeCSSPropertyValue):
1117         (WebCore::SVGAnimationElement::adjustForInheritance):
1118         (WebCore::inheritsFromProperty):
1119         * svg/SVGComponentTransferFunctionElement.h:
1120         * svg/SVGCursorElement.h:
1121         * svg/SVGDescElement.cpp:
1122         (WebCore::SVGDescElement::SVGDescElement):
1123         * svg/SVGDescElement.h:
1124         * svg/SVGDescElement.idl:
1125         * svg/SVGElement.cpp:
1126         (WebCore::mapAttributeToCSSProperty):
1127         (WebCore::cssPropertyToTypeMap):
1128         (WebCore::SVGElement::SVGElement):
1129         (WebCore::SVGElement::~SVGElement):
1130         (WebCore::SVGElement::removedFrom):
1131         (WebCore::SVGElement::parseAttribute):
1132         (WebCore::SVGElement::animatedPropertyTypeForAttribute):
1133         (WebCore::collectInstancesForSVGElement):
1134         (WebCore::SVGElement::isAnimatableAttribute):
1135         (WebCore::SVGElement::title):
1136         (WebCore::SVGElement::rendererIsNeeded):
1137         (WebCore::SVGElement::cssPropertyIdForSVGAttributeName):
1138         (WebCore::SVGElement::isAnimatableCSSProperty):
1139         (WebCore::SVGElement::isPresentationAttribute):
1140         (WebCore::SVGElement::collectStyleForPresentationAttribute):
1141         (WebCore::SVGElement::isKnownAttribute):
1142         (WebCore::SVGElement::svgAttributeChanged):
1143         (WebCore::SVGElement::insertedInto):
1144         (WebCore::SVGElement::buildPendingResourcesIfNeeded):
1145         (WebCore::SVGElement::childrenChanged):
1146         (WebCore::SVGElement::getPresentationAttribute):
1147         (WebCore::SVGElement::instanceUpdatesBlocked):
1148         (WebCore::SVGElement::setInstanceUpdatesBlocked):
1149         (WebCore::SVGElement::localCoordinateSpaceTransform):
1150         (WebCore::SVGElement::updateRelativeLengthsInformation):
1151         (WebCore::SVGElement::isMouseFocusable):
1152         (WebCore::SVGElement::isKeyboardFocusable):
1153         * svg/SVGElement.h:
1154         (WebCore::SVGElement::supportsMarkers):
1155         (WebCore::SVGElement::hasRelativeLengths):
1156         (WebCore::SVGElement::needsPendingResourceHandling):
1157         (WebCore::SVGElement::selfHasRelativeLengths):
1158         (WebCore::SVGElement::updateRelativeLengthsInformation):
1159         * svg/SVGElement.idl:
1160         * svg/SVGElementInstance.cpp:
1161         (WebCore::SVGElementInstance::invalidateAllInstancesOfElement):
1162         (WebCore::SVGElementInstance::InstanceUpdateBlocker::InstanceUpdateBlocker):
1163         * svg/SVGElementInstance.h:
1164         * svg/SVGFEBlendElement.idl:
1165         * svg/SVGFEColorMatrixElement.idl:
1166         * svg/SVGFEComponentTransferElement.idl:
1167         * svg/SVGFECompositeElement.idl:
1168         * svg/SVGFEConvolveMatrixElement.idl:
1169         * svg/SVGFEDiffuseLightingElement.idl:
1170         * svg/SVGFEDisplacementMapElement.idl:
1171         * svg/SVGFEDropShadowElement.idl:
1172         * svg/SVGFEFloodElement.idl:
1173         * svg/SVGFEGaussianBlurElement.idl:
1174         * svg/SVGFEImageElement.idl:
1175         * svg/SVGFELightElement.h:
1176         * svg/SVGFEMergeElement.idl:
1177         * svg/SVGFEMergeNodeElement.h:
1178         * svg/SVGFEMorphologyElement.idl:
1179         * svg/SVGFEOffsetElement.idl:
1180         * svg/SVGFESpecularLightingElement.idl:
1181         * svg/SVGFETileElement.idl:
1182         * svg/SVGFETurbulenceElement.idl:
1183         * svg/SVGFilterElement.cpp:
1184         (WebCore::SVGFilterElement::SVGFilterElement):
1185         (WebCore::SVGFilterElement::parseAttribute):
1186         (WebCore::SVGFilterElement::svgAttributeChanged):
1187         (WebCore::SVGFilterElement::childrenChanged):
1188         * svg/SVGFilterElement.h:
1189         * svg/SVGFilterElement.idl:
1190         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
1191         (WebCore::SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes):
1192         (WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute):
1193         (WebCore::SVGFilterPrimitiveStandardAttributes::svgAttributeChanged):
1194         (WebCore::SVGFilterPrimitiveStandardAttributes::childrenChanged):
1195         (WebCore::SVGFilterPrimitiveStandardAttributes::rendererIsNeeded):
1196         * svg/SVGFilterPrimitiveStandardAttributes.h:
1197         * svg/SVGFontElement.cpp:
1198         (WebCore::SVGFontElement::SVGFontElement):
1199         * svg/SVGFontElement.h:
1200         * svg/SVGFontFaceElement.cpp:
1201         * svg/SVGFontFaceElement.h:
1202         * svg/SVGFontFaceFormatElement.h:
1203         * svg/SVGFontFaceNameElement.h:
1204         * svg/SVGFontFaceSrcElement.h:
1205         * svg/SVGFontFaceUriElement.h:
1206         * svg/SVGGElement.cpp:
1207         (WebCore::SVGGElement::rendererIsNeeded):
1208         * svg/SVGGlyphElement.cpp:
1209         (WebCore::SVGGlyphElement::SVGGlyphElement):
1210         (WebCore::SVGGlyphElement::parseAttribute):
1211         (WebCore::SVGGlyphElement::insertedInto):
1212         (WebCore::SVGGlyphElement::removedFrom):
1213         * svg/SVGGlyphElement.h:
1214         * svg/SVGGlyphRefElement.cpp:
1215         (WebCore::SVGGlyphRefElement::SVGGlyphRefElement):
1216         (WebCore::SVGGlyphRefElement::parseAttribute):
1217         * svg/SVGGlyphRefElement.h:
1218         * svg/SVGGlyphRefElement.idl:
1219         * svg/SVGGradientElement.cpp:
1220         (WebCore::SVGGradientElement::SVGGradientElement):
1221         (WebCore::SVGGradientElement::parseAttribute):
1222         (WebCore::SVGGradientElement::svgAttributeChanged):
1223         (WebCore::SVGGradientElement::childrenChanged):
1224         * svg/SVGGradientElement.h:
1225         * svg/SVGGradientElement.idl:
1226         * svg/SVGGraphicsElement.cpp:
1227         (WebCore::SVGGraphicsElement::SVGGraphicsElement):
1228         (WebCore::SVGGraphicsElement::parseAttribute):
1229         (WebCore::SVGGraphicsElement::svgAttributeChanged):
1230         * svg/SVGGraphicsElement.h:
1231         * svg/SVGGraphicsElement.idl:
1232         * svg/SVGLocatable.cpp:
1233         (WebCore::SVGLocatable::computeCTM):
1234         * svg/SVGMPathElement.h:
1235         * svg/SVGMarkerElement.cpp:
1236         (WebCore::SVGMarkerElement::SVGMarkerElement):
1237         (WebCore::SVGMarkerElement::parseAttribute):
1238         (WebCore::SVGMarkerElement::svgAttributeChanged):
1239         (WebCore::SVGMarkerElement::childrenChanged):
1240         * svg/SVGMarkerElement.h:
1241         * svg/SVGMarkerElement.idl:
1242         * svg/SVGMaskElement.cpp:
1243         (WebCore::SVGMaskElement::SVGMaskElement):
1244         (WebCore::SVGMaskElement::parseAttribute):
1245         (WebCore::SVGMaskElement::svgAttributeChanged):
1246         (WebCore::SVGMaskElement::childrenChanged):
1247         * svg/SVGMaskElement.h:
1248         * svg/SVGMaskElement.idl:
1249         * svg/SVGMetadataElement.h:
1250         * svg/SVGMissingGlyphElement.cpp:
1251         (WebCore::SVGMissingGlyphElement::SVGMissingGlyphElement):
1252         * svg/SVGMissingGlyphElement.h:
1253         * svg/SVGMissingGlyphElement.idl:
1254         * svg/SVGPatternElement.cpp:
1255         (WebCore::SVGPatternElement::SVGPatternElement):
1256         (WebCore::SVGPatternElement::parseAttribute):
1257         (WebCore::SVGPatternElement::svgAttributeChanged):
1258         (WebCore::SVGPatternElement::childrenChanged):
1259         * svg/SVGPatternElement.h:
1260         * svg/SVGPatternElement.idl:
1261         * svg/SVGScriptElement.h:
1262         * svg/SVGStopElement.cpp:
1263         (WebCore::SVGStopElement::SVGStopElement):
1264         (WebCore::SVGStopElement::parseAttribute):
1265         (WebCore::SVGStopElement::svgAttributeChanged):
1266         * svg/SVGStopElement.h:
1267         * svg/SVGStopElement.idl:
1268         * svg/SVGStyleElement.h:
1269         * svg/SVGStyledElement.cpp: Removed.
1270         * svg/SVGStyledElement.h: Removed.
1271         * svg/SVGStyledElement.idl: Removed.
1272         * svg/SVGSymbolElement.cpp:
1273         (WebCore::SVGSymbolElement::SVGSymbolElement):
1274         (WebCore::SVGSymbolElement::parseAttribute):
1275         (WebCore::SVGSymbolElement::svgAttributeChanged):
1276         * svg/SVGSymbolElement.h:
1277         * svg/SVGSymbolElement.idl:
1278         * svg/SVGTRefElement.cpp:
1279         (WebCore::SVGTRefElement::insertedInto):
1280         (WebCore::SVGTRefElement::removedFrom):
1281         * svg/SVGTitleElement.cpp:
1282         (WebCore::SVGTitleElement::SVGTitleElement):
1283         (WebCore::SVGTitleElement::insertedInto):
1284         * svg/SVGTitleElement.h:
1285         * svg/SVGTitleElement.idl:
1286         * svg/SVGTransformable.cpp:
1287         * svg/SVGUseElement.cpp:
1288         (WebCore::SVGUseElement::selfHasRelativeLengths):
1289         * svg/SVGViewElement.cpp:
1290         (WebCore::SVGViewElement::SVGViewElement):
1291         (WebCore::SVGViewElement::parseAttribute):
1292         * svg/SVGViewElement.h:
1293         * svg/animation/SVGSMILElement.h:
1294         * svg/graphics/filters/SVGFEImage.cpp:
1295         (WebCore::FEImage::platformApplySoftware):
1296
1297 2013-08-22  Andreas Kling  <akling@apple.com>
1298
1299         FrameLoader::history() should return a reference.
1300         <https://webkit.org/b/120163>
1301
1302         Reviewed by Anders Carlsson.
1303
1304         Rehued by Anders Carlsson.
1305
1306         FrameLoader::m_history is never null, so make history() return a reference.
1307         Also made HistoryController::m_frame a reference, since HistoryController's
1308         lifetime is tied to FrameLoader, which is tied to the Frame.
1309
1310 2013-08-21  Simon Fraser  <simon.fraser@apple.com>
1311
1312         Reloading this video test shows garbage briefly
1313         https://bugs.webkit.org/show_bug.cgi?id=119377
1314
1315         Reviewed by Anders Carlson.
1316
1317         RenderVideo should not claim that it's foreground is opaque
1318         unless it has a video frame to display.
1319
1320         * rendering/RenderVideo.cpp:
1321         (WebCore::RenderVideo::foregroundIsKnownToBeOpaqueInRect):
1322
1323 2013-08-22  Andreas Kling  <akling@apple.com>
1324
1325         Remove accidental cruft from r154449.
1326
1327         * rendering/RenderWidget.cpp:
1328         (WebCore::RenderWidget::destroy):
1329
1330 2013-08-22  Andreas Kling  <akling@apple.com>
1331
1332         FrameLoader: frame() and client() should return references.
1333         <https://webkit.org/b/120158>
1334
1335         Reviewed by Anders Carlsson.
1336
1337         These two are never null so change them to return references.
1338
1339 2013-08-22  Andrei Bucur  <abucur@adobe.com>
1340
1341         RenderNamedFlowThread should not create NodeRenderingContext objects
1342         https://bugs.webkit.org/show_bug.cgi?id=119923
1343
1344         Reviewed by Antti Koivisto.
1345
1346         Port of https://chromium.googlesource.com/chromium/blink/+/949d7d7e7b8685454742a55cf0ca912bb9a7b177.
1347         Original patch by Elliott Sprehn.
1348
1349         RenderNamedFlowThread should not create NodeRenderingContext objects
1350
1351         RenderNamedFlowThread is using NodeRenderingContext to get the original
1352         parent renderer, but should just be using NodeRenderingTraversal::parent
1353         instead (which is what NodeRenderingContext does internally anyway).
1354
1355         Tests: No change in functionality. No new tests.
1356
1357         * rendering/RenderNamedFlowThread.cpp:
1358         (WebCore::RenderNamedFlowThread::isChildAllowed):
1359
1360 2013-08-22  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1361
1362         Introduce a SVGUnknownElement class for unknown SVG elements
1363         https://bugs.webkit.org/show_bug.cgi?id=120155
1364
1365         Reviewed by Andreas Kling.
1366
1367         Introduce a SVGUnknownElement class and have it override rendererIsNeeded() to return false.
1368         We now use SVGUnknownElement type (instead of SVGElement) for unknown SVG elements:
1369         - Unknown Elements in SVG namespace
1370         - Registered custom tag elements in SVG namespace:
1371           http://www.w3.org/TR/2013/WD-custom-elements-20130514/#registering-custom-elements
1372
1373         As a consequence, SVGElement::rendererIsNeeded() is not longer required to return false and
1374         it will be able to behave as SVGStyledElement::rendererIsNeeded() once we merge
1375         SVGStyledElement into SVGElement.
1376
1377         This is a pre-requirement to merging SVGStyledElement into SVGElement.
1378
1379         No new tests, no behavior change.
1380
1381         * GNUmakefile.list.am:
1382         * Target.pri:
1383         * WebCore.vcxproj/WebCore.vcxproj:
1384         * WebCore.vcxproj/WebCore.vcxproj.filters:
1385         * dom/CustomElementConstructor.cpp:
1386         (WebCore::CustomElementConstructor::createElementInternal):
1387         * dom/make_names.pl:
1388         (defaultParametersHash):
1389         (printJSElementIncludes):
1390         (printWrapperFunctions):
1391         (printWrapperFactoryCppFile):
1392         * svg/SVGElement.cpp:
1393         * svg/SVGElement.h:
1394         * svg/SVGUnknownElement.h: Added.
1395         (WebCore::SVGUnknownElement::create):
1396         (WebCore::SVGUnknownElement::SVGUnknownElement):
1397         * svg/svgtags.in:
1398
1399 2013-08-22  Rob Buis  <rwlbuis@webkit.org>
1400
1401         REGRESSION: Assertion failure !collection->hasExactlyOneItem() in WebCore::namedItemGetter
1402         https://bugs.webkit.org/show_bug.cgi?id=118056
1403
1404         Reviewed by Ryosuke Niwa.
1405
1406         The assert is hit in Debug mode because the DocumentOrderedMap in HTMLDocument::m_windowNamedItem
1407         includes matched SVG elements, but the WindowNameCollection used to collect the elements does not.
1408         This means the HTMLCollection stripped of SVG elements could end up hitting the empty or single item
1409         assertion, which the testcase verifies.
1410         To fix this change WindowNameCollection to include both SVG and HTML elements so it matches DocumentOrderedMap.
1411
1412         Tests: svg/custom/document-all-includes-svg.html
1413                svg/custom/window-named-item-lookup.html
1414
1415         * html/HTMLCollection.cpp:
1416         (WebCore::isMatchingElement):
1417         (WebCore::HTMLCollection::updateNameCache):
1418
1419 2013-08-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1420
1421         Introduce toSVGRadialGradientElement(), and use it
1422         https://bugs.webkit.org/show_bug.cgi?id=120153
1423
1424         Reviewed by Andreas Kling.
1425
1426         As a step to clean-up static_cast<SVGXXX>, toSVGRadialGradientElement() is added to clean-up
1427         static_cast<SVGRadialGradientElement*>.
1428
1429         * rendering/svg/RenderSVGResourceRadialGradient.cpp:
1430         (WebCore::RenderSVGResourceRadialGradient::collectGradientAttributes):
1431         * rendering/svg/SVGRenderTreeAsText.cpp:
1432         (WebCore::writeSVGResourceContainer):
1433         * svg/SVGRadialGradientElement.cpp:
1434         (WebCore::SVGRadialGradientElement::collectGradientAttributes):
1435         * svg/SVGRadialGradientElement.h:
1436         (WebCore::toSVGRadialGradientElement):
1437
1438 2013-08-22  Renata Hodovan  <reni@webkit.org>
1439
1440         ASSERTION FAILED: extractedStyle in WebCore::ApplyStyleCommand::removeInlineStyleFromElement
1441         https://bugs.webkit.org/show_bug.cgi?id=119672
1442
1443         Reviewed by Darin Adler.
1444
1445         The last extractedStyle parameter of removeInlineStyleFromElement() is not mandatory and it's set
1446         to default 0. This way we have to check its existence before the usage.
1447
1448         Test: editing/execCommand/extracted_style_assert.html
1449
1450         * editing/ApplyStyleCommand.cpp:
1451         (WebCore::ApplyStyleCommand::removeInlineStyleFromElement):
1452
1453 2013-08-21  Commit Queue  <commit-queue@webkit.org>
1454
1455         Unreviewed, rolling out r154416.
1456         http://trac.webkit.org/changeset/154416
1457         https://bugs.webkit.org/show_bug.cgi?id=120147
1458
1459         Broke Windows builds (Requested by rniwa on #webkit).
1460
1461         * WebCore.vcxproj/WebCoreGenerated.make:
1462         * WebCore.vcxproj/WebCoreGeneratedWinCairo.make:
1463         * WebCore.vcxproj/WebCoreGeneratedWinCairoCommon.props:
1464         * WebCore.vcxproj/build-generated-files.sh:
1465         * WebCore.vcxproj/copyForwardingHeaders.cmd:
1466         * WebCore.vcxproj/copyWebCoreResourceFiles.cmd:
1467
1468 2013-08-21  Ryuan Choi  <ryuan.choi@samsung.com>
1469
1470         [EFL] Unreviewed build fix after r154430.
1471
1472         * rendering/style/StyleRareNonInheritedData.cpp:
1473         (WebCore::StyleRareNonInheritedData::hasFilters): Added CSS_FILTERS guard.
1474
1475 2013-08-21  Simon Fraser  <simon.fraser@apple.com>
1476
1477         Setting -webkit-filter: in :active selector causes failure to redraw
1478         https://bugs.webkit.org/show_bug.cgi?id=120135
1479
1480         Reviewed by Jer Noble.
1481         
1482         When removing a filter on an inline child of a compositing layer,
1483         the inline loses its RenderLayer and compositing layer, but we fail to
1484         repaint the compositing layer that the inline is now painting into.
1485         
1486         This worked correctly for opacity, because opacity toggles cause
1487         layouts (which then paint the correct layer), so do the same for filters.
1488
1489         Test: css3/filters/remove-filter-repaint.html
1490
1491         * rendering/style/RenderStyle.cpp:
1492         (WebCore::RenderStyle::changeRequiresLayout): Return true if we toggled
1493         between having filters and not. Drive-by cleanup, making use of new convenience
1494         function for hasOpacity().
1495         * rendering/style/StyleRareNonInheritedData.cpp:
1496         (WebCore::StyleRareNonInheritedData::hasFilters): Returns true if we have any
1497         filters.
1498         * rendering/style/StyleRareNonInheritedData.h:
1499         (WebCore::StyleRareNonInheritedData::hasOpacity): Convenience function that
1500         returns true if opacity is < 1.
1501
1502 2013-08-21  Gavin Barraclough  <barraclough@apple.com>
1503
1504         https://bugs.webkit.org/show_bug.cgi?id=120139
1505         PropertyDescriptor argument to define methods should be const
1506
1507         Rubber stamped by Sam Weinig.
1508
1509         This should never be modified, and this way we can use rvalues.
1510
1511         * bindings/js/JSDOMWindowCustom.cpp:
1512         (WebCore::JSDOMWindow::defineOwnProperty):
1513         * bindings/js/JSLocationCustom.cpp:
1514         (WebCore::JSLocation::defineOwnProperty):
1515         (WebCore::JSLocationPrototype::defineOwnProperty):
1516         * bindings/scripts/CodeGeneratorJS.pm:
1517         (GenerateHeader):
1518             - make PropertyDescriptor const
1519
1520 2013-08-21  Jacky Jiang  <zhajiang@blackberry.com>
1521
1522         <https://webkit.org/b/120123> [BlackBerry] Incorrect origin of indexOfTile in LayerTiler can cause unnecessary texture jobs and waste memory
1523
1524         Reviewed by Yong Li.
1525         Internally reviewed by Arvid Nilsson.
1526
1527         JIRA 481356
1528         The origin of indexOfTile(origin) is incorrect in these two places. For
1529         example, if the maxXMaxYCorner of the rect is (768, 768), there can be
1530         three other redundant indexOfTile (0, 1), (1, 0), (1, 1) which can cause
1531         unnecessary texture jobs and waste memory.
1532         The origin should be the top left of the bottom right pixel of a rect.
1533
1534         * platform/graphics/blackberry/LayerTiler.cpp:
1535         (WebCore::LayerTiler::updateTextureContentsIfNeeded):
1536         (WebCore::LayerTiler::processTextureJob):
1537
1538 2013-08-21  Simon Fraser  <simon.fraser@apple.com>
1539
1540         <https://webkit.org/b/116901> ASSERTION FAILED: !m_visibleDescendantStatusDirty on twitter
1541
1542         Reviewed by Beth Dakin.
1543         
1544         In order to make decisions about compositing, the m_hasVisibleDescendant bit on RenderLayers
1545         needs to be up-to-date when RenderLayerCompositor::computeCompositingRequirements is recursing
1546         over the RenderLayer tree.
1547         
1548         However, was possible for computeCompositingRequirements() to hit a layer whose m_visibleDescendantStatusDirty
1549         bit was set; we only clear this bit from collectLayers() (when updating z-order lists), and from styleChanged()
1550         which requires that style changed on the layer itself.
1551         
1552         Fix by always calling updateDescendantDependentFlags() from computeCompositingRequirements().
1553
1554         Wasn't able to easily get a reduced testcase.
1555
1556         * rendering/RenderLayerCompositor.cpp:
1557         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1558
1559 2013-08-21  Alex Christensen  <achristensen@apple.com>
1560
1561         <https://webkit.org/b/120137> Separating Win32 and Win64 builds.
1562
1563         Reviewed by Brent Fulgham.
1564
1565         * WebCore.vcxproj/WebCoreGenerated.make:
1566         * WebCore.vcxproj/WebCoreGeneratedWinCairo.make:
1567         Pass PlatformArchitecture as a command line parameter to bash scripts
1568         and use PlatformArchitecture to determine which directory to delete
1569         while cleaning (obj32 or obj64).
1570         * WebCore.vcxproj/WebCoreGeneratedWinCairoCommon.props:
1571         Export PlatformArchitecture to be used by make and cmd scripts.
1572         * WebCore.vcxproj/build-generated-files.sh:
1573         Use PlatformArchitecture from command line to determine which object directory to use (obj32 or obj64).
1574         * WebCore.vcxproj/copyForwardingHeaders.cmd:
1575         * WebCore.vcxproj/copyWebCoreResourceFiles.cmd:
1576         Use PlatformArchitecture to determine which directory to copy to (obj32 or obj64).
1577
1578 2013-08-21  Tim Horton  <timothy_horton@apple.com>
1579
1580         revalidateTiles and ensureTilesForRect can share a lot of code
1581         https://bugs.webkit.org/show_bug.cgi?id=119282
1582
1583         Missed the review comments, whoops.
1584
1585         * platform/graphics/ca/mac/TileController.h:
1586         * platform/graphics/ca/mac/TileController.mm:
1587         (WebCore::TileController::prepopulateRect):
1588         (WebCore::TileController::revalidateTiles):
1589         (WebCore::TileController::ensureTilesForRect):
1590
1591 2013-08-21  Andreas Kling  <akling@apple.com>
1592
1593         <https://webkit.org/b/120115> SVG elements always have custom style resolve callbacks.
1594
1595         Reviewed by Antti Koivisto.
1596
1597         Simplify SVGElement construction by making them opt in to custom style resolve callbacks
1598         by default, and removing the ability to pass a custom ConstructionType to some subclass
1599         constructors.
1600
1601         * dom/Node.h:
1602
1603             Add HasCustomStyleResolveCallbacksFlag to the CreateSVGElement mask.
1604
1605         * svg/SVGElement.cpp:
1606         (WebCore::SVGElement::SVGElement):
1607         * svg/SVGElement.h:
1608         * svg/SVGGElement.cpp:
1609         (WebCore::SVGGElement::SVGGElement):
1610         * svg/SVGGElement.h:
1611         * svg/SVGGraphicsElement.cpp:
1612         (WebCore::SVGGraphicsElement::SVGGraphicsElement):
1613         * svg/SVGGraphicsElement.h:
1614         * svg/SVGImageElement.cpp:
1615         (WebCore::SVGImageElement::SVGImageElement):
1616         * svg/SVGStyledElement.cpp:
1617         (WebCore::SVGStyledElement::SVGStyledElement):
1618         * svg/SVGStyledElement.h:
1619
1620             Remove calls to setHasCustomStyleResolveCallbacks() in SVGElement and subclasses.
1621             Also remove unnecessary ConstructionType argument from subclasses since nobody
1622             overrides it and everyone just uses CreateSVGElement.
1623
1624 2013-08-21  Tim Horton  <timothy_horton@apple.com>
1625
1626         revalidateTiles and ensureTilesForRect can share a lot of code
1627         https://bugs.webkit.org/show_bug.cgi?id=119282
1628
1629         Reviewed by Simon Fraser.
1630
1631         No new tests, just a refactoring.
1632
1633         The bodies of ensureTilesForRect and revalidateTiles are nearly equivalent.
1634
1635         * platform/graphics/ca/mac/TileController.h:
1636         Add an enum, NewTileType, to note whether the tiles created by ensureTilesForRect will
1637         be primary coverage tiles or secondary out-of-view tiles.
1638
1639         * platform/graphics/ca/mac/TileController.mm:
1640         (WebCore::TileController::prepopulateRect):
1641         Move the code to see if we already have the requisite tiles in the
1642         primary coverage rect, as well as our call to updateTileCoverageMap,
1643         out into prepopulateRect, to generalize ensureTilesForRect.
1644
1645         (WebCore::TileController::revalidateTiles):
1646         Make use of ensureTilesForRect. The platformCALayerDidCreateTiles call will happen there, now.
1647
1648         (WebCore::TileController::ensureTilesForRect):
1649         Make ensureTilesForRect return the rect that it created tiles for, and only put
1650         tiles in a cohort if we're creating secondary tiles.
1651
1652 2013-08-21  Tim Horton  <timothy_horton@apple.com>
1653
1654         isReplacementObscured is wrong when the indicator is clipped by an iframe
1655         https://bugs.webkit.org/show_bug.cgi?id=120031
1656         <rdar://problem/14606819>
1657
1658         Reviewed by Simon Fraser.
1659
1660         Hit-test for plugin obscurity in the root document. To do this, we also need
1661         to convert the indicator rectangle into root view coordinates before
1662         hit testing its edges.
1663
1664         This resolves the case where an iframe which clips its content was reporting
1665         the indicator as not obscured, despite the fact that it was obscured from the
1666         point of view of the user.
1667
1668         Updated test plugins/unavailable-plugin-indicator-obscurity.html
1669
1670         * rendering/RenderEmbeddedObject.cpp:
1671         (WebCore::RenderEmbeddedObject::isReplacementObscured):
1672
1673 2013-08-21  Andreas Kling  <akling@apple.com>
1674
1675         <https://webkit.org/b/120132> Frame::navigationScheduler() should return a reference.
1676
1677         Reviewed by Anders Carlzon.
1678
1679         Frame::m_navigationScheduler is an inline member, not a pointer.
1680
1681 2013-08-21  Tim Horton  <timothy_horton@apple.com>
1682
1683         REGRESSION(r154399): broke Mac ML debug WK1 tests > 50 crashes (Requested by thorton on #webkit).
1684         https://bugs.webkit.org/show_bug.cgi?id=120129
1685
1686         Rolling out http://trac.webkit.org/changeset/154399.
1687
1688         * rendering/RenderBlock.cpp:
1689         * rendering/RenderBlock.h:
1690         * rendering/RenderBlockLineLayout.cpp:
1691         (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
1692         * rendering/RenderBox.h:
1693
1694 2013-08-21  Andreas Kling  <akling@apple.com>
1695
1696         <https://webkit.org/b/120118> Frame::animation() should return a reference.
1697
1698         Reviewed by Anders Carlsson.
1699
1700         Frame::m_animationController is never null.
1701         Also changed RenderObject::animation() to return a reference since it's just a wrapper
1702         around RenderObject::frame()->animation() with no null checking of frame().
1703
1704 2013-08-21  Simon Fraser  <simon.fraser@apple.com>
1705
1706         Allow opacity to apply to custom scrollbars
1707         https://bugs.webkit.org/show_bug.cgi?id=120104
1708
1709         Reviewed by David Hyatt.
1710         
1711         Opacity was ignored custom scrollbar pseudoelements because custom scrollbar
1712         renderers never create layers, and opacity is normally handled by the RenderLayer code.
1713         
1714         Fix by having RenderScrollbarTheme and RenderScrollbarPart do the transparency
1715         layers necessary for opacity. RenderScrollbarPart handles opacity for individual
1716         parts.
1717         
1718         Because ScrollbarThemeComposite::paint() renders the parts on after another (with
1719         no nesting), opacity handling for the entire scrollbar needs special-casing.
1720         This is done by willPaintScrollbar()/didPaintScrollbar() on the theme.
1721         RenderScrollbarTheme consults the opacity the scrollbar (which we get from
1722         the ScrollbarBGPart renderer) to decide whether to set up a transparency layer.
1723
1724         Test: scrollbars/scrollbar-parts-opacity.html
1725
1726         * platform/ScrollbarThemeComposite.cpp:
1727         (WebCore::ScrollbarThemeComposite::paint):
1728         * platform/ScrollbarThemeComposite.h:
1729         (WebCore::ScrollbarThemeComposite::willPaintScrollbar):
1730         (WebCore::ScrollbarThemeComposite::didPaintScrollbar):
1731         * rendering/RenderScrollbar.cpp:
1732         (WebCore::RenderScrollbar::opacity):
1733         * rendering/RenderScrollbar.h:
1734         * rendering/RenderScrollbarPart.cpp:
1735         (WebCore::RenderScrollbarPart::paintIntoRect):
1736         * rendering/RenderScrollbarTheme.cpp:
1737         (WebCore::RenderScrollbarTheme::willPaintScrollbar):
1738         (WebCore::RenderScrollbarTheme::didPaintScrollbar):
1739         * rendering/RenderScrollbarTheme.h:
1740
1741 2013-08-21  Robert Hogan  <robert@webkit.org>
1742
1743         REGRESSION(r127163): Respect clearance set on ancestors when placing floats
1744         https://bugs.webkit.org/show_bug.cgi?id=119979
1745
1746         Reviewed by David Hyatt.
1747
1748         If a float has a self-collapsing ancestor with clearance then it needs to respect
1749         that clearance when placing itself on the line.
1750
1751         Test: fast/block/margin-collapse/self-collapsing-block-with-float-descendant.html
1752
1753         * rendering/RenderBlock.cpp:
1754         (WebCore::RenderBlock::marginOffsetForSelfCollapsingBlock):
1755         * rendering/RenderBlock.h:
1756         * rendering/RenderBlockLineLayout.cpp:
1757         (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
1758         * rendering/RenderBox.h:
1759         (WebCore::RenderBox::previousInFlowSiblingBox):
1760
1761 2013-08-21  Brent Fulgham  <bfulgham@apple.com>
1762
1763         <https://webkit.org/b/120113> [Windows] Enable CSS_IMAGE_SET
1764
1765         Reviewed by Anders Carlsson.
1766
1767         We can now activate:
1768         fast/css/image-set-parsing.html
1769         fast/css/image-set-parsing-invalid.html
1770
1771         * WebCore.vcxproj/WebCore.vcxproj: Add missing image set implementation files.
1772         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1773         * css/CSSAllInOne.cpp: Add missing CSSImageSetValue.cpp
1774         * rendering/style/StyleAllInOne.cpp: Add missing StyeCachedImageSet.cpp
1775
1776 2013-08-21  Robert Hogan  <robert@webkit.org>
1777
1778         In RenderTableCell::paintCollapsedBorders() check surrounding cells using physical rather than logical direction
1779         https://bugs.webkit.org/show_bug.cgi?id=120074
1780
1781         Reviewed by David Hyatt.
1782
1783         No new tests, covered by existing tests.
1784
1785         The functions cellAbove(), cellBelow() etc. check the logical rather than the physical direction but they're being
1786         used to decide the painting of the physical borders of the cell. As we paint all four sides of every cell, and
1787         the borders of adjoining cells twice over, this has no impact on painting currently but making the check consistent
1788         in its treatment of physical and logical direction will help with webkit.org/b/119759 and make the code less confusing
1789         to the next guy.
1790
1791         * rendering/RenderTableCell.cpp:
1792         (WebCore::RenderTableCell::cellAtLeft):
1793         (WebCore::RenderTableCell::cellAtRight):
1794         (WebCore::RenderTableCell::cellAtTop):
1795         (WebCore::RenderTableCell::cellAtBottom):
1796         (WebCore::RenderTableCell::paintCollapsedBorders):
1797         * rendering/RenderTableCell.h:
1798
1799 2013-08-21  Róbert Sipka  <sipka@inf.u-szeged.hu>
1800
1801         <https://webkit.org/b/120109> [curl] only include WebCoreBundleWin on Windows
1802
1803         Reviewed by Brent Fulgham.
1804
1805         The WebCoreBundleWin is a windows specific file, it is only needed on Windows.
1806
1807         * platform/network/curl/ResourceHandleManager.cpp:
1808
1809 2013-08-21  Jae Hyun Park  <jae.park@company100.net>
1810
1811         [Qt] Remove unused code path in PluginView
1812         https://bugs.webkit.org/show_bug.cgi?id=113173
1813
1814         Reviewed by Anders Carlsson.
1815
1816         m_platformLayer in PluginView has been removed in r121710, but there are
1817         still some leftover code path related to m_platformLayer. This patch
1818         removes unused code path.
1819
1820         No new tests, removing unused code paths.
1821
1822         * plugins/PluginView.h:
1823         (PluginView):
1824         * plugins/qt/PluginViewQt.cpp:
1825         (WebCore::PluginView::updatePluginWidget):
1826         (WebCore::PluginView::paint):
1827
1828 2013-08-21  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1829
1830         Font’s fast code path doesn’t handle partial runs correctly when kerning or ligatures are enabled 
1831         https://bugs.webkit.org/show_bug.cgi?id=100050
1832
1833         Reviewed by Antti Koivisto.
1834
1835         Always let WidthIterator iterate over an entire TextRun to avoid problems
1836         with pixel rounding or shaping on partial runs.
1837
1838         This fix is necessary for Qt because the complex font-path can not disable
1839         shaping, leading to the complex path painting slighly different from the
1840         fast path, which messes up selection painting.
1841
1842         No change in functionality, no new tests.
1843
1844         * platform/graphics/Font.cpp:
1845         (WebCore::Font::drawText):
1846         (WebCore::Font::drawEmphasisMarks):
1847         (WebCore::Font::selectionRectForText):
1848         (WebCore::Font::offsetForPosition):
1849         * platform/graphics/FontFastPath.cpp:
1850         (WebCore::Font::getGlyphsAndAdvancesForSimpleText):
1851         (WebCore::Font::selectionRectForSimpleText):
1852         (WebCore::Font::offsetForPositionForSimpleText):
1853         * platform/graphics/GlyphBuffer.h:
1854         (WebCore::GlyphBuffer::add):
1855         (GlyphBuffer):
1856         * platform/graphics/WidthIterator.cpp:
1857         (WebCore::WidthIterator::advanceInternal):
1858         * platform/graphics/WidthIterator.h:
1859         (WidthIterator): Removed now unused advanceOneCharacter method.
1860
1861 2013-08-20  Antonio Gomes  <a1.gomes@sisa.samsung.com>
1862
1863         Harden RenderBox::canBeScrolledAndHasScrollableArea logic
1864         https://bugs.webkit.org/show_bug.cgi?id=104373
1865
1866         Reviewed by Simon Fraser.
1867
1868         Previously if a say div has a overflown content on 'y' but is
1869         styled as "overflow-x: auto; overflow-y: hidden", RenderBox::canBeProgramaticallyScrolled
1870         would still return true. It interfers, among other things, with the way
1871         autoscroll works.
1872
1873         Patch fixes it by adding two helper methods to RenderBox class in order to verify a box'
1874         scrollability in a given axis (x or y); They are used when checking if a given box is in
1875         fact programatically scrollable.
1876
1877         Test: fast/events/autoscroll-overflow-hidden-longhands.html
1878
1879         WebKit autoscroll behavior now matches Firefox and Opera12 (pre-blink)
1880         in that sense.
1881
1882         * rendering/RenderBox.cpp:
1883         (WebCore::RenderBox::canBeProgramaticallyScrolled):
1884         * rendering/RenderBox.h:
1885         (WebCore::RenderBox::hasScrollableOverflowX):
1886         (WebCore::RenderBox::hasScrollableOverflowY):
1887
1888 2013-08-19  Antonio Gomes  <a1.gomes@sisa.samsung.com>
1889
1890         Text dragging can scroll overflow:hidden boxes
1891         https://bugs.webkit.org/show_bug.cgi?id=119760
1892
1893         Reviewed by Darin Adler.
1894
1895         Consider the case of the following HTML:
1896         <div style="overflow:hidden; width: 100px; height: 100px" >
1897           <input id="input" type="text" size=10 value="any text here!"/>
1898           <button style="position:relative; top: 100px; left: 100px"/>
1899         </div>
1900
1901         If ones starts a text selection by dragging the mouse from within the input
1902         field, and continues to drag beyong the outer div boundary, the latter will
1903         be scrolled no matter its overflow:hidden style.
1904         That happens because when the autoscroll has started, it gets propagated up
1905         to the current layer's parent layer, instead of the to current layer's enclosing
1906         scrollable layer.
1907
1908         Patch fixes the issue by hardening the way scrolling is
1909         propagated upwards when autoscroll is being performed.
1910
1911         RenderLayer::enclosingScrollableLayer method also got rewritten
1912         in terms of RenderLayer tree traversing, instead of RenderObject tree.
1913         The rewrite adds support for cross frame upwards traversal.
1914
1915         Test: fast/events/autoscroll-upwards-propagation.html
1916
1917         * rendering/RenderLayer.cpp:
1918         (WebCore::parentLayerCrossFrame):
1919         (WebCore::RenderLayer::enclosingScrollableLayer):
1920         (WebCore::RenderLayer::scrollRectToVisible):
1921
1922 2013-08-20  Jer Noble  <jer.noble@apple.com>
1923
1924         <https://webkit.org/b/120101> [Mac] Suspended HTMLMediaElements can still hold power assertion after playback stops.
1925
1926         Reviewed by Eric Carlson.
1927
1928         Call updateDisplaySleep() when we clear our MediaPlayer, as doing so may kill any in-flight
1929         rateChanged() notifications.
1930
1931         * html/HTMLMediaElement.cpp:
1932         (WebCore::HTMLMediaElement::clearMediaPlayer):
1933         (WebCore::HTMLMediaElement::stop):
1934
1935 2013-08-20  David Barr <davidbarr@chromium.org>, Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1936
1937         <https://webkit.org/b/92330> [CSS] Pass an image orientation data to drawImage()
1938
1939         Reviewed by Beth Dakin.
1940
1941         In support of ongoing css3-images image-orientation implementation. This patch passes
1942         an imageOrientationDescription object to drawImage() function as a argument. The drawImage()
1943         can know information of image orientation by the argument.
1944
1945         Spec: http://www.w3.org/TR/2012/CR-css3-images-20120417/#the-image-orientation
1946
1947         * html/HTMLCanvasElement.cpp:
1948         (WebCore::HTMLCanvasElement::paint):
1949         * html/canvas/CanvasRenderingContext2D.cpp:
1950         (WebCore::CanvasRenderingContext2D::drawImage):
1951         (WebCore::drawImageToContext):
1952         * platform/graphics/ImageOrientation.h: Add setter functions.
1953         (WebCore::ImageOrientationDescription::setRespectImageOrientation):
1954         (WebCore::ImageOrientationDescription::setImageOrientationEnum):
1955         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
1956         (WebCore::BitmapTextureImageBuffer::updateContents):
1957         * rendering/RenderBoxModelObject.cpp:
1958         (WebCore::RenderBoxModelObject::paintNinePieceImage):
1959         * rendering/RenderImage.cpp:
1960         (WebCore::RenderImage::paintReplaced):
1961         (WebCore::RenderImage::paintIntoRect):
1962         * rendering/RenderSnapshottedPlugIn.cpp:
1963         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
1964
1965 2013-08-20  Gavin Barraclough  <barraclough@apple.com>
1966
1967         https://bugs.webkit.org/show_bug.cgi?id=120093
1968         Remove getOwnPropertyDescriptor trap
1969
1970         Reviewed by Geoff Garen.
1971
1972         All implementations of this method are now called via the method table, and equivalent in behaviour.
1973         Remove all duplicate implementations (and the method table trap), and add a single member function implementation on JSObject.
1974
1975         * WebCore.exp.in:
1976         * bindings/js/JSDOMWindowCustom.cpp:
1977         * bindings/scripts/CodeGeneratorJS.pm:
1978         (GenerateHeader):
1979         (GenerateImplementation):
1980         (GenerateConstructorDeclaration):
1981         (GenerateConstructorHelperMethods):
1982         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1983         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
1984         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1985         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
1986         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1987         * bindings/scripts/test/JS/JSTestEventConstructor.h:
1988         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1989         * bindings/scripts/test/JS/JSTestEventTarget.h:
1990         * bindings/scripts/test/JS/JSTestException.cpp:
1991         * bindings/scripts/test/JS/JSTestException.h:
1992         * bindings/scripts/test/JS/JSTestInterface.cpp:
1993         * bindings/scripts/test/JS/JSTestInterface.h:
1994         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1995         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
1996         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1997         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
1998         * bindings/scripts/test/JS/JSTestNode.cpp:
1999         * bindings/scripts/test/JS/JSTestNode.h:
2000         * bindings/scripts/test/JS/JSTestObj.cpp:
2001         * bindings/scripts/test/JS/JSTestObj.h:
2002         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2003         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
2004         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2005         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
2006         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2007         * bindings/scripts/test/JS/JSTestTypedefs.h:
2008         * bridge/jsc/BridgeJSC.h:
2009         (JSC::Bindings::Instance::getOwnPropertySlot):
2010         * bridge/objc/objc_runtime.h:
2011         * bridge/objc/objc_runtime.mm:
2012         * bridge/runtime_array.cpp:
2013         * bridge/runtime_array.h:
2014         * bridge/runtime_method.cpp:
2015         * bridge/runtime_method.h:
2016         * bridge/runtime_object.cpp:
2017         * bridge/runtime_object.h:
2018             - remove getOwnPropertyDescriptor
2019
2020 2013-08-20  Antti Koivisto  <antti@apple.com>
2021
2022         <https://webkit.org/b/120071> Replace NodeRenderingContext with Node* as childShouldCreateRenderer() argument
2023
2024         Reviewed by Darin Adler.
2025
2026         This simplifies the code. NodeRenderingContext was basically only used for getting the Node.
2027
2028         * dom/ContainerNode.h:
2029         (WebCore::ContainerNode::childShouldCreateRenderer):
2030         * dom/Element.cpp:
2031         (WebCore::Element::childShouldCreateRenderer):
2032         * dom/Element.h:
2033         * dom/NodeRenderingContext.cpp:
2034         (WebCore::NodeRenderingContext::shouldCreateRenderer):
2035         * dom/NodeRenderingContext.h:
2036         
2037             Move isOnEncapsulationBoundary() to InsertionPoint.h and call it hasShadowRootOrActiveInsertionPointParent().
2038             Move isOnUpperEncapsulationBoundary() to ShadowRoot.h and call it hasShadowRootParent().
2039
2040         * dom/ShadowRoot.h:
2041         (WebCore::hasShadowRootParent):
2042         * html/HTMLDetailsElement.cpp:
2043         (WebCore::HTMLDetailsElement::childShouldCreateRenderer):
2044         * html/HTMLDetailsElement.h:
2045         * html/HTMLFormControlElement.cpp:
2046         (WebCore::HTMLFormControlElement::validationMessageShadowTreeContains):
2047         * html/HTMLFormControlElement.h:
2048         * html/HTMLMediaElement.cpp:
2049         (WebCore::HTMLMediaElement::childShouldCreateRenderer):
2050         * html/HTMLMediaElement.h:
2051         * html/HTMLMeterElement.cpp:
2052         (WebCore::HTMLMeterElement::childShouldCreateRenderer):
2053         * html/HTMLMeterElement.h:
2054         * html/HTMLOptGroupElement.h:
2055         (WebCore::isHTMLOptGroupElement):
2056         * html/HTMLOptionElement.h:
2057         (WebCore::isHTMLOptionElement):
2058         * html/HTMLProgressElement.cpp:
2059         (WebCore::HTMLProgressElement::childShouldCreateRenderer):
2060         * html/HTMLProgressElement.h:
2061         * html/HTMLSelectElement.cpp:
2062         (WebCore::HTMLSelectElement::childShouldCreateRenderer):
2063         * html/HTMLSelectElement.h:
2064         * html/HTMLSummaryElement.cpp:
2065         (WebCore::HTMLSummaryElement::childShouldCreateRenderer):
2066         * html/HTMLSummaryElement.h:
2067         * html/HTMLTextFormControlElement.cpp:
2068         (WebCore::HTMLTextFormControlElement::childShouldCreateRenderer):
2069         (WebCore::enclosingTextFormControl):
2070         * html/HTMLTextFormControlElement.h:
2071         * html/ValidationMessage.cpp:
2072         (WebCore::ValidationMessage::shadowTreeContains):
2073         * html/ValidationMessage.h:
2074         * html/shadow/InsertionPoint.cpp:
2075         (WebCore::InsertionPoint::rendererIsNeeded):
2076         * html/shadow/InsertionPoint.h:
2077         (WebCore::isActiveInsertionPoint):
2078         
2079             Remove isShadowBoundary() as it was equivalent to isActive(). 
2080             Remove isLowerEncapsulationBoundary() as it was equivalent to isActiveInsertionPoint().
2081
2082         (WebCore::hasShadowRootOrActiveInsertionPointParent):
2083         
2084             Moved and renamed from NodeRenderingContext::isOnEncapsulationBoundary().
2085
2086         * svg/SVGAElement.cpp:
2087         (WebCore::SVGAElement::childShouldCreateRenderer):
2088         * svg/SVGAElement.h:
2089         * svg/SVGAltGlyphElement.cpp:
2090         (WebCore::SVGAltGlyphElement::childShouldCreateRenderer):
2091         * svg/SVGAltGlyphElement.h:
2092         * svg/SVGDocument.cpp:
2093         (WebCore::SVGDocument::childShouldCreateRenderer):
2094         * svg/SVGDocument.h:
2095         * svg/SVGElement.cpp:
2096         (WebCore::SVGElement::childShouldCreateRenderer):
2097         * svg/SVGElement.h:
2098         * svg/SVGFilterElement.cpp:
2099         (WebCore::SVGFilterElement::childShouldCreateRenderer):
2100         * svg/SVGFilterElement.h:
2101         * svg/SVGFilterPrimitiveStandardAttributes.h:
2102         * svg/SVGForeignObjectElement.cpp:
2103         (WebCore::SVGForeignObjectElement::childShouldCreateRenderer):
2104         * svg/SVGForeignObjectElement.h:
2105         * svg/SVGSVGElement.h:
2106         (WebCore::toSVGSVGElement):
2107         * svg/SVGSwitchElement.cpp:
2108         (WebCore::SVGSwitchElement::childShouldCreateRenderer):
2109         * svg/SVGSwitchElement.h:
2110         * svg/SVGTRefElement.cpp:
2111         (WebCore::SVGTRefElement::childShouldCreateRenderer):
2112         * svg/SVGTRefElement.h:
2113         * svg/SVGTSpanElement.cpp:
2114         (WebCore::SVGTSpanElement::childShouldCreateRenderer):
2115         * svg/SVGTSpanElement.h:
2116         * svg/SVGTextElement.cpp:
2117         (WebCore::SVGTextElement::childShouldCreateRenderer):
2118         * svg/SVGTextElement.h:
2119         * svg/SVGTextPathElement.cpp:
2120         (WebCore::SVGTextPathElement::childShouldCreateRenderer):
2121         * svg/SVGTextPathElement.h:
2122
2123 2013-08-20  Benjamin Poulain  <benjamin@webkit.org>
2124
2125         <https://webkit.org/b/120050> Don't bother using a Vector for the ouput of querySelector, just return the first element found
2126
2127         Reviewed by Ryosuke Niwa.
2128
2129         Simplify the case of querySelector. Instead of using the same output type as querySelectorAll,
2130         simply use a trait to define what to do in the loop.
2131
2132         * dom/SelectorQuery.cpp:
2133         (WebCore::AllElementExtractorSelectorQueryTrait::appendOutputForElement):
2134         (WebCore::SelectorDataList::queryAll):
2135         (WebCore::SingleElementExtractorSelectorQueryTrait::appendOutputForElement):
2136         (WebCore::SelectorDataList::queryFirst):
2137         (WebCore::SelectorDataList::executeFastPathForIdSelector):
2138         (WebCore::elementsForLocalName):
2139         (WebCore::anyElement):
2140         (WebCore::SelectorDataList::executeSingleTagNameSelectorData):
2141         (WebCore::SelectorDataList::executeSingleClassNameSelectorData):
2142         (WebCore::SelectorDataList::executeSingleSelectorData):
2143         (WebCore::SelectorDataList::executeSingleMultiSelectorData):
2144         (WebCore::SelectorDataList::execute):
2145         * dom/SelectorQuery.h:
2146
2147 2013-08-20  Antti Koivisto  <antti@apple.com>
2148
2149         Rollout the previous patch for landing with the correct ChangeLog.
2150
2151 013-08-20  Jacky Jiang  <zhajiang@blackberry.com>
2152
2153         <https://webkit.org/b/120082> [BlackBerry] Remove unused previousTextureRect in LayerTiler
2154
2155         Reviewed by Rob Buis.
2156         Internally reviewed by Mike Lattanzio and Jakob Petsovits.
2157
2158         * platform/graphics/blackberry/LayerTiler.cpp:
2159         (WebCore::LayerTiler::updateTextureContentsIfNeeded):
2160
2161 2013-08-20  Antti Koivisto  <antti@apple.com>
2162
2163         <https://webkit.org/b/120078> Replace NodeRenderingContext with RenderStyle& as shouldCreateRenderer() argument
2164
2165         Reviewed by Darin Adler.
2166
2167         This simplifies the code. NodeRenderingContext was only used for getting the RenderStyle.
2168
2169         * dom/Element.cpp:
2170         (WebCore::Element::rendererIsNeeded):
2171         * dom/Element.h:
2172         * dom/NodeRenderingContext.cpp:
2173         (WebCore::NodeRenderingContext::elementInsideRegionNeedsRenderer):
2174         (WebCore::NodeRenderingContext::createRendererForElementIfNeeded):
2175         * dom/PseudoElement.cpp:
2176         (WebCore::PseudoElement::rendererIsNeeded):
2177         * dom/PseudoElement.h:
2178         * html/HTMLAppletElement.cpp:
2179         (WebCore::HTMLAppletElement::rendererIsNeeded):
2180         * html/HTMLAppletElement.h:
2181         * html/HTMLElement.cpp:
2182         (WebCore::HTMLElement::rendererIsNeeded):
2183         * html/HTMLElement.h:
2184         * html/HTMLEmbedElement.cpp:
2185         (WebCore::HTMLEmbedElement::rendererIsNeeded):
2186         * html/HTMLEmbedElement.h:
2187         * html/HTMLFormElement.cpp:
2188         (WebCore::HTMLFormElement::rendererIsNeeded):
2189         * html/HTMLFormElement.h:
2190         * html/HTMLFrameElement.cpp:
2191         (WebCore::HTMLFrameElement::rendererIsNeeded):
2192         * html/HTMLFrameElement.h:
2193         * html/HTMLFrameSetElement.cpp:
2194         (WebCore::HTMLFrameSetElement::rendererIsNeeded):
2195         * html/HTMLFrameSetElement.h:
2196         * html/HTMLIFrameElement.cpp:
2197         (WebCore::HTMLIFrameElement::rendererIsNeeded):
2198         * html/HTMLIFrameElement.h:
2199         * html/HTMLInputElement.cpp:
2200         (WebCore::HTMLInputElement::rendererIsNeeded):
2201         * html/HTMLInputElement.h:
2202         * html/HTMLMediaElement.cpp:
2203         (WebCore::HTMLMediaElement::rendererIsNeeded):
2204         * html/HTMLMediaElement.h:
2205         * html/HTMLObjectElement.cpp:
2206         (WebCore::HTMLObjectElement::rendererIsNeeded):
2207         * html/HTMLObjectElement.h:
2208         * html/HTMLOptGroupElement.h:
2209         * html/HTMLOptionElement.h:
2210         * html/HTMLVideoElement.cpp:
2211         (WebCore::HTMLVideoElement::rendererIsNeeded):
2212         * html/HTMLVideoElement.h:
2213         * html/shadow/DetailsMarkerControl.cpp:
2214         (WebCore::DetailsMarkerControl::rendererIsNeeded):
2215         * html/shadow/DetailsMarkerControl.h:
2216         * html/shadow/InsertionPoint.cpp:
2217         (WebCore::InsertionPoint::rendererIsNeeded):
2218         * html/shadow/InsertionPoint.h:
2219         * html/shadow/MeterShadowElement.cpp:
2220         (WebCore::MeterShadowElement::rendererIsNeeded):
2221         (WebCore::MeterInnerElement::rendererIsNeeded):
2222         * html/shadow/MeterShadowElement.h:
2223         * html/shadow/ProgressShadowElement.cpp:
2224         (WebCore::ProgressShadowElement::rendererIsNeeded):
2225         (WebCore::ProgressInnerElement::rendererIsNeeded):
2226         * html/shadow/ProgressShadowElement.h:
2227         * svg/SVGDescElement.h:
2228         * svg/SVGElement.h:
2229         (WebCore::SVGElement::rendererIsNeeded):
2230         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
2231         (WebCore::SVGFilterPrimitiveStandardAttributes::rendererIsNeeded):
2232         * svg/SVGFilterPrimitiveStandardAttributes.h:
2233         * svg/SVGFontElement.h:
2234         * svg/SVGForeignObjectElement.cpp:
2235         (WebCore::SVGForeignObjectElement::rendererIsNeeded):
2236         * svg/SVGForeignObjectElement.h:
2237         * svg/SVGGElement.cpp:
2238         (WebCore::SVGGElement::rendererIsNeeded):
2239         * svg/SVGGElement.h:
2240         * svg/SVGGlyphElement.h:
2241         * svg/SVGGlyphRefElement.h:
2242         * svg/SVGHKernElement.h:
2243         * svg/SVGMarkerElement.h:
2244         * svg/SVGMissingGlyphElement.h:
2245         * svg/SVGSVGElement.cpp:
2246         (WebCore::SVGSVGElement::rendererIsNeeded):
2247         * svg/SVGSVGElement.h:
2248         * svg/SVGStopElement.cpp:
2249         (WebCore::SVGStopElement::rendererIsNeeded):
2250         * svg/SVGStopElement.h:
2251         * svg/SVGStyledElement.cpp:
2252         (WebCore::SVGStyledElement::rendererIsNeeded):
2253         * svg/SVGStyledElement.h:
2254         * svg/SVGTRefElement.cpp:
2255         (WebCore::SVGTRefElement::rendererIsNeeded):
2256         * svg/SVGTRefElement.h:
2257         * svg/SVGTSpanElement.cpp:
2258         (WebCore::SVGTSpanElement::rendererIsNeeded):
2259         * svg/SVGTSpanElement.h:
2260         * svg/SVGTextPathElement.cpp:
2261         (WebCore::SVGTextPathElement::rendererIsNeeded):
2262         * svg/SVGTextPathElement.h:
2263         * svg/SVGTitleElement.h:
2264         * svg/SVGVKernElement.h:
2265         * svg/SVGViewElement.h:
2266
2267 2013-08-20  Daniel Bates  <dabates@apple.com>
2268
2269         <https://webkit.org/b/120088> Define Clipboard::hasData() only when building with drag support
2270
2271         Reviewed by Darin Adler.
2272
2273         Clipboard::hasData() is specific to drag-and-drop support. We should only define it when
2274         such support is enabled.
2275
2276         * dom/Clipboard.cpp: Move hasData() to DRAG_SUPPORT section of the file.
2277         * dom/Clipboard.h: Ditto.
2278
2279 2013-08-20  Antti Koivisto  <antti@apple.com>
2280
2281         <https://webkit.org/b/120078> Replace NodeRenderingContext with RenderStyle& as shouldCreateRenderer() argument
2282
2283         Reviewed by Darin Adler.
2284
2285         This simplifies the code. NodeRenderingContext was only used for getting the RenderStyle.
2286
2287         * dom/Element.cpp:
2288         (WebCore::Element::rendererIsNeeded):
2289         * dom/Element.h:
2290         * dom/NodeRenderingContext.cpp:
2291         (WebCore::NodeRenderingContext::elementInsideRegionNeedsRenderer):
2292         (WebCore::NodeRenderingContext::createRendererForElementIfNeeded):
2293         * dom/PseudoElement.cpp:
2294         (WebCore::PseudoElement::rendererIsNeeded):
2295         * dom/PseudoElement.h:
2296         * html/HTMLAppletElement.cpp:
2297         (WebCore::HTMLAppletElement::rendererIsNeeded):
2298         * html/HTMLAppletElement.h:
2299         * html/HTMLElement.cpp:
2300         (WebCore::HTMLElement::rendererIsNeeded):
2301         * html/HTMLElement.h:
2302         * html/HTMLEmbedElement.cpp:
2303         (WebCore::HTMLEmbedElement::rendererIsNeeded):
2304         * html/HTMLEmbedElement.h:
2305         * html/HTMLFormElement.cpp:
2306         (WebCore::HTMLFormElement::rendererIsNeeded):
2307         * html/HTMLFormElement.h:
2308         * html/HTMLFrameElement.cpp:
2309         (WebCore::HTMLFrameElement::rendererIsNeeded):
2310         * html/HTMLFrameElement.h:
2311         * html/HTMLFrameSetElement.cpp:
2312         (WebCore::HTMLFrameSetElement::rendererIsNeeded):
2313         * html/HTMLFrameSetElement.h:
2314         * html/HTMLIFrameElement.cpp:
2315         (WebCore::HTMLIFrameElement::rendererIsNeeded):
2316         * html/HTMLIFrameElement.h:
2317         * html/HTMLInputElement.cpp:
2318         (WebCore::HTMLInputElement::rendererIsNeeded):
2319         * html/HTMLInputElement.h:
2320         * html/HTMLMediaElement.cpp:
2321         (WebCore::HTMLMediaElement::rendererIsNeeded):
2322         * html/HTMLMediaElement.h:
2323         * html/HTMLObjectElement.cpp:
2324         (WebCore::HTMLObjectElement::rendererIsNeeded):
2325         * html/HTMLObjectElement.h:
2326         * html/HTMLOptGroupElement.h:
2327         * html/HTMLOptionElement.h:
2328         * html/HTMLVideoElement.cpp:
2329         (WebCore::HTMLVideoElement::rendererIsNeeded):
2330         * html/HTMLVideoElement.h:
2331         * html/shadow/DetailsMarkerControl.cpp:
2332         (WebCore::DetailsMarkerControl::rendererIsNeeded):
2333         * html/shadow/DetailsMarkerControl.h:
2334         * html/shadow/InsertionPoint.cpp:
2335         (WebCore::InsertionPoint::rendererIsNeeded):
2336         * html/shadow/InsertionPoint.h:
2337         * html/shadow/MeterShadowElement.cpp:
2338         (WebCore::MeterShadowElement::rendererIsNeeded):
2339         (WebCore::MeterInnerElement::rendererIsNeeded):
2340         * html/shadow/MeterShadowElement.h:
2341         * html/shadow/ProgressShadowElement.cpp:
2342         (WebCore::ProgressShadowElement::rendererIsNeeded):
2343         (WebCore::ProgressInnerElement::rendererIsNeeded):
2344         * html/shadow/ProgressShadowElement.h:
2345         * svg/SVGDescElement.h:
2346         * svg/SVGElement.h:
2347         (WebCore::SVGElement::rendererIsNeeded):
2348         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
2349         (WebCore::SVGFilterPrimitiveStandardAttributes::rendererIsNeeded):
2350         * svg/SVGFilterPrimitiveStandardAttributes.h:
2351         * svg/SVGFontElement.h:
2352         * svg/SVGForeignObjectElement.cpp:
2353         (WebCore::SVGForeignObjectElement::rendererIsNeeded):
2354         * svg/SVGForeignObjectElement.h:
2355         * svg/SVGGElement.cpp:
2356         (WebCore::SVGGElement::rendererIsNeeded):
2357         * svg/SVGGElement.h:
2358         * svg/SVGGlyphElement.h:
2359         * svg/SVGGlyphRefElement.h:
2360         * svg/SVGHKernElement.h:
2361         * svg/SVGMarkerElement.h:
2362         * svg/SVGMissingGlyphElement.h:
2363         * svg/SVGSVGElement.cpp:
2364         (WebCore::SVGSVGElement::rendererIsNeeded):
2365         * svg/SVGSVGElement.h:
2366         * svg/SVGStopElement.cpp:
2367         (WebCore::SVGStopElement::rendererIsNeeded):
2368         * svg/SVGStopElement.h:
2369         * svg/SVGStyledElement.cpp:
2370         (WebCore::SVGStyledElement::rendererIsNeeded):
2371         * svg/SVGStyledElement.h:
2372         * svg/SVGTRefElement.cpp:
2373         (WebCore::SVGTRefElement::rendererIsNeeded):
2374         * svg/SVGTRefElement.h:
2375         * svg/SVGTSpanElement.cpp:
2376         (WebCore::SVGTSpanElement::rendererIsNeeded):
2377         * svg/SVGTSpanElement.h:
2378         * svg/SVGTextPathElement.cpp:
2379         (WebCore::SVGTextPathElement::rendererIsNeeded):
2380         * svg/SVGTextPathElement.h:
2381         * svg/SVGTitleElement.h:
2382         * svg/SVGVKernElement.h:
2383         * svg/SVGViewElement.h:
2384
2385 2013-08-20  Tim Horton  <timothy_horton@apple.com>
2386
2387         <https://webkit.org/b/105988> [Mac] Some inspector tests intermittently assert in InspectorOverlay::paint
2388         <rdar://problem/12958038>
2389
2390         Reviewed by Joseph Pecoraro.
2391
2392         Update the inspector overlay's layout before painting, if it is stale.
2393
2394         No new tests; fixes an intermittent assertion failure in some existing tests.
2395
2396         * inspector/InspectorOverlay.cpp:
2397         (WebCore::InspectorOverlay::paint):
2398
2399 2013-08-20  Daniel Bates  <dabates@apple.com>
2400
2401         Build fix after <http://trac.webkit.org/changeset/154260> (https://webkit.org/b/119949);
2402         declare Clipboard::hasData() when building with and without drag support
2403
2404         * dom/Clipboard.h:
2405
2406 2013-08-20  Hans Muller  <hmuller@adobe.com>
2407
2408         <https://webkit.org/b/119849> [CSS Shapes] Complete RasterShape::firstIncludedIntervalLogicalTop()
2409
2410         Reviewed by Alexandru Chiculita.
2411
2412         Completed the implementation of RasterShape::firstIncludedIntervalLogicalTop(). The
2413         method now computes first logical top location where a line segment can be laid
2414         out within a RasterShape, i.e. a shape derived from an image valued URL resource.
2415
2416         A detailed description of the algorithm can be found in
2417         http://hansmuller-webkit.blogspot.com/2013/08/first-fit-location-for-image-shapes.html.
2418
2419         The new tests exposed a bug in the existing getIncludedIntervals() method. A shape
2420         with a vertical gap that spans the entire line now causes the method to short circuit
2421         and return an empty interval list.
2422
2423         Tests: fast/shapes/shape-inside/shape-inside-image-003.html
2424                fast/shapes/shape-inside/shape-inside-image-004.html
2425                fast/shapes/shape-inside/shape-inside-image-005.html
2426
2427         * rendering/shapes/RasterShape.cpp:
2428         (WebCore::RasterShapeIntervals::firstIncludedIntervalY):
2429         (WebCore::RasterShapeIntervals::getIncludedIntervals):
2430         (WebCore::RasterShape::firstIncludedIntervalLogicalTop):
2431         * rendering/shapes/RasterShape.h:
2432
2433 2013-08-20  Pratik Solanki  <psolanki@apple.com>
2434
2435         <https://webkit.org/b/120029> Document::markers() should return a reference
2436
2437         Reviewed by Andreas Kling.
2438
2439         Document::m_markers is never NULL so return a reference from Document::markers(). Also mark
2440         m_markers as const and initialize it in member initialization.
2441
2442         * dom/Document.cpp:
2443         (WebCore::Document::Document):
2444         * dom/Document.h:
2445         (WebCore::Document::markers):
2446         * editing/AlternativeTextController.cpp:
2447         (WebCore::AlternativeTextController::isSpellingMarkerAllowed):
2448         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
2449         (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
2450         (WebCore::AlternativeTextController::handleAlternativeTextUIResult):
2451         (WebCore::AlternativeTextController::respondToChangedSelection):
2452         (WebCore::AlternativeTextController::respondToAppliedEditing):
2453         (WebCore::AlternativeTextController::respondToUnappliedEditing):
2454         (WebCore::AlternativeTextController::markReversed):
2455         (WebCore::AlternativeTextController::markCorrection):
2456         (WebCore::AlternativeTextController::recordSpellcheckerResponseForModifiedCorrection):
2457         (WebCore::AlternativeTextController::markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand):
2458         (WebCore::AlternativeTextController::processMarkersOnTextToBeReplacedByResult):
2459         (WebCore::AlternativeTextController::applyDictationAlternative):
2460         * editing/CompositeEditCommand.cpp:
2461         (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
2462         * editing/DeleteSelectionCommand.cpp:
2463         (WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection):
2464         * editing/DictationCommand.cpp:
2465         (WebCore::DictationMarkerSupplier::addMarkersToTextNode):
2466         * editing/Editor.cpp:
2467         (WebCore::Editor::ignoreSpelling):
2468         (WebCore::Editor::learnSpelling):
2469         (WebCore::Editor::advanceToNextMisspelling):
2470         (WebCore::Editor::clearMisspellingsAndBadGrammar):
2471         (WebCore::Editor::markAndReplaceFor):
2472         (WebCore::Editor::changeBackToReplacedString):
2473         (WebCore::Editor::updateMarkersForWordsAffectedByEditing):
2474         (WebCore::Editor::countMatchesForText):
2475         (WebCore::Editor::setMarkedTextMatchesAreHighlighted):
2476         (WebCore::Editor::respondToChangedSelection):
2477         (WebCore::Editor::selectionStartHasMarkerFor):
2478         * editing/SpellChecker.cpp:
2479         (WebCore::SpellChecker::didCheckSucceed):
2480         * editing/SplitTextNodeCommand.cpp:
2481         (WebCore::SplitTextNodeCommand::doApply):
2482         (WebCore::SplitTextNodeCommand::doUnapply):
2483         * editing/TextCheckingHelper.cpp:
2484         (WebCore::TextCheckingHelper::findFirstMisspelling):
2485         (WebCore::TextCheckingHelper::findFirstGrammarDetail):
2486         * page/FrameView.cpp:
2487         (WebCore::FrameView::getTickmarks):
2488         (WebCore::FrameView::paintContents):
2489         * page/Page.cpp:
2490         (WebCore::Page::unmarkAllTextMatches):
2491         * rendering/HitTestResult.cpp:
2492         (WebCore::HitTestResult::spellingToolTip):
2493         (WebCore::HitTestResult::replacedString):
2494         (WebCore::HitTestResult::dictationAlternatives):
2495         * rendering/InlineTextBox.cpp:
2496         (WebCore::InlineTextBox::paintDocumentMarkers):
2497         * rendering/svg/SVGInlineFlowBox.cpp:
2498         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
2499         * testing/Internals.cpp:
2500         (WebCore::Internals::markerCountForNode):
2501         (WebCore::Internals::markerAt):
2502         (WebCore::Internals::addTextMatchMarker):
2503
2504 2013-08-20  Pratik Solanki  <psolanki@apple.com>
2505
2506         <https://webkit.org/b/119875> localeToScriptCodeForFontSelection should use hash tables with larger default capacity
2507
2508         Reviewed by Darin Adler.
2509
2510         The two static hash tables used in this file have 106 and 198 entries. Set a minimumTableSize for
2511         these hash tables so we don't have to expand them during initialization.
2512
2513         No new tests because no functional changes.
2514
2515         * platform/text/LocaleToScriptMappingDefault.cpp:
2516         (WebCore::scriptNameToCode):
2517         (WebCore::localeToScriptCodeForFontSelection):
2518
2519 2013-08-20  Eric Carlson  <eric.carlson@apple.com>
2520
2521         <https://webkit.org/b/120068> Media controls can be attached lazily
2522
2523         Reviewed by Jer Noble.
2524
2525         Merge https://chromium.googlesource.com/chromium/blink/+/28a995486a675992f2e72f81bfabdfff05688a31.
2526
2527         * html/HTMLMediaElement.cpp:
2528         (WebCore::HTMLMediaElement::createMediaControls): Add AttachLazily to appendChild().
2529
2530 2013-08-20  Daniel Bates  <dabates@apple.com>
2531
2532         <https://webkit.org/b/120072> Use nullAtom instead of defining static local in
2533         Accessibility{Object, RenderObject}::actionVerb()
2534
2535         Reviewed by Chris Fleizach.
2536
2537         * accessibility/AccessibilityObject.cpp:
2538         (WebCore::AccessibilityObject::actionVerb):
2539         * accessibility/AccessibilityRenderObject.cpp:
2540         (WebCore::AccessibilityRenderObject::actionVerb):
2541
2542 2013-08-20  Daniel Bates  <dabates@apple.com>
2543
2544         <https://webkit.org/b/119914> [iOS] Upstream changes to WebCore/accessibility
2545
2546         Reviewed by Darin Adler and Chris Fleizach.
2547
2548         * accessibility/AccessibilityMenuList.cpp:
2549         (WebCore::AccessibilityMenuList::press):
2550         (WebCore::AccessibilityMenuList::isCollapsed):
2551         * accessibility/AccessibilityObject.cpp:
2552         (WebCore::AccessibilityObject::headingElementForNode):
2553         (WebCore::AccessibilityObject::actionVerb):
2554         * accessibility/AccessibilityObject.h:
2555         * accessibility/AccessibilityRenderObject.cpp:
2556         (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange):
2557         (WebCore::AccessibilityRenderObject::actionVerb):
2558         * accessibility/AccessibilityTableColumn.cpp:
2559         (WebCore::AccessibilityTableColumn::computeAccessibilityIsIgnored):
2560         * accessibility/AccessibilityTableHeaderContainer.cpp:
2561         (WebCore::AccessibilityTableHeaderContainer::computeAccessibilityIsIgnored):
2562         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2563
2564 2013-08-20  Bruno de Oliveira Abinader  <bruno.d@partner.samsung.com>
2565
2566         [css3-text] Implement CSS3 text-decoration shorthand
2567         https://bugs.webkit.org/show_bug.cgi?id=92000
2568
2569         Reviewed by Darin Adler.
2570
2571         Implements the text-decoration shorthand (with -webkit- prefix), as specified by the CSS3 Text Decoration specification:
2572         http://dev.w3.org/csswg/css-text-decor-3/#text-decoration-property
2573
2574         Backported from Blink:
2575         https://src.chromium.org/viewvc/blink?revision=156266&view=revision
2576
2577         Tests: fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-shorthand-ordering.html
2578                fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-shorthand.html
2579
2580         * css/CSSComputedStyleDeclaration.cpp:
2581         (WebCore::ComputedStyleExtractor::propertyValue):
2582         * css/CSSParser.cpp:
2583         (WebCore::CSSParser::parseValue):
2584         (WebCore::CSSParser::addTextDecorationProperty):
2585         (WebCore::CSSParser::parseTextDecoration):
2586         * css/CSSProperty.cpp:
2587         (WebCore::CSSProperty::isInheritedProperty):
2588         * css/CSSPropertyNames.in:
2589         * css/StylePropertyShorthand.cpp:
2590         (WebCore::webkitTextDecorationShorthand):
2591         (WebCore::shorthandForProperty):
2592         (WebCore::matchingShorthandsForLonghand):
2593         * css/StylePropertyShorthand.h:
2594
2595 2013-08-20  Gavin Barraclough  <barraclough@apple.com>
2596
2597         https://bugs.webkit.org/show_bug.cgi?id=120054
2598         Remove some dead code following getOwnPropertyDescriptor cleanup
2599
2600         Reviewed by Oliver Hunt.
2601
2602         * bindings/js/JSPluginElementFunctions.cpp:
2603         * bindings/js/JSPluginElementFunctions.h:
2604             - remove runtimeObjectCustomGetOwnPropertyDescriptor, pluginElementCustomGetOwnPropertyDescriptor
2605
2606 2013-08-20  Alex Christensen  <achristensen@apple.com>
2607
2608         Use PlatformArchitecture to distinguish between 32-bit and 64-bit builds on Windows.
2609         https://bugs.webkit.org/show_bug.cgi?id=119512
2610
2611         Reviewed by Brent Fulgham.
2612
2613         * WebCore.vcxproj/WebCore.vcxproj:
2614         * WebCore.vcxproj/WebCore.vcxproj.filters:
2615         * WebCore.vcxproj/WebCoreCommon.props:
2616         * WebCore.vcxproj/WebCoreGeneratedCommon.props:
2617         * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
2618         * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters:
2619         Replaced obj32, bin32, and lib32 with macros for 64-bit build.
2620
2621 2013-08-20  Jessie Berlin  <jberlin@apple.com>
2622
2623         Remove a string no longer used after r154251.
2624
2625         Rubber-stamped by Brady Eidson.
2626
2627         * English.lproj/Localizable.strings:
2628
2629 2013-08-20  Jakob Petsovits  <jpetsovits@blackberry.com>
2630
2631         [BlackBerry] Avoid an assertion from calling releaseBufferDrawable(nullptr)
2632         https://bugs.webkit.org/show_bug.cgi?id=119862
2633         JIRA 470760
2634
2635         Reviewed by Antonio Gomes.
2636
2637         destroyBuffer() finds a null pointer valid but
2638         releaseBufferDrawable() does not. Fix by adding a
2639         null pointer check.
2640
2641         No new tests, caught by existing layout test runs.
2642
2643         * platform/graphics/blackberry/ImageBufferBlackBerry.cpp:
2644         (WebCore::ImageBuffer::~ImageBuffer):
2645
2646 2013-08-19  Gustavo Noronha Silva  <gns@gnome.org>
2647
2648         <https://webkit.org/b/120048> [GTK] Add stubs for APIs that went missing in the DOM bindings
2649
2650         Reviewed by Martin Robinson.
2651
2652         No new tests, these are just stubs for the DOM bindings API.
2653
2654         * bindings/gobject/WebKitDOMCustom.cpp:
2655         (webkit_dom_bar_info_get_property):
2656         (webkit_dom_bar_info_class_init):
2657         (webkit_dom_bar_info_init):
2658         (webkit_dom_bar_info_get_visible):
2659         (webkit_dom_console_get_memory):
2660         (webkit_dom_css_style_declaration_get_property_css_value):
2661         (webkit_dom_document_get_webkit_hidden):
2662         (webkit_dom_document_get_webkit_visibility_state):
2663         (webkit_dom_html_document_open):
2664         (webkit_dom_html_element_set_item_id):
2665         (webkit_dom_html_element_get_item_id):
2666         (webkit_dom_html_element_get_item_ref):
2667         (webkit_dom_html_element_get_item_prop):
2668         (webkit_dom_html_element_set_item_scope):
2669         (webkit_dom_html_element_get_item_scope):
2670         (webkit_dom_html_element_get_item_type):
2671         (webkit_dom_html_properties_collection_get_property):
2672         (webkit_dom_html_properties_collection_class_init):
2673         (webkit_dom_html_properties_collection_init):
2674         (webkit_dom_html_properties_collection_item):
2675         (webkit_dom_html_properties_collection_named_item):
2676         (webkit_dom_html_properties_collection_get_length):
2677         (webkit_dom_html_properties_collection_get_names):
2678         (webkit_dom_node_get_attributes):
2679         (webkit_dom_node_has_attributes):
2680         (webkit_dom_memory_info_get_property):
2681         (webkit_dom_memory_info_class_init):
2682         (webkit_dom_memory_info_init):
2683         (webkit_dom_memory_info_get_total_js_heap_size):
2684         (webkit_dom_memory_info_get_used_js_heap_size):
2685         (webkit_dom_memory_info_get_js_heap_size_limit):
2686         (webkit_dom_micro_data_item_value_class_init):
2687         (webkit_dom_micro_data_item_value_init):
2688         (webkit_dom_performance_get_memory):
2689         (webkit_dom_property_node_list_get_property):
2690         (webkit_dom_property_node_list_class_init):
2691         (webkit_dom_property_node_list_init):
2692         (webkit_dom_property_node_list_item):
2693         (webkit_dom_property_node_list_get_length):
2694         * bindings/gobject/WebKitDOMCustom.h:
2695
2696 2013-08-20  Antti Koivisto  <antti@apple.com>
2697
2698         <https://webkit.org/b/120017> Remove NodeRenderingTraversal::ParentDetails
2699
2700         Reviewed by Andreas Kling.
2701
2702         Remove this oddly factored type that is used to optionally collect some data during ComposedShadowTreeWalker parent traversal.
2703         
2704         Also removed support for reset-style-inheritance attribute in InsertionPoint. We don't use or expose it.
2705
2706         * css/StyleResolver.cpp:
2707         (WebCore::StyleResolver::State::initForStyleResolve):
2708         (WebCore::StyleResolver::styleForElement):
2709         * css/StyleResolver.h:
2710         (WebCore::StyleResolver::State::State):
2711         (WebCore::StyleResolver::State::elementLinkState):
2712         
2713             Remove m_distributedToInsertionPoint State field. We never hit the cases where it was used.
2714
2715         * dom/ComposedShadowTreeWalker.cpp:
2716         (WebCore::ComposedShadowTreeWalker::traverseSiblingOrBackToInsertionPoint):
2717         (WebCore::ComposedShadowTreeWalker::traverseNodeEscapingFallbackContents):
2718         (WebCore::ComposedShadowTreeWalker::traverseParent):
2719         
2720             Return null instead of setting childWasOutOfComposition to details object. That's what would happen anyway in the caller.
2721
2722         (WebCore::ComposedShadowTreeWalker::traverseParentInCurrentTree):
2723         (WebCore::ComposedShadowTreeWalker::traverseParentBackToShadowRootOrHost):
2724         * dom/ComposedShadowTreeWalker.h:
2725         * dom/Node.cpp:
2726         (WebCore::Node::insertionParentForBinding):
2727         * dom/NodeRenderingContext.cpp:
2728         (WebCore::NodeRenderingContext::NodeRenderingContext):
2729         (WebCore::NodeRenderingContext::isOnEncapsulationBoundary):
2730         
2731             Make this look up InsertionPoint directly intead of relying it being populated in m_parentDetails. The function is used only in
2732             a few non-performance critical places.
2733
2734         (WebCore::NodeRenderingContext::resetStyleInheritance):
2735         
2736             Return parent ShadowRoots resetStyleInheritance() flag instead of using m_parentDetails.
2737
2738         * dom/NodeRenderingContext.h:
2739         * dom/NodeRenderingTraversal.cpp:
2740         (WebCore::NodeRenderingTraversal::parentSlow):
2741         * dom/NodeRenderingTraversal.h:
2742         (WebCore::NodeRenderingTraversal::parent):
2743         
2744             Remove ParentDetails.
2745
2746         * html/HTMLAttributeNames.in:
2747         * html/shadow/InsertionPoint.cpp:
2748         
2749             Remove unused resetStyleInheritance attribute.
2750
2751         (WebCore::InsertionPoint::removedFrom):
2752         (WebCore::findInsertionPointOf):
2753         
2754             Renamed for clarity.
2755
2756         * html/shadow/InsertionPoint.h:
2757         * testing/Internals.cpp:
2758         (WebCore::Internals::includerFor):
2759
2760 2013-08-20  Antti Koivisto  <antti@apple.com>
2761
2762         <https://webkit.org/b/120025> REGRESSION (r154254): fast/frames/frameset-frameborder-inheritance.html failing on Apple MountainLion Debug WK1 (Tests)
2763
2764         Reviewed by Anders Carlsson.
2765
2766         * html/HTMLDocument.cpp:
2767         (WebCore::HTMLDocument::isFrameSet):
2768         * html/HTMLFrameElement.cpp:
2769         (WebCore::HTMLFrameElement::didAttachRenderers):
2770         
2771             Make helper public in HTMLFrameSetElement.
2772
2773         * html/HTMLFrameSetElement.cpp:
2774         (WebCore::HTMLFrameSetElement::findContaining):
2775         
2776             Static function for finding containing frameset, if any.
2777
2778         (WebCore::HTMLFrameSetElement::willAttachRenderers):
2779         
2780             This broke in refactoring. We should exit the loop when the first containing frameset is found. Fix by refactoring more.
2781
2782         * html/HTMLFrameSetElement.h:
2783         (WebCore::isHTMLFrameSetElement):
2784         (WebCore::toHTMLFrameSetElement):
2785         
2786             Add casting functions.
2787
2788         * rendering/RenderFrameSet.cpp:
2789         (WebCore::RenderFrameSet::frameSet):
2790
2791 2013-08-20  Antti Koivisto  <antti@apple.com>
2792
2793         <https://webkit.org/b/120023> REGRESSION(r154257): svg/custom/bug78807.svg and svg/custom/use-invalid-style.svg failing
2794
2795         Reviewed by Andreas Kling.
2796
2797         * xml/XMLErrors.cpp:
2798         (WebCore::XMLErrors::insertErrorMessageBlock): "reattach" had accidentally turned into "detach" in refactoring.
2799
2800 2013-08-20  Antti Koivisto  <antti@apple.com>
2801
2802         <https://webkit.org/b/119969> REGRESSION (r154232): Crash on the japantimes.co.jp
2803
2804         Reviewed by Andreas Kling.
2805         
2806         PseudoElement no longer has parent and calling Element::insertedInto for them crashes as it tries to access it.
2807
2808         Normally there are no pseudo elements when Element::insertedInto() is invoked as they get detached and attached
2809         along with rendering. However in this case the page inserts a <style> that uses ::before along with an element
2810         that it applies to. Stylesheet insertion triggers synchronous style recalc that attaches rendering to all newly
2811         insered elements. Later Element::insertedInto gets called for the element that has pseudo element and we crash.
2812
2813         Test: fast/css-generated-content/insert-stylesheet-and-pseudo-crash.html
2814
2815         * dom/Element.cpp:
2816         (WebCore::Element::insertedInto):
2817         (WebCore::Element::removedFrom):
2818         
2819             Remove calls to insertedInto/removedFrom for pseudo elements. They are not considered to be in document.
2820             When they are added normally during render tree attach these calls don't happen either.
2821
2822 2013-08-20  Ryosuke Niwa  <rniwa@webkit.org>
2823
2824         Windows build fix after r154314.
2825
2826         * platform/graphics/cg/PathCG.cpp:
2827         (WebCore::Path::platformAddPathForRoundedRect):
2828
2829 2013-08-19  Hurnjoo Lee  <hurnjoo.lee@samsung.com>
2830
2831         [Cairo] Canvas putImageData is not working as expected
2832         https://bugs.webkit.org/show_bug.cgi?id=119992
2833
2834         Reviewed by Darin Adler.
2835
2836         ImageBufferCairo::putImageArray didn't perform pre-multiply in case of zero alpha value.
2837         If the alpha value is not 255, image data should always be pre-multiplied.
2838
2839         Test: fast/canvas/canvas-putImageData-zero-alpha.html
2840
2841         * platform/graphics/cairo/ImageBufferCairo.cpp:
2842         (WebCore::ImageBuffer::putByteArray):
2843
2844 2013-08-19  Santosh Mahto  <santosh.ma@samsung.com>
2845
2846         <https://webkit.org/b/119991> change usage of calculateUTCOffset()/calculateDSTOffset  to calculateLocalTimeOffset
2847
2848         Reviewed by Darin Adler.
2849
2850         Resolving code error.
2851
2852         * html/BaseDateAndTimeInputType.cpp:
2853         (WebCore::BaseDateAndTimeInputType::defaultValueForStepUp):
2854         * html/MonthInputType.cpp:
2855         (WebCore::MonthInputType::defaultValueForStepUp):
2856         * html/TimeInputType.cpp:
2857         (WebCore::TimeInputType::defaultValueForStepUp):
2858
2859 2013-08-19  Ryosuke Niwa  <rniwa@webkit.org>
2860
2861         <https://webkit.org/b/120049> Delete code for Snow Leopard
2862
2863         Reviewed by Benjamin Poulain.
2864
2865         Delete all the code for Mac OS 10.6. Nobody builds on Snow Leopard at this point.
2866
2867         * WebCore.exp.in:
2868         * WebCore.xcodeproj/project.pbxproj:
2869         * editing/mac/EditorMac.mm:
2870         (WebCore::Editor::pasteWithPasteboard):
2871         * page/ContextMenuController.cpp:
2872         (WebCore::ContextMenuController::populate):
2873         * platform/LocalizedStrings.cpp:
2874         (WebCore::truncatedStringForLookupMenuItem):
2875         (WebCore::contextMenuItemTagSearchWeb):
2876         (WebCore::contextMenuItemTagLookUpInDictionary):
2877         * platform/MemoryPressureHandler.cpp:
2878         * platform/audio/mac/AudioBusMac.mm:
2879         (WebCore::AudioBus::loadPlatformResource):
2880         * platform/graphics/ca/GraphicsLayerCA.cpp:
2881         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
2882         * platform/graphics/ca/PlatformCALayer.h:
2883         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2884         (PlatformCALayer::acceleratesDrawing):
2885         (PlatformCALayer::setAcceleratesDrawing):
2886         (PlatformCALayer::contentsScale):
2887         (PlatformCALayer::setContentsScale):
2888         (PlatformCALayer::synchronouslyDisplayTilesInRect):
2889         * platform/graphics/ca/mac/TileController.mm:
2890         (WebCore::TileController::setScale):
2891         (WebCore::TileController::setAcceleratesDrawing):
2892         (WebCore::TileController::createTileLayer):
2893         * platform/graphics/cg/ImageBufferDataCG.cpp:
2894         (WebCore::ImageBufferData::getData):
2895         (WebCore::ImageBufferData::putData):
2896         * platform/graphics/cg/ImageBufferDataCG.h:
2897         * platform/graphics/cg/PathCG.cpp:
2898         (WebCore::Path::platformAddPathForRoundedRect):
2899         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2900         (WebCore::FontPlatformData::FontPlatformData):
2901         (WebCore::FontPlatformData::setFont):
2902         * platform/graphics/mac/FontMac.mm:
2903         (WebCore::showGlyphsWithAdvances):
2904         * platform/graphics/mac/GraphicsContextMac.mm:
2905         (WebCore::GraphicsContext::drawLineForDocumentMarker):
2906         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2907         (WebCore::MediaPlayerPrivateQTKit::createQTMovie):
2908         (WebCore::MediaPlayerPrivateQTKit::layerHostChanged):
2909         * platform/graphics/mac/WebLayer.mm:
2910         (drawLayerContents):
2911         * platform/mac/CursorMac.mm:
2912         (WebCore::Cursor::ensurePlatformCursor):
2913         * platform/mac/EmptyProtocolDefinitions.h: Removed.
2914         * platform/mac/MemoryPressureHandlerMac.mm:
2915         (WebCore::MemoryPressureHandler::releaseMemory):
2916         * platform/mac/NSScrollerImpDetails.h:
2917         * platform/mac/PlatformEventFactoryMac.mm:
2918         (WebCore::momentumPhaseForEvent):
2919         (WebCore::phaseForEvent):
2920         * platform/mac/ScrollAnimatorMac.mm:
2921         * platform/mac/SharedTimerMac.mm:
2922         * platform/mac/WebCoreSystemInterface.h:
2923         * platform/mac/WebCoreSystemInterface.mm:
2924         * platform/network/mac/ResourceHandleMac.mm:
2925         * platform/network/mac/ResourceRequestMac.mm:
2926         (WebCore::ResourceRequest::doUpdateResourceRequest):
2927         (WebCore::ResourceRequest::doUpdatePlatformRequest):
2928         * platform/text/cf/HyphenationCF.cpp:
2929         * platform/text/mac/HyphenationMac.mm: Removed.
2930         * rendering/RenderLayerBacking.cpp:
2931         (WebCore::RenderLayerBacking::containsPaintedContent):
2932         * rendering/RenderThemeMac.mm:
2933         (WebCore::RenderThemeMac::shouldShowPlaceholderWhenFocused):
2934
2935 2013-08-19  Ryosuke Niwa  <rniwa@webkit.org>
2936
2937         <https://webkit.org/b/120041> Remove superfluous min calls in RenderBlock::computeOverflow
2938
2939         Reviewed by Simon Fraser.
2940
2941         Merge https://chromium.googlesource.com/chromium/blink/+/29cad35d6b4642804e6b7c1a30f0b4435dd7a71d
2942
2943         They are contained in an "if" statement that ensures that textIndent < 0 and so the min will never be 0.
2944
2945         * rendering/RenderBlock.cpp:
2946         (WebCore::RenderBlock::computeOverflow):
2947
2948 2013-08-19  Ryosuke Niwa  <rniwa@webkit.org>
2949
2950         <https://webkit.org/b/119930> input[type=range]: Fix a crash by changing input type in 'input' event handler
2951
2952         Reviewed by Kent Tamura.
2953
2954         Merge https://chromium.googlesource.com/chromium/blink/+/99afc9b55ce176b4f5fe053070e19dbebc1891a5
2955
2956         In SliderThumbElement::setPositionFromPoint, renderer() can be NULL after HTMLInputElement::setValueFromRenderer,
2957         which dispatches 'input' event. Also, make a local vairable 'input' a RefPtr just in case.
2958
2959         Also add null-poinetr checks for the host element as SliderThumbElement only weakly holds onto the host element.
2960
2961         Test: fast/forms/range/range-type-change-oninput.html
2962
2963         * html/shadow/SliderThumbElement.cpp:
2964         (WebCore::SliderThumbElement::isDisabledFormControl):
2965         (WebCore::SliderThumbElement::matchesReadOnlyPseudoClass):
2966         (WebCore::SliderThumbElement::matchesReadWritePseudoClass):
2967         (WebCore::SliderThumbElement::setPositionFromPoint):
2968         (WebCore::SliderThumbElement::hostInput):
2969
2970 2013-08-19  Alexey Proskuryakov  <ap@apple.com>
2971
2972         https://bugs.webkit.org/show_bug.cgi?id=120028
2973         ASSERTION FAILED: m_history->provisionalItem() == m_requestedHistoryItem.get()
2974         when navigating to an uncached subframe
2975
2976         Reviewed by Brady Eidson.
2977
2978         Test: http/tests/navigation/post-frames-goback1-uncached.html
2979
2980         * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadURLIntoChildFrame):
2981         Set m_requestedHistoryItem in a code path that doesn't go through FrameLoader::loadItem.
2982
2983         * loader/HistoryController.cpp: (WebCore::HistoryController::restoreDocumentState):
2984         Now that we always set m_requestedHistoryItem, there is no need to traverse frame
2985         tree to see if this document is being loaded as part of b/f navigation (which was
2986         add in bug 90870).
2987
2988 2013-08-19  Gavin Barraclough  <barraclough@apple.com>
2989
2990         https://bugs.webkit.org/show_bug.cgi?id=120034
2991         Remove custom getOwnPropertyDescriptor for global objects
2992
2993         Reviewed by Geoff Garen.
2994
2995         Fix attributes of JSC SynbolTableObject entries, ensure that cross frame access is safe, and suppress prototype chain walk.
2996
2997         * bindings/js/JSDOMWindowCustom.cpp:
2998         (WebCore::JSDOMWindow::getOwnPropertySlot):
2999             - Remove custom getOwnPropertyDescriptor implementation, on cross-frame access ensure
3000               all properties are marked as read-only, non-configurable to prevent defineProperty.
3001
3002 2013-08-19  Gavin Barraclough  <barraclough@apple.com>
3003
3004         https://bugs.webkit.org/show_bug.cgi?id=119995
3005         Start removing custom implementations of getOwnPropertyDescriptor
3006
3007         Reviewed by Sam Weinig.
3008
3009         This can now typically implemented in terms of getOwnPropertySlot.
3010         Add a macro to PropertyDescriptor to define an implementation of GOPD in terms of GOPS.
3011         Switch over most classes in JSC & the WebCore bindings generator to use this.
3012
3013         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3014         * bindings/js/JSHTMLAppletElementCustom.cpp:
3015         * bindings/js/JSHTMLEmbedElementCustom.cpp:
3016         * bindings/js/JSHTMLObjectElementCustom.cpp:
3017         * bindings/js/JSHistoryCustom.cpp:
3018         (WebCore::JSHistory::getOwnPropertySlotDelegate):
3019         * bindings/js/JSLocationCustom.cpp:
3020         (WebCore::JSLocation::getOwnPropertySlotDelegate):
3021         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
3022             - Remove getOwnPropertyDescriptorDelegate methods,
3023               Change attributes of cross-frame access properties in JSHistory/JSLocation to prevent properties from being redefined.
3024         * bindings/scripts/CodeGeneratorJS.pm:
3025         (GenerateHeader):
3026         (GenerateImplementation):
3027         (GenerateConstructorHelperMethods):
3028             - Implement getOwnPropertySlot in terms of GET_OWN_PROPERTY_DESCRIPTOR_IMPL.
3029         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3030         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
3031         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3032         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3033         * bindings/scripts/test/JS/JSTestException.cpp:
3034         * bindings/scripts/test/JS/JSTestInterface.cpp:
3035         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3036         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3037         * bindings/scripts/test/JS/JSTestNode.cpp:
3038         * bindings/scripts/test/JS/JSTestObj.cpp:
3039         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3040         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3041         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3042             - Update test expectations.
3043
3044 2013-08-19  Benjamin Poulain  <benjamin@webkit.org>
3045
3046         <https://webkit.org/b/119936> Fix some encapsulation issues of RuleSet
3047
3048         Reviewed by Darin Adler.
3049
3050         None of the attributes of RuleSet should be modified directly.
3051
3052         * css/DocumentRuleSets.cpp:
3053         (WebCore::DocumentRuleSets::initUserStyle):
3054         * css/ElementRuleCollector.cpp:
3055         (WebCore::ElementRuleCollector::collectMatchingRulesForRegion):
3056         * css/RuleSet.h:
3057         (WebCore::RuleSet::RuleSetSelectorPair::RuleSetSelectorPair):
3058         (WebCore::RuleSet::regionSelectorsAndRuleSets):
3059         (WebCore::RuleSet::ruleCount):
3060         * css/StyleResolver.cpp:
3061         (WebCore::StyleResolver::checkRegionStyle):
3062
3063 2013-08-19  Benjamin Poulain  <benjamin@webkit.org>
3064
3065         <https://webkit.org/b/119937> Remove ElementRuleCollector's m_behaviorAtBoundary
3066
3067         Reviewed by Darin Adler.
3068
3069         The value DoesNotCrossBoundary is the default behavior boundary of SelectorChecker,
3070         and it is never changed by ElementRuleCollector.
3071
3072         * css/ElementRuleCollector.cpp:
3073         (WebCore::ElementRuleCollector::collectMatchingRules):
3074         (WebCore::ElementRuleCollector::ruleMatches):
3075         * css/ElementRuleCollector.h:
3076         (WebCore::ElementRuleCollector::ElementRuleCollector):
3077
3078 2013-08-19  Benjamin Poulain  <benjamin@webkit.org>
3079
3080         <https://webkit.org/b/119934> Remove a repeated "private:" from ElementRuleCollector
3081
3082         Reviewed by Darin Adler.
3083
3084         * css/ElementRuleCollector.h:
3085
3086 2013-08-19  Pratik Solanki  <psolanki@apple.com>
3087
3088         <https://webkit.org/b/120019> Document::visitedLinkState() should return a reference
3089
3090         Reviewed by Andreas Kling.
3091
3092         Document::m_visitedLinkState is never NULL so we can just return a reference. Also make it a const.
3093
3094         * css/StyleResolver.cpp:
3095         (WebCore::StyleResolver::State::initElement):
3096         * dom/Document.h:
3097         (WebCore::Document::visitedLinkState):
3098         * history/CachedPage.cpp:
3099         (WebCore::CachedPage::restore):
3100         * page/Page.cpp:
3101         (WebCore::Page::allVisitedStateChanged):
3102         (WebCore::Page::visitedStateChanged):
3103
3104 2013-08-19  Ryosuke Niwa  <rniwa@webkit.org>
3105
3106         ASSERTION FAILED: !node || node->isShadowRoot() in WebCore::EventRetargeter::eventTargetRespectingTargetRules
3107         https://bugs.webkit.org/show_bug.cgi?id=119720
3108
3109         Reviewed by Andy Estes.
3110
3111         Merge https://chromium.googlesource.com/chromium/blink/+/4ce9bfbf54410179cd0f18b3d1a912045fc0ec3d
3112
3113         * dom/EventRetargeter.h:
3114         (WebCore::EventRetargeter::eventTargetRespectingTargetRules):
3115
3116 2013-08-19  Darin Adler  <darin@apple.com>
3117
3118         <https://webkit.org/b/120013> Tighten up logic in HTMLTableRowsCollection
3119
3120         Reviewed by Andy Estes.
3121
3122         I was looking for incorrect uses of hasLocalName in places where hasTagName should be used.
3123         The use in HTMLTableRowsCollection looked like that kind of mistake, but when I tried to
3124         make a test case to show the mistake, I found I could not. So I wrote assertions to restate
3125         what I learned, and removed an unneeded null check and tightened up the code a bit. This
3126         should make code size slightly smaller.
3127
3128         * html/HTMLTableRowsCollection.cpp:
3129         (WebCore::assertRowIsInTable): Added. Asserts that the row's position in the table is consistent
3130         with the invariants of how the collection class works. A row that is processed here would have
3131         to be an immediate child of the table, or an immediate child of a table section that in turn is
3132         an immediate child of the table.
3133         (WebCore::isInSection): Added. Replaces the three more-specific helper functions. Unlike those,
3134         this does not do a null check.
3135         (WebCore::HTMLTableRowsCollection::rowAfter): Changed to use the two new functions.
3136
3137 2013-08-19  Pratik Solanki  <psolanki@apple.com>
3138
3139         <https://webkit.org/b/119918> Frame::selection() should return a reference
3140
3141         Reviewed by Darin Adler.
3142
3143         m_selection is never NULL so return a reference from Frame::selection(). Also removed some
3144         unnecessary null checks and assert diff ts exposed as a result.
3145
3146         * accessibility/AccessibilityRenderObject.cpp:
3147         (WebCore::AccessibilityRenderObject::selection):
3148         (WebCore::AccessibilityRenderObject::setSelectedTextRange):
3149         (WebCore::AccessibilityRenderObject::isFocused):
3150         (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
3151         (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
3152         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3153         (-[WebAccessibilityObjectWrapper accessibilityModifySelection:increase:]):
3154         (-[WebAccessibilityObjectWrapper accessibilityMoveSelectionToMarker:]):
3155         (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
3156         (-[WebAccessibilityObjectWrapper _convertToDOMRange:]):
3157         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3158         (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
3159         * css/SelectorChecker.cpp:
3160         (WebCore::SelectorChecker::isFrameFocused):
3161         * dom/CharacterData.cpp:
3162         (WebCore::CharacterData::setDataAndUpdate):
3163         * dom/Document.cpp:
3164         (WebCore::Document::nodeChildrenWillBeRemoved):
3165         (WebCore::Document::nodeWillBeRemoved):
3166         * dom/Element.cpp:
3167         (WebCore::Element::updateFocusAppearance):
3168         * editing/AlternativeTextController.cpp:
3169         (WebCore::AlternativeTextController::stopPendingCorrection):
3170         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
3171         (WebCore::AlternativeTextController::applyAutocorrectionBeforeTypingIfAppropriate):
3172         (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
3173         (WebCore::AlternativeTextController::timerFired):
3174         (WebCore::AlternativeTextController::respondToChangedSelection):
3175         * editing/DeleteButtonController.cpp:
3176         (WebCore::DeleteButtonController::respondToChangedSelection):
3177         (WebCore::DeleteButtonController::enable):
3178         (WebCore::DeleteButtonController::deleteTarget):
3179         * editing/DeleteSelectionCommand.cpp:
3180         (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
3181         * editing/DictationCommand.cpp:
3182         (WebCore::DictationCommand::insertText):
3183         * editing/EditCommand.cpp:
3184         (WebCore::EditCommand::EditCommand):
3185         * editing/EditingStyle.cpp:
3186         (WebCore::EditingStyle::mergeTypingStyle):
3187         * editing/Editor.cpp:
3188         (WebCore::Editor::selectionForCommand):
3189         (WebCore::Editor::canEdit):
3190         (WebCore::Editor::canEditRichly):
3191         (WebCore::Editor::canDHTMLCut):
3192         (WebCore::Editor::canDHTMLCopy):
3193         (WebCore::Editor::canCopy):
3194         (WebCore::Editor::canDelete):
3195         (WebCore::Editor::canSmartCopyOrDelete):
3196         (WebCore::Editor::deleteWithDirection):
3197         (WebCore::Editor::deleteSelectionWithSmartDelete):
3198         (WebCore::Editor::replaceSelectionWithFragment):
3199         (WebCore::Editor::selectedRange):
3200         (WebCore::Editor::tryDHTMLCopy):
3201         (WebCore::Editor::tryDHTMLCut):
3202         (WebCore::Editor::hasBidiSelection):
3203         (WebCore::Editor::selectionUnorderedListState):
3204         (WebCore::Editor::selectionOrderedListState):
3205         (WebCore::Editor::increaseSelectionListLevel):
3206         (WebCore::Editor::increaseSelectionListLevelOrdered):
3207         (WebCore::Editor::increaseSelectionListLevelUnordered):
3208         (WebCore::Editor::decreaseSelectionListLevel):
3209         (WebCore::Editor::findEventTargetFromSelection):
3210         (WebCore::Editor::applyStyle):
3211         (WebCore::Editor::applyParagraphStyle):
3212         (WebCore::Editor::applyStyleToSelection):
3213         (WebCore::Editor::applyParagraphStyleToSelection):
3214         (WebCore::Editor::selectionStartHasStyle):
3215         (WebCore::Editor::selectionHasStyle):
3216         (WebCore::Editor::selectionStartCSSPropertyValue):
3217         (WebCore::Editor::appliedEditing):
3218         (WebCore::Editor::insertTextWithoutSendingTextEvent):
3219         (WebCore::Editor::insertLineBreak):
3220         (WebCore::Editor::insertParagraphSeparator):
3221         (WebCore::Editor::cut):
3222         (WebCore::Editor::copy):
3223         (WebCore::Editor::paste):
3224         (WebCore::Editor::baseWritingDirectionForSelectionStart):
3225         (WebCore::Editor::selectComposition):
3226         (WebCore::Editor::setComposition):
3227         (WebCore::Editor::ignoreSpelling):
3228         (WebCore::Editor::learnSpelling):
3229         (WebCore::Editor::advanceToNextMisspelling):
3230         (WebCore::Editor::misspelledWordAtCaretOrRange):
3231         (WebCore::Editor::isSelectionUngrammatical):
3232         (WebCore::Editor::guessesForMisspelledOrUngrammatical):
3233         (WebCore::Editor::markMisspellingsAfterTypingToWord):
3234         (WebCore::Editor::isSpellCheckingEnabledInFocusedNode):
3235         (WebCore::Editor::markAndReplaceFor):
3236         (WebCore::Editor::updateMarkersForWordsAffectedByEditing):
3237         (WebCore::Editor::revealSelectionAfterEditingOperation):
3238         (WebCore::Editor::getCompositionSelection):
3239         (WebCore::Editor::transpose):
3240         (WebCore::Editor::changeSelectionAfterCommand):
3241         (WebCore::Editor::selectedText):
3242         (WebCore::Editor::computeAndSetTypingStyle):
3243         (WebCore::Editor::findString):
3244         (WebCore::Editor::respondToChangedSelection):
3245         (WebCore::Editor::selectionStartHasMarkerFor):
3246         (WebCore::Editor::toggleOverwriteModeEnabled):
3247         * editing/EditorCommand.cpp:
3248         (WebCore::executeToggleStyleInList):
3249         (WebCore::expandSelectionToGranularity):
3250         (WebCore::stateTextWritingDirection):
3251         (WebCore::executeDelete):
3252         (WebCore::executeDeleteToMark):
3253         (WebCore::executeMoveBackward):
3254         (WebCore::executeMoveBackwardAndModifySelection):
3255         (WebCore::executeMoveDown):
3256         (WebCore::executeMoveDownAndModifySelection):
3257         (WebCore::executeMoveForward):
3258         (WebCore::executeMoveForwardAndModifySelection):
3259         (WebCore::executeMoveLeft):
3260         (WebCore::executeMoveLeftAndModifySelection):
3261         (WebCore::executeMovePageDown):
3262         (WebCore::executeMovePageDownAndModifySelection):
3263         (WebCore::executeMovePageUp):
3264         (WebCore::executeMovePageUpAndModifySelection):
3265         (WebCore::executeMoveRight):
3266         (WebCore::executeMoveRightAndModifySelection):
3267         (WebCore::executeMoveToBeginningOfDocument):
3268         (WebCore::executeMoveToBeginningOfDocumentAndModifySelection):
3269         (WebCore::executeMoveToBeginningOfLine):
3270         (WebCore::executeMoveToBeginningOfLineAndModifySelection):
3271         (WebCore::executeMoveToBeginningOfParagraph):
3272         (WebCore::executeMoveToBeginningOfParagraphAndModifySelection):
3273         (WebCore::executeMoveToBeginningOfSentence):
3274         (WebCore::executeMoveToBeginningOfSentenceAndModifySelection):
3275         (WebCore::executeMoveToEndOfDocument):
3276         (WebCore::executeMoveToEndOfDocumentAndModifySelection):
3277         (WebCore::executeMoveToEndOfSentence):
3278         (WebCore::executeMoveToEndOfSentenceAndModifySelection):
3279         (WebCore::executeMoveToEndOfLine):
3280         (WebCore::executeMoveToEndOfLineAndModifySelection):
3281         (WebCore::executeMoveToEndOfParagraph):
3282         (WebCore::executeMoveToEndOfParagraphAndModifySelection):
3283         (WebCore::executeMoveParagraphBackwardAndModifySelection):
3284         (WebCore::executeMoveParagraphForwardAndModifySelection):
3285         (WebCore::executeMoveUp):
3286         (WebCore::executeMoveUpAndModifySelection):
3287         (WebCore::executeMoveWordBackward):
3288         (WebCore::executeMoveWordBackwardAndModifySelection):
3289         (WebCore::executeMoveWordForward):
3290         (WebCore::executeMoveWordForwardAndModifySelection):
3291         (WebCore::executeMoveWordLeft):
3292         (WebCore::executeMoveWordLeftAndModifySelection):
3293         (WebCore::executeMoveWordRight):
3294         (WebCore::executeMoveWordRightAndModifySelection):
3295         (WebCore::executeMoveToLeftEndOfLine):
3296         (WebCore::executeMoveToLeftEndOfLineAndModifySelection):
3297         (WebCore::executeMoveToRightEndOfLine):
3298         (WebCore::executeMoveToRightEndOfLineAndModifySelection):
3299         (WebCore::executeSelectAll):
3300         (WebCore::executeSelectToMark):
3301         (WebCore::executeSetMark):
3302         (WebCore::executeSwapWithMark):
3303         (WebCore::executeUnselect):
3304         (WebCore::enabledInRichlyEditableText):
3305         (WebCore::enabledRangeInEditableText):
3306         (WebCore::enabledRangeInRichlyEditableText):
3307         (WebCore::valueFormatBlock):
3308         * editing/FrameSelection.cpp:
3309         (WebCore::FrameSelection::setSelection):
3310         (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected):
3311         * editing/InsertLineBreakCommand.cpp:
3312         (WebCore::InsertLineBreakCommand::doApply):
3313         * editing/InsertTextCommand.cpp:
3314         (WebCore::InsertTextCommand::doApply):
3315         * editing/ModifySelectionListLevel.cpp:
3316         (WebCore::IncreaseSelectionListLevelCommand::canIncreaseSelectionListLevel):
3317         (WebCore::DecreaseSelectionListLevelCommand::canDecreaseSelectionListLevel):
3318         * editing/RemoveFormatCommand.cpp:
3319         (WebCore::RemoveFormatCommand::doApply):
3320         * editing/ReplaceSelectionCommand.cpp:
3321         (WebCore::ReplaceSelectionCommand::doApply):
3322         * editing/SetSelectionCommand.cpp:
3323         (WebCore::SetSelectionCommand::doApply):
3324         (WebCore::SetSelectionCommand::doUnapply):
3325         * editing/SpellingCorrectionCommand.cpp:
3326         (WebCore::SpellingCorrectionCommand::doApply):
3327         * editing/TextInsertionBaseCommand.cpp:
3328         (WebCore::TextInsertionBaseCommand::applyTextInsertionCommand):
3329         * editing/TypingCommand.cpp:
3330         (WebCore::TypingCommand::deleteSelection):
3331         (WebCore::TypingCommand::updateSelectionIfDifferentFromCurrentSelection):
3332         (WebCore::TypingCommand::insertText):
3333         (WebCore::TypingCommand::deleteKeyPressed):
3334         (WebCore::TypingCommand::forwardDeleteKeyPressed):
3335         * editing/ios/EditorIOS.mm:
3336         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
3337         (WebCore::styleForSelectionStart):
3338         (WebCore::Editor::fontForSelection):
3339         * editing/mac/EditorMac.mm:
3340         (WebCore::styleForSelectionStart):
3341         (WebCore::Editor::fontForSelection):
3342         (WebCore::Editor::canCopyExcludingStandaloneImages):
3343         (WebCore::Editor::readSelectionFromPasteboard):
3344         * html/HTMLAnchorElement.cpp:
3345         (WebCore::HTMLAnchorElement::defaultEventHandler):
3346         (WebCore::HTMLAnchorElement::setActive):
3347         * html/HTMLInputElement.cpp:
3348         (WebCore::HTMLInputElement::updateFocusAppearance):
3349         * html/HTMLTextAreaElement.cpp:
3350         (WebCore::HTMLTextAreaElement::updateFocusAppearance):
3351         (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
3352         * html/HTMLTextFormControlElement.cpp:
3353         (WebCore::HTMLTextFormControlElement::setSelectionRange):
3354         (WebCore::HTMLTextFormControlElement::computeSelectionStart):
3355         (WebCore::HTMLTextFormControlElement::computeSelectionEnd):
3356         (WebCore::HTMLTextFormControlElement::computeSelectionDirection):
3357         (WebCore::HTMLTextFormControlElement::selectionChanged):
3358         * html/TextFieldInputType.cpp:
3359         (WebCore::TextFieldInputType::handleBeforeTextInsertedEvent):
3360         * loader/FrameLoader.cpp:
3361         (WebCore::FrameLoader::clear):
3362         * loader/archive/cf/LegacyWebArchive.cpp:
3363         (WebCore::LegacyWebArchive::createFromSelection):
3364         * page/ContextMenuController.cpp:
3365         (WebCore::insertUnicodeCharacter):
3366         (WebCore::ContextMenuController::contextMenuItemSelected):
3367         (WebCore::selectionContainsPossibleWord):
3368         (WebCore::ContextMenuController::populate):
3369         (WebCore::ContextMenuController::checkOrEnableIfNeeded):
3370         * page/DOMSelection.cpp:
3371         (WebCore::selectionShadowAncestor):
3372         (WebCore::DOMSelection::visibleSelection):
3373         (WebCore::DOMSelection::isCollapsed):
3374         (WebCore::DOMSelection::type):
3375         (WebCore::DOMSelection::rangeCount):
3376         (WebCore::DOMSelection::collapse):
3377         (WebCore::DOMSelection::collapseToEnd):
3378         (WebCore::DOMSelection::collapseToStart):
3379         (WebCore::DOMSelection::empty):
3380         (WebCore::DOMSelection::setBaseAndExtent):
3381         (WebCore::DOMSelection::setPosition):
3382         (WebCore::DOMSelection::modify):
3383         (WebCore::DOMSelection::extend):
3384         (WebCore::DOMSelection::getRangeAt):
3385         (WebCore::DOMSelection::removeAllRanges):
3386         (WebCore::DOMSelection::addRange):
3387         (WebCore::DOMSelection::deleteFromDocument):
3388         (WebCore::DOMSelection::containsNode):
3389         (WebCore::DOMSelection::toString):
3390         * page/DragController.cpp:
3391         (WebCore::DragController::dragIsMove):
3392         (WebCore::setSelectionToDragCaret):
3393         (WebCore::DragController::concludeEditDrag):
3394         (WebCore::DragController::draggableElement):
3395         (WebCore::selectElement):
3396         (WebCore::dragLocForSelectionDrag):
3397         (WebCore::DragController::startDrag):
3398         * page/DragController.h:
3399         * page/EventHandler.cpp:
3400         (WebCore::setSelectionIfNeeded):
3401         (WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart):
3402         (WebCore::EventHandler::handleMousePressEventDoubleClick):
3403         (WebCore::EventHandler::handleMousePressEventSingleClick):
3404         (WebCore::EventHandler::updateSelectionForMouseDrag):
3405         (WebCore::EventHandler::lostMouseCapture):
3406         (WebCore::EventHandler::handleMouseReleaseEvent):
3407         (WebCore::nodeIsNotBeingEdited):
3408         (WebCore::EventHandler::selectCursor):
3409         (WebCore::EventHandler::handleMousePressEvent):
3410         (WebCore::EventHandler::handleMouseDoubleClickEvent):
3411         (WebCore::EventHandler::dispatchMouseEvent):
3412         (WebCore::EventHandler::sendContextMenuEvent):
3413         (WebCore::EventHandler::sendContextMenuEventForKey):
3414         (WebCore::handleKeyboardSelectionMovement):
3415         (WebCore::EventHandler::handleDrag):
3416         * page/FocusController.cpp:
3417         (WebCore::FocusController::setFocusedFrame):
3418         (WebCore::FocusController::setFocused):
3419         (WebCore::FocusController::advanceFocusInDocumentOrder):
3420         (WebCore::clearSelectionIfNeeded):
3421         (WebCore::FocusController::setActive):
3422         * page/Frame.cpp:
3423         (WebCore::Frame::dragImageForSelection):
3424         * page/Frame.h:
3425         (WebCore::Frame::selection):
3426         * page/FrameView.cpp:
3427         (WebCore::FrameView::performPostLayoutTasks):
3428         (WebCore::FrameView::paintContentsForSnapshot):
3429         * page/Page.cpp:
3430         (WebCore::Page::findString):
3431         (WebCore::Page::findStringMatchingRanges):
3432         (WebCore::Page::selection):
3433         * page/mac/FrameMac.mm:
3434         (WebCore::Frame::dragImageForSelection):
3435         * page/mac/FrameSnapshottingMac.mm:
3436         (WebCore::selectionImage):
3437         * page/win/FrameWin.cpp:
3438         (WebCore::imageFromSelection):
3439         (WebCore::Frame::dragImageForSelection):
3440         * platform/ios/PasteboardIOS.mm:
3441         (WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
3442         * rendering/HitTestResult.cpp:
3443         (WebCore::HitTestResult::isSelected):
3444         * rendering/RenderBlock.cpp:
3445         (WebCore::RenderBlock::paintCaret):
3446         * rendering/RenderImage.cpp:
3447         (WebCore::RenderImage::paintAreaElementFocusRing):
3448         * rendering/RenderLayer.cpp:
3449         (WebCore::RenderLayer::scrollTo):
3450         * rendering/RenderListBox.cpp:
3451         (WebCore::RenderListBox::paintItemForeground):
3452         (WebCore::RenderListBox::paintItemBackground):
3453         * rendering/RenderObject.cpp:
3454         (WebCore::RenderObject::selectionBackgroundColor):
3455         (WebCore::RenderObject::selectionColor):
3456         * rendering/RenderTextControlSingleLine.cpp:
3457         (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged):
3458         * rendering/RenderTheme.cpp:
3459         (WebCore::RenderTheme::isFocused):
3460         * rendering/RenderThemeWin.cpp:
3461         (WebCore::RenderThemeWin::adjustSearchFieldStyle):
3462         * rendering/RenderTreeAsText.cpp:
3463         (WebCore::writeSelection):
3464         * rendering/RenderView.cpp:
3465         (WebCore::RenderView::setSelection):
3466         * svg/SVGSVGElement.cpp:
3467         (WebCore::SVGSVGElement::deselectAll):
3468         * svg/SVGTextContentElement.cpp:
3469         (WebCore::SVGTextContentElement::selectSubString):
3470         * testing/Internals.cpp:
3471         (WebCore::Internals::absoluteCaretBounds):
3472         (WebCore::Internals::selectionBounds):
3473
3474 2013-08-19  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
3475
3476         <https://webkit.org/b/119679> Remove the cast-align warnings for ARM
3477
3478         Reviewed by Darin Adler.
3479
3480         While compiling WebKitGTK+ for ARM a lot of warnings of this form
3481         where shown (gcc 4.7.3):
3482
3483         ../../Source/WebCore/css/StylePropertySet.h: In member function 'const WebCore::StylePropertyMetadata* WebCore::ImmutableStylePropertySet::metadataArray() const':
3484 ../../Source/WebCore/css/StylePropertySet.h:179:142: warning: cast from 'const char*' to 'const WebCore::StylePropertyMetadata*' increases required alignment of target type [-Wcast-align]
3485
3486         This patch changes reinterpret_cast<>() for reinterpret_cast_ptr<>()
3487         which is part of WTF for this purpose, silencing the compiler.
3488
3489         * css/StylePropertySet.h:
3490         (WebCore::ImmutableStylePropertySet::metadataArray):
3491
3492 2013-08-19  Antti Koivisto  <antti@apple.com>
3493
3494         <https://webkit.org/b/120014> REGRESSION(r154268): Some stylesheet media attribute tests failing
3495
3496         Reviewed by Dan Bernstein.
3497
3498         * html/HTMLStyleElement.cpp:
3499         (WebCore::HTMLStyleElement::parseAttribute): Always set the media on InlineStyleSheetOwner.
3500
3501 2013-08-19  Chris Fleizach  <cfleizach@apple.com>
3502
3503         <https://webkit.org/b/119916> AX: WebKit is not exposing AXLanguage correctly
3504
3505         Reviewed by Darin Adler.
3506
3507         Expose the AXLanguage attribute for all objects.
3508
3509         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3510         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
3511
3512 2013-08-19  Brent Fulgham  <bfulgham@apple.com>
3513
3514         [Windows] Unreviewed gardening.
3515
3516         * WebCore.vcxproj/WebCore.vcxproj: Add missing header for easy access/editing.
3517         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
3518
3519 2013-08-19  Mario Sanchez Prada  <mario.prada@samsung.com>
3520
3521         <https://webkit.org/b/119882> Speed up moving cursor/selection up or down past non-rendered elements.
3522
3523         Reviewed by Darin Adler.
3524
3525         This is a port from Blink originally written by Dominic Mazzoni:
3526         https://src.chromium.org/viewvc/blink?revision=154977&view=revision
3527
3528         From the original commit:
3529
3530         Skips calling firstPositionInOrBeforeNode when a node doesn't have a
3531         renderer, since there couldn't possibly be a visible position there.
3532         This was particularly wasteful when trying to move the cursor up when at
3533         the beginning of a document, as it did a O(n^2) scan through the document head.
3534
3535         Test: editing/execCommand/move-up-down-should-skip-hidden-elements.html
3536
3537         * editing/VisibleUnits.cpp:
3538         (WebCore::previousRootInlineBoxCandidatePosition): Updated.
3539         (WebCore::nextRootInlineBoxCandidatePosition): Updates.
3540
3541 2013-08-19  Andreas Kling  <akling@apple.com>
3542
3543         <https://webkit.org/b/120000> Chrome::client() should return a reference.
3544
3545         Reviewed by Antti Koivisto.
3546
3547         Chrome::m_client should never be null.
3548
3549 2013-08-19  Antti Koivisto  <antti@apple.com>
3550
3551         <https://webkit.org/b/120004> Rename StyleElement to InlineStyleSheetOwner and stop inheriting from it
3552
3553         Reviewed by Andreas Kling.
3554         
3555         Saner names and class relations.
3556
3557         * CMakeLists.txt:
3558         * GNUmakefile.list.am:
3559         * Target.pri:
3560         * WebCore.vcxproj/WebCore.vcxproj:
3561         * WebCore.xcodeproj/project.pbxproj:
3562         * dom/DOMAllInOne.cpp:
3563         * dom/InlineStyleSheetOwner.cpp: Copied from Source/WebCore/dom/StyleElement.cpp.
3564         (WebCore::InlineStyleSheetOwner::InlineStyleSheetOwner):
3565         (WebCore::InlineStyleSheetOwner::~InlineStyleSheetOwner):
3566         (WebCore::InlineStyleSheetOwner::insertedIntoDocument):
3567         (WebCore::InlineStyleSheetOwner::removedFromDocument):
3568         (WebCore::InlineStyleSheetOwner::clearDocumentData):
3569         (WebCore::InlineStyleSheetOwner::childrenChanged):
3570         (WebCore::InlineStyleSheetOwner::finishParsingChildren):
3571         (WebCore::InlineStyleSheetOwner::createSheetFromTextContents):
3572         (WebCore::InlineStyleSheetOwner::clearSheet):
3573         (WebCore::InlineStyleSheetOwner::createSheet):
3574         (WebCore::InlineStyleSheetOwner::isLoading):
3575         (WebCore::InlineStyleSheetOwner::sheetLoaded):
3576         (WebCore::InlineStyleSheetOwner::startLoadingDynamicSheet):
3577         * dom/InlineStyleSheetOwner.h: Copied from Source/WebCore/dom/StyleElement.h.
3578         * dom/StyleElement.cpp: Removed.
3579         * dom/StyleElement.h: Removed.
3580         * html/HTMLStyleElement.cpp:
3581         (WebCore::HTMLStyleElement::HTMLStyleElement):
3582         (WebCore::HTMLStyleElement::~HTMLStyleElement):
3583         (WebCore::HTMLStyleElement::parseAttribute):
3584         (WebCore::HTMLStyleElement::finishParsingChildren):
3585         (WebCore::HTMLStyleElement::insertedInto):
3586         (WebCore::HTMLStyleElement::removedFrom):
3587         (WebCore::HTMLStyleElement::childrenChanged):
3588         * html/HTMLStyleElement.h:
3589         * svg/SVGStyleElement.cpp:
3590         (WebCore::SVGStyleElement::SVGStyleElement):
3591         (WebCore::SVGStyleElement::~SVGStyleElement):
3592         (WebCore::SVGStyleElement::parseAttribute):
3593         (WebCore::SVGStyleElement::finishParsingChildren):
3594         (WebCore::SVGStyleElement::insertedInto):
3595         (WebCore::SVGStyleElement::removedFrom):
3596         (WebCore::SVGStyleElement::childrenChanged):
3597         * svg/SVGStyleElement.h:
3598
3599 2013-08-19  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3600
3601         [Qt] QtWebKit (using the Arora browser) displays the border radii (radius) of a button very ugly
3602         https://bugs.webkit.org/show_bug.cgi?id=28113
3603
3604         Reviewed by Jocelyn Turcotte.
3605
3606         StylePainter::init() was called twice making it clobber the previous antialiasing setting.
3607
3608         This patch cleans up the construction so we only have one constructor with init inlined.
3609
3610         * platform/qt/RenderThemeQStyle.cpp:
3611         (WebCore::StylePainterQStyle::StylePainterQStyle):
3612         (WebCore::StylePainterQStyle::setupStyleOption):
3613         * platform/qt/RenderThemeQStyle.h:
3614         * platform/qt/RenderThemeQt.cpp:
3615         (WebCore::StylePainter::StylePainter):
3616         * platform/qt/RenderThemeQt.h:
3617         * platform/qt/RenderThemeQtMobile.cpp:
3618         (WebCore::StylePainterMobile::StylePainterMobile):
3619
3620 2013-08-19  Julien Brianceau  <jbrianceau@nds.com>
3621
3622         <https://webkit.org/b/119998> [Qt] Build fix (broken since r154257).
3623
3624         Reviewed by Andreas Kling.
3625
3626         Element::attach() doesn't exist anymore since r154257.
3627
3628         * xml/parser/XMLDocumentParserQt.cpp:
3629         (WebCore::XMLDocumentParser::parseStartElement):
3630
3631 2013-08-19  Antti Koivisto  <antti@apple.com>
3632
3633         <https://webkit.org/b/120001> Clean up StyleElement
3634
3635         Reviewed by Andreas Kling.
3636
3637         - Make it non-virtual so we don't use virtual multiple inheritance
3638         - Improve names
3639         - Improve code clarity
3640
3641         * dom/StyleElement.cpp:
3642         (WebCore::StyleElement::StyleElement):
3643         (WebCore::StyleElement::insertedIntoDocument):
3644         (WebCore::StyleElement::clearDocumentData):
3645         (WebCore::StyleElement::childrenChanged):
3646         (WebCore::StyleElement::finishParsingChildren):
3647         (WebCore::StyleElement::createSheetFromTextContents):
3648         (WebCore::isValidCSSContentType):
3649         (WebCore::StyleElement::createSheet):
3650         (WebCore::StyleElement::isLoading):
3651         * dom/StyleElement.h:
3652         (WebCore::StyleElement::setStyleSheetContentType):
3653         (WebCore::StyleElement::setStyleSheetMedia):
3654         * html/HTMLStyleElement.cpp:
3655         (WebCore::HTMLStyleElement::parseAttribute):
3656         * html/HTMLStyleElement.h:
3657         * svg/SVGStyleElement.cpp:
3658         (WebCore::SVGStyleElement::isSupportedAttribute):
3659         (WebCore::SVGStyleElement::parseAttribute):
3660         * svg/SVGStyleElement.h:
3661
3662 2013-08-19  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3663
3664         <https://webkit.org/b/119990> Add toSVGStopElement(Node* node) to clean-up a static_cast<SVGStopElement*>
3665
3666         Reviewed by Darin Adler.
3667
3668         Clean up remained static_cast<SVGStopElement*> using toSVGStopElement(toSVGElement()).
3669
3670         * rendering/svg/SVGRenderTreeAsText.cpp:
3671         (WebCore::writeSVGGradientStop):
3672
3673 2013-08-19  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3674
3675         <https://webkit.org/b/119996> Introduce toSVGAnimateElement(), and use it
3676
3677         Reviewed by Andreas Kling.
3678
3679         As a step to clean-up static_cast<SVGXXX>, static_cast<SVGAnimateElement*> also can be changed
3680         with toSVGAnimateElement().
3681
3682         * svg/SVGAnimateElement.cpp:
3683         (WebCore::SVGAnimateElement::calculateAnimatedValue):
3684         * svg/SVGAnimateElement.h:
3685         (WebCore::toSVGAnimateElement):
3686         * svg/SVGAnimationElement.cpp:
3687         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
3688
3689 2013-08-19  Andreas Kling  <akling@apple.com>
3690
3691         <https://webkit.org/b/119997> Page::progress() should return a reference.
3692
3693         Reviewed by Antti Koivisto.
3694
3695         Page::m_progress is never null.
3696
3697 2013-08-18  Darin Adler  <darin@apple.com>
3698
3699         <https://webkit.org/b/119989> Make use of Node::ownerDocument a compile time error
3700
3701         Reviewed by Sam Weinig.
3702
3703         * dom/Element.h: Deleted the ownerDocument function. For compilers that don't support
3704         deleted functions, it is instead overrides the base class function with one that is
3705         private and not defined, which accomplishes almost the same thing: An error, either
3706         at compile time or link time.
3707
3708         * bindings/js/JSHTMLElementCustom.cpp:
3709         (WebCore::JSHTMLElement::pushEventHandlerScope): Use document instead of ownerDocument.
3710         * dom/Document.cpp:
3711         (WebCore::Document::~Document): Added a comment about this clearly-incorrect code.
3712         * inspector/InspectorInstrumentation.h:
3713         (WebCore::InspectorInstrumentation::didPushShadowRoot): Use document instead of ownerDocument.
3714         (WebCore::InspectorInstrumentation::willPopShadowRoot): Ditto.
3715         * inspector/InspectorStyleSheet.cpp:
3716         (WebCore::InspectorStyleSheetForInlineStyle::setStyleText): Ditto.
3717         * plugins/PluginView.cpp:
3718         (WebCore::getFrame): Removed ineffective call to ownerDocument after document when it
3719         returns 0. It will never return anything other than 0 in that case.
3720         * rendering/RenderVideo.cpp:
3721         (WebCore::RenderVideo::calculateIntrinsicSize): Use document instead of ownerDocument.
3722         Did not remove the null check at this time, although I'm pretty sure it's bogus. We can
3723         fix that when/if we change the return type of Element::document to a reference.
3724         * svg/SVGFEImageElement.cpp:
3725         (WebCore::SVGFEImageElement::requestImageResource): Use document instead of ownerDocument.
3726
3727 2013-08-18  Darin Adler  <darin@apple.com>
3728
3729         <https://webkit.org/b/119993> Remove most remaining platform-specific code from Clipboard class
3730
3731         Reviewed by Sam Weinig.
3732
3733         * GNUmakefile.list.am: Removed ClipboardGtk.cpp.
3734         * PlatformEfl.cmake: Removed ClipboardEfl.cpp.
3735         * PlatformGTK.cmake: Removed ClipboardGtk.cpp.
3736         * PlatformWinCE.cmake: Removed ClipboardWin.cpp.
3737         * Target.pri: Removed ClipboardQt.cpp.
3738         * WebCore.vcxproj/WebCore.vcxproj: Removed ClipboardWin.cpp and ClipboardWin.h.
3739         * WebCore.vcxproj/WebCore.vcxproj.filters: Removed ClipboardWin.cpp and ClipboardWin.h.
3740
3741         * dom/Clipboard.cpp:
3742         (WebCore::Clipboard::createDragImage): Added. Version that works for all platforms
3743         other than Mac, identical to the old one used in GTK and Qt, and close to the one used
3744         on Windows.
3745
3746         * platform/mac/ClipboardMac.mm: Trimmed includes down, and added a FIXME about next steps.
3747
3748         * platform/qt/DataTransferItemListQt.h: Removed "friend class ClipboardQt", which refers
3749         to a now-nonexistent class.
3750
3751         * platform/efl/ClipboardEfl.cpp: Removed.
3752         * platform/gtk/ClipboardGtk.cpp: Removed.
3753         * platform/qt/ClipboardQt.cpp: Removed.
3754         * platform/win/ClipboardWin.cpp: Removed.
3755
3756 2013-08-17  Darin Adler  <darin@apple.com>
3757
3758         <https://webkit.org/b/119949> Factor Clipboard into drag and non-drag parts
3759
3760         Reviewed by Sam Weinig.
3761
3762         * dom/Clipboard.cpp:
3763         (WebCore::Clipboard::Clipboard): Move the ClipboardType argument to go after the pasteboard.
3764         Initialize strings more efficiently. Put drag-specific data members inside an if statement.
3765         Replace m_clipboardType with m_forDrag.
3766         (WebCore::Clipboard::createForCopyAndPaste): Moved function up to be close to constructor.
3767         Removed explicit clipboard type since constructor now defaults to copy and paste style.
3768         (WebCore::Clipboard::setAccessPolicy): Tweaked comment.
3769         (WebCore::Clipboard::getData): Put drag-specific code inside #if ENABLE(DRAG_SUPPORT).
3770         (WebCore::Clipboard::setData): Ditto.
3771         (WebCore::Clipboard::files): Ditto.
3772         (WebCore::Clipboard::dropEffect): Added trivial non-drag versions of these functions to
3773         be used when !ENABLE(DRAG_SUPPORT).
3774         (WebCore::Clipboard::setDropEffect): Ditto.
3775         (WebCore::Clipboard::effectAllowed): Ditto.
3776         (WebCore::Clipboard::setEffectAllowed): Ditto.
3777         (WebCore::Clipboard::createForDragAndDrop): Renamed Clipboard::create that takes DragData
3778         to this, and kep the overload that does not as well. Made the DragData argument a const&.
3779         (WebCore::Clipboard::canSetDragImage): Moved down here since it is drag-specific.
3780         (WebCore::Clipboard::updateDragImage): Use m_shouldUpdateDragImage directly insted of
3781         calling a dragStarted function.
3782         (WebCore::dragOpFromIEOp): Moved this function down here to the drag-specific section.
3783         (WebCore::IEOpFromDragOp): Ditto.
3784         (WebCore::Clipboard::sourceOperation): Ditto.
3785         (WebCore::Clipboard::destinationOperation): Ditto.
3786         (WebCore::Clipboard::setSourceOperation): Ditto.
3787         (WebCore::Clipboard::setDestinationOperation): Ditto.
3788
3789         * dom/Clipboard.h: Removed unneeded include of "Node.h" and added and removed forward
3790         class declarations as required. Removed non-helpful comment. Made ClipboardType a private
3791         implementation detail. Moved functions that are not part of the DOM API down to a separate
3792         section lower down in the class, and sorted the functions to match the order they appear
3793         in the IDL file. Removed isForCopyAndPaste and isForDragAndDrop. Changed dropEffect and
3794         effectAllowed to not be inlined. Moved the long comment before canSetDragImage into the
3795         implementation since it's an implementation detail. Since this class is no longer polymorphic,
3796         use only private, not protected. Make m_dragImageElement an Element, not a Node.
3797
3798         * dom/Clipboard.idl: Removed flags to tell bindings how to deal with null strings, since
3799         these string properties can never return null strings anyway.
3800
3801         * page/DragController.cpp:
3802         (WebCore::DragController::dragExited): Updated to call the new createForDragAndDrop function.
3803         (WebCore::DragController::performDrag): Ditto.
3804         (WebCore::DragController::tryDHTMLDrag): Ditto.
3805
3806         * platform/mac/ClipboardMac.mm: Added now-needed include of Element.h since Clipboard.h no
3807         longer includes it.
3808
3809 2013-08-18  David Kilzer  <ddkilzer@apple.com>
3810
3811         WebCore fails to build with trunk clang: error: 'register' storage class specifier is deprecated [-Werror,-Wdeprecated-register]
3812         <http://webkit.org/b/119932>
3813         <rdar://problem/14764085>
3814
3815         Reviewed by Darin Adler.
3816
3817         Add pragma statements to ignore -Wdeprecated-register warnings
3818         in generated code.  Also ignore -Wunknown-pragmas so this
3819         doesn't cause a build failure in older versions of clang.
3820
3821         * css/makeprop.pl:
3822         (WebCore::findProperty): Remove register hints from parameters.
3823         * css/makevalues.pl:
3824         (WebCore::findValue): Ditto.
3825         * platform/ColorData.gperf:
3826         (WebCore::findColor): Ditto.
3827
3828 2013-08-18  Antti Koivisto  <antti@apple.com>
3829
3830         <https://webkit.org/b/119987> Make Element::attach standalone function
3831
3832         Reviewed by Andreas Kling.
3833
3834         This patch turns Element::attach() and the related functions into standalone functions.
3835
3836         * dom/ContainerNode.cpp:
3837         (WebCore::attachChild):
3838         (WebCore::detachChild):
3839         * dom/ContainerNode.h:
3840         * dom/Document.cpp:
3841         (WebCore::Document::attach):
3842         (WebCore::Document::detach):
3843         * dom/Element.cpp:
3844         (WebCore::Element::~Element):
3845         (WebCore::Element::lazyReattach):
3846         (WebCore::Element::removeShadowRoot):
3847         
3848             Shadow root should be detached by now. Remove the detach call.
3849
3850         (WebCore::Element::updateFocusAppearanceAfterAttachIfNeeded):
3851         (WebCore::Element::updatePseudoElement):
3852         (WebCore::Element::clearStyleDerivedDataBeforeDetachingRenderer):
3853         (WebCore::Element::clearHoverAndActiveStatusBeforeDetachingRenderer):
3854         
3855             Factor some parts of former Element::attach/detach() into member functions.
3856
3857         * dom/Element.h:
3858         * dom/ElementRareData.h:
3859         (WebCore::ElementRareData::releasePseudoElement):
3860         * dom/NodeRenderingContext.cpp:
3861         (WebCore::NodeRenderingContext::NodeRenderingContext):
3862         * dom/NodeRenderingContext.h:
3863         * dom/ShadowRoot.cpp:
3864         * dom/ShadowRoot.h:
3865         * html/HTMLDetailsElement.cpp:
3866         (WebCore::HTMLDetailsElement::parseAttribute):
3867         * html/HTMLInputElement.cpp:
3868         (WebCore::HTMLInputElement::updateType):
3869         (WebCore::HTMLInputElement::parseAttribute):
3870         * html/HTMLObjectElement.cpp:
3871         (WebCore::HTMLObjectElement::renderFallbackContent):
3872         * html/HTMLPlugInImageElement.cpp:
3873         (WebCore::HTMLPlugInImageElement::willRecalcStyle):
3874         (WebCore::HTMLPlugInImageElement::restartSnapshottedPlugIn):
3875         * html/HTMLSelectElement.cpp:
3876         (WebCore::HTMLSelectElement::parseAttribute):
3877         (WebCore::HTMLSelectElement::parseMultipleAttribute):
3878         * html/HTMLViewSourceDocument.cpp:
3879         (WebCore::HTMLViewSourceDocument::createContainingTable):
3880         (WebCore::HTMLViewSourceDocument::addSpanWithClassName):
3881         (WebCore::HTMLViewSourceDocument::addLine):
3882         (WebCore::HTMLViewSourceDocument::finishLine):
3883         (WebCore::HTMLViewSourceDocument::addBase):
3884         (WebCore::HTMLViewSourceDocument::addLink):
3885         * html/parser/HTMLConstructionSite.cpp:
3886         (WebCore::executeTask):
3887         * html/parser/HTMLTreeBuilder.cpp:
3888         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
3889         * html/shadow/InsertionPoint.cpp:
3890         (WebCore::InsertionPoint::willAttachRenderers):
3891         (WebCore::InsertionPoint::willDetachRenderers):
3892         * loader/PlaceholderDocument.cpp:
3893         (WebCore::PlaceholderDocument::attach):
3894         * style/StyleResolveTree.cpp:
3895         (WebCore::Style::createRendererIfNeeded):
3896         
3897             From Element::createRendererIfNeeded()
3898
3899         (WebCore::Style::attachShadowRoot):
3900         
3901             From ShadowRoot::attach()
3902
3903         (WebCore::Style::childAttachedAllowedWhenAttachingChildren):
3904         (WebCore::Style::attachChildren):
3905         
3906             From Element::attachChildren()
3907
3908         (WebCore::Style::attachRenderTree):
3909         
3910             From Element::attach()
3911
3912         (WebCore::Style::detachShadowRoot):
3913         
3914             From ShadowRoot::detach()
3915
3916         (WebCore::Style::detachChildren):
3917         
3918             From Element::detachChildren()
3919
3920         (WebCore::Style::detachRenderTree):
3921         
3922             From Element::deatach()
3923
3924         (WebCore::Style::reattachRenderTree):
3925         
3926              From Element::reattach()
3927
3928         (WebCore::Style::resolveLocal):
3929         * style/StyleResolveTree.h:
3930         (WebCore::Style::AttachContext::AttachContext):
3931         
3932             From Element::AttachContext
3933
3934         * svg/SVGTests.cpp:
3935         (WebCore::SVGTests::handleAttributeChange):
3936         * xml/XMLErrors.cpp:
3937         (WebCore::XMLErrors::insertErrorMessageBlock):
3938         * xml/parser/XMLDocumentParserLibxml2.cpp:
3939         (WebCore::XMLDocumentParser::startElementNs):
3940
3941 2013-08-18  Antti Koivisto  <antti@apple.com>
3942
3943         Fix crashing plugin tests caused by a logic error in the previous patch.
3944         
3945         Not reviewed.
3946
3947         * html/HTMLPlugInImageElement.cpp:
3948         (WebCore::HTMLPlugInImageElement::willDetachRenderers):
3949
3950 2013-08-18  Antti Koivisto  <antti@apple.com>
3951
3952         <https://webkit.org/b/119982> Make Element::attach non-virtual
3953
3954         Reviewed by Andreas Kling.
3955
3956         This will give us more future refactoring options.
3957
3958         * dom/Element.cpp:
3959         (WebCore::Element::attach):
3960         (WebCore::Element::detach):
3961         
3962             Make non-virtual. Call element type specific custom functions as needed.
3963
3964         (WebCore::Element::styleForRenderer):
3965         (WebCore::Element::willRecalcStyle):
3966         (WebCore::Element::didRecalcStyle):
3967         (WebCore::Element::willAttachRenderers):
3968         (WebCore::Element::didAttachRenderers):
3969         (WebCore::Element::willDetachRenderers):
3970         (WebCore::Element::didDetachRenderers):
3971         
3972             Add virtual custom callbacks.
3973
3974         (WebCore::Element::customStyleForRenderer):
3975         * dom/Element.h:
3976         * dom/Node.h:
3977         (WebCore::Node::pseudoId):
3978         (WebCore::Node::hasCustomStyleResolveCallbacks):
3979         (WebCore::Node::setHasCustomStyleResolveCallbacks):
3980         
3981             Use the existing bit as it largely overlaps. Rename for clarity.
3982
3983         (WebCore::Node::customPseudoId):
3984         * dom/PseudoElement.cpp:
3985         (WebCore::PseudoElement::PseudoElement):
3986         (WebCore::PseudoElement::didAttachRenderers):
3987         * dom/PseudoElement.h:
3988         * html/HTMLCanvasElement.cpp:
3989         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
3990         (WebCore::HTMLCanvasElement::willAttachRenderers):
3991         * html/HTMLCanvasElement.h:
3992         * html/HTMLFormControlElement.cpp:
3993         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
3994         (WebCore::HTMLFormControlElement::didAttachRenderers):
3995         * html/HTMLFormControlElement.h:
3996         * html/HTMLFrameElement.cpp:
3997         (WebCore::HTMLFrameElement::HTMLFrameElement):
3998         (WebCore::HTMLFrameElement::didAttachRenderers):
3999         * html/HTMLFrameElement.h:
4000         * html/HTMLFrameElementBase.cpp:
4001         (WebCore::HTMLFrameElementBase::HTMLFrameElementBase):
4002         (WebCore::HTMLFrameElementBase::didAttachRenderers):
4003         * html/HTMLFrameElementBase.h:
4004         * html/HTMLFrameSetElement.cpp:
4005         (WebCore::HTMLFrameSetElement::HTMLFrameSetElement):
4006         (WebCore::HTMLFrameSetElement::willAttachRenderers):
4007         * html/HTMLFrameSetElement.h:
4008         * html/HTMLIFrameElement.cpp:
4009         (WebCore::HTMLIFrameElement::HTMLIFrameElement):
4010         * html/HTMLImageElement.cpp:
4011         (WebCore::HTMLImageElement::HTMLImageElement):
4012         (WebCore::HTMLImageElement::didAttachRenderers):
4013         * html/HTMLImageElement.h:
4014         * html/HTMLInputElement.cpp:
4015         (WebCore::HTMLInputElement::HTMLInputElement):
4016         (WebCore::HTMLInputElement::willAttachRenderers):
4017         (WebCore::HTMLInputElement::didAttachRenderers):
4018         (WebCore::HTMLInputElement::didDetachRenderers):
4019         * html/HTMLInputElement.h:
4020         * html/HTMLLIElement.cpp:
4021         (WebCore::HTMLLIElement::HTMLLIElement):
4022         (WebCore::HTMLLIElement::didAttachRenderers):
4023         * html/HTMLLIElement.h:
4024         * html/HTMLMediaElement.cpp:
4025         (WebCore::HTMLMediaElement::HTMLMediaElement):
4026         (WebCore::HTMLMediaElement::willAttachRenderers):
4027         (WebCore::HTMLMediaElement::didAttachRenderers):
4028         * html/HTMLMediaElement.h:
4029         * html/HTMLOptGroupElement.cpp:
4030         (WebCore::HTMLOptGroupElement::HTMLOptGroupElement):
4031         (WebCore::HTMLOptGroupElement::didAttachRenderers):
4032         (WebCore::HTMLOptGroupElement::willDetachRenderers):
4033         * html/HTMLOptGroupElement.h:
4034         * html/HTMLOptionElement.cpp:
4035         (WebCore::HTMLOptionElement::HTMLOptionElement):
4036         (WebCore::HTMLOptionElement::didAttachRenderers):
4037         (WebCore::HTMLOptionElement::willDetachRenderers):
4038         * html/HTMLOptionElement.h:
4039         * html/HTMLPlugInElement.cpp:
4040         (WebCore::HTMLPlugInElement::HTMLPlugInElement):
4041         (WebCore::HTMLPlugInElement::willDetachRenderers):
4042         * html/HTMLPlugInElement.h:
4043         * html/HTMLPlugInImageElement.cpp:
4044         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
4045         (WebCore::HTMLPlugInImageElement::didAttachRenderers):
4046         (WebCore::HTMLPlugInImageElement::willDetachRenderers):
4047         * html/HTMLPlugInImageElement.h:
4048         * html/HTMLProgressElement.cpp:
4049         (WebCore::HTMLProgressElement::HTMLProgressElement):
4050         (WebCore::HTMLProgressElement::didAttachRenderers):
4051         * html/HTMLProgressElement.h:
4052         * html/HTMLTextAreaElement.cpp:
4053         (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
4054         (WebCore::HTMLTextAreaElement::didAttachRenderers):
4055         * html/HTMLTextAreaElement.h:
4056         * html/HTMLVideoElement.cpp:
4057         (WebCore::HTMLVideoElement::HTMLVideoElement):
4058         (WebCore::HTMLVideoElement::didAttachRenderers):
4059         * html/HTMLVideoElement.h:
4060         * html/shadow/InsertionPoint.cpp:
4061         (WebCore::InsertionPoint::InsertionPoint):
4062         (WebCore::InsertionPoint::willAttachRenderers):
4063         (WebCore::InsertionPoint::willDetachRenderers):
4064         * html/shadow/InsertionPoint.h:
4065         * html/shadow/SliderThumbElement.cpp:
4066         (WebCore::SliderThumbElement::SliderThumbElement):
4067     &nb