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