0cae38b2cfc6dc32f69ba83b9abca94763e599f9
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-03-22  Mario Sanchez Prada  <msanchez@igalia.com>
2
3         [GTK] Fix the only remaining coding style issue in GTK accessibility code
4         https://bugs.webkit.org/show_bug.cgi?id=81885
5
6         Reviewed by Xan Lopez.
7
8         Add needed extra line and remove an unneeded one.
9
10         * accessibility/gtk/AccessibilityObjectAtk.cpp:
11
12 2012-03-22  Kent Tamura  <tkent@chromium.org>
13
14         Expand RenderTextControlSingleLine::controlClipRect() to contain contentRect().
15         https://bugs.webkit.org/show_bug.cgi?id=81866
16
17         Reviewed by Hajime Morita.
18
19         We need to expand the controlClipRect because the existing shadow
20         tree of a text field can be wrapped by another shadow tree. e.g.
21
22         A current situation:
23
24         <input>
25           ┗ ShadowRoot
26              ┗ container element
27         ┌────────────┐<input>'s border box
28         │┌──────────┐│
29         ││container box       ││
30         │└──────────┘│
31         └────────────┘
32
33         Wrapped by another ShadowRoot:
34
35         <input>
36           ┗ New ShadowRoot
37              ┣ <shadow> represents the existing shadow tree
38              ┃  ┗ container element
39              ┗ D: an additional decoration element
40         ┌────────────┐<input>'s border box
41         │┌───────┬──┐│
42         ││container box │ D  ││
43         │└───────┴──┘│
44         └────────────┘
45         In this case, if we clip child renderers by container box, D is not
46         drawn. We should clip by the content box of the <input>.
47
48         A search field has an exceptional behavior. It can have the container
49         box of which height is taller than the content box height. The
50         controlClipRect should contain both of the container box and the content
51         box in this case. In other cases, the container box is equivalent to the
52         content box. So the code always unites them.
53
54         No new tests. This won't make any behavior change for now.
55
56         * rendering/RenderTextControlSingleLine.cpp:
57         (WebCore::RenderTextControlSingleLine::controlClipRect):
58
59 2012-03-22  Yoshifumi Inoue  <yosin@chromium.org>
60
61         [Forms] The option element should not be form associated element.
62         https://bugs.webkit.org/show_bug.cgi?id=79764
63
64         Reviewed by Kent Tamura.
65
66         This patch changes base class of HTMLOptionELement to HTMLElement
67         from HTMLFormControlElement for saving memory space and iteration
68         time of extra "option" elements in HTMLFormElement::m_formAssociatedElements
69         and matching the HTML5 specification for ease of maintenance.
70
71         This patch changes behavior of handling of CSS pseudo classes "invalid"
72         and "valid". The "option" elements no longer use these CSS pseudo classes
73         as HTML5 specification. This bug was filed in https://bugs.webkit.org/show_bug.cgi?id=80088
74
75         Changes of TextIterator is lead by usage of isFormControlElement. This
76         changes will be replaced with more meaningful predicate as part of
77         https://bugs.webkit.org/show_bug.cgi?id=80381
78
79         No new tests but updated select-live-pseudo-selectors.html test.
80
81         * css/CSSStyleSelector.cpp:
82         (WebCore::CSSStyleSelector::canShareStyleWithElement): Added checking of the "option" element and returns false as HTMLFormControlElement.
83         * css/SelectorChecker.cpp:
84         (WebCore::SelectorChecker::checkOneSelector): Removed isFormControlElement for PseudoDisabled and PseudoChecked.
85         * html/HTMLKeygenElement.cpp:
86         (WebCore::HTMLKeygenElement::HTMLKeygenElement): Removed form parameter of call site of HTMLOptionElement::create.
87         * html/HTMLOptionElement.cpp:
88         (WebCore::HTMLOptionElement::HTMLOptionElement): Removed form parameter which no longer needed. Changed base class in initialization list. Added m_disabled initialization.
89         (WebCore::HTMLOptionElement::create): Removed form parameter which no longer needed.
90         (WebCore::HTMLOptionElement::attach): Changeid base class.
91         (WebCore::HTMLOptionElement::detach): Changed base class.
92         (WebCore::HTMLOptionElement::parseAttribute): Changed base class. Added "disabled" attribute handling.
93         (WebCore::HTMLOptionElement::childrenChanged): Changed base class.
94         (WebCore::HTMLOptionElement::insertedIntoTree): Changed base class.
95         * html/HTMLOptionElement.h:
96         (HTMLOptionElement): Added new member variable m_disabled which was in HTMLFormControlElement.
97         (WebCore::HTMLOptionElement::ownElementDisabled): Changed for using m_disabled.
98         * html/HTMLTagNames.in: Removed constructorNeedsFormElement for the "option" element, which was used for passing form parameter to create function.
99
100 2012-03-21  Pavel Podivilov  <podivilov@chromium.org>
101
102         Web Inspector: rename ClosureCompilerSourceMapping to SourceMapParser and move it to CompilerScriptMapping.js.
103         https://bugs.webkit.org/show_bug.cgi?id=81780
104
105         Reviewed by Pavel Feldman.
106
107         * WebCore.gypi:
108         * WebCore.vcproj/WebCore.vcproj:
109         * inspector/compile-front-end.py:
110         * inspector/front-end/CompilerScriptMapping.js:
111         (WebInspector.CompilerScriptMapping.prototype.loadSourceMapForScript):
112         (WebInspector.SourceMapParserPayload):
113         (WebInspector.SourceMapParser):
114         (WebInspector.SourceMapParser.prototype.load):
115         (WebInspector.SourceMapParser.prototype.compiledLocationToSourceLocation):
116         (WebInspector.SourceMapParser.prototype.sourceLocationToCompiledLocation):
117         (WebInspector.SourceMapParser.prototype.sources):
118         (WebInspector.SourceMapParser.prototype.loadSourceCode):
119         (WebInspector.SourceMapParser.prototype._findMapping):
120         (WebInspector.SourceMapParser.prototype._parseMappingPayload):
121         (WebInspector.SourceMapParser.prototype._parseSections):
122         (WebInspector.SourceMapParser.prototype._parseMap):
123         (WebInspector.SourceMapParser.prototype._isSeparator):
124         (WebInspector.SourceMapParser.prototype._decodeVLQ):
125         (WebInspector.SourceMapParser.prototype._canonicalizeURL):
126         (WebInspector.SourceMapParser.StringCharIterator):
127         (WebInspector.SourceMapParser.StringCharIterator.prototype.next):
128         (WebInspector.SourceMapParser.StringCharIterator.prototype.peek):
129         (WebInspector.SourceMapParser.StringCharIterator.prototype.hasNext):
130         * inspector/front-end/CompilerSourceMapping.js: Removed.
131         * inspector/front-end/WebKit.qrc:
132         * inspector/front-end/inspector.html:
133
134 2012-03-21  Vsevolod Vlasov  <vsevik@chromium.org>
135
136         Web Inspector: IndexedDB transaction is not closed when requesting data.
137         https://bugs.webkit.org/show_bug.cgi?id=81837
138
139         Reviewed by Pavel Feldman.
140
141         * inspector/InspectorIndexedDBAgent.cpp: Added missing IDBCursorBackendInterface::postSuccessHandlerCallback() call.
142         (WebCore):
143
144 2012-03-21  Yury Semikhatsky  <yurys@chromium.org>
145
146         Web Inspector: event listeners section is broken for about:blank page
147         https://bugs.webkit.org/show_bug.cgi?id=81795
148
149         Parse about:blank as a valid URL.
150
151         Reviewed by Pavel Feldman.
152
153         Test: inspector/elements/event-listeners-about-blank.html
154
155         * inspector/front-end/utilities.js:
156         (String.prototype.asParsedURL):
157
158 2012-03-21  Dan Bernstein  <mitz@apple.com>
159
160         REGRESSION (r111635): Assertion failure in RenderFlexibleBox::layoutFlexItems() (!lineContexts.size()) in many flexbox tests
161         https://bugs.webkit.org/show_bug.cgi?id=81870
162
163         Reverted r111635, the fix for bug 81843.
164
165         * rendering/RenderFlexibleBox.cpp:
166         (WebCore::RenderFlexibleBox::WrapReverseContext::WrapReverseContext):
167         (WebCore::RenderFlexibleBox::WrapReverseContext::addCrossAxisOffset):
168         (RenderFlexibleBox::WrapReverseContext):
169         (WebCore::RenderFlexibleBox::WrapReverseContext::addNumberOfChildrenOnLine):
170         (WebCore::RenderFlexibleBox::WrapReverseContext::lineCrossAxisDelta):
171         (WebCore::RenderFlexibleBox::layoutFlexItems):
172         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
173         (WebCore::RenderFlexibleBox::alignChildren):
174         (WebCore::RenderFlexibleBox::flipForWrapReverse):
175         * rendering/RenderFlexibleBox.h:
176
177 2012-03-21  Emil A Eklund  <eae@chromium.org>
178
179         Unreviewed change touching CustomFilterProgram.h to try
180         to force the chromium-win bots to rebuilt it and pick up
181         on the fact that CSS_SHADERS is not set (since r111610). 
182
183         * platform/graphics/filters/CustomFilterProgram.h:
184
185 2012-03-21  Vangelis Kokkevis  <vangelis@chromium.org>
186
187         [chromium] FPS counter causes garbage to be displayed at top left corner
188         https://bugs.webkit.org/show_bug.cgi?id=81851
189
190         The HUD expects the PlatformCanvas it paints on to be cleared on creation which is
191         no longer true after http://src.chromium.org/viewvc/chrome?view=rev&revision=127196 .
192         This patch does an explicit clearRect before the HUD contents are painted.
193
194         Reviewed by Adrienne Walker.
195
196         TEST=Manually verified that --show-fps-counter and --show-composited-layer-tree work correctly.
197
198         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
199         (WebCore::CCHeadsUpDisplay::draw):
200
201 2012-03-21  Ryosuke Niwa  <rniwa@webkit.org>
202
203         Touch a file to make Chromium Windows bots happy.
204
205         * css/CSSValueKeywords.in:
206
207 2012-03-19  Igor Oliveira  <igor.o@sisa.samsung.com>
208
209         Every call to RenderObject::setAnimatableStyle() iterates through all m_compositeAnimations: potentially O(N^2)
210         https://bugs.webkit.org/show_bug.cgi?id=38025
211
212         Implement updateAnimationTimerForRender. This reduces unnecessary animation
213         steps on the current RenderObject by checking the value of timeToNextService
214         before starting a new timer.
215
216         Reviewed by Dean Jackson.
217
218         Test: animations/animation-welcome-safari.html
219
220         * page/animation/AnimationController.cpp:
221         (WebCore::AnimationControllerPrivate::updateAnimationTimerForRenderer):
222         (WebCore):
223         (WebCore::AnimationController::updateAnimations):
224         * page/animation/AnimationControllerPrivate.h:
225         (AnimationControllerPrivate):
226
227 2012-03-21  Sheriff Bot  <webkit.review.bot@gmail.com>
228
229         Unreviewed, rolling out r111616.
230         http://trac.webkit.org/changeset/111616
231         https://bugs.webkit.org/show_bug.cgi?id=81862
232
233         broke chromium mac (Requested by eae on #webkit).
234
235         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
236         (WebCore::CCLayerImpl::appendQuads):
237         * platform/graphics/chromium/cc/CCLayerImpl.h:
238         (CCLayerImpl):
239         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
240         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
241         (WebCore::CCLayerTreeHostImpl::drawLayers):
242         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
243         (CCLayerTreeHostImpl):
244         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
245         (WebCore::CCQuadCuller::append):
246         * platform/graphics/chromium/cc/CCQuadCuller.h:
247         (CCQuadCuller):
248         * platform/graphics/chromium/cc/CCRenderPass.cpp:
249         (WebCore::CCRenderPass::appendQuadsForLayer):
250         * platform/graphics/chromium/cc/CCRenderPass.h:
251         (CCRenderPass):
252         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
253         (WebCore::CCScrollbarLayerImpl::appendQuads):
254         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
255         (CCScrollbarLayerImpl):
256         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
257         (WebCore::CCSingleThreadProxy::doComposite):
258         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp:
259         (WebCore::CCSolidColorLayerImpl::appendQuads):
260         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h:
261         (CCSolidColorLayerImpl):
262         * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp:
263         (WebCore::CCTextureLayerImpl::appendQuads):
264         * platform/graphics/chromium/cc/CCTextureLayerImpl.h:
265         (CCTextureLayerImpl):
266         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
267         (WebCore::CCThreadProxy::scheduledActionDrawAndSwap):
268         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
269         (WebCore::CCTiledLayerImpl::appendQuads):
270         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
271         (CCTiledLayerImpl):
272         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
273         (WebCore::CCVideoLayerImpl::appendQuads):
274         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
275         (CCVideoLayerImpl):
276
277 2012-03-21  Beth Dakin  <bdakin@apple.com>
278
279         https://bugs.webkit.org/show_bug.cgi?id=80322
280         Implement image-set
281
282         Reviewed by Dean Jackson.
283
284         This initial implementation of -webkit-image-set. 
285         http://lists.w3.org/Archives/Public/www-style/2012Feb/1103.html
286         The idea behind the feature is to allow authors to provide multiple variants 
287         of the same image at differing resolutions, and to allow the User Agent to 
288         choose the resource that is most appropriate at the time. This patch will 
289         choose the most appropriate image based on device scale factor.
290
291         CSSImageSetValue inherits from CSSValueList and behaves a lot like 
292         CSSImageValue.
293         * WebCore.xcodeproj/project.pbxproj:
294         * css/CSSImageSetValue.h: Added.
295         (WebCore):
296         (CSSImageSetValue):
297         (WebCore::CSSImageSetValue::create):
298         (WebCore::CSSImageSetValue::isPending):
299         (ImageWithScale):
300         (WebCore::CSSImageSetValue::compareByScaleFactor):
301         * css/CSSImageSetValue.cpp: Added.
302         (WebCore):
303         (WebCore::CSSImageSetValue::CSSImageSetValue):
304         (WebCore::CSSImageSetValue::~CSSImageSetValue):
305         (WebCore::CSSImageSetValue::cachedOrPendingImageSet):
306         (WebCore::CSSImageSetValue::customCssText):
307
308         fillImageSet() iterates through the value list and turns the information into 
309         a sorted Vector of ImageWithScales (which is a struct containing image URLs 
310         and scale factors).
311         (WebCore::CSSImageSetValue::fillImageSet):
312
313         cachedImageSet() finds which image is most appropriate based on the device 
314         scale factor, and it loads only that image. In the future, additional scale 
315         factors will be taken into account.
316         (WebCore::CSSImageSetValue::bestImageForScaleFactor):
317         (WebCore::CSSImageSetValue::cachedImageSet):
318
319         parseImageSet() is called everywhere in the CSSParser that a regular image or 
320         generated image can be found.
321         * css/CSSParser.cpp:
322         (WebCore::CSSParser::parseValue):
323         (WebCore::CSSParser::parseContent):
324         (WebCore::CSSParser::parseFillImage):
325         (WebCore::CSSParser::parseBorderImage):
326         (WebCore):
327         (WebCore::CSSParser::parseImageSet):
328         * css/CSSParser.h:
329
330         Since CSSImageSetValue is implemented as a value list, 
331         ApplyPropertyFillLayer::applyValue() needs to be more specific when it's 
332         looking for a list of multiple URLs.
333         * css/CSSStyleApplyProperty.cpp:
334         (WebCore::ApplyPropertyFillLayer::applyValue):
335
336         Handle image-set as a valid image value.
337         * css/CSSStyleSelector.cpp:
338         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
339         * css/CSSStyleSelector.h:
340         (CSSStyleSelector):
341         * css/CSSValue.cpp:
342         (WebCore::CSSValue::cssText):
343         (WebCore::CSSValue::destroy):
344         * css/CSSValue.h:
345         (CSSValue):
346         (WebCore::CSSValue::isImageSetValue):
347
348         computeIntrinsicDimensions() now takes an optional scaleFactor parameter that represents the author-enforced "intrinsic" scale factor of the image.
349         * loader/cache/CachedImage.cpp:
350         (WebCore::CachedImage::computeIntrinsicDimensions):
351         * loader/cache/CachedImage.h:
352         (CachedImage):
353         * platform/graphics/GeneratedImage.h:
354         (GeneratedImage):
355         * platform/graphics/GeneratorGeneratedImage.cpp:
356         (WebCore::GeneratedImage::computeIntrinsicDimensions):
357         * platform/graphics/Image.cpp:
358         (WebCore::Image::computeIntrinsicDimensions):
359         * platform/graphics/Image.h:
360         (Image):
361         * platform/graphics/cg/PDFDocumentImage.cpp:
362         (WebCore::PDFDocumentImage::computeIntrinsicDimensions):
363         * platform/graphics/cg/PDFDocumentImage.h:
364         (PDFDocumentImage):
365         * svg/graphics/SVGImage.cpp:
366         (WebCore::SVGImage::computeIntrinsicDimensions):
367         * svg/graphics/SVGImage.h:
368         (SVGImage):
369
370         Inherits from StyleImage and returns a scaled size for imageSize() and 
371         computeIntrinsicDimensions().
372         * rendering/style/StyleCachedImageSet.cpp: Added.
373         (WebCore):
374         (WebCore::StyleCachedImageSet::StyleCachedImageSet):
375         (WebCore::StyleCachedImageSet::cssValue):
376         (WebCore::StyleCachedImageSet::canRender):
377         (WebCore::StyleCachedImageSet::isLoaded):
378         (WebCore::StyleCachedImageSet::errorOccurred):
379         (WebCore::StyleCachedImageSet::imageSize):
380         (WebCore::StyleCachedImageSet::imageHasRelativeWidth):
381         (WebCore::StyleCachedImageSet::imageHasRelativeHeight):
382         (WebCore::StyleCachedImageSet::computeIntrinsicDimensions):
383         (WebCore::StyleCachedImageSet::usesImageContainerSize):
384         (WebCore::StyleCachedImageSet::setContainerSizeForRenderer):
385         (WebCore::StyleCachedImageSet::addClient):
386         (WebCore::StyleCachedImageSet::removeClient):
387         (WebCore::StyleCachedImageSet::image):
388         * rendering/style/StyleCachedImageSet.h: Added.
389         (WebCore):
390         (StyleCachedImageSet):
391         (WebCore::StyleCachedImageSet::create):
392         (WebCore::StyleCachedImageSet::data):
393         (WebCore::StyleCachedImageSet::cachedImage):
394
395         Handle image-set.
396         * rendering/style/StyleImage.h:
397         (WebCore::StyleImage::isCachedImageSet):
398         (WebCore::StyleImage::StyleImage):
399         (StyleImage):
400         * rendering/style/StylePendingImage.h:
401         (StylePendingImage):
402         (WebCore::StylePendingImage::cssImageSetValue):
403
404 2012-03-21  David Barton  <dbarton@mathscribe.com>
405
406         MathML internals - improve naming in RenderMathMLSquareRoot.cpp and RenderMathMLRoot.cpp
407         https://bugs.webkit.org/show_bug.cgi?id=81850
408
409         Reviewed by Eric Seidel.
410
411         This prepares these files for bug fixes, and eventually combining their common code. To
412         understand this patch, I suggest you start with RenderMathMLSquareRoot.cpp, as it's
413         simpler than RenderMathMLRoot.cpp.
414
415         No new tests. LayoutTests/mathml/presentation/roots.xhtml is thorough enough for this.
416
417         * rendering/mathml/RenderMathMLRoot.cpp:
418         (WebCore):
419         (WebCore::RenderMathMLRoot::addChild):
420         (WebCore::RenderMathMLRoot::paint):
421         (WebCore::RenderMathMLRoot::layout):
422         * rendering/mathml/RenderMathMLRoot.h:
423         (WebCore):
424         (RenderMathMLRoot):
425         * rendering/mathml/RenderMathMLSquareRoot.cpp:
426         (WebCore):
427         (WebCore::RenderMathMLSquareRoot::paint):
428         (WebCore::RenderMathMLSquareRoot::layout):
429         * rendering/mathml/RenderMathMLSquareRoot.h:
430         (WebCore):
431         (RenderMathMLSquareRoot):
432         * rendering/mathml/RenderMathMLSubSup.h:
433         (WebCore):
434
435 2012-03-21  Tony Chang  <tony@chromium.org>
436
437         refactor flexbox in preparation for flex-line-pack
438         https://bugs.webkit.org/show_bug.cgi?id=81843
439
440         Reviewed by Ojan Vafai.
441
442         Replace WrapReverseContext with a vector of LineContexts that contain
443         the same information, plus values needed for flex-align.
444
445         alignChildren has been moved to after all the lines have been
446         positioned. We want to align children after flex-line-pack has changed
447         the size of each line to avoid unnecessary layouts.
448
449         No new tests, just refactoring.
450
451         * rendering/RenderFlexibleBox.cpp:
452         (WebCore::RenderFlexibleBox::LineContext::LineContext): New struct,
453         holds information needed for wrap-reverse and aligning children.
454         (RenderFlexibleBox::LineContext):
455         (WebCore::RenderFlexibleBox::layoutFlexItems): alignChildren after layout out all the lines rather than after each line.
456         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): don't alignChildren
457         (WebCore::RenderFlexibleBox::alignChildren): align all flex items, not just a line at a time.
458         (WebCore::RenderFlexibleBox::flipForWrapReverse): Update to use LineContext
459         * rendering/RenderFlexibleBox.h:
460
461 2012-03-21  Ryosuke Niwa  <rniwa@webkit.org>
462
463         BDI element should have dir=auto by default
464         https://bugs.webkit.org/show_bug.cgi?id=68773
465
466         Reviewed by Daniel Bates.
467
468         Treat bdi elements without dir content attribute as if they have dir=auto per spec:
469         http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-bdi-element
470
471         The patch tries to encapsulate the logic to look for dir content attribute and dir=auto.
472
473         It also adds HTMLBDIElement interface (binding remains to use HTMLElement) to set
474         selfOrAncestorHasDirAutoAttribute flag true by default, which is used by functions like
475         directionalityIfhasDirAutoAttribute to look for elements with dir=auto. Since dir=auto-ness of bdi
476         elements can be overridden by dir content attribute, we must change and only change the default value.
477
478         Tests: fast/text/international/bdi-dir-default-to-auto-expected.html
479                fast/text/international/bdi-dir-default-to-auto.html
480
481         * GNUmakefile.list.am:
482         * Target.pri:
483         * WebCore.gypi:
484         * WebCore.vcproj/WebCore.vcproj:
485         * WebCore.xcodeproj/project.pbxproj:
486         * css/CSSStyleSelector.cpp:
487         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
488         * html/HTMLBDIElement.h: Added.
489         (WebCore):
490         (HTMLBDIElement):
491         (WebCore::HTMLBDIElement::create):
492         (WebCore::HTMLBDIElement::HTMLBDIElement): Sets selfOrAncestorHasDirAutoAttribute to true because
493         bdi elements are treated as if it has dir=auto by default.
494         * html/HTMLElement.cpp:
495         (WebCore::elementAffectsDirectionality): Added. Checks if the specified element is bdi or
496         has dir content attribute.
497         (WebCore):
498         (WebCore::setHasDirAutoFlagRecursively):
499         (WebCore::HTMLElement::hasDirectionAuto): Added. Checks if the specified element should be treated
500         as if it has dir=auto (bdi or element with dir=auto).
501         (WebCore::HTMLElement::directionalityIfhasDirAutoAttribute):
502         (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildAttributeChanged):
503         (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged):
504         * html/HTMLElement.h:
505         (HTMLElement):
506         * html/HTMLTagNames.in: Use HTMLBDIElement instead of HTMLElement for constructing bdi element
507         to set selfOrAncestorHasDirAutoAttribute true but still use HTMLElement for binding.
508
509 2012-03-21  Luke Macpherson  <macpherson@chromium.org>
510
511         Use CSSPrimitiveValue::convertToLength() in a few places.
512         https://bugs.webkit.org/show_bug.cgi?id=81492
513
514         Reviewed by Eric Seidel.
515
516         No new tests - refactoring only.
517
518         CSSPrimitiveValue::convertToLength() provides the same functionality that is duplicated
519         in many places in CSSStyleSelector. This patch removes some of that code duplication.
520
521         * css/CSSStyleApplyProperty.cpp:
522         (WebCore::ApplyPropertyVerticalAlign::applyValue):
523         * css/CSSStyleSelector.cpp:
524         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
525
526 2012-03-21  Patrick Gansterer  <paroga@webkit.org>
527
528         Build fix for ENABLE(SVG) && !ENABLE(FILTERS) after r111601.
529
530         * rendering/svg/RenderSVGRoot.cpp:
531
532 2012-03-21  Patrick Gansterer  <paroga@webkit.org>
533
534         Build fix for !ENABLE(INSPECTOR) after r104831.
535
536         * bindings/js/ScriptDebugServer.cpp:
537         (WebCore::ScriptDebugServer::dispatchDidParseSource):
538
539 2012-03-21  Xiaomei Ji  <xji@chromium.org>
540
541         visual word movement: using cache to decrease the number of collectLeafBoxesInLogicalOrder on RootInlineBox
542         https://bugs.webkit.org/show_bug.cgi?id=81408
543
544         Reviewed by Ryosuke Niwa.
545
546         Cache logically ordered leaf boxes under a particular root box.
547         Also, move 'Vector<UChar, 1024> string' declared in visualWordPosition() to outside of loop (it is always
548         clear-ed before use).
549
550         * editing/visible_units.cpp:
551         (CachedLogicallyOrderedLeafBoxes): Add class to cache logically ordered leaf boxes under a particular root box.
552         (WebCore::CachedLogicallyOrderedLeafBoxes::size):
553         (WebCore::CachedLogicallyOrderedLeafBoxes::firstBox):
554         (WebCore):
555         (WebCore::CachedLogicallyOrderedLeafBoxes::CachedLogicallyOrderedLeafBoxes):
556         (WebCore::CachedLogicallyOrderedLeafBoxes::previousTextBox):
557         (WebCore::CachedLogicallyOrderedLeafBoxes::nextTextBox):
558         (WebCore::CachedLogicallyOrderedLeafBoxes::collectBoxes):
559         (WebCore::CachedLogicallyOrderedLeafBoxes::boxIndexInLeaves):
560         (WebCore::logicallyPreviousBox): Pass CachedLogicallyOrderedLeafBoxes object around.
561         (WebCore::logicallyNextBox):
562         (WebCore::wordBreakIteratorForMinOffsetBoundary):
563         (WebCore::wordBreakIteratorForMaxOffsetBoundary):
564         (WebCore::visualWordPosition):
565
566 2012-03-21  Dana Jansens  <danakj@chromium.org>
567
568         [chromium] Early out in a new prepareToDraw() step if checkerboarding an accelerated animation in order to skip the frame
569         https://bugs.webkit.org/show_bug.cgi?id=81437
570
571         Reviewed by Adrienne Walker.
572
573         Split CCLayerTreeHostImpl::drawLayers() into two phases:
574         prepareToDraw() and drawLayers().
575
576         When calculating a RenderPass, and we checkerboard a quad on a
577         layer, bubble this info back up to CCLayerTreeHostImpl. If the
578         layer is transforming in an animation, then abort the prepareToDraw()
579         phase and cause it to return false back to the thread proxy.
580
581         Unit test: CCLayerTreeHostImplTest.prepareToDrawFailsWhenAnimationUsesCheckerboard
582
583         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
584         (WebCore::CCLayerImpl::appendQuads):
585         * platform/graphics/chromium/cc/CCLayerImpl.h:
586         (CCLayerImpl):
587         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
588         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
589         (WebCore::CCLayerTreeHostImpl::prepareToDraw):
590         (WebCore):
591         (WebCore::CCLayerTreeHostImpl::drawLayers):
592         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
593         (CCLayerTreeHostImpl):
594         (FrameData):
595         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
596         (WebCore::CCQuadCuller::append):
597         * platform/graphics/chromium/cc/CCQuadCuller.h:
598         (CCQuadCuller):
599         * platform/graphics/chromium/cc/CCRenderPass.cpp:
600         (WebCore::CCRenderPass::appendQuadsForLayer):
601         * platform/graphics/chromium/cc/CCRenderPass.h:
602         (CCRenderPass):
603         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
604         (WebCore::CCScrollbarLayerImpl::appendQuads):
605         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
606         (CCScrollbarLayerImpl):
607         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
608         (WebCore::CCSingleThreadProxy::doComposite):
609         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp:
610         (WebCore::CCSolidColorLayerImpl::appendQuads):
611         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h:
612         (CCSolidColorLayerImpl):
613         * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp:
614         (WebCore::CCTextureLayerImpl::appendQuads):
615         * platform/graphics/chromium/cc/CCTextureLayerImpl.h:
616         (CCTextureLayerImpl):
617         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
618         (WebCore::CCThreadProxy::scheduledActionDrawAndSwap):
619         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
620         (WebCore::CCTiledLayerImpl::appendQuads):
621         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
622         (CCTiledLayerImpl):
623         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
624         (WebCore::CCVideoLayerImpl::appendQuads):
625         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
626         (CCVideoLayerImpl):
627
628 2012-03-21  Enrica Casucci  <enrica@apple.com>
629
630         WebKitURLWithTitles pasteboard format should support URLs containing Emoji characters.
631         https://bugs.webkit.org/show_bug.cgi?id=81835
632         <rdar://problem/11082749>
633
634         Reviewed by Brady Eidson.
635
636         When writing the URL in the pasteboard for the WebURLWithTitles format,
637         we use the user visible string instead of the original URL.
638         In case of URL with Unicode characters, we lose the encoding.
639         
640         Added TestWebKitAPI test.
641
642         * platform/mac/PasteboardMac.mm:
643         (WebCore::writeURLForTypes): Writes to the pasteboard the original URL.
644
645 2012-03-21  Levi Weintraub  <leviw@chromium.org>
646
647         Correct LayoutUnit usage in VisiblePosition.cpp
648         https://bugs.webkit.org/show_bug.cgi?id=81775
649
650         Reviewed by Eric Seidel.
651
652         Correcting a mismatch between the .h and .cpp for the definition of localCaretRect,
653         and properly using LayoutUnits for local coordinates.
654
655         No new tests. No change in behavior.
656
657         * editing/VisiblePosition.cpp:
658         (WebCore::VisiblePosition::localCaretRect): Switching to return a LayoutRect, as in the
659         header. Local coordinates are in LayoutUnits.
660         (WebCore::VisiblePosition::absoluteCaretBounds): Using LayoutRect for the localCaretRect.
661         (WebCore::VisiblePosition::lineDirectionPointForBlockDirectionNavigation): Ditto.
662
663 2012-03-21  Adam Klein  <adamk@chromium.org>
664
665         "this" argument for MutationCallbacks should be the MutationObserver
666         https://bugs.webkit.org/show_bug.cgi?id=81712
667
668         Reviewed by Adam Barth.
669
670         Test: fast/mutation/callback-arguments.html
671
672         * bindings/js/JSCallbackData.cpp:
673         (WebCore::JSCallbackData::invokeCallback): Add an overload that takes
674         an explicit this argument and have the old method call the new one.
675         * bindings/js/JSCallbackData.h:
676         (JSCallbackData):
677         * bindings/js/JSMutationCallbackCustom.cpp:
678         (WebCore::JSMutationCallback::handleEvent): Call the new overload.
679         * bindings/v8/custom/V8CustomVoidCallback.cpp:
680         (WebCore::invokeCallback): Add an overload that takes an explicit this
681         argument and have the old method call the new one.
682         * bindings/v8/custom/V8CustomVoidCallback.h:
683         (WebCore):
684         * bindings/v8/custom/V8MutationCallbackCustom.cpp:
685         (WebCore::V8MutationCallback::handleEvent): Call the new overload.
686
687 2012-03-21  Alexandru Chiculita  <achicu@adobe.com>
688
689         [CSS Shaders] Make CSS Shaders compile on Chromium
690         https://bugs.webkit.org/show_bug.cgi?id=81435
691
692         Reviewed by Stephen White.
693
694         This patch enables the CSS Shaders compile time flag, but keeps the runtime flag disabled.
695         The only way to test the functionality now is to use the overridePreference from dump render tree.
696
697         Also part of this patch I fix a layering violation: I removed the "Document" reference from the FECustomFilter.cpp and passed the
698         HostWindow directly. There should be no problem when the HostWindow changes, because the RenderLayer and the FECustomFilter
699         get recreated anyway.
700
701         No new tests. I've updated the existing custom filter tests to run under Chromium and added the expected results.
702         I've just added window.layoutTestController.overridePreference("WebKitCSSCustomFilterEnabled", "1") to force 
703         enable the feature at runtime. 
704
705         * loader/cache/CachedResource.cpp: Made CachedResource::ShaderResource report as ResourceRequest::TargetIsSubresource for Chromium.
706         (WebCore::cachedResourceTypeToTargetType):
707
708         * platform/graphics/filters/FECustomFilter.cpp:
709         (WebCore::FECustomFilter::FECustomFilter): Removed Document and just used the HostWindow directly.
710         (WebCore::FECustomFilter::create):
711         (WebCore::FECustomFilter::initializeContext):
712         (WebCore::FECustomFilter::bindVertexAttribute): There was a typo and instead of using the "size" parameter it always used 4 component attribute.
713         Other drivers didn't complain about it, but it was clearly a bug.
714         (WebCore::FECustomFilter::bindProgramAndBuffers): Reading the image back from GPU will flip vertically the framebuffer in Chromium. I've flipped the
715         projection matrix only on Chromium, so that we get the correct result.
716
717         * rendering/FilterEffectRenderer.cpp:
718         (WebCore::FilterEffectRenderer::build): Passing the HostWindow instead of the Document.
719
720 2012-03-21  Mark Pilgrim  <pilgrim@chromium.org>
721
722         Realphabetize about webaudio move
723         https://bugs.webkit.org/show_bug.cgi?id=81825
724
725         Reviewed by Adam Barth.
726
727         No new tests, all existing tests pass.
728
729         * CMakeLists.txt:
730
731 2012-03-21  Anders Carlsson  <andersca@apple.com>
732
733         Evict tiles from pages in background tabs
734         https://bugs.webkit.org/show_bug.cgi?id=81829
735         <rdar://problem/10866152>
736
737         Reviewed by Andreas Kling.
738
739         When the tile cache for a page is no longer in a window (which happens when it's moved to 
740         a background tab), schedule a tile revalidation after 4 seconds. This tile revalidation 
741         will ensure that tiles outside of the visible rect will be dropped.
742
743         * platform/graphics/ca/mac/TileCache.h:
744         (TileCache):
745         * platform/graphics/ca/mac/TileCache.mm:
746         (WebCore::TileCache::tileCacheLayerBoundsChanged):
747         (WebCore::TileCache::setIsInWindow):
748         (WebCore::TileCache::tileCoverageRect):
749         (WebCore):
750         (WebCore::TileCache::scheduleTileRevalidation):
751         (WebCore::TileCache::revalidateTiles):
752
753 2012-03-21  Stephen Chenney  <schenney@chromium.org>
754
755         SVG layout leaves objects still needing layout
756         https://bugs.webkit.org/show_bug.cgi?id=81006
757
758         Reviewed by Nikolas Zimmermann.
759
760         Change the layout of SVG objects such that resources that trigger
761         layout of other objects are handled in a distinct pass, and then
762         objects still requiring layout are laid out again.
763
764         Test: svg/custom/delete-text-innerText-crash.html
765
766         * rendering/svg/RenderSVGResourceContainer.cpp:
767         (WebCore::RenderSVGResourceContainer::layout):
768         * rendering/svg/RenderSVGResourceMarker.cpp:
769         (WebCore::RenderSVGResourceMarker::layout):
770         * rendering/svg/RenderSVGRoot.cpp:
771         (WebCore::RenderSVGRoot::layout):
772         (WebCore::RenderSVGRoot::addResourceForClientInvalidation):
773         (WebCore):
774         * rendering/svg/RenderSVGRoot.h:
775         (RenderSVGRoot):
776
777 2012-03-21  Tim Horton  <timothy_horton@apple.com>
778
779         Make use of CG rounded-rect primitives
780         https://bugs.webkit.org/show_bug.cgi?id=79932
781         <rdar://problem/9274953>
782
783         Reviewed by Simon Fraser.
784
785         Portions of patch by Nikolas Zimmermann and Mustafizur Rahaman.
786
787         Dispatch to potentially platform-specific rounded rectangle path
788         construction from addPathForRoundedRect. Make use of this to call
789         wkCGPathAddRoundedRect on Lion and above, as long as the rounded
790         corners are all equivalent.
791
792         The origin of the stroke dash differs between the bezier approach
793         and the path added by wkCGPathAddRoundedRect, so Path::addRoundedRect()
794         takes a new parameter allowing code which is sensitive to stroke dash
795         origin (i.e. SVG) to fall back to the old behavior if need be.
796
797         Make use of the new Path::addRoundedRect() parameter to fall back to
798         the old (bezier) rounded-rect behavior when constructing a dashed SVG path,
799         in order to continue complying with the spec.
800
801         No new tests, as this is covered by many that use rounded corners,
802         and is only a performance improvement.
803
804         * WebCore.exp.in:
805         * platform/graphics/Path.cpp:
806         (WebCore::Path::addRoundedRect):
807         (WebCore):
808         (WebCore::Path::addPathForRoundedRect):
809         * platform/graphics/Path.h:
810         (Path):
811         * platform/graphics/cg/PathCG.cpp:
812         (WebCore::Path::platformAddPathForRoundedRect):
813         (WebCore):
814         * platform/mac/WebCoreSystemInterface.h:
815         * platform/mac/WebCoreSystemInterface.mm:
816         * rendering/svg/SVGPathData.cpp:
817         (WebCore::updatePathFromRectElement):
818
819 2012-03-21  David Reveman  <reveman@chromium.org>
820
821         [Chromium] GL_EXT_occlusion_query_boolean and GL_CHROMIUM_command_buffer_query support.
822         https://bugs.webkit.org/show_bug.cgi?id=80988
823
824         Reviewed by Adrienne Walker.
825
826         Expose EXT_occlusion_query API to WebKit compositor. Add
827         GL_EXT_occlusion_query_boolean and GL_CHROMIUM_command_buffer_query
828         enums.
829
830         * platform/graphics/chromium/Extensions3DChromium.h:
831         (Extensions3DChromium):
832
833 2012-03-21  Tony Chang  <tony@chromium.org>
834
835         compute the sign of flexibility for new flexbox
836         https://bugs.webkit.org/show_bug.cgi?id=81722
837
838         Reviewed by Ojan Vafai.
839
840         This implements the computation of the sign of flexibility used by the
841         new flexing algorithm.
842         http://dev.w3.org/csswg/css3-flexbox/#resolve-the-flexible-lengths
843
844         No new tests, we don't use the sign of flexibility yet.
845
846         * rendering/RenderFlexibleBox.cpp:
847         (WebCore::RenderFlexibleBox::layoutFlexItems):
848         (WebCore::RenderFlexibleBox::computeNextFlexLine): Compute the size
849         adjusted for min/max as well as not adjusted.
850         (WebCore::RenderFlexibleBox::resolveFlexibleLengths): Renamed to match
851         spec text better.
852         * rendering/RenderFlexibleBox.h: Added enum for flex sign.
853
854 2012-03-21  Vsevolod Vlasov  <vsevik@chromium.org>
855
856         Web Inspector: Extract WebInspector.UIBreakpoint from WebInspector.Breakpoint.
857         https://bugs.webkit.org/show_bug.cgi?id=81669
858
859         Reviewed by Pavel Feldman.
860
861         * inspector/front-end/BreakpointManager.js:
862         (WebInspector.BreakpointManager.get for):
863         (WebInspector.BreakpointManager):
864         (WebInspector.BreakpointManager.prototype.uiSourceCodeAdded):
865         (WebInspector.BreakpointManager.prototype.uiSourceCodeRemoved):
866         (WebInspector.BreakpointManager.prototype.breakpointsForUISourceCode):
867         (WebInspector.BreakpointManager.prototype.setBreakpoint):
868         (WebInspector.BreakpointManager.prototype.removeBreakpoint):
869         (WebInspector.BreakpointManager.prototype._innerRemoveBreakpoint):
870         (WebInspector.BreakpointManager.prototype.removeAllBreakpoints):
871         (WebInspector.BreakpointManager.prototype._moveBreakpointInUI):
872         (WebInspector.BreakpointManager.prototype._uiBreakpoints.get this):
873         (WebInspector.BreakpointManager.prototype._uiBreakpoints):
874         (WebInspector.BreakpointManager.prototype.get _uiBreakpoint):
875         (WebInspector.BreakpointManager.prototype._addBreakpointToUI):
876         (WebInspector.BreakpointManager.prototype._removeBreakpointFromUI):
877         (WebInspector.BreakpointManager.prototype._breakpoints):
878         (WebInspector.BreakpointManager.prototype._breakpoint):
879         (WebInspector.BreakpointManager.prototype._addBreakpointToModel):
880         (WebInspector.BreakpointManager.prototype._removeBreakpointFromModel):
881         (WebInspector.BreakpointManager.prototype._forEachBreakpoint):
882         (WebInspector.BreakpointManager.prototype._setBreakpointInDebugger):
883         (WebInspector.BreakpointManager.prototype._removeBreakpointFromDebugger):
884         (WebInspector.BreakpointManager.prototype.debuggerReset):
885         (WebInspector.Breakpoint.prototype.serialize):
886         (WebInspector.Breakpoint.prototype.get uiBreakpoint):
887         (WebInspector.Breakpoint.prototype.createUIBreakpoint):
888         (WebInspector.Breakpoint.prototype.removeUIBreakpoint):
889         (WebInspector.UIBreakpoint):
890         * inspector/front-end/DebuggerPresentationModel.js:
891         (WebInspector.DebuggerPresentationModel.prototype._handleUISourceCodeListChanged):
892         (WebInspector.DebuggerPresentationModel.prototype.findBreakpoint):
893         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded):
894         (WebInspector.DebuggerPresentationModel.prototype._breakpointRemoved):
895         * inspector/front-end/ScriptsPanel.js:
896
897 2012-03-21  Anders Carlsson  <andersca@apple.com>
898
899         TileCache needs to know if its containing page is in a window
900         https://bugs.webkit.org/show_bug.cgi?id=81821
901
902         Reviewed by Andreas Kling.
903
904         This is in preparation for throwing away invisible tiles in background tabs to reduce memory usage.
905
906         * page/FrameView.cpp:
907         (WebCore::FrameView::didMoveOnscreen):
908         (WebCore::FrameView::willMoveOffscreen):
909         * page/Page.cpp:
910         (WebCore::Page::Page):
911         (WebCore::Page::didMoveOnscreen):
912         (WebCore::Page::willMoveOffscreen):
913         * page/Page.h:
914         (WebCore::Page::isOnscreen):
915         (Page):
916         * platform/graphics/TiledBacking.h:
917         (TiledBacking):
918         * platform/graphics/ca/mac/TileCache.h:
919         (TileCache):
920         * platform/graphics/ca/mac/TileCache.mm:
921         (WebCore::TileCache::TileCache):
922         (WebCore::TileCache::setIsInWindow):
923         (WebCore):
924         * rendering/RenderLayerBacking.cpp:
925         (WebCore::RenderLayerBacking::RenderLayerBacking):
926
927 2012-03-21  Xingnan Wang  <xingnan.wang@intel.com>
928
929         Web audio layout test failed in debug with an ASSERT error in ReverbConvolverStage.cpp
930         https://bugs.webkit.org/show_bug.cgi?id=81744
931
932         Reviewed by Chris Rogers.
933
934         * platform/audio/ReverbConvolverStage.cpp:
935         (WebCore::ReverbConvolverStage::ReverbConvolverStage):
936
937 2012-03-21  Xiaomei Ji  <xji@chromium.org>
938
939         [chromium] Font fallback in cr-win is wrong for string contains zero-width-space.
940         https://bugs.webkit.org/show_bug.cgi?id=79961
941
942         Reviewed by Adam Barth.
943
944         Treat zero-width-space (\u200B) as true for treatAsZeroWidthSpaceInComplexScipt().
945
946         * platform/graphics/Font.h:
947         (WebCore::Font::treatAsZeroWidthSpaceInComplexScript):
948         * platform/graphics/mac/ComplexTextController.cpp:
949         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
950         * platform/graphics/win/UniscribeController.cpp:
951         (WebCore::UniscribeController::shapeAndPlaceItem):
952
953 2012-03-21  Patrick Gansterer  <paroga@webkit.org>
954
955         Build fix for !ENABLE(INSPECTOR) after r111005.
956
957         * inspector/ContentSearchUtils.h:
958
959 2012-03-21  Ulan Degenbaev  <ulan@chromium.org>
960
961         [V8] V8GCForContextDispose should indicate whether a context is disposed for the main frame or not
962         https://bugs.webkit.org/show_bug.cgi?id=81200
963
964         Reviewed by Adam Barth.
965
966         Pass a hint to V8::IdleNotification that requests more aggressive GC
967         when a main frame context is disposed and requests incremental GC otherwise.
968
969         * bindings/v8/V8DOMWindowShell.cpp:
970         (WebCore::V8DOMWindowShell::disposeContextHandles):
971         * bindings/v8/V8GCForContextDispose.cpp:
972         (WebCore::V8GCForContextDispose::V8GCForContextDispose):
973         (WebCore::V8GCForContextDispose::notifyContextDisposed):
974         (WebCore::V8GCForContextDispose::pseudoIdleTimerFired):
975         * bindings/v8/V8GCForContextDispose.h:
976         (V8GCForContextDispose):
977
978 2012-03-21  Nat Duca  <nduca@chromium.org>
979
980         [chromium] CCThreadProxy must initialize frameBeginTime to monotonicallyIncreasingTime rather than zero
981         https://bugs.webkit.org/show_bug.cgi?id=81790
982
983         Reviewed by James Robinson.
984
985         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
986         (WebCore::CCThreadProxy::scheduledActionBeginFrame):
987
988 2012-03-21  Xingnan Wang  <xingnan.wang@intel.com>
989
990         Add multichannel support in RealtimeAnalyser
991         https://bugs.webkit.org/show_bug.cgi?id=81745
992
993         Reviewed by Chris Rogers.
994
995         * Modules/webaudio/RealtimeAnalyser.cpp:
996         (WebCore::RealtimeAnalyser::writeInput):
997         (WebCore):
998
999 2012-03-21  Eric Carlson  <eric.carlson@apple.com>
1000
1001         Removing HTMLTrackElement does not delete TextTrack
1002         https://bugs.webkit.org/show_bug.cgi?id=80873
1003
1004         Reviewed by Antti Koivisto.
1005
1006         No new tests, but media/track/track-language-preference.html has been updated
1007         to test this fix.
1008
1009         * html/HTMLMediaElement.cpp:
1010         (WebCore::HTMLMediaElement::didAddTrack): Renamed from trackWasAdded.
1011         (WebCore::HTMLMediaElement::willRemoveTrack): Renamed from trackWasRemoved because it is
1012         called before the track is removed, to allow the TextTrack to be removed.
1013         * html/HTMLMediaElement.h:
1014
1015         * html/HTMLTrackElement.cpp:
1016         (WebCore::HTMLTrackElement::insertedIntoTree): Renamed from insertedIntoDocument
1017         (WebCore::HTMLTrackElement::willRemove): Renamed from removedFromDocument.
1018         * html/HTMLTrackElement.h:
1019
1020         * html/track/LoadableTextTrack.cpp:
1021         (WebCore::LoadableTextTrack::trackElementIndex): Don't include tracks that are not in the
1022         document in the calcualtion.
1023
1024 2012-03-21  Zeno Albisser  <zeno@webkit.org>
1025
1026         [Qt][Mac] ranlib segfaults when creating symbol tables for libWebCore.a.
1027         https://bugs.webkit.org/show_bug.cgi?id=81750
1028
1029         Building WebCore on mac currently creates an archive that is bigger than
1030         4GB. But ranlib fails to create a symbol table for such a big archive,
1031         even on 64bit machines.
1032         Therefore we start using SVGAllInOne.cpp when building debug
1033         on mac. This reduces the size of the archive by about 300MB.
1034
1035         Reviewed by Tor Arne Vestbø.
1036
1037         * Target.pri:
1038
1039 2012-03-21  Tommy Widenflycht  <tommyw@google.com>
1040
1041         [chromium] MediaStream API (JSEP): Introducing WebSessionDescription and WebIceCandidate
1042         https://bugs.webkit.org/show_bug.cgi?id=81339
1043
1044         Reviewed by Adam Barth.
1045
1046         Not possible to test until the entire JSEP feature is commited.
1047
1048         * Modules/mediastream/IceCandidate.cpp:
1049         (WebCore::IceCandidate::toSdp):
1050         * Modules/mediastream/SessionDescription.cpp:
1051         (WebCore::SessionDescription::toSdp):
1052         * platform/mediastream/IceCandidateDescriptor.cpp:
1053         (WebCore::IceCandidateDescriptor::toSDP):
1054         * platform/mediastream/IceCandidateDescriptor.h:
1055         (IceCandidateDescriptor):
1056         * platform/mediastream/MediaStreamCenter.cpp:
1057         (WebCore::MediaStreamCenter::constructSDP):
1058         * platform/mediastream/MediaStreamCenter.h:
1059         (MediaStreamCenter):
1060         * platform/mediastream/SessionDescriptionDescriptor.cpp:
1061         (WebCore::SessionDescriptionDescriptor::SessionDescriptionDescriptor):
1062         (WebCore::SessionDescriptionDescriptor::toSDP):
1063         (WebCore::SessionDescriptionDescriptor::initialSDP):
1064         * platform/mediastream/SessionDescriptionDescriptor.h:
1065         (SessionDescriptionDescriptor):
1066
1067 2012-03-21  Yuta Kitamura  <yutak@chromium.org>
1068
1069         Use RFC version of WebSocket protocol by default
1070         https://bugs.webkit.org/show_bug.cgi?id=81718
1071
1072         Reviewed by Kent Tamura.
1073
1074         Flip the default value of Settings::m_useHixie76WebSocketProtocol so WebKit ports will use
1075         RFC version of WebSocket protocol by default.
1076
1077         All the existing ports already use the RFC protocol as of now, so this change will not make
1078         any impact (hopefully).
1079
1080         No new tests. No change in functionality.
1081
1082         * page/Settings.cpp:
1083         (WebCore::Settings::Settings):
1084
1085 2012-03-21  Andrey Kosyakov  <caseq@chromium.org>
1086
1087         Web Inspector: only show JS event listeners in Event Listeners tab of Elements panel
1088         https://bugs.webkit.org/show_bug.cgi?id=81798
1089
1090         Reviewed by Pavel Feldman.
1091
1092         * bindings/js/JSInjectedScriptHostCustom.cpp:
1093         (WebCore::getJSListenerFunctions):
1094         * bindings/js/ScriptEventListener.cpp:
1095         (WebCore::eventListenerHandlerBody):
1096         (WebCore::eventListenerHandlerLocation):
1097         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
1098         (WebCore::getJSListenerFunctions):
1099         * inspector/InspectorDOMAgent.cpp:
1100         (WebCore::InspectorDOMAgent::getEventListeners):
1101
1102 2012-03-21  Andrey Kosyakov  <caseq@chromium.org>
1103
1104         EventListener::Type enum has unused member InspectorDOMAgentType
1105         https://bugs.webkit.org/show_bug.cgi?id=81794
1106
1107         Reviewed by Pavel Feldman.
1108
1109         * dom/EventListener.h:
1110
1111 2012-03-21  Tom Hudson  <tomhudson@google.com>
1112
1113         Incremental cleanup of BitmapImage: inlined virtual functions
1114         https://bugs.webkit.org/show_bug.cgi?id=81688
1115
1116         Reviewed by James Robinson.
1117
1118         No change in functionality, so no new tests.
1119
1120         Move virtual functions defined in headers into .cpp files.
1121
1122         * WebCore.gypi:
1123         * platform/graphics/BitmapImage.cpp:
1124         (WebCore::BitmapImage::isBitmapImage):
1125         (WebCore):
1126         (WebCore::BitmapImage::hasSingleSecurityOrigin):
1127         (WebCore::BitmapImage::nativeImageForCurrentFrame):
1128         (WebCore::BitmapImage::currentFrameHasAlpha):
1129         (WebCore::BitmapImage::notSolidColor):
1130         (WebCore::BitmapImage::decodedSize):
1131         (WebCore::BitmapImage::mayFillWithSolidColor):
1132         (WebCore::BitmapImage::solidColor):
1133         * platform/graphics/BitmapImage.h:
1134         (BitmapImage):
1135         * platform/graphics/skia/BitmapImageSingleFrameSkia.cpp: Added.
1136         (WebCore):
1137         (WebCore::BitmapImageSingleFrameSkia::isBitmapImage):
1138         (WebCore::BitmapImageSingleFrameSkia::currentFrameHasAlpha):
1139         (WebCore::BitmapImageSingleFrameSkia::size):
1140         (WebCore::BitmapImageSingleFrameSkia::destroyDecodedData):
1141         (WebCore::BitmapImageSingleFrameSkia::decodedSize):
1142         (WebCore::BitmapImageSingleFrameSkia::nativeImageForCurrentFrame):
1143         (WebCore::BitmapImageSingleFrameSkia::notSolidColor):
1144         * platform/graphics/skia/BitmapImageSingleFrameSkia.h:
1145         (BitmapImageSingleFrameSkia):
1146
1147 2012-03-21  Alexey Proskuryakov  <ap@apple.com>
1148
1149         Remove obsolete File attributes
1150         https://bugs.webkit.org/show_bug.cgi?id=79383
1151
1152         Reviewed by Hajime Morita.
1153
1154         * bindings/objc/PublicDOMInterfaces.h:
1155         * fileapi/File.h:
1156         * fileapi/File.idl:
1157         Removed fileName and fileSize, they have different names now.
1158
1159         * html/FileInputType.cpp:
1160         (WebCore::FileInputType::appendFormData):
1161         (WebCore::FileInputType::getTypeSpecificValue):
1162         (WebCore::FileInputType::defaultToolTip):
1163         Updated to use new function names.
1164
1165 2012-03-21  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1166
1167         TiledBackingStore: Create the first round of tiles synchronously after setting the visible rect.
1168         https://bugs.webkit.org/show_bug.cgi?id=81762
1169
1170         Reviewed by Kenneth Rohde Christiansen.
1171
1172         The first round of tiles should cover completely the visible rect.
1173         Creating the tiles synchronously allows us to get the new tiles immediately
1174         and prevents an extra AC layers sync to be able to remove the old tiles.
1175
1176         At some point it might also make sense to remove the tile creation timer
1177         completely.
1178
1179         * platform/graphics/TiledBackingStore.cpp:
1180         (WebCore::TiledBackingStore::coverWithTilesIfNeeded):
1181
1182 2012-03-19  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1183
1184         TiledBackingStore: When checking if the visible area is covered, only convert to scaled coordinates once.
1185         https://bugs.webkit.org/show_bug.cgi?id=81519
1186
1187         Reviewed by Kenneth Rohde Christiansen.
1188
1189         Both visibleRect and coverageRatio call mapFromContents on the input rect,
1190         this woulc cause the coverageRatio to never reach 1.0 when the contents is
1191         scaled up.
1192
1193         * platform/graphics/TiledBackingStore.cpp:
1194         (WebCore::TiledBackingStore::visibleAreaIsCovered):
1195
1196 2012-03-21  Mao Yujie  <yujie.mao@intel.com>
1197
1198         MediaStream API: Need to support MediaStream constructor for JSC
1199         https://bugs.webkit.org/show_bug.cgi?id=78781
1200
1201         Reviewed by Adam Barth.
1202
1203         No new tests.
1204
1205         * Modules/mediastream/DOMWindowMediaStream.idl:
1206         * bindings/generic/RuntimeEnabledFeatures.h:
1207         (WebCore::RuntimeEnabledFeatures::webkitMediaStreamEnabled):
1208
1209 2012-03-21  Philip Rogers  <pdr@google.com>
1210
1211         Skip building resources if SVGTRef is not in a document
1212         https://bugs.webkit.org/show_bug.cgi?id=81473
1213
1214         Reviewed by Nikolas Zimmermann.
1215
1216         We can skip the building of pending resources in SVGTRef if we're not
1217         yet in a document. This mirrors the nearly identical logic in
1218         SVGUseElement::buildPendingResource() and
1219         SVGFEImageElement::buildPendingResource().
1220
1221         Test: http/tests/svg/tref-adoptNode-crash.html
1222
1223         * svg/SVGTRefElement.cpp:
1224         (WebCore::SVGTRefElement::buildPendingResource):
1225
1226 2012-03-21  Sami Kyostila  <skyostil@chromium.org>
1227
1228         [chromium] Use floating point scroll deltas for layers
1229         https://bugs.webkit.org/show_bug.cgi?id=81546
1230
1231         Reviewed by James Robinson.
1232
1233         Use floating point scroll deltas for layers instead of integral scroll
1234         deltas. This is because due to page scaling it may be necessary to
1235         scroll layers in sub-CSS-pixel steps to avoid visible jumps. When the
1236         floating point scroll offset is committed to the main thread, it is
1237         truncated to integer, but the fractional part is kept on the CC side to
1238         make sure fractional scroll offsets are accumulated correctly over
1239         multiple commits.
1240
1241         Test: CCLayerTreeHostTestFractionalScroll
1242
1243         * platform/graphics/FloatPoint.h:
1244         (WebCore::toSize):
1245         (WebCore):
1246         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
1247         (WebCore::CCLayerImpl::scrollBy):
1248         (WebCore::CCLayerImpl::setScrollDelta):
1249         * platform/graphics/chromium/cc/CCLayerImpl.h:
1250         (WebCore::CCLayerImpl::scrollDelta):
1251         (CCLayerImpl):
1252         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1253         (WebCore::CCLayerTreeHostImpl::startPageScaleAnimation):
1254         (WebCore::CCLayerTreeHostImpl::adjustScrollsForPageScaleChange):
1255         (WebCore::CCLayerTreeHostImpl::processScrollDeltas):
1256         (WebCore::CCLayerTreeHostImpl::animatePageScale):
1257
1258 2012-03-21  Li Yin  <li.yin@intel.com>
1259
1260         [WebSocket]The Sec-WebSocket-Accept MUST NOT appear more than once in an HTTP response
1261         https://bugs.webkit.org/show_bug.cgi?id=81655
1262
1263         Reviewed by Adam Barth.
1264
1265         Test: http/tests/websocket/tests/hybi/handshake-fail-by-more-accept-header.html
1266
1267         * Modules/websockets/WebSocketHandshake.cpp:
1268         (WebCore::WebSocketHandshake::readHTTPHeaders):
1269
1270 2012-03-21  Alexei Filippov  <alexeif@chromium.org>
1271
1272         Web Inspector: Speedup heap snapshot loading.
1273         https://bugs.webkit.org/show_bug.cgi?id=81788
1274
1275         Reviewed by Yury Semikhatsky.
1276
1277         * inspector/front-end/HeapSnapshot.js:
1278         (WebInspector.HeapSnapshotLoader.prototype._parseNodes):
1279
1280 2012-03-21  Pavel Feldman  <pfeldman@chromium.org>
1281
1282         Web Inspector: get rid of isInEditMode, use isBeingEdited on particular element.
1283         https://bugs.webkit.org/show_bug.cgi?id=81766
1284
1285         Reviewed by Yury Semikhatsky.
1286
1287         We should check event target and its ancestors for being edited, not use some
1288         global property. This change also introduces Event.prototype.consume so that we
1289         were consistently consuming events.
1290
1291         * inspector/front-end/AdvancedSearchController.js:
1292         (WebInspector.SearchView.prototype._onKeyDown):
1293         * inspector/front-end/BreakpointsSidebarPane.js:
1294         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointCheckboxClicked):
1295         * inspector/front-end/CSSSelectorProfileView.js:
1296         * inspector/front-end/Checkbox.js:
1297         (WebInspector.Checkbox.prototype.addEventListener):
1298         * inspector/front-end/ConsoleView.js:
1299         (WebInspector.ConsoleView.prototype._enterKeyPressed):
1300         (WebInspector.ConsoleGroup.prototype._titleClicked):
1301         * inspector/front-end/ContextMenu.js:
1302         (WebInspector.ContextMenu.prototype.show):
1303         * inspector/front-end/DataGrid.js:
1304         (WebInspector.DataGrid.prototype._keyDown):
1305         * inspector/front-end/DatabaseQueryView.js:
1306         (WebInspector.DatabaseQueryView.prototype._enterKeyPressed):
1307         * inspector/front-end/DetailedHeapshotView.js:
1308         (WebInspector.DetailedHeapshotView.prototype._mouseDownInContentsGrid):
1309         (WebInspector.DetailedHeapshotView.prototype._startRetainersHeaderDragging):
1310         (WebInspector.DetailedHeapshotView.prototype._retainersHeaderDragging):
1311         (WebInspector.DetailedHeapshotView.prototype._endRetainersHeaderDragging):
1312         * inspector/front-end/Dialog.js:
1313         (WebInspector.Dialog.prototype._onKeyDown):
1314         * inspector/front-end/Drawer.js:
1315         (WebInspector.Drawer.prototype._startStatusBarDragging):
1316         (WebInspector.Drawer.prototype._statusBarDragging):
1317         (WebInspector.Drawer.prototype._endStatusBarDragging):
1318         * inspector/front-end/EventListenersSidebarPane.js:
1319         (WebInspector.EventListenersSidebarPane.get if):
1320         * inspector/front-end/HelpScreen.js:
1321         (WebInspector.HelpScreen.prototype._onKeyDown):
1322         * inspector/front-end/InspectorView.js:
1323         (WebInspector.InspectorView.prototype._keyDown):
1324         * inspector/front-end/MetricsSidebarPane.js:
1325         (WebInspector.MetricsSidebarPane.prototype._highlightDOMNode):
1326         * inspector/front-end/NetworkPanel.js:
1327         * inspector/front-end/Object.js:
1328         (WebInspector.Event.prototype.preventDefault):
1329         (WebInspector.Event.prototype.consume):
1330         * inspector/front-end/ObjectPropertiesSection.js:
1331         (WebInspector.ObjectPropertyTreeElement.prototype._promptKeyDown):
1332         * inspector/front-end/ProfileView.js:
1333         * inspector/front-end/SearchController.js:
1334         (WebInspector.SearchController.prototype._onKeyDown):
1335         * inspector/front-end/Section.js:
1336         (WebInspector.Section.prototype.handleClick):
1337         * inspector/front-end/Settings.js:
1338         (WebInspector.ExperimentsSettings):
1339         * inspector/front-end/SoftContextMenu.js:
1340         (.WebInspector.SoftContextMenu.prototype.show):
1341         (.WebInspector.SoftContextMenu.prototype._menuItemMouseDown):
1342         (.WebInspector.SoftContextMenu.prototype._menuKeyDown):
1343         (.WebInspector.SoftContextMenu.prototype._discardMenu):
1344         * inspector/front-end/Spectrum.js:
1345         (WebInspector.Spectrum.draggable.consume):
1346         (WebInspector.Spectrum.draggable.start):
1347         (WebInspector.Spectrum.draggable.stop):
1348         (WebInspector.Spectrum.draggable):
1349         (WebInspector.Spectrum.prototype._onKeyDown):
1350         * inspector/front-end/StylesSidebarPane.js:
1351         (WebInspector.StylesSidebarPane.muteEventListener):
1352         (WebInspector.StylesSidebarPane):
1353         (WebInspector.StylesSidebarPane.prototype.set _createNewRule):
1354         (WebInspector.StylesSidebarPane.prototype._toggleElementStatePane):
1355         (WebInspector.StylePropertiesSection.prototype._handleEmptySpaceClick):
1356         (WebInspector.StylePropertiesSection.prototype._handleSelectorClick):
1357         (WebInspector.StylePropertyTreeElement.prototype.updateTitle.):
1358         (WebInspector.StylePropertyTreeElement.prototype):
1359         * inspector/front-end/TextPrompt.js:
1360         (WebInspector.TextPrompt.prototype.onKeyDown):
1361         (WebInspector.TextPromptWithHistory.prototype.defaultKeyHandler):
1362         (WebInspector.TextPrompt.SuggestBox.prototype._onItemMouseDown):
1363         * inspector/front-end/TextViewer.js:
1364         (WebInspector.TextViewer.prototype._handleKeyDown):
1365         * inspector/front-end/Toolbar.js:
1366         (WebInspector.ToolbarDropdown.prototype._onKeyDown):
1367         * inspector/front-end/UIUtils.js:
1368         (WebInspector.isBeingEdited):
1369         (WebInspector.startEditing):
1370         * inspector/front-end/View.js:
1371         (WebInspector.View.prototype._doLoadCSS):
1372         * inspector/front-end/WatchExpressionsSidebarPane.js:
1373         (WebInspector.WatchExpressionsSidebarPane.prototype._addButtonClicked):
1374         (WebInspector.WatchExpressionsSidebarPane.prototype._refreshButtonClicked):
1375         * inspector/front-end/inspector.js:
1376         (WebInspector.documentClick.followLink):
1377         (WebInspector.documentClick):
1378         (WebInspector.documentKeyDown):
1379         (WebInspector.postDocumentKeyDown):
1380         (WebInspector.addMainEventListeners):
1381         * inspector/front-end/treeoutline.js:
1382         (TreeOutline.prototype._treeKeyPress):
1383         (TreeOutline.prototype._treeKeyDown):
1384         (TreeOutline.prototype._searchInputKeyDown):
1385         (TreeElement.treeElementToggled):
1386         (TreeElement.prototype.selectOnMouseDown):
1387         * inspector/front-end/utilities.js:
1388         (Event.prototype.consume):
1389
1390 2012-03-21  Yury Semikhatsky  <yurys@chromium.org>
1391
1392         Web Inspector: event listener section doesn't show all event listeners of the element ancestors
1393         https://bugs.webkit.org/show_bug.cgi?id=81782
1394
1395         Event listeners section now contains all event listeners for the selected
1396         element ancestors chain (in case option "All Nodes" is selected).
1397
1398         Reviewed by Pavel Feldman.
1399
1400         * inspector/InspectorDOMAgent.cpp:
1401         (WebCore::InspectorDOMAgent::getEventListenersForNode):
1402         * inspector/front-end/EventListenersSidebarPane.js:
1403         (WebInspector.EventListenersSidebarPane.prototype.update.callback):
1404         (WebInspector.EventListenersSidebarPane.prototype.update):
1405         (WebInspector.EventListenersSidebarPane.prototype):
1406
1407 2012-03-21  Ilya Tikhonovsky  <loislo@chromium.org>
1408
1409         Web Inspector: HeapSnapshot: move all builders and calculation calls to HeapSnapshot._init function.
1410         https://bugs.webkit.org/show_bug.cgi?id=81784
1411
1412         Reviewed by Yury Semikhatsky.
1413
1414         * inspector/front-end/HeapSnapshot.js:
1415         (WebInspector.HeapSnapshot.prototype._init):
1416         (WebInspector.HeapSnapshot.prototype.dispose):
1417         (WebInspector.HeapSnapshot.prototype._retainersForNode):
1418         (WebInspector.HeapSnapshot.prototype._dominatedNodesOfNode):
1419         (WebInspector.HeapSnapshot.prototype._flagsOfNode):
1420         (WebInspector.HeapSnapshot.prototype.aggregates):
1421         (WebInspector.HeapSnapshot.prototype._buildRetainers):
1422         (WebInspector.HeapSnapshot.prototype.get nodeIndexes):
1423
1424 2012-03-21  Jessie Berlin  <jberlin@apple.com>
1425
1426         WTF headers should be in $(ConfigurationBuildDir)\include\private\wtf, not
1427         $(ConfigurationBuildDir)\include\private\JavaScriptCore\wtf.
1428         https://bugs.webkit.org/show_bug.cgi?id=81739
1429
1430         Reviewed by Dan Bernstein.
1431
1432         * WebCore.vcproj/WebCore.vcproj:
1433         Look for AtomicString.cpp, StringBuilder.cpp, StringImpl.cpp, and WTFString.cpp in the wtf
1434         subdirectory of the build output, not the JavaScriptCore/wtf subdirectory.
1435
1436 2012-03-21  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1437
1438         [BlackBerry] Credential save and autofill implemetation
1439         https://bugs.webkit.org/show_bug.cgi?id=80401
1440
1441         Reviewed by Rob Buis.
1442
1443         Added interface function authenticationChallenge() and
1444         notifyShouldSaveCredential() into PageClientBlackBerry.
1445         As this class is our platform specific interface,
1446         by doing this we don't need to add an interface function
1447         in class FrameLoaderClient which is a platform
1448         independent interface.
1449
1450         No new tests.
1451
1452         * platform/blackberry/PageClientBlackBerry.h:
1453         (WebCore):
1454         * platform/network/blackberry/NetworkJob.cpp:
1455         (WebCore::NetworkJob::sendRequestWithCredentials):
1456
1457 2012-03-21  Ilya Tikhonovsky  <loislo@chromium.org>
1458
1459         Web Inspector: HeapProfiler: DOM node id can overflow Int32.
1460         https://bugs.webkit.org/show_bug.cgi?id=81776
1461
1462         Reviewed by Pavel Feldman.
1463
1464         * inspector/front-end/HeapSnapshot.js:
1465         (WebInspector.Uint32Array):
1466         (WebInspector.HeapSnapshotLoader.prototype.pushJSONChunk):
1467         (WebInspector.HeapSnapshot.prototype._buildReverseIndex.var):
1468         (WebInspector.HeapSnapshot.prototype._buildReverseIndex):
1469         (WebInspector.HeapSnapshot.prototype._buildNodeIndex):
1470
1471 2012-03-21  Tim Dresser  <tdresser@chromium.org>
1472
1473         [chromium] Increase size of Combo Box Options for touch and high DPI devices
1474         https://bugs.webkit.org/show_bug.cgi?id=80027
1475
1476         Reviewed by Darin Fisher.
1477
1478         Scale Combo box popups by defaultDeviceScaleFactor, and add padding to
1479         <option> elements when touch is enabled.
1480
1481         Manually tested with --default-device-scale-factor=1,2 and unset.
1482         Each of these were tested with RuntimeEnabledFeatures::touchEnabled
1483         set to true and false.
1484
1485         * platform/chromium/PopupListBox.cpp:
1486         (WebCore::PopupListBox::paint):
1487         (WebCore::PopupListBox::paintRow):
1488         (WebCore::PopupListBox::getRowHeight):
1489         * platform/chromium/PopupListBox.h:
1490         (PopupContainerSettings):
1491         * platform/chromium/PopupMenuChromium.cpp:
1492         (WebCore):
1493         (WebCore::PopupMenuChromium::show):
1494         * platform/chromium/PopupMenuChromium.h:
1495         (WebCore::PopupMenuChromium::optionPaddingForTouch):
1496         (WebCore::PopupMenuChromium::setOptionPaddingForTouch):
1497         (PopupMenuChromium):
1498         * rendering/RenderMenuList.cpp:
1499         (WebCore::RenderMenuList::showPopup):
1500
1501 2012-03-21  Takashi Toyoshima  <toyoshim@chromium.org>
1502
1503         [Chromium] [WebSocket] provide WebFrameClient with a chance of
1504         accessing to opening WebSocketStreamHandle.
1505         https://bugs.webkit.org/show_bug.cgi?id=78459
1506
1507         Reviewed by Kent Tamura and Darin Fisher.
1508
1509         Add willOpenSocketStream client function to WebFrameClient with an
1510         argument representing an opening SocketStreamHandle.
1511         These mechanisms provide embedders with a chance to bind arbitrary
1512         data to a WebSocketStreamHandle from WebFrameClient to which the
1513         WebSocket object having the WebSocketStreamHandle belongs.
1514
1515         No new tests because this change just provide mechanisms to embedders.
1516
1517         * Modules/websockets/WebSocketChannel.cpp: Implement willOpenSocketStream to call a client function in WebFrameClient.
1518         (WebCore::WebSocketChannel::willOpenSocketStream):
1519         (WebCore):
1520         * Modules/websockets/WebSocketChannel.h: Add willOpenSocketStream declaration.
1521         (WebSocketChannel):
1522         * loader/FrameLoaderClient.h: Add dispatchWillOpenSocketStream declaration.
1523         (WebCore):
1524         (FrameLoaderClient):
1525         (WebCore::FrameLoaderClient::dispatchWillOpenSocketStream):
1526         * platform/network/SocketStreamHandleClient.h: Add willOpenSocketStream declaration.
1527         (WebCore::SocketStreamHandleClient::willOpenSocketStream):
1528
1529 2012-03-21  Vineet Chaudhary  <rgf748@motorola.com>
1530
1531         https://bugs.webkit.org/show_bug.cgi?id=81761
1532         Fix Gobject binding for sequence<T> for function return type.
1533
1534         Reviewed by Kentaro Hara.
1535
1536         No new tests.
1537
1538         * bindings/scripts/CodeGeneratorGObject.pm:
1539         (SkipFunction): Skip function with sequence<T> return type.
1540         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1541         (webkit_dom_test_obj_method_with_sequence_arg):
1542         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1543
1544 2012-03-21  Andrey Kosyakov  <caseq@chromium.org>
1545
1546         Unreviewed build fix for r111529.
1547
1548         * inspector/InjectedScriptHost.h:
1549         (WebCore):
1550
1551 2012-03-21  Sheriff Bot  <webkit.review.bot@gmail.com>
1552
1553         Unreviewed, rolling out r111497, r111506, r111508, and
1554         r111513.
1555         http://trac.webkit.org/changeset/111497
1556         http://trac.webkit.org/changeset/111506
1557         http://trac.webkit.org/changeset/111508
1558         http://trac.webkit.org/changeset/111513
1559         https://bugs.webkit.org/show_bug.cgi?id=81774
1560
1561         It broke 2 tests on all platform (Requested by Ossy on
1562         #webkit).
1563
1564         * css/CSSStyleSelector.cpp:
1565         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
1566         * css/SelectorChecker.cpp:
1567         (WebCore::SelectorChecker::checkOneSelector):
1568         * html/HTMLKeygenElement.cpp:
1569         (WebCore::HTMLKeygenElement::HTMLKeygenElement):
1570         * html/HTMLOptionElement.cpp:
1571         (WebCore::HTMLOptionElement::HTMLOptionElement):
1572         (WebCore::HTMLOptionElement::create):
1573         (WebCore::HTMLOptionElement::attach):
1574         (WebCore::HTMLOptionElement::detach):
1575         (WebCore::HTMLOptionElement::formControlType):
1576         (WebCore):
1577         (WebCore::HTMLOptionElement::parseAttribute):
1578         (WebCore::HTMLOptionElement::childrenChanged):
1579         (WebCore::HTMLOptionElement::insertedIntoTree):
1580         * html/HTMLOptionElement.h:
1581         (HTMLOptionElement):
1582         (WebCore::HTMLOptionElement::ownElementDisabled):
1583         * html/HTMLTagNames.in:
1584
1585 2012-03-21  Andrey Kosyakov  <caseq@chromium.org>
1586
1587         Web Inspector: expose getEventListeners() to console command line API
1588         https://bugs.webkit.org/show_bug.cgi?id=81658
1589
1590         Reviewed by Yury Semikhatsky.
1591
1592         Test: inspector/console/command-line-api-getEventListeners.html
1593
1594         * bindings/js/JSInjectedScriptHostCustom.cpp:
1595         (WebCore::JSInjectedScriptHost::functionDetails):
1596         (WebCore):
1597         (WebCore::getJSListenerFunctions):
1598         (WebCore::JSInjectedScriptHost::getEventListeners):
1599         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
1600         (WebCore::getJSListenerFunctions):
1601         (WebCore):
1602         (WebCore::V8InjectedScriptHost::getEventListenersCallback):
1603         * inspector/InjectedScriptHost.cpp:
1604         (WebCore::InjectedScriptHost::InjectedScriptHost):
1605         (WebCore::InjectedScriptHost::disconnect):
1606         (WebCore::InjectedScriptHost::getEventListenersImpl):
1607         (WebCore):
1608         * inspector/InjectedScriptHost.h:
1609         (WebCore):
1610         (WebCore::InjectedScriptHost::init):
1611         (InjectedScriptHost):
1612         * inspector/InjectedScriptHost.idl:
1613         * inspector/InjectedScriptSource.js:
1614         (.):
1615         * inspector/InspectorController.cpp:
1616         (WebCore::InspectorController::InspectorController):
1617         * inspector/InspectorDOMAgent.cpp:
1618         (WebCore::InspectorDOMAgent::getEventListenersForNode):
1619         (WebCore::InspectorDOMAgent::getEventListeners):
1620         (WebCore):
1621         * inspector/InspectorDOMAgent.h:
1622         (InspectorDOMAgent):
1623         * inspector/WorkerInspectorController.cpp:
1624         (WebCore::WorkerInspectorController::WorkerInspectorController):
1625
1626 2012-03-21  Kentaro Hara  <haraken@chromium.org>
1627
1628         Unreviewed, rebaselined run-bindings-tests results.
1629
1630         * bindings/scripts/test/CPP/WebDOMFloat64Array.cpp:
1631         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
1632         * bindings/scripts/test/GObject/WebKitDOMFloat64ArrayPrivate.h:
1633         * bindings/scripts/test/ObjC/DOMFloat64Array.mm:
1634
1635 2012-03-21  Ian Vollick  <vollick@chromium.org>
1636
1637         [chromium] timing functions are getting incorrectly applied for accelerated css transitions
1638         https://bugs.webkit.org/show_bug.cgi?id=81692
1639
1640         Reviewed by Adrienne Walker.
1641
1642         Tested in CCLayerTreeHostTestAddAnimationWithTimingFunction
1643
1644         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
1645
1646 2012-03-21  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1647
1648         [Qt] Cookie Jar blocks on fsync in SQLITE
1649         https://bugs.webkit.org/show_bug.cgi?id=81755
1650
1651         Reviewed by Simon Hausmann.
1652
1653         Set PRAGMA synchronous to OFF, which tells SQLITE to never fsync.
1654
1655         * platform/qt/CookieJarQt.cpp:
1656         (WebCore::SharedCookieJarQt::ensureDatabaseTable):
1657
1658 2012-03-21  Ian Vollick  <vollick@chromium.org>
1659
1660         [chromium] Animation events should only be used for synchronizing animation start times
1661         https://bugs.webkit.org/show_bug.cgi?id=81484
1662
1663         Reviewed by Adrienne Walker.
1664
1665         Tested in CCLayerTreeHostTestSynchronizeAnimationStartTimes
1666
1667         Eliminated animation finished events. Animations will finish naturally on the
1668         main thread and the final values will be set.
1669
1670         Animation started events are now also used to synchronize the main thread
1671         animations' start times with their impl thread equivalents, preventing skew.
1672         Until main thread animations receive their synchronized start times, they will
1673         apply their initial values (i.e., they will be paused at time zero). This
1674         guarantees that we will not jump to the animation's final value on the main
1675         thread while we wait for the synchronized start time.
1676
1677         * WebCore.gypi:
1678         * platform/graphics/chromium/LayerChromium.cpp:
1679         (WebCore::LayerChromium::notifyAnimationStarted):
1680         * platform/graphics/chromium/LayerChromium.h:
1681         (WebCore):
1682         (LayerChromium):
1683         * platform/graphics/chromium/cc/CCActiveAnimation.cpp:
1684         (WebCore::CCActiveAnimation::CCActiveAnimation):
1685         * platform/graphics/chromium/cc/CCActiveAnimation.h:
1686         (CCActiveAnimation):
1687         (WebCore::CCActiveAnimation::needsSynchronizedStartTime):
1688         (WebCore::CCActiveAnimation::setNeedsSynchronizedStartTime):
1689         * platform/graphics/chromium/cc/CCAnimationEvents.cpp: Removed.
1690         * platform/graphics/chromium/cc/CCAnimationEvents.h:
1691         (WebCore::CCAnimationStartedEvent::CCAnimationStartedEvent):
1692         (CCAnimationStartedEvent):
1693         (WebCore):
1694         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
1695         (WebCore::CCLayerAnimationController::animate):
1696         (WebCore::CCLayerAnimationController::notifyAnimationStarted):
1697         (WebCore):
1698         (WebCore::CCLayerAnimationController::pushNewAnimationsToImplThread):
1699         (WebCore::CCLayerAnimationController::startAnimationsWaitingForNextTick):
1700         (WebCore::CCLayerAnimationController::startAnimationsWaitingForStartTime):
1701         (WebCore::CCLayerAnimationController::startAnimationsWaitingForTargetAvailability):
1702         (WebCore::CCLayerAnimationController::purgeFinishedAnimations):
1703         (WebCore::CCLayerAnimationController::tickAnimations):
1704         * platform/graphics/chromium/cc/CCLayerAnimationController.h:
1705         (CCLayerAnimationController):
1706         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1707         (WebCore::CCLayerTreeHost::updateAnimations):
1708         (WebCore::CCLayerTreeHost::setAnimationEventsRecursive):
1709         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1710         (CCLayerTreeHost):
1711
1712 2012-03-21  Zeno Albisser  <zeno@webkit.org>
1713
1714         [Qt][WK2][Mac] MiniBrowser asserts at HashTable.h:480
1715         https://bugs.webkit.org/show_bug.cgi?id=81113
1716
1717         The GLContext is created by QWindow/QSurface using
1718         QOpenGLContext which is implemented using NSOpenGL functions
1719         on mac. Therefore we should use QOpenGLContext as well when
1720         querying for the current context. AGL is not supposed
1721         to be paired with NSOpenGL.
1722         Altering the typedef for GLContext is fine, since
1723         the GLContext type is only used as a key in a map.
1724
1725         Reviewed by Kenneth Rohde Christiansen.
1726
1727         * platform/graphics/texmap/TextureMapperGL.cpp:
1728         (SharedGLData):
1729         (WebCore::TextureMapperGLData::SharedGLData::getCurrentGLContext):
1730
1731 2012-03-21  Ilya Tikhonovsky  <loislo@chromium.org>
1732
1733         Web Inspector: HeapSnapshot: make _bfs twice as fast as the old version.
1734         https://bugs.webkit.org/show_bug.cgi?id=81756
1735
1736         Reviewed by Yury Semikhatsky.
1737
1738         * inspector/front-end/HeapSnapshot.js:
1739         (WebInspector.HeapSnapshot.prototype._calculateObjectToWindowDistance):
1740         (WebInspector.HeapSnapshot.prototype._bfs):
1741
1742 2012-03-21  Vineet Chaudhary  <rgf748@motorola.com>
1743
1744         https://bugs.webkit.org/show_bug.cgi?id=81705
1745         REGRESSION (r111416): fast/dom/prototype-inheritance-2.html is failing.
1746
1747         Reviewed by Csaba Osztrogonác.
1748
1749         No new tests.
1750
1751         * bindings/js/JSDOMBinding.h: Needs passing globalObject to constructArray().
1752         (WebCore::jsArray):
1753
1754 2012-03-21  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1755
1756         [BlackBerry] Upstreaming blackberry specific css file
1757         https://bugs.webkit.org/show_bug.cgi?id=81650
1758
1759         Ustream BlackBerry specific css files, including:
1760         css/themeBlackBerry.css
1761         css/mediaControlsBlackBerry.css
1762
1763         Reviewed by Nikolas Zimmermann.
1764
1765         No new tests, this is the initial upstream patch
1766         for BlackBerry specific css files.
1767
1768         * css/mediaControlsBlackBerry.css: Added.
1769         (audio):
1770         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
1771         (video:-webkit-full-page-media::-webkit-media-controls-panel):
1772         (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
1773         (audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container):
1774         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
1775         (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display):
1776         (audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
1777         (audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-fullscreen-button):
1778         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
1779         (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
1780         (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
1781         (audio::-webkit-media-controls-seek-back-button, video::-webkit-media-controls-seek-back-button):
1782         (audio::-webkit-media-controls-seek-forward-button, video::-webkit-media-controls-seek-forward-button):
1783         * css/themeBlackBerry.css: Added.
1784         (textarea):
1785         (input, textarea):
1786         (input[type="color"]):
1787         (select:focus):
1788         (select[size][multiple]):
1789         (select[size][multiple]:focus):
1790
1791 2012-03-21  Levi Weintraub  <leviw@chromium.org>
1792
1793         Update LayoutUnit usage in descendants of RenderReplaced
1794         https://bugs.webkit.org/show_bug.cgi?id=80918
1795
1796         Reviewed by Eric Seidel.
1797
1798         Replaced elements have to flow in the new sub-pixel Render Tree, but since the rendering of these
1799         often takes place outside of WebCore (or in cases such as foreign objects, in WebCore after
1800         passing through platform code), care must be taken to determine the final rendered size and
1801         location before render time. This patch brings these classes up to the latest and greatest in the
1802         subpixellayout branch.
1803
1804         See https://trac.webkit.org/wiki/LayoutUnit for more information.
1805
1806         No new tests. No change in behavior.
1807
1808         * rendering/RenderFrameBase.cpp:
1809         (WebCore::RenderFrameBase::layoutWithFlattening): Build Fix.
1810         * rendering/RenderFullScreen.cpp:
1811         (RenderFullScreen::createPlaceholder): Ditto.
1812         * rendering/RenderFullScreen.h:
1813         (RenderFullScreen): Ditto.
1814         * rendering/RenderHTMLCanvas.cpp:
1815         (WebCore::RenderHTMLCanvas::canvasSizeChanged): Ditto.
1816         * rendering/RenderIFrame.cpp:
1817         (WebCore::RenderIFrame::computeLogicalHeight): Ditto.
1818         (WebCore::RenderIFrame::computeLogicalWidth): Ditto.
1819         * rendering/RenderImage.cpp:
1820         (WebCore::RenderImage::updateIntrinsicSizeIfNeeded): Intrinsic sizes are always integers, since they
1821         originate outside of WebCore.
1822         (WebCore::RenderImage::paintIntoRect): Use pixel snapping to paint into an arbitrary rect.
1823         (WebCore::RenderImage::computeReplacedLogicalWidth): Intrinsic size is always integral -- rounding
1824         values to integers.
1825         * rendering/RenderImage.h:
1826         (RenderImage):
1827         * rendering/RenderVideo.cpp:
1828         (WebCore::RenderVideo::videoBox):
1829         (WebCore::RenderVideo::paintReplaced): Painting at integer boundaries.
1830         * rendering/RenderWidget.cpp:
1831         (WebCore):
1832         (WebCore::roundedIntRect): Widgets are rendered outside of WebCore, so we always align them to
1833         integer boundaries. This means we can actually round the size of our ultimate content box. This
1834         function is implemented here specifically to prevent its misuse if we put it elsewhere.
1835         (WebCore::RenderWidget::setWidgetGeometry): We simplify layout by taking a LayoutRect and rounding
1836         it to its final location within this function.
1837         (WebCore::RenderWidget::updateWidgetGeometry): We keep things in LayoutUnits until handing off to
1838         setWidgetGeometry.
1839         (WebCore::RenderWidget::paint): Rounding the paint location before handing painting off to the
1840         widget itself.
1841         * rendering/RenderWidget.h:
1842         (RenderWidget):
1843
1844 2012-03-21  Ilya Tikhonovsky  <loislo@chromium.org>
1845
1846         Web Inspector: HeapProfiler: support distance column in Summary View.
1847         https://bugs.webkit.org/show_bug.cgi?id=81675
1848
1849         In many cases when a page leaked an object we see not only this object
1850         but the all objects it retains. It is quite difficult to find out which
1851         the object is the root of leak. It'd be simpler to sort the leaked
1852         objects by Distance column and track down the first one.
1853
1854         Reviewed by Yury Semikhatsky.
1855
1856         * inspector/front-end/DetailedHeapshotGridNodes.js:
1857         (WebInspector.HeapSnapshotGenericObjectNode):
1858         (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
1859         (WebInspector.HeapSnapshotInstanceNode.prototype.comparator):
1860         (WebInspector.HeapSnapshotConstructorNode):
1861         (WebInspector.HeapSnapshotConstructorNode.prototype.comparator):
1862         (WebInspector.HeapSnapshotConstructorNode.prototype.get data):
1863         * inspector/front-end/DetailedHeapshotView.js:
1864         (WebInspector.HeapSnapshotConstructorsDataGrid):
1865         (WebInspector.HeapSnapshotConstructorsDataGrid.prototype._defaultPopulateCount.100._sortFields):
1866         * inspector/front-end/HeapSnapshot.js:
1867         (WebInspector.HeapSnapshotNodesProvider.prototype._serialize):
1868
1869 2012-03-21  Charles Wei  <charles.wei@torchmobile.com.cn>
1870
1871         [BlackBerry] Remove redundant code in SocketStreamHandler
1872         https://bugs.webkit.org/show_bug.cgi?id=81726
1873
1874         Reviewed by George Staikos.
1875
1876         No new tests needed. Just remove redundant code.
1877
1878         * platform/network/blackberry/SocketStreamHandle.h:
1879         (SocketStreamHandle):
1880         * platform/network/blackberry/SocketStreamHandleBlackBerry.cpp:
1881
1882 2012-03-20  Eric Seidel  <eric@webkit.org>
1883
1884         Move wtf/Platform.h from JavaScriptCore to Source/WTF/wtf
1885         https://bugs.webkit.org/show_bug.cgi?id=80911
1886
1887         Reviewed by Adam Barth.
1888
1889         * CMakeLists.txt:
1890          - Look for headers in Source/WTF as well.
1891
1892 2012-03-20  Dana Jansens  <danakj@chromium.org>
1893
1894         [chromium] Use origin transform to transform occlusion from surface content space to its target content space
1895         https://bugs.webkit.org/show_bug.cgi?id=81730
1896
1897         Reviewed by Adrienne Walker.
1898
1899         Unit test: CCOcclusionTrackerTestSurfaceOcclusionTranslatesToParent
1900
1901         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
1902         (WebCore::transformSurfaceOpaqueRegion):
1903         (WebCore::::leaveToTargetRenderSurface):
1904
1905 2012-03-19  Shinya Kawanaka  <shinyak@chromium.org>
1906
1907         [Crash] RenderMenuList::addChild() in Shadow DOM.
1908         https://bugs.webkit.org/show_bug.cgi?id=81201
1909
1910         Reviewed by Dimitri Glazkov.
1911
1912         <audio>, <video>, <meter>, <progress>, and <select> are implemented using
1913         Shadow DOM having HTMLContentElement. Their renderer children basically should not
1914         create a renderer unless they are on the upper shadow encapsulation boundary,
1915         which means they are the direct children of the shadow root.
1916
1917         However, current implementation allows their renderer children to create a renderer
1918         even if they are on a lower shadow encapsulation boundary, which means
1919         they are distributed elements of HTMLContentElement.
1920
1921         This patch makes there renderer children not to create a renderer if they are on a lower shadow
1922         encapsulation boudary.
1923
1924         Tests: fast/dom/shadow/content-element-in-media-element.html
1925                fast/dom/shadow/content-element-in-meter-element.html
1926                fast/dom/shadow/content-element-in-progress-element.html
1927                fast/dom/shadow/content-element-in-select-element.html
1928
1929         * dom/NodeRenderingContext.h:
1930         (NodeRenderingContext):
1931         (WebCore::NodeRenderingContext::isOnUpperEncapsulationBoundary):
1932         (WebCore):
1933         * html/HTMLMediaElement.cpp:
1934         (WebCore::HTMLMediaElement::childShouldCreateRenderer):
1935         * html/HTMLMeterElement.cpp:
1936         (WebCore::HTMLMeterElement::childShouldCreateRenderer):
1937         * html/HTMLProgressElement.cpp:
1938         (WebCore::HTMLProgressElement::childShouldCreateRenderer):
1939         * html/HTMLSelectElement.cpp:
1940         (WebCore::HTMLSelectElement::childShouldCreateRenderer):
1941
1942 2012-03-20  Dana Jansens  <danakj@chromium.org>
1943
1944         [chromium] Store origin/screen space transforms for surface and replica in the surface
1945         https://bugs.webkit.org/show_bug.cgi?id=81296
1946
1947         Reviewed by Adrienne Walker.
1948
1949         Compute and save a number of transforms for render surfaces. The origin
1950         tranform for the replica into its target surface. The origin transform
1951         for the replica into the screen. And the origin transform for the surface
1952         into the screen.
1953
1954         These transforms will allow us to detect occlusion of render surfaces,
1955         allowing us to cull (or partially-cull) the render surface quad during
1956         drawing.
1957
1958         This also fixes a subtle bug in the transforms used by the damage
1959         tracking code.
1960
1961         Unit test: CCLayerTreeHostCommonTest.verifyTransformsForSingleRenderSurface
1962                    CCLayerTreeHostCommonTest.verifyTransformsForReplica
1963                    CCLayerTreeHostCommonTest.verifyTransformsForRenderSurfaceHierarchy
1964
1965         * platform/graphics/chromium/RenderSurfaceChromium.h:
1966         (WebCore::RenderSurfaceChromium::screenSpaceTransform):
1967         (WebCore::RenderSurfaceChromium::setScreenSpaceTransform):
1968         (RenderSurfaceChromium):
1969         (WebCore::RenderSurfaceChromium::replicaOriginTransform):
1970         (WebCore::RenderSurfaceChromium::setReplicaOriginTransform):
1971         (WebCore::RenderSurfaceChromium::replicaScreenSpaceTransform):
1972         (WebCore::RenderSurfaceChromium::setReplicaScreenSpaceTransform):
1973         * platform/graphics/chromium/cc/CCDamageTracker.cpp:
1974         (WebCore::CCDamageTracker::extendDamageForRenderSurface):
1975         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
1976         (WebCore::calculateDrawTransformsAndVisibilityInternal):
1977         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1978         (WebCore::damageInSurfaceSpace):
1979         * platform/graphics/chromium/cc/CCRenderSurface.h:
1980         (WebCore::CCRenderSurface::setDrawTransform):
1981         (WebCore::CCRenderSurface::drawTransform):
1982         (WebCore::CCRenderSurface::setScreenSpaceTransform):
1983         (WebCore::CCRenderSurface::screenSpaceTransform):
1984         (CCRenderSurface):
1985         (WebCore::CCRenderSurface::setReplicaDrawTransform):
1986         (WebCore::CCRenderSurface::replicaDrawTransform):
1987         (WebCore::CCRenderSurface::setReplicaOriginTransform):
1988         (WebCore::CCRenderSurface::replicaOriginTransform):
1989         (WebCore::CCRenderSurface::setReplicaScreenSpaceTransform):
1990         (WebCore::CCRenderSurface::replicaScreenSpaceTransform):
1991
1992 2012-03-20  Yoshifumi Inoue  <yosin@chromium.org>
1993
1994         [Forms] The option element should not be form associated element.
1995         https://bugs.webkit.org/show_bug.cgi?id=79764
1996
1997         Reviewed by Kent Tamura.
1998
1999         This patch changes base class of HTMLOptionELement to HTMLElement
2000         from HTMLFormControlElement for saving memory space and iteration
2001         time of extra "option" elements in HTMLFormElement::m_formAssociatedElements
2002         and matching the HTML5 specification for ease of maintenance.
2003
2004         This patch changes behavior of handling of CSS pseudo classes "invalid"
2005         and "valid". The "option" elements no longer use these CSS pseudo classes
2006         as HTML5 specification. This bug was filed in https://bugs.webkit.org/show_bug.cgi?id=80088
2007
2008         Changes of TextIterator is lead by usage of isFormControlElement. This
2009         changes will be replaced with more meaningful predicate as part of
2010         https://bugs.webkit.org/show_bug.cgi?id=80381
2011
2012         No new tests but updated select-live-pseudo-selectors.html test.
2013
2014         * css/CSSStyleSelector.cpp:
2015         (WebCore::CSSStyleSelector::canShareStyleWithElement): Added checking of the "option" element and returns false as HTMLFormControlElement.
2016         * css/SelectorChecker.cpp:
2017         (WebCore::SelectorChecker::checkOneSelector): Removed isFormControlElement for PseudoDisabled and PseudoChecked.
2018         * html/HTMLKeygenElement.cpp:
2019         (WebCore::HTMLKeygenElement::HTMLKeygenElement): Removed form parameter of call site of HTMLOptionElement::create.
2020         * html/HTMLOptionElement.cpp:
2021         (WebCore::HTMLOptionElement::HTMLOptionElement): Removed form parameter which no longer needed. Changed base class in initialization list. Added m_disabled initialization.
2022         (WebCore::HTMLOptionElement::create): Removed form parameter which no longer needed.
2023         (WebCore::HTMLOptionElement::attach): Changeid base class.
2024         (WebCore::HTMLOptionElement::detach): Changed base class.
2025         (WebCore::HTMLOptionElement::parseAttribute): Changed base class. Added "disabled" attribute handling.
2026         (WebCore::HTMLOptionElement::childrenChanged): Changed base class.
2027         (WebCore::HTMLOptionElement::insertedIntoTree): Changed base class.
2028         * html/HTMLOptionElement.h:
2029         (HTMLOptionElement): Added new member variable m_disabled which was in HTMLFormControlElement.
2030         (WebCore::HTMLOptionElement::ownElementDisabled): Changed for using m_disabled.
2031         * html/HTMLTagNames.in: Removed constructorNeedsFormElement for the "option" element, which was used for passing form parameter to create function.
2032
2033 2012-03-20  Xiaomei Ji  <xji@chromium.org>
2034
2035         Crash introduced in r110965.
2036         https://bugs.webkit.org/show_bug.cgi?id=81720
2037
2038         Reviewed by Ryosuke Niwa.
2039
2040         Since word break iterator just keeps a pointer to the UChar array given to the constructor,
2041         we need to allocate the UChar array deeper in the stack than the iterator.
2042
2043         Test: editing/selection/move-by-word-visually-crash-test-5.html
2044
2045         * editing/visible_units.cpp:
2046         (WebCore::wordBreakIteratorForMinOffsetBoundary):
2047         (WebCore::wordBreakIteratorForMaxOffsetBoundary):
2048         (WebCore::visualWordPosition):
2049
2050 2012-03-20  W. James MacLean  <wjmaclean@chromium.org>
2051
2052         [chromium] Convert TouchFlingPlatformGestureCurve to a 2-D Bezier for better control of curve shape.
2053         https://bugs.webkit.org/show_bug.cgi?id=81713
2054
2055         Reviewed by Dirk Pranke.
2056
2057         Exisiting unit test revised to cover this change.
2058
2059         Change the fling gesture animation curve to use a 2-D Bezier to obtain greater control
2060         over the shape of the curve. Also, change time scaling code to be logarithmic for more
2061         natural feel.
2062
2063         * platform/TouchFlingPlatformGestureCurve.cpp:
2064         (WebCore::TouchFlingPlatformGestureCurve::TouchFlingPlatformGestureCurve):
2065         (WebCore::TouchFlingPlatformGestureCurve::apply):
2066
2067 2012-03-18  Tim Horton  <timothy_horton@apple.com>
2068
2069         Infinite repaint loop with SVGImageCache and deferred repaint timers
2070         https://bugs.webkit.org/show_bug.cgi?id=78315
2071         <rdar://problem/10651634>
2072
2073         Reviewed by Nikolas Zimmermann.
2074
2075         Only defer image redraw on a timer if we're in layout. This breaks
2076         the repaint loop while still preventing us from drawing inside layout.
2077
2078         Completely disable repaint during relayout inside SVGImage::drawSVGToImageBuffer,
2079         preventing deferred repaint timers from being started during that process.
2080
2081         No new tests, as the problem only occurs in a nonstandard configuration.
2082
2083         * page/FrameView.cpp:
2084         (WebCore::FrameView::FrameView):
2085         (WebCore::FrameView::reset):
2086         (WebCore::FrameView::repaintContentRectangle):
2087         (WebCore::FrameView::endDeferredRepaints):
2088         (WebCore::FrameView::startDeferredRepaintTimer):
2089         (WebCore):
2090         (WebCore::FrameView::doDeferredRepaints):
2091         (WebCore::FrameView::deferredRepaintTimerFired):
2092         (WebCore::FrameView::beginDisableRepaints):
2093         (WebCore::FrameView::endDisableRepaints):
2094         * page/FrameView.h:
2095         (FrameView):
2096         (WebCore::FrameView::repaintsDisabled):
2097         * rendering/RenderView.cpp:
2098         (WebCore::RenderView::shouldRepaint):
2099         * svg/graphics/SVGImage.cpp:
2100         (WebCore::SVGImage::drawSVGToImageBuffer):
2101         (WebCore::SVGImage::draw):
2102         (WebCore::SVGImage::frameView):
2103         (WebCore):
2104         * svg/graphics/SVGImage.h:
2105         (WebCore):
2106         * svg/graphics/SVGImageCache.cpp:
2107         (WebCore::SVGImageCache::imageContentChanged):
2108         (WebCore::SVGImageCache::redraw):
2109         (WebCore::SVGImageCache::redrawTimerFired):
2110         (WebCore):
2111         * svg/graphics/SVGImageCache.h:
2112         (SVGImageCache):
2113
2114 2012-03-20  Adam Klein  <adamk@chromium.org>
2115
2116         Include fix for dom/xhtml test promised in r111449.
2117
2118         * dom/ContainerNode.cpp:
2119         (WebCore::ContainerNode::replaceChild): Check against next instead of
2120         prev when deciding there's no work to do.
2121
2122 2012-03-20  Jon Lee  <jonlee@apple.com>
2123
2124         Restrict access to notifications for unique origins and file URLs with no local file access
2125         https://bugs.webkit.org/show_bug.cgi?id=79704
2126         <rdar://problem/10912430>
2127
2128         Reviewed by Adam Barth.
2129
2130         Before checking or requesting permissions, we look at whether we can show notifications based on
2131         the security context. If not, we short circuit and do not forward the request to the client.
2132
2133         * notifications/Notification.cpp:
2134         (WebCore::Notification::Notification): Fix a bug where creating a notification goes through slightly
2135         different logic for checking permissions than when checking permissions through the
2136         notification center.
2137         * notifications/NotificationCenter.cpp:
2138         (WebCore::NotificationCenter::checkPermission): Check to see if the origin can show notifications.
2139         (WebCore::NotificationCenter::requestPermission): If we know whether an origin can show notifications,
2140         we asynchronously call the callback with that decision. Otherwise we ask the client.
2141
2142         Add new variable in the notification center to keep track of pending callbacks when we short-circuit
2143         requestPermission().
2144         * notifications/NotificationCenter.h:
2145         (NotificationRequestCallback): Add new private class encapsulating the callback.
2146         * notifications/NotificationCenter.cpp:
2147         (WebCore::NotificationCenter::requestTimedOut): Remove the request from the set of pending callbacks.
2148         (WebCore::NotificationCenter::NotificationRequest::createAndStartTimer): Because this is used when we already
2149         know the decision, and are not asking the client to decide, we can immediately trigger a one-shot timer
2150         to invoke the callback.
2151         (WebCore::NotificationCenter::NotificationRequest::NotificationRequest):
2152         (WebCore::NotificationCenter::NotificationRequest::startTimer):
2153         (WebCore::NotificationCenter::NotificationRequest::timerFired): Invoke the callback and tell the notification
2154         center.
2155         * page/SecurityOrigin.h: Add new toRawString() method to return the string representation of the origin,
2156         regardless of any restrictions that might otherwise cause toString() to return "null".
2157         * page/SecurityOrigin.cpp:
2158         (WebCore::SecurityOrigin::canShowNotifications): Added to return a tri-state regarding whether we know
2159         the origin can show notifications. If the origin is unique, we never let it show. If the origin has
2160         universal access, we always let it show. Otherwise the client should be asked.
2161         (WebCore::SecurityOrigin::toString): Refactor to use toRawString().
2162         (WebCore::SecurityOrigin::toRawString):
2163
2164         Added FIXME's regarding the naming of enforceFilePathSeparation().
2165         * dom/Document.cpp:
2166         (WebCore::Document::initSecurityContext): Also, tab reformatting.
2167
2168         * WebCore.exp.in: Export toRawString().
2169
2170 2012-03-20  Mark Pilgrim  <pilgrim@chromium.org>
2171
2172         Move webaudio to Modules/webaudio/
2173         https://bugs.webkit.org/show_bug.cgi?id=81541
2174
2175         Reviewed by Kentaro Hara.
2176
2177         No new tests, all existing tests pass.
2178
2179         * CMakeLists.txt:
2180         * DerivedSources.make:
2181         * DerivedSources.pri:
2182         * GNUmakefile.am:
2183         * GNUmakefile.list.am:
2184         * Modules/webaudio: Added.
2185         * Modules/webaudio/AsyncAudioDecoder.cpp: Copied from Source/WebCore/webaudio/AsyncAudioDecoder.cpp.
2186         * Modules/webaudio/AsyncAudioDecoder.h: Copied from Source/WebCore/webaudio/AsyncAudioDecoder.h.
2187         * Modules/webaudio/AudioBasicProcessorNode.cpp: Copied from Source/WebCore/webaudio/AudioBasicProcessorNode.cpp.
2188         * Modules/webaudio/AudioBasicProcessorNode.h: Copied from Source/WebCore/webaudio/AudioBasicProcessorNode.h.
2189         * Modules/webaudio/AudioBuffer.cpp: Copied from Source/WebCore/webaudio/AudioBuffer.cpp.
2190         * Modules/webaudio/AudioBuffer.h: Copied from Source/WebCore/webaudio/AudioBuffer.h.
2191         * Modules/webaudio/AudioBuffer.idl: Copied from Source/WebCore/webaudio/AudioBuffer.idl.
2192         * Modules/webaudio/AudioBufferCallback.h: Copied from Source/WebCore/webaudio/AudioBufferCallback.h.
2193         * Modules/webaudio/AudioBufferCallback.idl: Copied from Source/WebCore/webaudio/AudioBufferCallback.idl.
2194         * Modules/webaudio/AudioBufferSourceNode.cpp: Copied from Source/WebCore/webaudio/AudioBufferSourceNode.cpp.
2195         * Modules/webaudio/AudioBufferSourceNode.h: Copied from Source/WebCore/webaudio/AudioBufferSourceNode.h.
2196         * Modules/webaudio/AudioBufferSourceNode.idl: Copied from Source/WebCore/webaudio/AudioBufferSourceNode.idl.
2197         * Modules/webaudio/AudioChannelMerger.cpp: Copied from Source/WebCore/webaudio/AudioChannelMerger.cpp.
2198         * Modules/webaudio/AudioChannelMerger.h: Copied from Source/WebCore/webaudio/AudioChannelMerger.h.
2199         * Modules/webaudio/AudioChannelMerger.idl: Copied from Source/WebCore/webaudio/AudioChannelMerger.idl.
2200         * Modules/webaudio/AudioChannelSplitter.cpp: Copied from Source/WebCore/webaudio/AudioChannelSplitter.cpp.
2201         * Modules/webaudio/AudioChannelSplitter.h: Copied from Source/WebCore/webaudio/AudioChannelSplitter.h.
2202         * Modules/webaudio/AudioChannelSplitter.idl: Copied from Source/WebCore/webaudio/AudioChannelSplitter.idl.
2203         * Modules/webaudio/AudioContext.cpp: Copied from Source/WebCore/webaudio/AudioContext.cpp.
2204         * Modules/webaudio/AudioContext.h: Copied from Source/WebCore/webaudio/AudioContext.h.
2205         * Modules/webaudio/AudioContext.idl: Copied from Source/WebCore/webaudio/AudioContext.idl.
2206         * Modules/webaudio/AudioDestinationNode.cpp: Copied from Source/WebCore/webaudio/AudioDestinationNode.cpp.
2207         * Modules/webaudio/AudioDestinationNode.h: Copied from Source/WebCore/webaudio/AudioDestinationNode.h.
2208         * Modules/webaudio/AudioDestinationNode.idl: Copied from Source/WebCore/webaudio/AudioDestinationNode.idl.
2209         * Modules/webaudio/AudioGain.h: Copied from Source/WebCore/webaudio/AudioGain.h.
2210         * Modules/webaudio/AudioGain.idl: Copied from Source/WebCore/webaudio/AudioGain.idl.
2211         * Modules/webaudio/AudioGainNode.cpp: Copied from Source/WebCore/webaudio/AudioGainNode.cpp.
2212         * Modules/webaudio/AudioGainNode.h: Copied from Source/WebCore/webaudio/AudioGainNode.h.
2213         * Modules/webaudio/AudioGainNode.idl: Copied from Source/WebCore/webaudio/AudioGainNode.idl.
2214         * Modules/webaudio/AudioListener.cpp: Copied from Source/WebCore/webaudio/AudioListener.cpp.
2215         * Modules/webaudio/AudioListener.h: Copied from Source/WebCore/webaudio/AudioListener.h.
2216         * Modules/webaudio/AudioListener.idl: Copied from Source/WebCore/webaudio/AudioListener.idl.
2217         * Modules/webaudio/AudioNode.cpp: Copied from Source/WebCore/webaudio/AudioNode.cpp.
2218         * Modules/webaudio/AudioNode.h: Copied from Source/WebCore/webaudio/AudioNode.h.
2219         * Modules/webaudio/AudioNode.idl: Copied from Source/WebCore/webaudio/AudioNode.idl.
2220         * Modules/webaudio/AudioNodeInput.cpp: Copied from Source/WebCore/webaudio/AudioNodeInput.cpp.
2221         * Modules/webaudio/AudioNodeInput.h: Copied from Source/WebCore/webaudio/AudioNodeInput.h.
2222         * Modules/webaudio/AudioNodeOutput.cpp: Copied from Source/WebCore/webaudio/AudioNodeOutput.cpp.
2223         * Modules/webaudio/AudioNodeOutput.h: Copied from Source/WebCore/webaudio/AudioNodeOutput.h.
2224         * Modules/webaudio/AudioPannerNode.cpp: Copied from Source/WebCore/webaudio/AudioPannerNode.cpp.
2225         * Modules/webaudio/AudioPannerNode.h: Copied from Source/WebCore/webaudio/AudioPannerNode.h.
2226         * Modules/webaudio/AudioPannerNode.idl: Copied from Source/WebCore/webaudio/AudioPannerNode.idl.
2227         * Modules/webaudio/AudioParam.cpp: Copied from Source/WebCore/webaudio/AudioParam.cpp.
2228         * Modules/webaudio/AudioParam.h: Copied from Source/WebCore/webaudio/AudioParam.h.
2229         * Modules/webaudio/AudioParam.idl: Copied from Source/WebCore/webaudio/AudioParam.idl.
2230         * Modules/webaudio/AudioParamTimeline.cpp: Copied from Source/WebCore/webaudio/AudioParamTimeline.cpp.
2231         * Modules/webaudio/AudioParamTimeline.h: Copied from Source/WebCore/webaudio/AudioParamTimeline.h.
2232         * Modules/webaudio/AudioProcessingEvent.cpp: Copied from Source/WebCore/webaudio/AudioProcessingEvent.cpp.
2233         * Modules/webaudio/AudioProcessingEvent.h: Copied from Source/WebCore/webaudio/AudioProcessingEvent.h.
2234         * Modules/webaudio/AudioProcessingEvent.idl: Copied from Source/WebCore/webaudio/AudioProcessingEvent.idl.
2235         * Modules/webaudio/AudioSourceNode.h: Copied from Source/WebCore/webaudio/AudioSourceNode.h.
2236         * Modules/webaudio/AudioSourceNode.idl: Copied from Source/WebCore/webaudio/AudioSourceNode.idl.
2237         * Modules/webaudio/BiquadDSPKernel.cpp: Copied from Source/WebCore/webaudio/BiquadDSPKernel.cpp.
2238         * Modules/webaudio/BiquadDSPKernel.h: Copied from Source/WebCore/webaudio/BiquadDSPKernel.h.
2239         * Modules/webaudio/BiquadFilterNode.cpp: Copied from Source/WebCore/webaudio/BiquadFilterNode.cpp.
2240         * Modules/webaudio/BiquadFilterNode.h: Copied from Source/WebCore/webaudio/BiquadFilterNode.h.
2241         * Modules/webaudio/BiquadFilterNode.idl: Copied from Source/WebCore/webaudio/BiquadFilterNode.idl.
2242         * Modules/webaudio/BiquadProcessor.cpp: Copied from Source/WebCore/webaudio/BiquadProcessor.cpp.
2243         * Modules/webaudio/BiquadProcessor.h: Copied from Source/WebCore/webaudio/BiquadProcessor.h.
2244         * Modules/webaudio/ConvolverNode.cpp: Copied from Source/WebCore/webaudio/ConvolverNode.cpp.
2245         * Modules/webaudio/ConvolverNode.h: Copied from Source/WebCore/webaudio/ConvolverNode.h.
2246         * Modules/webaudio/ConvolverNode.idl: Copied from Source/WebCore/webaudio/ConvolverNode.idl.
2247         * Modules/webaudio/DOMWindowWebAudio.idl: Copied from Source/WebCore/webaudio/DOMWindowWebAudio.idl.
2248         * Modules/webaudio/DefaultAudioDestinationNode.cpp: Copied from Source/WebCore/webaudio/DefaultAudioDestinationNode.cpp.
2249         * Modules/webaudio/DefaultAudioDestinationNode.h: Copied from Source/WebCore/webaudio/DefaultAudioDestinationNode.h.
2250         * Modules/webaudio/DelayDSPKernel.cpp: Copied from Source/WebCore/webaudio/DelayDSPKernel.cpp.
2251         * Modules/webaudio/DelayDSPKernel.h: Copied from Source/WebCore/webaudio/DelayDSPKernel.h.
2252         * Modules/webaudio/DelayNode.cpp: Copied from Source/WebCore/webaudio/DelayNode.cpp.
2253         * Modules/webaudio/DelayNode.h: Copied from Source/WebCore/webaudio/DelayNode.h.
2254         * Modules/webaudio/DelayNode.idl: Copied from Source/WebCore/webaudio/DelayNode.idl.
2255         * Modules/webaudio/DelayProcessor.cpp: Copied from Source/WebCore/webaudio/DelayProcessor.cpp.
2256         * Modules/webaudio/DelayProcessor.h: Copied from Source/WebCore/webaudio/DelayProcessor.h.
2257         * Modules/webaudio/DynamicsCompressorNode.cpp: Copied from Source/WebCore/webaudio/DynamicsCompressorNode.cpp.
2258         * Modules/webaudio/DynamicsCompressorNode.h: Copied from Source/WebCore/webaudio/DynamicsCompressorNode.h.
2259         * Modules/webaudio/DynamicsCompressorNode.idl: Copied from Source/WebCore/webaudio/DynamicsCompressorNode.idl.
2260         * Modules/webaudio/HighPass2FilterNode.cpp: Copied from Source/WebCore/webaudio/HighPass2FilterNode.cpp.
2261         * Modules/webaudio/HighPass2FilterNode.h: Copied from Source/WebCore/webaudio/HighPass2FilterNode.h.
2262         * Modules/webaudio/HighPass2FilterNode.idl: Copied from Source/WebCore/webaudio/HighPass2FilterNode.idl.
2263         * Modules/webaudio/JavaScriptAudioNode.cpp: Copied from Source/WebCore/webaudio/JavaScriptAudioNode.cpp.
2264         * Modules/webaudio/JavaScriptAudioNode.h: Copied from Source/WebCore/webaudio/JavaScriptAudioNode.h.
2265         * Modules/webaudio/JavaScriptAudioNode.idl: Copied from Source/WebCore/webaudio/JavaScriptAudioNode.idl.
2266         * Modules/webaudio/LowPass2FilterNode.cpp: Copied from Source/WebCore/webaudio/LowPass2FilterNode.cpp.
2267         * Modules/webaudio/LowPass2FilterNode.h: Copied from Source/WebCore/webaudio/LowPass2FilterNode.h.
2268         * Modules/webaudio/LowPass2FilterNode.idl: Copied from Source/WebCore/webaudio/LowPass2FilterNode.idl.
2269         * Modules/webaudio/MediaElementAudioSourceNode.cpp: Copied from Source/WebCore/webaudio/MediaElementAudioSourceNode.cpp.
2270         * Modules/webaudio/MediaElementAudioSourceNode.h: Copied from Source/WebCore/webaudio/MediaElementAudioSourceNode.h.
2271         * Modules/webaudio/MediaElementAudioSourceNode.idl: Copied from Source/WebCore/webaudio/MediaElementAudioSourceNode.idl.
2272         * Modules/webaudio/OfflineAudioCompletionEvent.cpp: Copied from Source/WebCore/webaudio/OfflineAudioCompletionEvent.cpp.
2273         * Modules/webaudio/OfflineAudioCompletionEvent.h: Copied from Source/WebCore/webaudio/OfflineAudioCompletionEvent.h.
2274         * Modules/webaudio/OfflineAudioCompletionEvent.idl: Copied from Source/WebCore/webaudio/OfflineAudioCompletionEvent.idl.
2275         * Modules/webaudio/OfflineAudioDestinationNode.cpp: Copied from Source/WebCore/webaudio/OfflineAudioDestinationNode.cpp.
2276         * Modules/webaudio/OfflineAudioDestinationNode.h: Copied from Source/WebCore/webaudio/OfflineAudioDestinationNode.h.
2277         * Modules/webaudio/RealtimeAnalyser.cpp: Copied from Source/WebCore/webaudio/RealtimeAnalyser.cpp.
2278         * Modules/webaudio/RealtimeAnalyser.h: Copied from Source/WebCore/webaudio/RealtimeAnalyser.h.
2279         * Modules/webaudio/RealtimeAnalyserNode.cpp: Copied from Source/WebCore/webaudio/RealtimeAnalyserNode.cpp.
2280         * Modules/webaudio/RealtimeAnalyserNode.h: Copied from Source/WebCore/webaudio/RealtimeAnalyserNode.h.
2281         * Modules/webaudio/RealtimeAnalyserNode.idl: Copied from Source/WebCore/webaudio/RealtimeAnalyserNode.idl.
2282         * Modules/webaudio/WaveShaperDSPKernel.cpp: Copied from Source/WebCore/webaudio/WaveShaperDSPKernel.cpp.
2283         * Modules/webaudio/WaveShaperDSPKernel.h: Copied from Source/WebCore/webaudio/WaveShaperDSPKernel.h.
2284         * Modules/webaudio/WaveShaperNode.cpp: Copied from Source/WebCore/webaudio/WaveShaperNode.cpp.
2285         * Modules/webaudio/WaveShaperNode.h: Copied from Source/WebCore/webaudio/WaveShaperNode.h.
2286         * Modules/webaudio/WaveShaperNode.idl: Copied from Source/WebCore/webaudio/WaveShaperNode.idl.
2287         * Modules/webaudio/WaveShaperProcessor.cpp: Copied from Source/WebCore/webaudio/WaveShaperProcessor.cpp.
2288         * Modules/webaudio/WaveShaperProcessor.h: Copied from Source/WebCore/webaudio/WaveShaperProcessor.h.
2289         * WebCore.gyp/WebCore.gyp:
2290         * WebCore.gypi:
2291         * WebCore.pri:
2292         * WebCore.xcodeproj/project.pbxproj:
2293         * webaudio/AsyncAudioDecoder.cpp: Removed.
2294         * webaudio/AsyncAudioDecoder.h: Removed.
2295         * webaudio/AudioBasicProcessorNode.cpp: Removed.
2296         * webaudio/AudioBasicProcessorNode.h: Removed.
2297         * webaudio/AudioBuffer.cpp: Removed.
2298         * webaudio/AudioBuffer.h: Removed.
2299         * webaudio/AudioBuffer.idl: Removed.
2300         * webaudio/AudioBufferCallback.h: Removed.
2301         * webaudio/AudioBufferCallback.idl: Removed.
2302         * webaudio/AudioBufferSourceNode.cpp: Removed.
2303         * webaudio/AudioBufferSourceNode.h: Removed.
2304         * webaudio/AudioBufferSourceNode.idl: Removed.
2305         * webaudio/AudioChannelMerger.cpp: Removed.
2306         * webaudio/AudioChannelMerger.h: Removed.
2307         * webaudio/AudioChannelMerger.idl: Removed.
2308         * webaudio/AudioChannelSplitter.cpp: Removed.
2309         * webaudio/AudioChannelSplitter.h: Removed.
2310         * webaudio/AudioChannelSplitter.idl: Removed.
2311         * webaudio/AudioContext.cpp: Removed.
2312         * webaudio/AudioContext.h: Removed.
2313         * webaudio/AudioContext.idl: Removed.
2314         * webaudio/AudioDestinationNode.cpp: Removed.
2315         * webaudio/AudioDestinationNode.h: Removed.
2316         * webaudio/AudioDestinationNode.idl: Removed.
2317         * webaudio/AudioGain.h: Removed.
2318         * webaudio/AudioGain.idl: Removed.
2319         * webaudio/AudioGainNode.cpp: Removed.
2320         * webaudio/AudioGainNode.h: Removed.
2321         * webaudio/AudioGainNode.idl: Removed.
2322         * webaudio/AudioListener.cpp: Removed.
2323         * webaudio/AudioListener.h: Removed.
2324         * webaudio/AudioListener.idl: Removed.
2325         * webaudio/AudioNode.cpp: Removed.
2326         * webaudio/AudioNode.h: Removed.
2327         * webaudio/AudioNode.idl: Removed.
2328         * webaudio/AudioNodeInput.cpp: Removed.
2329         * webaudio/AudioNodeInput.h: Removed.
2330         * webaudio/AudioNodeOutput.cpp: Removed.
2331         * webaudio/AudioNodeOutput.h: Removed.
2332         * webaudio/AudioPannerNode.cpp: Removed.
2333         * webaudio/AudioPannerNode.h: Removed.
2334         * webaudio/AudioPannerNode.idl: Removed.
2335         * webaudio/AudioParam.cpp: Removed.
2336         * webaudio/AudioParam.h: Removed.
2337         * webaudio/AudioParam.idl: Removed.
2338         * webaudio/AudioParamTimeline.cpp: Removed.
2339         * webaudio/AudioParamTimeline.h: Removed.
2340         * webaudio/AudioProcessingEvent.cpp: Removed.
2341         * webaudio/AudioProcessingEvent.h: Removed.
2342         * webaudio/AudioProcessingEvent.idl: Removed.
2343         * webaudio/AudioSourceNode.h: Removed.
2344         * webaudio/AudioSourceNode.idl: Removed.
2345         * webaudio/BiquadDSPKernel.cpp: Removed.
2346         * webaudio/BiquadDSPKernel.h: Removed.
2347         * webaudio/BiquadFilterNode.cpp: Removed.
2348         * webaudio/BiquadFilterNode.h: Removed.
2349         * webaudio/BiquadFilterNode.idl: Removed.
2350         * webaudio/BiquadProcessor.cpp: Removed.
2351         * webaudio/BiquadProcessor.h: Removed.
2352         * webaudio/ConvolverNode.cpp: Removed.
2353         * webaudio/ConvolverNode.h: Removed.
2354         * webaudio/ConvolverNode.idl: Removed.
2355         * webaudio/DOMWindowWebAudio.idl: Removed.
2356         * webaudio/DefaultAudioDestinationNode.cpp: Removed.
2357         * webaudio/DefaultAudioDestinationNode.h: Removed.
2358         * webaudio/DelayDSPKernel.cpp: Removed.
2359         * webaudio/DelayDSPKernel.h: Removed.
2360         * webaudio/DelayNode.cpp: Removed.
2361         * webaudio/DelayNode.h: Removed.
2362         * webaudio/DelayNode.idl: Removed.
2363         * webaudio/DelayProcessor.cpp: Removed.
2364         * webaudio/DelayProcessor.h: Removed.
2365         * webaudio/DynamicsCompressorNode.cpp: Removed.
2366         * webaudio/DynamicsCompressorNode.h: Removed.
2367         * webaudio/DynamicsCompressorNode.idl: Removed.
2368         * webaudio/HighPass2FilterNode.cpp: Removed.
2369         * webaudio/HighPass2FilterNode.h: Removed.
2370         * webaudio/HighPass2FilterNode.idl: Removed.
2371         * webaudio/JavaScriptAudioNode.cpp: Removed.
2372         * webaudio/JavaScriptAudioNode.h: Removed.
2373         * webaudio/JavaScriptAudioNode.idl: Removed.
2374         * webaudio/LowPass2FilterNode.cpp: Removed.
2375         * webaudio/LowPass2FilterNode.h: Removed.
2376         * webaudio/LowPass2FilterNode.idl: Removed.
2377         * webaudio/MediaElementAudioSourceNode.cpp: Removed.
2378         * webaudio/MediaElementAudioSourceNode.h: Removed.
2379         * webaudio/MediaElementAudioSourceNode.idl: Removed.
2380         * webaudio/OfflineAudioCompletionEvent.cpp: Removed.
2381         * webaudio/OfflineAudioCompletionEvent.h: Removed.
2382         * webaudio/OfflineAudioCompletionEvent.idl: Removed.
2383         * webaudio/OfflineAudioDestinationNode.cpp: Removed.
2384         * webaudio/OfflineAudioDestinationNode.h: Removed.
2385         * webaudio/RealtimeAnalyser.cpp: Removed.
2386         * webaudio/RealtimeAnalyser.h: Removed.
2387         * webaudio/RealtimeAnalyserNode.cpp: Removed.
2388         * webaudio/RealtimeAnalyserNode.h: Removed.
2389         * webaudio/RealtimeAnalyserNode.idl: Removed.
2390         * webaudio/WaveShaperDSPKernel.cpp: Removed.
2391         * webaudio/WaveShaperDSPKernel.h: Removed.
2392         * webaudio/WaveShaperNode.cpp: Removed.
2393         * webaudio/WaveShaperNode.h: Removed.
2394         * webaudio/WaveShaperNode.idl: Removed.
2395         * webaudio/WaveShaperProcessor.cpp: Removed.
2396         * webaudio/WaveShaperProcessor.h: Removed.
2397
2398 2012-03-20  Anders Carlsson  <andersca@apple.com>
2399
2400         Add a per-ScrollableArea tile cache base class
2401         https://bugs.webkit.org/show_bug.cgi?id=81694
2402
2403         Reviewed by Sam Weinig.
2404
2405         Add an abstract base class, TiledBacking, that can be used to inform tile caches about changed
2406         state in scrollable areas (such as the currently visible rect, whether the page is active or not, etc).
2407
2408         Make TileCache inherit from TiledBacking and port updating the visible rect over to this new mechanism.
2409
2410         * WebCore.xcodeproj/project.pbxproj:
2411         * page/FrameView.cpp:
2412         (WebCore::FrameView::tiledBacking):
2413         (WebCore):
2414         * page/FrameView.h:
2415         (FrameView):
2416         * platform/ScrollableArea.h:
2417         (WebCore):
2418         (ScrollableArea):
2419         (WebCore::ScrollableArea::tiledBacking):
2420         * platform/graphics/GraphicsLayer.h:
2421         (WebCore):
2422         (WebCore::GraphicsLayer::tiledBacking):
2423         * platform/graphics/TiledBacking.h: Added.
2424         (WebCore):
2425         (TiledBacking):
2426         (WebCore::TiledBacking::~TiledBacking):
2427         * platform/graphics/ca/GraphicsLayerCA.cpp:
2428         (WebCore::GraphicsLayerCA::tiledBacking):
2429         * platform/graphics/ca/GraphicsLayerCA.h:
2430         (GraphicsLayerCA):
2431         * platform/graphics/ca/PlatformCALayer.h:
2432         (PlatformCALayer):
2433         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2434         (PlatformCALayer::tiledBacking):
2435         * platform/graphics/ca/mac/TileCache.h:
2436         (TileCache):
2437         * platform/graphics/ca/mac/WebTileCacheLayer.h:
2438         (WebCore):
2439         * platform/graphics/ca/mac/WebTileCacheLayer.mm:
2440         (-[WebTileCacheLayer WebCore::]):
2441         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2442         (PlatformCALayer::tiledBacking):
2443         * rendering/RenderLayerCompositor.cpp:
2444         (WebCore::RenderLayerCompositor::frameViewDidScroll):
2445
2446 2012-03-20  Xiaomei Ji  <xji@chromium.org>
2447
2448         visual word movement: crashes on CSS generated content.
2449         https://bugs.webkit.org/show_bug.cgi?id=81581
2450
2451         Reviewed by Ryosuke Niwa.
2452
2453         Check for null pointer when referencing box->renderer()->node() in previousRootInlineBox and nextRootInlineBox.
2454
2455         Test: editing/selection/move-by-word-visually-crash-test-css-generated-content.html
2456
2457         * editing/visible_units.cpp:
2458         (WebCore::previousRootInlineBox):
2459         (WebCore::nextRootInlineBox):
2460
2461 2012-03-20  Luke Macpherson  <macpherson@chromium.org>
2462
2463         Use CSSPrimitiveValue::convertToLength() to handle CSSPropertyWebkitBoxReflect and in createGridTrackBreadth.
2464         https://bugs.webkit.org/show_bug.cgi?id=81633
2465
2466         Reviewed by Andreas Kling.
2467
2468         No new tests / refactoring only.
2469
2470         * css/CSSStyleSelector.cpp:
2471         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
2472
2473 2012-03-20  Sheriff Bot  <webkit.review.bot@gmail.com>
2474
2475         Unreviewed, rolling out r111442.
2476         http://trac.webkit.org/changeset/111442
2477         https://bugs.webkit.org/show_bug.cgi?id=81711
2478
2479         Causes crashes and image mismatches in canvas tests (Requested
2480         by leviw on #webkit).
2481
2482         * html/HTMLCanvasElement.cpp:
2483         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
2484         (WebCore::HTMLCanvasElement::reset):
2485         (WebCore::HTMLCanvasElement::createImageBuffer):
2486         (WebCore::HTMLCanvasElement::clearCopiedImage):
2487         * html/HTMLCanvasElement.h:
2488         (HTMLCanvasElement):
2489         * html/canvas/CanvasRenderingContext2D.cpp:
2490         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
2491         (WebCore::CanvasRenderingContext2D::unwindStateStack):
2492         (WebCore::CanvasRenderingContext2D::reset):
2493
2494 2012-03-20  Adrienne Walker  <enne@google.com>
2495
2496         RenderLayerCompositor doesn't properly clip graphics layer sizes
2497         https://bugs.webkit.org/show_bug.cgi?id=80372
2498
2499         Reviewed by Simon Fraser.
2500
2501         To find the bounds for a composited layer, calculateCompositedBounds
2502         iterates through all non-composited child layers using z-order and
2503         normal flow lists. This does not preserve clipping from ancestor
2504         layers, because a clipping ancestor layer can end up as a sibling to
2505         its clipped descendent because it is not a stacking context.
2506
2507         Fix by explicitly checking cached clip roots.
2508
2509         Test: compositing/clip-child-by-non-stacking-ancestor.html
2510
2511         * rendering/RenderLayer.cpp:
2512         (WebCore::RenderLayer::localClipRect):
2513         (WebCore):
2514         * rendering/RenderLayer.h:
2515         (RenderLayer):
2516         * rendering/RenderLayerCompositor.cpp:
2517         (WebCore::RenderLayerCompositor::repaintOnCompositingChange):
2518         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
2519
2520 2012-03-20  Sheriff Bot  <webkit.review.bot@gmail.com>
2521
2522         Unreviewed, rolling out r111445 and r111446.
2523         http://trac.webkit.org/changeset/111445
2524         http://trac.webkit.org/changeset/111446
2525         https://bugs.webkit.org/show_bug.cgi?id=81708
2526
2527         It broke Qt and GTK build intentionally (Requested by Ossy on
2528         #webkit).
2529
2530         * WebCore.exp.in:
2531         * dom/Document.cpp:
2532         (WebCore::Document::initSecurityContext):
2533         * notifications/Notification.cpp:
2534         (WebCore::Notification::Notification):
2535         * notifications/NotificationCenter.cpp:
2536         (WebCore::NotificationCenter::checkPermission):
2537         (WebCore::NotificationCenter::requestPermission):
2538         * notifications/NotificationCenter.h:
2539         (NotificationCenter):
2540         * page/SecurityOrigin.cpp:
2541         (WebCore::SecurityOrigin::toString):
2542         * page/SecurityOrigin.h:
2543         (SecurityOrigin):
2544
2545 2012-03-20  Adam Klein  <adamk@chromium.org>
2546
2547         Refactor ContainerNode::replaceChild to match other mutation methods and share code
2548         https://bugs.webkit.org/show_bug.cgi?id=81579
2549
2550         Reviewed by Ojan Vafai.
2551
2552         Originally landed as r111310, this fixes a bug in replaceChild
2553         introduced when switching to the insert-before logic.
2554
2555         A future change will make use of the consistency among insertBefore/appendChild/replaceChild
2556         to handle insertion of DocumentFragments more cleanly.
2557
2558         No new tests, no change in behavior.
2559
2560         * dom/ContainerNode.cpp:
2561         (WebCore::ContainerNode::replaceChild): Use collectTargetNodes rather than walking through DocumentFragment children.
2562         Insert before rather than inserting after. Dispatch to other methods to update parent/sibling pointers.
2563         (WebCore::ContainerNode::appendChild): Call appendChildToContainer to update parent/sibling pointers.
2564         (WebCore::ContainerNode::parserAddChild): Use type inference in call to appendChildToContainer.
2565
2566 2012-03-20  Jon Lee  <jonlee@apple.com>
2567
2568         Restrict access to notifications for unique origins and file URLs with no local file access
2569         https://bugs.webkit.org/show_bug.cgi?id=79704
2570         <rdar://problem/10912430>
2571
2572         Reviewed by Adam Barth.
2573
2574         Before checking or requesting permissions, we look at whether we can show notifications based on
2575         the security context. If not, we short circuit and do not forward the request to the client.
2576
2577         * notifications/Notification.cpp:
2578         (WebCore::Notification::Notification): Fix a bug where creating a notification goes through slightly
2579         different logic for checking permissions than when checking permissions through the
2580         notification center.
2581         * notifications/NotificationCenter.cpp:
2582         (WebCore::NotificationCenter::checkPermission): Check to see if the origin can show notifications.
2583         (WebCore::NotificationCenter::requestPermission): If we know whether an origin can show notifications,
2584         we asynchronously call the callback with that decision. Otherwise we ask the client.
2585
2586         Add new variable in the notification center to keep track of pending callbacks when we short-circuit
2587         requestPermission().
2588         * notifications/NotificationCenter.h:
2589         (NotificationRequestCallback): Add new private class encapsulating the callback.
2590         * notifications/NotificationCenter.cpp:
2591         (WebCore::NotificationCenter::requestTimedOut): Remove the request from the set of pending callbacks.
2592         (WebCore::NotificationCenter::NotificationRequest::createAndStartTimer): Because this is used when we already
2593         know the decision, and are not asking the client to decide, we can immediately trigger a one-shot timer
2594         to invoke the callback.
2595         (WebCore::NotificationCenter::NotificationRequest::NotificationRequest):
2596         (WebCore::NotificationCenter::NotificationRequest::startTimer):
2597         (WebCore::NotificationCenter::NotificationRequest::timerFired): Invoke the callback and tell the notification
2598         center.
2599         * page/SecurityOrigin.h: Add new toRawString() method to return the string representation of the origin,
2600         regardless of any restrictions that might otherwise cause toString() to return "null".
2601         * page/SecurityOrigin.cpp:
2602         (WebCore::SecurityOrigin::canShowNotifications): Added to return a tri-state regarding whether we know
2603         the origin can show notifications. If the origin is unique, we never let it show. If the origin has
2604         universal access, we always let it show. Otherwise the client should be asked.
2605         (WebCore::SecurityOrigin::toString): Refactor to use toRawString().
2606         (WebCore::SecurityOrigin::toRawString):
2607
2608         Added FIXME's regarding the naming of enforceFilePathSeparation().
2609         * dom/Document.cpp:
2610         (WebCore::Document::initSecurityContext): Also, tab reformatting.
2611
2612         * WebCore.exp.in: Export toRawString().
2613
2614 2012-03-20  Andreas Kling  <kling@webkit.org>
2615
2616         Remove unused CSSPrimitiveValue constructors.
2617         <http://webkit.org/b/81695>
2618
2619         Reviewed by Antti Koivisto.
2620
2621         Kill off CSSPrimitiveValue constructors that aren't used anywhere.
2622
2623         * css/CSSPrimitiveValue.cpp:
2624         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2625         * css/CSSPrimitiveValue.h:
2626         (CSSPrimitiveValueBase):
2627         (WebCore::CSSPrimitiveValueBase::CSSPrimitiveValueBase):
2628         (CSSPrimitiveValue):
2629         * css/CSSPrimitiveValueMappings.h:
2630
2631 2012-03-20  Sami Kyostila  <skyostil@chromium.org>
2632
2633         Reuse buffer allocation if canvas size does not change
2634         https://bugs.webkit.org/show_bug.cgi?id=80871
2635
2636         Reviewed by Stephen White.
2637
2638         If the user changes the width or height attributes of a canvas element,
2639         the contents of the canvas should be cleared and the context state
2640         should be reset. This has become a common idiom to clear the canvas
2641         "efficiently" at the start of a frame.
2642
2643         Previously, this code path triggered a full reallocation of the image
2644         buffer backing the canvas, leading to reduced performance. This patch
2645         implements an optimization where we reuse the previous image buffer
2646         allocation if the size of the canvas did not change. Also, instead of
2647         clearing the canvas every time its dimensions are touched, we only clear
2648         if anything has been drawn into the canvas since it was previously
2649         cleared.
2650
2651         Note that for now this optimization only applies for 2D canvases,
2652         since it is not entirely clear how touching the dimensions of a WebGL
2653         canvas should work.
2654
2655         Test: fast/canvas/canvas-resize-after-paint-without-layout.html +
2656               existing layout tests for canvas resetting.
2657
2658         * html/HTMLCanvasElement.cpp:
2659         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
2660         (WebCore::HTMLCanvasElement::reset):
2661         (WebCore::HTMLCanvasElement::createImageBuffer):
2662         (WebCore::HTMLCanvasElement::clearImageBuffer):
2663         (WebCore):
2664         (WebCore::HTMLCanvasElement::clearCopiedImage):
2665         * html/HTMLCanvasElement.h:
2666         (HTMLCanvasElement):
2667         * html/canvas/CanvasRenderingContext2D.cpp:
2668         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D): Save the
2669         initial graphics context state so we can restore it without creating a
2670         new context.
2671         (WebCore::CanvasRenderingContext2D::unwindStateStack):
2672         (WebCore::CanvasRenderingContext2D::reset): No need to notify the
2673         compositor when the context is reset, because clearing the image buffer
2674         does the same thing. We can also skip the notification if we did not
2675         have an image buffer at the time of the reset, because the reset will
2676         not have any visual impact in this case. Finally, if the canvas size
2677         did change, the notification is also unnecessary because of the call
2678         to RenderObject::repaint() from HTMLCanvasElement::reset().
2679
2680 2012-03-20  Dana Jansens  <danakj@chromium.org>
2681
2682         [chromium] Allow us to disable overdraw metrics when tracing is off
2683         https://bugs.webkit.org/show_bug.cgi?id=81431
2684
2685         Reviewed by Adrienne Walker.
2686
2687         This change allows us to disable overdraw metrics conditionally in the
2688         future with a one-line change in each LayerTreeHost class.
2689
2690         Unit test: CCQuadCullerTest.verifyWithoutMetrics
2691
2692         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2693         (WebCore::CCLayerTreeHost::paintLayerContents):
2694         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2695         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
2696         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
2697         (WebCore::::CCOcclusionTrackerBase):
2698         (WebCore):
2699         * platform/graphics/chromium/cc/CCOcclusionTracker.h:
2700         (CCOcclusionTrackerBase):
2701         * platform/graphics/chromium/cc/CCOverdrawMetrics.cpp:
2702         (WebCore::CCOverdrawMetrics::CCOverdrawMetrics):
2703         (WebCore::CCOverdrawMetrics::didCull):
2704         (WebCore::CCOverdrawMetrics::didDraw):
2705         (WebCore::CCOverdrawMetrics::recordMetrics):
2706         * platform/graphics/chromium/cc/CCOverdrawMetrics.h:
2707         (WebCore::CCOverdrawMetrics::create):
2708         (CCOverdrawMetrics):
2709
2710 2012-03-20  Robert Hogan  <robert@webkit.org>
2711
2712         Use-after-free of continuation in RenderBlock::paintContinuationOutlines()
2713         https://bugs.webkit.org/show_bug.cgi?id=81276
2714
2715         Reviewed by David Hyatt.
2716
2717         Test: fast/css/relative-positioned-block-crash.html
2718
2719         https://trac.webkit.org/changeset/108185/ allowed anonymous blocks to get their own layer (when they're
2720         relatively positioned). This broke the dependency in addContinuationWithOutline() on the owner of the continuation
2721         table and the renderer getting added to it always being in the same layer. When they're not in the same layer
2722         there's no guarantee that the owner of the continuation table will get painted again and so avoid any stale pointers
2723         in its continuation table should any of the renderers in there get destroyed.
2724
2725         Fix this for now by only adding renderers to the containing block's continuation table if we don't have our own layer.
2726         This fix causes fast/inline/continuation-outlines-with-layers.html to regress as it uses blocks inside relatively positioned
2727         inlines, so skip it on all platforms pending a medium-term fix.
2728
2729         * rendering/RenderBlock.cpp:
2730         (WebCore::RenderBlock::paintObject):
2731
2732 2012-03-20  Adele Peterson  <adele@apple.com>
2733
2734         "Attempt to insert nil value " exception when calling attributed string APIs on content with a custom font
2735         https://bugs.webkit.org/show_bug.cgi?id=81630
2736         <rdar://problem/10650660> 
2737
2738         Reviewed by Alexey Proskuryakov. 
2739
2740         Test: TestWebKitAPI/Tests/mac/AttributedString.mm 
2741
2742         If content is using a custom font, then the platform font will be nil and needs to be nil checked.
2743
2744         * platform/mac/HTMLConverter.mm: (+[WebHTMLConverter editingAttributedStringFromRange:]):
2745
2746 2012-03-20  Julien Chaffraix  <jchaffraix@webkit.org>
2747
2748         Make distributeExtraLogicalHeightToRows return the consumed logical height
2749         https://bugs.webkit.org/show_bug.cgi?id=81678
2750
2751         Reviewed by Tony Chang.
2752
2753         Small refactoring, no change in behavior.
2754
2755         * rendering/RenderTable.cpp:
2756         (WebCore::RenderTable::distributeExtraLogicalHeight):
2757         Remove the consumed logical height from the available height.
2758
2759         * rendering/RenderTableSection.cpp:
2760         (WebCore::RenderTableSection::distributeExtraLogicalHeightToPercentRows):
2761         (WebCore::RenderTableSection::distributeExtraLogicalHeightToAutoRows):
2762         (WebCore::RenderTableSection::distributeRemainingExtraLogicalHeight):
2763         Changed those method to not return anything but remove from the available width.
2764
2765         (WebCore::RenderTableSection::distributeExtraLogicalHeightToRows):
2766         Return the consumed logical height.
2767
2768         * rendering/RenderTableSection.h:
2769         Updated the previous distribute functions signature and the comment about
2770         the returned value from distributeExtraLogicalHeightToRows.
2771
2772 2012-03-20  Jacky Jiang  <zhajiang@rim.com>
2773
2774         [BlackBerry] Dijit crash WebCore::CookieManager::getRawCookies
2775         https://bugs.webkit.org/show_bug.cgi?id=81686
2776
2777         Reviewed by Rob Buis.
2778
2779         HTML plugin element with an empty src caused an ASSERT failure on debug
2780         build and a crash on release build.
2781         When getting cookie, url can be null, so we need to check for it to
2782         avoid the crash.
2783
2784         No new tests as this is covered by
2785         LayoutTests/fast/loader/empty-embed-src-attribute.html.
2786
2787         * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
2788         (WebCore::ResourceRequest::initializePlatformRequest):
2789
2790 2012-03-20  Vsevolod Vlasov  <vsevik@chromium.org>
2791
2792         Web Inspector: Tabbed pane drop down should be sorted.
2793         https://bugs.webkit.org/show_bug.cgi?id=81680
2794
2795         Reviewed by Pavel Feldman.
2796
2797         * inspector/front-end/TabbedPane.js:
2798         (WebInspector.TabbedPane.prototype._populateDropDownFromIndex.compareFunction):
2799         (WebInspector.TabbedPane.prototype._populateDropDownFromIndex):
2800
2801 2012-03-20  Vsevolod Vlasov  <vsevik@chromium.org>
2802
2803         Web Inspector: Open resource dialog scripts list should be sorted.
2804         https://bugs.webkit.org/show_bug.cgi?id=81682
2805
2806         Reviewed by Pavel Feldman.
2807
2808         * inspector/front-end/FilteredItemSelectionDialog.js:
2809         (WebInspector.OpenResourceDialog.compareFunction):
2810         (WebInspector.OpenResourceDialog):
2811
2812 2012-03-20  Dana Jansens  <danakj@chromium.org>
2813
2814         [chromium] Use opaque contents for paint culling
2815         https://bugs.webkit.org/show_bug.cgi?id=81676
2816
2817         Reviewed by Adrienne Walker.
2818
2819         UnitTest: CCLayerTreeHostTestContentLayerOcclusion
2820
2821         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2822         (WebCore::CCLayerTreeHost::paintLayerContents):
2823
2824 2012-03-20  Dan Bernstein  <mitz@apple.com>
2825
2826         Build fix after r111419.
2827
2828         * dom/WebKitNamedFlow.cpp:
2829         * dom/WebKitNamedFlow.h:
2830
2831 2012-03-20  Dan Bernstein  <mitz@apple.com>
2832
2833         REGRESSION (r111229): css1/basic/inheritance.html is failing
2834         https://bugs.webkit.org/show_bug.cgi?id=81684
2835
2836         Reverted r111229.
2837
2838         Rubber-stamped by Dave Hyatt.
2839
2840         * dom/Document.cpp:
2841         (WebCore::Document::webkitGetFlowByName):
2842         * dom/Document.h:
2843         (Document):
2844         * dom/Element.cpp:
2845         (WebCore::Element::detach):
2846         * dom/NodeRenderingContext.cpp:
2847         (WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded):
2848         * dom/WebKitNamedFlow.cpp:
2849         (WebCore):
2850         * dom/WebKitNamedFlow.h:
2851         (WebCore):
2852         (WebKitNamedFlow):
2853         * dom/WebKitNamedFlow.idl:
2854
2855 2012-03-20  Vineet Chaudhary  <rgf748@motorola.com>
2856
2857         https://bugs.webkit.org/show_bug.cgi?id=80696
2858         Remove custom bindings for attribute type Array.
2859
2860         Reviewed by Kentaro Hara.
2861
2862         No new tests.
2863
2864         * bindings/js/JSConsoleCustom.cpp: Removed custom function.
2865         (WebCore):
2866         * bindings/js/JSDOMBinding.h: Added template jsArray and toNativeArray.
2867         (WebCore):
2868         (WebCore::jsArray):
2869         (WebCore::toNativeArray):
2870         * bindings/scripts/CodeGenerator.pm: Modified codegenerators to generate appropriate code.
2871         (GetArrayType): Added GetArrayType to get return type of attribute interface.
2872         * bindings/scripts/CodeGeneratorGObject.pm: Modified codegenerators to generate appropriate code.
2873         (SkipAttribute):
2874         * bindings/scripts/CodeGeneratorJS.pm: Modified codegenerators to generate appropriate code.
2875         (AddIncludesForType):
2876         (JSValueToNative):
2877         (NativeToJSValue):
2878         * bindings/scripts/CodeGeneratorV8.pm: Modified codegenerators to generate appropriate code.
2879         (GenerateNormalAttrGetter):
2880         (GenerateNormalAttrSetter):
2881         (JSValueToNative):
2882         (NativeToJSValue):
2883         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Updated results from running binding tests.
2884         (webkit_dom_test_obj_get_property):
2885         (webkit_dom_test_obj_class_init):
2886         * bindings/scripts/test/GObject/WebKitDOMTestObj.h: Ditto.
2887         * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
2888         (WebCore::jsTestObjSequenceAttr):
2889         (WebCore::setJSTestObjSequenceAttr):
2890         (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
2891         * bindings/scripts/test/V8/V8TestObj.cpp: Ditto.
2892         (WebCore::TestObjInternal::sequenceAttrAttrGetter):
2893         (WebCore::TestObjInternal::sequenceAttrAttrSetter):
2894         (WebCore::TestObjInternal::methodReturningSequenceCallback):
2895         * bindings/v8/V8Binding.h: Added template v8Array and toNativeArray.
2896         (WebCore):
2897         (WebCore::v8Array):
2898         (WebCore::toNativeArray):
2899         * bindings/v8/custom/V8ConsoleCustom.cpp: Removed custom function.
2900         (WebCore):
2901         * page/Console.idl: Replaced attribute type Array to sequence<SriptProfile> to remove
2902           custom bindings.
2903
2904 2012-03-20  Sheriff Bot  <webkit.review.bot@gmail.com>
2905
2906         Unreviewed, rolling out r111310.
2907         http://trac.webkit.org/changeset/111310
2908         https://bugs.webkit.org/show_bug.cgi?id=81683
2909
2910         Broke layout test
2911         dom/xhtml/level3/core/nodereplacechild30.xhtml (Requested by
2912         aklein on #webkit).
2913
2914         * dom/ContainerNode.cpp:
2915         (WebCore::ContainerNode::replaceChild):
2916         (WebCore::ContainerNode::appendChild):
2917         (WebCore::ContainerNode::parserAddChild):
2918
2919 2012-03-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2920
2921         Convert hasSpellingMarker to use Internals interface.
2922         https://bugs.webkit.org/show_bug.cgi?id=81300
2923
2924         Reviewed by Ryosuke Niwa.
2925
2926         Remove hasSpellingMarker functions, because it is able to work in the
2927         cross-port way through the Internals interface.
2928
2929         No new tests, since we are improving here the infra-structure
2930         for testing a specific method.
2931
2932         * testing/Internals.cpp:
2933         (WebCore::Internals::hasSpellingMarker):
2934         (WebCore):
2935         * testing/Internals.h:
2936         (Internals):
2937         * testing/Internals.idl:
2938
2939 2012-03-20  Dan Bernstein  <mitz@apple.com>
2940
2941         Build fix.
2942
2943         * history/PageCache.cpp: Fixed an unused function warning introduced in r111391.
2944
2945 2012-03-20  Konrad Piascik  <kpiascik@rim.com>
2946
2947         (r110063) m_mouseDownMayStartDrag is used without being behind the ENABLE(DRAG_SUPPORT) macro
2948         https://bugs.webkit.org/show_bug.cgi?id=81666
2949
2950         Reviewed by Rob Buis.
2951
2952         Compiled with feature disabled and built.
2953
2954         * page/EventHandler.cpp:
2955         (WebCore::EventHandler::selectCursor):
2956
2957 2012-03-20  W. James MacLean  <wjmaclean@chromium.org>
2958
2959         [chromium] Tune fling physics curve. [Not for review yet]
2960         https://bugs.webkit.org/show_bug.cgi?id=81398
2961
2962         Reviewed by James Robinson.
2963
2964         Existing tests updated.
2965
2966         Tune physics of curve for better feel.
2967
2968         * platform/TouchFlingPlatformGestureCurve.cpp:
2969         (WebCore::TouchFlingPlatformGestureCurve::apply):
2970
2971 2012-03-20  Alexis Menard  <alexis.menard@openbossa.org>
2972
2973         Implement a fast path when setting CSS properties with keywords from JS.
2974         https://bugs.webkit.org/show_bug.cgi?id=80874
2975
2976         Reviewed by Antti Koivisto.
2977
2978         The idea is to avoid the creation of the CSSParser instance and to run the parser on
2979         a string we know it should be a keyword. When JS calls parseValue we try to check if we can
2980         use the fast path and if the keyword is accepted then we just add it to the declaration directly.
2981         For the sake of maintenance the parseValue function used by CSSGrammar.y is sharing some code with
2982         the fast path (keyword matching mostly).
2983
2984         This patch improves this use case by 20%. Setting keyword properties from JS is used a lot in
2985         Google Maps for example (when zooming or panning).
2986
2987         No new tests : it's a performance improvement, there shouldn't be any behavior change.
2988
2989         * css/CSSParser.cpp:
2990         (WebCore):
2991         (WebCore::isValidKeywordPropertyAndValue):
2992         (WebCore::isKeywordPropertyID):
2993         (WebCore::parseKeywordValue):
2994         (WebCore::CSSParser::parseValue):
2995
2996 2012-03-20  Ian Vollick  <vollick@chromium.org>
2997
2998         [chromium] Infrastructure to allow animating layers to be only partially updated
2999         https://bugs.webkit.org/show_bug.cgi?id=81106
3000
3001         Reviewed by James Robinson
3002
3003         Merged the controller tests in CCLayerAnimationControllerTest
3004
3005         * WebCore.gypi:
3006         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
3007         * platform/graphics/chromium/GraphicsLayerChromium.h:
3008         (GraphicsLayerChromium):
3009         * platform/graphics/chromium/LayerChromium.cpp:
3010         (WebCore::LayerChromium::LayerChromium):
3011         (WebCore::LayerChromium::pushPropertiesTo):
3012         (WebCore::LayerChromium::setOpacityFromAnimation):
3013         (WebCore):
3014         (WebCore::LayerChromium::setTransformFromAnimation):
3015         (WebCore::LayerChromium::addAnimation):
3016         (WebCore::LayerChromium::pauseAnimation):
3017         (WebCore::LayerChromium::removeAnimation):
3018         (WebCore::LayerChromium::suspendAnimations):
3019         (WebCore::LayerChromium::resumeAnimations):
3020         (WebCore::LayerChromium::setLayerAnimationController):
3021         (WebCore::LayerChromium::hasActiveAnimation):
3022         (WebCore::LayerChromium::setAnimationEvent):
3023         * platform/graphics/chromium/LayerChromium.h:
3024         (WebCore):
3025         (LayerChromium):
3026         (WebCore::LayerChromium::id):
3027         (WebCore::LayerChromium::opacity):
3028         (WebCore::LayerChromium::transform):
3029         (WebCore::LayerChromium::bounds):
3030         * platform/graphics/chromium/cc/CCActiveAnimation.h:
3031         (CCActiveAnimation):
3032         * platform/graphics/chromium/cc/CCAnimationEvents.cpp:
3033         (WebCore::CCAnimationEvent::CCAnimationEvent):
3034         (WebCore::CCAnimationEvent::toFloatAnimationFinishedEvent):
3035         (WebCore::CCAnimationEvent::toTransformAnimationFinishedEvent):
3036         (WebCore::CCAnimationStartedEvent::create):
3037         (WebCore):
3038         (WebCore::CCAnimationStartedEvent::CCAnimationStartedEvent):
3039         (WebCore::CCFloatAnimationFinishedEvent::create):
3040         (WebCore::CCFloatAnimationFinishedEvent::CCFloatAnimationFinishedEvent):
3041         (WebCore::CCFloatAnimationFinishedEvent::~CCFloatAnimationFinishedEvent):
3042         (WebCore::CCFloatAnimationFinishedEvent::type):
3043         (WebCore::CCTransformAnimationFinishedEvent::create):
3044         (WebCore::CCTransformAnimationFinishedEvent::CCTransformAnimationFinishedEvent):
3045         (WebCore::CCTransformAnimationFinishedEvent::~CCTransformAnimationFinishedEvent):
3046         (WebCore::CCTransformAnimationFinishedEvent::type):
3047         * platform/graphics/chromium/cc/CCAnimationEvents.h:
3048         (WebCore):
3049         (WebCore::CCAnimationEvent::targetProperty):
3050         (CCAnimationEvent):
3051         (CCAnimationStartedEvent):
3052         (CCFloatAnimationFinishedEvent):
3053         (WebCore::CCFloatAnimationFinishedEvent::finalValue):
3054         (CCTransformAnimationFinishedEvent):
3055         (WebCore::CCTransformAnimationFinishedEvent::finalValue):
3056         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
3057         (WebCore::CCLayerAnimationController::CCLayerAnimationController):
3058         (WebCore::CCLayerAnimationController::create):
3059         (WebCore::CCLayerAnimationController::pushAnimationUpdatesTo):
3060         (WebCore::CCLayerAnimationController::animate):
3061         (WebCore):
3062         (WebCore::CCLayerAnimationController::add):
3063         (WebCore::CCLayerAnimationController::getActiveAnimation):
3064         (WebCore::CCLayerAnimationController::hasActiveAnimation):
3065         (WebCore::CCLayerAnimationController::isAnimatingProperty):
3066         (WebCore::CCLayerAnimationController::pushNewAnimationsToImplThread):
3067         (WebCore::CCLayerAnimationController::removeAnimationsCompletedOnMainThread):
3068         (WebCore::CCLayerAnimationController::startAnimationsWaitingForNextTick):
3069         (WebCore::CCLayerAnimationController::startAnimationsWaitingForStartTime):
3070         (WebCore::CCLayerAnimationController::startAnimationsWaitingForTargetAvailability):
3071         (WebCore::CCLayerAnimationController::resolveConflicts):
3072         (WebCore::CCLayerAnimationController::purgeFinishedAnimations):
3073         (WebCore::CCLayerAnimationController::tickAnimations):
3074         * platform/graphics/chromium/cc/CCLayerAnimationController.h:
3075         (WebCore):
3076         (CCLayerAnimationControllerClient):
3077         (WebCore::CCLayerAnimationControllerClient::~CCLayerAnimationControllerClient):
3078         (CCLayerAnimationController):
3079         * platform/graphics/chromium/cc/CCLayerAnimationControllerImpl.cpp: Removed.
3080         * platform/graphics/chromium/cc/CCLayerAnimationControllerImpl.h: Removed.
3081         * platform/graphics/chromium/cc/CCLayerAnimationDelegate.h:
3082         (CCLayerAnimationDelegate):
3083         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
3084         (WebCore::CCLayerImpl::CCLayerImpl):
3085         (WebCore::CCLayerImpl::setOpacityFromAnimation):
3086         (WebCore):
3087         (WebCore::CCLayerImpl::setTransformFromAnimation):
3088         * platform/graphics/chromium/cc/CCLayerImpl.h:
3089         (CCLayerImpl):
3090         (WebCore::CCLayerImpl::id):
3091         (WebCore::CCLayerImpl::layerAnimationController):
3092         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3093         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
3094         (WebCore::CCLayerTreeHost::updateAnimations):
3095         (WebCore::CCLayerTreeHost::finishCommitOnImplThread):
3096         (WebCore::CCLayerTreeHost::didBecomeInvisibleOnImplThread):
3097         (WebCore::CCLayerTreeHost::animateLayers):
3098         (WebCore):
3099         (WebCore::CCLayerTreeHost::animateLayersRecursive):
3100         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
3101         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
3102         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3103         (WebCore::CCLayerTreeHostImpl::animateLayersRecursive):
3104         (WebCore::CCLayerTreeHostImpl::animateLayers):
3105         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3106         (CCLayerTreeHostImpl):
3107         * platform/graphics/chromium/cc/CCThreadProxy.h:
3108         (WebCore::CCThreadProxy::BeginFrameAndCommitState::BeginFrameAndCommitState):
3109
3110 2012-03-20  Ilya Tikhonovsky  <loislo@chromium.org>
3111
3112         Web Inspector: REGRESSION Detached DOM Nodes are not highlighted
3113         https://bugs.webkit.org/show_bug.cgi?id=81662
3114
3115         Reviewed by Yury Semikhatsky.
3116
3117         * inspector/front-end/HeapSnapshot.js:
3118         (WebInspector.HeapSnapshotNode.prototype.get isDetachedDOMTree):
3119
3120 2012-03-20  Gavin Peters  <gavinp@chromium.org>
3121
3122         New PageCache histogram for tracking the highest leverage frame reject reasons.
3123         https://bugs.webkit.org/show_bug.cgi?id=81358
3124
3125         Reviewed by Adam Barth.
3126
3127         The current chromium FrameClientImpl always denies page cache; but
3128         that's easily fixable.  This histogram tracks which rejection
3129         causes occur alone with that cause.  I'm particularly interested
3130         in knowing how many more pages would work in the page cache if we
3131         could get plugins in.
3132
3133         * history/PageCache.cpp:
3134         (WebCore::logCanCachePageDecision):
3135
3136 2012-03-15  Pavel Podivilov  <podivilov@chromium.org>
3137
3138         Web Inspector: support inline source maps.
3139         https://bugs.webkit.org/show_bug.cgi?id=81248
3140
3141         - support optional map.sourcesContent array with sources content
3142         - support data: url as script sourceMapURL, e.g. "//@ sourceMappingURL=data:application/json;base64,<base64-encoded map>"
3143
3144         Reviewed by Pavel Feldman.
3145
3146         * inspector/front-end/CompilerSourceMapping.js:
3147         (WebInspector.ClosureCompilerSourceMapping):
3148         (WebInspector.ClosureCompilerSourceMapping.prototype.loadSourceCode):
3149         (WebInspector.ClosureCompilerSourceMapping.prototype._parseMap):
3150         (WebInspector.ClosureCompilerSourceMapping.prototype._canonicalizeURL):
3151
3152 2012-03-20  Pavel Feldman  <pfeldman@chromium.org>
3153
3154         Web Inspector: treat Uint* external arrays as arrays in console.
3155         https://bugs.webkit.org/show_bug.cgi?id=81653
3156
3157         Reviewed by Yury Semikhatsky.
3158
3159         * bindings/js/JSInjectedScriptHostCustom.cpp:
3160         (WebCore::JSInjectedScriptHost::type):
3161         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
3162         (WebCore::V8InjectedScriptHost::typeCallback):
3163
3164 2012-03-20  Andreas Kling  <kling@webkit.org>
3165
3166         Let CSSImageValue inherit directly from CSSValue.
3167         <http://webkit.org/b/81635>
3168
3169         Reviewed by Antti Koivisto.
3170
3171         This removes the last of the CSSPrimitiveValue subclasses, which will
3172         open up the class to heavier refactoring.
3173
3174         Those CSSImageValues that used to represent the 'none' value are now
3175         simply created as CSSPrimitiveValue identifiers by the parser.
3176
3177         Test: fast/css/image-value-type.html
3178
3179         * css/CSSCursorImageValue.cpp:
3180         (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
3181         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
3182         (WebCore::CSSCursorImageValue::cachedImage):
3183         * css/CSSImageValue.cpp:
3184         (WebCore::CSSImageValue::CSSImageValue):
3185         (WebCore::CSSImageValue::cachedOrPendingImage):
3186         (WebCore::CSSImageValue::cachedImage):
3187         (WebCore::CSSImageValue::customCssText):
3188         * css/CSSImageValue.h:
3189         (WebCore::CSSImageValue::url):
3190         * css/CSSParser.cpp:
3191         (WebCore::CSSParser::parseValue):
3192         (WebCore::CSSParser::parseFillImage):
3193         (WebCore::CSSParser::parseBorderImage):
3194         * css/CSSStyleApplyProperty.cpp:
3195         (WebCore::ApplyPropertyCursor::applyValue):
3196         * css/CSSStyleSelector.cpp:
3197         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
3198         * css/CSSValue.h:
3199         (WebCore::CSSValue::isPrimitiveValue):
3200
3201 2012-03-20  Pavel Feldman  <pfeldman@chromium.org>
3202
3203         Web Inspector: call .length as the last check when detecting arrays.
3204         https://bugs.webkit.org/show_bug.cgi?id=81335
3205
3206         Reviewed by Yury Semikhatsky.
3207
3208         * inspector/InjectedScriptSource.js:
3209
3210 2012-03-20  Alexander Pavlov  <apavlov@chromium.org>
3211
3212         Web Inspector: newly added CSS rules shouldn't rewrite HTML content in the resources panel
3213         https://bugs.webkit.org/show_bug.cgi?id=81414
3214
3215         Reviewed by Vsevolod Vlasov.
3216
3217         * inspector/front-end/CSSStyleModel.js:
3218         (WebInspector.CSSStyleModelResourceBinding.prototype._styleSheetChanged.setContent):
3219         (WebInspector.CSSStyleModelResourceBinding.prototype._styleSheetChanged):
3220
3221 2012-03-20  Yury Semikhatsky  <yurys@chromium.org>
3222
3223         Web Inspector: provide class name filter for "comparison" view in heap profiler
3224         https://bugs.webkit.org/show_bug.cgi?id=81641
3225
3226         Class name filtering now works for both Summary and Comparison views.
3227
3228         Reviewed by Pavel Feldman.
3229
3230         * inspector/front-end/DetailedHeapshotView.js:
3231         (WebInspector.DetailedHeapshotView.prototype._createToolbarWithClassNameFilter):
3232         (WebInspector.DetailedHeapshotView.prototype._changeNameFilter):
3233         * inspector/front-end/heapProfiler.css:
3234         (.detailed-heapshot-view .class-view-grid):
3235         (.detailed-heapshot-view .class-view-toolbar):
3236         (.detailed-heapshot-view .class-view-toolbar input.class-name-filter):
3237
3238 2012-03-20  Nikolas Zimmermann  <nzimmermann@rim.com>
3239
3240         Make animVal support type-safe
3241         https://bugs.webkit.org/show_bug.cgi?id=81640
3242
3243         Reviewed by Antti Koivisto.
3244
3245         Test: svg/animations/force-use-shadow-tree-recreation-while-animating.html
3246
3247         Redesign animVal support in a type-safe fashion, avoiding the SVGGenericAnimatedType
3248         and associated reinterpret_casts, which require all call-sites to assure that the
3249         types are safe to cast, before actually calling the method.
3250
3251         Remove pure virtual animationStarted/Ended/ValueWillChange/ValueDidChange & currentBaseValueVariant methods from SVGAnimatedProperty,
3252         and de-virtualize them in classes that inherit from SVGAnimatedProperty, like SVGAnimatedPropertyTearOff, etc.
3253
3254         Add startAnimValAnimation/stopAnimValAnimation/resetAnimValToBaseVal/animValWillChange/animVallDidChange methods to all
3255         SVGAnimatedXXXAnimator classes that currently support animVal (SVGAnimatedLength/LengthList/Number(OptionalNumber)/NumberList/TransformList).
3256         Those SVGAnimatedLengthAnimator can cast the generic SVGAnimatedProperty* associated with a certain SVG DOM property, to the real type
3257         eg. SVGAnimatedLength (which is a SVGAnimatedPropertyTearOff<SVGLength>). This way we can call those methods, without relying on virtual
3258         function calls. Also it makes the "SVGGenericAnimatedType* currentBaseValueVariant()" accessor needless, as we can just call the method
3259         right on eg. the SVGAnimatedLength, which gives us the "const SVGLength&" object, instead of a generic pointer type, that we have to
3260         reinterpret_cast to some hopefully-matching expected type. The new approach is truly type-safey, but needs a bit more boilerplate code.
3261
3262         To reduce the amount of copy&paste across the SVGAnimatedXXXAnimator classes, all code is placed in template functions in
3263         SVGAnimatedTypeAnimator.h, which can be shared across all SVGAnimatedXXXAnimator classes, that inherit from SVGAnimatedTypeAnimator.
3264
3265         Test: svg/animations/force-use-shadow-tree-recreation-while-animating.html
3266
3267         * svg/SVGAnimateElement.cpp:
3268         (WebCore::SVGAnimateElement::calculateAnimatedValue):
3269         (WebCore::SVGAnimateElement::resetToBaseValue):
3270         (WebCore::SVGAnimateElement::applyResultsToTarget):
3271         (WebCore):
3272         (WebCore::SVGAnimateElement::targetElementWillChange):
3273         * svg/SVGAnimatedLength.cpp:
3274         (WebCore::SVGAnimatedLengthAnimator::startAnimValAnimation):
3275         (WebCore::SVGAnimatedLengthAnimator::stopAnimValAnimation):
3276         (WebCore):
3277         (WebCore::SVGAnimatedLengthAnimator::resetAnimValToBaseVal):
3278         (WebCore::SVGAnimatedLengthAnimator::animValWillChange):
3279         (WebCore::SVGAnimatedLengthAnimator::animValDidChange):
3280         * svg/SVGAnimatedLength.h:
3281         (WebCore):
3282         (SVGAnimatedLengthAnimator):
3283         * svg/SVGAnimatedLengthList.cpp:
3284         (WebCore::SVGAnimatedLengthListAnimator::startAnimValAnimation):
3285         (WebCore::SVGAnimatedLengthListAnimator::stopAnimValAnimation):
3286         (WebCore):
3287         (WebCore::SVGAnimatedLengthListAnimator::resetAnimValToBaseVal):
3288         (WebCore::SVGAnimatedLengthListAnimator::animValWillChange):
3289         (WebCore::SVGAnimatedLengthListAnimator::animValDidChange):
3290         * svg/SVGAnimatedLengthList.h:
3291         (WebCore):
3292         (SVGAnimatedLengthListAnimator):
3293         * svg/SVGAnimatedNumber.cpp:
3294         (WebCore::SVGAnimatedNumberAnimator::startAnimValAnimation):
3295         (WebCore::SVGAnimatedNumberAnimator::stopAnimValAnimation):
3296         (WebCore):
3297         (WebCore::SVGAnimatedNumberAnimator::resetAnimValToBaseVal):
3298         (WebCore::SVGAnimatedNumberAnimator::animValWillChange):
3299         (WebCore::SVGAnimatedNumberAnimator::animValDidChange):
3300         * svg/SVGAnimatedNumber.h:
3301         (WebCore):
3302         (SVGAnimatedNumberAnimator):
3303         * svg/SVGAnimatedNumberList.cpp:
3304         (WebCore::SVGAnimatedNumberListAnimator::startAnimValAnimation):
3305         (WebCore::SVGAnimatedNumberListAnimator::stopAnimValAnimation):
3306         (WebCore):
3307         (WebCore::SVGAnimatedNumberListAnimator::resetAnimValToBaseVal):
3308         (WebCore::SVGAnimatedNumberListAnimator::animValWillChange):
3309         (WebCore::SVGAnimatedNumberListAnimator::animValDidChange):
3310         * svg/SVGAnimatedNumberList.h:
3311         (WebCore):
3312         (SVGAnimatedNumberListAnimator):
3313         * svg/SVGAnimatedNumberOptionalNumber.cpp:
3314         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::startAnimValAnimation):
3315         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::stopAnimValAnimation):
3316         (WebCore):
3317         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::resetAnimValToBaseVal):
3318         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::animValWillChange):
3319         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::animValDidChange):
3320         * svg/SVGAnimatedNumberOptionalNumber.h:
3321         (WebCore):
3322         (SVGAnimatedNumberOptionalNumberAnimator):
3323         * svg/SVGAnimatedTransformList.cpp:
3324         (WebCore::SVGAnimatedTransformListAnimator::startAnimValAnimation):
3325         (WebCore):
3326         (WebCore::SVGAnimatedTransformListAnimator::stopAnimValAnimation):
3327         (WebCore::SVGAnimatedTransformListAnimator::resetAnimValToBaseVal):
3328         (WebCore::SVGAnimatedTransformListAnimator::animValWillChange):
3329         (WebCore::SVGAnimatedTransformListAnimator::animValDidChange):
3330         * svg/SVGAnimatedTransformList.h:
3331         (WebCore):
3332         (SVGAnimatedTransformListAnimator):
3333         * svg/SVGAnimatedType.h:
3334         (WebCore):
3335         * svg/SVGAnimatedTypeAnimator.h:
3336         (WebCore):
3337         (SVGAnimatedTypeAnimator):
3338         (WebCore::SVGAnimatedTypeAnimator::startAnimValAnimation):
3339         (WebCore::SVGAnimatedTypeAnimator::stopAnimValAnimation):
3340         (WebCore::SVGAnimatedTypeAnimator::resetAnimValToBaseVal):
3341         (WebCore::SVGAnimatedTypeAnimator::animValWillChange):
3342         (WebCore::SVGAnimatedTypeAnimator::animValDidChange):
3343         (WebCore::SVGAnimatedTypeAnimator::findAnimatedPropertiesForAttributeName):
3344         (WebCore::SVGAnimatedTypeAnimator::startAnimation):
3345         (WebCore::SVGAnimatedTypeAnimator::stopAnimValAnimationForType):
3346         (WebCore::SVGAnimatedTypeAnimator::animValDidChangeForType):
3347         (WebCore::SVGAnimatedTypeAnimator::animValWillChangeForType):
3348         (WebCore::SVGAnimatedTypeAnimator::constructFromOneBaseValue):
3349         (WebCore::SVGAnimatedTypeAnimator::resetFromOneBaseValue):
3350         (WebCore::SVGAnimatedTypeAnimator::constructFromTwoBaseValues):
3351         (WebCore::SVGAnimatedTypeAnimator::resetFromTwoBaseValues):
3352         (WebCore::SVGAnimatedTypeAnimator::castAnimatedPropertyToActualType):
3353         (WebCore::SVGAnimatedTypeAnimator::collectAnimatedPropertiesFromInstances):
3354         * svg/SVGAnimationElement.cpp:
3355         (WebCore::SVGAnimationElement::applyAnimatedValue):
3356         (WebCore::SVGAnimationElement::setTargetAttributeAnimatedValue):
3357         * svg/SVGAnimationElement.h:
3358         (SVGAnimationElement):
3359         * svg/SVGElementInstance.cpp:
3360         (WebCore::SVGElementInstance::invalidateAllInstancesOfElement):
3361         (WebCore::SVGElementInstance::InstanceUpdateBlocker::InstanceUpdateBlocker):
3362         (WebCore):
3363         (WebCore::SVGElementInstance::InstanceUpdateBlocker::~InstanceUpdateBlocker):
3364         * svg/SVGElementInstance.h:
3365         (WebCore):
3366         (InstanceUpdateBlocker):
3367         (SVGElementInstance):
3368         * svg/properties/SVGAnimatedListPropertyTearOff.h:
3369         (WebCore::SVGAnimatedListPropertyTearOff::currentBaseValue):
3370         (WebCore::SVGAnimatedListPropertyTearOff::animationStarted):
3371         (WebCore::SVGAnimatedListPropertyTearOff::animationEnded):
3372         (WebCore::SVGAnimatedListPropertyTearOff::animValWillChange):
3373         (WebCore::SVGAnimatedListPropertyTearOff::animValDidChange):
3374         * svg/properties/SVGAnimatedProperty.h:
3375         (WebCore):
3376         * svg/properties/SVGAnimatedPropertyTearOff.h:
3377         (WebCore::SVGAnimatedPropertyTearOff::currentBaseValue):
3378         (WebCore::SVGAnimatedPropertyTearOff::animationStarted):
3379         (WebCore::SVGAnimatedPropertyTearOff::animationEnded):
3380         (WebCore::SVGAnimatedPropertyTearOff::animValWillChange):
3381         (WebCore::SVGAnimatedPropertyTearOff::animValDidChange):
3382         * svg/properties/SVGAnimatedStaticPropertyTearOff.h:
3383         (WebCore::SVGAnimatedStaticPropertyTearOff::currentBaseValue):
3384         (WebCore::SVGAnimatedStaticPropertyTearOff::animationStarted):
3385         (WebCore::SVGAnimatedStaticPropertyTearOff::animationEnded):
3386         (WebCore::SVGAnimatedStaticPropertyTearOff::animValWillChange):
3387         (WebCore::SVGAnimatedStaticPropertyTearOff::animValDidChange):
3388
3389 2012-03-20  Mihnea Ovidenie  <mihnea@adobe.com>
3390
3391         [CSSRegions]Implement NamedFlow::getRegionsByContentNode
3392         https://bugs.webkit.org/show_bug.cgi?id=77746
3393
3394         Reviewed by David Hyatt.
3395
3396         The list of regions returned is a static node list.
3397
3398         Tests: fast/regions/get-regions-by-content-node-horiz-bt.html
3399                fast/regions/get-regions-by-content-node-horiz-tb.html
3400                fast/regions/get-regions-by-content-node-vert-lr.html
3401                fast/regions/get-regions-by-content-node-vert-rl.html
3402                fast/regions/get-regions-by-content-node.html
3403                fast/regions/get-regions-by-content-node2.html
3404
3405         * dom/WebKitNamedFlow.cpp:
3406         (WebCore::WebKitNamedFlow::getRegionsByContentNode):
3407         (WebCore):
3408         * dom/WebKitNamedFlow.h:
3409         (WebKitNamedFlow):
3410         * dom/WebKitNamedFlow.idl:
3411         * rendering/RenderFlowThread.cpp:
3412         (WebCore::RenderFlowThread::regionInRange):
3413         (WebCore):
3414         (WebCore::RenderFlowThread::objectInFlowRegion):
3415         * rendering/RenderFlowThread.h:
3416         * rendering/RenderRegion.h:
3417         (WebCore::RenderRegion::flowThread):
3418
3419 2012-03-20  Luke Macpherson  <macpherson@chromium.org>
3420
3421         Remove min and max parameters from CSSPrimitiveValue's roundForImpreciseConversion function.
3422         https://bugs.webkit.org/show_bug.cgi?id=81629
3423
3424         Reviewed by Andreas Kling.
3425
3426         No new tests / refactoring only.
3427
3428         * css/CSSPrimitiveValue.cpp:
3429         (WebCore::CSSPrimitiveValue::computeLength):
3430       &n