Render text tracks
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-12-19  Eric Carlson  <eric.carlson@apple.com>
2
3         Render text tracks
4         https://bugs.webkit.org/show_bug.cgi?id=62886
5
6         Reviewed by Sam Weinig.
7
8         Test: media/track/track-cue-rendering.html
9
10         * css/mediaControls.css:
11         (video::-webkit-media-text-track-container):
12         (video::-webkit-media-text-track-display):
13
14         * html/HTMLMediaElement.cpp:
15         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_haveVisibleTextTrack.
16         (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Trigger an update of the text
17             track display.
18         (WebCore::HTMLMediaElement::textTrackModeChanged): call configureTextTrackDisplay() so 
19             the text track display is hidden or shown when necessary.
20         (WebCore::HTMLMediaElement::userIsInterestedInThisTrack): Minor cleanup.
21         (WebCore::HTMLMediaElement::createMediaControls): configureMediaControls() always called
22             reset after creating the controls, do it here instead.
23         (WebCore::HTMLMediaElement::configureMediaControls): Simplify and cleanup.
24         (WebCore::HTMLMediaElement::configureTextTrackDisplay): Show and hide text track display.
25         * html/HTMLMediaElement.h:
26         (WebCore::HTMLMediaElement::currentlyVisibleCues):
27
28         * html/shadow/MediaControlElements.cpp:
29         (WebCore::RenderTextTrackContainerElement::RenderTextTrackContainerElement): New.
30         (WebCore::RenderTextTrackContainerElement::layout): New. Call the display element so it can
31             update the position and font size.
32         (WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement): New.
33         (WebCore::MediaControlTextTrackContainerElement::create): Ditto.
34         (WebCore::MediaControlTextTrackContainerElement::createRenderer): Ditto.
35         (WebCore::MediaControlTextTrackContainerElement::shadowPseudoId): Ditto.
36         (WebCore::MediaControlTextTrackContainerElement::updateSizes): Keep the cue display element
37             positioned above the bottom of the video box, and size the font according to the video height.
38         (WebCore::MediaControlTextTrackDisplayElement::MediaControlTextTrackDisplayElement): New.
39         (WebCore::MediaControlTextTrackDisplayElement::create): Ditto.
40         (WebCore::MediaControlTextTrackDisplayElement::shadowPseudoId): Ditto.
41         * html/shadow/MediaControlElements.h:
42         (WebCore::MediaControlTextTrackContainerElement::displayType):
43         (WebCore::MediaControlTextTrackDisplayElement::displayType):
44
45         * html/shadow/MediaControlRootElement.cpp:
46         (WebCore::MediaControlRootElement::MediaControlRootElement): New.
47         (WebCore::MediaControlRootElement::setMediaController): Ditto.
48         (WebCore::MediaControlRootElement::createTextTrackDisplay): Ditto.
49         (WebCore::MediaControlRootElement::showTextTrackDisplay): Ditto.
50         (WebCore::MediaControlRootElement::hideTextTrackDisplay): Ditto.
51         (WebCore::MediaControlRootElement::updateTextTrackDisplay): Ditto.
52         * html/shadow/MediaControlRootElement.h:
53
54         * html/shadow/MediaControlRootElementChromium.cpp:
55         (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium): New.
56         (WebCore::MediaControlRootElement::createTextTrackDisplay): Ditto.
57         (WebCore::MediaControlRootElement::showTextTrackDisplay): Ditto.
58         (WebCore::MediaControlRootElement::hideTextTrackDisplay): Ditto.
59         (WebCore::MediaControlRootElement::updateTextTrackDisplay): Ditto.
60         * html/shadow/MediaControlRootElementChromium.h:
61         * html/shadow/MediaControls.h:
62
63 2011-12-19  Eric Carlson  <eric.carlson@apple.com>
64
65         Enable <track> for Mac build
66         https://bugs.webkit.org/show_bug.cgi?id=74838
67
68         Reviewed by Darin Adler.
69
70         * Configurations/FeatureDefines.xcconfig:
71         * bindings/generic/RuntimeEnabledFeatures.cpp:
72
73 2011-12-19  Kenneth Rohde Christiansen  <kenneth@webkit.org>
74
75         Make the Editor::setIgnoreCompositionSelectionChange public as it is needed by Qt
76
77         Reviewed by Simon Hausmann.
78
79         * editing/Editor.h:
80
81 2011-12-19  Alexander Pavlov  <apavlov@chromium.org>
82
83         Web Inspector: Implement CSS selector profiler backend
84         https://bugs.webkit.org/show_bug.cgi?id=74603
85
86         Reviewed by Pavel Feldman.
87
88         No new tests, as the changed code does not result in visible effects yet.
89
90         * inspector/Inspector.json:
91         * inspector/InspectorCSSAgent.cpp:
92         (WebCore::RuleMatchingStats::RuleMatchingStats):
93         (WebCore::SelectorProfile::SelectorProfile):
94         (WebCore::SelectorProfile::~SelectorProfile):
95         (WebCore::SelectorProfile::totalMatchingTimeMs):
96         (WebCore::SelectorProfile::startSelector):
97         (WebCore::SelectorProfile::commitSelector):
98         (WebCore::SelectorProfile::commitSelectorTime):
99         (WebCore::SelectorProfile::toInspectorObject):
100         (WebCore::InspectorCSSAgent::clearFrontend):
101         (WebCore::InspectorCSSAgent::restore):
102         (WebCore::InspectorCSSAgent::startSelectorProfiler):
103         (WebCore::InspectorCSSAgent::stopSelectorProfiler):
104         (WebCore::InspectorCSSAgent::willMatchRule):
105         (WebCore::InspectorCSSAgent::didMatchRule):
106         (WebCore::InspectorCSSAgent::willProcessRule):
107         (WebCore::InspectorCSSAgent::didProcessRule):
108         * inspector/InspectorCSSAgent.h:
109
110 2011-12-19  Alexander Pavlov  <apavlov@chromium.org>
111
112         Web Inspector: Status bar button glyph for the "Record" buttons broken
113         https://bugs.webkit.org/show_bug.cgi?id=74861
114
115         Reviewed by Pavel Feldman.
116
117         * inspector/front-end/inspector.css:
118         (.record-cpu-profile-status-bar-item .glyph, .record-profile-status-bar-item .glyph):
119         (.record-cpu-profile-status-bar-item.toggled-on .glyph, .record-profile-status-bar-item.toggled-on .glyph):
120
121 2011-12-19  Pavel Feldman  <pavel.feldman@gmail.com>
122
123         Web Inspector: only the first @rule is highlighted in CSS
124         https://bugs.webkit.org/show_bug.cgi?id=74568
125
126         Reviewed by Timothy Hatcher.
127
128         * inspector/front-end/SourceCSSTokenizer.js:
129         (WebInspector.SourceCSSTokenizer.prototype.nextToken):
130         * inspector/front-end/SourceCSSTokenizer.re2js:
131
132 2011-12-19  Ilya Tikhonovsky  <loislo@chromium.org>
133
134         Web Inspector: Feature Request: Able to remove all breakpoints.
135         https://bugs.webkit.org/show_bug.cgi?id=63055
136
137         Reviewed by Pavel Feldman.
138
139         * English.lproj/localizedStrings.js:
140         * inspector/front-end/BreakpointManager.js:
141         (WebInspector.BreakpointManager.prototype.removeAllBreakpoints):
142         * inspector/front-end/BreakpointsSidebarPane.js:
143         (WebInspector.JavaScriptBreakpointsSidebarPane):
144         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointContextMenu):
145         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._contextMenu):
146         * inspector/front-end/DebuggerPresentationModel.js:
147         (WebInspector.DebuggerPresentationModel.prototype.removeAllBreakpoints):
148
149 2011-12-19  Benjamin Poulain  <benjamin@webkit.org>
150
151         Build fix for ScrollingCoordinatorMac.mm when building on a case sensitive system
152
153         Unreviewed build fix for r103180. StdlibExtras.h->StdLibExtras.h to compile on case sensitive system.
154
155         * page/mac/ScrollingCoordinatorMac.mm:
156
157 2011-12-19  Kentaro Hara  <haraken@chromium.org>
158
159         Remove unnecessary [JSCCustomGetter] IDLs from DOMWindow.idl
160         https://bugs.webkit.org/show_bug.cgi?id=74829
161
162         Reviewed by Adam Barth.
163
164         Now JSC has implemented the [Constructor] IDL and it generates
165         getDOMConstructor() automatically. This patch removes hand-written
166         unnecessary getDOMConstructor()s from JSDOMWindowCustom.cpp.
167
168         No new tests. No change in behavior.
169
170         * bindings/js/JSDOMWindowCustom.cpp:
171         * page/DOMWindow.idl:
172
173 2011-12-19  Adam Barth  <abarth@webkit.org>
174
175         The HTML parser doesn't enforce the "Noah's Ark condition" from the HTML5 spec
176         https://bugs.webkit.org/show_bug.cgi?id=74828
177
178         Reviewed by Darin Adler.
179
180         This patch implement the "Noah's Ark condition" from the HTML5
181         specification.  This condition limits the number of identitical
182         elements that can be in the list of active formatting elements.  I'm not
183         entirely sure that enforcing this condition is worth the complexity,
184         but given that we've come this far in support of the HTML5 parsing
185         algorithm, we might as well finish it.
186
187         After this patch, we pass all but one of the html5lib parsing tests!
188
189         Tests: html5lib/runner.html
190
191         * html/parser/HTMLFormattingElementList.cpp:
192         (WebCore::attributeCount):
193         (WebCore::HTMLFormattingElementList::append):
194         (WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly):
195         (WebCore::HTMLFormattingElementList::ensureNoahsArkCondition):
196         * html/parser/HTMLFormattingElementList.h:
197
198 2011-12-19  Benjamin Poulain  <bpoulain@apple.com>
199
200         Add support for 8 bits strings to Document::isValidName()
201         https://bugs.webkit.org/show_bug.cgi?id=74784
202
203         Reviewed by Darin Adler.
204
205         Avoid the conversion to 16bits when we are in the ASCII fast path,
206         otherwise fallback to the Unicode testing in 16bits.
207
208         * dom/Document.cpp:
209         (WebCore::isValidNameASCII):
210         (WebCore::Document::isValidName):
211
212 2011-12-18  Kentaro Hara  <haraken@chromium.org>
213
214         REGRESSION(r101445): [JSC] Generated code for custom getters and setters
215         with the [Supplemental] IDL is wrong
216         https://bugs.webkit.org/show_bug.cgi?id=74837
217
218         Reviewed by Darin Adler.
219
220         In bug 73162, we implemented the [Supplemental] IDL, but the generated code
221         for custom getters and setters was wrong in JSC. This patch fixes CodeGeneratorJS.pm
222         so that the result of WebCore/bindings/scripts/test/TestInterface.idl becomes as follows:
223
224         Wrong:
225             JSValue jsTestInterfaceStr3(ExecState* exec, JSValue slotBase, const Identifier&)
226             {
227                 JSTestInterface* castedThis = static_cast<JSTestInterface*>(asObject(slotBase));
228                 return JSTestSupplemental::str3(castedThis, exec);
229             }
230
231         Correct:
232             JSValue jsTestInterfaceStr3(ExecState* exec, JSValue slotBase, const Identifier&)
233             {
234                 JSTestInterface* castedThis = static_cast<JSTestInterface*>(asObject(slotBase));
235                 TestInterface* imp = static_cast<TestInterface*>(castedThis->impl());
236                 return castedThis->str3(imp, exec);
237             }
238
239         Tests: bindings/scripts/test/JS/TestInterface.idl
240
241         * bindings/scripts/CodeGeneratorJS.pm:
242         (GenerateHeader):
243         (GenerateImplementation):
244         * bindings/scripts/test/JS/JSTestInterface.cpp: Updated run-bindings-tests result.
245         (WebCore::jsTestInterfaceStr3):
246         (WebCore::setJSTestInterfaceStr3):
247         * bindings/scripts/test/JS/JSTestInterface.h: Ditto.
248
249 2011-12-18  Adam Barth  <abarth@webkit.org>
250
251         Fix typo in comment.
252
253         * html/parser/HTMLTreeBuilder.cpp:
254         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
255
256 2011-12-18  Keishi Hattori  <keishi@webkit.org>
257
258         Implement <input type=color> UI WebKit chromium part
259         https://bugs.webkit.org/show_bug.cgi?id=65897
260
261         Reviewed by Darin Fisher.
262
263         * GNUmakefile.list.am: Removed ColorChooser.cpp and added ColorChooserClient.h
264         * WebCore.gypi: Added ColorChooser.h and ColorChooserClient.h
265         * WebCore.xcodeproj/project.pbxproj: Removed ColorChooser.cpp and added ColorChooserClient.h
266
267 2011-12-18  David Barton  <dbarton@mathscribe.com>
268
269         <msup>, <munder>, <mover>, and <munderover> baseline positions are wrong
270         https://bugs.webkit.org/show_bug.cgi?id=72821
271
272         Reviewed by Darin Adler.
273
274         Tested by rebaselining 8 existing tests. (Pardon the pun.)
275
276         * rendering/mathml/RenderMathMLSubSup.cpp:
277         (WebCore::RenderMathMLSubSup::baselinePosition):
278         Just using the base's (these puns are not my fault) baseline did not leave room for the exponent.
279         * rendering/mathml/RenderMathMLUnderOver.cpp:
280         (WebCore::RenderMathMLUnderOver::baselinePosition):
281         Added a guard condition, and removed some bad lines apparently mistakenly copied from RenderMathMLSubSup.cpp.
282
283 2011-12-18  Luke Macpherson   <macpherson@chromium.org>
284
285         Implement CSS line-height property in CSSStyleApplyProperty.
286         https://bugs.webkit.org/show_bug.cgi?id=74561
287
288         Reviewed by Andreas Kling.
289
290         No new tests / refactoring only.
291
292         * css/CSSPrimitiveValue.h:
293         (WebCore::CSSPrimitiveValue::isNumber):
294         * css/CSSStyleApplyProperty.cpp:
295         (WebCore::ApplyPropertyLineHeight::applyValue):
296         (WebCore::ApplyPropertyLineHeight::createHandler):
297         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
298         * css/CSSStyleSelector.cpp:
299         (WebCore::CSSStyleSelector::applyProperty):
300
301 2011-12-18  Luke Macpherson   <macpherson@chromium.org>
302
303         Implement CSS outline shorthand property in CSSStyleApplyProperty.
304         https://bugs.webkit.org/show_bug.cgi?id=74467
305
306         Reviewed by Andreas Kling.
307
308         No new tests / refactoring only.
309
310         RenderStyle::resetOutline was removed in favor of explicity expanding to the
311         initial values of the shorthand expansion. This improves consistency because
312         the initial values to use are more clearly (and singularly) defined.
313
314         * css/CSSStyleApplyProperty.cpp:
315         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
316         * css/CSSStyleSelector.cpp:
317         (WebCore::CSSStyleSelector::applyProperty):
318         * rendering/style/RenderStyle.h:
319
320 2011-12-18  Sheriff Bot  <webkit.review.bot@gmail.com>
321
322         Unreviewed, rolling out r103205.
323         http://trac.webkit.org/changeset/103205
324         https://bugs.webkit.org/show_bug.cgi?id=74833
325
326         There are valid characters above 0x80 when the  string is
327         8bits (Requested by benjaminp on #webkit).
328
329         * dom/Document.cpp:
330         (WebCore::isValidNameASCII):
331         (WebCore::Document::isValidName):
332
333 2011-12-18  Luke Macpherson   <macpherson@chromium.org>
334
335         Separate box alignment and box pack values into separate enums.
336         https://bugs.webkit.org/show_bug.cgi?id=74580
337
338         Reviewed by Andreas Kling.
339
340         No new tests / refactoring only.
341
342         Separating these types cleans up the code by removing several assertions that
343         values are in the correct ranges, as this is ensured by the type system.
344
345         * css/CSSComputedStyleDeclaration.cpp:
346         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
347         * css/CSSPrimitiveValueMappings.h:
348         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
349         (WebCore::CSSPrimitiveValue::operator EBoxPack):
350         (WebCore::CSSPrimitiveValue::operator EBoxAlignment):
351         * css/CSSStyleSelector.cpp:
352         (WebCore::CSSStyleSelector::applyProperty):
353         * rendering/RenderDeprecatedFlexibleBox.cpp:
354         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
355         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
356         * rendering/RenderFullScreen.cpp:
357         (createFullScreenStyle):
358         * rendering/style/RenderStyle.h:
359         (WebCore::InheritedFlags::boxPack):
360         (WebCore::InheritedFlags::setBoxAlign):
361         (WebCore::InheritedFlags::setBoxPack):
362         (WebCore::InheritedFlags::initialBoxPack):
363         * rendering/style/RenderStyleConstants.h:
364         * rendering/style/StyleDeprecatedFlexibleBoxData.h:
365
366 2011-12-18  Luke Macpherson   <macpherson@chromium.org>
367
368         Implement CSS font-size property in CSSStyleApplyProperty.
369         https://bugs.webkit.org/show_bug.cgi?id=74368
370
371         Reviewed by Andreas Kling.
372
373         No new tests / refactoring only.
374
375         * css/CSSStyleApplyProperty.cpp:
376         (WebCore::ApplyPropertyFontSize::largerFontSize):
377         (WebCore::ApplyPropertyFontSize::smallerFontSize):
378         (WebCore::ApplyPropertyFontSize::applyInheritValue):
379         (WebCore::ApplyPropertyFontSize::applyInitialValue):
380         (WebCore::ApplyPropertyFontSize::applyValue):
381         (WebCore::ApplyPropertyFontSize::createHandler):
382         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
383         * css/CSSStyleSelector.cpp:
384         (WebCore::CSSStyleSelector::applyProperty):
385         * css/CSSStyleSelector.h:
386         (WebCore::CSSStyleSelector::hasParentNode):
387
388 2011-12-18  Sheriff Bot  <webkit.review.bot@gmail.com>
389
390         Unreviewed, rolling out r103199.
391         http://trac.webkit.org/changeset/103199
392         https://bugs.webkit.org/show_bug.cgi?id=74832
393
394         Caused a bot crashiness extravaganza! (Requested by kling on
395         #webkit).
396
397         * platform/KURL.cpp:
398         (WebCore::isLetterMatchIgnoringCase):
399         (WebCore::protocolIs):
400
401 2011-12-18  Dan Bernstein  <mitz@apple.com>
402
403         Positioned Floats: Assertion hit in fast/block/positioning/positioned-float-layout-after-image-load.html
404         https://bugs.webkit.org/show_bug.cgi?id=67759
405
406         Reviewed by Darin Adler.
407
408         Test: fast/block/positioning/positioned-float-layout-after-image-load.html
409
410         Positioned floats are both floating and positioned. Made the following functions treat them as
411         positioned rather than as floats by reordering code.
412
413         * rendering/RenderBlockLineLayout.cpp:
414         (WebCore::RenderBlock::LineBreaker::skipTrailingWhitespace):
415         (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
416         (WebCore::RenderBlock::LineBreaker::nextLineBreak):
417
418 2011-12-18  Benjamin Poulain  <bpoulain@apple.com>
419
420         Add support for 8 bits strings to Document::isValidName()
421         https://bugs.webkit.org/show_bug.cgi?id=74784
422
423         Reviewed by Andreas Kling.
424
425         The valid name has a fast path for ASCII, and a slow path
426         taking Unicode characters into account.
427
428         For 8-bit strings, we don't need to take the non-ASCII path
429         as it could never succeed if the ASCII path didn't.
430
431         * dom/Document.cpp:
432         (WebCore::isValidNameASCII):
433         (WebCore::Document::isValidName):
434
435 2011-12-18  Huang Dongsung  <luxtella@company100.net>
436
437         [Qt] Remove redundant m_glWidget->makeCurrent() calls in GraphicsContext3DQt.
438         https://bugs.webkit.org/show_bug.cgi?id=73814
439
440         It causes a performance hit.
441         Moved the redundant function calls to makeContextCurrent().
442
443         Reviewed by Noam Rosenthal.
444
445         * platform/graphics/qt/GraphicsContext3DQt.cpp:
446         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
447         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
448         (WebCore::GraphicsContext3DPrivate::paint):
449         (WebCore::GraphicsContext3DPrivate::makeCurrentIfNeeded):
450         (WebCore::GraphicsContext3D::~GraphicsContext3D):
451         (WebCore::GraphicsContext3D::makeContextCurrent):
452         (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
453         (WebCore::GraphicsContext3D::reshape):
454         (WebCore::GraphicsContext3D::activeTexture):
455         (WebCore::GraphicsContext3D::attachShader):
456         (WebCore::GraphicsContext3D::getAttachedShaders):
457         (WebCore::GraphicsContext3D::bindAttribLocation):
458         (WebCore::GraphicsContext3D::bindBuffer):
459         (WebCore::GraphicsContext3D::bindFramebuffer):
460         (WebCore::GraphicsContext3D::bindRenderbuffer):
461         (WebCore::GraphicsContext3D::bindTexture):
462         (WebCore::GraphicsContext3D::blendColor):
463         (WebCore::GraphicsContext3D::blendEquation):
464         (WebCore::GraphicsContext3D::blendEquationSeparate):
465         (WebCore::GraphicsContext3D::blendFunc):
466         (WebCore::GraphicsContext3D::blendFuncSeparate):
467         (WebCore::GraphicsContext3D::bufferData):
468         (WebCore::GraphicsContext3D::bufferSubData):
469         (WebCore::GraphicsContext3D::checkFramebufferStatus):
470         (WebCore::GraphicsContext3D::clearColor):
471         (WebCore::GraphicsContext3D::clear):
472         (WebCore::GraphicsContext3D::clearDepth):
473         (WebCore::GraphicsContext3D::clearStencil):
474         (WebCore::GraphicsContext3D::colorMask):
475         (WebCore::GraphicsContext3D::compileShader):
476         (WebCore::GraphicsContext3D::compressedTexImage2D):
477         (WebCore::GraphicsContext3D::compressedTexSubImage2D):
478         (WebCore::GraphicsContext3D::copyTexImage2D):
479         (WebCore::GraphicsContext3D::copyTexSubImage2D):
480         (WebCore::GraphicsContext3D::cullFace):
481         (WebCore::GraphicsContext3D::depthFunc):
482         (WebCore::GraphicsContext3D::depthMask):
483         (WebCore::GraphicsContext3D::depthRange):
484         (WebCore::GraphicsContext3D::detachShader):
485         (WebCore::GraphicsContext3D::disable):
486         (WebCore::GraphicsContext3D::disableVertexAttribArray):
487         (WebCore::GraphicsContext3D::drawArrays):
488         (WebCore::GraphicsContext3D::drawElements):
489         (WebCore::GraphicsContext3D::enable):
490         (WebCore::GraphicsContext3D::enableVertexAttribArray):
491         (WebCore::GraphicsContext3D::finish):
492         (WebCore::GraphicsContext3D::flush):
493         (WebCore::GraphicsContext3D::framebufferRenderbuffer):
494         (WebCore::GraphicsContext3D::framebufferTexture2D):
495         (WebCore::GraphicsContext3D::frontFace):
496         (WebCore::GraphicsContext3D::generateMipmap):
497         (WebCore::GraphicsContext3D::getActiveAttrib):
498         (WebCore::GraphicsContext3D::getActiveUniform):
499         (WebCore::GraphicsContext3D::getAttribLocation):
500         (WebCore::GraphicsContext3D::getError):
501         (WebCore::GraphicsContext3D::getString):
502         (WebCore::GraphicsContext3D::hint):
503         (WebCore::GraphicsContext3D::isBuffer):
504         (WebCore::GraphicsContext3D::isEnabled):
505         (WebCore::GraphicsContext3D::isFramebuffer):
506         (WebCore::GraphicsContext3D::isProgram):
507         (WebCore::GraphicsContext3D::isRenderbuffer):
508         (WebCore::GraphicsContext3D::isShader):
509         (WebCore::GraphicsContext3D::isTexture):
510         (WebCore::GraphicsContext3D::lineWidth):
511         (WebCore::GraphicsContext3D::linkProgram):
512         (WebCore::GraphicsContext3D::pixelStorei):
513         (WebCore::GraphicsContext3D::polygonOffset):
514         (WebCore::GraphicsContext3D::readPixels):
515         (WebCore::GraphicsContext3D::releaseShaderCompiler):
516         (WebCore::GraphicsContext3D::renderbufferStorage):
517         (WebCore::GraphicsContext3D::sampleCoverage):
518         (WebCore::GraphicsContext3D::scissor):
519         (WebCore::GraphicsContext3D::shaderSource):
520         (WebCore::GraphicsContext3D::stencilFunc):
521         (WebCore::GraphicsContext3D::stencilFuncSeparate):
522         (WebCore::GraphicsContext3D::stencilMask):
523         (WebCore::GraphicsContext3D::stencilMaskSeparate):
524         (WebCore::GraphicsContext3D::stencilOp):
525         (WebCore::GraphicsContext3D::stencilOpSeparate):
526         (WebCore::GraphicsContext3D::texParameterf):
527         (WebCore::GraphicsContext3D::texParameteri):
528         (WebCore::GraphicsContext3D::uniform1f):
529         (WebCore::GraphicsContext3D::uniform1fv):
530         (WebCore::GraphicsContext3D::uniform2f):
531         (WebCore::GraphicsContext3D::uniform2fv):
532         (WebCore::GraphicsContext3D::uniform3f):
533         (WebCore::GraphicsContext3D::uniform3fv):
534         (WebCore::GraphicsContext3D::uniform4f):
535         (WebCore::GraphicsContext3D::uniform4fv):
536         (WebCore::GraphicsContext3D::uniform1i):
537         (WebCore::GraphicsContext3D::uniform1iv):
538         (WebCore::GraphicsContext3D::uniform2i):
539         (WebCore::GraphicsContext3D::uniform2iv):
540         (WebCore::GraphicsContext3D::uniform3i):
541         (WebCore::GraphicsContext3D::uniform3iv):
542         (WebCore::GraphicsContext3D::uniform4i):
543         (WebCore::GraphicsContext3D::uniform4iv):
544         (WebCore::GraphicsContext3D::uniformMatrix2fv):
545         (WebCore::GraphicsContext3D::uniformMatrix3fv):
546         (WebCore::GraphicsContext3D::uniformMatrix4fv):
547         (WebCore::GraphicsContext3D::useProgram):
548         (WebCore::GraphicsContext3D::validateProgram):
549         (WebCore::GraphicsContext3D::vertexAttrib1f):
550         (WebCore::GraphicsContext3D::vertexAttrib1fv):
551         (WebCore::GraphicsContext3D::vertexAttrib2f):
552         (WebCore::GraphicsContext3D::vertexAttrib2fv):
553         (WebCore::GraphicsContext3D::vertexAttrib3f):
554         (WebCore::GraphicsContext3D::vertexAttrib3fv):
555         (WebCore::GraphicsContext3D::vertexAttrib4f):
556         (WebCore::GraphicsContext3D::vertexAttrib4fv):
557         (WebCore::GraphicsContext3D::vertexAttribPointer):
558         (WebCore::GraphicsContext3D::viewport):
559         (WebCore::GraphicsContext3D::getBooleanv):
560         (WebCore::GraphicsContext3D::getBufferParameteriv):
561         (WebCore::GraphicsContext3D::getFloatv):
562         (WebCore::GraphicsContext3D::getFramebufferAttachmentParameteriv):
563         (WebCore::GraphicsContext3D::getIntegerv):
564         (WebCore::GraphicsContext3D::getProgramiv):
565         (WebCore::GraphicsContext3D::getProgramInfoLog):
566         (WebCore::GraphicsContext3D::getRenderbufferParameteriv):
567         (WebCore::GraphicsContext3D::getShaderiv):
568         (WebCore::GraphicsContext3D::getShaderInfoLog):
569         (WebCore::GraphicsContext3D::getShaderSource):
570         (WebCore::GraphicsContext3D::getTexParameterfv):
571         (WebCore::GraphicsContext3D::getTexParameteriv):
572         (WebCore::GraphicsContext3D::getUniformfv):
573         (WebCore::GraphicsContext3D::getUniformiv):
574         (WebCore::GraphicsContext3D::getUniformLocation):
575         (WebCore::GraphicsContext3D::getVertexAttribfv):
576         (WebCore::GraphicsContext3D::getVertexAttribiv):
577         (WebCore::GraphicsContext3D::getVertexAttribOffset):
578         (WebCore::GraphicsContext3D::texImage2D):
579         (WebCore::GraphicsContext3D::texSubImage2D):
580         (WebCore::GraphicsContext3D::createBuffer):
581         (WebCore::GraphicsContext3D::createFramebuffer):
582         (WebCore::GraphicsContext3D::createProgram):
583         (WebCore::GraphicsContext3D::createRenderbuffer):
584         (WebCore::GraphicsContext3D::createShader):
585         (WebCore::GraphicsContext3D::createTexture):
586         (WebCore::GraphicsContext3D::deleteBuffer):
587         (WebCore::GraphicsContext3D::deleteFramebuffer):
588         (WebCore::GraphicsContext3D::deleteProgram):
589         (WebCore::GraphicsContext3D::deleteRenderbuffer):
590         (WebCore::GraphicsContext3D::deleteShader):
591         (WebCore::GraphicsContext3D::deleteTexture):
592
593 2011-12-18  Andreas Kling  <kling@webkit.org>
594
595         Removing unrelated printf() that slipped into my last commit.
596
597         * platform/ScrollableArea.cpp:
598         (WebCore::ScrollableArea::scrollToOffsetWithoutAnimation):
599
600 2011-12-18  Andreas Kling  <kling@webkit.org>
601
602         KURL::protocolIs() should handle 8-bit strings.
603         <http://webkit.org/b/74827>
604
605         Reviewed by Antti Koivisto.
606
607         * platform/KURL.cpp:
608         (WebCore::isLetterMatchIgnoringCase):
609
610             Turned this into a template method so it can be used for both UChar and LChar.
611
612         (WebCore::charactersAreProtocol):
613         (WebCore::protocolIs):
614
615             Handle 8/16 bit strings separately to avoid conversion.
616
617 2011-12-18  Alice Boxhall  <aboxhall@chromium.org>
618
619         Make AccessibilityObject::lineForPosition return the correct value for cases where the position is not within the current object.
620         https://bugs.webkit.org/show_bug.cgi?id=71348
621
622         Reviewed by Chris Fleizach.
623
624         * accessibility/AccessibilityObject.cpp:
625         (WebCore::AccessibilityObject::lineForPosition):
626         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
627         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
628
629 2011-12-18  Sam Weinig  <sam@webkit.org>
630
631         Make EventHandler::handleWheelEvent take const PlatformWheelEvent&
632         https://bugs.webkit.org/show_bug.cgi?id=74824
633
634         Reviewed by Anders Carlsson.
635
636         * WebCore.exp.in:
637         * page/EventHandler.cpp:
638         (WebCore::EventHandler::handleWheelEvent):
639         * page/EventHandler.h:
640         * page/blackberry/EventHandlerBlackBerry.cpp:
641         (WebCore::EventHandler::passWheelEventToWidget):
642         * page/chromium/EventHandlerChromium.cpp:
643         (WebCore::EventHandler::passWheelEventToWidget):
644         * page/efl/EventHandlerEfl.cpp:
645         (WebCore::EventHandler::passWheelEventToWidget):
646         * page/gtk/EventHandlerGtk.cpp:
647         (WebCore::EventHandler::passWheelEventToWidget):
648         * page/mac/EventHandlerMac.mm:
649         (WebCore::EventHandler::passWheelEventToWidget):
650         * page/qt/EventHandlerQt.cpp:
651         (WebCore::EventHandler::passWheelEventToWidget):
652         * page/win/EventHandlerWin.cpp:
653         (WebCore::EventHandler::passWheelEventToWidget):
654         * page/wx/EventHandlerWx.cpp:
655         (WebCore::EventHandler::passWheelEventToWidget):
656         * platform/PlatformWheelEvent.h:
657         (WebCore::PlatformWheelEvent::copyTurningVerticalTicksIntoHorizontalTicks):
658
659 2011-12-18  James Kozianski  <koz@chromium.org>
660
661         [chromium] Add worldId parameter to allowScriptExtension()
662         https://bugs.webkit.org/show_bug.cgi?id=74214
663
664         Chromium uses the worldId to determine what extension is running in a
665         v8 context and knowing that at the time allowScriptExtension() is
666         called allows us to conditionally inject extension APIs.
667
668         Reviewed by Darin Fisher.
669
670         * bindings/v8/V8DOMWindowShell.cpp:
671         (WebCore::V8DOMWindowShell::initContextIfNeeded):
672         (WebCore::V8DOMWindowShell::createNewContext):
673         * bindings/v8/V8DOMWindowShell.h:
674         * bindings/v8/V8IsolatedContext.cpp:
675         (WebCore::V8IsolatedContext::V8IsolatedContext):
676         * loader/EmptyClients.h:
677         (WebCore::EmptyFrameLoaderClient::allowScriptExtension):
678         * loader/FrameLoaderClient.h:
679
680 2011-12-18  Adam Barth  <abarth@webkit.org>
681
682         Adoption agency iteration limits in HTML parser don't match HTML5 spec
683         https://bugs.webkit.org/show_bug.cgi?id=74822
684
685         Reviewed by Eric Seidel.
686
687         Previously, we were using the iteration limits from the old tree
688         builder.  Now we use the iteration limits from the HTML5 specification.
689
690         Tests: html5lib/runner.html
691
692         * html/parser/HTMLTreeBuilder.cpp:
693         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
694
695 2011-12-18  Antti Koivisto  <antti@apple.com>
696
697         https://bugs.webkit.org/show_bug.cgi?id=73954
698         REGRESSION (r97745): Transitions don't work on links
699
700         Reviewed by Andreas Kling.
701
702         Test: transitions/visited-link-color.html
703         
704         Since visited link colors are now part of the RenderStyle, they need to be transitioned
705         along with the corresponding regular colors.
706
707         * page/animation/AnimationBase.cpp:
708         (WebCore::PropertyWrapperVisitedAffectedColor::PropertyWrapperVisitedAffectedColor):
709         (WebCore::PropertyWrapperVisitedAffectedColor::equals):
710         (WebCore::PropertyWrapperVisitedAffectedColor::blend):
711         (WebCore::AnimationBase::ensurePropertyMap):
712         
713             Add new wrapper class that applies both regular and visited color.
714         
715         * rendering/style/RenderStyle.h:
716         (WebCore::InheritedFlags::visitedLinkColor):
717         (WebCore::InheritedFlags::visitedLinkBackgroundColor):
718         (WebCore::InheritedFlags::visitedLinkBorderLeftColor):
719         (WebCore::InheritedFlags::visitedLinkBorderRightColor):
720         (WebCore::InheritedFlags::visitedLinkBorderBottomColor):
721         (WebCore::InheritedFlags::visitedLinkBorderTopColor):
722         (WebCore::InheritedFlags::visitedLinkOutlineColor):
723         (WebCore::InheritedFlags::visitedLinkColumnRuleColor):
724         (WebCore::InheritedFlags::visitedLinkTextEmphasisColor):
725         (WebCore::InheritedFlags::visitedLinkTextFillColor):
726         (WebCore::InheritedFlags::visitedLinkTextStrokeColor):
727         
728             Add accessors.
729         
730         * rendering/style/StyleRareNonInheritedData.cpp:
731         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
732         
733             Opportunistic fix. Don't know how to test.
734
735 2011-12-18  Anders Carlsson  <andersca@apple.com>
736
737         Set the main frame view scroll position asynchronously
738         https://bugs.webkit.org/show_bug.cgi?id=74823
739
740         Reviewed by Sam Weinig.
741
742         * page/ScrollingCoordinator.cpp:
743         (WebCore::ScrollingCoordinator::ScrollingCoordinator):
744         Initialize m_didDispatchDidUpdateMainFrameScrollPosition to false.
745
746         (WebCore::ScrollingCoordinator::didUpdateMainFrameScrollPosition):
747         Get the scroll position, reset m_didDispatchDidUpdateMainFrameScrollPosition to false and
748         then call FrameView::setScrollOffset to update the scroll position.
749
750         * page/ScrollingCoordinator.h:
751         * page/mac/ScrollingCoordinatorMac.mm:
752         (WebCore::ScrollingCoordinator::scrollByOnScrollingThread):
753         Update the scroll position and dispatch ScrollingCoordinator::didUpdateMainFrameScrollPosition on
754         the main thread if needed.
755
756 2011-12-18  Andreas Kling  <kling@webkit.org>
757
758         JSC/HTMLCollection: Optimize canGetItemsForName().
759         <http://webkit.org/b/74806>
760
761         Reviewed by Sam Weinig.
762
763         Add HTMLCollection::hasNamedItem(name) and use that in the JSC bindings'
764         canGetItemsForName() instead of fetching the list of named items just to
765         check if it's empty or not.
766
767         * bindings/js/JSHTMLAllCollectionCustom.cpp:
768         (WebCore::JSHTMLAllCollection::canGetItemsForName):
769         * bindings/js/JSHTMLCollectionCustom.cpp:
770         (WebCore::JSHTMLCollection::canGetItemsForName):
771         * html/HTMLCollection.cpp:
772         (WebCore::HTMLCollection::hasNamedItem):
773         * html/HTMLCollection.h:
774
775 2011-12-18  Sam Weinig  <sam@webkit.org>
776
777         Spruce up PlatformWheelEvent a bit
778         https://bugs.webkit.org/show_bug.cgi?id=74821
779
780         Reviewed by Dan Bernstein.
781
782         * dom/WheelEvent.cpp:
783         (WebCore::WheelEventDispatchMediator::WheelEventDispatchMediator):
784         * platform/PlatformWheelEvent.h:
785         (WebCore::PlatformWheelEvent::directionInvertedFromDevice):
786         Remove x/y getters in favor of direct access to the IntPoints, and rename 
787         webkitDirectionInvertedFromDevice() to directionInvertedFromDevice() since
788         it is not an exposed API.
789
790 2011-12-18  Anders Carlsson  <andersca@apple.com>
791
792         Scroll the main frame on the scrolling thread
793         https://bugs.webkit.org/show_bug.cgi?id=74820
794
795         Reviewed by Andreas Kling.
796
797         * page/ScrollingCoordinator.cpp:
798         (WebCore::ScrollingCoordinator::handleWheelEvent):
799         Compute a scroll offset from the wheel event and tell the scrolling thread to scroll by the given offset.
800
801         * page/ScrollingCoordinator.h:
802         * page/mac/ScrollingCoordinatorMac.mm:
803         (WebCore::ScrollingCoordinator::scrollByOnScrollingThread):
804         Clamp the updated position to the minimum and maximum scrollable position.
805
806         (WebCore::ScrollingCoordinator::updateMainFrameScrollLayerPositionOnScrollingThread):
807         Actually reposition the layer.
808
809 2011-12-18  Andreas Kling  <kling@webkit.org>
810
811         HTMLAllCollection: Get rid of stateful namedItem traversal.
812         <http://webkit.org/b/74803>
813
814         Reviewed by Sam Weinig.
815
816         Add a namedItemWithIndex() function to HTMLAllCollection to cover the
817         document.all(name, index) use-case. This moves the collection traversal
818         into WebCore and allows us to remove some complexity.
819
820         This incidentally fixes a bug where the CollectionCache would point to
821         the last node returned by document.all(name, index) without the correct
822         associated node index (because info()->current was getting set without
823         updating info()->position.) Added a layout test for that.
824
825         Test: fast/dom/htmlallcollection-call-with-index-caching-bug.html
826
827         * bindings/js/JSHTMLAllCollectionCustom.cpp:
828         (WebCore::callHTMLAllCollection):
829         * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp:
830         (WebCore::V8HTMLAllCollection::callAsFunctionCallback):
831
832             Replace collection traversal by calls to namedItemWithIndex().
833
834         * html/HTMLCollection.h:
835
836             Promoted updateNameCache() to protected (for HTMLAllCollection.)
837             Demoted checkForNameMatch() to private.
838
839         * html/HTMLAllCollection.cpp:
840         (WebCore::HTMLAllCollection::namedItemWithIndex):
841
842             Added for document.all(name, index). Uses the name/id cache.
843
844         * html/HTMLAllCollection.cpp:
845         * html/HTMLAllCollection.h:
846         (WebCore::HTMLAllCollection::HTMLAllCollection):
847
848             Removed m_idsDone, HTMLAllCollection is now stateless.
849
850
851 2011-12-18  Anders Carlsson  <andersca@apple.com>
852
853         The scrolling coordinator should know about the main frame scroll layer
854         https://bugs.webkit.org/show_bug.cgi?id=74817
855
856         Reviewed by Andreas Kling.
857
858         * page/ScrollingCoordinator.h:
859         * page/mac/ScrollingCoordinatorMac.mm:
860         (WebCore::ScrollingThread::threadCallback):
861         Move the * to where it belongs.
862
863         (WebCore::ScrollingCoordinator::setFrameScrollLayer):
864         Keep track of the underlying CALayer of the frame scroll layer.
865
866         * rendering/RenderLayerCompositor.cpp:
867         (WebCore::RenderLayerCompositor::ensureRootLayer):
868         Call ScrollingCoordinator::setFrameScrollLayer.
869
870 2011-12-18  Andreas Kling  <kling@webkit.org>
871
872         Interacting with GMail message lists is sluggish.
873         <http://webkit.org/b/74813>
874
875         Reviewed by Dan Bernstein.
876
877         Add an argument to collapsed*Border() to control whether the border
878         color is computed or not. This allows us to avoid expensive work when
879         we're only interested in the metrics.
880
881         RenderStyle::visitedDependentColor() was very hot (4.5%) when hit-testing
882         on GMail and this removes its usage altogether.
883         This should be an improvement for table rendering as well, since it was
884         all happening below RenderBox::overflowClipRect().
885
886         * rendering/RenderTableCell.h:
887         * rendering/RenderTableCell.cpp:
888         (WebCore::RenderTableCell::collapsedLeftBorder):
889         (WebCore::RenderTableCell::collapsedRightBorder):
890         (WebCore::RenderTableCell::collapsedTopBorder):
891         (WebCore::RenderTableCell::collapsedBottomBorder):
892
893             Add and propagate an IncludeBorderColorOrNot argument that decides
894             whether we compute the CollapsedBorderValue's color.
895
896         (WebCore::RenderTableCell::collapsedStartBorder):
897         (WebCore::RenderTableCell::collapsedEndBorder):
898
899             Renamed start & end to startColorProperty & endColorProperty
900             for clarity. Also same modifications as the above functions.
901
902         (WebCore::RenderTableCell::collapsedBeforeBorder):
903         (WebCore::RenderTableCell::collapsedAfterBorder):
904
905             Renamed before & after to beforeColorProperty & afterColorProperty
906             for clarity. Also same modifications as the above functions.
907
908         (WebCore::RenderTableCell::borderHalfStart):
909         (WebCore::RenderTableCell::borderHalfEnd):
910         (WebCore::RenderTableCell::borderHalfBefore):
911         (WebCore::RenderTableCell::borderHalfAfter):
912
913             Pass DoNotIncludeBorderColor to collapsed*Border() since we only care
914             about the metrics here.
915
916 2011-12-18  Anders Carlsson  <andersca@apple.com>
917
918         The scrolling coordinator should keep track of the main frame geometry
919         https://bugs.webkit.org/show_bug.cgi?id=74816
920
921         Reviewed by Andreas Kling.
922
923         * page/ScrollingCoordinator.cpp:
924         (WebCore::ScrollingCoordinator::syncFrameGeometry):
925         Update the frame geometry accordingly when it changes.
926
927         * page/ScrollingCoordinator.h:
928         * rendering/RenderLayerCompositor.cpp:
929         (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
930         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
931         Call ScrollingCoordinator::syncFrameGeometry.
932
933         (WebCore::RenderLayerCompositor::scrollingCoordinator):
934         Add new getter.
935
936 2011-12-17  Sam Weinig  <sam@webkit.org>
937
938         Move timestamp down from PlatformEvent subclasses to the base class
939         https://bugs.webkit.org/show_bug.cgi?id=74805
940
941         Reviewed by Anders Carlsson.
942
943         * platform/PlatformEvent.h:
944         (WebCore::PlatformEvent::type):
945         (WebCore::PlatformEvent::timestamp):
946         (WebCore::PlatformEvent::PlatformEvent):
947         * platform/PlatformGestureEvent.h:
948         (WebCore::PlatformGestureEvent::PlatformGestureEvent):
949         * platform/PlatformMouseEvent.h:
950         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
951         (WebCore::PlatformMouseEvent::clickCount):
952         * platform/PlatformTouchEvent.h:
953         (WebCore::PlatformTouchEvent::PlatformTouchEvent):
954         * platform/PlatformWheelEvent.h:
955         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
956         * platform/efl/PlatformKeyboardEventEfl.cpp:
957         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
958         * platform/efl/PlatformMouseEventEfl.cpp:
959         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
960         * platform/efl/PlatformTouchEventEfl.cpp:
961         (WebCore::PlatformTouchEvent::PlatformTouchEvent):
962         * platform/efl/PlatformWheelEventEfl.cpp:
963         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
964         * platform/gtk/PlatformKeyboardEventGtk.cpp:
965         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
966         * platform/gtk/PlatformWheelEventGtk.cpp:
967         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
968         * platform/mac/KeyEventMac.mm:
969         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
970         * platform/mac/PlatformMouseEventMac.mm:
971         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
972         * platform/mac/WheelEventMac.mm:
973         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
974         * platform/qt/PlatformKeyboardEventQt.cpp:
975         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
976         * platform/qt/WheelEventQt.cpp:
977         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
978         * platform/win/KeyEventWin.cpp:
979         (WebCore::singleCharacterString):
980         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
981         * platform/win/PlatformMouseEventWin.cpp:
982         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
983         * platform/win/WheelEventWin.cpp:
984         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
985         * platform/wx/KeyboardEventWx.cpp:
986         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
987         * platform/wx/MouseEventWx.cpp:
988         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
989         * platform/wx/MouseWheelEventWx.cpp:
990         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
991
992 2011-12-18  Anders Carlsson  <andersca@apple.com>
993
994         Add a scrolling thread to the scrolling coordinator
995         https://bugs.webkit.org/show_bug.cgi?id=74814
996
997         Reviewed by Andreas Kling.
998
999         * WebCore.exp.in:
1000         Export ScrollingCoordinator::handleWheelEvent.
1001
1002         * WebCore.xcodeproj/project.pbxproj:
1003         Add ScrollingCoordinatorMac.mm
1004
1005         * page/ScrollingCoordinator.cpp:
1006         (WebCore::ScrollingCoordinator::handleWheelEvent):
1007         Add a stub function.
1008
1009         * page/ScrollingCoordinator.h:
1010         * page/mac/ScrollingCoordinatorMac.mm: Added.
1011         Add a ScrollingThread object which creates a thread and attaches a run loop source
1012         to it, allowing for functions to be dispatched and run on said thread.
1013
1014         (WebCore::ScrollingCoordinator::isScrollingThread):
1015         Call ScrollingThread::isCurrentThread.
1016
1017         (WebCore::ScrollingCoordinator::dispatchOnScrollingThread):
1018         Call ScrollingThread::dispatch.
1019
1020 2011-12-18  Anders Carlsson  <andersca@apple.com>
1021
1022         EventDispatcher should keep track of all scrolling coordinators
1023         https://bugs.webkit.org/show_bug.cgi?id=74810
1024
1025         Reviewed by Andreas Kling.
1026
1027         Export symbols needed by WebKit2.
1028
1029         * WebCore.exp.in:
1030
1031 2011-12-18  Raul Hudea  <rhudea@adobe.com>
1032
1033         Add transform function completion to web-inspector
1034
1035         Web Inspector: Auto-complete transform functions for -webkit-transform
1036         https://bugs.webkit.org/show_bug.cgi?id=74730
1037
1038         Reviewed by Pavel Feldman.
1039
1040         No new test. Trivial change.
1041
1042         * inspector/front-end/CSSKeywordCompletions.js:
1043
1044 2011-12-18  Ilya Tikhonovsky  <loislo@chromium.org>
1045
1046         Web Inspector: chromium profiler: change default root type for retaining paths from GC Roots to DOMWindow.
1047         https://bugs.webkit.org/show_bug.cgi?id=74697
1048
1049         Reviewed by Pavel Feldman.
1050
1051         * inspector/front-end/DetailedHeapshotView.js:
1052         (WebInspector.DetailedHeapshotView.prototype.get isTracingToWindowObjects):
1053
1054 2011-12-18  Peter Rybin  <peter.rybin@gmail.com>
1055
1056         Web Inspector: Switch to type-safe JSON ConsoleMessage.cpp, InspectorDOMAgent.cpp, InspectorDebuggerAgent.cpp, ScriptCallFrame.cpp
1057         https://bugs.webkit.org/show_bug.cgi?id=74549
1058
1059         Reviewed by Pavel Feldman.
1060
1061         Work with InspectorObject is replaced with type-safe generated API
1062         usage.
1063         Inspector.json and Inspector-0.1.json are also changed to better
1064         reflect data types that are actually being transmitted.
1065
1066         * inspector/ConsoleMessage.cpp:
1067         (WebCore::ConsoleMessage::addToFrontend):
1068         * inspector/Inspector-0.1.json:
1069         * inspector/Inspector.json:
1070         * inspector/InspectorDOMAgent.cpp:
1071         (WebCore::InspectorDOMAgent::buildObjectForNode):
1072         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
1073         * inspector/InspectorDebuggerAgent.cpp:
1074         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
1075         * inspector/ScriptCallFrame.cpp:
1076         (WebCore::ScriptCallFrame::buildInspectorObject):
1077
1078 2011-12-18  Peter Rybin  <peter.rybin@gmail.com>
1079
1080         Web Inspector: CodeGeneratorInspector.py: use generated types in method parameters
1081         https://bugs.webkit.org/show_bug.cgi?id=74661
1082
1083         Reviewed by Pavel Feldman.
1084
1085         Type binding object is added to raw_type object.
1086
1087         * inspector/CodeGeneratorInspector.py:
1088         (TypeBindings.create_for_named_type_declaration.EnumBinding.generate_type_builder):
1089         (TypeBindings.create_for_named_type_declaration.EnumBinding.get_in_c_type_text):
1090         (TypeBindings.create_for_named_type_declaration.EnumBinding):
1091         (TypeBindings.create_for_named_type_declaration.EnumBinding.reduce_to_raw_type):
1092         (TypeBindings.create_for_named_type_declaration.PlainString.generate_type_builder):
1093         (TypeBindings.create_for_named_type_declaration.PlainString.reduce_to_raw_type):
1094         (TypeBindings.create_for_named_type_declaration.PlainString):
1095         (TypeBindings.create_for_named_type_declaration.PlainString.get_in_c_type_text):
1096         (TypeBindings):
1097         (TypeBindings.create_for_named_type_declaration.ClassBinding):
1098         (get_in_c_type_text):
1099         (reduce_to_raw_type):
1100         (PlainObjectBinding.generate_type_builder):
1101         (PlainObjectBinding.get_in_c_type_text):
1102         (PlainObjectBinding):
1103         (PlainObjectBinding.reduce_to_raw_type):
1104         (RawTypesBinding.generate_type_builder):
1105         (RawTypesBinding.get_in_c_type_text):
1106         (RawTypesBinding):
1107         (RawTypesBinding.reduce_to_raw_type):
1108         (resolve_param_type.RawTypeBinding.reduce_to_raw_type):
1109         (resolve_param_type.RawTypeBinding):
1110         (resolve_param_type.RawTypeBinding.get_in_c_type_text):
1111         (resolve_param_type):
1112         (Generator.process_event):
1113
1114 2011-12-18  Sheriff Bot  <webkit.review.bot@gmail.com>
1115
1116         Unreviewed, rolling out r103169.
1117         http://trac.webkit.org/changeset/103169
1118         https://bugs.webkit.org/show_bug.cgi?id=74809
1119
1120         it broke compilation on many platforms (Requested by loislo_
1121         on #webkit).
1122
1123         * WebCore.gypi:
1124         * platform/ColorChooser.cpp: Renamed from Source/WebKit/chromium/src/ColorChooserProxy.h.
1125         (WebCore::ColorChooserClient::~ColorChooserClient):
1126         (WebCore::ColorChooserClient::newColorChooser):
1127         (WebCore::ColorChooserClient::discardChooser):
1128         (WebCore::ColorChooser::ColorChooser):
1129         (WebCore::ColorChooser::create):
1130         (WebCore::ColorChooser::~ColorChooser):
1131         (WebCore::ColorChooser::didChooseColor):
1132         (WebCore::ColorChooser::didCleanup):
1133
1134 2011-12-18  Alexandru Chiculita  <achicu@adobe.com>
1135
1136         [CSS Shaders] Add FECustomFilter that renders custom filters
1137         https://bugs.webkit.org/show_bug.cgi?id=73317
1138
1139         Using a GraphicsContext3D to render the shaders in GPU, read the
1140         result back and use it in the software filters pipeline.
1141
1142         Reviewed by Chris Marrin.
1143
1144         Test: css3/filters/effect-custom.html
1145
1146         * CMakeLists.txt:
1147         * GNUmakefile.list.am:
1148         * Target.pri:
1149         * WebCore.gypi:
1150         * WebCore.vcproj/WebCore.vcproj:
1151         * WebCore.xcodeproj/project.pbxproj:
1152         * loader/cache/CachedShader.cpp:
1153         (WebCore::CachedShader::CachedShader):
1154         (WebCore::CachedShader::shaderString):
1155         (WebCore::CachedShader::data):
1156         * loader/cache/CachedShader.h:
1157         * platform/graphics/filters/CustomFilterMesh.cpp: Added.
1158         (WebCore::MeshGenerator::MeshGenerator):
1159         (WebCore::MeshGenerator::vertices):
1160         (WebCore::MeshGenerator::indices):
1161         (WebCore::MeshGenerator::points):
1162         (WebCore::MeshGenerator::pointsCount):
1163         (WebCore::MeshGenerator::tiles):
1164         (WebCore::MeshGenerator::tilesCount):
1165         (WebCore::MeshGenerator::indicesCount):
1166         (WebCore::MeshGenerator::floatsPerVertex):
1167         (WebCore::MeshGenerator::vertexCount):
1168         (WebCore::MeshGenerator::addTile):
1169         (WebCore::MeshGenerator::addAttachedMeshIndex):
1170         (WebCore::MeshGenerator::generateAttachedMesh):
1171         (WebCore::MeshGenerator::addDetachedMeshVertexAndIndex):
1172         (WebCore::MeshGenerator::generateDetachedMesh):
1173         (WebCore::MeshGenerator::addPositionAttribute):
1174         (WebCore::MeshGenerator::addTexCoordAttribute):
1175         (WebCore::MeshGenerator::addMeshCoordAttribute):
1176         (WebCore::MeshGenerator::addTriangleCoordAttribute):
1177         (WebCore::MeshGenerator::addAttachedMeshVertexAttributes):
1178         (WebCore::MeshGenerator::addDetachedMeshVertexAttributes):
1179         (WebCore::MeshGenerator::dumpBuffers):
1180         (WebCore::CustomFilterMesh::CustomFilterMesh):
1181         (WebCore::CustomFilterMesh::~CustomFilterMesh):
1182         * platform/graphics/filters/CustomFilterMesh.h: Added.
1183         (WebCore::CustomFilterMesh::create):
1184         (WebCore::CustomFilterMesh::verticesBufferObject):
1185         (WebCore::CustomFilterMesh::bytesPerVertex):
1186         (WebCore::CustomFilterMesh::elementsBufferObject):
1187         (WebCore::CustomFilterMesh::indicesCount):
1188         (WebCore::CustomFilterMesh::meshBox):
1189         (WebCore::CustomFilterMesh::meshType):
1190         * platform/graphics/filters/CustomFilterShader.cpp: Added.
1191         (WebCore::CustomFilterShader::defaultVertexShaderString):
1192         (WebCore::CustomFilterShader::defaultFragmentShaderString):
1193         (WebCore::CustomFilterShader::CustomFilterShader):
1194         (WebCore::CustomFilterShader::~CustomFilterShader):
1195         * platform/graphics/filters/CustomFilterShader.h: Added.
1196         * platform/graphics/filters/FECustomFilter.cpp: Added.
1197         (WebCore::orthoMatrix):
1198         (WebCore::FECustomFilter::FECustomFilter):
1199         (WebCore::FECustomFilter::create):
1200         (WebCore::FECustomFilter::platformApplySoftware):
1201         (WebCore::FECustomFilter::dump):
1202         (WebCore::FECustomFilter::externalRepresentation):
1203         * platform/graphics/filters/FECustomFilter.h: Added.
1204         * platform/graphics/gpu/Texture.cpp:
1205         * platform/graphics/transforms/TransformationMatrix.cpp:
1206         (WebCore::TransformationMatrix::toColumnMajorFloatArray):
1207         * platform/graphics/transforms/TransformationMatrix.h:
1208         * rendering/FilterEffectObserver.h: Copied from Source/WebCore/loader/cache/CachedShader.cpp.
1209         (WebCore::FilterEffectObserver::~FilterEffectObserver):
1210         * rendering/FilterEffectRenderer.cpp:
1211         (WebCore::isWebGLEnabled):
1212         (WebCore::FilterEffectRenderer::FilterEffectRenderer):
1213         (WebCore::FilterEffectRenderer::build):
1214         (WebCore::FilterEffectRenderer::notifyFinished):
1215         * rendering/FilterEffectRenderer.h:
1216         (WebCore::FilterEffectRenderer::create):
1217         * rendering/RenderLayer.cpp:
1218         (WebCore::RenderLayer::updateOrRemoveFilterEffect):
1219         (WebCore::RenderLayer::filterNeedsRepaint):
1220         * rendering/RenderLayer.h:
1221         * rendering/style/StyleCachedShader.h:
1222         (WebCore::StyleCachedShader::cachedShader):
1223         * rendering/style/StyleShader.h:
1224         (WebCore::StyleShader::cachedShader):
1225
1226 2011-12-18  Keishi Hattori  <keishi@webkit.org>
1227
1228         Implement <input type=color> UI WebKit chromium part
1229         https://bugs.webkit.org/show_bug.cgi?id=65897
1230
1231         Reviewed by Darin Fisher.
1232
1233         * WebCore.gypi: Added ColorChooser.h and ColorChooserClient.h
1234
1235 2011-12-17  Keishi Hattori  <keishi@webkit.org>
1236
1237         Refactor input type color WebCore part
1238         https://bugs.webkit.org/show_bug.cgi?id=74591
1239
1240         Reviewed by Kent Tamura.
1241
1242         Changing ColorChooser to address issues raised in Bug 65897.
1243         Chrome::createColorChooser will return a WebCore::ColorChooser instance
1244         so the WebCore side (ColorInputType) and call the WebKit side. We pass the ColorChooserClient as an argument
1245         to Chrome::createColorChooser so the WebKit side can call callbacks, didEndChooser and didChooseColor.
1246
1247         * html/ColorInputType.cpp:
1248         (WebCore::ColorInputType::~ColorInputType):
1249         (WebCore::ColorInputType::setValue):
1250         (WebCore::ColorInputType::handleDOMActivateEvent): Calls createColorChooser to open the color chooser.
1251         (WebCore::ColorInputType::detach):
1252         (WebCore::ColorInputType::didEndChooser): Release the ColorChooser object.
1253         (WebCore::ColorInputType::endColorChooser):
1254         (WebCore::ColorInputType::updateColorSwatch): Added argument so it will compile again.
1255         * html/ColorInputType.h:
1256         * html/HTMLInputElement.cpp:
1257         (WebCore::HTMLInputElement::selectColorInColorChooser):
1258         * loader/EmptyClients.h:
1259         (WebCore::EmptyChromeClient::createColorChooser):
1260         * loader/FrameLoader.cpp:
1261         * page/Chrome.cpp:
1262         (WebCore::Chrome::createColorChooser): Opens the color chooser. Returns a ColorChooser PassOwnPtr.
1263         * page/Chrome.h:
1264         * page/ChromeClient.h:
1265         * platform/ColorChooser.h:
1266         (WebCore::ColorChooser::~ColorChooser):
1267         (WebCore::ColorChooser::setSelectedColor):
1268         (WebCore::ColorChooser::endChooser):
1269         * platform/ColorChooserClient.h: Added.
1270
1271 2011-12-17  Sam Weinig  <sam@webkit.org>
1272
1273         Make PlatformTouchEvent inherit from PlatformEvent
1274         https://bugs.webkit.org/show_bug.cgi?id=74777
1275
1276         Reviewed by Andreas Kling.
1277
1278         * platform/PlatformEvent.h:
1279         Add TouchEvent types.
1280
1281         * platform/PlatformTouchEvent.h:
1282         (WebCore::PlatformTouchEvent::PlatformTouchEvent):
1283         Make inherit from PlatformEvent.
1284
1285         * platform/blackberry/PlatformTouchEventBlackBerry.cpp:
1286         (WebCore::touchEventType):
1287         (WebCore::PlatformTouchEvent::PlatformTouchEvent):
1288         * platform/efl/PlatformTouchEventEfl.cpp:
1289         (WebCore::PlatformTouchEvent::PlatformTouchEvent):
1290         * platform/qt/PlatformTouchEventQt.cpp:
1291         (WebCore::PlatformTouchEvent::PlatformTouchEvent):
1292         Make necessary changes to work with new base class.
1293
1294 2011-12-17  Andreas Kling  <kling@webkit.org>
1295
1296         Cache and reuse the HTMLAllCollection returned by document.all.
1297         <http://webkit.org/b/74768>
1298
1299         Reviewed by Antti Koivisto.
1300
1301         Let Document cache the document.all collection, just like we do for
1302         the other collections (.links, .images, etc.)
1303         This is primarily a memory optimization, as repeated calls to
1304         document.all will no longer cause collection objects to stack up.
1305
1306         Tests: fast/dom/document-collection-idempotence.html
1307                fast/dom/gc-9.html
1308
1309         * dom/Document.h:
1310         * dom/Document.cpp:
1311         (WebCore::Document::all):
1312
1313             Cache the HTMLAllCollection and reuse it across calls instead of
1314             creating a new one each time.
1315
1316         * html/HTMLAllCollection.h:
1317         * html/HTMLAllCollection.cpp:
1318         (WebCore::HTMLAllCollection::create):
1319         (WebCore::HTMLAllCollection::HTMLAllCollection):
1320
1321             Make the HTMLAllCollection constructor take a Document* to enforce
1322             the fact that it's the only way it should ever be created.
1323
1324         * html/HTMLAllCollection.idl:
1325         * bindings/scripts/CodeGeneratorJS.pm:
1326         (GenerateImplementation):
1327
1328             Custom reachability code for JSC, same as HTMLCollection.
1329
1330 2011-12-17  Andreas Kling  <kling@webkit.org>
1331
1332         HTMLCollection: Simplify itemAfter().
1333         <http://webkit.org/b/74795>
1334
1335         Reviewed by Antti Koivisto.
1336
1337         Whether to do deep traversal of children depends on m_type which
1338         doesn't change after construction, so move that decision there
1339         by caching it in a "m_includeChildren" bit.
1340
1341         Also factored out the big switch statement in itemAfter() into
1342         an isAcceptableElement() function.
1343
1344         Last and least, use fastHasAttribute() to check for itempropAttr
1345         since it's not SVG animatable.
1346
1347         * html/HTMLCollection.cpp:
1348         (WebCore::HTMLCollection::HTMLCollection):
1349         (WebCore::HTMLCollection::shouldIncludeChildren):
1350         (WebCore::HTMLCollection::isAcceptableElement):
1351         (WebCore::HTMLCollection::itemAfter):
1352         * html/HTMLCollection.h:
1353
1354 2011-12-17  Andreas Kling  <kling@webkit.org>
1355
1356         TagNodeList: Optimize nodeMatches() for the common case.
1357         <http://webkit.org/b/74796>
1358
1359         Reviewed by Antti Koivisto.
1360
1361         Reject based on tag name mismatch before comparing the namespaces,
1362         as this case is vastly more common.
1363
1364         nodeMatches() is very hot on the DOM Query (Dojo) test on Dromaeo.
1365         This change takes it from 8.3% to 7.7% on my MBP.
1366
1367         * dom/TagNodeList.cpp:
1368         (WebCore::TagNodeList::nodeMatches):
1369
1370 2011-12-17  Andreas Kling  <kling@webkit.org>
1371
1372         NameNodeList: Use fastGetAttribute() in nodeMatches().
1373         <http://webkit.org/b/74797>
1374
1375         Reviewed by Darin Adler.
1376
1377         It's safe and slightly more efficient to use fastGetAttribute()
1378         for HTMLNames::nameAttr here.
1379
1380         * dom/NameNodeList.cpp:
1381         (WebCore::NameNodeList::nodeMatches):
1382
1383 2011-12-17  Andreas Kling  <kling@webkit.org>
1384
1385         CSSPrimitiveValue: Inline getIdent().
1386         <http://webkit.org/b/74793>
1387
1388         Reviewed by Antti Koivisto.
1389
1390         Inline the trivial getIdent(), the same as its getFoo() siblings.
1391
1392         * css/CSSPrimitiveValue.cpp:
1393         * css/CSSPrimitiveValue.h:
1394         (WebCore::CSSPrimitiveValue::getIdent):
1395
1396 2011-12-17  Andreas Kling  <kling@webkit.org>
1397
1398         CSSStyleSelector: Clean up matchRules().
1399         <http://webkit.org/b/74794>
1400
1401         Reviewed by Antti Koivisto.
1402
1403         - Early return from the isCollectingRulesOnly() path to reduce nesting.
1404         - Move the creation of m_ruleList out of the loop that builds the list.
1405         - Removed some comments from the Captain Obvious department.
1406
1407         * css/CSSStyleSelector.cpp:
1408         (WebCore::CSSStyleSelector::matchRules):
1409
1410 2011-12-17  Andreas Kling  <kling@webkit.org>
1411
1412         RuleSet: Remove style sheet null-check in addRulesFromSheet().
1413         <http://webkit.org/b/74792>
1414
1415         Reviewed by Antti Koivisto.
1416
1417         Replace the "sheet" null-check in addRulesFromSheet() by an assertion.
1418         The only call-site where it could be null was when adding rules from
1419         an @import'ed sheet, so add a check there instead.
1420
1421         * css/CSSStyleSelector.cpp:
1422         (WebCore::RuleSet::addRulesFromSheet):
1423
1424 2011-12-17  Andreas Kling  <kling@webkit.org>
1425
1426         CSSStyleSelector: Clean up getColorFromPrimitiveValue().
1427         <http://webkit.org/b/74789>
1428
1429         Reviewed by Antti Koivisto.
1430
1431         Rename getColorFromPrimitiveValue() to colorFromPrimitiveValue() and rework
1432         it to be a bit more readable.
1433
1434         * css/CSSGradientValue.cpp:
1435         (WebCore::CSSGradientValue::addStops):
1436         * css/CSSStyleApplyProperty.cpp:
1437         (WebCore::ApplyPropertyColor::applyValue):
1438         * css/CSSStyleSelector.cpp:
1439         (WebCore::CSSStyleSelector::applyProperty):
1440         (WebCore::CSSStyleSelector::colorFromPrimitiveValue):
1441         (WebCore::CSSStyleSelector::createFilterOperations):
1442         * css/CSSStyleSelector.h:
1443         * css/SVGCSSStyleSelector.cpp:
1444         (WebCore::CSSStyleSelector::applySVGProperty):
1445
1446 2011-12-17  Kenichi Ishibashi  <bashi@chromium.org>
1447
1448         Text dispappear when SVG font has no latin character
1449         https://bugs.webkit.org/show_bug.cgi?id=71765
1450
1451         Reviewed by Nikolas Zimmermann.
1452
1453         Initialize SVG font metrics even if the font doesn't contain latin characters.
1454
1455         Test: svg/custom/svg-fonts-no-latin-glyph.html
1456
1457         * svg/SVGFontData.cpp:
1458         (WebCore::SVGFontData::initializeFontData): Initializes metrics even if the zeroGlyphPage doesn't exist.
1459
1460 2011-12-17  David Barton  <dbarton@mathscribe.com>
1461
1462         Radical sign drawn incorrectly due to refactoring typo
1463         https://bugs.webkit.org/show_bug.cgi?id=74780
1464
1465         Reviewed by Dan Bernstein.
1466
1467         LayoutTests/mathml/presentation/roots.xhtml shows the bug, but apparently its .png
1468         checksum is ok so run-webkit-tests can't detect the problem.
1469
1470         * rendering/mathml/RenderMathMLRoot.cpp:
1471         (WebCore::RenderMathMLRoot::paint):
1472         In revision 88250, one paintOffset should have been adjustedPaintOffset.
1473
1474 2011-12-17  Adrienne Walker  <enne@google.com>
1475
1476         [chromium] Reverting r103011, r103135 due to Aura test failures
1477
1478         Unreviewed gardening.
1479
1480         * platform/graphics/chromium/ContentLayerChromium.cpp:
1481         (WebCore::ContentLayerChromium::~ContentLayerChromium):
1482         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1483         (WebCore::GraphicsLayerChromium::notifySyncRequired):
1484         * platform/graphics/chromium/GraphicsLayerChromium.h:
1485         * platform/graphics/chromium/ImageLayerChromium.cpp:
1486         (WebCore::ImageLayerChromium::paintContentsIfDirty):
1487         * platform/graphics/chromium/LayerChromium.cpp:
1488         (WebCore::LayerChromium::setLayerTreeHost):
1489         (WebCore::LayerChromium::setNeedsCommit):
1490         (WebCore::LayerChromium::setParent):
1491         (WebCore::LayerChromium::setMaskLayer):
1492         * platform/graphics/chromium/LayerChromium.h:
1493         (WebCore::LayerChromium::setReplicaLayer):
1494         * platform/graphics/chromium/TiledLayerChromium.cpp:
1495         (WebCore::TiledLayerChromium::setLayerTreeHost):
1496         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1497         (WebCore::CCLayerTreeHost::~CCLayerTreeHost):
1498         (WebCore::CCLayerTreeHost::didRecreateGraphicsContext):
1499         (WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface):
1500         (WebCore::CCLayerTreeHost::paintLayerContents):
1501         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1502         (WebCore::CCLayerTreeHost::setRootLayer):
1503
1504 2011-12-16  Chris Marrin  <cmarrin@apple.com>
1505
1506         Hardware acceleration of W3C Filter Effects
1507         https://bugs.webkit.org/show_bug.cgi?id=68479
1508
1509         Reviewed by Simon Fraser.
1510
1511         Tests: css3/filters/effect-blur-hw.html
1512                css3/filters/effect-combined-hw.html
1513                css3/filters/effect-drop-shadow-hw.html
1514                css3/filters/effect-grayscale-hw.html
1515                css3/filters/effect-hue-rotate-hw.html
1516                css3/filters/effect-invert-hw.html
1517                css3/filters/effect-opacity-hw.html
1518                css3/filters/effect-saturate-hw.html
1519                css3/filters/effect-sepia-hw.html
1520
1521         Implement hardware acceleration of filters. If a filter is
1522         on a RenderLayer and that layer has a GraphicsLayer, a test
1523         is done to see if the desired filter can be rendered in hardware.
1524         If so, skip rendering it when painting, and add the filters to the
1525         CALayer. Currently Mac only, using CoreImage. Animation is done in
1526         software, with the filters being recreated every frame. There are
1527         some fidelity issues with the software renderer, but those will
1528         be dealt with as bugs to be fixed.
1529
1530         * platform/graphics/GraphicsLayer.h: Pass down FilterOperations
1531         (WebCore::GraphicsLayer::filter):
1532         (WebCore::GraphicsLayer::setFilter):
1533         * platform/graphics/ca/GraphicsLayerCA.cpp: Deferred passdown of FilterOperations to PlatformCALayer
1534         (WebCore::GraphicsLayerCA::setFilter):
1535         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
1536         (WebCore::GraphicsLayerCA::updateFilter):
1537         (WebCore::GraphicsLayerCA::ensureStructuralLayer):
1538         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
1539         * platform/graphics/ca/GraphicsLayerCA.h:
1540         * platform/graphics/ca/PlatformCALayer.h:
1541         * platform/graphics/ca/mac/PlatformCALayerMac.mm: Mac implementation using CI
1542         (PlatformCALayer::setFilter):
1543         (PlatformCALayer::filterCanBeComposited): Static function to tell GraphicsLayer if this Filter object can be rendered
1544         * platform/graphics/filters/FilterOperations.cpp:
1545         (WebCore::FilterOperations::operator=):
1546         * platform/graphics/filters/FilterOperations.h:
1547         (WebCore::FilterOperations::FilterOperations):
1548         * rendering/RenderLayer.cpp: Pass filter object to GraphicsLayer
1549         (WebCore::RenderLayer::rendersFilter):
1550         (WebCore::RenderLayer::paintLayer):
1551         (WebCore::RenderLayer::updateOrRemoveFilterEffect):
1552         * rendering/RenderLayer.h:
1553         * rendering/RenderLayerBacking.cpp:
1554         (WebCore::RenderLayerBacking::RenderLayerBacking):
1555         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
1556         (WebCore::RenderLayerBacking::updateLayerFilter):
1557         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1558         * rendering/RenderLayerBacking.h:
1559         (WebCore::RenderLayerBacking::canCompositeFilter):
1560
1561 2011-12-17  Philippe Normand  <pnormand@igalia.com>
1562
1563         Unreviewed, GTK build fix after r103131.
1564
1565         * GNUmakefile.list.am: Fix typo... s/.cop/.cpp
1566
1567 2011-12-16  Benjamin Poulain  <bpoulain@apple.com>
1568
1569         FEComposite does not build when you disable filters on ARMv7
1570         https://bugs.webkit.org/show_bug.cgi?id=74772
1571
1572         Reviewed by David Kilzer.
1573
1574         Add the missing ENABLE(FILTERS).
1575
1576         * platform/graphics/filters/arm/FECompositeArithmeticNEON.cpp:
1577         * platform/graphics/filters/arm/FECompositeArithmeticNEON.h:
1578
1579 2011-12-16  Ryosuke Niwa  <rniwa@webkit.org>
1580
1581         Mac build fix after r103104.
1582
1583         * WebCore.xcodeproj/project.pbxproj:
1584
1585 2011-12-16  Adam Klein  <adamk@chromium.org>
1586
1587         Consolidate before-advice regarding attribute modification into a single method
1588         https://bugs.webkit.org/show_bug.cgi?id=74752
1589
1590         Reviewed by Ryosuke Niwa.
1591
1592         Adds a willModifyAttribute method to Element, meant to be called
1593         before an attribute on that Element is added/removed/changed.
1594
1595         Replace most calls to Element::updateId and all calls to
1596         Element::enqueueAttributesMutationRecordIfRequested with calls to
1597         willModifyAttribute. Moreover, enqueueAttributesMutation... can now
1598         be private since its only caller is willModifyAttribute.
1599
1600         The only remaining direct calls to updateId are in cases the entire
1601         NamedNodeMap is being replaced. These are implementation details of
1602         WebCore that shouldn't be exposed via MutationObservers.
1603
1604         No new tests, no expected change in behavior.
1605
1606         * dom/Attr.cpp:
1607         (WebCore::Attr::setValue):
1608         (WebCore::Attr::childrenChanged): Besides the above change, use a
1609         StringBuilder to build up value, and only do String -> AtomicString
1610         conversion once.
1611         * dom/Element.cpp:
1612         (WebCore::Element::setAttributeInternal):
1613         * dom/Element.h:
1614         (WebCore::Element::willModifyAttribute):
1615         * dom/NamedNodeMap.cpp:
1616         (WebCore::NamedNodeMap::setNamedItem):
1617         (WebCore::NamedNodeMap::removeNamedItem):
1618
1619 2011-12-16  James Robinson  <jamesr@chromium.org>
1620
1621         [chromium] CCLayerDelegate and WebLayerClient do not need notifySyncRequired
1622         https://bugs.webkit.org/show_bug.cgi?id=74376
1623
1624         Reviewed by Kenneth Russell.
1625
1626         CCLayerDelegate::notifySyncRequired is an odd bit of interface that we originally cargo-culted from the
1627         CoreAnimation compositor implementation. It is a mechanism by which a LayerChromium instance may request a new
1628         frame via its CCLayerDelegate, which in WebCore is always a GraphicsLayerClient. In practice, all
1629         implementations eventually ended up routing to CCLayerTreeHost::setNeedsCommit which then made the proper
1630         scheduling decision.
1631
1632         This patch routes all changes that would have gone through CCLayerDelegate::notifySyncRequired directly to
1633         CCLayerTreeHost::setNeedsCommit, which greatly simplifies the scheduling logic.
1634
1635         There is a large amount of unit test coverage for this change, largely in LayerChromiumTest
1636
1637         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1638         * platform/graphics/chromium/GraphicsLayerChromium.h:
1639         * platform/graphics/chromium/LayerChromium.cpp:
1640         (WebCore::LayerChromium::setNeedsCommit):
1641         (WebCore::LayerChromium::insertChild):
1642         * platform/graphics/chromium/LayerChromium.h:
1643         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1644         (WebCore::CCLayerTreeHost::~CCLayerTreeHost):
1645         (WebCore::CCLayerTreeHost::setRootLayer):
1646         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1647         * platform/graphics/chromium/cc/CCScopedThreadProxy.h:
1648         (WebCore::CCScopedThreadProxy::runTaskIfNotShutdown):
1649
1650 2011-12-16  Adam Klein  <adamk@chromium.org>
1651
1652         Fix typo in MarkupTokenBase: rename takeAtributes to takeAttributes
1653         https://bugs.webkit.org/show_bug.cgi?id=74766
1654
1655         Reviewed by Darin Adler.
1656
1657         * html/parser/HTMLConstructionSite.cpp:
1658         (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
1659         (WebCore::HTMLConstructionSite::insertScriptElement):
1660         (WebCore::HTMLConstructionSite::createElement):
1661         (WebCore::HTMLConstructionSite::createHTMLElement):
1662         * html/parser/HTMLTreeBuilder.cpp:
1663         (WebCore::HTMLTreeBuilder::attributesForIsindexInput):
1664         * xml/parser/MarkupTokenBase.h:
1665         (WebCore::AtomicMarkupTokenBase::takeAttributes):
1666
1667 2011-12-16  Adam Barth  <abarth@webkit.org>
1668
1669         <option><span><option> doesn't parse correctly
1670         https://bugs.webkit.org/show_bug.cgi?id=74760
1671
1672         Reviewed by Eric Seidel.
1673
1674         The <option> start tag shouldn't be quite as aggressive in closing open
1675         <option> tags.  I'm not sure whether this was a change in the spec or a
1676         mistranscription, but this patch causes us to match the spec.  I've
1677         checked the other optionTag checks, and they all seem to be correct.
1678
1679         * html/parser/HTMLTreeBuilder.cpp:
1680
1681 2011-12-16  Rafael Weinstein  <rafaelw@chromium.org>
1682
1683         [MutationObservers] Remove platform-dependent code in Document.cpp resulting from Mutation Event histogram collection
1684         https://bugs.webkit.org/show_bug.cgi?id=73026
1685
1686         Reviewed by Ryosuke Niwa.
1687
1688         This patch adds platform/HistogramSupport which has an empty implementation for all ports
1689         except Chromium.
1690
1691         No tests need. This patch is just a refactor.
1692
1693         * GNUmakefile.list.am:
1694         * Target.pri:
1695         * WebCore.gypi:
1696         * WebCore.xcodeproj/project.pbxproj:
1697         * dom/Document.cpp:
1698         (WebCore::histogramMutationEventUsage):
1699         (WebCore::Document::~Document):
1700         * platform/HistogramSupport.h: Added.
1701         (WebCore::HistogramSupport::histogramEnumeration):
1702         * platform/chromium/HistogramSupportChromium.cpp: Added.
1703         (WebCore::HistogramSupport::histogramEnumeration):
1704
1705 2011-12-16  Brady Eidson  <beidson@apple.com>
1706
1707         <rdar://problem/10576732> and https://bugs.webkit.org/show_bug.cgi?id=74533
1708         REGRESSION(r102619): Reproducible crash closing window with video + poster image inside an object element
1709
1710         Reviewed by Darin Adler.
1711
1712         Test: media/crash-closing-page-with-media-as-plugin-fallback.html
1713
1714         At some point documentWillBecomeInactive() was overloaded to not only notify elements they were going in to the page
1715         cache but also do some other work that was necessary during Document teardown.
1716
1717         This crash occurs because we're notifying elements they're going in to the page cache at document teardown, so this
1718         patch breaks that work back out in to a separate function.
1719
1720         * dom/Document.cpp:
1721         (WebCore::Document::detach): Remove obsolete comment.
1722         (WebCore::Document::documentWillBecomeInactive): Handle only accelerated compositing cleanup.
1723         (WebCore::Document::documentWillSuspendForPageCache): Call documentWillBecomeInactive before notifying elements of suspension.
1724         (WebCore::Document::documentDidResumeFromPageCache):
1725         (WebCore::Document::registerForPageCacheSuspensionCallbacks):
1726         (WebCore::Document::unregisterForPageCacheSuspensionCallbacks):
1727         * dom/Document.h:
1728
1729         * history/CachedFrame.cpp:
1730         (WebCore::CachedFrameBase::restore): Call the renamed documentDidResumeFromPageCache.
1731         (WebCore::CachedFrame::CachedFrame): Call documentWillSuspendForPageCache instead of documentDidBecomeInactive.
1732
1733         * loader/FrameLoader.cpp:
1734         (WebCore::FrameLoader::commitProvisionalLoad): Call the renamed documentDidResumeFromPageCache.
1735
1736         * dom/Element.h:
1737         (WebCore::Element::documentWillSuspendForPageCache): Renamed from documentWillBecomeInactive()
1738         (WebCore::Element::documentDidResumeFromPageCache): Renamed from documentDidBecomeActive()
1739
1740         Change to the renamed registration and callbacks functions in the handful of classes that use them:
1741         * html/HTMLFormElement.cpp:
1742         (WebCore::HTMLFormElement::~HTMLFormElement):
1743         (WebCore::HTMLFormElement::parseMappedAttribute):
1744         (WebCore::HTMLFormElement::documentDidResumeFromPageCache):
1745         (WebCore::HTMLFormElement::willMoveToNewOwnerDocument):
1746         (WebCore::HTMLFormElement::didMoveToNewOwnerDocument):
1747         * html/HTMLFormElement.h:
1748
1749         * html/HTMLInputElement.cpp:
1750         (WebCore::HTMLInputElement::~HTMLInputElement):
1751         (WebCore::HTMLInputElement::updateType):
1752         (WebCore::HTMLInputElement::parseMappedAttribute):
1753         (WebCore::HTMLInputElement::needsSuspensionCallback):
1754         (WebCore::HTMLInputElement::registerForSuspensionCallbackIfNeeded):
1755         (WebCore::HTMLInputElement::unregisterForSuspensionCallbackIfNeeded):
1756         (WebCore::HTMLInputElement::documentDidResumeFromPageCache):
1757         (WebCore::HTMLInputElement::willMoveToNewOwnerDocument):
1758         (WebCore::HTMLInputElement::didMoveToNewOwnerDocument):
1759         * html/HTMLInputElement.h:
1760
1761         * html/HTMLPlugInImageElement.cpp:
1762         (WebCore::HTMLPlugInImageElement::~HTMLPlugInImageElement):
1763         (WebCore::HTMLPlugInImageElement::createRenderer):
1764         (WebCore::HTMLPlugInImageElement::willMoveToNewOwnerDocument):
1765         (WebCore::HTMLPlugInImageElement::didMoveToNewOwnerDocument):
1766         (WebCore::HTMLPlugInImageElement::documentWillSuspendForPageCache):
1767         (WebCore::HTMLPlugInImageElement::documentDidResumeFromPageCache):
1768         * html/HTMLPlugInImageElement.h:
1769
1770         * svg/SVGSVGElement.cpp:
1771         (WebCore::SVGSVGElement::SVGSVGElement):
1772         (WebCore::SVGSVGElement::~SVGSVGElement):
1773         (WebCore::SVGSVGElement::willMoveToNewOwnerDocument):
1774         (WebCore::SVGSVGElement::didMoveToNewOwnerDocument):
1775         (WebCore::SVGSVGElement::documentWillSuspendForPageCache):
1776         (WebCore::SVGSVGElement::documentDidResumeFromPageCache):
1777         * svg/SVGSVGElement.h:
1778
1779 2011-12-16  Eric Penner  <epenner@google.com>
1780
1781         [chromium] Need to prepaint tiles in TiledLayerChromium
1782         https://bugs.webkit.org/show_bug.cgi?id=72686
1783
1784         Reviewed by James Robinson.
1785
1786         Tests: TiledLayerChromiumTest (idlePaintOutOfMemory, pushIdlePaintTiles)
1787
1788         * platform/graphics/chromium/ContentLayerChromium.cpp:
1789         (WebCore::ContentLayerChromium::idlePaintContentsIfDirty): added idle paint function
1790         * platform/graphics/chromium/ContentLayerChromium.h: ditto
1791         * platform/graphics/chromium/LayerChromium.h: ditto
1792         (WebCore::LayerChromium::idlePaintContentsIfDirty): ditto
1793         * platform/graphics/chromium/TextureManager.cpp:
1794         (WebCore::TextureManager::protectTexture): removed assert for protecting a texture twice
1795         * platform/graphics/chromium/TiledLayerChromium.cpp:
1796         (WebCore::TiledLayerChromium::TiledLayerChromium):
1797         (WebCore::TiledLayerChromium::cleanupResources):
1798         (WebCore::TiledLayerChromium::updateCompositorResources): refactoring to use tile indices
1799         (WebCore::TiledLayerChromium::prepareToUpdateTiles): refactored common code and made idle/visible versions
1800         (WebCore::TiledLayerChromium::prepareToUpdate): ditto
1801         (WebCore::TiledLayerChromium::prepareToUpdateIdle): ditto
1802         (WebCore::TiledLayerChromium::needsIdlePaint): 
1803         (WebCore::TiledLayerChromium::idlePaintRect):
1804         * platform/graphics/chromium/TiledLayerChromium.h:
1805         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1806         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
1807         (WebCore::CCLayerTreeHost::compositeAndReadback): set flag to avoid idle paint durring composite and readback
1808         (WebCore::CCLayerTreeHost::updateLayers): added idle flag parameter
1809         (WebCore::CCLayerTreeHost::paintContentsIfDirty): ditto
1810         (WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface): ditto
1811         (WebCore::CCLayerTreeHost::paintLayerContents): chooses idle or visible paint
1812         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1813
1814 2011-12-16  Dean Jackson  <dino@apple.com>
1815
1816         Miscellaneous Filter updates to align with spec
1817         https://bugs.webkit.org/show_bug.cgi?id=74736
1818
1819         Reviewed by Simon Fraser.
1820
1821         Combine a bunch of small updates to filters where
1822         we were not compliant with the specification.
1823
1824         - blur() only takes one value, not two
1825         - blur() does not accept percentages. This allowed us
1826           to stop passing the borderBoxSize around while building
1827           the filter chain or calculating visual overflow.
1828         - gamma() and sharpen() removed
1829         - brightness() and contrast() added
1830
1831         Tests: css3/filters/effect-brightness.html
1832                css3/filters/effect-contrast.html
1833
1834         * css/CSSComputedStyleDeclaration.cpp:
1835         (WebCore::CSSComputedStyleDeclaration::valueForFilter): Create new
1836         variations on component transfer functions for brightness() and
1837         contrast() effects. Also remove sharpen() and gamma().
1838         * css/CSSParser.cpp:
1839         (WebCore::filterInfoForName):
1840         (WebCore::CSSParser::parseBuiltinFilterArguments): Ditto, and blur
1841         only takes one argument.
1842         * css/CSSStyleSelector.cpp:
1843         (WebCore::filterOperationForType):
1844         (WebCore::CSSStyleSelector::createFilterOperations): Ditto, and
1845         use ->isPercentage() to test rather than getting the type.
1846         * css/WebKitCSSFilterValue.cpp:
1847         (WebCore::WebKitCSSFilterValue::customCssText):
1848         * css/WebKitCSSFilterValue.h:
1849         * css/WebKitCSSFilterValue.idl: Remove sharpen and gamma, add
1850         brightness and contrast.
1851         * platform/graphics/filters/FilterOperation.cpp:
1852         (WebCore::BlurFilterOperation::blend): Blurs only need to blend
1853         between one standard deviation parameter.
1854         * platform/graphics/filters/FilterOperation.h: Remove sharpen and
1855         gamma, add brightness and contrast.
1856         (WebCore::BlurFilterOperation::create):
1857         (WebCore::BlurFilterOperation::stdDeviation):
1858         (WebCore::BlurFilterOperation::operator==):
1859         (WebCore::BlurFilterOperation::BlurFilterOperation): Blur only takes
1860         one standard deviation / radius parameter.
1861         * platform/graphics/filters/FilterOperations.cpp:
1862         (WebCore::outsetSizeForBlur):
1863         (WebCore::FilterOperations::getOutsets): No need for borderBox now.
1864         * platform/graphics/filters/FilterOperations.h:
1865         * rendering/FilterEffectRenderer.cpp:
1866         (WebCore::FilterEffectRenderer::build): Build new effect types.
1867         * rendering/FilterEffectRenderer.h:
1868         * rendering/RenderBox.cpp:
1869         (WebCore::RenderBox::addVisualEffectOverflow): No need to pass
1870         borderBox size when calculating overflow on filter.
1871         * rendering/RenderLayer.cpp:
1872         (WebCore::RenderLayer::updateOrRemoveFilterEffect):
1873         * rendering/style/RenderStyle.h:
1874         (WebCore::InheritedFlags::getFilterOutsets): Ditto.
1875
1876 2011-12-16  Andreas Kling  <kling@webkit.org>
1877
1878         Unreviewed debug build fix after r103115.
1879
1880         * dom/Document.cpp:
1881         (WebCore::Document::cachedCollection):
1882
1883 2011-12-16  Mark Hahnenberg  <mhahnenberg@apple.com>
1884
1885         Windows test fix
1886
1887         No new tests.
1888
1889         Unreviewed test fix. All Windows tests were crashing when objects who were pointing to 
1890         static data members across DLL boundaries were getting garbage in their pointers.
1891
1892         * WebCore.exp.in:
1893         * bindings/js/JSDOMWrapper.cpp:
1894         * bindings/js/JSDOMWrapper.h:
1895
1896 2011-12-16  Ryosuke Niwa  <rniwa@webkit.org>
1897
1898         Rename registerCommandFor(Undo|Redo) to register(Undo|Redo)Step
1899         https://bugs.webkit.org/show_bug.cgi?id=74748
1900
1901         Reviewed by Eric Seidel.
1902
1903         Renamed registerCommandForUndo and registerCommandForRedo to
1904         registerUndoStep and registerRedoStep respectively.
1905
1906         * editing/Editor.cpp:
1907         (WebCore::Editor::appliedEditing):
1908         (WebCore::Editor::unappliedEditing):
1909         (WebCore::Editor::reappliedEditing):
1910         * loader/EmptyClients.h:
1911         (WebCore::EmptyEditorClient::registerUndoStep):
1912         (WebCore::EmptyEditorClient::registerRedoStep):
1913         * page/EditorClient.h:
1914
1915 2011-12-16  Tim Horton  <timothy_horton@apple.com>
1916
1917         Canvas should respect backing store scale ratio when used as drawImage() source
1918         https://bugs.webkit.org/show_bug.cgi?id=74758
1919         <rdar://problem/10350194>
1920
1921         Reviewed by Simon Fraser.
1922
1923         Interpret the source rectangle passed into drawImage() when using a Canvas source in the source Canvas coordinate space,
1924         instead of in the backing store coordinate space, without changing the behavior of drawImage(canvas, x, y).
1925
1926         No new tests.
1927
1928         * html/HTMLCanvasElement.cpp:
1929         (WebCore::HTMLCanvasElement::convertDeviceToLogical):
1930         * html/HTMLCanvasElement.h:
1931         * html/canvas/CanvasRenderingContext2D.cpp:
1932         (WebCore::CanvasRenderingContext2D::drawImage):
1933
1934 2011-12-16  Anders Carlsson  <andersca@apple.com>
1935
1936         Subpixel antialiasing not working in tiled mode
1937         https://bugs.webkit.org/show_bug.cgi?id=74759
1938
1939         Reviewed by Simon Fraser.
1940
1941         Call setContentsOpaque(true) on the main frame render view layer so subpixel aa will be used
1942         when drawing text into that layer.
1943
1944         * rendering/RenderLayerBacking.cpp:
1945         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
1946
1947 2011-12-16  Ryosuke Niwa  <rniwa@webkit.org>
1948
1949         invalidateNodeListsCacheAfterAttributeChanged has too many callers
1950         https://bugs.webkit.org/show_bug.cgi?id=74692
1951
1952         Reviewed by Sam Weinig.
1953
1954         Call invalidateNodeListsCacheAfterAttributeChanged in Element::updateAfterAttributeChanged instead of
1955         parsedMappedAttribute of various elements. Also make invalidateNodeListsCacheAfterAttributeChanged take
1956         the qualified name of the changed attribute so that we can exit early when the changed attribute isn't
1957         one of attributes we care.
1958
1959         In addition, added a missing call to invalidateNodeListsCacheAfterAttributeChanged in Attr::setValue.
1960
1961         Test: fast/dom/Attr/invalidate-nodelist-after-attr-setvalue.html
1962
1963         * dom/Attr.cpp:
1964         (WebCore::Attr::childrenChanged):
1965         * dom/Element.cpp:
1966         (WebCore::Element::updateAfterAttributeChanged):
1967         * dom/NamedNodeMap.cpp:
1968         (WebCore::NamedNodeMap::addAttribute):
1969         (WebCore::NamedNodeMap::removeAttribute):
1970         * dom/Node.cpp:
1971         (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged):
1972         * dom/Node.h:
1973         * dom/StyledElement.cpp:
1974         (WebCore::StyledElement::classAttributeChanged):
1975         * html/HTMLAnchorElement.cpp:
1976         (WebCore::HTMLAnchorElement::parseMappedAttribute):
1977         * html/HTMLAppletElement.cpp:
1978         (WebCore::HTMLAppletElement::parseMappedAttribute):
1979         * html/HTMLElement.cpp:
1980         (WebCore::HTMLElement::parseMappedAttribute):
1981         * html/HTMLEmbedElement.cpp:
1982         (WebCore::HTMLEmbedElement::parseMappedAttribute):
1983         * html/HTMLFormElement.cpp:
1984         (WebCore::HTMLFormElement::parseMappedAttribute):
1985         * html/HTMLFrameElementBase.cpp:
1986         (WebCore::HTMLFrameElementBase::parseMappedAttribute):
1987         * html/HTMLIFrameElement.cpp:
1988         (WebCore::HTMLIFrameElement::parseMappedAttribute):
1989         * html/HTMLImageElement.cpp:
1990         (WebCore::HTMLImageElement::parseMappedAttribute):
1991         * html/HTMLMapElement.cpp:
1992         (WebCore::HTMLMapElement::parseMappedAttribute):
1993         * html/HTMLMetaElement.cpp:
1994         (WebCore::HTMLMetaElement::parseMappedAttribute):
1995         * html/HTMLObjectElement.cpp:
1996         (WebCore::HTMLObjectElement::parseMappedAttribute):
1997         * html/HTMLParamElement.cpp:
1998         (WebCore::HTMLParamElement::parseMappedAttribute):
1999
2000 2011-12-16  Andreas Kling  <kling@webkit.org>
2001
2002         Cache and reuse HTMLCollections exposed by Document.
2003         <http://webkit.org/b/71956>
2004
2005         Reviewed by Antti Koivisto.
2006
2007         Let Document cache the various HTMLCollection objects it exposes.
2008         This is a behavior change in two ways:
2009
2010         1) The lifetime of returned collections is now tied to the lifetime
2011            of the Document. This matches the behavior of Firefox and Opera.
2012
2013         2) The cached collections returned by document are now exactly equal
2014            to those returned by subsequent calls to the same getters.
2015
2016         This reduces memory consumption by ~800 kB (on 64-bit) when loading
2017         the full HTML5 spec. document.links was called 34001 times, yielding
2018         34001 separate HTMLCollections, and now we only need 1.
2019
2020         The document.all collection retains the old behavior, as caching it
2021         will be a bit more complicated.
2022
2023         To avoid a reference cycle between Document and HTMLCollection,
2024         collections that are cached on Document do not retained their base
2025         node pointer (controlled by a m_baseIsRetained flag.)
2026
2027         Tests: fast/dom/document-collection-idempotence.html
2028                fast/dom/gc-9.html
2029
2030         * dom/Document.cpp:
2031         (WebCore::Document::detach):
2032         (WebCore::Document::cachedCollection):
2033         (WebCore::Document::images):
2034         (WebCore::Document::applets):
2035         (WebCore::Document::embeds):
2036         (WebCore::Document::plugins):
2037         (WebCore::Document::objects):
2038         (WebCore::Document::scripts):
2039         (WebCore::Document::links):
2040         (WebCore::Document::forms):
2041         (WebCore::Document::anchors):
2042         * dom/Document.h:
2043         * html/HTMLCollection.cpp:
2044         (WebCore::HTMLCollection::HTMLCollection):
2045         (WebCore::HTMLCollection::createForCachingOnDocument):
2046         (WebCore::HTMLCollection::~HTMLCollection):
2047         (WebCore::HTMLCollection::itemAfter):
2048         * html/HTMLCollection.h:
2049         (WebCore::HTMLCollection::base):
2050
2051 2011-12-16  Anders Carlsson  <andersca@apple.com>
2052
2053         Add a pretty dumb tile cache to WebTileCacheLayer
2054         https://bugs.webkit.org/show_bug.cgi?id=74753
2055
2056         Reviewed by Simon Fraser.
2057
2058         * WebCore.xcodeproj/project.pbxproj:
2059         * platform/graphics/ca/GraphicsLayerCA.cpp:
2060         (WebCore::GraphicsLayerCA::requiresTiledLayer):
2061         If a layer is a tile cache layer, we never want to swap it out for a tiled layer.
2062
2063         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
2064         Assert that we don't have a tile cache layer.
2065
2066         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2067         (PlatformCALayer::PlatformCALayer):
2068         If we have a tile cache layer, add its tile container to the list of custom sublayers.
2069
2070         * platform/graphics/ca/mac/TileCache.h: Added.
2071         (WebCore::TileCache::tileContainerLayer):
2072         Return the tile container layer.
2073
2074         * platform/graphics/ca/mac/TileCache.mm: Added.
2075         (WebCore::TileCache::tileCacheLayerBoundsChanged):
2076         Resize the tile grid if necessary.
2077
2078         (WebCore::TileCache::setNeedsDisplayInRect):
2079         Invalidate the necessary tiles.
2080
2081         (WebCore::TileCache::drawLayer):
2082         Set up the transform and draw the layer.
2083
2084         (WebCore::TileCache::getTileRangeForRect):
2085         Given a rect, return the range of tiles that it covers.
2086
2087         (WebCore::TileCache::numTilesForGridSize):
2088         Given a size, return how many tiles are needed to completely cover it.
2089
2090         (WebCore::TileCache::resizeTileGrid):
2091         Create new tile layers if needed, or reuse already existing ones.
2092
2093         (WebCore::TileCache::tileLayerAtPosition):
2094         Given a position in the grid, return the tile layer.
2095
2096         (WebCore::TileCache::createTileLayer):
2097         Create a WebTileLayer and set it up.
2098
2099         * platform/graphics/ca/mac/WebTileCacheLayer.h:
2100         * platform/graphics/ca/mac/WebTileCacheLayer.mm:
2101         (-[WebTileCacheLayer setBounds:]):
2102         (-[WebTileCacheLayer setNeedsDisplayInRect:]):
2103         (-[WebTileCacheLayer tileContainerLayer]):
2104         Call down to the tile cache object.
2105
2106         * platform/graphics/ca/mac/WebTileLayer.h: Added.
2107         * platform/graphics/ca/mac/WebTileLayer.mm: Added.
2108
2109         (-[WebTileLayer drawInContext:]):
2110         Ask the tile cache to draw the given layer.
2111
2112         (-[WebTileLayer setTileCache:WebCore::]):
2113
2114 2011-12-16  Sam Weinig  <sam@webkit.org>
2115
2116         Give PlatformEvents a base class
2117         https://bugs.webkit.org/show_bug.cgi?id=74685
2118
2119         Reviewed by Anders Carlsson.
2120
2121         Add a base class for PlatformMouseEvent, PlatformKeyboardEvent, PlatformWheelEvent
2122         and PlatformGestureEvent and move Type enumeration and modifiers down to it.
2123
2124         * CMakeLists.txt:
2125         * GNUmakefile.list.am:
2126         * Target.pri:
2127         * WebCore.exp.in:
2128         * WebCore.gypi:
2129         * WebCore.vcproj/WebCore.vcproj:
2130         * WebCore.xcodeproj/project.pbxproj:
2131         Add new files.
2132
2133         * platform/PlatformEvent.cpp: Added.
2134         * platform/PlatformEvent.h: Added.
2135         (WebCore::PlatformEvent::type):
2136         (WebCore::PlatformEvent::shiftKey):
2137         (WebCore::PlatformEvent::ctrlKey):
2138         (WebCore::PlatformEvent::altKey):
2139         (WebCore::PlatformEvent::metaKey):
2140         (WebCore::PlatformEvent::modifiers):
2141         (WebCore::PlatformEvent::PlatformEvent):
2142         Add new class.
2143
2144         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
2145         (-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
2146         * dom/KeyboardEvent.cpp:
2147         (WebCore::eventTypeForKeyboardEventType):
2148         * dom/MouseEvent.cpp:
2149         (WebCore::MouseEvent::create):
2150         * page/DragController.cpp:
2151         (WebCore::createMouseEvent):
2152         * page/EventHandler.cpp:
2153         (WebCore::EventHandler::handleGestureEvent):
2154         (WebCore::EventHandler::sendContextMenuEventForKey):
2155         (WebCore::EventHandler::fakeMouseMoveEventTimerFired):
2156         (WebCore::EventHandler::handleAccessKey):
2157         (WebCore::EventHandler::keyEvent):
2158         (WebCore::EventHandler::handleDrag):
2159         * page/blackberry/EventHandlerBlackBerry.cpp:
2160         (WebCore::EventHandler::accessKeyModifiers):
2161         * page/chromium/EventHandlerChromium.cpp:
2162         (WebCore::EventHandler::accessKeyModifiers):
2163         * page/efl/EventHandlerEfl.cpp:
2164         (WebCore::EventHandler::accessKeyModifiers):
2165         * page/gtk/EventHandlerGtk.cpp:
2166         (WebCore::EventHandler::accessKeyModifiers):
2167         * page/mac/EventHandlerMac.mm:
2168         (WebCore::EventHandler::accessKeyModifiers):
2169         * page/qt/EventHandlerQt.cpp:
2170         (WebCore::EventHandler::accessKeyModifiers):
2171         * page/win/EventHandlerWin.cpp:
2172         (WebCore::EventHandler::accessKeyModifiers):
2173         * page/wx/EventHandlerWx.cpp:
2174         (WebCore::EventHandler::accessKeyModifiers):
2175         * platform/PlatformGestureEvent.h:
2176         (WebCore::PlatformGestureEvent::PlatformGestureEvent):
2177         * platform/PlatformKeyboardEvent.h:
2178         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2179         (WebCore::PlatformKeyboardEvent::isKeypad):
2180         * platform/PlatformMouseEvent.h:
2181         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
2182         (WebCore::PlatformMouseEvent::button):
2183         * platform/PlatformWheelEvent.h:
2184         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2185         * platform/ScrollAnimatorNone.cpp:
2186         (WebCore::ScrollAnimatorNone::zoom):
2187         (WebCore::ScrollAnimatorNone::handleGestureEvent):
2188         * platform/blackberry/PlatformKeyboardEventBlackBerry.cpp:
2189         (WebCore::toWebCorePlatformKeyboardEventType):
2190         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2191         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
2192         * platform/chromium/GestureRecognizerChromium.cpp:
2193         (WebCore::GestureRecognizerChromium::appendTapDownGestureEvent):
2194         (WebCore::GestureRecognizerChromium::appendClickGestureEvent):
2195         (WebCore::GestureRecognizerChromium::appendDoubleClickGestureEvent):
2196         (WebCore::GestureRecognizerChromium::appendScrollGestureBegin):
2197         (WebCore::GestureRecognizerChromium::appendScrollGestureEnd):
2198         (WebCore::GestureRecognizerChromium::appendScrollGestureUpdate):
2199         * platform/chromium/PlatformKeyboardEventChromium.cpp:
2200         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
2201         * platform/chromium/PopupContainer.cpp:
2202         (WebCore::PopupContainer::handleGestureEvent):
2203         * platform/chromium/PopupListBox.cpp:
2204         (WebCore::isCharacterTypeEvent):
2205         (WebCore::PopupListBox::handleKeyEvent):
2206         * platform/chromium/ScrollAnimatorChromiumMac.mm:
2207         (WebCore::ScrollAnimatorChromiumMac::handleGestureEvent):
2208         * platform/efl/PlatformKeyboardEventEfl.cpp:
2209         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2210         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
2211         * platform/efl/PlatformMouseEventEfl.cpp:
2212         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
2213         * platform/efl/PlatformWheelEventEfl.cpp:
2214         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2215         * platform/gtk/PlatformKeyboardEventGtk.cpp:
2216         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2217         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
2218         * platform/gtk/PlatformMouseEventGtk.cpp:
2219         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
2220         * platform/gtk/PlatformWheelEventGtk.cpp:
2221         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2222         * platform/ios/KeyEventIOS.mm:
2223         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2224         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
2225         * platform/mac/KeyEventMac.mm:
2226         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2227         * platform/mac/PlatformMouseEventMac.mm:
2228         (WebCore::mouseEventForNSEvent):
2229         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
2230         * platform/mac/ScrollAnimatorMac.mm:
2231         (WebCore::ScrollAnimatorMac::handleGestureEvent):
2232         * platform/mac/WheelEventMac.mm:
2233         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2234         * platform/qt/PlatformKeyboardEventQt.cpp:
2235         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2236         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
2237         * platform/qt/PlatformMouseEventQt.cpp:
2238         (WebCore::mouseEventTypeAndMouseButtonFromQEvent):
2239         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
2240         * platform/qt/WheelEventQt.cpp:
2241         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2242         * platform/win/KeyEventWin.cpp:
2243         (WebCore::isKeypadEvent):
2244         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2245         * platform/win/PlatformMouseEventWin.cpp:
2246         (WebCore::messageToEventType):
2247         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
2248         * platform/win/WheelEventWin.cpp:
2249         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2250         * platform/wx/KeyboardEventWx.cpp:
2251         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2252         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
2253         * platform/wx/MouseEventWx.cpp:
2254         (WebCore::typeFromMouseEvent):
2255         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
2256         * platform/wx/MouseWheelEventWx.cpp:
2257         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2258         * plugins/mac/PluginViewMac.mm:
2259         (WebCore::PluginView::handleKeyboardEvent):
2260         * testing/Internals.cpp:
2261         (WebCore::Internals::setZoomAnimatorTransform):
2262         Switch to using new names/class modifier as necessary.
2263
2264 2011-12-16  Adam Barth  <abarth@webkit.org>
2265
2266         <!doctype html><div><body><frameset> doesn't parse correctly
2267         https://bugs.webkit.org/show_bug.cgi?id=74745
2268
2269         Reviewed by Eric Seidel.
2270
2271         We were missing one place the spec tells us to set this bool.
2272
2273         Tests: html5lib/runner.html
2274
2275         * html/parser/HTMLTreeBuilder.cpp:
2276
2277 2011-12-16  Jarred Nicholls  <jarred@sencha.com>
2278
2279         Support HTML documents in XHR.responseXML
2280         https://bugs.webkit.org/show_bug.cgi?id=74626
2281
2282         Latest W3C XHR spec details for the responseXML attribute:
2283         http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-responsexml-attribute
2284         http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#document-response-entity-body
2285
2286         XHR.responseXML was not compliant per the latest editor's draft of the XHR spec.
2287         The following compliance issue have been corrected:
2288           - A responseType of "text" should disallow access to responseXML by throwing an InvalidState exception.
2289           - When the error flag is toggled, responseXML should return "null" immediately and not attempt to create a new Document.
2290           - responseXML should return a valid HTML document when the MIME type is "text/html", but only when the caller has
2291             explicitly set responseType to "document".
2292
2293         Reviewed by Alexey Proskuryakov.
2294
2295         Tests: fast/xmlhttprequest/xmlhttprequest-responseXML-html-document-responsetype-quirks.html
2296                fast/xmlhttprequest/xmlhttprequest-responseXML-html-document-responsetype-strict.html
2297                fast/xmlhttprequest/xmlhttprequest-responseXML-html-no-responsetype.html
2298                fast/xmlhttprequest/xmlhttprequest-responseXML-invalid-xml.html
2299                fast/xmlhttprequest/xmlhttprequest-responseXML-xml-document-responsetype.html
2300                fast/xmlhttprequest/xmlhttprequest-responseXML-xml-text-responsetype.html
2301
2302         * xml/XMLHttpRequest.cpp:
2303         (WebCore::XMLHttpRequest::responseXML):
2304         (WebCore::XMLHttpRequest::clearResponseBuffers):
2305         * xml/XMLHttpRequest.h: Rename m_responseXML to m_responseDocument
2306         (WebCore::XMLHttpRequest::optionalResponseXML):
2307
2308 2011-12-16  Ryosuke Niwa  <rniwa@webkit.org>
2309
2310         Only EditCommandComposition should implement unapply and reapply
2311         https://bugs.webkit.org/show_bug.cgi?id=74490
2312
2313         Reviewed by Eric Seidel.
2314
2315         Introduce new abstract class UndoStep to replace EditCommand for EditorClient, and make EditCommand
2316         private to WebCore.
2317
2318         * GNUmakefile.list.am:
2319         * Target.pri:
2320         * WebCore.exp.in:
2321         * WebCore.gypi:
2322         * WebCore.vcproj/WebCore.vcproj:
2323         * WebCore.xcodeproj/project.pbxproj:
2324         * editing/CompositeEditCommand.cpp:
2325         (WebCore::EditCommandComposition::create): Takes EditAction instead of boolean for CreateLinkCommand.
2326         (WebCore::EditCommandComposition::EditCommandComposition): Ditto.
2327         (WebCore::EditCommandComposition::unapply): Moved from EditCommand; we don't have to call isTopLevelCommand
2328         anymore because EditCommandComposition is always top-level. In fact, the only thing unapply/reapply do
2329         in addition to what doUnapply/doReapply do for sub-level commands is disabling and enabling delete button
2330         and defining an event queue scope. However, these can be done at top-level command anyway, so we now only call
2331         doApply for sub-level commands.
2332         (WebCore::EditCommandComposition::reapply): Ditto.
2333         (WebCore::EditCommandComposition::setStartingSelection): Added.
2334         (WebCore::EditCommandComposition::setEndingSelection): Added.
2335         (WebCore::applyCommand): Moved from EditCommand.
2336         (WebCore::CompositeEditCommand::apply): Moved from EditCommand; doesn't call isTopLevelCommand for the same reason.
2337         (WebCore::CompositeEditCommand::ensureComposition):
2338         (WebCore::CompositeEditCommand::applyCommandToComposite): Call doApply instead of apply for the same reason.
2339         * editing/CompositeEditCommand.h:
2340         (WebCore::EditCommandComposition::wasCreateLinkCommand):
2341         (WebCore::EditCommandComposition::startingSelection): Added.
2342         (WebCore::EditCommandComposition::endingSelection): Added.
2343         * editing/EditCommand.cpp:
2344         (WebCore::EditCommand::setStartingSelection):
2345         (WebCore::EditCommand::setEndingSelection):
2346         (WebCore::SimpleEditCommand::doReapply): Moved from EditCommand.
2347         * editing/EditCommand.h:
2348         * editing/UndoStep.h: Added.
2349         (WebCore::UndoStep::~UndoStep):
2350         * loader/EmptyClients.h:
2351         (WebCore::EmptyEditorClient::shouldInsertNode):
2352         (WebCore::EmptyEditorClient::didSetSelectionTypesForPasteboard):
2353         (WebCore::EmptyEditorClient::registerCommandForUndo): Takes UndoStep instead of EditCommand.
2354         (WebCore::EmptyEditorClient::registerCommandForRedo): Ditto.
2355         * page/EditorClient.h:
2356
2357 2011-12-16  Simon Fraser  <simon.fraser@apple.com>
2358
2359         Allow a PlatformCALayer to own its own sublayers
2360         https://bugs.webkit.org/show_bug.cgi?id=74744
2361
2362         Reviewed by Anders Carlsson.
2363
2364         GraphicsLayerCA rebuilds the sublayer list of CALayers, which would
2365         blow away any custom layers that a PlatformCALayer wants to maintain
2366         as children.
2367         
2368         Make it possible for a PlatformLayerCA to indicate that it wants
2369         a specific list of sublayers to be maintained as the first layers
2370         in the child list.
2371         
2372         * platform/graphics/ca/GraphicsLayerCA.cpp:
2373         (WebCore::GraphicsLayerCA::updateSublayerList):
2374         * platform/graphics/ca/PlatformCALayer.h:
2375         (WebCore::PlatformCALayer::customSublayers):
2376         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2377         (PlatformCALayer::PlatformCALayer):
2378
2379 2011-12-16  Adam Barth  <abarth@webkit.org>
2380
2381         <!DOCTYPE html><pre>&#x0a;&#x0a;A</pre> doesn't parse correctly
2382         https://bugs.webkit.org/show_bug.cgi?id=74658
2383
2384         Reviewed by Darin Adler.
2385
2386         Previously, we handled skipping newlines after <pre> in the tokenizer,
2387         which isn't how the spec handles them.  Instead, the spec skips them in
2388         the tree builder.  This isn't usually observable, except in the case of
2389         an HTML entity.  In that case, the tokenzier sees '&' (because the
2390         entity hasn't been decoded yet), but the tree builder sees '\n' (the
2391         decoded entity).  This patch fixes the bug by more closely aligning our
2392         implementation with the spec.
2393
2394         Test: html5lib/runner.html
2395
2396         * html/parser/HTMLTokenizer.cpp:
2397         (WebCore::HTMLTokenizer::reset):
2398         (WebCore::HTMLTokenizer::nextToken):
2399         * html/parser/HTMLTokenizer.h:
2400         * html/parser/HTMLTreeBuilder.cpp:
2401         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::skipAtMostOneLeadingNewline):
2402         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
2403         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
2404         (WebCore::HTMLTreeBuilder::processCharacterBuffer):
2405         * html/parser/HTMLTreeBuilder.h:
2406         * xml/parser/MarkupTokenizerBase.h:
2407
2408 2011-12-16  Joshua Bell  <jsbell@chromium.org>
2409
2410         IndexedDB: Implement IDBObjectStore.count() and IDBIndex.count()
2411         https://bugs.webkit.org/show_bug.cgi?id=73686
2412
2413         Reviewed by Tony Chang.
2414
2415         These new methods open an internal cursor and iterate through the
2416         results, returning the number of items found. Note that only
2417         passing an IDBKeyRange is supported, not an IDBKey. Supporting
2418         that will require some IDL/binding monkeying; several other
2419         methods also need the same Key-or-KeyRange behavior.
2420
2421         Tests: storage/indexeddb/index-count.html
2422                storage/indexeddb/objectstore-count.html
2423
2424         * bindings/v8/SerializedScriptValue.cpp:
2425         (WebCore::SerializedScriptValue::numberValue):
2426         * bindings/v8/SerializedScriptValue.h:
2427         * storage/IDBIndex.cpp:
2428         (WebCore::IDBIndex::openCursor):
2429         (WebCore::IDBIndex::count):
2430         * storage/IDBIndex.h:
2431         (WebCore::IDBIndex::count):
2432         * storage/IDBIndex.idl:
2433         * storage/IDBIndexBackendImpl.cpp:
2434         (WebCore::IDBIndexBackendImpl::countInternal):
2435         (WebCore::IDBIndexBackendImpl::count):
2436         * storage/IDBIndexBackendImpl.h:
2437         * storage/IDBIndexBackendInterface.h:
2438         * storage/IDBObjectStore.cpp:
2439         (WebCore::IDBObjectStore::count):
2440         * storage/IDBObjectStore.h:
2441         (WebCore::IDBObjectStore::count):
2442         * storage/IDBObjectStore.idl:
2443         * storage/IDBObjectStoreBackendImpl.cpp:
2444         (WebCore::IDBObjectStoreBackendImpl::count):
2445         (WebCore::IDBObjectStoreBackendImpl::countInternal):
2446         * storage/IDBObjectStoreBackendImpl.h:
2447         * storage/IDBObjectStoreBackendInterface.h:
2448
2449 2011-12-16  Yael Aharon  <yael.aharon@nokia.com>
2450
2451         Audio file in video element has a size of 0x0 .
2452         https://bugs.webkit.org/show_bug.cgi?id=74738
2453
2454         Reviewed by Kenneth Rohde Christiansen.
2455
2456         When the source of a video element has audio only, the intrinsic size of the video should
2457         not be 0x0. Instead, it should be the same as as no media was loaded.
2458
2459         No new tests. An existing test is covering this case and was modified to reflect this change.
2460
2461         * rendering/RenderVideo.cpp:
2462         (WebCore::RenderVideo::calculateIntrinsicSize):
2463
2464 2011-12-16  Alexis Menard  <alexis.menard@openbossa.org>
2465
2466         getComputedStyle for border-width is not implemented.
2467         https://bugs.webkit.org/show_bug.cgi?id=74635
2468
2469         Reviewed by Tony Chang.
2470
2471         Implement getComputedStyle for border-width.
2472
2473         Test: fast/css/getComputedStyle/getComputedStyle-border-width.html
2474
2475         * css/CSSComputedStyleDeclaration.cpp:
2476         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2477
2478 2011-12-16  Branimir Lambov  <blambov@google.com>
2479
2480         [chromium] svg/clip-path/clip-in-mask.svg fails on Windows and Linux
2481         https://bugs.webkit.org/show_bug.cgi?id=53378
2482
2483         Reviewed by Tony Chang.
2484
2485         Fixes a problem in Skia's clipping layer code's handling of coordinate
2486         transformations that was causing all complex clipping (including text
2487         and/or masks) to fail.
2488
2489         The method beginLayerClippedToImage was taking rectangle coordinates
2490         in one local coordinate space, but it was applying them in a different  
2491         one because of the delay between the time it is called and the actual 
2492         application occurs in applyClipFromImage. The fix translates the 
2493         coordinates passed to beginLayerClippedToImage to absolute ones, so 
2494         that they are not affected by any change in the transform matrix, and 
2495         makes sure that applyClipFromImage clears the matrix before drawing
2496         the clip layer to correctly apply the absolute coordinates.
2497
2498         * platform/graphics/skia/PlatformContextSkia.cpp:
2499         (WebCore::PlatformContextSkia::beginLayerClippedToImage):
2500         (WebCore::PlatformContextSkia::applyClipFromImage):
2501         * platform/graphics/skia/PlatformContextSkia.h:
2502
2503 2011-12-16  Mark Hahnenberg  <mhahnenberg@apple.com>
2504
2505         De-virtualize destructors
2506         https://bugs.webkit.org/show_bug.cgi?id=74331
2507
2508         Reviewed by Geoffrey Garen.
2509
2510         No new tests.
2511
2512         Doing everything here that was done to the JSCell hierarchy in JavaScriptCore. 
2513         See the ChangeLog for this commit for a more in-depth description.
2514
2515         * WebCore.exp.in: Add/remove symbols.
2516         * bindings/js/JSCanvasRenderingContext2DCustom.cpp: Remove first arg from isJSArray call.
2517         (WebCore::JSCanvasRenderingContext2D::setWebkitLineDash):
2518         * bindings/js/JSDOMBinding.cpp: Add trival destructor assert for DOMConstructorObject 
2519         and DOMConstructorWithDocument.
2520         * bindings/js/JSDOMGlobalObject.cpp: Add static destroy.  Add implementation for 
2521         scriptExecutionContext that dispatches to different functions in subclasses 
2522         depending on our current ClassInfo.  We do this so that we can get rid of the 
2523         virtual-ness of scriptExecutionContext, because any virtual functions will throw 
2524         off the layout of the object and we'll crash at runtime.
2525         (WebCore::JSDOMGlobalObject::destroy):
2526         (WebCore::JSDOMGlobalObject::scriptExecutionContext):
2527         * bindings/js/JSDOMGlobalObject.h:
2528         * bindings/js/JSDOMWindowBase.cpp: Add static destroy.
2529         (WebCore::JSDOMWindowBase::destroy):
2530         * bindings/js/JSDOMWindowBase.h: De-virtualize scriptExecutionContext.
2531         * bindings/js/JSDOMWindowShell.cpp: Add static destroy.
2532         (WebCore::JSDOMWindowShell::destroy):
2533         * bindings/js/JSDOMWindowShell.h:
2534         * bindings/js/JSDOMWrapper.cpp: Add trivial destructor assert.
2535         * bindings/js/JSDOMWrapper.h: Add a ClassInfo to JSDOMWrapper since it now overrides 
2536         a MethodTable function. Remove vtableAnchor virtual function.
2537         * bindings/js/JSImageConstructor.cpp: Add trivial destructor assert.
2538         * bindings/js/JSNodeCustom.cpp: Change implementation of pushEventHandlerScope so that 
2539         it dispatches to the correct function depending on the 
2540         identity of the class as specified by the ClassInfo.  
2541         See JSDOMGlobalObject::scriptExecutionContext for explanation.
2542         (WebCore::JSNode::pushEventHandlerScope):
2543         * bindings/js/JSWebSocketCustom.cpp: Remove first arg to isJSArray call.
2544         (WebCore::JSWebSocketConstructor::constructJSWebSocket):
2545         * bindings/js/JSWorkerContextBase.cpp: Add static destroy.
2546         (WebCore::JSWorkerContextBase::destroy):
2547         * bindings/js/JSWorkerContextBase.h: 
2548         * bindings/js/ScriptValue.cpp: Remove first arg to isJSArray call.
2549         (WebCore::jsToInspectorValue): 
2550         * bindings/js/SerializedScriptValue.cpp: Ditto.
2551         (WebCore::CloneSerializer::isArray):
2552         (WebCore::CloneSerializer::getSparseIndex):
2553         * bindings/scripts/CodeGeneratorJS.pm:
2554         (GenerateHeader): Remove virtual-ness of any custom pushEventHandlerScope (see 
2555         JSNodeCustom::pushEventHandlerScope for explanation).  Remove virtual toBoolean 
2556         for anybody who masquerades as undefined, since our JSObject implementation handles 
2557         this based on the TypeInfo in the Structure. Add trivial destructor assert for any 
2558         class other than DOMWindow or WorkerContexts.
2559         (GenerateImplementation): Change ClassInfo definitions to use Base::s_info, since 
2560         typing the parent class more than once is duplication of information and increases 
2561         the likelihood of mistakes.  Pass ClassInfo to TypeArrayDescriptors instead of vptr. 
2562         (GenerateConstructorDefinition): Add trivial destructor assert for all generated constructors.
2563         * bridge/c/CRuntimeObject.cpp: Remove empty virtual destructor.
2564         * bridge/c/CRuntimeObject.h: 
2565         * bridge/jni/jsc/JavaRuntimeObject.cpp: Ditto.
2566         * bridge/jni/jsc/JavaRuntimeObject.h: 
2567         * bridge/objc/ObjCRuntimeObject.h: Ditto.
2568         * bridge/objc/ObjCRuntimeObject.mm:
2569         * bridge/objc/objc_runtime.h: Add static destroy for ObjcFallbackObjectImp. De-virtualize 
2570         toBoolean in the short term.  Need longer term fix.
2571         * bridge/objc/objc_runtime.mm:
2572         (JSC::Bindings::ObjcFallbackObjectImp::destroy):
2573         * bridge/qt/qt_runtime.cpp: Add static destroy to QtRuntimeMethod.
2574         (JSC::Bindings::QtRuntimeMethod::destroy):
2575         * bridge/qt/qt_runtime.h: De-virtualize ~QtRuntimeMethod.
2576         * bridge/runtime_array.cpp: De-virtualize destructor. Add static destroy.
2577         (JSC::RuntimeArray::destroy):
2578         * bridge/runtime_array.h:
2579         * bridge/runtime_method.cpp: Remove vtableAnchor. Add static destroy.
2580         (JSC::RuntimeMethod::destroy):
2581         * bridge/runtime_method.h:
2582         * bridge/runtime_object.cpp: Add static destroy.
2583         (JSC::Bindings::RuntimeObject::destroy):
2584         * bridge/runtime_object.h:
2585
2586 2011-12-15  Alexey Proskuryakov  <ap@apple.com>
2587
2588         Poor XPath performance when evaluating an expression that returns a lot of nodes
2589         https://bugs.webkit.org/show_bug.cgi?id=74665
2590         <rdar://problem/10517146>
2591
2592         Reviewed by Darin Adler.
2593
2594         No change in funcitonality. Well covered by existing tests (ran them with zero cutoff to
2595         execute the new code path).
2596
2597         Our sorting function is optimized for small node sets in large documents, and this is the
2598         opposite of it. Added another one that traverses the whole document, adding nodes from the
2599         node set to sorted list. That doesn't grow with the number of nodes nearly as fast.
2600
2601         Cutoff amount chosen for the document referenced in bug - this is roughly where the algorithms
2602         have the same performance on it.
2603
2604         * xml/XPathNodeSet.cpp:
2605         (WebCore::XPath::NodeSet::sort):
2606         (WebCore::XPath::findRootNode):
2607         (WebCore::XPath::NodeSet::traversalSort):
2608         * xml/XPathNodeSet.h:
2609
2610 2011-12-15  Antti Koivisto  <antti@apple.com>
2611
2612         https://bugs.webkit.org/show_bug.cgi?id=74677
2613         Count ResourceLoadScheduler suspends/resumes
2614
2615         Reviewed by Andreas Kling.
2616
2617         Using boolean is not robust when there are multiple clients calling suspendPendingRequests/resumePendingRequests.
2618         
2619         Increment and decrement suspend count instead of just setting/unsetting a boolean.
2620
2621         * loader/ResourceLoadScheduler.cpp:
2622         (WebCore::ResourceLoadScheduler::ResourceLoadScheduler):
2623         (WebCore::ResourceLoadScheduler::servePendingRequests):
2624         (WebCore::ResourceLoadScheduler::suspendPendingRequests):
2625         (WebCore::ResourceLoadScheduler::resumePendingRequests):
2626         * loader/ResourceLoadScheduler.h:
2627         (WebCore::ResourceLoadScheduler::isSuspendingPendingRequests):
2628
2629 2011-12-16  Adam Klein  <adamk@chromium.org>
2630
2631         Improve performance of ChildListMutationScope when no MutationObservers are present
2632         https://bugs.webkit.org/show_bug.cgi?id=74671
2633
2634         Reviewed by Ojan Vafai.
2635
2636         Inline ChildListMutationScope's methods (including constructor and
2637         destructor), and provide a fast-fail case when no mutation observers
2638         are present.
2639
2640         The code reorganization necessary for the above also removed the
2641         anonymous namespace in ChildListMutationScope.cpp, making both helper
2642         classes private inner classes of ChildListMutationScope.
2643
2644         No new tests, refactoring only.
2645
2646         * dom/ChildListMutationScope.cpp:
2647         (WebCore::ChildListMutationScope::MutationAccumulator::MutationAccumulator):
2648         (WebCore::ChildListMutationScope::MutationAccumulator::~MutationAccumulator):
2649         (WebCore::ChildListMutationScope::MutationAccumulator::isAddedNodeInOrder):
2650         (WebCore::ChildListMutationScope::MutationAccumulator::childAdded):
2651         (WebCore::ChildListMutationScope::MutationAccumulator::isRemovedNodeInOrder):
2652         (WebCore::ChildListMutationScope::MutationAccumulator::willRemoveChild):
2653         (WebCore::ChildListMutationScope::MutationAccumulator::enqueueMutationRecord):
2654         (WebCore::ChildListMutationScope::MutationAccumulator::clear):
2655         (WebCore::ChildListMutationScope::MutationAccumulator::isEmpty):
2656         (WebCore::ChildListMutationScope::MutationAccumulationRouter::MutationAccumulationRouter):
2657         (WebCore::ChildListMutationScope::MutationAccumulationRouter::~MutationAccumulationRouter):
2658         (WebCore::ChildListMutationScope::MutationAccumulationRouter::initialize):
2659         (WebCore::ChildListMutationScope::MutationAccumulationRouter::instance):
2660         (WebCore::ChildListMutationScope::MutationAccumulationRouter::childAdded):
2661         (WebCore::ChildListMutationScope::MutationAccumulationRouter::willRemoveChild):
2662         (WebCore::ChildListMutationScope::MutationAccumulationRouter::incrementScopingLevel):
2663         (WebCore::ChildListMutationScope::MutationAccumulationRouter::decrementScopingLevel):
2664         * dom/ChildListMutationScope.h:
2665         (WebCore::ChildListMutationScope::ChildListMutationScope):
2666         (WebCore::ChildListMutationScope::~ChildListMutationScope):
2667         (WebCore::ChildListMutationScope::childAdded):
2668         (WebCore::ChildListMutationScope::willRemoveChild):
2669
2670 2011-12-16  Dean Jackson  <dino@apple.com>
2671
2672         Filters need to affect visual overflow
2673         https://bugs.webkit.org/show_bug.cgi?id=71930
2674
2675         Reviewed by Simon Fraser.
2676
2677         Make sure filters are included in visual overflow.
2678         Add a new method to calculate the expansion of overflow
2679         region given a list of FilterOperations. This is a slight
2680         duplication of code from the rendering path, but is needed
2681         because overflow is calculated before the FilterEffect
2682         chain is built.
2683
2684         Also, filters were always rendered into their
2685         input rectangle which was wrong for any effect
2686         that produced a different sized result - drop-shadow
2687         and blur. This required two changes. First, FilterEffect
2688         needed a flag to decide whether or not to clip
2689         output to primitive regions (as required by SVG but not
2690         what we want here). Second, the rendering operation
2691         draws into the rectangle the filter claims is its painting
2692         rectangle.
2693
2694         Test: css3/filters/regions-expanding.html
2695
2696         * platform/graphics/filters/FEDropShadow.cpp:
2697         (WebCore::FEDropShadow::determineAbsolutePaintRect): Only
2698         clipToBounds if necessary.
2699         * platform/graphics/filters/FEGaussianBlur.cpp:
2700         (WebCore::FEGaussianBlur::calculateUnscaledKernelSize): CSS filters
2701         ask for the kernel size before the Filter object is created, so
2702         add a new method to return an unscaled kernel.
2703         (WebCore::FEGaussianBlur::calculateKernelSize):
2704         (WebCore::FEGaussianBlur::determineAbsolutePaintRect): Only
2705         clipToBounds if necessary.
2706         * platform/graphics/filters/FEGaussianBlur.h:
2707         * platform/graphics/filters/FEMorphology.cpp:
2708         (WebCore::FEMorphology::determineAbsolutePaintRect): Only
2709         clipToBounds if necessary.
2710         * platform/graphics/filters/FEOffset.cpp:
2711         (WebCore::FEOffset::determineAbsolutePaintRect): Only
2712         clipToBounds if necessary.
2713         * platform/graphics/filters/FilterEffect.cpp:
2714         (WebCore::FilterEffect::FilterEffect): Initialize clipToBounds
2715         as false so SVG remains unchanged.
2716         (WebCore::FilterEffect::determineAbsolutePaintRect): Only
2717         clipToBounds if necessary.
2718         * platform/graphics/filters/FilterEffect.h:
2719         (WebCore::FilterEffect::clipsToBounds):
2720         (WebCore::FilterEffect::setClipsToBounds):
2721         * rendering/FilterEffectRenderer.cpp:
2722         (WebCore::FilterEffectRenderer::build): Make sure we set our
2723         filters here to NOT clip to bounds.
2724         * rendering/FilterEffectRenderer.h:
2725         (WebCore::FilterEffectRenderer::outputRect): Asks the filter
2726         operation for the size of the result image.
2727         * rendering/RenderBlock.cpp:
2728         (WebCore::RenderBlock::computeOverflow):
2729         * rendering/RenderBox.cpp:
2730         (WebCore::RenderBox::addVisualEffectOverflow): Change the name
2731         from addBoxShadowAndBorderOverflow().
2732         * rendering/RenderBox.h:
2733         * rendering/RenderEmbeddedObject.cpp:
2734         (WebCore::RenderEmbeddedObject::layout):
2735         * rendering/RenderIFrame.cpp:
2736         (WebCore::RenderIFrame::layout):
2737         * rendering/RenderLayer.cpp:
2738         (WebCore::RenderLayer::paintLayer):
2739         * rendering/RenderLayerBacking.cpp:
2740         (WebCore::hasBoxDecorations): Change name from
2741         hasBorderOutlineOrShadow().
2742         (WebCore::hasBoxDecorationsOrBackground):
2743         (WebCore::hasBoxDecorationsOrBackgroundImage):
2744         * rendering/RenderReplaced.cpp:
2745         (WebCore::RenderReplaced::layout):
2746         * rendering/style/FilterOperations.cpp:
2747         (WebCore::outsetSizeForBlur): Return an IntSize that is the amount
2748         of offset.
2749         (WebCore::FilterOperations::hasOutsets):
2750         (WebCore::FilterOperations::getOutsets):
2751         * rendering/style/FilterOperations.h:
2752         * rendering/style/RenderStyle.h:
2753         (WebCore::InheritedFlags::getFilterOutsets):
2754         (WebCore::InheritedFlags::hasFilterOutsets):
2755         * svg/graphics/filters/SVGFEImage.cpp:
2756         (WebCore::FEImage::determineAbsolutePaintRect): Only
2757         clipToBounds if necessary.
2758
2759 2011-12-16  Alexis Menard  <alexis.menard@openbossa.org>, Jakub Wieczorek  <jwieczorek@webkit.org>
2760
2761         Add support for <ol reversed>.
2762         https://bugs.webkit.org/show_bug.cgi?id=36724
2763
2764         The reversed attribute makes an ordered list appear with marker values
2765         decreasing from n, where n is the number of items.
2766         See: http://www.whatwg.org/specs/web-apps/current-work/#attr-ol-reversed
2767
2768         Reviewed by Darin Adler.
2769
2770         Tests: fast/lists/ol-reversed-dynamic-simple.html
2771                fast/lists/ol-reversed-dynamic.html
2772                fast/lists/ol-reversed-nested-items.html
2773                fast/lists/ol-reversed-nested-list.html
2774                fast/lists/ol-reversed-simple.html
2775
2776         * html/HTMLAttributeNames.in:
2777         * html/HTMLOListElement.cpp:
2778         (WebCore::HTMLOListElement::HTMLOListElement):
2779         (WebCore::HTMLOListElement::parseMappedAttribute):
2780         (WebCore::HTMLOListElement::updateItemValues):
2781         (WebCore::HTMLOListElement::recalculateItemCount):
2782         * html/HTMLOListElement.h:
2783         (WebCore::HTMLOListElement::start):
2784         (WebCore::HTMLOListElement::isReversed):
2785         (WebCore::HTMLOListElement::itemCountChanged):
2786         (WebCore::HTMLOListElement::itemCount):
2787         * html/HTMLOListElement.idl:
2788         * rendering/RenderListItem.cpp:
2789         (WebCore::RenderListItem::nextListItem):
2790         (WebCore::previousListItem):
2791         (WebCore::RenderListItem::calcValue):
2792         (WebCore::RenderListItem::explicitValueChanged):
2793         (WebCore::previousOrNextItem):
2794         (WebCore::RenderListItem::updateListMarkerNumbers):
2795         * rendering/RenderListItem.h:
2796
2797 2011-12-16  Mikhail Naganov  <mnaganov@chromium.org>
2798
2799         Scroll non-visible edit controls and caret into the center of the view when starting typing.
2800         https://bugs.webkit.org/show_bug.cgi?id=65027
2801
2802         Reviewed by Ryosuke Niwa.
2803
2804         Tests: editing/input/caret-at-the-edge-of-contenteditable.html
2805                editing/input/caret-at-the-edge-of-input.html
2806                editing/input/reveal-caret-of-multiline-contenteditable.html
2807                editing/input/reveal-caret-of-multiline-input.html
2808                editing/input/reveal-contenteditable-on-input-vertically.html
2809                editing/input/reveal-contenteditable-on-paste-vertically.html
2810                editing/input/reveal-edit-on-input-vertically.html
2811                editing/input/reveal-edit-on-paste-vertically.html
2812
2813         * editing/Editor.cpp:
2814         (WebCore::Editor::insertTextWithoutSendingTextEvent):
2815         (WebCore::Editor::revealSelectionAfterEditingOperation):
2816
2817 2011-12-16  Ryosuke Niwa  <rniwa@webkit.org>
2818
2819         Touch RenderStyle in an attempt to fix linking errors on Chromium Windows bots.
2820
2821         * rendering/style/RenderStyle.h:
2822
2823 2011-12-14  Nat Duca  <nduca@chromium.org>
2824
2825         [chromium] DelayBasedTimeSource should not change its timebase on late ticks
2826         https://bugs.webkit.org/show_bug.cgi?id=74573
2827
2828         The original DelayBasedTimeSource was designed to shift its timebase
2829         to the tick time when a tick came back "late." The rationale was that it is
2830         better to just "start fresh" after a stutter. After profiling this,
2831         this time-rebasing just destabilizes frame rate anytime the thread gets
2832         loaded.  This patch keeps the timebase stationary, leading to vastly
2833         smoother framerates when the message loop is under load.
2834
2835         Reviewed by James Robinson.
2836
2837         * platform/graphics/chromium/cc/CCDelayBasedTimeSource.cpp:
2838         (WebCore::CCDelayBasedTimeSource::updateState):
2839
2840 2011-12-16  Sheriff Bot  <webkit.review.bot@gmail.com>
2841
2842         Unreviewed, rolling out r103062.
2843         http://trac.webkit.org/changeset/103062
2844         https://bugs.webkit.org/show_bug.cgi?id=74715
2845
2846         It broke many tests (Requested by Ossy on #webkit).
2847
2848         * html/HTMLAttributeNames.in:
2849         * html/HTMLOListElement.cpp:
2850         (WebCore::HTMLOListElement::HTMLOListElement):
2851         (WebCore::HTMLOListElement::parseMappedAttribute):
2852         * html/HTMLOListElement.h:
2853         (WebCore::HTMLOListElement::start):
2854         * html/HTMLOListElement.idl:
2855         * rendering/RenderListItem.cpp:
2856         (WebCore::previousListItem):
2857         (WebCore::RenderListItem::calcValue):
2858         (WebCore::RenderListItem::explicitValueChanged):
2859         (WebCore::RenderListItem::updateListMarkerNumbers):
2860         * rendering/RenderListItem.h:
2861
2862 2011-12-16  Alexis Menard  <alexis.menard@openbossa.org>, Jakub Wieczorek  <jwieczorek@webkit.org>
2863
2864         Add support for <ol reversed>.
2865         https://bugs.webkit.org/show_bug.cgi?id=36724
2866
2867         The reversed attribute makes an ordered list appear with marker values
2868         decreasing from n, where n is the number of items.
2869         See: http://www.whatwg.org/specs/web-apps/current-work/#attr-ol-reversed
2870
2871         Reviewed by Darin Adler.
2872
2873         Tests: fast/lists/ol-reversed-dynamic-simple.html
2874                fast/lists/ol-reversed-dynamic.html
2875                fast/lists/ol-reversed-nested-items.html
2876                fast/lists/ol-reversed-nested-list.html
2877                fast/lists/ol-reversed-simple.html
2878
2879         * html/HTMLAttributeNames.in:
2880         * html/HTMLOListElement.cpp:
2881         (WebCore::HTMLOListElement::HTMLOListElement):
2882         (WebCore::HTMLOListElement::parseMappedAttribute):
2883         (WebCore::HTMLOListElement::updateItemValues):
2884         (WebCore::HTMLOListElement::recalculateItemCount):
2885         * html/HTMLOListElement.h:
2886         (WebCore::HTMLOListElement::start):
2887         (WebCore::HTMLOListElement::isReversed):
2888         (WebCore::HTMLOListElement::itemCountChanged):
2889         (WebCore::HTMLOListElement::itemCount):
2890         * html/HTMLOListElement.idl:
2891         * rendering/RenderListItem.cpp:
2892         (WebCore::RenderListItem::nextListItem):
2893         (WebCore::previousListItem):
2894         (WebCore::RenderListItem::calcValue):
2895         (WebCore::RenderListItem::explicitValueChanged):
2896         (WebCore::previousOrNextItem):
2897         (WebCore::RenderListItem::updateListMarkerNumbers):
2898         * rendering/RenderListItem.h:
2899
2900 2011-12-15  Stephen White  <senorblanco@chromium.org>
2901
2902         Enable CSS_FILTERS in Chromium.
2903         https://bugs.webkit.org/show_bug.cgi?id=74334
2904
2905         Reviewed by Chris Marrin.
2906
2907         Covered by css3/filters (when enabled).
2908
2909         * platform/graphics/filters/FilterOperation.h:
2910         (WebCore::PassthroughFilterOperation::PassthroughFilterOperation):
2911         Since wingdi.h #define's PASSTHROUGH, #undef it after the includes.
2912
2913 2011-12-16  Patrick Gansterer  <paroga@webkit.org>
2914
2915         Unreviewed WinCE build fix after r102979.
2916
2917         Make everHadLayout() public accessible as it was before the change.
2918
2919         * rendering/RenderObject.h:
2920         (WebCore::RenderObject::everHadLayout):
2921
2922 2011-12-15  Hans Wennborg  <hans@chromium.org>
2923
2924         IndexedDB: Don't prefetch values from key cursors
2925         https://bugs.webkit.org/show_bug.cgi?id=74604
2926
2927         Reviewed by Tony Chang.
2928
2929         Since index key cursors don't have values, prefetching should not try
2930         to retrieve them. Doing so trips an ASSERT in debug builds.
2931
2932         This will be tested Chromium-side.
2933
2934         * storage/IDBCursorBackendImpl.cpp:
2935         (WebCore::IDBCursorBackendImpl::prefetchContinueInternal):
2936
2937 2011-12-16  Yosifumi Inoue  <yosin@chromium.org>
2938
2939         [Forms] The "maxlength" attribute on "textarea" tag miscounts hard newlines
2940         https://bugs.webkit.org/show_bug.cgi?id=74686
2941
2942         Reviewed by Kent Tamura.
2943
2944         This patch counts LF in textarea value as two for LF to CRLF conversion on submission.
2945
2946         No new tests. Existing tests cover all changes.
2947
2948         * html/HTMLTextAreaElement.cpp:
2949         (WebCore::computeLengthForSubmission): Count LF as 2 for CR LF conversion on submission.
2950         (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent): Use computeLengthForSubmission instead of numGraphemeClusters.
2951         (WebCore::HTMLTextAreaElement::tooLong): Use computeLengthForSubmission instead of numGraphemeClusters.
2952
2953 2011-12-16  Hajime Morrita  <morrita@chromium.org>
2954
2955         Unreviewed, rolling out r103045.
2956         http://trac.webkit.org/changeset/103045
2957         https://bugs.webkit.org/show_bug.cgi?id=74590
2958
2959         Breaks select-script-onchange.html on Chromium Windows
2960
2961         * html/HTMLSelectElement.cpp:
2962         (WebCore::HTMLSelectElement::typeAheadFind):
2963
2964 2011-12-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2965
2966         Unreviewed. Fix make distcheck.
2967
2968         * GNUmakefile.list.am: Add missing header file.
2969
2970 2011-12-16  Yosifumi Inoue  <yosin@chromium.org>
2971
2972         [Forms] Selection change by type-ahead doesn't fire 'change' event
2973         https://bugs.webkit.org/show_bug.cgi?id=74590
2974
2975         Reviewed by Kent Tamura.
2976
2977         Fire onchange even for type ahead selection.
2978
2979         Test: fast/forms/select/menulist-type-ahead-find.html
2980
2981         * html/HTMLSelectElement.cpp:
2982         (WebCore::HTMLSelectElement::typeAheadFind): Add DispatchChangeEvent when
2983         calling selectOption method.
2984
2985 2011-12-16  Andreas Kling  <kling@webkit.org>
2986
2987         Don't call Document::body() twice in the same function.
2988         <http://webkit.org/b/74683>
2989
2990         Reviewed by Dan Bernstein.
2991
2992         Document::body() is O(n), so we should avoid calling it multiple
2993         times unnecessarily.
2994
2995         * dom/Document.cpp:
2996         (WebCore::Document::updateLayoutIgnorePendingStylesheets):
2997
2998 2011-12-16  Daniel Sievers  <sievers@chromium.org>
2999
3000         [Chromium] Add trace events for decoding and drawing images.
3001         https://bugs.webkit.org/show_bug.cgi?id=74547
3002
3003         Reviewed by James Robinson.
3004
3005         * platform/graphics/skia/ImageSkia.cpp:
3006         (WebCore::drawResampledBitmap):
3007         (WebCore::paintSkBitmap):
3008         (WebCore::Image::drawPattern):
3009         * platform/graphics/skia/NativeImageSkia.cpp:
3010         (WebCore::NativeImageSkia::resizedBitmap):
3011         * platform/image-decoders/bmp/BMPImageDecoder.cpp:
3012         (WebCore::BMPImageDecoder::decode):
3013         * platform/image-decoders/gif/GIFImageDecoder.cpp:
3014         (WebCore::GIFImageDecoder::decode):
3015         * platform/image-decoders/ico/ICOImageDecoder.cpp:
3016         (WebCore::ICOImageDecoder::decode):
3017         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
3018         (WebCore::JPEGImageDecoder::decode):
3019         * platform/image-decoders/png/PNGImageDecoder.cpp:
3020         (WebCore::PNGImageDecoder::decode):
3021         * platform/image-decoders/webp/WEBPImageDecoder.cpp:
3022         (WebCore::WEBPImageDecoder::decode):
3023
3024 2011-12-15  Martin Robinson  <mrobinson@igalia.com>
3025
3026         Fix 'make dist' in preparation for the GTK+ release.
3027
3028         * GNUmakefile.list.am: Add missing header.
3029
3030 2011-12-15  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
3031
3032         Don't create empty files on error.
3033         https://bugs.webkit.org/show_bug.cgi?id=74373
3034
3035         Reviewed by Ryosuke Niwa.
3036
3037         * css/makeprop.pl:
3038         * css/makevalues.pl:
3039         * make-hash-tools.pl:
3040
3041 2011-12-15  Yongjun Zhang  <yongjun_zhang@apple.com>
3042
3043         PODIntervalTree takes 1.7MB memory on www.nytimes.com.
3044         https://bugs.webkit.org/show_bug.cgi?id=73712
3045
3046         Reviewed by Kenneth Russell.
3047
3048         For a RenderBlock which has floating objects inside, we will create a PODIntervalTree and a PODArena with
3049         at least one 16KB chunk.  A page could have a large number of such RenderBlocks and they could take huge
3050         amount of memory.  To fix that, we can create a shared PODArena in the root RenderView.  Instead of having
3051         their own PODArena, each RenderBlock with floating objects could share this PODArena to reduce memory consumption.
3052
3053         The shared PODArena could grow unboundedly if we keep removing and adding floating objects.  We can fix that
3054         by reusing the freed memory in each chunk.  However, a PODArena could allocate objects of different sizes and
3055         it would be complex to keep track of the size for each allocation in PODArena.  To address that, this patch
3056         added class PODFreeListArena<T> which only allocates objects of type T (hence the same size).  We can then use a
3057         free list to track freed nodes inside the chunk and reuse the free nodes in future allocations.
3058
3059         Manually tested on nytimes.com and the heap consumption of PODIntervalTree reduced from 1.7MB to 16KB. Performance
3060         doesn't regress on test PerformanceTests/Layout/floats.html.
3061
3062         * WebCore.xcodeproj/project.pbxproj: add new header file PODFreeListArena.h.
3063         * platform/PODArena.h:
3064         (WebCore::PODArena::~PODArena): change dtor to virtual.
3065         (WebCore::PODArena::Chunk::~Chunk): ditto.
3066         * platform/PODFreeListArena.h: Added.
3067         (WebCore::PODFreeListArena::create): 
3068         (WebCore::PODFreeListArena::allocateObject): allocate an object.
3069         (WebCore::PODFreeListArena::freeObject): free an object, find the right chunk and update its free list.
3070         (WebCore::PODFreeListArena::allocate): allocate memory from the free list or current chunk.
3071         (WebCore::PODFreeListArena::FreeListChunk::FreeListChunk): add m_freeList to track freed cells.
3072         (WebCore::PODFreeListArena::FreeListChunk::allocate): reuse a free cell if there is one.
3073         (WebCore::PODFreeListArena::FreeListChunk::free): make the memory taken by this object is free, and link it to m_freeList.
3074         (WebCore::PODFreeListArena::FreeListChunk::contains): check if a pointer is inside this chunk.
3075         (WebCore::PODFreeListArena::FreeListChunk::hasFreeList): check if this chunk has free cells.
3076         * platform/PODRedBlackTree.h:
3077         (WebCore::PODRedBlackTree::PODRedBlackTree): take PODFreeListArena instead of PODArena, since nodes of a particular PODRedBlackTree
3078             is always of the same size.
3079         (WebCore::PODRedBlackTree::clear): mark all nodes before clearing the tree.
3080         (WebCore::PODRedBlackTree::initIfNeeded): add initIfNeeded to take an external PODFreeListArena.
3081         (WebCore::PODRedBlackTree::add):
3082         (WebCore::PODRedBlackTree::deleteNode): mark the node free in arena after it is removed from the tree.
3083         (WebCore::PODRedBlackTree::markFree): mark all node free in the tree.
3084         * rendering/RenderBlock.cpp:
3085         (WebCore::RenderBlock::insertFloatingObject):
3086         (WebCore::RenderBlock::addOverhangingFloats):
3087         (WebCore::RenderBlock::addIntrudingFloats):
3088         (WebCore::RenderBlock::FloatingObjects::computePlacedFloatsTree):  passing the shared PODFreeListArena to m_placedFloatsTree.
3089         * rendering/RenderBlock.h:
3090         (WebCore::RenderBlock::FloatingObjects::FloatingObjects):
3091         * rendering/RenderView.cpp:
3092         (WebCore::RenderView::intervalArena): create the shared PODFreeListArena lazily.
3093         * rendering/RenderView.h:
3094
3095 2011-12-15  Tony Chang  <tony@chromium.org>
3096
3097         Unreviewed, rollout r102825 because it didn't improve performance.
3098         https://bugs.webkit.org/show_bug.cgi?id=74622
3099
3100         * css/CSSStyleSelector.cpp:
3101         (WebCore::CSSStyleSelector::styleForElement):
3102         (WebCore::CSSStyleSelector::pseudoStyleForElement):
3103
3104 2011-12-15  Ryosuke Niwa  <rniwa@webkit.org>
3105
3106         sizeof(RenderObject) is 32 instead of 24 on Windows
3107         https://bugs.webkit.org/show_bug.cgi?id=74646
3108
3109         Reviewed by Darin Adler.
3110
3111         Make all bitfields in RenderObject to unsigned and wrap them around by RenderObjectBitfields.
3112         Also add a compilation time assertion to make sure we won't grow RenderObject's size unintentionally.
3113
3114         * rendering/RenderBlock.cpp:
3115         (WebCore::RenderBlock::layoutBlock):
3116         (WebCore::RenderBlock::layoutBlockChild):
3117         (WebCore::RenderBlock::markAllDescendantsWithFloatsForLayout):
3118         (WebCore::RenderBlock::layoutColumns):
3119         * rendering/RenderBlock.h:
3120         (WebCore::RenderBlock::FloatWithRect::FloatWithRect):
3121         * rendering/RenderObject.cpp:
3122         (WebCore::SameSizeAsRenderObject::~SameSizeAsRenderObject):
3123         (WebCore::RenderObject::RenderObject):
3124         (WebCore::RenderObject::markContainingBlocksForLayout):
3125         (WebCore::RenderObject::setPreferredLogicalWidthsDirty):
3126         (WebCore::RenderObject::invalidateContainerPreferredLogicalWidths):
3127         (WebCore::RenderObject::styleWillChange):
3128         (WebCore::RenderObject::styleDidChange):
3129         (WebCore::RenderObject::willBeDestroyed):
3130         (WebCore::RenderObject::updateDragState):
3131         * rendering/RenderObject.h:
3132         (WebCore::RenderObject::hasCounterNodeMap):
3133         (WebCore::RenderObject::setHasCounterNodeMap):
3134         (WebCore::RenderObject::childrenInline):
3135         (WebCore::RenderObject::setChildrenInline):
3136         (WebCore::RenderObject::hasColumns):
3137         (WebCore::RenderObject::setHasColumns):
3138         (WebCore::RenderObject::inRenderFlowThread):
3139         (WebCore::RenderObject::setInRenderFlowThread):
3140         (WebCore::RenderObject::isAnonymous):
3141         (WebCore::RenderObject::setIsAnonymous):
3142         (WebCore::RenderObject::isAnonymousBlock):
3143         (WebCore::RenderObject::isFloating):
3144         (WebCore::RenderObject::isPositioned):
3145         (WebCore::RenderObject::isRelPositioned):
3146         (WebCore::RenderObject::isText):
3147         (WebCore::RenderObject::isBox):
3148         (WebCore::RenderObject::isInline):
3149         (WebCore::RenderObject::isDragging):
3150         (WebCore::RenderObject::isReplaced):
3151         (WebCore::RenderObject::isHorizontalWritingMode):
3152         (WebCore::RenderObject::hasLayer):
3153         (WebCore::RenderObject::hasBoxDecorations):
3154         (WebCore::RenderObject::needsLayout):
3155         (WebCore::RenderObject::selfNeedsLayout):
3156         (WebCore::RenderObject::needsPositionedMovementLayout):
3157         (WebCore::RenderObject::needsPositionedMovementLayoutOnly):
3158         (WebCore::RenderObject::posChildNeedsLayout):
3159         (WebCore::RenderObject::needsSimplifiedNormalFlowLayout):
3160         (WebCore::RenderObject::normalChildNeedsLayout):
3161         (WebCore::RenderObject::preferredLogicalWidthsDirty):
3162         (WebCore::RenderObject::hasOverflowClip):
3163         (WebCore::RenderObject::hasTransform):
3164         (WebCore::RenderObject::node):
3165         (WebCore::RenderObject::setPositioned):
3166         (WebCore::RenderObject::setRelPositioned):
3167         (WebCore::RenderObject::setFloating):
3168         (WebCore::RenderObject::setInline):
3169         (WebCore::RenderObject::setHasBoxDecorations):
3170         (WebCore::RenderObject::setIsText):
3171         (WebCore::RenderObject::setIsBox):
3172         (WebCore::RenderObject::setReplaced):
3173         (WebCore::RenderObject::setHorizontalWritingMode):
3174         (WebCore::RenderObject::setHasOverflowClip):
3175         (WebCore::RenderObject::setHasLayer):
3176         (WebCore::RenderObject::setHasTransform):
3177         (WebCore::RenderObject::setHasReflection):
3178         (WebCore::RenderObject::hasReflection):
3179         (WebCore::RenderObject::setHasMarkupTruncation):
3180         (WebCore::RenderObject::hasMarkupTruncation):
3181         (WebCore::RenderObject::selectionState):
3182         (WebCore::RenderObject::setSelectionState):
3183         (WebCore::RenderObject::hasSelectedChildren):
3184         (WebCore::RenderObject::isMarginBeforeQuirk):
3185         (WebCore::RenderObject::isMarginAfterQuirk):
3186         (WebCore::RenderObject::setMarginBeforeQuirk):
3187         (WebCore::RenderObject::setMarginAfterQuirk):
3188         (WebCore::RenderObject::everHadLayout):
3189         (WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
3190         (WebCore::RenderObject::RenderObjectBitfields::selectionState):
3191         (WebCore::RenderObject::RenderObjectBitfields::setSelectionState):
3192         (WebCore::RenderObject::setNeedsPositionedMovementLayout):
3193         (WebCore::RenderObject::setNormalChildNeedsLayout):
3194         (WebCore::RenderObject::setPosChildNeedsLayout):
3195         (WebCore::RenderObject::setNeedsSimplifiedNormalFlowLayout):
3196         (WebCore::RenderObject::setPaintBackground):
3197         (WebCore::RenderObject::setIsDragging):
3198         (WebCore::RenderObject::setEverHadLayout):
3199         (WebCore::RenderObject::setNeedsLayout):
3200         (WebCore::RenderObject::setChildNeedsLayout):
3201         * rendering/RenderObjectChildList.cpp:
3202         (WebCore::RenderObjectChildList::removeChildNode):
3203         * rendering/svg/RenderSVGContainer.cpp:
3204         (WebCore::RenderSVGContainer::layout):
3205
3206 2011-12-15  Wei Charles  <charles.wei@torchmobile.com.cn>
3207
3208         [BlackBerry] Upstream BlackBerry porting of pluginView
3209         https://bugs.webkit.org/show_bug.cgi?id=73397
3210
3211         Reviewed by Daniel Bates.
3212
3213         No new tests for now.
3214
3215         * plugins/blackberry/PluginViewBlackBerry.cpp: Added.
3216
3217 2011-12-15  Joshua Bell  <jsbell@chromium.org>
3218
3219         IndexedDB: Can't pass DOMStringList to IDBDatabase.transaction()
3220         https://bugs.webkit.org/show_bug.cgi?id=74452
3221
3222         Reviewed by Adam Barth.
3223
3224         V8 code generator generated checks for DOMStringList arguments, then
3225         deferred to a function that only handled array inputs. This previously
3226         worked for IndexedDB because it would fall into a now-removed default
3227         handler.
3228
3229         Modified storage/indexeddb/transaction-basics.html to test this.
3230
3231         * bindings/v8/V8Binding.cpp:
3232         (WebCore::v8ValueToWebCoreDOMStringList):
3233
3234 2011-12-15  Adam Klein  <adamk@chromium.org>
3235
3236         Make Element::setAttributeInternal inline in an attempt to avoid function call overhead
3237         https://bugs.webkit.org/show_bug.cgi?id=74638
3238
3239         Reviewed by Andreas Kling.
3240
3241         In r102695, I factored common code in setAttribute into
3242         Element::setAttributeInternal. This may have caused a perf regression
3243         due to the extra function call, which inlining should eliminate.
3244
3245         Running Dromaeo locally suggests that this will improve performance
3246         by ~9% on the "dom-attr element.property = value" test (which assigns
3247         a value to an element's id).
3248
3249         * dom/Element.cpp:
3250         (WebCore::Element::setAttributeInternal):
3251
3252 2011-12-15  Mary Wu  <mary.wu@torchmobile.com.cn>
3253
3254         Upstream FileSystemBlackBerry.cpp into WebCore/platform/blackberry
3255         https://bugs.webkit.org/show_bug.cgi?id=74491
3256
3257         Reviewed by Rob Buis.
3258
3259         We are using POSIX porting of FileSystem, so here only implement other 
3260         necessary functions.
3261
3262         Initial upstream, no new tests.
3263
3264         * platform/blackberry/FileSystemBlackBerry.cpp: Added.
3265         (WebCore::homeDirectoryPath):
3266         (WebCore::fileSystemRepresentation):
3267         (WebCore::unloadModule):
3268         (WebCore::openTemporaryFile):
3269
3270 2011-12-15  Adrienne Walker  <enne@google.com>
3271
3272         [chromium] Clean up unnecessary leaf functions in GraphicsLayerChromium
3273         https://bugs.webkit.org/show_bug.cgi?id=74140
3274
3275         Reviewed by James Robinson.
3276
3277         Tested by existing compositor layout tests.
3278
3279         This is a follow-on cleanup to r102196, which made some of these
3280         functions less useful than they had been in the past.
3281
3282         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
3283         (WebCore::GraphicsLayerChromium::setContentsOpaque):
3284         (WebCore::GraphicsLayerChromium::setBackfaceVisibility):
3285         (WebCore::GraphicsLayerChromium::updateLayerPreserves3D):
3286         * platform/graphics/chromium/GraphicsLayerChromium.h:
3287
3288 2011-12-15  Kenneth Russell  <kbr@google.com>
3289
3290         Unreviewed, rolling out r103000.
3291         http://trac.webkit.org/changeset/103000
3292         https://bugs.webkit.org/show_bug.cgi?id=74658
3293
3294         Does not handle text/plain documents correctly.
3295
3296         * html/parser/HTMLTokenizer.cpp:
3297         * html/parser/HTMLTokenizer.h:
3298         * html/parser/HTMLTreeBuilder.cpp:
3299         * html/parser/HTMLTreeBuilder.h:
3300         * xml/parser/MarkupTokenizerBase.h:
3301
3302 2011-12-15  James Robinson  <jamesr@chromium.org>
3303
3304         [chromium] Set the CCLayerTreeHost pointer on LayerChromium instances eagerly
3305         https://bugs.webkit.org/show_bug.cgi?id=74477
3306
3307         Reviewed by Kenneth Russell.
3308
3309         This enforces that the m_layerTreeHost pointer on LayerChromium instances is always up to date, instead of
3310         lazily setting it in the paintContents loop. There are two invariants:
3311         1.) If a LayerChromium is the root layer of a CCLayerTreeHost, or is reachable via the children, mask, or
3312         replica pointers from the root layer of a CCLayerTreeHost, then that LayerChromium's m_layerTreeHost pointer
3313         refers to that CCLayerTreeHost
3314         2.) If a LayerChromium is not a root layer or reachable from a root layer of any CCLayerTreeHost, its
3315         CCLayerTreeHost pointer is nil.
3316
3317         Covered by several new layout tests in LayerChromiumTest
3318
3319         * platform/graphics/chromium/LayerChromium.cpp:
3320         (WebCore::LayerChromium::setLayerTreeHost):
3321         (WebCore::LayerChromium::setParent):
3322         (WebCore::LayerChromium::setMaskLayer):
3323         (WebCore::LayerChromium::setReplicaLayer):
3324         * platform/graphics/chromium/LayerChromium.h:
3325         * platform/graphics/chromium/TiledLayerChromium.cpp:
3326         (WebCore::TiledLayerChromium::createTile):
3327         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3328         (WebCore::CCLayerTreeHost::setRootLayer):
3329         (WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface):
3330         (WebCore::CCLayerTreeHost::paintLayerContents):
3331         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
3332
3333 2011-12-15  Sheriff Bot  <webkit.review.bot@gmail.com>
3334
3335         Unreviewed, rolling out r102652 and r102717.
3336         http://trac.webkit.org/changeset/102652
3337         http://trac.webkit.org/changeset/102717
3338         https://bugs.webkit.org/show_bug.cgi?id=74674
3339
3340         Broke too many webs. (Requested by kling on #webkit).
3341
3342         * WebCore.exp.in:
3343
3344 2011-12-15  Anders Carlsson  <andersca@apple.com>
3345
3346         Lazily create the scrolling coordinator and add a setting for enabling it
3347         https://bugs.webkit.org/show_bug.cgi?id=74667
3348
3349         Reviewed by Darin Adler.
3350
3351         * WebCore.xcodeproj/project.pbxproj:
3352         Make ScrollingCoordinator.h a private header so it can be used in WebKit.
3353         * page/Page.cpp:
3354         (WebCore::Page::Page):
3355         Don't create the scrolling coordinator.
3356
3357         (WebCore::Page::~Page):
3358         Check for a null scrolling coordinator.
3359
3360         (WebCore::Page::scrollingCoordinator):
3361         Create the scrolling coordinator lazily.
3362
3363         * page/Settings.cpp:
3364         (WebCore::Settings::Settings):
3365         * page/Settings.h:
3366         (WebCore::Settings::setScrollingCoordinatorEnabled):
3367         (WebCore::Settings::scrollingCoordinatorEnabled):
3368         Add a setting for enabling the scrolling coordinator.
3369
3370         * rendering/RenderLayerBacking.cpp:
3371         (WebCore::RenderLayerBacking::RenderLayerBacking):
3372         Use a tile cache layer for the main frame when the scrolling coordinator is neabled.
3373
3374 2011-12-15  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3375
3376         Unreviewed. Fix build break when data-transfer-items is enabled.
3377
3378         * platform/efl/ClipboardEfl.cpp:
3379         (WebCore::ClipboardEfl::items):
3380         * platform/efl/ClipboardEfl.h:
3381
3382 2011-12-15  Adam Barth  <abarth@webkit.org>
3383
3384         <ruby><div><p><rp> parses incorrectly
3385         https://bugs.webkit.org/show_bug.cgi?id=74668
3386
3387         Reviewed by Darin Adler.
3388
3389         This patch updates our implementation to match a change to the HTML5
3390         specification regarding how <ruby> elements parse.  Previously, <rp>
3391         and similar tags used to pop the stack up to the <ruby> element.  Now
3392         the popping does not occur.
3393
3394         Tests: html5lib/runner.html
3395
3396         * html/parser/HTMLTreeBuilder.cpp:
3397
3398 2011-12-15  Daniel Sievers  <sievers@chromium.org>
3399
3400         [Chromium] Avoid strdup() for extra argument when tracing is disabled.
3401         https://bugs.webkit.org/show_bug.cgi?id=74637
3402
3403         Reviewed by James Robinson.
3404
3405         * platform/chromium/TraceEvent.h:
3406         (WebCore::internal::ScopeTracer::ScopeTracer):
3407
3408 2011-12-15  Rafael Weinstein  <rafaelw@chromium.org>
3409
3410         [MutationObservers] Add a document-level flag that can trivially be checked to avoid doing unnessary work if mutation observers absent
3411         https://bugs.webkit.org/show_bug.cgi?id=74641
3412
3413         Reviewed by Ojan Vafai.
3414
3415         This patch adds a byte of flags to Document, of which three bits are used to signal if any
3416         node owned by the document has a Mutation Observer of the given type. This is used to
3417         reduce the cost of discovering there are none to a single (inlined) method call and bit-check.
3418         Also, a similar byte of flags which was used to optimize a particular case when mutation observers
3419         are present has been removed, with the reasoning that we should first focus on minimizing impact on
3420         the null-case before optimizing particular in-use cases.
3421
3422         Also, MutationObserverInterestGroup is broken out into its own file (which probably should have happened
3423         earlier, but now avoids a circular header dependency).
3424
3425         No tests needed. This patch is just a refactor.
3426
3427         * CMakeLists.txt:
3428         * GNUmakefile.list.am:
3429         * Target.pri:
3430         * WebCore.gypi:
3431         * WebCore.vcproj/WebCore.vcproj:
3432         * WebCore.xcodeproj/project.pbxproj:
3433         * css/CSSMutableStyleDeclaration.cpp:
3434         * dom/CharacterData.cpp:
3435         * dom/ChildListMutationScope.cpp:
3436         * dom/Document.cpp:
3437         (WebCore::Document::Document):
3438         * dom/Document.h:
3439         (WebCore::Document::hasMutationObserversOfType):
3440         (WebCore::Document::hasMutationObservers):
3441         (WebCore::Document::addMutationObserverTypes):
3442         * dom/Element.cpp:
3443         * dom/MutationObserverInterestGroup.cpp: Added.
3444         (WebCore::MutationObserverInterestGroup::createIfNeeded):
3445         (WebCore::MutationObserverInterestGroup::MutationObserverInterestGroup):
3446         (WebCore::MutationObserverInterestGroup::isOldValueRequested):
3447         (WebCore::MutationObserverInterestGroup::enqueueMutationRecord):
3448         * dom/MutationObserverInterestGroup.h: Copied from Source/WebCore/dom/WebKitMutationObserver.h.
3449         (WebCore::MutationObserverInterestGroup::createForChildListMutation):
3450         (WebCore::MutationObserverInterestGroup::createForCharacterDataMutation):
3451         (WebCore::MutationObserverInterestGroup::createForAttributesMutation):
3452         (WebCore::MutationObserverInterestGroup::hasOldValue):
3453         * dom/Node.cpp:
3454         (WebCore::Node::didMoveToNewOwnerDocument):
3455         (WebCore::Node::getRegisteredMutationObserversOfType):
3456         (WebCore::Node::notifyMutationObserversNodeWillDetach):
3457         * dom/Node.h:
3458         * dom/WebKitMutationObserver.cpp:
3459         (WebCore::WebKitMutationObserver::observe):
3460         * dom/WebKitMutationObserver.h:
3461
3462 2011-12-15  Adam Barth  <abarth@webkit.org>
3463
3464         <!DOCTYPE html><pre>&#x0a;&#x0a;A</pre> doesn't parse correctly
3465         https://bugs.webkit.org/show_bug.cgi?id=74658
3466
3467         Reviewed by Darin Adler.
3468
3469         Previously, we handled skipping newlines after <pre> in the tokenizer,
3470    &nb