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