62fa7261c1ed48d02f5475a9e4e6100571db82fd
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-03-12  Tien-Ren Chen  <trchen@chromium.org>
2
3         Need to notify ScrollingCoordinator when frame scrollbars are destroyed
4         https://bugs.webkit.org/show_bug.cgi?id=112104
5
6         Reviewed by James Robinson.
7
8         Need to notify ScrollingCoordinatorChromium whenever m_layerForHorizontalScrollbar /
9         m_layerForVerticalScrollbar changes, for correct lifetime management.
10
11         No new tests. Difficult to test lifetime management internal to ScrollingCoordinatorChromium.
12
13         * rendering/RenderLayerCompositor.cpp:
14         (WebCore::RenderLayerCompositor::destroyRootLayer):
15
16 2013-03-11  Simon Fraser  <simon.fraser@apple.com>
17
18         We'll get there eventually.
19
20         * platform/graphics/ca/win/PlatformCAFiltersWin.cpp:
21
22 2013-03-11  Simon Fraser  <simon.fraser@apple.com>
23
24         Fumbled adding new files to the vcproj. Fixing.
25
26         * WebCore.vcproj/WebCore.vcproj:
27
28 2013-03-11  Simon Fraser  <simon.fraser@apple.com>
29
30         Fix the Windows build by providing implementations of PlatformCAFilters::setFiltersOnLayer(),
31         PlatformCAFilters::numAnimatedFilterProperties() and PlatformCAFilters::animatedFilterPropertyName(),
32         adding PlatformCAFiltersWin.cpp to the vcproj.
33         
34         * WebCore.vcproj/WebCore.vcproj:
35         * platform/graphics/ca/PlatformCAFilters.h:
36         (PlatformCAFilters):
37         * platform/graphics/ca/win/PlatformCAFiltersWin.cpp: Copied from Source/WebCore/platform/graphics/ca/PlatformCAFilters.h.
38         (PlatformCAFilters::setFiltersOnLayer):
39         (PlatformCAFilters::numAnimatedFilterProperties):
40         (PlatformCAFilters::animatedFilterPropertyName):
41
42 2013-03-11  Jochen Eisinger  <jochen@chromium.org>
43
44         Don't create multiple user gesture indicators when forwarding events to sub frames
45         https://bugs.webkit.org/show_bug.cgi?id=111923
46
47         Reviewed by Adam Barth.
48
49         Ports that implement consumable user gestures depend on a single user
50         gesture indicator being created in response to a single user gesture.
51
52         Test: platform/chromium/fast/events/popup-allowed-from-gesture-only-once-iframes.html
53
54         * dom/UserGestureIndicator.cpp:
55         (WebCore::isDefinite):
56         (WebCore::UserGestureIndicator::UserGestureIndicator):
57         (WebCore::UserGestureIndicator::processingUserGesture):
58         * dom/UserGestureIndicator.h:
59         * page/EventHandler.cpp:
60         (WebCore::EventHandler::handleMousePressEvent):
61         (WebCore::EventHandler::handleMouseDoubleClickEvent):
62         (WebCore::EventHandler::handleMouseReleaseEvent):
63         (WebCore::EventHandler::keyEvent):
64         (WebCore::EventHandler::handleTouchEvent):
65
66 2013-03-11  Simon Fraser  <simon.fraser@apple.com>
67
68         Fix Windows build.
69
70         * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
71
72 2013-03-11  Tim Horton  <timothy_horton@apple.com>
73
74         Unreviewed build fix after http://trac.webkit.org/changeset/145472.
75
76         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
77         (PlatformCAFilters::colorMatrixValueForFilter):
78
79 2013-03-11  Takashi Sakamoto  <tasak@google.com>
80
81         [CSS] shadow from radius has wrong render in webkit
82         https://bugs.webkit.org/show_bug.cgi?id=99928
83
84         Reviewed by Simon Fraser.
85
86         No rounded cornder should be expanded in the mixed case, i.e. some
87         corners are rounded, but others are not rounded.
88         Need to look at each corner independently,
89         i.e. top-left, top-right, bottom-left and bottom-right, and
90         to expand corners whose width and height are larger than 0.
91
92         Test: fast/box-shadow/box-shadow-with-zero-radius.html
93
94         * platform/graphics/RoundedRect.cpp:
95         (WebCore::RoundedRect::Radii::expand):
96
97 2013-03-11  Simon Fraser  <simon.fraser@apple.com>
98
99         [CA] Animations of CSS filters don't work correctly
100         https://bugs.webkit.org/show_bug.cgi?id=111905
101
102         Reviewed by Dean Jackson.
103
104         Fix various issues with transitions of composited filters on Mac,
105         most of which stemmed from the conversion to use CAFilter.
106         
107         Put the Mac CA filter-related code into a new file, PlatformCAFilters,
108         to group code that creates filter properties into a single place.
109         
110         Animations of CIFilters using multiple values never worked correctly,
111         because we would clobber all but the last property for each filter,
112         so fix that.
113         
114         Changes in the moved filter code:
115             - Made use of sepiaFullConstants in the CIFilter and CAFilter code.
116             - For CI, return CIVectors instead of NSArrays of NSNumbers.
117             - Fudge the inputColor for the CI grayscale filter to better match software filters.
118             - fix some cases where the behavior was wrong in the isDefault() case.
119
120         * WebCore.xcodeproj/project.pbxproj: Add PlatformCAFilters.h, PlatformCAFiltersMac.mm.
121         * platform/graphics/GraphicsLayer.cpp:
122         (WebCore::GraphicsLayer::animationNameForTransition): This function was creating a string
123         containing non-ASCII characters.
124         * platform/graphics/ca/GraphicsLayerCA.cpp:
125         (WebCore::animationIdentifier): To handle CIFilter animations, we need to tack another
126         index onto the animation identifier, since some animations require animating multiple
127         properties of the same CIFilter. Add "subIndex" for this.
128         (WebCore::GraphicsLayerCA::moveOrCopyAnimations): Ditto.
129         (WebCore::GraphicsLayerCA::updateAnimations): Ditto.
130         (WebCore::GraphicsLayerCA::setAnimationOnLayer): Ditto.
131         (WebCore::GraphicsLayerCA::removeCAAnimationFromLayer): Ditto.
132         (WebCore::GraphicsLayerCA::pauseCAAnimationOnLayer): Ditto.
133         (WebCore::GraphicsLayerCA::createAnimationFromKeyframes): Ditto.
134         (WebCore::GraphicsLayerCA::appendToUncommittedAnimations): Ditto.
135         * platform/graphics/ca/GraphicsLayerCA.h: Ditto.
136         (WebCore::GraphicsLayerCA::LayerPropertyAnimation::LayerPropertyAnimation):
137         (LayerPropertyAnimation):
138         * platform/graphics/ca/PlatformCAAnimation.h:
139         (PlatformCAAnimation): Functions moved.
140         * platform/graphics/ca/PlatformCAFilters.h: Added.
141         (PlatformCAFilters):
142         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
143         (PlatformCAAnimation::setFromValue):
144         (PlatformCAAnimation::setToValue):
145         (PlatformCAAnimation::setValues):
146         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Added.
147         (PlatformCAFilters::filterValueForOperation):
148         (PlatformCAFilters::colorMatrixValueForFilter):
149         (PlatformCAFilters::numAnimatedFilterProperties):
150         (PlatformCAFilters::animatedFilterPropertyName):
151         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
152         (PlatformCALayer::PlatformCALayer):
153         (PlatformCALayer::addAnimationForKey):
154         (PlatformCALayer::setFilters):
155         (PlatformCALayer::filtersCanBeComposited):
156
157 2013-03-11  Sheriff Bot  <webkit.review.bot@gmail.com>
158
159         Unreviewed, rolling out r145462.
160         http://trac.webkit.org/changeset/145462
161         https://bugs.webkit.org/show_bug.cgi?id=112097
162
163         Compilation failure in PluginView.cpp (Requested by jamesr_ on
164         #webkit).
165
166         * accessibility/AccessibilityMenuList.cpp:
167         (WebCore::AccessibilityMenuList::canSetFocusAttribute):
168         * bindings/objc/DOM.mm:
169         (kitClass):
170         * bindings/v8/V8LazyEventListener.cpp:
171         (WebCore::V8LazyEventListener::prepareListenerObject):
172         * css/SelectorChecker.cpp:
173         (WebCore::SelectorChecker::checkOne):
174         * editing/ApplyStyleCommand.cpp:
175         (WebCore::isLegacyAppleStyleSpan):
176         (WebCore::isEmptyFontTag):
177         (WebCore::ApplyStyleCommand::applyBlockStyle):
178         * editing/FormatBlockCommand.cpp:
179         (WebCore::isElementForFormatBlock):
180         * editing/ReplaceSelectionCommand.cpp:
181         (WebCore::isMailPasteAsQuotationNode):
182         (WebCore::haveSameTagName):
183         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
184         (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
185         * history/CachedPage.cpp:
186         (WebCore::CachedPage::restore):
187         * html/ColorInputType.cpp:
188         (WebCore::ColorInputType::suggestions):
189         * html/HTMLTableRowsCollection.cpp:
190         (WebCore::isInHead):
191         (WebCore::isInBody):
192         (WebCore::isInFoot):
193         * inspector/DOMPatchSupport.cpp:
194         (WebCore::DOMPatchSupport::innerPatchNode):
195         * page/PageSerializer.cpp:
196         (WebCore::SerializerMarkupAccumulator::appendCustomAttributes):
197         * plugins/PluginView.cpp:
198         (WebCore::PluginView::getValue):
199         * rendering/RenderEmbeddedObject.cpp:
200         (WebCore::RenderEmbeddedObject::paintContents):
201         (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
202         * rendering/RenderLayer.cpp:
203         (WebCore::RenderLayer::name):
204         * rendering/RenderMedia.cpp:
205         (WebCore::RenderMedia::mediaElement):
206         * rendering/RenderSearchField.cpp:
207         (WebCore::RenderSearchField::autosaveName):
208         * rendering/RenderTextControl.cpp:
209         (WebCore::RenderTextControl::textFormControlElement):
210         (WebCore::updateUserModifyProperty):
211         * rendering/mathml/RenderMathMLFenced.cpp:
212         (WebCore::RenderMathMLFenced::updateFromElement):
213         * rendering/mathml/RenderMathMLFraction.cpp:
214         (WebCore::RenderMathMLFraction::updateFromElement):
215         * xml/parser/XMLDocumentParserLibxml2.cpp:
216         (WebCore::XMLDocumentParser::XMLDocumentParser):
217         (WebCore::XMLDocumentParser::endElementNs):
218
219 2013-03-11  Alexey Proskuryakov  <ap@apple.com>
220
221         Move SharedWorkerRepository functions out of DefaultSharedWorkerRepository
222         https://bugs.webkit.org/show_bug.cgi?id=100418
223
224         Reviewed by Sam Weinig.
225
226         * CMakeLists.txt:
227         * GNUmakefile.list.am:
228         * Target.pri:
229         * WebCore.vcproj/WebCore.vcproj:
230         * WebCore.xcodeproj/project.pbxproj:
231         Added SharedWorkerRepository.cpp.
232
233         * WebCore.gyp/WebCore.gyp:
234         * WebCore.gypi:
235         Chromium uses WebKit/chromium/src/SharedWorkerRepository.cpp instead of
236         WebCore/workers/DefaultSharedWorkerRepository.cpp. Not sure why it's added and
237         then excluded, but did the same with the new SharedWorkerRepository.cpp, which
238         just contains some code moved from that file.
239
240         * workers/DefaultSharedWorkerRepository.cpp:
241         (WebCore::SharedWorkerScriptLoader::load): Removed a PLATFORM(CHROMIUM) clause,
242         chromium doesn't compile this file.
243         (WebCore::DefaultSharedWorkerRepository::connectToWorker): Added a FIXME about
244         seemingly wrong code.
245
246         * workers/SharedWorkerRepository.cpp: Added.
247         (WebCore::SharedWorkerRepository::isAvailable):
248         (WebCore::SharedWorkerRepository::connect):
249         (WebCore::SharedWorkerRepository::documentDetached):
250         (WebCore::SharedWorkerRepository::hasSharedWorkers):
251         Moved from DefaultSharedWorkerRepository.cpp, because this is part of SharedWorkerRepository.
252
253 2013-03-11  Adam Barth  <abarth@webkit.org>
254
255         Make BackgroundHTMLParser work with doc.writes that enter or leave foreign content
256         https://bugs.webkit.org/show_bug.cgi?id=109764
257
258         Reviewed by Eric Seidel.
259
260         Previously, we were not reseting the state of the
261         HTMLTreeBuilderSimulator when we failed speculative parsing. This had a
262         number of observable consequences, including not parsing CDATA sections
263         correctly when document.write caused us to enter foreign content.
264
265         Test: fast/parser/document-write-svg-cdata.html
266
267         * html/parser/BackgroundHTMLParser.cpp:
268         (WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
269         (WebCore::BackgroundHTMLParser::resumeFrom):
270         (WebCore::BackgroundHTMLParser::pumpTokenizer):
271         (WebCore::BackgroundHTMLParser::sendTokensToMainThread):
272         * html/parser/BackgroundHTMLParser.h:
273         (Checkpoint):
274         (BackgroundHTMLParser):
275         * html/parser/HTMLDocumentParser.cpp:
276         (WebCore::HTMLDocumentParser::validateSpeculations):
277         (WebCore::HTMLDocumentParser::didFailSpeculation):
278         * html/parser/HTMLDocumentParser.h:
279         (ParsedChunk):
280         * html/parser/HTMLElementStack.h:
281         (WebCore::HTMLElementStack::ElementRecord::namespaceURI):
282         * html/parser/HTMLTreeBuilder.h:
283         (WebCore::HTMLTreeBuilder::options):
284         (WebCore::HTMLTreeBuilder::openElements):
285         (HTMLTreeBuilder):
286         * html/parser/HTMLTreeBuilderSimulator.cpp:
287         (WebCore::HTMLTreeBuilderSimulator::stateFor):
288         (WebCore):
289         * html/parser/HTMLTreeBuilderSimulator.h:
290         (WebCore):
291         (WebCore::HTMLTreeBuilderSimulator::state):
292         (WebCore::HTMLTreeBuilderSimulator::setState):
293         (HTMLTreeBuilderSimulator):
294
295 2013-03-11  Abhishek Arya  <inferno@chromium.org>
296
297         Replace static_casts with to* functions.
298         https://bugs.webkit.org/show_bug.cgi?id=112072
299
300         Reviewed by Philip Rogers.
301
302         to* functions are preferred over static_cast calls since they
303         help to catch bad casts easily on the testing infrastructure.
304
305         * accessibility/AccessibilityMenuList.cpp:
306         (WebCore::AccessibilityMenuList::canSetFocusAttribute):
307         * bindings/objc/DOM.mm:
308         (kitClass):
309         * bindings/v8/V8LazyEventListener.cpp:
310         (WebCore::V8LazyEventListener::prepareListenerObject):
311         * css/SelectorChecker.cpp:
312         (WebCore::SelectorChecker::checkOne):
313         * editing/ApplyStyleCommand.cpp:
314         (WebCore::isLegacyAppleStyleSpan):
315         (WebCore::isEmptyFontTag):
316         (WebCore::ApplyStyleCommand::applyBlockStyle):
317         * editing/FormatBlockCommand.cpp:
318         (WebCore::isElementForFormatBlock):
319         * editing/ReplaceSelectionCommand.cpp:
320         (WebCore::isMailPasteAsQuotationNode):
321         (WebCore::haveSameTagName):
322         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
323         (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
324         * history/CachedPage.cpp:
325         (WebCore::CachedPage::restore):
326         * html/ColorInputType.cpp:
327         (WebCore::ColorInputType::suggestions):
328         * html/HTMLTableRowsCollection.cpp:
329         (WebCore::isInHead):
330         (WebCore::isInBody):
331         (WebCore::isInFoot):
332         * inspector/DOMPatchSupport.cpp:
333         (WebCore::DOMPatchSupport::innerPatchNode):
334         * page/PageSerializer.cpp:
335         (WebCore::SerializerMarkupAccumulator::appendCustomAttributes):
336         * plugins/PluginView.cpp:
337         (WebCore::PluginView::getValue):
338         * rendering/RenderEmbeddedObject.cpp:
339         (WebCore::RenderEmbeddedObject::paintContents):
340         (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
341         * rendering/RenderLayer.cpp:
342         (WebCore::RenderLayer::name):
343         * rendering/RenderMedia.cpp:
344         (WebCore::RenderMedia::mediaElement):
345         * rendering/RenderSearchField.cpp:
346         (WebCore::RenderSearchField::autosaveName):
347         * rendering/RenderTextControl.cpp:
348         (WebCore::RenderTextControl::textFormControlElement):
349         (WebCore::updateUserModifyProperty):
350         * rendering/mathml/RenderMathMLFenced.cpp:
351         (WebCore::RenderMathMLFenced::updateFromElement):
352         * rendering/mathml/RenderMathMLFraction.cpp:
353         (WebCore::RenderMathMLFraction::updateFromElement):
354         * xml/parser/XMLDocumentParserLibxml2.cpp:
355         (WebCore::XMLDocumentParser::XMLDocumentParser):
356         (WebCore::XMLDocumentParser::endElementNs):
357
358 2013-03-11  Philip Rogers  <pdr@google.com>
359
360         Replace static_casts for SVGSVGElement and SVGStopElement
361         https://bugs.webkit.org/show_bug.cgi?id=111651
362
363         Reviewed by Stephen Chenney.
364
365         toSVGSVGElement and toSVGStopElement are preferred over static_casts because bad casts
366         can be caught on our testing infrastructure. This patches replaces all static_casts for
367         SVGSVGElement and SVGStopElement with toSVGSVGElement and toSVGStopElement, respectively.
368
369         Additionaly, this patch renames SVGElement::isSVG to SVGElement::isSVGSVGElement to
370         remove ambiguity for callers who may confuse this with isSVGElement.
371
372         No new tests as this is covered with existing tests.
373
374         * rendering/svg/RenderSVGRoot.cpp:
375         (WebCore::RenderSVGRoot::computeIntrinsicRatioInformation):
376         (WebCore::RenderSVGRoot::computeReplacedLogicalWidth):
377         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
378         (WebCore::RenderSVGRoot::layout):
379         (WebCore::RenderSVGRoot::buildLocalToBorderBoxTransform):
380         (WebCore::RenderSVGRoot::hasRelativeDimensions):
381         (WebCore::RenderSVGRoot::hasRelativeIntrinsicLogicalWidth):
382         (WebCore::RenderSVGRoot::hasRelativeLogicalHeight):
383         * rendering/svg/RenderSVGViewportContainer.cpp:
384         (WebCore::RenderSVGViewportContainer::determineIfLayoutSizeChanged):
385         (WebCore::RenderSVGViewportContainer::calcViewport):
386         (WebCore::RenderSVGViewportContainer::viewportTransform):
387         * svg/SVGDocument.cpp:
388         (WebCore::SVGDocument::rootElement):
389         (WebCore::SVGDocument::childShouldCreateRenderer):
390         * svg/SVGElement.cpp:
391         (WebCore::SVGElement::ownerSVGElement):
392         * svg/SVGElement.h:
393         (WebCore::SVGElement::isSVGSVGElement):
394         * svg/SVGGradientElement.cpp:
395         (WebCore::SVGGradientElement::buildStops):
396         * svg/SVGLengthContext.cpp:
397         (WebCore::SVGLengthContext::determineViewport):
398         * svg/SVGSVGElement.h:
399         (WebCore):
400         (WebCore::toSVGSVGElement):
401         * svg/SVGStopElement.h:
402         (WebCore::toSVGStopElement):
403         (WebCore):
404
405 2013-03-11  Tony Chang  <tony@chromium.org>
406
407         Small code cleanup in RenderFlexibleBox
408         https://bugs.webkit.org/show_bug.cgi?id=112076
409
410         Reviewed by Ojan Vafai.
411
412         No new tests, this is a refactor and existing tests in css3/flexbox should pass.
413
414         * rendering/RenderFlexibleBox.cpp:
415         (WebCore::RenderFlexibleBox::layoutBlock): Remove unused param from repositionLogicalHeightDependentFlexItems.
416         (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems): Remove unused param from repositionLogicalHeightDependentFlexItems.
417         The clientLogicalBottom can't have changed in this time (the only thing we've done is align children).
418         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): Just call layout() if we marked the flexitem as needing layout.
419         (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild): Just call layout() if we marked the flexitem as needing layout.
420         * rendering/RenderFlexibleBox.h:
421         (RenderFlexibleBox): Remove unused param from repositionLogicalHeightDependentFlexItems.
422
423 2013-03-11  Jochen Eisinger  <jochen@chromium.org>
424
425         Rename DefinitelyProcessingUserGesture to DefinitelyProcessingNewUserGesture
426         https://bugs.webkit.org/show_bug.cgi?id=111959
427
428         Reviewed by Alexey Proskuryakov.
429
430         The rationale is that the UserGestureIndicator will increase the number
431         of consumable user gestures when it's invoked with what is now
432         DefinitelyProcessingNewUserGesture.
433
434         In a follow-up change I will reintroduce DefinitelyProcessingUserGesture
435         which will only increase the consumable user gesture count if we are
436         not already processing a user gesture.
437
438         No new tests, no change in functionality.
439
440         * accessibility/AccessibilityNodeObject.cpp:
441         (WebCore::AccessibilityNodeObject::increment):
442         (WebCore::AccessibilityNodeObject::decrement):
443         * accessibility/AccessibilityObject.cpp:
444         (WebCore::AccessibilityObject::press):
445         * bindings/ScriptControllerBase.cpp:
446         (WebCore::ScriptController::executeScript):
447         * bindings/js/ScriptController.cpp:
448         (WebCore::ScriptController::executeScriptInWorld):
449         * bindings/v8/NPV8Object.cpp:
450         (_NPN_EvaluateHelper):
451         * dom/UserGestureIndicator.cpp:
452         (WebCore::isDefinite):
453         (WebCore::UserGestureIndicator::UserGestureIndicator):
454         (WebCore::UserGestureIndicator::processingUserGesture):
455         * dom/UserGestureIndicator.h:
456         * inspector/InspectorFrontendClientLocal.cpp:
457         (WebCore::InspectorFrontendClientLocal::openInNewTab):
458         * inspector/InspectorFrontendHost.cpp:
459         (WebCore::FrontendMenuProvider::contextMenuItemSelected):
460         * inspector/InspectorPageAgent.cpp:
461         (WebCore::InspectorPageAgent::navigate):
462         * loader/NavigationScheduler.cpp:
463         (WebCore::ScheduledURLNavigation::fire):
464         (WebCore::ScheduledURLNavigation::didStartTimer):
465         (WebCore::ScheduledRedirect::fire):
466         (WebCore::ScheduledRefresh::fire):
467         (WebCore::ScheduledHistoryNavigation::fire):
468         (WebCore::ScheduledFormSubmission::fire):
469         (WebCore::ScheduledFormSubmission::didStartTimer):
470         * page/EventHandler.cpp:
471         (WebCore::EventHandler::handleMousePressEvent):
472         (WebCore::EventHandler::handleMouseDoubleClickEvent):
473         (WebCore::EventHandler::handleMouseReleaseEvent):
474         (WebCore::EventHandler::keyEvent):
475         (WebCore::EventHandler::handleTouchEvent):
476         * platform/chromium/PopupContainer.cpp:
477         (WebCore::PopupContainer::handleMouseDownEvent):
478         (WebCore::PopupContainer::handleMouseMoveEvent):
479         (WebCore::PopupContainer::handleMouseReleaseEvent):
480         (WebCore::PopupContainer::handleWheelEvent):
481         (WebCore::PopupContainer::handleKeyEvent):
482
483 2013-03-11  Yuki Sekiguchi  <yuki.sekiguchi@access-company.com>
484
485         Ruby text is incorrectly positioned when its writing-mode is changed to vertical after layout is done
486         https://bugs.webkit.org/show_bug.cgi?id=96592
487
488         Reviewed by Hajime Morrita.
489
490         Fixed logical left of RenderRubyText is not cleared.
491
492         This causes trouble when RenderRubyTest is laid out vertically after horizontally.
493         Horizontal layout set logical top(== y).
494         Vertical layout don't set logical left(== y).
495         RenderRubyText::y remain old one.
496         We clear old RenderRubyText::y at the first part of layout().
497
498         Test: fast/writing-mode/ruby-text-logical-left.html
499
500         * rendering/RenderRubyRun.cpp:
501         (WebCore::RenderRubyRun::layout): Reset logicalLeft not to reuse old one.
502
503 2013-03-11  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
504
505         [css3-text] Add partial parsing support for text-underline-position property from CSS3 Text
506         https://bugs.webkit.org/show_bug.cgi?id=102491
507
508         Reviewed by Julien Chaffraix.
509
510         This patch extends the existing parsing to support 'auto', 'alphabetic' and 'under'. We don't fully match
511         the specification as we don't support [ left | right ] and this is left for another implementation
512         as the rendering will need to be added.
513
514         Test: fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-underline-position.html
515
516         * css/CSSComputedStyleDeclaration.cpp:
517         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
518         * css/CSSParser.cpp:
519         (WebCore::CSSParser::parseValue):
520         (WebCore::CSSParser::parseTextUnderlinePosition):
521         * css/CSSParser.h:
522         * css/CSSPrimitiveValueMappings.h:
523         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
524         (WebCore::CSSPrimitiveValue::operator TextUnderlinePosition):
525         * css/CSSProperty.cpp:
526         (WebCore::CSSProperty::isInheritedProperty):
527         Added parsing-related checks for text-underline-position property.
528         * css/CSSPropertyNames.in: Added '-webkit-underline-position' property.
529         * css/CSSValueKeywords.in:
530         * css/SVGCSSValueKeywords.in:
531         * css/StyleBuilder.cpp:
532         (ApplyPropertyTextUnderlinePosition):
533         (WebCore::ApplyPropertyTextUnderlinePosition::applyValue):
534         (WebCore::ApplyPropertyTextUnderlinePosition::createHandler):
535         (WebCore::StyleBuilder::StyleBuilder):
536         Set property handler for text-underline-position.
537         * css/StyleResolver.cpp:
538         (WebCore::StyleResolver::applyProperty):
539         * rendering/style/RenderStyle.h:
540         * rendering/style/RenderStyleConstants.h:
541         * rendering/style/StyleRareInheritedData.cpp:
542         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
543         (WebCore::StyleRareInheritedData::operator==):
544         Added support for m_textUnderlinePosition on copy constructor and operator
545         assignment functions.
546         * rendering/style/StyleRareInheritedData.h:
547         (StyleRareInheritedData): Added m_textUnderlinePosition here as it won't be used regularly.
548
549 2013-03-11  Christian Biesinger  <cbiesinger@chromium.org>
550
551         Hit testing should use ancestorInThisScope to get the non-shadow ancestor
552         https://bugs.webkit.org/show_bug.cgi?id=112068
553
554         Reviewed by Dimitri Glazkov.
555
556         Tests: media/nodesFromRect-shadowContent.html
557
558         * rendering/HitTestResult.cpp:
559         (WebCore::HitTestResult::setToNonShadowAncestor):
560         (WebCore::HitTestResult::addNodeToRectBasedTestResult):
561         Use ancestorInThisScope which is not deprecated and which produces
562         correct results for nested shadow trees (e.g. in case of <video>,
563         which contains <input> elements for the controls, which themselves
564         have shadow trees)
565
566 2013-03-11  Abhishek Arya  <inferno@chromium.org>
567
568         Replace static_cast with to* helper functions.
569         https://bugs.webkit.org/show_bug.cgi?id=112045
570
571         Reviewed by Eric Seidel.
572
573         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
574         (WebCore::V8HTMLOptionsCollection::removeMethodCustom):
575         (WebCore::V8HTMLOptionsCollection::indexedPropertySetter):
576         * bindings/v8/custom/V8NamedNodesCollection.cpp:
577         (WebCore::V8NamedNodesCollection::namedItem):
578         * bindings/v8/custom/V8NodeCustom.cpp:
579         (WebCore::wrap):
580         * editing/BreakBlockquoteCommand.cpp:
581         (WebCore::BreakBlockquoteCommand::doApply):
582         * editing/CompositeEditCommand.cpp:
583         (WebCore::CompositeEditCommand::insertNodeAt):
584         (WebCore::CompositeEditCommand::pushAnchorElementDown):
585         (WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
586         (WebCore::CompositeEditCommand::splitTreeToNode):
587         * editing/InsertParagraphSeparatorCommand.cpp:
588         (WebCore::InsertParagraphSeparatorCommand::doApply):
589         * loader/archive/cf/LegacyWebArchive.cpp:
590         (WebCore::LegacyWebArchive::create):
591         * platform/chromium/PasteboardChromium.cpp:
592         (WebCore::Pasteboard::writeImage):
593         * platform/mac/HTMLConverter.mm:
594         (+[WebHTMLConverter editingAttributedStringFromRange:]):
595         * rendering/RenderLayerBacking.cpp:
596         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
597         * rendering/RenderLayerCompositor.cpp:
598         (WebCore::RenderLayerCompositor::frameContentsCompositor):
599         (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
600         * rendering/RenderSnapshottedPlugIn.cpp:
601         (WebCore::RenderSnapshottedPlugIn::plugInImageElement):
602         * rendering/mathml/RenderMathMLOperator.cpp:
603         (WebCore::RenderMathMLOperator::updateFromElement):
604         * rendering/svg/RenderSVGResourceContainer.cpp:
605         (WebCore::RenderSVGResourceContainer::idChanged):
606
607 2013-03-11  James Robinson  <jamesr@chromium.org>
608
609         [chromium] Use SkMatrix44 instead of WebTransformationMatrix in animation APIs
610         https://bugs.webkit.org/show_bug.cgi?id=111791
611
612         Reviewed by Adrienne Walker.
613
614         Adds a new utility function to convert a TransformationMatrix to an SkMatrix44 and
615         uses it in AnimationTranslationUtil and GraphicsLayerChromium.
616
617         * WebCore.gypi:
618         * platform/chromium/support/WebTransformationMatrix.cpp:
619         (WebKit::WebTransformationMatrix::WebTransformationMatrix):
620         * platform/graphics/chromium/AnimationTranslationUtil.cpp:
621         (WebCore::toWebTransformOperations):
622         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
623         (WebCore::GraphicsLayerChromium::updateTransform):
624         (WebCore::GraphicsLayerChromium::updateChildrenTransform):
625         * platform/graphics/chromium/TransformSkMatrix44Conversions.cpp:
626         (WebCore::TransformSkMatrix44Conversions::convert):
627         * platform/graphics/chromium/TransformSkMatrix44Conversions.h:
628         (TransformSkMatrix44Conversions):
629
630 2013-03-11  Sheriff Bot  <webkit.review.bot@gmail.com>
631
632         Unreviewed, rolling out r145435.
633         http://trac.webkit.org/changeset/145435
634         https://bugs.webkit.org/show_bug.cgi?id=112082
635
636         Still does not compile (Requested by jamesr on #webkit).
637
638         * Modules/indexeddb/IDBBackingStore.cpp:
639         (WebCore::IDBBackingStore::getObjectStores):
640         (WebCore::IDBBackingStore::createObjectStore):
641         (WebCore::IDBBackingStore::deleteObjectStore):
642         (WebCore::IDBBackingStore::getRecord):
643         (WebCore::IDBBackingStore::putRecord):
644         (WebCore::IDBBackingStore::clearObjectStore):
645         (WebCore::IDBBackingStore::deleteRecord):
646         (WebCore::IDBBackingStore::getKeyGeneratorCurrentNumber):
647         (WebCore::IDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber):
648         (WebCore::IDBBackingStore::keyExistsInObjectStore):
649         (WebCore::IDBBackingStore::getIndexes):
650         (WebCore::IDBBackingStore::createIndex):
651         (WebCore::IDBBackingStore::deleteIndex):
652         (WebCore::IDBBackingStore::putIndexDataForRecord):
653         (WebCore::IDBBackingStore::findKeyInIndex):
654         (WebCore::IDBBackingStore::getPrimaryKeyViaIndex):
655         (WebCore::IDBBackingStore::keyExistsInIndex):
656         (WebCore::indexCursorOptions):
657         * Modules/indexeddb/IDBBackingStore.h:
658         (IDBBackingStore):
659         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
660         (WebCore::DeleteIndexOperation::create):
661         (WebCore::DeleteIndexOperation::DeleteIndexOperation):
662         (DeleteIndexOperation):
663         (WebCore::IDBDatabaseBackendImpl::openInternal):
664         (WebCore::IDBDatabaseBackendImpl::deleteIndex):
665         (WebCore::DeleteIndexOperation::perform):
666         (WebCore::DeleteRangeOperation::perform):
667         (WebCore::ClearOperation::perform):
668         * Modules/indexeddb/IDBLevelDBCoding.cpp:
669         (WebCore::IDBLevelDBCoding::KeyPrefix::KeyPrefix):
670         (WebCore::IDBLevelDBCoding::KeyPrefix::encode):
671         (WebCore::IDBLevelDBCoding::SchemaVersionKey::encode):
672         (WebCore::IDBLevelDBCoding::MaxDatabaseIdKey::encode):
673         (WebCore::IDBLevelDBCoding::DataVersionKey::encode):
674         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::encode):
675         (WebCore::IDBLevelDBCoding::DatabaseNameKey::encode):
676         (WebCore::IDBLevelDBCoding::DatabaseMetaDataKey::encode):
677         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encode):
678         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::encode):
679         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::encode):
680         (WebCore::IDBLevelDBCoding::IndexFreeListKey::encode):
681         (WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::encode):
682         (WebCore::IDBLevelDBCoding::IndexNamesKey::encode):
683         (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::encode):
684         (WebCore::IDBLevelDBCoding::ExistsEntryKey::encode):
685         * Modules/indexeddb/IDBLevelDBCoding.h:
686         (IDBLevelDBCoding):
687         (KeyPrefix):
688         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
689         (WebCore::IDBObjectStoreBackendImpl::IndexWriter::writeIndexKeys):
690
691 2013-03-11  Alec Flett  <alecflett@chromium.org>
692
693         IndexedDB: Protect against key prefix overflows
694         https://bugs.webkit.org/show_bug.cgi?id=111138
695
696         Reviewed by Tony Chang.
697
698         This reworks the boundary checking for all databaseId,
699         objectStoreId, and indexId, including negative and
700         zero-based ids. All entrypoints into IDBLevelDBCoding
701         are protected with explicit checks and all internal
702         uses of KeyPrefix are protected with ASSERTs in the
703         various constructors.
704
705         Tests: WebKit unit tests IDBBackingStoreTest.cpp in WebKit/chromium
706
707         * Modules/indexeddb/IDBBackingStore.h: Make all public methods boolean-based for errors.
708         * Modules/indexeddb/IDBLevelDBCoding.h: Add methods for checking databaseId, objectStoreId, and indexId.
709
710 2013-03-11  Philip Rogers  <pdr@google.com>
711
712         Replace static_cast<SVGStyledElement> with toSVGStyledElement()
713         https://bugs.webkit.org/show_bug.cgi?id=111651
714
715         Reviewed by Abhishek Arya.
716
717         toSVGStyledElement is preferred over static_cast<SVGStyledElement*> because bad casts
718         can be caught on our testing infrastructure. This patch replaces all
719         static_cast<SVGStyledElement> instances with toSVGStyledElement.
720
721         Additionally, this patch renames SVGElement::isStyled to SVGElement::isSVGStyledElement to
722         remove a confusing overlap with html styled elements. This name differs slighly from the
723         other is*() functions in SVGElement but this will be resolved up with webkit.org/b/107386.
724
725         No new tests as this is covered with existing tests.
726
727         * rendering/svg/RenderSVGModelObject.cpp:
728         (WebCore::getElementCTM):
729         * rendering/svg/RenderSVGResourceClipper.cpp:
730         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
731         (WebCore::RenderSVGResourceClipper::calculateClipContentRepaintRect):
732         (WebCore::RenderSVGResourceClipper::hitTestClipContent):
733         * rendering/svg/RenderSVGResourceMasker.cpp:
734         (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
735         (WebCore::RenderSVGResourceMasker::calculateMaskContentRepaintRect):
736         * rendering/svg/RenderSVGResourcePattern.cpp:
737         (WebCore::RenderSVGResourcePattern::createTileImage):
738         * rendering/svg/SVGRenderSupport.cpp:
739         (WebCore::SVGRenderSupport::layoutChildren):
740         * rendering/svg/SVGResources.cpp:
741         (WebCore::registerPendingResource):
742         * svg/SVGAnimationElement.cpp:
743         (WebCore::SVGAnimationElement::isTargetAttributeCSSProperty):
744         (WebCore::SVGAnimationElement::computeCSSPropertyValue):
745         (WebCore::SVGAnimationElement::adjustForInheritance):
746         (WebCore::inheritsFromProperty):
747         * svg/SVGElement.cpp:
748         (WebCore::collectInstancesForSVGElement):
749         (WebCore::SVGElement::isAnimatableAttribute):
750         * svg/SVGElement.h:
751         (WebCore::SVGElement::isSVGStyledElement):
752         * svg/SVGElementInstance.cpp:
753         (WebCore::SVGElementInstance::invalidateAllInstancesOfElement):
754         (WebCore::SVGElementInstance::InstanceUpdateBlocker::InstanceUpdateBlocker):
755         * svg/SVGLocatable.cpp:
756         (WebCore::SVGLocatable::computeCTM):
757         * svg/SVGStyledElement.cpp:
758         (WebCore::SVGStyledElement::updateRelativeLengthsInformation):
759         * svg/SVGStyledElement.h:
760         (WebCore::SVGStyledElement::isSVGStyledElement):
761         * svg/SVGUseElement.cpp:
762         (WebCore::SVGUseElement::selfHasRelativeLengths):
763         * svg/graphics/filters/SVGFEImage.cpp:
764         (WebCore::FEImage::platformApplySoftware):
765
766 2013-03-11  Tim Horton  <timothy_horton@apple.com>
767
768         PDFPlugin: Make scrolling between pages in non-continuous modes work
769         https://bugs.webkit.org/show_bug.cgi?id=111415
770         <rdar://problem/12555320>
771
772         Reviewed by Alexey Proskuryakov.
773
774         * WebCore.exp.in: Export ScrollableArea::scrollToOffsetWithoutAnimation.
775
776 2013-03-11  Mark Lam  <mark.lam@apple.com>
777
778         Remove the use of the quotaMap cache in DatabaseTracker.
779         https://bugs.webkit.org/show_bug.cgi?id=111805.
780
781         Reviewed by Geoffrey Garen.
782
783         This change is needed because using the quotaMap cache can result in
784         an inaccurate read (in a multi-process system) on what database files
785         are actually present on the filesystem. Instead of using the quotaMap
786         cache, we rely on the tracker database and query it every time we need
787         the origin/quota information.
788
789         No new tests.
790
791         * Modules/webdatabase/DatabaseTracker.cpp:
792         (WebCore::DatabaseTracker::hasAdequateQuotaForOrigin):
793         (WebCore::DatabaseTracker::hasEntryForOriginNoLock):
794         (WebCore::DatabaseTracker::origins):
795         (WebCore::DatabaseTracker::quotaForOriginNoLock):
796         (WebCore::DatabaseTracker::setQuota):
797         (WebCore::DatabaseTracker::addDatabase):
798         (WebCore::DatabaseTracker::deleteOrigin):
799         * Modules/webdatabase/DatabaseTracker.h:
800
801 2013-03-11  Morten Stenshorne  <mstensho@opera.com>
802
803         Don't rely on the fact that StaticPosition happens to be defined as 0
804         https://bugs.webkit.org/show_bug.cgi?id=110123
805
806         Also made the expression slightly less convoluted.
807
808         Reviewed by Alexey Proskuryakov.
809
810         No new tests. This is just code cleanup.
811
812         * rendering/RenderObject.cpp:
813         (WebCore::RenderObject::containingBlock):
814
815 2013-03-11  Adam Barth  <abarth@webkit.org>
816
817         Unreviewed attempt to fix build after http://trac.webkit.org/changeset/145421.
818
819         * html/HTMLPlugInImageElement.cpp:
820
821 2013-03-05  Ojan Vafai  <ojan@chromium.org>
822
823         Intrinsic width keyword values don't work for tables
824         https://bugs.webkit.org/show_bug.cgi?id=111515
825
826         Reviewed by Julien Chaffraix.
827
828         Tests: fast/css-intrinsic-dimensions/css-tables.html
829                fast/css-intrinsic-dimensions/tables.html
830
831         * rendering/RenderBox.cpp:
832         (WebCore::RenderBox::computeIntrinsicLogicalWidthUsing):
833         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
834         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
835         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
836         * rendering/RenderBox.h:
837         Pass in the border and padding as an argument since RenderTable needs
838         to pass in a different value. Unfortunately, the math doesn't work out right
839         in the positioned/replaced cases if we just pass 0. We need to pass in the correct
840         border and padding and then subtract it from the result.
841
842         * rendering/RenderTable.cpp:
843         (WebCore::RenderTable::updateLogicalWidth):
844         Compute intrinsic widths as well as specified ones. Down the road
845         we may want to consider having intrinsic width values return true for
846         isSpecified.
847
848         (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
849         Compute intrinsic widths as well.
850
851         (WebCore::RenderTable::computeIntrinsicLogicalWidths):
852         Implement this method so that the RenderBox::computeIntrinsicLogicalWidthUsing
853         gets the right intrinsic values instead of the preferred values.
854
855         (WebCore::RenderTable::computePreferredLogicalWidths):
856         * rendering/RenderTable.h:
857
858 2013-03-11  Stephen Chenney  <schenney@chromium.org>
859
860         HTMLInputElement can delete an ImageLoader while it's still needed
861         https://bugs.webkit.org/show_bug.cgi?id=110621
862
863         Reviewed by Darin Adler.
864
865         ImageLoader objects may fire events for HTMLInputElements that are of
866         type ImageInputType that own the loader. These events may cause script
867         to run that changes the type of the input element and hence causes the
868         ImageLoader to be deleted, while the image loader is still processing
869         the event dispatch. Bad things ensue.
870
871         This change moves ownership of the ImageLoader from the ImageInputType
872         onto the HTMLImageElement which is already protected from deletion during
873         event processing.
874
875         Test: fast/forms/image/image-error-event-modifies-type-crash.html
876
877         * html/HTMLInputElement.cpp:
878         (WebCore::HTMLInputElement::imageLoader): Method to return the
879           ImageLoader, creating it if not already created.
880         * html/HTMLInputElement.h:
881         (WebCore::HTMLInputElement::hasImageLoader): Return true if the
882           ImageLoader has been created.
883         (HTMLInputElement): Define ImageLoader access methods and the OwnPtr
884           for the HTMLImageLoader.
885         * html/ImageInputType.cpp:
886         (WebCore::ImageInputType::srcAttributeChanged): Use the element's ImageLoader.
887         (WebCore::ImageInputType::attach): Use the element's ImageLoader.
888         (WebCore::ImageInputType::willMoveToNewOwnerDocument): Use the element's ImageLoader.
889         (WebCore::ImageInputType::height): Use the element's ImageLoader.
890         (WebCore::ImageInputType::width): Use the element's ImageLoader.
891         * html/ImageInputType.h:
892         (ImageInputType): Remove the declaration of the ImageLoader.
893
894 2013-03-11  Alok Priyadarshi  <alokp@chromium.org>
895
896         Revert "Mark GraphicsLayers as opaque when possible"
897
898         This reverts commit 0a4d3c2d8a0373aa9e5bd9209885137a13a7f0e0.
899
900         REGRESSION (r143626): http://chainlove.com shows garbage tiles on Mac
901         https://bugs.webkit.org/show_bug.cgi?id=112043
902
903         Unreviewed, rolling out r143626.
904
905         * rendering/RenderBox.cpp:
906         * rendering/RenderBox.h:
907         (RenderBox):
908         * rendering/RenderBoxModelObject.h:
909         (RenderBoxModelObject):
910         * rendering/RenderLayer.cpp:
911         * rendering/RenderLayer.h:
912         (RenderLayer):
913         * rendering/RenderLayerBacking.cpp:
914         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
915         * rendering/RenderLayerModelObject.h:
916         (RenderLayerModelObject):
917
918 2013-03-11  Dean Jackson  <dino@apple.com>
919
920         Plugins created during user gestures (or soon after) should not be snapshotted
921         https://bugs.webkit.org/show_bug.cgi?id=111975
922
923         Reviewed by Tim Horton.
924
925         There are sites which create plugins in response to user actions, such as clicking
926         on an image that is acting like a poster frame. In those cases we should never snapshot.
927
928         There are some other sites which also create plugins in response to user actions,
929         but don't necessarily create the content themselves. Instead they run some script
930         that injects an iframe, and the frame loads a plugin. In order to make sure we don't
931         snapshot in those cases, we're adding the concept of a blessed plugin. Anything that
932         is created soon after a *handled* user gesture is not snapshotted. To do this we
933         mark a timestamp in the document when we've called an event listener for a user
934         gesture. The plugin element then compares its creation time with the most recent
935         user action time.
936
937         * dom/Document.cpp:
938         (WebCore::Document::Document): Initialise new timestamp.
939         (WebCore::Document::resetLastHandledUserGestureTimestamp): Sets the member variable
940             to the current time.
941         * dom/Document.h:
942         (WebCore::Document::lastHandledUserGestureTimestamp): Getter.
943
944         * dom/EventTarget.cpp:
945         (WebCore::EventTarget::fireEventListeners): If there were some event listeners and
946             we were processing a user gesture, then reset the timestamp in the document.
947
948         * html/HTMLPlugInImageElement.cpp:
949         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Remember if we were created
950             during a user gesture.
951         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Start the plugin
952             if we were created during a user gesture, or if we are close enough in time
953             to a listener that fired in relation to a user gesture.
954         * html/HTMLPlugInImageElement.h: New private member flag indicating if we were
955             in a user gesture when constructed.
956
957 2013-03-11  Jeffrey Pfau  <jpfau@apple.com>
958
959         List cache partitions as units instead of as their contents
960         https://bugs.webkit.org/show_bug.cgi?id=111909
961
962         Reviewed by Maciej Stachowiak.
963
964         Not possible to test with current automated test tools, must be tested manually.
965
966         * loader/cache/MemoryCache.cpp:
967         (WebCore::MemoryCache::getOriginsWithCache): List a cache item as a member of a partition, if possible
968
969 2013-03-11  Alexey Proskuryakov  <ap@apple.com>
970
971         Chromium build fix. Forked files strike again.
972
973         * platform/network/chromium/ResourceHandle.cpp:
974         (WebCore::ResourceHandle::firstRequest):
975
976 2013-03-11  James Robinson  <jamesr@chromium.org>
977
978         Fix typo from r145399. Rubber stamped by Abhishek Arya.
979
980         * rendering/svg/RenderSVGViewportContainer.h:
981         (WebCore::toRenderSVGViewportContainer):
982
983 2013-03-11  Hans Muller  <hmuller@adobe.com>
984
985         [CSS Exclusions] Refactor the ExclusionPolygon class to enable storing multiple boundaries
986         https://bugs.webkit.org/show_bug.cgi?id=111766
987
988         Reviewed by Dirk Schulze.
989
990         Refactored the ExclusionPolygon class to enable adding support for shape-margin and shape-padding.
991         Extracted a new FloatPolygon class which is now used by ExclusionPolygon to represent the shape's
992         boundary. It will be used to add m_paddedPolygon and m_marginPolygon members to ExclusionPolygon
993         in a subsequent patch.
994
995         No new tests. This is strictly a refactoring of the existing code.
996
997         * CMakeLists.txt:
998         * GNUmakefile.list.am:
999         * WebCore.gypi:
1000         * WebCore.vcproj/WebCore.vcproj:
1001         * WebCore.xcodeproj/project.pbxproj:
1002         * platform/graphics/FloatPolygon.cpp: Factored out of Source/WebCore/rendering/ExclusionPolygon.cpp.
1003         (WebCore::determinant):
1004         (WebCore::areCollinearPoints):
1005         (WebCore::areCoincidentPoints):
1006         (WebCore::isPointOnLineSegment):
1007         (WebCore::nextVertexIndex):
1008         (WebCore::FloatPolygon::FloatPolygon):
1009         (WebCore::FloatPolygon::findNextEdgeVertexIndex):
1010         (WebCore::FloatPolygon::overlappingEdges):
1011         (WebCore::leftSide):
1012         (WebCore::FloatPolygon::contains):
1013         (WebCore::VertexPair::overlapsRect):
1014         (WebCore::VertexPair::intersection):
1015         * platform/graphics/FloatPolygon.h: Factored out of Source/WebCore/rendering/ExclusionPolygon.h.
1016         (FloatPolygon):
1017         (WebCore::FloatPolygon::vertexAt):
1018         (WebCore::FloatPolygon::numberOfVertices):
1019         (WebCore::FloatPolygon::fillRule):
1020         (WebCore::FloatPolygon::edgeAt):
1021         (WebCore::FloatPolygon::numberOfEdges):
1022         (WebCore::FloatPolygon::boundingBox):
1023         (WebCore::FloatPolygon::isEmpty):
1024         (VertexPair):
1025         (WebCore::VertexPair::~VertexPair):
1026         (WebCore::VertexPair::minX):
1027         (WebCore::VertexPair::minY):
1028         (WebCore::VertexPair::maxX):
1029         (WebCore::VertexPair::maxY):
1030         (FloatPolygonEdge):
1031         (WebCore::FloatPolygonEdge::previousEdge):
1032         (WebCore::FloatPolygonEdge::nextEdge):
1033         (WebCore::FloatPolygonEdge::polygon):
1034         (WebCore::FloatPolygonEdge::vertexIndex1):
1035         (WebCore::FloatPolygonEdge::vertexIndex2):
1036         (WebCore::FloatPolygonEdge::edgeIndex):
1037         * rendering/ExclusionPolygon.cpp: Now depends on FloatPolygon.
1038         (EdgeIntersection):
1039         (WebCore::leftSide):
1040         (WebCore::computeXIntersection):
1041         (WebCore::getVertexIntersectionVertices):
1042         (WebCore::computeXIntersections):
1043         (WebCore::computeOverlappingEdgeXProjections):
1044         (WebCore::ExclusionPolygon::getExcludedIntervals):
1045         (WebCore::ExclusionPolygon::getIncludedIntervals):
1046         (WebCore::firstFitRectInPolygon):
1047         (WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop):
1048         * rendering/ExclusionPolygon.h: Now depends on FloatPolygon.
1049         (WebCore::OffsetPolygonEdge::OffsetPolygonEdge):
1050         (ExclusionPolygon):
1051         (WebCore::ExclusionPolygon::ExclusionPolygon):
1052
1053 2013-03-11  Alexey Proskuryakov  <ap@apple.com>
1054
1055         Roll out part of r144671.
1056
1057         ResourceHandle::firstRequest() should not be const(), because it returns a
1058         non-const reference.        
1059
1060         * platform/network/ResourceHandle.cpp:
1061         (WebCore::ResourceHandle::firstRequest):
1062         * platform/network/ResourceHandle.h:
1063
1064 2013-01-30  Jer Noble  <jer.noble@apple.com>
1065
1066         Mac: Cmd-w should close full screen window.
1067         https://bugs.webkit.org/show_bug.cgi?id=108406
1068
1069         Reviewed by Darin Adler.
1070
1071         Pass performClose: requests on to the owning window controller.
1072
1073         * platform/mac/WebCoreFullScreenWindow.mm:
1074         (-[WebCoreFullScreenWindow performClose:]):
1075
1076 2013-03-11  Xiyuan Xia  <xiyuan@chromium.org>
1077
1078         [Chromium] chromium/linux breaks expectation of select popup background due to bad UA css rules
1079         https://bugs.webkit.org/show_bug.cgi?id=111873
1080
1081         Reviewed by Tony Chang.
1082
1083         On linux the default <select> background color is too dark to use as the
1084         popup background color.  Last fixes:
1085         https://bugs.webkit.org/show_bug.cgi?id=54115 and
1086         https://bugs.webkit.org/show_bug.cgi?id=56023
1087         attempt to fix the problem by applying a lighter background using
1088         special <option> selector. This breaks expectations of some websites.
1089
1090         This CL reverts the bad UA css rules above and provides the lighter
1091         background color if <select> and <option> elements are using the default
1092         background.
1093
1094         No new tests, this tests <select> popups and can be verified by ManualTests/select-scroll.html.
1095
1096         * css/themeChromiumLinux.css:
1097         (select):
1098         * platform/PopupMenuStyle.h:
1099         (WebCore::PopupMenuStyle::PopupMenuStyle):
1100         (WebCore::PopupMenuStyle::backgroundColorType):
1101         (PopupMenuStyle):
1102         * platform/chromium/PopupListBox.cpp:
1103         (WebCore::PopupListBox::paintRow):
1104         * rendering/RenderMenuList.cpp:
1105         (WebCore::RenderMenuList::itemStyle):
1106         (WebCore::RenderMenuList::getItemBackgroundColor):
1107         * rendering/RenderMenuList.h:
1108         (RenderMenuList):
1109         * rendering/RenderSearchField.cpp:
1110         (WebCore::RenderSearchField::menuStyle):
1111         * rendering/RenderThemeChromiumDefault.cpp:
1112         (WebCore::RenderThemeChromiumDefault::systemColor):
1113
1114 2013-03-11  James Robinson  <jamesr@chromium.org>
1115
1116         Compile fix. Rubber-stamp by Eric Seidel.
1117
1118         * html/shadow/MediaControlElements.cpp:
1119         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
1120
1121 2013-03-11  Dima Gorbik  <dgorbik@apple.com>
1122
1123         Fix build for r145397 (part 2)
1124
1125         Unreviewed.
1126
1127         * html/track/TextTrackCue.cpp:
1128         (WebCore::TextTrackCue::getDisplayTree):
1129
1130 2013-03-11  Dima Gorbik  <dgorbik@apple.com>
1131
1132         Fix build for r145397
1133
1134         Unreviewed.
1135
1136         * html/shadow/MediaControls.cpp:
1137         (WebCore::MediaControls::createTextTrackDisplay):
1138         * html/shadow/MediaControlsChromium.cpp:
1139         (WebCore::MediaControlsChromium::createTextTrackDisplay):
1140         * html/shadow/MediaControlsGtk.cpp:
1141         (WebCore::MediaControlsGtk::createTextTrackDisplay):
1142
1143 2013-03-11  Abhishek Arya  <inferno@chromium.org>
1144
1145         Add ASSERT_WITH_SECURITY_IMPLICATION to catch bad casts.
1146         https://bugs.webkit.org/show_bug.cgi?id=112060
1147
1148         Reviewed by Eric Seidel.
1149
1150         * Modules/geolocation/Geolocation.cpp:
1151         (WebCore::Geolocation::document):
1152         * accessibility/AccessibilityMenuList.h:
1153         (WebCore::toAccessibilityMenuList):
1154         * accessibility/AccessibilityNodeObject.h:
1155         (WebCore::toAccessibilityNodeObject):
1156         * accessibility/AccessibilityRenderObject.h:
1157         (WebCore::toAccessibilityRenderObject):
1158         * accessibility/AccessibilitySVGRoot.h:
1159         (WebCore::toAccessibilitySVGRoot):
1160         * accessibility/AccessibilitySpinButton.h:
1161         (WebCore::toAccessibilitySpinButton):
1162         (WebCore::toAccessibilitySpinButtonPart):
1163         * accessibility/AccessibilityTable.h:
1164         (WebCore::toAccessibilityTable):
1165         * css/StyleRule.h:
1166         (WebCore::toStyleRuleMedia):
1167         (WebCore::toStyleRuleSupports):
1168         (WebCore::toStyleRuleRegion):
1169         * dom/EventContext.h:
1170         (WebCore::toTouchEventContext):
1171         * fileapi/File.h:
1172         (WebCore::toFile):
1173         * html/HTMLElement.cpp:
1174         (WebCore::HTMLElement::insertAdjacentElement):
1175         (WebCore::contextElementForInsertion):
1176         * html/HTMLMediaElement.h:
1177         (WebCore::toMediaElement):
1178         * html/HTMLMeterElement.h:
1179         (WebCore::toHTMLMeterElement):
1180         * html/HTMLOptionElement.cpp:
1181         (WebCore::toHTMLOptionElement):
1182         * html/HTMLProgressElement.cpp:
1183         (WebCore::HTMLProgressElement::renderProgress):
1184         * html/HTMLProgressElement.h:
1185         (WebCore::toHTMLProgressElement):
1186         * html/HTMLSelectElement.h:
1187         (WebCore::toHTMLSelectElement):
1188         * html/HTMLTableCellElement.cpp:
1189         (WebCore::toHTMLTableCellElement):
1190         * html/HTMLTextFormControlElement.h:
1191         (WebCore::toHTMLTextFormControlElement):
1192         * html/PluginDocument.h:
1193         (WebCore::toPluginDocument):
1194         * html/shadow/DetailsMarkerControl.cpp:
1195         (WebCore::DetailsMarkerControl::summaryElement):
1196         * html/shadow/HTMLContentElement.h:
1197         (WebCore::toHTMLContentElement):
1198         * html/shadow/HTMLShadowElement.h:
1199         (WebCore::toHTMLShadowElement):
1200         * html/shadow/TextFieldDecorationElement.cpp:
1201         (WebCore::TextFieldDecorationElement::hostInput):
1202         * page/DOMWindow.cpp:
1203         (WebCore::DOMWindow::document):
1204         * rendering/InlineTextBox.h:
1205         (WebCore::toInlineTextBox):
1206         * rendering/RenderHTMLCanvas.h:
1207         (WebCore::toRenderHTMLCanvas):
1208         * rendering/RenderScrollbar.h:
1209         (WebCore::toRenderScrollbar):
1210         * rendering/RenderTextFragment.h:
1211         (WebCore::toRenderTextFragment):
1212         * rendering/mathml/RenderMathMLOperator.h:
1213         (WebCore::toRenderMathMLOperator):
1214         * rendering/svg/RenderSVGTextPath.h:
1215         (WebCore::toRenderSVGTextPath):
1216         * rendering/svg/RenderSVGViewportContainer.h:
1217         (WebCore::toRenderSVGViewportContainer):
1218         * svg/graphics/SVGImageChromeClient.h:
1219         (WebCore::toSVGImageChromeClient):
1220
1221 2013-03-11  Adam Barth  <abarth@webkit.org>
1222
1223         Factor HTMLTreeBuilderSimulator out of BackgroundHTMLParser
1224         https://bugs.webkit.org/show_bug.cgi?id=112057
1225
1226         Reviewed by Eric Seidel.
1227
1228         Simulating the HTML tree builder is a separate concern from parsing on
1229         the background thread. We plan to re-use the tree builder simulator for
1230         the view-source parser, for example. Also, having the simulator as a
1231         separate object will make it easier to fix
1232         https://bugs.webkit.org/show_bug.cgi?id=109764.
1233
1234         * CMakeLists.txt:
1235         * GNUmakefile.list.am:
1236         * Target.pri:
1237         * WebCore.gypi:
1238         * WebCore.vcproj/WebCore.vcproj:
1239         * html/parser/BackgroundHTMLParser.cpp:
1240         (WebCore):
1241         (WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
1242         (WebCore::BackgroundHTMLParser::pumpTokenizer):
1243         * html/parser/BackgroundHTMLParser.h:
1244         (BackgroundHTMLParser):
1245
1246 2013-02-26  Dima Gorbik  <dgorbik@apple.com>
1247
1248         Not all properties apply to the '::cue' pseudo-element
1249         https://bugs.webkit.org/show_bug.cgi?id=110705
1250
1251         Reviewed by Eric Carlson.
1252
1253         Background properties are not inherited and they were not applied to right elements.
1254         Now we apply all ::cue properties to WebVTT cue background box, which -webkit-media-text-track-all-nodes
1255         container was corresponding to. Now it has 'cue' pseudoId instead of '-webkit-media-text-track-all-nodes'.
1256         Property filtering is turned off for user agent rules so that we are still able to apply filtered rules
1257         to this container internally. m_cueContainer is removed because it is no longer needed.
1258         m_allDocumentNodes container was renamed to m_cueBackgroundBox.
1259
1260         Existing tests modified to cover this case.
1261
1262         * css/RuleSet.h:
1263         (WebCore::RuleData::propertyWhitelistType): disable filtering for UA rules.
1264         * css/StyleResolver.cpp:
1265         (WebCore::StyleResolver::sortAndTransferMatchedRules): pass the UA scope to propertyWhitelistType().
1266         * css/mediaControls.css: rename -webkit-media-text-track-all-nodes to 'cue'
1267         (video::cue): 
1268         * html/shadow/MediaControlElements.cpp:
1269         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
1270         * html/shadow/MediaControlElements.h:
1271         (MediaControlTextTrackContainerElement):
1272         * html/shadow/MediaControls.cpp:
1273         (WebCore::MediaControls::createTextTrackDisplay):
1274         * html/shadow/MediaControlsChromium.cpp:
1275         (WebCore::MediaControlsChromium::createTextTrackDisplay):
1276         * html/shadow/MediaControlsGtk.cpp:
1277         (WebCore::MediaControlsGtk::createTextTrackDisplay):
1278         * html/track/TextTrackCue.cpp:
1279         (WebCore::TextTrackCue::TextTrackCue):
1280         (WebCore::TextTrackCue::updateDisplayTree):
1281         (WebCore::TextTrackCue::getDisplayTree):
1282         * html/track/TextTrackCue.h:
1283         (WebCore::TextTrackCue::element):
1284         * page/CaptionUserPreferencesMac.mm:
1285         (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride):
1286
1287 2013-03-11  Tim Horton  <timothy_horton@apple.com>
1288
1289         ChromeClient.h doesn’t need to include RenderSnapshottedPlugIn
1290         https://bugs.webkit.org/show_bug.cgi?id=111981
1291
1292         Reviewed by Kentaro Hara.
1293
1294         * page/ChromeClient.h: Remove the extraneous #include.
1295
1296 2013-03-11  David Hyatt  <hyatt@apple.com>
1297
1298         Vertical writing doesn't work with form controls.
1299         https://bugs.webkit.org/show_bug.cgi?id=70211
1300
1301         Reviewed by Simon Fraser.
1302
1303         This is just some basic plumbing work to make textfields and
1304         textareas work with vertical writing modes. This patch leaves the
1305         html.css override alone, so authors can't enable vertical
1306         writing yet.
1307         
1308         The changes consist of converting uses of x/y/width/height to
1309         logicalLeft/Top/Width/Height.
1310       
1311         * rendering/RenderBoxModelObject.h:
1312         (WebCore::RenderBoxModelObject::paddingLogicalLeft):
1313         (WebCore::RenderBoxModelObject::paddingLogicalRight):
1314         (RenderBoxModelObject):
1315         (WebCore::RenderBoxModelObject::marginLogicalHeight):
1316         (WebCore::RenderBoxModelObject::marginLogicalWidth):
1317         * rendering/RenderSearchField.cpp:
1318         (WebCore::RenderSearchField::computeControlLogicalHeight):
1319         (WebCore::RenderSearchField::computeLogicalHeightLimit):
1320         (WebCore::RenderSearchField::centerContainerIfNeeded):
1321         * rendering/RenderSearchField.h:
1322         (RenderSearchField):
1323         * rendering/RenderTextControl.cpp:
1324         (WebCore::RenderTextControl::textBlockLogicalHeight):
1325         (WebCore::RenderTextControl::textBlockLogicalWidth):
1326         (WebCore::RenderTextControl::computeLogicalHeight):
1327         (WebCore::RenderTextControl::computeIntrinsicLogicalWidths):
1328         (WebCore::RenderTextControl::computePreferredLogicalWidths):
1329         * rendering/RenderTextControl.h:
1330         (RenderTextControl):
1331         * rendering/RenderTextControlMultiLine.cpp:
1332         (WebCore::RenderTextControlMultiLine::preferredContentLogicalWidth):
1333         (WebCore::RenderTextControlMultiLine::computeControlLogicalHeight):
1334         (WebCore::RenderTextControlMultiLine::layoutSpecialExcludedChild):
1335         * rendering/RenderTextControlMultiLine.h:
1336         (RenderTextControlMultiLine):
1337         * rendering/RenderTextControlSingleLine.cpp:
1338         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
1339         (WebCore::RenderTextControlSingleLine::paint):
1340         (WebCore::RenderTextControlSingleLine::computeLogicalHeightLimit):
1341         (WebCore::RenderTextControlSingleLine::layout):
1342         (WebCore::RenderTextControlSingleLine::styleDidChange):
1343         (WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth):
1344         (WebCore::RenderTextControlSingleLine::computeControlLogicalHeight):
1345         (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
1346         * rendering/RenderTextControlSingleLine.h:
1347         (RenderTextControlSingleLine):
1348         * rendering/style/RenderStyle.h:
1349
1350 2013-03-11  Tim Horton  <timothy_horton@apple.com>
1351
1352         TiledBacking scrolling coverage can be unfairly limited for clients who do scrolling outside the web view
1353         https://bugs.webkit.org/show_bug.cgi?id=111958
1354         <rdar://problem/13356896>
1355
1356         Reviewed by Darin Adler.
1357
1358         Don't limit TiledBacking coverage if the client has opted into using
1359         its exposed rect to allow scrolling above the web view.
1360
1361         * platform/graphics/TiledBacking.h:
1362         * platform/graphics/ca/mac/TileController.h:
1363         * rendering/RenderLayerBacking.cpp:
1364         (WebCore::RenderLayerBacking::adjustTiledBackingCoverage):
1365
1366 2013-03-11  Rajeev Sarvaria  <rsarvaria@blackberry.com>
1367
1368         GetnUniform*vEXT (Robustness extension) passed incorrect parameter in WebGLRenderingContext
1369         https://bugs.webkit.org/show_bug.cgi?id=111450
1370
1371         Reviewed by Rob Buis.
1372
1373         Bufsize argument corrected to size in bytes instead of number of integers or floats.
1374
1375         * html/canvas/WebGLRenderingContext.cpp:
1376         (WebCore):
1377         (WebCore::WebGLRenderingContext::getUniform):
1378
1379 2013-03-11  Sheriff Bot  <webkit.review.bot@gmail.com>
1380
1381         Unreviewed, rolling out r145375.
1382         http://trac.webkit.org/changeset/145375
1383         https://bugs.webkit.org/show_bug.cgi?id=112050
1384
1385         Does not compile (Requested by jamesr on #webkit).
1386
1387         * Modules/indexeddb/IDBBackingStore.cpp:
1388         (WebCore::IDBBackingStore::getObjectStores):
1389         (WebCore::IDBBackingStore::createObjectStore):
1390         (WebCore::IDBBackingStore::deleteObjectStore):
1391         (WebCore::IDBBackingStore::getRecord):
1392         (WebCore::IDBBackingStore::putRecord):
1393         (WebCore::IDBBackingStore::clearObjectStore):
1394         (WebCore::IDBBackingStore::deleteRecord):
1395         (WebCore::IDBBackingStore::getKeyGeneratorCurrentNumber):
1396         (WebCore::IDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber):
1397         (WebCore::IDBBackingStore::keyExistsInObjectStore):
1398         (WebCore::IDBBackingStore::getIndexes):
1399         (WebCore::IDBBackingStore::createIndex):
1400         (WebCore::IDBBackingStore::deleteIndex):
1401         (WebCore::IDBBackingStore::putIndexDataForRecord):
1402         (WebCore::IDBBackingStore::findKeyInIndex):
1403         (WebCore::IDBBackingStore::getPrimaryKeyViaIndex):
1404         (WebCore::IDBBackingStore::keyExistsInIndex):
1405         (WebCore::indexCursorOptions):
1406         * Modules/indexeddb/IDBBackingStore.h:
1407         (IDBBackingStore):
1408         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1409         (WebCore::DeleteIndexOperation::create):
1410         (WebCore::DeleteIndexOperation::DeleteIndexOperation):
1411         (DeleteIndexOperation):
1412         (WebCore::IDBDatabaseBackendImpl::openInternal):
1413         (WebCore::IDBDatabaseBackendImpl::deleteIndex):
1414         (WebCore::DeleteIndexOperation::perform):
1415         (WebCore::DeleteRangeOperation::perform):
1416         (WebCore::ClearOperation::perform):
1417         * Modules/indexeddb/IDBLevelDBCoding.cpp:
1418         (WebCore::IDBLevelDBCoding::KeyPrefix::KeyPrefix):
1419         (WebCore::IDBLevelDBCoding::KeyPrefix::encode):
1420         (WebCore::IDBLevelDBCoding::SchemaVersionKey::encode):
1421         (WebCore::IDBLevelDBCoding::MaxDatabaseIdKey::encode):
1422         (WebCore::IDBLevelDBCoding::DataVersionKey::encode):
1423         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::encode):
1424         (WebCore::IDBLevelDBCoding::DatabaseNameKey::encode):
1425         (WebCore::IDBLevelDBCoding::DatabaseMetaDataKey::encode):
1426         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encode):
1427         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::encode):
1428         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::encode):
1429         (WebCore::IDBLevelDBCoding::IndexFreeListKey::encode):
1430         (WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::encode):
1431         (WebCore::IDBLevelDBCoding::IndexNamesKey::encode):
1432         (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::encode):
1433         (WebCore::IDBLevelDBCoding::ExistsEntryKey::encode):
1434         * Modules/indexeddb/IDBLevelDBCoding.h:
1435         (IDBLevelDBCoding):
1436         (KeyPrefix):
1437         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
1438         (WebCore::IDBObjectStoreBackendImpl::IndexWriter::writeIndexKeys):
1439
1440 2013-03-11  Adam Klein  <adamk@chromium.org>
1441
1442         MutationCallback should be a WebIDL 'callback', not a [Callback] interface
1443         https://bugs.webkit.org/show_bug.cgi?id=91406
1444
1445         Reviewed by Adam Barth.
1446
1447         Spec: http://dom.spec.whatwg.org/#mutationcallback
1448
1449         Besides no longer calling handleEvent methods on passed-in objects,
1450         throw a TypeError if a non-function is passed to the MutationObserver constructor.
1451         This is per WebIDL: http://www.w3.org/TR/WebIDL/#es-callback-function
1452
1453         Updated MutationObserver constructor tests to exercise TypeError-throwing behavior.
1454
1455         * bindings/js/JSMutationCallback.cpp:
1456         (WebCore::JSMutationCallback::call): Call the callback directly instead of handing off to JSCallbackData; make return value void.
1457         Use jsArray() to convert from WTF::Vector -> JSArray.
1458         * bindings/js/JSMutationCallback.h:
1459         (JSMutationCallback): Rename handleEvent() to call(), make it void.
1460         * bindings/js/JSMutationObserverCustom.cpp:
1461         (WebCore::JSMutationObserverConstructor::constructJSMutationObserver): Throw if passed a non-function.
1462         * bindings/v8/V8MutationCallback.cpp:
1463         (WebCore::V8MutationCallback::V8MutationCallback): Take a v8::Function instead of a v8::Object.
1464         (WebCore::V8MutationCallback::call): Call the callback directly instead of handing off to invokeCallback(); make return value void.
1465         Use v8Array() to convert form WTF::Vector -> JSArray.
1466         * bindings/v8/V8MutationCallback.h:
1467         (WebCore::V8MutationCallback::create): Take a v8::Function instead of a v8::Object.
1468         (V8MutationCallback): ditto
1469         * bindings/v8/custom/V8MutationObserverCustom.cpp:
1470         (WebCore::V8MutationObserver::constructorCustom): Throw if passed a non-function, cast to a v8::Function when constructing callback.
1471         * dom/MutationCallback.h:
1472         (WebCore): Remove unnecessary typedef.
1473         (MutationCallback): Rename handleEvent() to call(), make it void.
1474         * dom/MutationObserver.cpp:
1475         (WebCore::MutationObserver::deliver): Update MutationCallback method name.
1476
1477 2013-03-11  Julien Chaffraix  <jchaffraix@webkit.org>
1478
1479         [CSS Grid Layout] Handle spanning grid items over specified grid tracks
1480         https://bugs.webkit.org/show_bug.cgi?id=111918
1481
1482         Reviewed by Tony Chang.
1483
1484         This change updates the containing block override logic to handle multiple
1485         spanned tracks. This makes the multiple specified grid tracks case work and
1486         will enable us to handle the minmax case once the computation logic has been
1487         updated.
1488
1489         Test: fast/css-grid-layout/grid-item-spanning-resolution.html
1490
1491         * rendering/RenderGrid.cpp:
1492         (WebCore::RenderGrid::logicalContentHeightForChild):
1493         (WebCore::RenderGrid::layoutGridItems):
1494         Updated these functions to use gridAreaBreadthForChild.
1495
1496         (WebCore::RenderGrid::gridAreaBreadthForChild):
1497         Added this helper function to handle multiple spanned grid tracks.
1498
1499         * rendering/RenderGrid.h: Added the previous function.
1500
1501 2013-03-11  Philip Rogers  <pdr@google.com>
1502
1503         Replace SVG's static_cast<SVGElement> with toSVGElement()
1504         https://bugs.webkit.org/show_bug.cgi?id=111651
1505
1506         Reviewed by Abhishek Arya.
1507
1508         toSVGElement is preferred over static_cast because bad casts can be caught on
1509         our testing infrastructure. This patch replaces all static_cast<SVGElement>
1510         instances with toSVGElement.
1511
1512         No new tests as this is just a refactoring.
1513
1514         * css/CSSCursorImageValue.cpp:
1515         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
1516         * css/StyleResolver.cpp:
1517         (WebCore::StyleResolver::matchAllRules):
1518         (WebCore::StyleResolver::locateCousinList):
1519         (WebCore::StyleResolver::canShareStyleWithElement):
1520         (WebCore::StyleResolver::locateSharedStyle):
1521         * dom/Element.cpp:
1522         (WebCore::Element::synchronizeAllAttributes):
1523         (WebCore::Element::synchronizeAttribute):
1524         * rendering/svg/RenderSVGModelObject.cpp:
1525         (WebCore::getElementCTM):
1526         (WebCore::RenderSVGModelObject::checkIntersection):
1527         (WebCore::RenderSVGModelObject::checkEnclosure):
1528         * rendering/svg/RenderSVGResource.cpp:
1529         (WebCore::removeFromCacheAndInvalidateDependencies):
1530         * rendering/svg/RenderSVGResourceClipper.cpp:
1531         (WebCore::RenderSVGResourceClipper::pathOnlyClipping):
1532         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
1533         (WebCore::RenderSVGResourceClipper::calculateClipContentRepaintRect):
1534         (WebCore::RenderSVGResourceClipper::hitTestClipContent):
1535         * rendering/svg/RenderSVGResourceFilter.cpp:
1536         (WebCore::RenderSVGResourceFilter::buildPrimitives):
1537         * rendering/svg/RenderSVGResourceMasker.cpp:
1538         (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
1539         (WebCore::RenderSVGResourceMasker::calculateMaskContentRepaintRect):
1540         * rendering/svg/RenderSVGResourcePattern.cpp:
1541         (WebCore::RenderSVGResourcePattern::createTileImage):
1542         * rendering/svg/RenderSVGShape.cpp:
1543         (WebCore::RenderSVGShape::strokeWidth):
1544         * rendering/svg/RenderSVGText.cpp:
1545         (WebCore::RenderSVGText::strokeBoundingBox):
1546         * rendering/svg/SVGRenderSupport.cpp:
1547         (WebCore::SVGRenderSupport::layoutChildren):
1548         (WebCore::SVGRenderSupport::applyStrokeStyleToContext):
1549         * rendering/svg/SVGRenderTreeAsText.cpp:
1550         (WebCore::writeSVGPaintingResource):
1551         (WebCore::writeStyle):
1552         (WebCore::operator<<):
1553         * rendering/svg/SVGResources.cpp:
1554         (WebCore::SVGResources::buildCachedResources):
1555         * rendering/svg/SVGTextLayoutEngine.cpp:
1556         (WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath):
1557         * svg/SVGAElement.cpp:
1558         (WebCore::SVGAElement::createRenderer):
1559         * svg/SVGAnimationElement.cpp:
1560         (WebCore::SVGAnimationElement::adjustForInheritance):
1561         * svg/SVGElement.cpp:
1562         (WebCore::SVGElement::viewportElement):
1563         (WebCore::SVGElement::haveLoadedRequiredResources):
1564         (WebCore::SVGElement::sendSVGLoadEventIfPossible):
1565         (WebCore::SVGElement::childShouldCreateRenderer):
1566         * svg/SVGElement.h:
1567         (WebCore::toSVGElement):
1568         (WebCore):
1569         * svg/SVGFEImageElement.cpp:
1570         (WebCore::SVGFEImageElement::buildPendingResource):
1571         * svg/SVGFilterElement.cpp:
1572         (WebCore::SVGFilterElement::childShouldCreateRenderer):
1573         * svg/SVGGradientElement.cpp:
1574         (WebCore::SVGGradientElement::buildStops):
1575         * svg/SVGLocatable.cpp:
1576         (WebCore::SVGLocatable::nearestViewportElement):
1577         (WebCore::SVGLocatable::farthestViewportElement):
1578         (WebCore::SVGLocatable::computeCTM):
1579         * svg/SVGMPathElement.cpp:
1580         (WebCore::SVGMPathElement::buildPendingResource):
1581         * svg/SVGSVGElement.cpp:
1582         (WebCore::SVGSVGElement::collectIntersectionOrEnclosureList):
1583         * svg/SVGStyledElement.cpp:
1584         (WebCore::SVGStyledElement::updateRelativeLengthsInformation):
1585         * svg/SVGSwitchElement.cpp:
1586         (WebCore::SVGSwitchElement::childShouldCreateRenderer):
1587         * svg/SVGTextPathElement.cpp:
1588         (WebCore::SVGTextPathElement::buildPendingResource):
1589         * svg/SVGUseElement.cpp:
1590         (WebCore::SVGUseElement::buildPendingResource):
1591         (WebCore::SVGUseElement::toClipPath):
1592         (WebCore::SVGUseElement::rendererClipChild):
1593         (WebCore::SVGUseElement::buildInstanceTree):
1594         (WebCore::SVGUseElement::hasCycleUseReferencing):
1595         (WebCore::SVGUseElement::expandUseElementsInShadowTree):
1596         (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements):
1597         * svg/SVGViewSpec.cpp:
1598         (WebCore::SVGViewSpec::viewTarget):
1599         * svg/animation/SVGSMILElement.cpp:
1600         (WebCore::SVGSMILElement::buildPendingResource):
1601         * svg/graphics/filters/SVGFEImage.cpp:
1602         (WebCore::FEImage::platformApplySoftware):
1603
1604 2013-03-11  Carlos Garcia Campos  <cgarcia@igalia.com>
1605
1606         [SOUP] ResourceRequest::updateSoupMessage doesn't update the URI of the soup message
1607         https://bugs.webkit.org/show_bug.cgi?id=112040
1608
1609         Reviewed by Gustavo Noronha Silva.
1610
1611         * platform/network/soup/ResourceRequestSoup.cpp:
1612         (WebCore::ResourceRequest::updateSoupMessage): Update the soup
1613         message URI with the ResourceRequest URL.
1614
1615 2013-03-11  Alec Flett  <alecflett@chromium.org>
1616
1617         IndexedDB: Protect against key prefix overflows
1618         https://bugs.webkit.org/show_bug.cgi?id=111138
1619
1620         Reviewed by Tony Chang.
1621
1622         This reworks the boundary checking for all databaseId,
1623         objectStoreId, and indexId, including negative and
1624         zero-based ids. All entrypoints into IDBLevelDBCoding
1625         are protected with explicit checks and all internal
1626         uses of KeyPrefix are protected with ASSERTs in the
1627         various constructors.
1628
1629         Tests: WebKit unit tests IDBBackingStoreTest.cpp in WebKit/chromium
1630
1631         * Modules/indexeddb/IDBBackingStore.h: Make all public methods boolean-based for errors.
1632         * Modules/indexeddb/IDBLevelDBCoding.h: Add methods for checking databaseId, objectStoreId, and indexId.
1633
1634 2013-03-11  Xan Lopez  <xlopez@igalia.com>
1635
1636         [BlackBerry] PlatformBlackBerry.cmake: create thin AR archives
1637         https://bugs.webkit.org/show_bug.cgi?id=110580
1638
1639         Reviewed by Rob Buis.
1640
1641         Otherwise libwebcore.a goes beyond the 4Gb file size limit and the
1642         link phase fails.
1643
1644         * PlatformBlackBerry.cmake:
1645
1646 2013-03-11  Pavel Feldman  <pfeldman@chromium.org>
1647
1648         Web Inspector: fix styles toolbar in the vertical mode.
1649         Not reviewed: swapped two lines.
1650
1651         * inspector/front-end/ElementsPanel.js:
1652         (WebInspector.ElementsPanel.prototype._splitVertically):
1653
1654 2013-03-11  Andrey Lushnikov  <lushnikov@chromium.org>
1655
1656         Web Inspector: [CodeMirror] add token highlight feature
1657         https://bugs.webkit.org/show_bug.cgi?id=112009
1658
1659         Reviewed by Pavel Feldman.
1660
1661         Handle CodeMirror's "cursorActivity" event, check selection for being
1662         a word and highlight all its occurrences via CodeMirror.addOverlay method.
1663
1664         No new tests.
1665
1666         * inspector/front-end/CodeMirrorTextEditor.js:
1667         (WebInspector.CodeMirrorTextEditor):
1668         (WebInspector.CodeMirrorTextEditor.TokenHighlighter):
1669         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._cursorChange):
1670         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._isWord):
1671         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._removeHighlight):
1672         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._addHighlight.nextToken):
1673         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._addHighlight):
1674         * inspector/front-end/cm/cmdevtools.css:
1675         (.cm-token-highlight):
1676
1677 2013-03-11  Andrey Lushnikov  <lushnikov@chromium.org>
1678
1679         Web Inspector: [CodeMirror] set indentation size according to devtools settings
1680         https://bugs.webkit.org/show_bug.cgi?id=111717
1681
1682         Reviewed by Pavel Feldman.
1683
1684         Set up codemirror indent size according to devtools settings.
1685
1686         No new tests.
1687
1688         * inspector/front-end/CodeMirrorTextEditor.js:
1689         (.get if):
1690         (WebInspector.CodeMirrorTextEditor):
1691
1692 2013-03-11  Yury Semikhatsky  <yurys@chromium.org>
1693
1694         Web Inspector: add per image statistics to the native memory snapshot
1695         https://bugs.webkit.org/show_bug.cgi?id=112011
1696
1697         Reviewed by Pavel Feldman.
1698
1699         Added per-image statistics to the native memory distribution table.
1700
1701         * inspector/front-end/HeapSnapshotProxy.js:
1702         (WebInspector.HeapSnapshotWorker):
1703         (WebInspector.HeapSnapshotWorker.prototype.createLoader):
1704         (WebInspector.HeapSnapshotWorker.prototype.wrapCallback):
1705         (WebInspector.HeapSnapshotWorker.prototype.callFactoryMethod):
1706         (WebInspector.HeapSnapshotProxyObject.prototype.callFactoryMethod): the method now accepts
1707         proxy constructor function instead of its name. This eliminates unnecessary function lookup.
1708         (WebInspector.HeapSnapshotLoaderProxy):
1709         (WebInspector.HeapSnapshotLoaderProxy.prototype.close):
1710         (WebInspector.HeapSnapshotProxy.prototype.createEdgesProvider):
1711         (WebInspector.HeapSnapshotProxy.prototype.createRetainingEdgesProvider):
1712         (WebInspector.HeapSnapshotProxy.prototype.createAddedNodesProvider):
1713         (WebInspector.HeapSnapshotProxy.prototype.createDeletedNodesProvider):
1714         (WebInspector.HeapSnapshotProxy.prototype.createNodesProvider):
1715         (WebInspector.HeapSnapshotProxy.prototype.createNodesProviderForClass):
1716         (WebInspector.HeapSnapshotProxy.prototype.createNodesProviderForDominator):
1717         (WebInspector.NativeHeapSnapshotProxy):
1718         (WebInspector.NativeHeapSnapshotProxy.prototype.images):
1719         * inspector/front-end/HeapSnapshotView.js:
1720         (WebInspector.HeapProfileHeader.prototype.snapshotProxyConstructor):
1721         (WebInspector.HeapProfileHeader.prototype._setupWorker):
1722         * inspector/front-end/NativeHeapSnapshot.js:
1723         (WebInspector.NativeHeapSnapshot.prototype.images):
1724         * inspector/front-end/NativeMemorySnapshotView.js:
1725         (WebInspector.NativeSnapshotNode):
1726         (WebInspector.NativeSnapshotNode.prototype._createSizeCell):
1727         (WebInspector.NativeSnapshotNode.prototype._populate):
1728         (WebInspector.NativeSnapshotNode.prototype._addChildrenFromGraph):
1729         (WebInspector.NativeSnapshotNode.prototype._addImageDetails.didLoad.didReceiveImages):
1730         (WebInspector.NativeSnapshotNode.prototype._addImageDetails):
1731         (WebInspector.NativeSnapshotProfileHeader.prototype.snapshotProxyConstructor):
1732
1733 2013-03-11  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1734
1735         [Qt] Enable tiled shadow blur for inset box shadows
1736         https://bugs.webkit.org/show_bug.cgi?id=111736
1737
1738         Reviewed by Noam Rosenthal.
1739
1740         Paint inset box-shadows using the optimized tiled shadow blur, instead of
1741         applying shadow blur to the entire painted rect.
1742
1743         This optimizes the default CSS on common pastebin sites.
1744
1745         Tested by existing tests.
1746
1747         * platform/graphics/GraphicsContext.cpp:
1748         * platform/graphics/ShadowBlur.cpp:
1749         (WebCore::ShadowBlur::drawInsetShadowWithTiling):
1750             Must set fill color before calling clearShadow, as that might clear m_color.
1751         (WebCore::ShadowBlur::drawLayerPieces):
1752             Ditto.
1753         * platform/graphics/qt/GraphicsContextQt.cpp:
1754         (WebCore::GraphicsContext::fillPath):
1755         (WebCore::GraphicsContext::fillRectWithRoundedHole):
1756
1757 2013-03-11  Alberto Garcia  <agarcia@igalia.com>
1758
1759         [BlackBerry] GraphicsLayer: rename notifySyncRequired to notifyFlushRequired
1760         https://bugs.webkit.org/show_bug.cgi?id=111997
1761
1762         Reviewed by Rob Buis.
1763
1764         This changed in r130439 but the old name was introduced again by
1765         mistake in r144465.
1766
1767         * platform/graphics/blackberry/GraphicsLayerBlackBerry.h:
1768         (WebCore::GraphicsLayerBlackBerry::notifyFlushRequired):
1769         * platform/graphics/blackberry/LayerWebKitThread.cpp:
1770         (WebCore::LayerWebKitThread::setNeedsCommit):
1771
1772 2013-03-11  Kent Tamura  <tkent@chromium.org>
1773
1774         Inappropriate validation message for required number/date input elements
1775         https://bugs.webkit.org/show_bug.cgi?id=111982
1776
1777         Reviewed by Kentaro Hara.
1778
1779         For validation message, badInput messages should take precedence
1780         over valueMissing messages because users already filled out the
1781         field with a bad value.
1782
1783         Tests: Update fast/forms/validationMessage.html
1784
1785         * html/InputType.cpp:
1786         (WebCore::InputType::validationMessage):
1787         Check badInput first.
1788
1789 2013-03-11  Yury Semikhatsky  <yurys@chromium.org>
1790
1791         Web Inspector: extract common parts of native profiles
1792         https://bugs.webkit.org/show_bug.cgi?id=111965
1793
1794         Reviewed by Alexander Pavlov.
1795
1796         Extracted common parts of native profiles into NativeProfileTypeBase. Memory
1797         domain dispatcher is now a separate class as it is shared by two native memory
1798         profile types.
1799
1800         Both native memory profile types now capture native heap graph.
1801
1802         * inspector/front-end/NativeMemorySnapshotView.js:
1803         (WebInspector.MemoryAgentDispatcher.instance):
1804         (WebInspector.NativeProfileTypeBase.prototype.buttonClicked.didReceiveMemorySnapshot):
1805         (WebInspector.NativeProfileTypeBase.prototype.buttonClicked):
1806         (WebInspector.NativeSnapshotProfileType):
1807         (WebInspector.NativeSnapshotProfileHeader.prototype._didReceiveMemorySnapshot):
1808         (WebInspector.NativeMemoryProfileType):
1809         (WebInspector.NativeMemoryProfileHeader.prototype._updateSnapshotStatus):
1810         (WebInspector.NativeMemoryProfileHeader.prototype._didReceiveMemorySnapshot):
1811
1812 2013-03-11  Sheriff Bot  <webkit.review.bot@gmail.com>
1813
1814         Unreviewed, rolling out r145349.
1815         http://trac.webkit.org/changeset/145349
1816         https://bugs.webkit.org/show_bug.cgi?id=111966
1817
1818         Missing code history of Element,PageRuleCollector. (Requested
1819         by tasak on #webkit).
1820
1821         * CMakeLists.txt:
1822         * GNUmakefile.list.am:
1823         * Target.pri:
1824         * WebCore.gypi:
1825         * WebCore.xcodeproj/project.pbxproj:
1826         * css/CSSAllInOne.cpp:
1827         * css/DocumentRuleSets.cpp:
1828         (WebCore::ShadowDistributedRules::collectMatchRequests):
1829         * css/DocumentRuleSets.h:
1830         * css/ElementRuleCollector.cpp: Removed.
1831         * css/ElementRuleCollector.h: Removed.
1832         * css/PageRuleCollector.cpp: Removed.
1833         * css/PageRuleCollector.h: Removed.
1834         * css/StyleResolver.cpp:
1835         (WebCore::leftToRightDeclaration):
1836         (WebCore):
1837         (WebCore::rightToLeftDeclaration):
1838         (WebCore::StyleResolver::State::ensureRuleList):
1839         (WebCore::StyleResolver::State::clear):
1840         (WebCore::StyleResolver::addMatchedProperties):
1841         (WebCore::StyleResolver::addElementStyleProperties):
1842         (MatchingUARulesScope):
1843         (WebCore::MatchingUARulesScope::MatchingUARulesScope):
1844         (WebCore::MatchingUARulesScope::~MatchingUARulesScope):
1845         (WebCore::MatchingUARulesScope::isMatchingUARules):
1846         (WebCore::StyleResolver::collectMatchingRules):
1847         (WebCore::StyleResolver::collectMatchingRulesForRegion):
1848         (WebCore::StyleResolver::sortAndTransferMatchedRules):
1849         (WebCore::StyleResolver::matchScopedAuthorRules):
1850         (WebCore::StyleResolver::matchHostRules):
1851         (WebCore::StyleResolver::matchAuthorRules):
1852         (WebCore::StyleResolver::matchUserRules):
1853         (WebCore::StyleResolver::matchUARules):
1854         (WebCore::StyleResolver::collectMatchingRulesForList):
1855         (WebCore::compareRules):
1856         (WebCore::StyleResolver::sortMatchedRules):
1857         (WebCore::StyleResolver::matchAllRules):
1858         (WebCore::StyleResolver::State::initForStyleResolve):
1859         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
1860         (WebCore::StyleResolver::styleForElement):
1861         (WebCore::StyleResolver::styleForKeyframe):
1862         (WebCore::StyleResolver::pseudoStyleForElement):
1863         (WebCore::StyleResolver::styleForPage):
1864         (WebCore::StyleResolver::pseudoStyleRulesForElement):
1865         (WebCore::StyleResolver::ruleMatches):
1866         (WebCore::StyleResolver::checkRegionSelector):
1867         (WebCore::comparePageRules):
1868         (WebCore::StyleResolver::matchPageRules):
1869         (WebCore::checkPageSelectorComponents):
1870         (WebCore::StyleResolver::matchPageRulesForList):
1871         (WebCore::StyleResolver::isLeftPage):
1872         (WebCore::StyleResolver::isFirstPage):
1873         (WebCore::StyleResolver::pageName):
1874         * css/StyleResolver.h:
1875         (WebCore::MatchRequest::MatchRequest):
1876         (MatchRequest):
1877         (StyleResolver):
1878         (MatchResult):
1879         (WebCore::StyleResolver::State::State):
1880         (State):
1881         (WebCore::StyleResolver::State::takeRuleList):
1882         (WebCore::StyleResolver::State::setSameOriginOnly):
1883         (WebCore::StyleResolver::State::isSameOriginOnly):
1884         (WebCore::StyleResolver::State::pseudoStyleRequest):
1885         (WebCore::StyleResolver::State::setMode):
1886         (WebCore::StyleResolver::State::mode):
1887         (WebCore::StyleResolver::State::matchedRules):
1888         (WebCore::StyleResolver::State::addMatchedRule):
1889         * inspector/InspectorCSSAgent.cpp:
1890         (WebCore::InspectorCSSAgent::willMatchRule):
1891         * inspector/InspectorCSSAgent.h:
1892         (WebCore):
1893         (InspectorCSSAgent):
1894         * inspector/InspectorInstrumentation.cpp:
1895         (WebCore):
1896         (WebCore::InspectorInstrumentation::willMatchRuleImpl):
1897         * inspector/InspectorInstrumentation.h:
1898         (WebCore):
1899         (InspectorInstrumentation):
1900         (WebCore::InspectorInstrumentation::willMatchRule):
1901
1902 2013-03-11  Marja Hölttä  <marja@chromium.org>
1903
1904         [V8] Fix V8InjectedScriptManager
1905         https://bugs.webkit.org/show_bug.cgi?id=111968
1906
1907         Reviewed by Kentaro Hara.
1908
1909         This is needed to make the inspector work after templates for main world
1910         and non-main worlds are separated (bug 111724).
1911
1912         No new tests (no changes in functionality).
1913
1914         * bindings/v8/custom/V8InjectedScriptManager.cpp:
1915         (WebCore::InjectedScriptManager::canAccessInspectedWindow):
1916
1917 2013-03-11  Hayato Ito  <hayato@chromium.org>
1918
1919         Make sure that CSSSelector::setValue() is never called after parsing its pseudoType.
1920         https://bugs.webkit.org/show_bug.cgi?id=111957
1921
1922         Reviewed by Hajime Morrita.
1923
1924         It'd be nice to have an assertion here since
1925         CSSSelector::pseudoType() will never parse a new value after it
1926         parses a value and m_pseudoType is set to non-PseudoNotParsed.
1927
1928         No new tests (no change in behaviour).
1929
1930         * css/CSSSelector.h:
1931         (WebCore::CSSSelector::setValue):
1932
1933 2013-03-11  Takashi Sakamoto  <tasak@google.com>
1934
1935         [Refactoring] Implement RuleCollector
1936         https://bugs.webkit.org/show_bug.cgi?id=109916
1937
1938         Reviewed by Antti Koivisto.
1939
1940         Implemented rule collector for an element and collector for a page.
1941         Not all members in class State are required entire while resolving
1942         a style.
1943
1944         No new tests, because just refactoring.
1945
1946         * CMakeLists.txt:
1947         * GNUmakefile.list.am:
1948         * Target.pri:
1949         * WebCore.gypi:
1950         * WebCore.xcodeproj/project.pbxproj:
1951         * css/CSSAllInOne.cpp:
1952         Added ElementRuleCollector and PageRuleCollector.
1953         * css/DocumentRuleSets.cpp:
1954         (WebCore::ShadowDistributedRules::collectMatchRequests):
1955         Since behaviorAtBoundary is a state owned by ElementRuleCollector,
1956         removed from here.
1957         * css/DocumentRuleSets.h:
1958         (WebCore::ShadowDistributedRules::isEmpty):
1959         Added to quickly check whether there exist any ShadowDistributedRules
1960         or not.
1961         * css/ElementRuleCollector.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
1962         (WebCore):
1963         (WebCore::ElementRuleCollector::matchedResult):
1964         (WebCore::ElementRuleCollector::matchedRuleList):
1965         (WebCore::ElementRuleCollector::addMatchedRule):
1966         (WebCore::ElementRuleCollector::clearMatchedRules):
1967         (WebCore::ElementRuleCollector::ensureRuleList):
1968         (WebCore::ElementRuleCollector::addElementStyleProperties):
1969         (WebCore::ElementRuleCollector::collectMatchingRules):
1970         (WebCore::ElementRuleCollector::collectMatchingRulesForRegion):
1971         (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
1972         (WebCore::ElementRuleCollector::matchScopedAuthorRules):
1973         (WebCore::ElementRuleCollector::matchHostRules):
1974         (WebCore::ElementRuleCollector::matchShadowDistributedRules):
1975         (WebCore::ElementRuleCollector::matchAuthorRules):
1976         (WebCore::ElementRuleCollector::matchUserRules):
1977         (WebCore::ElementRuleCollector::matchUARules):
1978         (WebCore::ElementRuleCollector::ruleMatches):
1979         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
1980         (WebCore::ElementRuleCollector::sortMatchedRules):
1981         (WebCore::ElementRuleCollector::matchAllRules):
1982         Moved these methods from StyleResolver to this class.
1983         (WebCore::ElementRuleCollector::hasAnyMatchingRules):
1984         This method is used for checking whether a given element can share
1985         a cache.
1986         * css/ElementRuleCollector.h: Copied from Source/WebCore/css/StyleResolver.h.
1987         (WebCore):
1988         (WebCore::ElementRuleCollector::ElementRuleCollector):
1989         Use styleResolver instance to initialize its member variables, i.e.
1990         SelectorFilter, RuleSets, InspectorCSSOMWrappers, and
1991         StyleScopedResolver.
1992         (ElementRuleCollector):
1993         (WebCore::ElementRuleCollector::setMode):
1994         (WebCore::ElementRuleCollector::setPseudoStyleRequest):
1995         (WebCore::ElementRuleCollector::setSameOriginOnly):
1996         (WebCore::ElementRuleCollector::setRegionForStyling):
1997         Mode, SameOriginOnly, RegionForStyling are only used while collecting
1998         matched rules.
1999         (WebCore::ElementRuleCollector::setMedium):
2000         Need to know which default stylesheet should be looked up.
2001         (WebCore::ElementRuleCollector::document):
2002         * css/PageRuleCollector.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
2003         (WebCore::comparePageRules):
2004         (WebCore::PageRuleCollector::isLeftPage):
2005         (WebCore::PageRuleCollector::isFirstPage):
2006         (WebCore::PageRuleCollector::pageName):
2007         (WebCore::PageRuleCollector::matchAllPageRules):
2008         (WebCore::PageRuleCollector::matchPageRules):
2009         (WebCore::checkPageSelectorComponents):
2010         (WebCore::PageRuleCollector::matchPageRulesForList):
2011         Moved from StyleResolver.
2012         * css/PageRuleCollector.h: Copied from Source/WebCore/css/StyleResolver.h.
2013         (WebCore):
2014         (WebCore::PageRuleCollector::PageRuleCollector):
2015         (PageRuleCollector):
2016         (WebCore::PageRuleCollector::matchedResult):
2017         * css/StyleResolver.cpp:
2018         (WebCore):
2019         (WebCore::StyleResolver::State::clear):
2020         (WebCore::StyleResolver::MatchResult::addMatchedProperties):
2021         (WebCore::StyleResolver::State::initForStyleResolve):
2022         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
2023         (WebCore::StyleResolver::styleForElement):
2024         (WebCore::StyleResolver::styleForKeyframe):
2025         (WebCore::StyleResolver::pseudoStyleForElement):
2026         (WebCore::StyleResolver::styleForPage):
2027         (WebCore::StyleResolver::pseudoStyleRulesForElement):
2028         (WebCore::StyleResolver::applyMatchedProperties):
2029         * css/StyleResolver.h:
2030         (WebCore::MatchRequest::MatchRequest):
2031         Removed behaviorAtBoundary. Instead, ElementRuleCollector have the
2032         state.
2033         (MatchRequest):
2034         (WebCore::StyleResolver::selectorFilter):
2035         Added to obtain SelectorFilter in ElementRuleCollector's constructor.
2036         (StyleResolver):
2037         (MatchResult):
2038         (WebCore::StyleResolver::State::State):
2039         To pass ASSERT in StyleResolver::applyProperties, need to keep
2040         m_regionForStyling.
2041         (State):
2042         (WebCore::StyleResolver::State::regionForStyling):
2043         (WebCore::StyleResolver::State::useSVGZoomRules):
2044         (WebCore::StyleResolver::hasSelectorForId):
2045         (WebCore):
2046         (WebCore::checkRegionSelector):
2047         * inspector/InspectorCSSAgent.cpp:
2048         (WebCore::InspectorCSSAgent::willMatchRule):
2049         Removed StyleResolver from its parameter list. Instead, added
2050         InspectorCSSOMWrappers and DocumentStyleSheetCollection.
2051         * inspector/InspectorCSSAgent.h:
2052         (WebCore):
2053         (InspectorCSSAgent):
2054         * inspector/InspectorInstrumentation.cpp:
2055         (WebCore):
2056         (WebCore::InspectorInstrumentation::willMatchRuleImpl):
2057         * inspector/InspectorInstrumentation.h:
2058         (WebCore):
2059         (InspectorInstrumentation):
2060         (WebCore::InspectorInstrumentation::willMatchRule):
2061
2062 2013-03-11  Mike West  <mkwst@chromium.org>
2063
2064         XSSAuditor doesn't need a copy of the original document's body.
2065         https://bugs.webkit.org/show_bug.cgi?id=111946
2066
2067         Reviewed by Darin Adler.
2068
2069         The XSSAuditor currently copies the original HTTP body of the document
2070         that's being audited in order to include it into a violation report if
2071         reflected XSS is detected. We don't actually need to do this, as we
2072         have access to the original request information from inside the
2073         XSSAuditorDelegate where the report is generated.
2074         XSSAuditorDelegate::didBlockScript ASSERTs that it's running on the
2075         main thread, so it should be safe to reach through the document's
2076         loader to get that information directly, rather than passing it from
2077         thread to thread via XSSInfo object properties.
2078
2079         * html/parser/XSSAuditor.h:
2080         * html/parser/XSSAuditor.cpp:
2081         (WebCore::XSSAuditor::init):
2082         (WebCore::XSSAuditor::filterToken):
2083         (WebCore::XSSAuditor::isSafeToSendToAnotherThread):
2084         * html/parser/XSSAuditorDelegate.h:
2085         (WebCore::XSSInfo::create):
2086         (WebCore::XSSInfo::XSSInfo):
2087         * html/parser/XSSAuditorDelegate.cpp:
2088         (WebCore::XSSInfo::isSafeToSendToAnotherThread):
2089             Drop the XSSInfo and XSSAuditor properties that held an
2090             isolatedCopy of the the original HTTP body. Depending on the
2091             document's size, this could be a significant savings.
2092         (WebCore::XSSAuditorDelegate::didBlockScript):
2093             Reach into the document's loader's original request in order to
2094             grab the body as a String, and feed that into the violation report
2095             object.
2096
2097             As a drive-by, this patch creates a FrameLoader* temporary
2098             variable to minimize repetition in this area of the code. We use
2099             the loader a few times, but should only have to grab it once.
2100
2101 2013-03-11  Silvia Pfeiffer  <silviapf@chromium.org>
2102
2103         [Chromium] REGRESSION: Closed Captions button not showing properly
2104         https://bugs.webkit.org/show_bug.cgi?id=109871
2105
2106         Reviewed by Jer Noble.
2107
2108         No new tests - covered by existing tests.
2109
2110         Most of the patch was in the meantime covered by a patch to
2111         https://bugs.webkit.org/show_bug.cgi?id=111109 .
2112         This changes a static Chromium-only function name to be consistent with
2113         parent class function names.
2114
2115         * rendering/RenderMediaControlsChromium.cpp:
2116         (WebCore::paintMediaToggleClosedCaptionsButton):
2117         (WebCore::RenderMediaControlsChromium::paintMediaControlsPart):
2118         Rename paintMediaClosedCaptionsButton to paintMediaToggleClosedCaptionsButton.
2119
2120 2013-03-11  Tim Horton  <timothy_horton@apple.com>
2121
2122         RenderSnapshottedPlugIn paints in PaintPhaseBlockBackground instead of PaintPhaseForeground
2123         https://bugs.webkit.org/show_bug.cgi?id=111962
2124         <rdar://problem/13289335>
2125
2126         Reviewed by Dean Jackson.
2127
2128         RenderSnapshottedPlugIn should paint its snapshot during the foreground
2129         painting phase, instead of BlockBackground, to match normal plugin painting.
2130
2131         * rendering/RenderSnapshottedPlugIn.cpp:
2132         (WebCore::RenderSnapshottedPlugIn::paint):
2133
2134 2013-03-07  Alexander Pavlov  <apavlov@chromium.org>
2135
2136         Web Inspector: [Elements] XSLT transformation result from the xml-stylesheet PI not rendered
2137         https://bugs.webkit.org/show_bug.cgi?id=111313
2138
2139         Reviewed by Vsevolod Vlasov.
2140
2141         Frame document update upon XSL transformation was never instrumented.
2142         This change instruments the Document::applyXSLTransform() method to that end.
2143
2144         Test: http/tests/inspector/styles/xsl-transformed.xml
2145
2146         * dom/Document.cpp:
2147         (WebCore::Document::applyXSLTransform): Instrumented.
2148         * inspector/InspectorDOMAgent.cpp:
2149         (WebCore::InspectorDOMAgent::frameDocumentUpdated): Invoked upon applyXSLTransform().
2150         * inspector/InspectorDOMAgent.h:
2151         * inspector/InspectorInstrumentation.cpp:
2152         (WebCore::InspectorInstrumentation::frameDocumentUpdatedImpl): Added.
2153         * inspector/InspectorInstrumentation.h:
2154         (WebCore::InspectorInstrumentation::didCommitLoad): Drive-by: simplified.
2155         (WebCore::InspectorInstrumentation::frameDocumentUpdated): Added.
2156
2157 2013-03-10  Matt Falkenhagen  <falken@chromium.org>
2158
2159         Implement inert subtrees needed for modal <dialog>
2160         https://bugs.webkit.org/show_bug.cgi?id=110952
2161
2162         Reviewed by Hajime Morrita.
2163
2164         This changes Node::disabled() to return true when a modal dialog is
2165         open and the node is not in the dialog.
2166
2167         Reusing disabled for inertness is useful because then event
2168         targeting and focus control automatically have the desired behavior:
2169         inert nodes are skipped over.
2170
2171         Tests: fast/dom/HTMLDialogElement/closed-dialog-does-not-block-mouse-events.html
2172                fast/dom/HTMLDialogElement/modal-dialog-blocks-mouse-events.html
2173                fast/dom/HTMLDialogElement/non-modal-dialog-does-not-block-mouse-events.html
2174
2175         * dom/Document.h:
2176         (WebCore::Document::activeModalDialog): Returns the topmost element in the top layer.
2177         Since now the only elements in the top layer are modal dialogs, it is the active modal dialog.
2178         * dom/Node.cpp:
2179         (WebCore):
2180         (WebCore::Node::isInert): As per the spec, a node that is not an ancestor or descendant of the modal dialog is inert.
2181         (WebCore::Node::disabled): Return false when inert.
2182         * dom/Node.h:
2183         * html/HTMLFormControlElement.cpp:
2184         (WebCore::HTMLFormControlElement::disabled): Fall back to the superclass so inert is taken into account.
2185
2186 2013-03-10  Glenn Adams  <glenn@skynav.com>
2187
2188         Line breaking opportunities at the end of a text node are missed
2189         https://bugs.webkit.org/show_bug.cgi?id=17427
2190
2191         Reviewed by Darin Adler.
2192
2193         When initializing context for determining next break position,
2194         reuse last two characters from previous text node(s) within block.
2195         This additional state is stored in the current LazyLineBreakIterator
2196         as an optimization to prevent having to add two new parameters to
2197         isBreakable().
2198
2199         At present, this fixes only the ASCII shortcut code path, but
2200         does not yet handle the non-ASCII path. Since the ASCII path is
2201         the most performant critical, the handling of this latter path
2202         will be addressed by webkit.org/b/105692.
2203
2204         Additionally test for case where last two characters context
2205         is derived from distinct nodes, possibly with intervening empty
2206         inline node(s).
2207
2208         Test: fast/text/line-break-between-text-nodes.html
2209
2210         * platform/text/TextBreakIterator.h:
2211         (WebCore::LazyLineBreakIterator::LazyLineBreakIterator):
2212         (WebCore::LazyLineBreakIterator::lastCharacter):
2213         (WebCore::LazyLineBreakIterator::secondToLastCharacter):
2214         (WebCore::LazyLineBreakIterator::setLastTwoCharacters):
2215         (WebCore::LazyLineBreakIterator::resetLastTwoCharacters):
2216         (WebCore::LazyLineBreakIterator::updateLastTwoCharacters):
2217         (LazyLineBreakIterator):
2218         Add state variables to retain last two characters of previous text node(s)
2219         for reuse when initializing nextBreakPosition<>() context.
2220         * rendering/RenderBlockLineLayout.cpp:
2221         (WebCore::RenderBlock::layoutRunsAndFloatsInRange):
2222         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
2223         Record and reset retained last two characters of previous text node(s) as
2224         appropriate.
2225         * rendering/break_lines.cpp:
2226         (WebCore::nextBreakablePosition):
2227         Use state variables holding retained last two characters of previous text node(s)
2228         for when initializing nextBreakPosition<>() context.
2229
2230 2013-03-10  Darin Adler  <darin@apple.com>
2231
2232         NetworkStorageSession leaks its CFURLStorageSessionRef
2233         https://bugs.webkit.org/show_bug.cgi?id=111950
2234         <rdar://problem/13384134>
2235
2236         Reviewed by Sam Weinig.
2237
2238         * platform/network/NetworkStorageSession.h:
2239         Change the argument type of the constructor to a RetainPtr.
2240         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
2241         (WebCore::NetworkStorageSession::NetworkStorageSession): Changed
2242         the argument type to a RetainPtr.
2243         (WebCore::NetworkStorageSession::switchToNewTestingSession): Added
2244         calls to adoptCF to adopt the value returned by wkCreatePrivateStorageSession.
2245         (WebCore::NetworkStorageSession::createPrivateBrowsingSession): Ditto.
2246         (WebCore::NetworkStorageSession::cookieStorage): Changed to use adoptCF
2247         instead of the RetainPtr constructor with AdoptCF since the former is
2248         far easier to read.
2249
2250 2013-03-10  Jason Anderssen  <janderssen@gmail.com>
2251
2252         Conformance Test 1.0.3 (Beta) function: bufferData undefined value failed.
2253         https://bugs.webkit.org/show_bug.cgi?id=111641
2254
2255         Reviewed by Dean Jackson.
2256
2257         The WebGL specification requires that a size of 0 is not valid. In javascript, passing in undefined 
2258         as a parameter to a long long is the same as passing in 0, so we must check for this incorrect
2259         value and fail. 
2260         The test suite in Kronos 1.0.3 failed, test to verify conformance is as follows:
2261         https://www.khronos.org/registry/webgl/sdk/tests/conformance/more/functions/bufferDataBadArgs.html.
2262
2263         * html/canvas/WebGLRenderingContext.cpp:
2264         (WebCore::WebGLRenderingContext::bufferData):
2265         Synthesize error and returned if size is 0.
2266
2267 2013-03-10  Andreas Kling  <akling@apple.com>
2268
2269         SVGDocumentExtensions should use OwnPtr for pending resource maps.
2270         <http://webkit.org/b/111943>
2271
2272         Reviewed by Anders Carlsson.
2273
2274         * svg/SVGDocumentExtensions.cpp:
2275         (WebCore::SVGDocumentExtensions::~SVGDocumentExtensions):
2276         (WebCore::SVGDocumentExtensions::addPendingResource):
2277         (WebCore::SVGDocumentExtensions::isElementPendingResources):
2278         (WebCore::SVGDocumentExtensions::removeElementFromPendingResources):
2279         (WebCore::SVGDocumentExtensions::removePendingResource):
2280         (WebCore::SVGDocumentExtensions::removePendingResourceForRemoval):
2281         (WebCore::SVGDocumentExtensions::markPendingResourcesForRemoval):
2282         * svg/SVGDocumentExtensions.h:
2283         (SVGDocumentExtensions):
2284
2285 2013-03-10  Tim Horton  <timothy_horton@apple.com>
2286
2287         Add a heuristic to determine the “primary” snapshotted plugin
2288         https://bugs.webkit.org/show_bug.cgi?id=111932
2289         <rdar://problem/13270208>
2290
2291         Reviewed by Dean Jackson.
2292
2293         * WebCore.exp.in: Export a few things.
2294         * html/HTMLPlugInImageElement.cpp:
2295         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
2296         (WebCore::classNameForShadowRoot): If we've been informed that we are the primary snapshotted plugin, add the 'primary' class.
2297         (WebCore::HTMLPlugInImageElement::setIsPrimarySnapshottedPlugIn): Added
2298         (WebCore::HTMLPlugInImageElement::updateSnapshotInfo): Hand classNameForShadowRoot our primary-ness.
2299         * html/HTMLPlugInImageElement.h:
2300         (HTMLPlugInImageElement): Add storage for m_isPrimarySnapshottedPlugIn.
2301
2302 2013-03-10  Mike West  <mkwst@chromium.org>
2303
2304         XSSAuditor doesn't need a copy of the original document URL.
2305         https://bugs.webkit.org/show_bug.cgi?id=111944
2306
2307         Reviewed by Adam Barth.
2308
2309         When creating an XSSInfo object in response to detecting reflected XSS
2310         on a page, the Auditor was passing in a copy of the document's
2311         original URL for reporting. It doesn't look like we need this, as
2312         XSSInfo's only consumer, XSSAuditorDelegate, runs on the main thread
2313         with access to the document. We can obtain access to the same
2314         information by reading the URL directly from the delegate's Document
2315         object if and when we need it.
2316
2317         * html/parser/XSSAuditorDelegate.cpp:
2318         (WebCore::XSSAuditorDelegate::didBlockScript):
2319             Read the document's URL directly in order to create a violation
2320             report.
2321         (WebCore::XSSInfo::isSafeToSendToAnotherThread):
2322         * html/parser/XSSAuditorDelegate.h:
2323         (WebCore::XSSInfo::create):
2324         (WebCore::XSSInfo::XSSInfo):
2325         * html/parser/XSSAuditor.cpp:
2326         (WebCore::XSSAuditor::init):
2327         (WebCore::XSSAuditor::filterToken):
2328         (WebCore::XSSAuditor::isSafeToSendToAnotherThread):
2329         * html/parser/XSSAuditor.h:
2330             Remove the copied original URL from both XSSInfo objects and the
2331             XSSAuditor.
2332
2333 2013-03-10  Andreas Kling  <akling@apple.com>
2334
2335         GlyphMetricsMap should use OwnPtr.
2336         <http://webkit.org/b/111937>
2337
2338         Reviewed by Anders Carlsson.
2339
2340         Use OwnPtr instead of raw pointer + deleteAllValues().
2341
2342         * platform/graphics/GlyphMetricsMap.h:
2343         (GlyphMetricsMap):
2344         (WebCore::::locatePageSlowCase):
2345
2346 2013-03-10  Eric Carlson  <eric.carlson@apple.com>
2347
2348         Allow iOS port to use InbandTextTrackPrivateAVF
2349         https://bugs.webkit.org/show_bug.cgi?id=111933
2350
2351         Reviewed by Dean Jackson.
2352
2353         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2354         (WebCore::InbandTextTrackPrivateAVF::processCue): Drive-by cleanup.
2355         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
2356
2357 2013-03-09  Eric Carlson  <eric.carlson@apple.com>
2358
2359         Enable platform code to implement text track menu
2360         https://bugs.webkit.org/show_bug.cgi?id=111924
2361
2362         Reviewed by Dean Jackson.
2363
2364         No new tests, the new code isn't enabled in any ports yet.
2365
2366         * WebCore.xcodeproj/project.pbxproj: Add PlatformTextTrack.h and PlatformTextTrackMenu.h.
2367
2368         * html/HTMLAudioElement.cpp:
2369         (WebCore::HTMLAudioElement::createForJSConstructor): scheduleLoad -> scheduleDelayedAction.
2370
2371         * html/HTMLMediaElement.cpp:
2372         (WebCore::HTMLMediaElement::HTMLMediaElement): Deal with scheduleLoad to scheduleDelayedAction rename.
2373         (WebCore::HTMLMediaElement::parseAttribute): Ditto.
2374         (WebCore::HTMLMediaElement::finishParsingChildren): Ditto.
2375         (WebCore::HTMLMediaElement::insertedInto): Ditto.
2376         (WebCore::HTMLMediaElement::scheduleDelayedAction): Ditto.
2377         (WebCore::HTMLMediaElement::scheduleNextSourceChild): Ditto.
2378         (WebCore::HTMLMediaElement::loadTimerFired): Ditto.
2379         (WebCore::HTMLMediaElement::textTrackModeChanged): Notify platform menu of track change.
2380         (WebCore::HTMLMediaElement::playInternal): Deal with scheduleLoad to scheduleDelayedAction rename.
2381         (WebCore::HTMLMediaElement::pauseInternal): Ditto.
2382         (WebCore::HTMLMediaElement::mediaPlayerDidAddTrack): Ditto. Call addTrack() instead of appending 
2383             the track directly.
2384         (WebCore::HTMLMediaElement::setSelectedTextTrack): Deal with platform menu changing the
2385             selected track.
2386         (WebCore::HTMLMediaElement::platformTextTracks): Return an array of PlatformTracks representing
2387             the current text tracks.
2388         (WebCore::HTMLMediaElement::notifyMediaPlayerOfTextTrackChanges): Notify the platform menu
2389             that the list of text tracks has changed.
2390         (WebCore::HTMLMediaElement::platformTextTrackMenu): Return the platform track menu, if any.
2391         (WebCore::HTMLMediaElement::closeCaptionTracksChanged): 
2392         (WebCore::HTMLMediaElement::addTrack): Call addTrack() instead of appending the track directly.
2393         (WebCore::HTMLMediaElement::removeTrack): Call closeCaptionTracksChanged.
2394         (WebCore::HTMLMediaElement::addTextTrack): Call addTrack() instead of appending the track directly.
2395         (WebCore::HTMLMediaElement::didAddTrack): Ditto.
2396         (WebCore::HTMLMediaElement::didRemoveTrack): Deal with scheduleLoad to scheduleDelayedAction rename.
2397         (WebCore::HTMLMediaElement::sourceWasAdded): Ditto.
2398         (WebCore::HTMLMediaElement::clearMediaPlayer): Forget the platform track menu.
2399         (WebCore::HTMLMediaElement::resume): Deal with scheduleLoad to scheduleDelayedAction rename.
2400         * html/HTMLMediaElement.h:
2401
2402         * html/track/InbandTextTrack.h: scheduleLoad -> scheduleDelayedAction.
2403
2404         * html/track/TextTrack.cpp:
2405         (WebCore::TextTrack::platformTextTrack): Create a PlatformTextTrack.
2406         * html/track/TextTrack.h:
2407
2408         * platform/graphics/MediaPlayer.cpp:
2409         (WebCore::MediaPlayer::implementsTextTrackControls): New, player private passthrough.
2410         (WebCore::MediaPlayer::textTrackMenu): Ditto.
2411         * platform/graphics/MediaPlayer.h:
2412         * platform/graphics/MediaPlayerPrivate.h:
2413
2414         * platform/graphics/PlatformTextTrack.h: Added.
2415
2416         * platform/graphics/PlatformTextTrackMenu.h: Added.
2417
2418 2013-03-09  Eric Carlson  <eric.carlson@apple.com>
2419
2420         Video size calculated incorrectly when PLUGIN_PROXY_FOR_VIDEO
2421         https://bugs.webkit.org/show_bug.cgi?id=111912
2422
2423         Reviewed by Dean Jackson.
2424
2425         * html/shadow/MediaControlElements.cpp:
2426         (WebCore::MediaControlTextTrackContainerElement::updateSizes): We use RenderPart when
2427             PLUGIN_PROXY_FOR_VIDEO is defined, not RenderVideo.
2428
2429 2013-03-09  Sebastian Dröge  <sebastian.droege@collabora.co.uk>
2430
2431         Fix offset handling in GStreamer WebKitWebSource.
2432         https://bugs.webkit.org/show_bug.cgi?id=111888
2433
2434         Reviewed by Philippe Normand.
2435
2436         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2437         (webKitWebSrcSeekDataCb):
2438         (StreamingClient::didReceiveData):
2439         The offset handling in WebKitWebSource was completely wrong
2440         before and caused wrong offsets to be set on the GStreamer buffers
2441         after a seek.
2442
2443         Apart from that there was also a race condition that happens
2444         when a downstream element causes seeks in very short succession
2445         and is switching between two different parts of the stream.
2446
2447 2013-03-09  Keishi Hattori  <keishi@webkit.org>
2448
2449         Month transition animation is missing in some places
2450         https://bugs.webkit.org/show_bug.cgi?id=111908
2451
2452         Reviewed by Kent Tamura.
2453
2454         Month transition animation was missing when navigating using keyboard
2455         shortcuts and when navigation was trigger by selecting.
2456
2457         Added tests to calendar-picker/*-picker-key-operations.html.
2458
2459         * Resources/pagepopups/calendarPicker.js:
2460         (Animator): Added annotations.
2461         (Animator.prototype.isRunning): Returns true of the animation is running. Used by test.
2462         (ScrollView.prototype.scrollAnimator): Returns the scroll animator. Used by test.
2463         (CalendarPicker):
2464         (CalendarPicker.prototype.onYearListViewDidSelectMonth): Use CalendarPicker.NavigationBehavior enum instead of bool.
2465         (CalendarPicker.prototype.setSelection): Ditto.
2466         (CalendarPicker.prototype._moveHighlight): Ditto.
2467         (CalendarPicker.prototype.onCalendarTableKeyDown): Ditto.
2468         (CalendarPicker.prototype.onBodyKeyDown): Ditto.
2469
2470 2013-03-09  Dean Jackson  <dino@apple.com>
2471
2472         Can't build w/o accelerated compositing
2473         https://bugs.webkit.org/show_bug.cgi?id=111891
2474
2475         Patch originally came from Tobias Mueller <tobiasmue@gnome.org>
2476
2477         Unreviewed build fix for platforms without ACCELERATED_COMPOSITING enabled, due
2478         to r145057.
2479
2480         * dom/PseudoElement.cpp:
2481         (WebCore::PseudoElement::~PseudoElement): Wrap the call to pseudoElementDestroyed in
2482             USE(ACCELERATED_COMPOSITING)
2483
2484 2013-03-07  Robert Hogan  <robert@webkit.org>
2485
2486         REGRESSION(r140907): Incorrect baseline for cells with media content during load
2487         https://bugs.webkit.org/show_bug.cgi?id=108357
2488
2489         Reviewed by Julien Chaffraix.
2490
2491         If a cell has replaced content, the intrinsic height of its content can change between layouts. If that's the case then the intrinsic padding we used
2492         for layout (the padding required to push the contents of the cell down to the row's baseline) is included in the new height and baseline and makes both
2493         of them wrong. So if a cell's content's intrinsic height has changed push the new content up into the intrinsic padding and relayout so that the rest of
2494         table and row layout can use the correct baseline and height for this cell.
2495
2496         Tests: fast/css/vertical-align-baseline-rowspan-012.html
2497                http/tests/css/vertical-align-baseline-after-image-load-2.html
2498                http/tests/css/vertical-align-baseline-after-image-load-3.html
2499                http/tests/css/vertical-align-baseline-after-image-load.html
2500
2501         * rendering/RenderTableCell.cpp:
2502         (WebCore::RenderTableCell::layout):
2503         * rendering/RenderTableCell.h:
2504         (WebCore::RenderTableCell::isBaselineAligned):
2505         * rendering/RenderTableSection.cpp:
2506         (WebCore::RenderTableSection::calcRowLogicalHeight):
2507         (WebCore::RenderTableSection::layoutRows):
2508
2509 2013-03-08  Chris Fleizach  <cfleizach@apple.com>
2510
2511         REGRESSION: Intermittent crash in SpeechSynthesis::didFinishSpeaking
2512         https://bugs.webkit.org/show_bug.cgi?id=111613
2513
2514         Reviewed by Ryosuke Niwa.
2515
2516         This crash happens when the mock synthesizer utterance variable gets cleared
2517         before the speakingFinished timer happens. I don't see how that could happen
2518         but I was able to make a similar problem happen when cancel is called twice.
2519
2520         This adds in a few more asserts and common sense checks. I'm hoping it will
2521         illuminate the problem further.
2522
2523         * platform/mock/PlatformSpeechSynthesizerMock.cpp:
2524         (WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
2525         (WebCore::PlatformSpeechSynthesizerMock::speak):
2526         (WebCore::PlatformSpeechSynthesizerMock::cancel):
2527
2528 2013-03-08  David Kilzer  <ddkilzer@apple.com>
2529
2530         BUILD FIX: Make WebCore link for iOS
2531
2532         * WebCore.exp.in:
2533         - Add ENABLE(RUBBER_BAND) for FrameView::setWantsLayerForTopOverHangArea(bool)
2534           and FrameView::setWantsLayerForBottomOverHangArea(bool).
2535         - Move FloatPoint::FloatPoint(_NSPoint const&) to !PLATFORM(IOS)
2536           section.
2537
2538 2013-03-08  Julien Chaffraix  <jchaffraix@webkit.org>
2539
2540         [CSS Grid Layout] Resolve grid-{end|after} integer against the end|after edge
2541         https://bugs.webkit.org/show_bug.cgi?id=111885
2542
2543         Reviewed by Tony Chang.
2544
2545         The current code resolves grid-end (resp. grid-after) <integer>'s format against the start
2546         (resp. before) axis. The specification changed so that they are resolved against their matching
2547         axis.
2548
2549         Test: fast/css-grid-layout/grid-auto-flow-resolution.html
2550
2551         * rendering/RenderGrid.cpp:
2552         (WebCore::RenderGrid::maximumIndexInDirection):
2553         Updated the code to do the grid sizing measurement without resolveGridPositionsFromStyle. That's required
2554         as resolveGridPositionsFromStyle requires the grid to be sized.
2555
2556         (WebCore::RenderGrid::placeItemsOnGrid):
2557         Added a comment about not recomputing after grid growth. This issue was raised to www-style
2558         (http://lists.w3.org/Archives/Public/www-style/2013Mar/0182.html).
2559
2560         (WebCore::RenderGrid::resolveGridPositionsFromStyle):
2561         Added an ASSERT now that we don't call it during grid construction. Also added some code to pass
2562         the side of the GridPosition we give to resolveGridPositionFromStyle.
2563
2564         (WebCore::RenderGrid::resolveGridPositionFromStyle):
2565         Updated the code to resolve the grid position against the right side.
2566
2567         * rendering/RenderGrid.h:
2568         Added GridPositionSide and updated resolveGridPositionFromStyle's signature.
2569
2570 2013-03-08  Sheriff Bot  <webkit.review.bot@gmail.com>
2571
2572         Unreviewed, rolling out r142015.
2573         http://trac.webkit.org/changeset/142015
2574         https://bugs.webkit.org/show_bug.cgi?id=111904
2575
2576         The change caused 2 major regressions (bug 111091 and bug
2577         111595) and Pravin doesn't have time to investigate them
2578         (Requested by jchaffraix on #webkit).
2579
2580         * dom/Node.cpp:
2581         (WebCore::Node::diff):
2582         * rendering/RenderBlock.cpp:
2583         (WebCore::RenderBlock::childBecameNonInline):
2584         (WebCore):
2585         * rendering/RenderBlock.h:
2586         (RenderBlock):
2587         * rendering/RenderBoxModelObject.h:
2588         (WebCore::RenderBoxModelObject::childBecameNonInline):
2589         (RenderBoxModelObject):
2590         * rendering/RenderInline.cpp:
2591         (WebCore::RenderInline::childBecameNonInline):
2592         (WebCore):
2593         * rendering/RenderInline.h:
2594         (RenderInline):
2595         * rendering/RenderObject.cpp:
2596         (WebCore):
2597         (WebCore::RenderObject::handleDynamicFloatPositionChange):
2598         (WebCore::RenderObject::styleWillChange):
2599         (WebCore::RenderObject::styleDidChange):
2600         * rendering/RenderObject.h:
2601         (RenderObject):
2602
2603 2013-03-08  Dean Jackson  <dino@apple.com>
2604
2605         Don't snapshot Java plugins
2606         https://bugs.webkit.org/show_bug.cgi?id=111899
2607
2608         Reviewed by Tim Horton.
2609
2610         Export MIMETypeRegistry::isJavaAppletMIMEType symbol.
2611
2612         * WebCore.exp.in:
2613
2614 2013-03-08  Rafael Weinstein  <rafaelw@chromium.org>
2615
2616         [HTMLTemplateElement] processTemplateEndTag() needs to check for template in html scope
2617         https://bugs.webkit.org/show_bug.cgi?id=111880
2618
2619         Reviewed by Eric Seidel.
2620
2621         Currently, </template> handling exits with an error if there is not a template tag "in scope"
2622         which will be true if there is a table (for instance) below a template. This makes it so that
2623         the search (correctly) examines the entire element stack.
2624
2625         Tests added to html5lib testing library.
2626
2627         * html/parser/HTMLTreeBuilder.cpp:
2628         (WebCore::HTMLTreeBuilder::processTemplateEndTag):
2629
2630 2013-03-08  Eric Seidel  <eric@webkit.org>
2631
2632         BackgroundHTMLParser should be able to atomize well-known strings
2633         https://bugs.webkit.org/show_bug.cgi?id=107337
2634
2635         Reviewed by Adam Barth.
2636
2637         Testing this patch easily requires applying bug 107236 locally
2638         to remove all the rendering noise from Parser/html-threaded-parser.html.
2639
2640         This patch adds a new class HTMLIdentifier which allows us to avoid
2641         allocating strings for known tag/attribute names from HTMLNames.
2642
2643         There is still a lot of meat on this bone, but I think it's important to
2644         land something "smallish" to start and iterate from there.
2645
2646         This took Parser/html-threaded-parser.html from:
2647         median= 443.726500002 ms, stdev= 7.25002679952 ms, min= 430.244000047 ms, max= 455.511000007 ms
2648         to:
2649         median= 427.849500004 ms, stdev= 9.96967058292 ms, min= 417.914000049 ms, max= 461.528000014 ms
2650         on my MBP.
2651
2652         * CMakeLists.txt:
2653         * GNUmakefile.list.am:
2654         * Target.pri:
2655         * WebCore.gypi:
2656         * WebCore.vcproj/WebCore.vcproj:
2657         * WebCore.vcxproj/WebCore.vcxproj:
2658         * html/parser/AtomicHTMLToken.h:
2659         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
2660         * html/parser/BackgroundHTMLParser.cpp:
2661         (WebCore::tokenExitsForeignContent):
2662         (WebCore::tokenExitsSVG):
2663         (WebCore::tokenExitsMath):
2664         (WebCore::BackgroundHTMLParser::simulateTreeBuilder):
2665         * html/parser/CSSPreloadScanner.cpp:
2666         (WebCore::CSSPreloadScanner::scan):
2667         * html/parser/CSSPreloadScanner.h:
2668         (WebCore):
2669         (CSSPreloadScanner):
2670         * html/parser/CompactHTMLToken.cpp:
2671         (SameSizeAsCompactHTMLToken):
2672         (WebCore::CompactHTMLToken::CompactHTMLToken):
2673         * html/parser/CompactHTMLToken.h:
2674         (WebCore::CompactHTMLToken::Attribute::Attribute):
2675         (Attribute):
2676         (WebCore::CompactHTMLToken::data):
2677         (WebCore::CompactHTMLToken::publicIdentifier):
2678         (CompactHTMLToken):
2679         * html/parser/HTMLDocumentParser.cpp:
2680         (WebCore::HTMLDocumentParser::startBackgroundParser):
2681         * html/parser/HTMLIdentifier.cpp: Added.
2682         (WebCore):
2683         (WebCore::identifierTable):
2684         (WebCore::HTMLIdentifier::hasIndex):
2685         (WebCore::HTMLIdentifier::findIndex):
2686         (WebCore::nameForIndex):
2687         (WebCore::HTMLIdentifier::asString):
2688         (WebCore::HTMLIdentifier::asStringImpl):
2689         (WebCore::HTMLIdentifier::addNames):
2690         (WebCore::HTMLIdentifier::init):
2691         * html/parser/HTMLIdentifier.h: Added.
2692         (WebCore):
2693         (HTMLIdentifier):
2694         (WebCore::HTMLIdentifier::HTMLIdentifier):
2695         (WebCore::HTMLIdentifier::isSafeToSendToAnotherThread):
2696         * html/parser/HTMLParserIdioms.cpp:
2697         (WebCore::threadSafeEqual):
2698         (WebCore::threadSafeMatch):
2699         * html/parser/HTMLParserIdioms.h:
2700         (WebCore):
2701         (WebCore::threadSafeHTMLNamesMatch):
2702         * html/parser/HTMLPreloadScanner.cpp:
2703         (WebCore::TokenPreloadScanner::tagIdFor):
2704         (WebCore::TokenPreloadScanner::StartTagScanner::match):
2705         (TokenPreloadScanner::StartTagScanner):
2706         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
2707         * html/parser/HTMLPreloadScanner.h:
2708
2709 2013-03-08  Brandon Jones  <bajones@google.com>
2710
2711         Check to ensure MultisampleRenderbuffer creation succeeds
2712         https://bugs.webkit.org/show_bug.cgi?id=111780
2713
2714         Reviewed by Dean Jackson.
2715
2716         On OSX systems using AMD graphics chips the allocation of large
2717         Multisample Renderbuffers in Chromium would fail without any indication
2718         of failure. Attempting to draw to the buffer resulted in garbage being
2719         rendered onscreen. This could be reproduced by opening a full-page
2720         WebGL app and pressing (Command + "-") several times. This patch adds an
2721         additional check during DrawingBuffer resize to verify that the resized
2722         buffer is valid. 
2723
2724         * platform/graphics/gpu/DrawingBuffer.cpp:
2725         (WebCore):
2726         (WebCore::DrawingBuffer::checkBufferIntegrity):
2727         (WebCore::DrawingBuffer::reset):
2728         * platform/graphics/gpu/DrawingBuffer.h:
2729         (DrawingBuffer):
2730
2731 2013-03-08  Harald Alvestrand  <hta@chromium.org>
2732
2733         Implemented new API for RTCStatsReport object.
2734         https://bugs.webkit.org/show_bug.cgi?id=110333
2735
2736         Removed RTCStatsElement object, moved its interface to
2737         RTCStatsReport. Preserved some interfaces for
2738         backwards compatibility; will be removed in a later patch.
2739
2740         Reviewed by Adam Barth.
2741
2742         Tested by extensions to RTCPeerConnection-stats test.
2743
2744         * Modules/mediastream/RTCStatsElement.cpp: Removed.
2745         * Modules/mediastream/RTCStatsElement.h: Removed.
2746         * Modules/mediastream/RTCStatsElement.idl: Removed.
2747         * Modules/mediastream/RTCStatsReport.cpp:
2748         (WebCore::RTCStatsReport::create):
2749         (WebCore::RTCStatsReport::RTCStatsReport):
2750         (WebCore):
2751         (WebCore::RTCStatsReport::names):
2752         (WebCore::RTCStatsReport::local):
2753         (WebCore::RTCStatsReport::remote):
2754         (WebCore::RTCStatsReport::addStatistic):
2755         (WebCore::RTCStatsReport::addElement):
2756         * Modules/mediastream/RTCStatsReport.h:
2757         (RTCStatsReport):
2758         (WebCore::RTCStatsReport::timestamp):
2759         (WebCore::RTCStatsReport::id):
2760         (WebCore::RTCStatsReport::stat):
2761         * Modules/mediastream/RTCStatsReport.idl:
2762         * Modules/mediastream/RTCStatsResponse.cpp:
2763         (WebCore::RTCStatsResponse::namedItem):
2764         (WebCore):
2765         (WebCore::RTCStatsResponse::addReport):
2766         (WebCore::RTCStatsResponse::addStatistic):
2767         * Modules/mediastream/RTCStatsResponse.h:
2768         (RTCStatsResponse):
2769         * Modules/mediastream/RTCStatsResponse.idl:
2770         * WebCore.gypi:
2771         * platform/chromium/support/WebRTCStatsResponse.cpp:
2772         (WebKit::WebRTCStatsResponse::addReport):
2773         (WebKit):
2774         (WebKit::WebRTCStatsResponse::addStatistic):
2775         (WebKit::WebRTCStatsResponse::addElement):
2776         * platform/mediastream/RTCStatsResponseBase.h:
2777         (RTCStatsResponseBase):
2778
2779 2013-03-08  Eric Seidel  <eric@webkit.org>
2780
2781         Free up background parser's checkpoints when speculation succeeds
2782         https://bugs.webkit.org/show_bug.cgi?id=110547
2783
2784         Reviewed by Adam Barth.
2785
2786         This should be a memory (and possible perf) win while parsing
2787         pages, as we will no longer hold multiple copies of every
2788         source byte during the whole parse.
2789
2790         Many LayoutTests exercise this code path, and I've manually (debugger and printf)
2791         that we're hitting this code, but we'll have to wait for the memory/perf bots
2792         to tell us if this shows up as a win.
2793
2794         We only bother to message the parser at the end of a speculation chain, so as not
2795         to send too many messages to the background parser.
2796
2797         * html/parser/BackgroundHTMLInputStream.cpp:
2798         (WebCore::BackgroundHTMLInputStream::BackgroundHTMLInputStream):
2799         (WebCore::BackgroundHTMLInputStream::invalidateCheckpointsUpThrough):
2800         (WebCore):
2801         (WebCore::BackgroundHTMLInputStream::rewindTo):
2802         * html/parser/BackgroundHTMLInputStream.h:
2803         (BackgroundHTMLInputStream):
2804         (Checkpoint):
2805         (WebCore::BackgroundHTMLInputStream::Checkpoint::isNull):
2806         (WebCore::BackgroundHTMLInputStream::Checkpoint::clear):
2807         * html/parser/BackgroundHTMLParser.cpp:
2808         (WebCore::BackgroundHTMLParser::passedCheckpoint):
2809         (WebCore):
2810         * html/parser/BackgroundHTMLParser.h:
2811         (BackgroundHTMLParser):
2812         * html/parser/HTMLDocumentParser.cpp:
2813         (WebCore::HTMLDocumentParser::pumpPendingSpeculations):
2814
2815 2013-03-08  Chandra Shekar Vallala  <brk376@motorola.com>
2816
2817         [chromium] Keydown event for 'shift+alt' returns win keycode instead of 'alt'
2818         https://bugs.webkit.org/show_bug.cgi?id=111112
2819
2820         Reviewed by Tony Chang.
2821
2822         Return windows keycode of Alt incase of GDK_META_L, GDK_META_R. This matches
2823         the firefox behaviour in linux platform.
2824
2825         Added Manual Test : ManualTests/shift-alt-key-event.html
2826         Try press Shift then alt key. The test passes if the shiftKey, altKey values
2827         of JSKeyEvent are true and keycode/which is 18.
2828
2829         * platform/chromium/KeyCodeConversionGtk.cpp:
2830         (WebCore::windowsKeyCodeForKeyEvent):
2831
2832 2013-03-08  Mike West  <mkwst@chromium.org>
2833
2834         CSP: 'eval()' is blocked in report-only mode.
2835         https://bugs.webkit.org/show_bug.cgi?id=111867
2836
2837         Reviewed by Adam Barth.
2838
2839         Setting a 'Content-Security-Policy-Report-Only' header should not have
2840         any effect on what a page actually executes. Currently, however, setting
2841         a 'script-src' directive that doesn't whitelist 'unsafe-eval' actually
2842         blocks 'eval()' on the page. This patch fixes that by checking whether
2843         we're in report-only mode before turning 'eval()' off inside the script
2844         engine.
2845
2846         This leaves us in a weird state, however. We don't currently have any
2847         mechanism of explaining to the VM that we just want to be notified of
2848         'eval()' usage. I've filed http://wkbug.com/111869 to cover this
2849         aspect.
2850
2851         Test: http/tests/security/contentSecurityPolicy/eval-allowed-in-report-only-mode.html
2852
2853         * page/ContentSecurityPolicy.cpp:
2854         (WebCore::ContentSecurityPolicy::didReceiveHeader):
2855             For each policy we parse, check that we're only turning off eval in
2856             the VM when we're in enforce mode. If we're in report-only mode,
2857             skip it.
2858
2859 2013-03-08  Christian Biesinger  <cbiesinger@chromium.org>
2860
2861         REGRESSION (r143643): <button> should support ::first-line and ::first-letter
2862         https://bugs.webkit.org/show_bug.cgi?id=111782
2863
2864         Reviewed by Ojan Vafai.
2865
2866         Test: fast/forms/button-first-line-first-letter.html
2867
2868         * rendering/RenderBlock.cpp:
2869         (WebCore::RenderBlock::firstLineBlock):
2870         (WebCore::findFirstLetterBlock):
2871         Add isRenderButton to the first-line and first-letter checks that
2872         don't allow ::first-* styles for flexbox.
2873
2874 2013-03-08  Geoffrey Garen  <ggaren@apple.com>
2875
2876         Removed an out-of-date comment from SharedTimer
2877         https://bugs.webkit.org/show_bug.cgi?id=111875
2878
2879         Reviewed by Mark Hahnenberg.
2880
2881         Even if we surround each call to an ObjC interface with an autorelease
2882         pool, it's still nice to have one at top-level entry points like
2883         timers, to avoid turning a single mistake into a long-term leak.
2884
2885         * platform/ios/SharedTimerIOS.mm:
2886         (WebCore::timerFired):
2887         * platform/mac/SharedTimerMac.mm:
2888         (WebCore::timerFired):
2889
2890 2013-03-08  Benjamin Poulain  <benjamin@webkit.org>
2891
2892         [Mac] Add a feature flag for 'view-mode' Media Feature, disable it on Mac
2893         https://bugs.webkit.org/show_bug.cgi?id=111297
2894
2895         Reviewed by Kenneth Rohde Christiansen.
2896
2897         The 'view-mode' Media Feature spec is implemented in WebCore but
2898         there is no WebKit support for it on Mac.
2899         Because of this, we always lie and report a windowed view mode.
2900
2901         This patch add a feature flag for the feature and disable it on
2902         Mac so that we stop reporting incorrect default values.
2903
2904         * WebCore.exp.in:
2905         * css/CSSValueKeywords.in:
2906         * css/MediaFeatureNames.h:
2907         (MediaFeatureNames):
2908         * css/MediaQueryEvaluator.cpp:
2909         * css/MediaQueryExp.cpp:
2910         (WebCore::featureWithCSSValueID):
2911         (WebCore::featureWithoutValue):
2912         * page/Page.cpp:
2913         (WebCore::Page::Page):
2914         * page/Page.h:
2915         (Page):
2916
2917 2013-03-08  Ryosuke Niwa  <rniwa@webkit.org>
2918
2919         After sending message, Mail changes formatting
2920         https://bugs.webkit.org/show_bug.cgi?id=111360
2921
2922         Reviewed by Enrica Casucci.
2923
2924         Added makeInsertedContentRoundTrippableWithHTMLTreeBuilder to move prohibited children (e.g. p, h1, etc...)
2925         out of paragraph elements to run immediately after the fragment insertion. This function splits trees and
2926         moves prohibited children out of paragraph elements to keep the tree isomorphic under HTML serialization and
2927         parsing. Unfortunately, there are many other DOM tree constructs we need to fix to make the subtree truly
2928         isomorphic but this is a step forward.
2929
2930         Test: editing/pasteboard/pasting-into-p-should-not-nest-p.html
2931
2932         * editing/ReplaceSelectionCommand.cpp:
2933         (WebCore::isProhibitedParagraphChild): Added. Matches the list at
2934         https://dvcs.w3.org/hg/editing/raw-file/57abe6d3cb60/editing.html#prohibited-paragraph-child
2935         except main element, which is currently missing in the specification.
2936         (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder): Added.
2937         (WebCore::ReplaceSelectionCommand::moveNodeOutOfAncestor): Added.
2938         (WebCore::ReplaceSelectionCommand::doApply): Call moveProhibitedChildrenOutOfParagraphElements.
2939
2940         * editing/ReplaceSelectionCommand.h:
2941         (ReplaceSelectionCommand):
2942
2943 2013-03-08  Eric Seidel  <eric@webkit.org>
2944
2945         AtomicHTMLToken should not be heap allocated or RefCounted
2946         https://bugs.webkit.org/show_bug.cgi?id=111250
2947
2948         Reviewed by Adam Barth.
2949
2950         It was clearly an oversight on our part to ever make AtomicHTMLToken ref-counted.
2951         We don't need the actual "token" saved, just enough of it to recreate a fake token.
2952
2953         This removed many more mallocs than I thought it would, for a nice little speed win.
2954         Before:
2955         median= 450.482999993 ms, stdev= 7.2381436538 ms, min= 436.084999994 ms, max= 464.968999964 ms
2956         After:
2957         median= 436.41600004 ms, stdev= 5.71435647554 ms, min= 427.160999971 ms, max= 446.753000026 ms
2958
2959         * html/parser/AtomicHTMLToken.h:
2960         (AtomicHTMLToken):
2961         * html/parser/HTMLConstructionSite.cpp:
2962         (WebCore::HTMLConstructionSite::createElementFromSavedToken):
2963         * html/parser/HTMLDocumentParser.cpp:
2964         (WebCore::HTMLDocumentParser::constructTreeFromHTMLToken):
2965         (WebCore::HTMLDocumentParser::constructTreeFromCompactHTMLToken):
2966         * html/parser/HTMLElementStack.cpp:
2967         (WebCore::HTMLElementStack::isHTMLIntegrationPoint):
2968         * html/parser/HTMLFormattingElementList.cpp:
2969         (WebCore):
2970         (WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly):
2971         (WebCore::HTMLFormattingElementList::ensureNoahsArkCondition):
2972         * html/parser/HTMLStackItem.h:
2973         (WebCore::HTMLStackItem::create):
2974         (WebCore::HTMLStackItem::localName):
2975         (WebCore::HTMLStackItem::attributes):
2976         (WebCore::HTMLStackItem::getAttributeItem):
2977         (HTMLStackItem):
2978         (WebCore::HTMLStackItem::hasLocalName):
2979         (WebCore::HTMLStackItem::hasTagName):
2980         (WebCore::HTMLStackItem::HTMLStackItem):
2981         * html/parser/HTMLTreeBuilder.cpp:
2982         (WebCore::HTMLTreeBuilder::processFakeStartTag):
2983         (WebCore::HTMLTreeBuilder::processFakeEndTag):
2984         (WebCore::HTMLTreeBuilder::processFakePEndTagIfPInButtonScope):
2985         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
2986         (WebCore::HTMLTreeBuilder::processStartTag):
2987         (WebCore::HTMLTreeBuilder::processEndTagForInBody):
2988         (WebCore::HTMLTreeBuilder::processEndTag):
2989         (WebCore::HTMLTreeBuilder::defaultForBeforeHTML):
2990         (WebCore::HTMLTreeBuilder::defaultForBeforeHead):
2991         (WebCore::HTMLTreeBuilder::defaultForInHead):
2992         (WebCore::HTMLTreeBuilder::defaultForInHeadNoscript):
2993         (WebCore::HTMLTreeBuilder::defaultForAfterHead):
2994         * html/parser/TextDocumentParser.cpp:
2995         (WebCore::TextDocumentParser::insertFakePreElement):
2996
2997 2013-03-08  Roger Fong  <roger_fong@apple.com>
2998
2999         Makefile fixes.
3000
3001         * WebCore.vcxproj/WebCore.make:
3002
3003 2013-03-07  Emil A Eklund  <eae@chromium.org>
3004
3005         [sub-pixel] Rounding error in table cell height calculation causes unnecessary scrollbar
3006         https://bugs.webkit.org/show_bug.cgi?id=111794
3007
3008         Reviewed by Levi Weintraub.
3009         
3010         In RenderTableCell::logicalHeightForRowSizing the
3011         adjustedLogicalHeight is calculated from the logicalHeight and
3012         intrinsic padding and is then returned and floored. This can
3013         cause cause the cell to be slightly smaller (0.5px) than the
3014         element it contains.
3015
3016         Test: fast/sub-pixel/table-cell-height.html
3017
3018         * rendering/RenderTableCell.h:
3019         (WebCore::RenderTableCell::logicalHeightForRowSizing):
3020         Change to use pixelSnapped version of logicalHeight method and
3021         change signature to return int as the only caller immediately
3022         down-casts the result to an int.
3023
3024 2013-03-08  Christian Biesinger  <cbiesinger@chromium.org>
3025
3026         RenderFullScreen needs to clear override sizes when exiting full screen
3027         https://bugs.webkit.org/show_bug.cgi?id=111775
3028
3029         Reviewed by Ojan Vafai.
3030
3031         Test: fullscreen/full-screen-with-flex-item.html
3032
3033         * rendering/RenderFullScreen.cpp:
3034         (RenderFullScreen::unwrapRenderer):
3035         RenderFullScreen is a flexbox, so it will potentially set override
3036         sizes on its children while in fullscreen mode. When we exit
3037         fullscreen mode, we need to clear this override size, otherwise the
3038         the leftover override size may affect layout. See the testcase for an
3039         example.
3040
3041 2013-03-08  Julien Chaffraix  <jchaffraix@webkit.org>
3042
3043         [CSS Grid Layout] Handle 2 positions with one 'auto' properly
3044         https://bugs.webkit.org/show_bug.cgi?id=111653
3045
3046         Reviewed by Tony Chang.
3047
3048         The rendering code was making the assumption that we have one position.
3049         Thus it couldn't fully match what the specification wants as the 2 opposite
3050         positions are required to resolve either position in several cases (e.g.
3051         1 / span 2, auto / 'c').
3052
3053         This change introduces resolveGridPositionsFromStyle to do both opposite
3054         positions resolution in one pass and thus handling more cases.
3055
3056         Test: fast/css-grid-layout/grid-item-spanning-resolution.html
3057
3058         * rendering/RenderGrid.cpp:
3059         (WebCore::RenderGrid::maximumIndexInDirection):
3060         (WebCore::RenderGrid::placeItemsOnGrid):
3061         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
3062         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
3063         Updated the above functions to rely on resolveGridPositionsFromStyle.
3064
3065         (WebCore::RenderGrid::resolveGridPositionsFromStyle):
3066         Added this new function that handle the correct resolution.
3067
3068         (WebCore::RenderGrid::resolveGridPositionFromStyle):
3069         Updated the ASSERT to match the new code flow.
3070
3071         * rendering/RenderGrid.h:
3072         (WebCore::RenderGrid::GridSpan::GridSpan):
3073         Introduced this new struct to hold the 2 positions along one axis.
3074
3075 2013-03-08  Dominic Cooney  <dominicc@chromium.org>
3076
3077         RenderTextControlSingleLine should not assume that its text element has a renderer
3078         https://bugs.webkit.org/show_bug.cgi?id=111826
3079
3080         Reviewed by Ojan Vafai.
3081
3082         Tests: fast/forms/search/search-autoscroll-hidden-decoration-container-crash.html
3083                fast/forms/search/search-hide-decoration-container-crash.html
3084                fast/forms/search/search-scroll-hidden-decoration-container-crash.html
3085
3086         * rendering/RenderTextControlSingleLine.cpp:
3087         (WebCore::RenderTextControlSingleLine::layout):
3088         (WebCore::RenderTextControlSingleLine::controlClipRect):
3089         (WebCore::RenderTextControlSingleLine::autoscroll):
3090         (WebCore::RenderTextControlSingleLine::scroll):
3091
3092 2013-03-08  Joshua Bell  <jsbell@chromium.org>
3093
3094         IndexedDB: Use WeakPtr for Factory-to-BackingStore reference
3095         https://bugs.webkit.org/show_bug.cgi?id=111459
3096
3097         Reviewed by Adam Barth.
3098
3099         IDBFactoryBackendImpl maintains a map of backing stores - if another database in the same
3100         origin is opened, the backing store instance must be re-used). This was a map to raw
3101         pointers so that the backing store can be collected when all database references are
3102         dropped. The map was maintained manually by passing the factory to the IDBBackingStore which
3103         would add/remove itself on creation/destruction.
3104
3105         Replace this with a HashMap<WeakPtr<T>>. This simplifies the plumbing; map entries
3106         "leak" but are purged on subsequent opens.
3107
3108         Added webkit_unit_test (Chromium port) to verify refcounts.
3109
3110         * Modules/indexeddb/IDBBackingStore.cpp:
3111         (WebCore::IDBBackingStore::IDBBackingStore): No need to notify factory of lifetime.
3112         (WebCore::IDBBackingStore::~IDBBackingStore): Ditto.
3113         (WebCore::IDBBackingStore::open): Ditto.
3114         * Modules/indexeddb/IDBBackingStore.h: No reference to the factory, but...
3115         (WebCore::IDBBackingStore::createWeakPtr): Do need to expose weak pointers for the factory to hold.
3116         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
3117         (WebCore::cleanWeakMap): Helper function to scrub a HashMap<WeakPtr<T>> of empty pointers.
3118         May move to WTF when we've learned how general it is, or come up with a dedicated WeakPtrHashMap type.
3119         (WebCore::IDBFactoryBackendImpl::openBackingStore): WeakPtr fu.
3120         * Modules/indexeddb/IDBFactoryBackendImpl.h:
3121         (IDBFactoryBackendImpl): Remove plumbing methods.
3122
3123 2013-03-08  John Mellor  <johnme@chromium.org>
3124
3125         @media queries do not take zooming into account
3126         https://bugs.webkit.org/show_bug.cgi?id=53186
3127
3128         Reviewed by Kenneth Rohde Christiansen.
3129
3130         Fixes @media width and height to take into account full page zoom, by
3131         adding code to MediaQueryEvaluator's width/heightMediaFeatureEval,
3132         corresponding to the existing code in Element::clientWidth which makes
3133         document.documentElement.clientWidth take into account page zoom.
3134
3135         Test: fast/media/mq-width-pagezoom.html
3136
3137         * css/MediaQueryEvaluator.cpp:
3138         (WebCore::heightMediaFeatureEval):
3139         (WebCore::widthMediaFeatureEval):
3140
3141 2013-03-08  Carlos Garcia Campos  <cgarcia@igalia.com>
3142
3143         [BlackBerry] Add stubs for DNSResolveQueue platform specific methods
3144         https://bugs.webkit.org/show_bug.cgi?id=111841
3145
3146         Reviewed by Rob Buis.
3147
3148         Add empty implementations of
3149         DNSResolveQueue::platformProxyIsEnabledInSystemPreferences() and
3150         DNSResolveQueue::platformResolve() to DNSBlackBerry.cpp to make it
3151         build.
3152
3153         * platform/network/blackberry/DNSBlackBerry.cpp:
3154         (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
3155         (WebCore::DNSResolveQueue::platformResolve):
3156
3157 2013-03-08  Glenn Hartmann  <hartmanng@chromium.org>
3158
3159        Adding a hook to collect data for a Google UMA histogram to track when
3160        m_needsCompositedScrolling is turned on and off.
3161        https://bugs.webkit.org/show_bug.cgi?id=111725
3162
3163        Reviewed by Julien Chaffraix.
3164
3165        We want to keep track of this information to quantify the effects of a
3166        few patches that will cause us to opt in to composited scrolling.
3167        Specifically, we want to measure the effects of
3168        https://bugs.webkit.org/show_bug.cgi?id=109302,
3169        https://bugs.webkit.org/show_bug.cgi?id=109966,
3170        https://bugs.webkit.org/show_bug.cgi?id=109591, and
3171        https://bugs.webkit.org/show_bug.cgi?id=107618.
3172
3173        We do this by measuring a per-layer boolean value, and comparing the
3174        ratio between number of layers opted in and number of layers that remain
3175        uncomposited. We hope the relative number of layers opting in will
3176        increase after the relevant patches land and are enabled.
3177
3178        Unfortunately implementing extra statistics is impractical at the
3179        moment since most of the actionable relevant data is expensive to
3180        compute. For example, it would be useful to know if the layers that opt
3181        out do so because of invisible or non-overlapping layers that cause a
3182        potential stacking container's children to be discontiguous, because we
3183        would potentially be able to mitigate the problem. However, this would
3184        add considerable overhead to perform overlap testing just to gather
3185        data.
3186
3187        No new tests (no change in behaviour).
3188
3189        * rendering/RenderLayer.cpp:
3190        (WebCore::RenderLayer::updateNeedsCompositedScrolling):
3191
3192 2013-03-08  Alberto Garcia  <agarcia@igalia.com>
3193
3194         [BlackBerry] GraphicsContext: rename addRoundedRectClip to clipRoundedRect
3195         https://bugs.webkit.org/show_bug.cgi?id=111852
3196
3197         Reviewed by Rob Buis.
3198
3199         This changed in r139353.
3200
3201         * platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
3202         (WebCore::GraphicsContext::clipRoundedRect):
3203
3204 2013-03-08  Alberto Garcia  <agarcia@igalia.com>
3205
3206         [BlackBerry] Add BlendMode parameter to GraphicsContext::setPlatformCompositeOperation
3207         https://bugs.webkit.org/show_bug.cgi?id=111840
3208
3209         Reviewed by Rob Buis.
3210
3211         This parameter was added in r137011.
3212
3213         * platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
3214         (WebCore::GraphicsContext::setPlatformCompositeOperation):
3215
3216 2013-03-08  Alberto Garcia  <agarcia@igalia.com>
3217
3218         [BlackBerry] Remove unused GraphicsContext::addInnerRoundedRectClip()
3219         https://bugs.webkit.org/show_bug.cgi?id=111838
3220
3221         Reviewed by Rob Buis.
3222
3223         This was removed in r139138.
3224
3225         * platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
3226
3227 2013-03-08  Alberto Garcia  <agarcia@igalia.com>
3228
3229         [BlackBerry] GraphicsContext: add fillRule parameter to clip() and canvasClip()
3230         https://bugs.webkit.org/show_bug.cgi?id=111836
3231
3232         Reviewed by Rob Buis.
3233
3234         This parameter was added in r139967.
3235
3236         * platform/graphics/blackberry/PathBlackBerry.cpp:
3237         (WebCore):
3238         (WebCore::GraphicsContext::clip):
3239         (WebCore::GraphicsContext::canvasClip):
3240
3241 2013-03-08  Vsevolod Vlasov  <vsevik@chromium.org>
3242
3243         Web Inspector: Get rid of file system ids and use file pathes as uri for file based uiSourceCodes.
3244         https://bugs.webkit.org/show_bug.cgi?id=111753
3245
3246         Reviewed by Pavel Feldman.
3247
3248         * inspector/front-end/FileSystemMapping.js:
3249         (WebInspector.FileSystemMappingImpl):
3250         (WebInspector.FileSystemMappingImpl.prototype._loadFromSettings.get this):
3251         (WebInspector.FileSystemMappingImpl.prototype._loadFromSettings):
3252         (WebInspector.FileSystemMappingImpl.prototype._saveToSettings):
3253         (WebInspector.FileSystemMappingImpl.prototype.set addFileSystemMapping):
3254         (WebInspector.FileSystemMappingImpl.prototype.removeFileSystemMapping):
3255         (WebInspector.FileSystemMappingImpl.prototype.fileSystemPaths):
3256         (WebInspector.FileSystemMappingImpl.prototype.fileSystemPathForPrefix):
3257         * inspector/front-end/FileSystemProjectDelegate.js:
3258         (WebInspector.FileSystemProjectDelegate.projectId):
3259         (WebInspector.FileSystemProjectDelegate.prototype.id):
3260         (WebInspector.FileSystemProjectDelegate.prototype.fileSystemPath):
3261         (WebInspector.FileSystemWorkspaceProvider):
3262         (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemAdded):
3263         (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemRemoved):
3264         (WebInspector.FileSystemWorkspaceProvider.prototype.fileSystemPath):
3265         * inspector/front-end/IsolatedFileSystemManager.js:
3266         (WebInspector.IsolatedFileSystemManager.prototype._innerAddFileSystem):
3267         (WebInspector.IsolatedFileSystemManager.prototype._fileSystemRemoved):
3268         * inspector/front-end/Workspace.js:
3269         (WebInspector.Workspace.prototype.uiSourceCodeForURL):
3270
3271 2013-03-08  Vsevolod Vlasov  <vsevik@chromium.org>
3272
3273         Web Inspector: Polish TabbedEditorContaner and ScriptsNavigator behavior.
3274         https://bugs.webkit.org/show_bug.cgi?id=111732
3275
3276         Reviewed by Pavel Feldman.
3277
3278         Resources matching inspectedPageURL are always expanded in NavigatorView now.
3279         Snippets tab in scripts navigator is not automatically opened anymore.
3280         Cleared saved TabbedEditorContainer history because it might have been corrupted due to errors in earlier versions.
3281         Snippets are not revealed in TabbedEditorContainer anymore unless they were actually selected by user or there is no other tabs opened.
3282
3283         * inspector/front-end/NavigatorView.js:
3284         (WebInspector.NavigatorView):
3285         (WebInspector.NavigatorView.prototype.addUISourceCode):
3286         (WebInspector.NavigatorView.prototype._inspectedURLChanged):
3287         (WebInspector.NavigatorView.prototype.revealUISourceCode):
3288         (WebInspector.NavigatorView.prototype.removeUISourceCode):
3289         (WebInspector.NavigatorFolderTreeElement.prototype.onattach):
3290         (WebInspector.NavigatorUISourceCodeTreeNode.prototype.uiSourceCode):
3291         (WebInspector.NavigatorUISourceCodeTreeNode.prototype.reveal):
3292         * inspector/front-end/ScriptsNavigator.js:
3293         (WebInspector.ScriptsNavigator.prototype.revealUISourceCode):
3294         * inspector/front-end/ScriptsPanel.js:
3295         (WebInspector.ScriptsPanel.prototype._showFile):
3296         * inspector/front-end/Settings.js:
3297         (WebInspector.VersionController.prototype._updateVersionFrom1To2):
3298         * inspector/front-end/TabbedEditorContainer.js:
3299         (WebInspector.TabbedEditorContainer.prototype.addUISourceCode.tabId.this._tabIds.get this):
3300         (WebInspector.TabbedEditorContainer.prototype.addUISourceCode):
3301         (WebInspector.TabbedEditorContainer.History.prototype._rebuildItemIndex):
3302
3303 2013-03-08  Vsevolod Vlasov  <vsevik@chromium.org>
3304
3305         Web Inspector: Add shortcut for running a snippet.
3306         https://bugs.webkit.org/show_bug.cgi?id=111680
3307
3308         Reviewed by Pavel Feldman.
3309
3310         Added Ctrl/Cmd+Enter as a shortcut for running a snippet.
3311
3312         * inspector/front-end/SnippetJavaScriptSourceFrame.js:
3313         (WebInspector.SnippetJavaScriptSourceFrame):
3314         (WebInspector.SnippetJavaScriptSourceFrame.prototype._runButtonClicked):
3315         (WebInspector.SnippetJavaScriptSourceFrame.prototype._runSnippet):
3316         (WebInspector.SnippetJavaScriptSourceFrame.prototype._onKeyDown):
3317
3318 2013-03-08  Philip Rogers  <pdr@google.com>
3319
3320         Prevent infinite loop in SVG use cycle detection
3321         https://bugs.webkit.org/show_bug.cgi?id=111822
3322
3323         Reviewed by Stephen Chenney.
3324
3325         SVG use cycle detection depended on idForStyleResolution() which differs from
3326         getIdAttribute() in quirks mode. During use tree cycle detection, this difference
3327         resulted in an infinite loop because idForStyleResolution() used lower-cased id
3328         attributes. This patch removes an existing fixme for this and switches to using
3329         getIdAttribute().
3330
3331         Test: svg/custom/use-cycle-detection.html
3332
3333         * svg/SVGUseElement.cpp:
3334         (WebCore::SVGUseElement::hasCycleUseReferencing):
3335
3336 2013-03-08  Yuki Sekiguchi  <yuki.sekiguchi@access-company.com>
3337
3338         When we set word-wrap: break-word and xml:space="preserve" to svg text element, the text is collapsed.
3339         https://bugs.webkit.org/show_bug.cgi?id=111675
3340
3341         Reviewed by Stephen Chenney.
3342
3343         RenderSVGText define its size when it laid out its first line at SVGRootInlineBox::computePerCharacterLayoutInformation().
3344
3345         In the following spec, SVG don't perform automatic line break or word wrapping.
3346         http://www.w3.org/TR/SVG/text.html#Introduction
3347         > SVG performs no automatic line breaking or word wrapping.
3348         However, when we set word-wrap: break-word and xml:space="preserve" to svg text element, RenderBlock::LineBreaker::nextLineBreak() breaks the text.
3349         This make single character lines and make RenderSVGText narrow.
3350
3351         We must ignore word-wrap property to make the text a single line.
3352
3353         We always disable break words and break all in nextLineBreak() when the object is SVGInlineText.
3354
3355         Test: svg/text/preserve-break-word.html
3356
3357         * rendering/RenderBlockLineLayout.cpp:
3358         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak): Disable break words and break all when we process SVG Text.
3359
3360 2013-03-08  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3361
3362         [Qt] HTML5 video - sound volume bar out of widget
3363         https://bugs.webkit.org/show_bug.cgi?id=108213
3364
3365         Reviewed by Jocelyn Turcotte.
3366
3367         Since we use Safari shadow DOM for media controls, follow
3368         the overall layout of Safari media control CSS.
3369
3370         * css/mediaControlsQt.css:
3371         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
3372         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
3373         (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
3374         (audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container):
3375         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
3376         (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display):
3377         (audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
3378         (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
3379         (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
3380         (audio::-webkit-media-controls-seek-back-button, video::-webkit-media-controls-seek-back-button):
3381         (audio::-webkit-media-controls-seek-forward-button, video::-webkit-media-controls-seek-forward-button):
3382         (audio::-webkit-media-controls-rewind-button, video::-webkit-media-controls-rewind-button):
3383         (audio::-webkit-media-controls-return-to-realtime-button, video::-webkit-media-controls-return-to-realtime-button):
3384         (audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button):
3385
3386 2013-03-08  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3387
3388         [Qt] Doesn't build with QtMultimedia
3389         https://bugs.webkit.org/show_bug.cgi?id=111847
3390
3391         Reviewed by Jocelyn Turcotte.
3392
3393         Fix include.
3394
3395         * platform/graphics/qt/MediaPlayerPrivateQt.h:
3396
3397 2013-03-08  Huang Dongsung  <luxtella@company100.net>
3398
3399         [EFL][Qt] REGRESSION(r144787): A fixed element lags when scrolling and wheeling.
3400         https://bugs.webkit.org/show_bug.cgi?id=111829
3401
3402         Reviewed by Noam Rosenthal.
3403
3404         Currently, flagsChanged deals with all boolean flags. It introduces this bug
3405         because when another flag (i.e. preserves3D) is changed, fixedToViewport is set
3406         to false. So this patch updates all flags when at least one flag is changed.
3407
3408         In addition, this patch amends isScrollable code to match other flags.
3409
3410         This patch can only be tested manually since there is no automated
3411         testing facilities for in-motion touch.
3412         Test: ManualTests/fixed-position.html
3413               ManualTests/nested-fixed-position.html
3414
3415         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
3416         (WebCore::CoordinatedGraphicsLayer::setScrollableArea):
3417         (WebCore::CoordinatedGraphicsLayer::syncLayerState):
3418         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
3419         (WebCore::CoordinatedGraphicsScene::setLayerState):
3420         * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
3421         (WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState):
3422
3423 2013-03-07  Dean Jackson  <dino@apple.com>
3424
3425         Remove dead label code in snapshotted plugin
3426         https://bugs.webkit.org/show_bug.cgi?id=111781
3427
3428         Reviewed by Tim Horton.
3429
3430         Since ports can use the shadow tree to do label display,
3431         there is no need for the hardcoded timers in RenderSnapshottedPlugin.
3432
3433         * rendering/RenderSnapshottedPlugIn.cpp: Remove label flags and timers.
3434         (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn):
3435         (WebCore::RenderSnapshottedPlugIn::~RenderSnapshottedPlugIn):
3436         (WebCore::RenderSnapshottedPlugIn::updateSnapshot):
3437         (WebCore::RenderSnapshottedPlugIn::handleEvent):
3438         * rendering/RenderSnapshottedPlugIn.h:
3439         (RenderSnapshottedPlugIn):
3440
3441 2013-03-07  Dean Jackson  <dino@apple.com>
3442
3443         Implement a custom appearance for the snapshotted plugin background
3444         https://bugs.webkit.org/show_bug.cgi?id=108368
3445
3446         Reviewed by Tim Horton.
3447
3448         After https://bugs.webkit.org/show_bug.cgi?id=108284 (r142507), a
3449         snapshotted plugin was no longer drawing the background of the
3450         label blurred. Since the snapshot content was now a shadow tree,
3451         it wasn't feasible to pre-blur a region of the snapshot: the label
3452         could be any size and in any location, with ports being able to
3453         override the appearance through their UA style sheet.
3454
3455         Instead we now use one of the elements in the tree, the snapshot-overlay,
3456         as a hook where ports can add any effect they want. This could be simply
3457         a border, or a transparent mask, or even a CSS filter. We introduce a custom
3458         CSS appearance "snapshotted-plugin-overlay", which could be added to the
3459         element in the injected UA stylesheet. This calls into RenderTheme in
3460         the same way that custom controls do.
3461
3462         Meanwhile, in RenderThemeMac, we implement the appearance by drawing the
3463         content of the plugin snapshot into the background of the element. That
3464         way we can add effects in CSS.
3465
3466         Test: plugins/snapshot-appearance.html
3467
3468         * css/CSSPrimitiveValueMappings.h:
3469         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Handle SnapshottedPluginOverlayPart.
3470         * css/CSSValueKeywords.in: New appearance value snapshotted-plugin-overlay.
3471         * platform/ThemeTypes.h: New value SnapshottedPluginOverlayPart.
3472         * html/HTMLPlugInElement.h:
3473         (WebCore::toHTMLPlugInElement): Add safer casting helpers.
3474         * html/HTMLPlugInImageElement.h:
3475         (WebCore::toHTMLPlugInImageElement): Ditto.
3476         * rendering/RenderSnapshottedPlugIn.cpp: Remove the code for handling
3477             the blur directly in the renderer.
3478         (WebCore::RenderSnapshottedPlugIn::paint): Simplify the paint logic since we're
3479             no longer trying to blur here.
3480         (WebCore::RenderSnapshottedPlugIn::paintSnapshot): Ditto.
3481         * rendering/RenderSnapshottedPlugIn.h: Remove the methods that were trying
3482             to blur the image directly.
3483         * rendering/RenderTheme.cpp:
3484         (WebCore::RenderTheme::paint): Call paintSnapshottedPluginOverlay.
3485         * rendering/RenderTheme.h:
3486         (WebCore::RenderTheme::paintSnapshottedPluginOverlay): New virtual method with default implementation.
3487         * rendering/RenderThemeMacShared.h:
3488         (RenderThemeMacShared): Override paintSnapshottedPluginOverlay.
3489         * rendering/RenderThemeMacShared.mm:
3490         (WebCore::RenderThemeMacShared::paintSnapshottedPluginOverlay): Implement a custom render path
3491             that takes the snapshot image from the node's parent, and draws it into the background.
3492             Along the way make sure we're actually using the right type of element (an HTMLPlugInImageElement).
3493
3494 2013-03-08  Sergio Villar Senin  <svillar@igalia.com>
3495
3496         Improve drag&drop of list items in contentEditable divs
3497         https://bugs.webkit.org/show_bug.cgi?id=111556
3498
3499         Reviewed by Ryosuke Niwa.
3500
3501         A single fully selected <li> should generate the same markup as if
3502         we were selecting some of them, i.e., we should preserve the list
3503         structure and appearance.
3504
3505         Test: editing/selection/drag-list-item.html
3506
3507         * editing/htmlediting.cpp:
3508         (WebCore::isListItem): modified constness.
3509         * editing/htmlediting.h:
3510         (WebCore): ditto.
3511         * editing/markup.cpp:
3512         (WebCore::highestAncestorToWrapMarkup):
3513
3514 2013-03-08  Alberto Garcia  <agarcia@igalia.com>
3515
3516         [BlackBerry] LayerTiler: rename currentFrameHasAlpha as currentFrameKnownToBeOpaque
3517         https://bugs.webkit.org/show_bug.cgi?id=111828
3518
3519         Reviewed by Carlos Garcia Campos.
3520
3521         This changed in r141637.
3522
3523         * platform/graphics/blackberry/LayerTiler.cpp:
3524         (WebCore::LayerTiler::updateTextureContentsIfNeeded):
3525
3526 2013-03-08  Antoine Quint  <graouts@apple.com>
3527
3528         Fix a couple of typos.
3529
3530         Unreviewed.
3531
3532         * inspector/Inspector.json:
3533
3534 2013-03-08  Carlos Garcia Campos  <cgarcia@igalia.com>
3535
3536         [BlackBerry] Use OwnPtr for CredentialBackingStore members
3537         https://bugs.webkit.org/show_bug.cgi?id=111737
3538
3539         Reviewed by Rob Buis.
3540
3541         It simplifies the code a bit.
3542
3543         * platform/network/blackberry/CredentialBackingStore.cpp:
3544         (WebCore::CredentialBackingStore::~CredentialBackingStore):
3545         (WebCore::CredentialBackingStore::open):
3546         (WebCore::CredentialBackingStore::certMgrWrapper):
3547         * platform/network/blackberry/CredentialBackingStore.h:
3548         (CredentialBackingStore):
3549
3550 2013-03-07  Gavin Barraclough  <barraclough@apple.com>
3551
3552         MemoryPressureHandler should fully flush the WebCore & NS URL caches
3553         https://bugs.webkit.org/show_bug.cgi?id=111827
3554
3555         Rubber Stamped by Geoff Garen
3556
3557         When the handler is fired we should free as much memory as possible.
3558
3559         * platform/mac/MemoryPressureHandlerMac.mm:
3560         (WebCore::MemoryPressureHandler::releaseMemory):
3561             - fully flush the WebCore & NS URL caches
3562
3563 2013-03-07  Keishi Hattori  <keishi@webkit.org>
3564
3565         Update calendar picker UI
3566         https://bugs.webkit.org/show_bug.cgi?id=109439
3567
3568         Reviewed by Kent Tamura.
3569
3570         This patch changes the calendar picker UI.
3571
3572         Added tests to existing calendar picker tests.
3573         Test: platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-month-popup.html
3574
3575         * Resources/pagepopups/calendarPicker.css:
3576         (body):
3577         (.rtl):
3578         (.scroll-view):
3579         (.scroll-view-content):
3580         (.list-cell):
3581         (.list-cell.hidden):
3582         (.day-cell):
3583         (.week-number-cell):
3584         (.day-cell.today):
3585         (.day-cell.highlighted):
3586         (.day-cell.highlighted.disabled):
3587         (.day-cell.selected):
3588         (.day-cell.disabled):
3589         (.day-cell.current-month):
3590         (.calendar-table-view):
3591         (.preparing .calendar-table-view:focus):
3592         (.week-day-label):
3593         (.week-number-label):
3594         (.calendar-table-header-view):
3595         (.calendar-picker):
3596         (.calendar-header-view):
3597         (.calendar-title):
3598         (.rtl .calendar-title):
3599         (.month-popup-button:disabled):
3600         (.month-popup-button):
3601         (.month-popup-button .disclosure-triangle):
3602         (.month-popup-button .disclosure-triangle svg):
3603         (.today-button::after):
3604         (.calendar-navigation-button):
3605         (.year-list-view):
3606         (.year-list-cell):
3607         (.year-list-cell .label):
3608         (.year-list-cell .month-chooser):
3609         (.month-buttons-row):
3610         (.month-button):
3611         (.month-button.highlighted):
3612         (.scrubby-scroll-bar):
3613         (.scrubby-scroll-thumb):
3614         (.month-popup-view):
3615         (.year-list-view .scrubby-scroll-bar):
3616         (.rtl .year-list-view .scrubby-scroll-bar):
3617         * Resources/pagepopups/calendarPicker.js:
3618         (setGlobalParams): Sets the global params.
3619         (initialize):
3620         (openCalendarPicker):
3621         (CalendarHeaderView.prototype.onNavigationButtonClick): Fix typo.
3622         (CalendarPicker):
3623         (CalendarPicker.prototype.onWindowResize): We want to have the "preparing" class applied
3624         to cancel css transitions while setting up the calendar picker so we can avoid flaky pixel tests.
3625         (CalendarPicker.prototype.onYearListViewDidHide): The user clicked on a month so hide the month popup.
3626         (CalendarPicker.prototype.onYearListViewDidSelectMonth): Change the current month in response to the month popup.
3627         (CalendarPicker.prototype.attachTo): We want the calendar table focused when the calendar picker first opens.
3628         (CalendarPicker.prototype.cleanup): Clean up any event listeners or elements attached to nodes outside of this.element.
3629         (CalendarPicker.prototype.onMonthPopupButtonClick): Open the month popup in response to the month popup button being clicked.
3630         (CalendarPicker.prototype._setConfig): Configures the calendar picker.
3631         (CalendarPicker.prototype.currentMonth): The currently shown month.
3632         (CalendarPicker.prototype.setCurrentMonth): Scrolls the calendar table to the given month. Use the navigation behavior param to specify if you want a transition animation.
3633         (CalendarPicker.prototype.adjustHeight): Adjusts the height so its just tall enough to fit the current month. If the month picker is open, fit that.
3634         (CalendarPicker.prototype.selection): Currently selected date range.
3635         (CalendarPicker.prototype.highlight): Currently highlighted date range.
3636         (CalendarPicker.prototype.firstVisibleDay): Returns the first visible day ignoring scroll animation (i.e. this is the first visible day when the scroll animation is done).
3637         (CalendarPicker.prototype.lastVisibleDay): Returns the last visible day ignoring scroll animation.
3638         (CalendarPicker.prototype.selectRangeContainingDay): Sets the selection to the date range containing the given day.
3639         (CalendarPicker.prototype.highlightRangeContainingDay): Sets the highlight to the date range containing the given day.
3640         (CalendarPicker.prototype.setSelection): Sets the selection to the given date range.
3641         (CalendarPicker.prototype._setHighlight): Sets the highlight to the given date range.
3642         (CalendarPicker.prototype._stepMismatch): Just moving.
3643         (CalendarPicker.prototype._outOfRange): Ditto.
3644         (CalendarPicker.prototype.isValid): Returns true if the given date range is a valid selection.
3645         (CalendarPicker.prototype.isValidDay): Returns true if the day is part of a valid selection.
3646         (CalendarPicker.prototype._moveHighlight): Moves the highlight to the given date range if possible. Returns true if it succeeds.
3647         (CalendarPicker.prototype.onCalendarTableKeyDown): Handles the arrow keys, etc.
3648         (CalendarPicker.prototype.width):
3649         (CalendarPicker.prototype.height):
3650         (CalendarPicker.prototype.setHeight):
3651         (CalendarPicker.prototype.onBodyKeyDown): Handles esc/m/y/d.
3652         * Resources/pagepopups/chromium/calendarPickerChromium.css:
3653         (.calendar-table-view:focus):
3654         (.preparing .calendar-table-view:focus):
3655
3656 2013-03-07  Seokju Kwon  <seokju.kwon@gmail.com>
3657
3658         Web Inspector: Remove unused return value after r122962
3659         https://bugs.webkit.org/show_bug.cgi?id=111821
3660
3661         Reviewed by Pavel Feldman.
3662
3663         No new tests.
3664
3665         * inspector/front-end/ConsolePanel.js:
3666         (WebInspector.ConsolePanel.prototype.jumpToPreviousSearchResult):
3667         * inspector/front-end/ElementsPanel.js:
3668         (WebInspector.ElementsPanel.prototype.jumpToPreviousSearchResult):
3669         * inspector/front-end/ScriptsPanel.js:
3670         (WebInspector.ScriptsPanel.prototype.jumpToPreviousSearchResult):
3671
3672 2013-03-07  Sheriff Bot  <webkit.review.bot@gmail.com>
3673
3674         Unreviewed, rolling out r145166.
3675         http://trac.webkit.org/changeset/145166
3676         https://bugs.webkit.org/show_bug.cgi?id=111819
3677
3678         build break - no symbol
3679         webkit_support::CreateScopedTempDirectory() (Requested by
3680         hayato on #webkit).
3681
3682         * Modules/indexeddb/IDBBackingStore.cpp:
3683         (WebCore::IDBBackingStore::IDBBackingStore):
3684         (WebCore::IDBBackingStore::~IDBBackingStore):
3685         (WebCore::IDBBackingStore::open):
3686         * Modules/indexeddb/IDBBackingStore.h:
3687         (WebCore):
3688         (IDBBackingStore):
3689         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
3690         (WebCore::IDBFactoryBackendImpl::addIDBBackingStore):
3691         (WebCore):
3692         (WebCore::IDBFactoryBackendImpl::removeIDBBackingStore):
3693         (WebCore::IDBFactoryBackendImpl::openBackingStore):
3694         * Modules/indexeddb/IDBFactoryBackendImpl.h:
3695         (IDBFactoryBackendImpl):
3696
3697 2013-03-07  Hajime Morrita  <morrita@google.com>
3698
3699         Custom Elements: CustomElement constructor shouldn't share function instance
3700         https://bugs.webkit.org/show_bug.cgi?id=111807
3701
3702         Reviewed by Kentaro Hara.
3703
3704         Adaptor functions of custom elements unintentionally share the instance.
3705         This fix gives new one for each.
3706
3707         Test: Updated fast/dom/custom/document-register-basic.html
3708
3709         * bindings/v8/V8AdaptorFunction.cpp:
3710         (WebCore::V8AdaptorFunction::wrap):
3711
3712 2013-03-07  Jared Wyles  <wyles@adobe.com>
3713
3714         Reading border radius from style property returns in wrong order.
3715         https://bugs.webkit.org/show_bug.cgi?id=110853
3716
3717         Reviewed by Ryosuke Niwa
3718         
3719         Updating the order of border-radius to return in the order specified
3720         in http://www.w3.org/TR/css3-background/#the-border-radius
3721
3722         Tests updated in LayoutTests/fast/borders/border-radius-parsing.html 
3723         Changed the expectations in LayoutTests/inspector/elements/elements-panel-styles-expected.txt 
3724         
3725         Compat information -
3726         jQuery's css function favours using getComputedStyle for elements so that should not be impacted.
3727         Zepto does check for the element on style first so may be a slight concern there.
3728
3729         * css/StylePropertyShorthand.cpp:
3730         (WebCore::borderRadiusShorthand):
3731
3732 2013-03-07  Andreas Kling  <akling@apple.com>
3733
3734         Resizing Cappuccino is very laggy on WebKit since Safari 5.1
3735         <http://webkit.org/b/71354>
3736         <rdar://problem/10565998>
3737
3738         Reviewed by Anders Carlsson.
3739
3740         * WebCore.exp.in: Export FloatPoint(const NSPoint&)
3741
3742 2013-03-07  Andreas Kling  <akling@apple.com>
3743
3744         Remove desktop version of -webkit-text-size-adjust property.
3745         <http://webkit.org/b/56543>
3746         <rdar://problem/9150203>
3747
3748         Reviewed by Simon Fraser.
3749
3750         This property existed to support a number of Apple-internal clients of WebKit.
3751         We no longer need this property, and since it's clashing with a mobile version of the
3752         same property with different meaning, let's remove it altogether from the desktop build.
3753
3754         * css/CSSComputedStyleDeclaration.cpp:
3755         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3756         * css/CSSParser.cpp:
3757         (WebCore::isValidKeywordPropertyAndValue):
3758         (WebCore::isKeywordPropertyID):
3759         (WebCore::CSSParser::parseValue):
3760         * css/CSSPrimitiveValue.cpp:
3761         (WebCore::CSSPrimitiveValue::computeLengthDouble):
3762         * css/CSSProperty.cpp:
3763         (WebCore::CSSProperty::isInheritedProperty):
3764         * css/CSSPropertyNames.in:
3765         * css/StyleBuilder.cpp:
3766         (WebCore::ApplyPropertyLineHeight::applyValue):
3767         * css/StyleResolver.cpp:
3768         (WebCore::StyleResolver::updateFont):
3769         (WebCore::StyleResolver::applyProperties):
3770         (WebCore::StyleResolver::applyProperty):
3771         * css/StyleResolver.h:
3772         (StyleResolver):
3773         * css/svg.css:
3774         * editing/EditingStyle.cpp:
3775         * inspector/front-end/inspector.css:
3776         (#console-messages):
3777         * inspector/front-end/resourcesPanel.css:
3778         (.storage-view.query):
3779         * rendering/style/RenderStyle.cpp:
3780         (WebCore::RenderStyle::diff):
3781         * rendering/style/RenderStyle.h:
3782         * rendering/style/StyleRareInheritedData.cpp:
3783         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
3784         (WebCore::StyleRareInheritedData::operator==):
3785         * rendering/style/StyleRareInheritedData.h:
3786         (StyleRareInheritedData):
3787
3788 2013-03-07  Joshua Bell  <jsbell@chromium.org>
3789
3790         IndexedDB: Use WeakPtr for Factory-to-BackingStore reference
3791         https://bugs.webkit.org/show_bug.cgi?id=111459
3792
3793         Reviewed by Adam Barth.
3794
3795         IDBFactoryBackendImpl maintains a map of backing stores - if another database in the same
3796         origin is opened, the backing store instance must be re-used). This was a map to raw
3797         pointers so that the backing store can be collected when all database references are
3798         dropped. The map was maintained manually by passing the factory to the IDBBackingStore which
3799         would add/remove itself on creation/destruction.
3800
3801         Replace this with a HashMap<WeakPtr<>>. This simplifies the plumbing; map entries
3802         "leak" but are purged on subsequent opens.
3803
3804         Added webkit_unit_test (Chromium port) to verify refcounts.
3805
3806         * Modules/indexeddb/IDBBackingStore.cpp:
3807         (WebCore::IDBBackingStore::IDBBackingStore): No need to notify factory of lifetime.
3808         (WebCore::IDBBackingStore::~IDBBackingStore): Ditto.
3809         (WebCore::IDBBackingStore::open): Ditto.
3810         * Modules/indexeddb/IDBBackingStore.h: No reference to the factory, but...
3811         (WebCore::IDBBackingStore::createWeakPtr): Do need to expose weak pointers for the factory to hold.
3812         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
3813         (WebCore::cleanWeakMap): Helper function to scrub a HashMap<WeakPtr<T>> of empty pointers.
3814         May move to WTF when we've learned how general it is, or come up with a dedicated WeakPtrHashMap type.
3815         (WebCore::IDBFactoryBackendImpl::openBackingStore): WeakPtr fu.
3816         * Modules/indexeddb/IDBFactoryBackendImpl.h:
3817         (IDBFactoryBackendImpl): Remove plumbing methods.
3818
3819 2013-03-07  Otto Derek Cheung  <otcheung@rim.com>
3820
3821         [BlackBerry] RefCounting ParsedCookie to avoid SegFaults
3822         https://bugs.webkit.org/show_bug.cgi?id=111761
3823
3824         Reviewed by Rob Buis.
3825
3826         Making necessary changes to ref count the ParsedCookie object.
3827
3828         Tested using the opera cookie test suite and the BB Browser cookie test suite.
3829         Tested using the browser, visiting popular sites such as facebook, reddit, google etc
3830         to ensure cookie functionality isn't changed.
3831
3832         * loader/blackberry/CookieJarBlackBerry.cpp:
3833         (WebCore::getRawCookies):
3834         * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.cpp:
3835         (WebCore::CookieDatabaseBackingStore::insert):
3836         (WebCore::CookieDatabaseBackingStore::update):
3837         (WebCore::CookieDatabaseBackingStore::remove):
3838         (WebCore::CookieDatabaseBackingStore::getCookiesFromDatabase):
3839         (WebCore::CookieDatabaseBackingStore::invokeGetCookiesWithLimit):
3840         (WebCore::CookieDatabaseBackingStore::invokeSendChangesToDatabase):
3841         (WebCore::CookieDatabaseBackingStore::addToChangeQueue):
3842         * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.h:
3843         (CookieDatabaseBackingStore):
3844         * platform/blackberry/CookieManager.cpp:
3845         (WebCore::cookieSorter):
3846         (WebCore::CookieManager::setCookies):
3847         (WebCore::CookieManager::getCookie):
3848         (WebCore::CookieManager::generateHtmlFragmentForCookies):
3849         (WebCore::CookieManager::getRawCookies):
3850         (WebCore::CookieManager::checkAndTreatCookie):
3851         (WebCore::CookieManager::addCookieToMap):
3852         (WebCore::CookieManager::getBackingStoreCookies):
3853         (WebCore::CookieManager::findOrCreateCookieMap):
3854         (WebCore::CookieManager::removeCookieWithName):
3855         (WebCore::CookieManager::cookieLimitCleanUp):
3856         * platform/blackberry/CookieManager.h:
3857         * platform/blackberry/CookieMap.cpp:
3858         (WebCore::CookieMap::addOrReplaceCookie):
3859         (WebCore::CookieMap::removeCookieAtIndex):
3860         (WebCore::CookieMap::removeCookie):
3861         (WebCore::CookieMap::getAllCookies):
3862         (WebCore::CookieMap::removeOldestCookie):
3863         (WebCore::CookieMap::deleteAllCookiesAndDomains):
3864         (WebCore::CookieMap::getAllChildCookies):
3865         * platform/blackberry/CookieMap.h:
3866         (CookieMap):
3867         * platform/blackberry/CookieParser.cpp:
3868         (WebCore):
3869         (WebCore::CookieParser::parse):
3870         (WebCore::CookieParser::parseOneCookie):
3871         * platform/blackberry/CookieParser.h:
3872         (CookieParser):
3873         * platform/blackberry/ParsedCookie.cpp:
3874         * platform/blackberry/ParsedCookie.h:
3875         (ParsedCookie):
3876         (WebCore::ParsedCookie::create):
3877
3878 2013-03-07  Aaron Colwell  <acolwell@chromium.org>
3879
3880         Heap-use-after-free in WebCore::HTMLMediaElement::~HTMLMediaElement
3881         https://bugs.webkit.org/show_bug.cgi?id=110623
3882
3883         Reviewed by Kentaro Hara.
3884
3885         Test: http/tests/misc/delete-frame-during-readystatechange-with-gc-after-video-removal.html
3886
3887         * bindings/v8/V8GCController.cpp: Fix MinorGCWrapperVisitor so it doesn't collect ActiveDOMObjects
3888                                           that have pending activity.
3889         * html/HTMLAudioElement.h:
3890         (HTMLAudioElement): Removed hasPendingActivity() now that this is handled by the base class.
3891         * html/HTMLAudioElement.idl: Removed ActiveDOMObject annotation since HTMLMediaElement now has it.
3892         * html/HTMLMediaElement.cpp:
3893         (WebCore::HTMLMediaElement::hasPendingActivity): Update implementation to return true if the media
3894                                                          has audio and is playing. This brings the code into
3895                                                          compliance with the detached element behavior outlined
3896                                                          in the HTML5 spec.
3897         * html/HTMLMediaElement.idl: Added ActiveDOMObject annotation so that all derived classes are
3898                                      considered ActiveDOMObjects.
3899
3900 2013-03-07  Jeffrey Pfau  <jpfau@apple.com>
3901
3902         CFNetwork cache partitioning does not work properly on subdomains
3903         https://bugs.webkit.org/show_bug.cgi?id=111772
3904
3905         Reviewed by David Kilzer.
3906
3907         Ensure that the cache partitioning is done over the top privately-controlled domain for the NSURLRequest.
3908
3909         Not possible to test with current automated test tools, must be tested manually.
3910
3911         * loader/cache/MemoryCache.cpp: Remove extraneous calls to partitionName
3912         (WebCore):
3913         (WebCore::MemoryCache::add):
3914         (WebCore::MemoryCache::revalidationSucceeded):
3915         (WebCore::MemoryCache::resourceForRequest):
3916         (WebCore::MemoryCache::evict):
3917         (WebCore::MemoryCache::removeResourcesWithOrigin):
3918         * platform/network/cf/ResourceRequest.h: Put top privately-controlled domain reduction code into ResourceRequest::partitionName
3919         (ResourceRequest):
3920         (WebCore::ResourceRequest::cachePartition):
3921         (WebCore::ResourceRequest::setCachePartition): Pre-process the partition name
3922         * platform/network/cf/ResourceRequestCFNet.cpp:
3923         (WebCore):
3924         (WebCore::ResourceRequest::partitionName):
3925         * platform/network/mac/ResourceRequestMac.mm:
3926         (WebCore::ResourceRequest::doUpdatePlatformRequest): Use a UTF-8 version of the cache partition name
3927
3928 2013-03-07  Kenneth Russell  <kbr@google.com>
3929
3930         Compute WebGL context attributes from DrawingBuffer when it is used
3931         https://bugs.webkit.org/show_bug.cgi?id=111666
3932
3933         Reviewed by James Robinson.
3934
3935         Fixed computation of antialias flag when DrawingBuffer is used.
3936
3937         No new tests; covered by existing tests. Ran WebGL conformance
3938         tests on desktop Linux and Android to test.
3939
3940         * html/canvas/WebGLRenderingContext.cpp:
3941         (WebCore):
3942         (WebCore::WebGLRenderingContext::getContextAttributes):
3943             Query DrawingBuffer, when used, for antialias flag.
3944
3945 2013-03-07  Beth Dakin  <bdakin@apple.com>
3946
3947         Need API to draw custom overhang area
3948         https://bugs.webkit.org/show_bug.cgi?id=111679
3949         -and corresponding-
3950         <rdar://problem/13291415>
3951
3952         Reviewed by Simon Fraser.
3953
3954         This will allow clients to put custom images into the top or bottom overhang area.
3955
3956         New FrameView API takes a bool indicating whether the client wants a top/bottom 
3957         overhang layer. If the bool is true, the overhang layer will be returned. 
3958         * WebCore.exp.in:
3959         * page/FrameView.cpp:
3960         (WebCore::FrameView::setWantsLayerForTopOverHangArea):
3961         (WebCore::FrameView::setWantsLayerForBottomOverHangArea):
3962         * page/FrameView.h:
3963         (FrameView):
3964
3965         Keep member variables for the top and bottom overhang layers. Create them if 
3966         necessary, and update them if the root layer changes.
3967         * rendering/RenderLayerCompositor.cpp:
3968         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
3969         (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
3970         (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
3971         (WebCore::RenderLayerCompositor::reportMemoryUsage):
3972         * rendering/RenderLayerCompositor.h:
3973         (RenderLayerCompositor):
3974
3975 2013-03-07  Gavin Barraclough  <barraclough@apple.com>
3976
3977         Reduce page cache size on Mac
3978         https://bugs.webkit.org/show_bug.cgi?id=111795
3979
3980         Rubber stamped by Geoff Garen
3981
3982         5 entries is unnecessarily large; research show 3 should suffice.
3983         On a low memory warning we should clear this completely.
3984
3985         * platform/mac/MemoryPressureHandlerMac.mm:
3986         (WebCore::MemoryPressureHandler::releaseMemory):
3987             - clear the page cache completely
3988
3989 2013-03-07  Simon Fraser  <simon.fraser@apple.com>
3990
3991         Rename Mac's TileCache to TileController, and WebTileCacheLayer to WebTiledBackingLayer
3992         https://bugs.webkit.org/show_bug.cgi?id=111779
3993
3994         Reviewed by Tim Horton.
3995         
3996         "TileCache" was a name conflict in downstream code, so rename it to TileController.
3997         The layer that has a TileController is now a WebTiledBackingLayer (which fits with
3998         the TiledBacking API that TileController exposes).
3999         
4000         Also renamed the flags in PlatformCALayer to match.
4001
4002         Rename only, no behavior change.
4003
4004         * WebCore.xcodeproj/project.pbxproj:
4005         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
4006         (WebCore::ScrollingTreeScrollingNodeMac::logExposedUnfilledArea):
4007         * platform/graphics/GraphicsLayerClient.h:
4008         (WebCore::GraphicsLayerClient::shouldUseTiledBacking):
4009         * platform/graphics/ca/GraphicsLayerCA.cpp:
4010         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
4011         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
4012         (WebCore::GraphicsLayerCA::platformCALayerShowRepaintCounter):
4013         (WebCore::GraphicsLayerCA::platformCALayerDidCreateTiles):
4014         (WebCore::GraphicsLayerCA::updateVisibleRect):
4015         (WebCore::GraphicsLayerCA::getDebugBorderInfo):
4016         (WebCore::GraphicsLayerCA::requiresTiledLayer):
4017         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
4018         * platform/graphics/ca/GraphicsLayerCA.h:
4019         * platform/graphics/ca/PlatformCALayer.h:
4020         (WebCore::PlatformCALayer::usesTiledBackingLayer):
4021         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
4022         (PlatformCALayer::PlatformCALayer):
4023         (PlatformCALayer::~PlatformCALayer):
4024         (PlatformCALayer::tiledBacking):
4025         * platform/graphics/ca/mac/TileController.h: Renamed from Source/WebCore/platform/graphics/ca/mac/TileCache.h.
4026         * platform/graphics/ca/mac/WebTileLayer.h:
4027         (TileController):
4028         * platform/graphics/ca/mac/WebTileLayer.mm:
4029         (-[WebTileLayer drawInContext:]):
4030         (-[WebTileLayer setTileController:WebCore::]):