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