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