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