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