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