[chromium] Move contents texture manager from LayerRendererChromium to CCLayerTreeHost
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-09-12  James Robinson  <jamesr@chromium.org>
2
3         [chromium] Move contents texture manager from LayerRendererChromium to CCLayerTreeHost
4         https://bugs.webkit.org/show_bug.cgi?id=67440
5
6         Reviewed by Kenneth Russell.
7
8         This moves the contents TextureManager over to the CCLayerTreeHost, where it belongs, and adds in a commit path
9         to make sure that textures are deleted even if the page is not visible.  This move also removed the need for
10         LayerRendererChromium's CCLayerTreeHost pointer, so I removed that as well.  That meant moving the
11         layerTreeAsText() logic over to the CCLayerImpl side, which is where it really belonged anyway.
12
13         Covered by existing compositing/ tests and
14         platform/chromium/compositor/lost-compositor-context-with-rendersurface.html
15
16         * platform/graphics/chromium/LayerRendererChromium.cpp:
17         (WebCore::LayerRendererChromium::releaseRenderSurfaceTextures):
18         (WebCore::LayerRendererChromium::drawLayers):
19         (WebCore::LayerRendererChromium::initializeSharedObjects):
20         (WebCore::LayerRendererChromium::cleanupSharedObjects):
21         * platform/graphics/chromium/LayerRendererChromium.h:
22         (WebCore::LayerRendererChromium::setContentsTextureMemoryUseBytes):
23         * platform/graphics/chromium/TextureManager.cpp:
24         (WebCore::TextureManager::highLimitBytes):
25         (WebCore::TextureManager::reclaimLimitBytes):
26         (WebCore::TextureManager::lowLimitBytes):
27         * platform/graphics/chromium/TextureManager.h:
28         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
29         (WebCore::CCLayerTreeHost::initialize):
30         (WebCore::CCLayerTreeHost::~CCLayerTreeHost):
31         (WebCore::CCLayerTreeHost::deleteContentsTextures):
32         (WebCore::CCLayerTreeHost::commitTo):
33         (WebCore::CCLayerTreeHost::setVisible):
34         (WebCore::CCLayerTreeHost::contentsTextureManager):
35         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
36         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
37         (WebCore::CCLayerTreeHostImpl::setVisible):
38         * platform/graphics/chromium/cc/CCProxy.h:
39         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
40         (WebCore::CCSingleThreadProxy::setNeedsCommit):
41         (WebCore::CCSingleThreadProxy::stop):
42         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
43         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
44         (WebCore::CCThreadProxy::setNeedsCommit):
45         (WebCore::CCThreadProxy::setNeedsCommitOnCCThread):
46         (WebCore::CCThreadProxy::layerTreeHostClosedOnCCThread):
47         * platform/graphics/chromium/cc/CCThreadProxy.h:
48
49 2011-09-12  Chris Rogers  <crogers@google.com>
50
51         DelayNode delay buffer is not correctly wrapping around
52         https://bugs.webkit.org/show_bug.cgi?id=67872
53
54         Reviewed by Kenneth Russell.
55
56         Test: webaudio/delaynode.html
57
58         * webaudio/DelayDSPKernel.cpp:
59         (WebCore::DelayDSPKernel::process):
60
61 2011-09-12  Arko Saha  <arko@motorola.com>
62
63         Selectstart is not fired when selection was created by arrow keys.
64         https://bugs.webkit.org/show_bug.cgi?id=60430
65
66         Reviewed by Ryosuke Niwa.
67
68         Fire selectstart when a user starts extending the selection using arrow key.
69         Fixed by Arko Saha  <arko@motorola.com> and Kaustubh Atrawalkar  <kaustubh@motorola.com>
70
71         Tests: fast/events/selectstart-by-arrow-keys-prevent-default.html
72                fast/events/selectstart-by-arrow-keys.html
73
74         * editing/FrameSelection.cpp:
75         (WebCore::FrameSelection::modify):
76         (WebCore::FrameSelection::shouldChangeSelection):
77         (WebCore::FrameSelection::dispatchSelectStart):
78         * editing/FrameSelection.h:
79
80 2011-09-12  James Robinson  <jamesr@chromium.org>
81
82         [chromium] REGRESSION(94353): Compositor textures and resources leaked when tab closed that is not last tab in the process
83         https://bugs.webkit.org/show_bug.cgi?id=67816
84
85         Reviewed by Kenneth Russell.
86
87         We lack infrastructure to construct an automated test for this today. To test manually, open up a composited
88         page (like the poster circle), duplicate the tab many times, close all the duplicates, and verify that the
89         memory use returns to the single tab level.
90
91         * platform/graphics/chromium/LayerChromium.h:
92         * platform/graphics/chromium/TiledLayerChromium.cpp:
93         (WebCore::TiledLayerChromium::setLayerTreeHost):
94         * platform/graphics/chromium/VideoLayerChromium.cpp:
95         (WebCore::VideoLayerChromium::setLayerTreeHost):
96         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
97         (WebCore::CCLayerTreeHost::clearRenderSurfacesRecursive):
98         (WebCore::CCLayerTreeHost::setRootLayer):
99         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
100
101 2011-09-12  Kentaro Hara  <haraken@google.com>
102
103         Implement a HashChangeEvent constructor for JSC
104         https://bugs.webkit.org/show_bug.cgi?id=67924
105
106         Reviewed by Sam Weinig.
107
108         The spec for the HashChangeEvent constructor is here:
109         http://www.whatwg.org/specs/web-apps/current-work/#hashchangeevent
110
111         Test: fast/events/constructors/hash-change-event-constructor.html
112
113         * bindings/generic/EventConstructors.h: Added a definition for the HashChangeEvent constructor.
114         * bindings/js/JSEventConstructors.cpp: Added #includes for HashChangeEvent.
115         * dom/HashChangeEvent.h: Added a definition for HashChangeEventInit.
116         (WebCore::HashChangeEventInit::HashChangeEventInit):
117         (WebCore::HashChangeEvent::create):
118         (WebCore::HashChangeEvent::HashChangeEvent):
119         * dom/HashChangeEvent.idl: Makes HashChangeEvent constructible.
120
121 2011-09-12  Mike Reed  <reed@google.com>
122
123         [skia] remove dead code, no functionality change
124         https://bugs.webkit.org/show_bug.cgi?id=67844
125
126         Reviewed by Kenneth Russell.
127
128         No new tests. just removing dead-code, existing tests apply
129
130         * platform/graphics/chromium/FontChromiumWin.cpp:
131         (WebCore::Font::drawGlyphs):
132
133 2011-09-12  Pavel Feldman  <pfeldman@google.com>
134
135         Web Inspector: Runtime.callFunctionOn does not accept arguments that evaluate to false.
136         https://bugs.webkit.org/show_bug.cgi?id=67934
137
138         Reviewed by Tony Gentilcore.
139
140         * inspector/InjectedScriptSource.js:
141
142 2011-09-12  Pavel Feldman  <pfeldman@google.com>
143
144         Web Inspector: event dividers do not update timeline boundaries.
145         https://bugs.webkit.org/show_bug.cgi?id=67932
146
147         * inspector/front-end/NetworkPanel.js:
148         (WebInspector.NetworkLogView.prototype._onLoadEventFired):
149         (WebInspector.NetworkLogView.prototype._domContentLoadedEventFired):
150         (WebInspector.NetworkLogView.prototype.refresh):
151         (WebInspector.NetworkTimeCalculator.prototype.updateBoundariesForEventTime):
152
153 2011-09-12  Kentaro Hara  <haraken@google.com>
154
155         Implement a WebKitAnimationEvent constructor for V8
156         https://bugs.webkit.org/show_bug.cgi?id=67922
157
158         Reviewed by Adam Barth.
159
160         Test: fast/events/constructors/webkit-animation-event-constructor.html
161
162         * bindings/v8/custom/V8EventConstructors.cpp: Added the WebKitAnimationEvent constructor.
163         * dom/WebKitAnimationEvent.idl: Added a 'V8CustomConstructor' attribute.
164
165 2011-09-12  Andreas Kling  <kling@webkit.org>
166
167         Shrink CanvasGradient for builds without ENABLE(DASHBOARD_SUPPORT).
168         https://bugs.webkit.org/show_bug.cgi?id=67916
169
170         Reviewed by Kenneth Rohde Christiansen.
171
172         * html/canvas/CanvasGradient.cpp:
173         (WebCore::CanvasGradient::CanvasGradient):
174         (WebCore::CanvasGradient::addColorStop):
175         * html/canvas/CanvasGradient.h:
176
177 2011-09-12  Shinya Kawanaka  <shinyak@google.com>
178
179         Characters beyond U+10000 should be deleted by one pressing delete key.
180         https://bugs.webkit.org/show_bug.cgi?id=40351
181
182         Reviewed by Kent Tamura.
183
184         If a character is the trail part of unicode surrogate pair, the lead part of it
185         should also be deleted. Also, If in MacOSX, the deletion should honor Mac's behavior.
186
187         Test: editing/deleting/delete-surrogatepair.html
188
189         * rendering/RenderText.cpp:
190         (WebCore::RenderText::previousOffsetForBackwardDeletion):
191           Added if-macro to support chromium on mac, and added trail part check for unicode character.
192
193 2011-09-11  Kentaro Hara  <haraken@google.com>
194
195         Implement a ProgressEvent constructor for V8
196         https://bugs.webkit.org/show_bug.cgi?id=67800
197
198         Reviewed by Sam Weinig.
199
200         Test: fast/events/constructors/progress-event-constructor.html
201
202         * bindings/js/JSDictionary.cpp:
203         (WebCore::JSDictionary::convertValue): Replaced UnsignedLongLongMax with std::numeric_limits<unsigned long long>::max().
204         * bindings/v8/OptionsObject.cpp:
205         (WebCore::OptionsObject::getKeyValue): Returns an unsigned long long value corresponding to a given key. Spec: http://www.w3.org/TR/WebIDL/#es-unsigned-long-long
206         * bindings/v8/OptionsObject.h:
207         * bindings/v8/custom/V8EventConstructors.cpp: Added the ProgressEvent constructor.
208         * dom/ProgressEvent.idl: Added a 'V8CustomConstructor' attribute.
209
210 2011-09-11  Dimitri Glazkov  <dglazkov@chromium.org>
211
212         REGRESSION (r87351): toggling display of lots (thousands) of elements with display:none is very slow
213         https://bugs.webkit.org/show_bug.cgi?id=67581
214
215         Reviewed by Darin Adler.
216
217         Test: perf/show-hide-table-rows.html
218
219         * dom/NodeRenderingContext.cpp:
220         (WebCore::NodeRendererFactory::createRendererAndStyle): Moved style-creating code into createRendererIfNeeded, renamed
221             to createRenderer.
222         (WebCore::NodeRendererFactory::createRendererIfNeeded): Re-arrange code to avoid unnecessary creation of renderers.
223
224 2011-09-11  Jeremy Moskovich  <jeremy@chromium.org>
225
226         [Chromium] Change OOP Font loading code to use CGFont*() APIs.
227         https://bugs.webkit.org/show_bug.cgi?id=66935
228
229         This change is necessary due a bug in ATSFontDeactivate() on 10.7.
230         See crbug.com/93191 for details.
231
232         Reviewed by Eric Seidel.
233
234         No new tests - covered by existing tests.
235
236         * platform/chromium/PlatformBridge.h:
237         * platform/graphics/chromium/CrossProcessFontLoading.h:
238         * platform/graphics/chromium/CrossProcessFontLoading.mm:
239         (WebCore::MemoryActivatedFont::create):
240         (WebCore::MemoryActivatedFont::MemoryActivatedFont):
241         (WebCore::MemoryActivatedFont::~MemoryActivatedFont):
242
243 2011-09-09  Oliver Hunt  <oliver@apple.com>
244
245         Remove support for anonymous storage from jsobjects
246         https://bugs.webkit.org/show_bug.cgi?id=67881
247
248         Reviewed by Sam Weinig.
249
250         Remove all use of anonymous slots, this required modifying
251         bindings generation to add member variables for cached attributes,
252         and override visitChildren with the necessary logic to mark those
253         new members.
254
255         I added bindings generation tests for these values.
256
257         * bindings/js/JSAudioConstructor.h:
258         (WebCore::JSAudioConstructor::createStructure):
259         * bindings/js/JSDOMBinding.h:
260         (WebCore::DOMConstructorObject::createStructure):
261         * bindings/js/JSDOMGlobalObject.h:
262         (WebCore::JSDOMGlobalObject::createStructure):
263         * bindings/js/JSDOMWindowBase.h:
264         (WebCore::JSDOMWindowBase::createStructure):
265         * bindings/js/JSDOMWindowShell.h:
266         (WebCore::JSDOMWindowShell::createStructure):
267         * bindings/js/JSDOMWrapper.h:
268         (WebCore::JSDOMWrapper::createStructure):
269         * bindings/js/JSImageConstructor.h:
270         (WebCore::JSImageConstructor::createStructure):
271         * bindings/js/JSMessageEventCustom.cpp:
272         (WebCore::JSMessageEvent::data):
273         (WebCore::JSMessageEvent::initMessageEvent):
274         * bindings/js/JSOptionConstructor.h:
275         (WebCore::JSOptionConstructor::createStructure):
276         * bindings/js/JSWorkerContextBase.h:
277         (WebCore::JSWorkerContextBase::createStructure):
278         * bindings/scripts/CodeGeneratorJS.pm:
279         (GenerateHeader):
280         (GenerateImplementation):
281         (GenerateConstructorDeclaration):
282         * bindings/scripts/test/JS/JSTestInterface.cpp:
283         (WebCore::JSTestInterfaceConstructor::createStructure):
284         * bindings/scripts/test/JS/JSTestInterface.h:
285         (WebCore::JSTestInterface::createStructure):
286         (WebCore::JSTestInterfacePrototype::createStructure):
287         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
288         (WebCore::JSTestMediaQueryListListenerConstructor::createStructure):
289         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
290         (WebCore::JSTestMediaQueryListListener::createStructure):
291         (WebCore::JSTestMediaQueryListListenerPrototype::createStructure):
292         * bindings/scripts/test/JS/JSTestObj.cpp:
293         (WebCore::JSTestObjConstructor::createStructure):
294         (WebCore::jsTestObjCachedAttribute1):
295         (WebCore::jsTestObjCachedAttribute2):
296         (WebCore::JSTestObj::visitChildren):
297         * bindings/scripts/test/JS/JSTestObj.h:
298         (WebCore::JSTestObj::createStructure):
299         (WebCore::JSTestObjPrototype::createStructure):
300         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
301         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::createStructure):
302         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
303         (WebCore::JSTestSerializedScriptValueInterface::createStructure):
304         (WebCore::JSTestSerializedScriptValueInterfacePrototype::createStructure):
305         * bindings/scripts/test/TestObj.idl:
306         * bindings/scripts/test/V8/V8TestObj.cpp:
307         (WebCore::TestObjInternal::cachedAttribute1AttrGetter):
308         (WebCore::TestObjInternal::cachedAttribute2AttrGetter):
309         * bridge/c/CRuntimeObject.h:
310         (JSC::Bindings::CRuntimeObject::createStructure):
311         * bridge/c/c_instance.cpp:
312         (JSC::Bindings::CRuntimeMethod::createStructure):
313         * bridge/jni/jsc/JavaInstanceJSC.cpp:
314         (JavaRuntimeMethod::createStructure):
315         * bridge/jni/jsc/JavaRuntimeObject.h:
316         (JSC::Bindings::JavaRuntimeObject::createStructure):
317         * bridge/objc/ObjCRuntimeObject.h:
318         (JSC::Bindings::ObjCRuntimeObject::createStructure):
319         * bridge/objc/objc_instance.mm:
320         (ObjCRuntimeMethod::createStructure):
321         * bridge/objc/objc_runtime.h:
322         (JSC::Bindings::ObjcFallbackObjectImp::createStructure):
323         * bridge/runtime_array.h:
324         (JSC::RuntimeArray::createStructure):
325         * bridge/runtime_method.h:
326         (JSC::RuntimeMethod::createStructure):
327         * bridge/runtime_object.h:
328         (JSC::Bindings::RuntimeObject::createStructure):
329
330 2011-09-01  Filip Pizlo  <fpizlo@apple.com>
331
332         The executable allocator makes it difficult to free individual
333         chunks of executable memory
334         https://bugs.webkit.org/show_bug.cgi?id=66363
335
336         Reviewed by Oliver Hunt.
337         
338         Introduced a best-fit, balanced-tree based allocator. The allocator
339         required a balanced tree that does not allocate memory and that
340         permits the removal of individual nodes directly (as opposed to by
341         key); neither AVLTree nor WebCore's PODRedBlackTree supported this.
342         Changed all references to executable code to use a reference counted
343         handle.
344
345         No new layout tests because behavior is not changed.  New API unit
346         tests:
347         Tests/WTF/RedBlackTree.cpp
348         Tests/WTF/MetaAllocator.cpp
349
350         * ForwardingHeaders/wtf/MetaAllocatorHandle.h: Added.
351
352 2011-09-10  Sam Weinig  <sam@webkit.org>
353
354         Add isInterruptedExecutionException and isTerminatedExecutionException predicates
355         https://bugs.webkit.org/show_bug.cgi?id=67892
356
357         Reviewed by Andy "First Time Reviewer" Estes.
358
359         * bindings/js/JSDOMBinding.cpp:
360         (WebCore::reportException):
361         * bindings/js/JSEventListener.cpp:
362         (WebCore::JSEventListener::handleEvent):
363         * bindings/js/WorkerScriptController.cpp:
364         (WebCore::WorkerScriptController::evaluate):
365         Use the new predicates instead of probing the ClassInfo directly.
366
367 2011-09-10  Kevin Ollivier  <kevino@theolliviers.com>
368
369         [wx] Unreviewed build fix. MSW build fixes.
370
371         * config.h:
372
373 2011-09-09  David Hyatt  <hyatt@apple.com>
374
375         https://bugs.webkit.org/show_bug.cgi?id=67861
376         
377         Implement border-image-outset (and the mask equivalents).
378
379         Reviewed by Beth Dakin.
380
381         Added new tests in fast/borders and fast/reflections.
382
383         * css/CSSBorderImageValue.cpp:
384         (WebCore::CSSBorderImageValue::CSSBorderImageValue):
385         (WebCore::CSSBorderImageValue::cssText):
386         * css/CSSBorderImageValue.h:
387         (WebCore::CSSBorderImageValue::create):
388         Add m_outset field to CSSBorderImageValue and teach it how to dump the field as
389         part of cssText().
390
391         * css/CSSComputedStyleDeclaration.cpp:
392         (WebCore::valueForNinePieceImageQuad):
393         (WebCore::valueForNinePieceImage):
394         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
395         Add support for border-image-outset and -webkit-mask-box-image-outset. Refactor
396         the code so that border-image-width and border-image-outset use a common
397         function.
398
399         * css/CSSParser.cpp:
400         (WebCore::CSSParser::parseValue):
401         (WebCore::BorderImageParseContext::BorderImageParseContext):
402         (WebCore::BorderImageParseContext::allowOutset):
403         (WebCore::BorderImageParseContext::commitSlash):
404         (WebCore::BorderImageParseContext::commitBorderWidth):
405         (WebCore::BorderImageParseContext::commitBorderOutset):
406         (WebCore::BorderImageParseContext::commitRepeat):
407         (WebCore::BorderImageParseContext::commitBorderImage):
408         (WebCore::CSSParser::parseBorderImage):
409         Teach the border image parsing code about outsets. This code will soon be
410         replaced by true shorthand parsing code, but for now keep it working and add
411         outset support to it.
412
413         (WebCore::BorderImageQuadParseContext::BorderImageQuadParseContext):
414         (WebCore::BorderImageQuadParseContext::commitBorderImageQuad):
415         (WebCore::CSSParser::parseBorderImageQuad):
416         (WebCore::CSSParser::parseBorderImageWidth):
417         (WebCore::CSSParser::parseBorderImageOutset):
418         * css/CSSParser.h:
419         Refactor the border-image-width code so that it can be shared by border-image-outset, since
420         they are extremely similar.
421
422         * css/CSSPropertyNames.in:
423         Add the new properties.
424
425         * css/CSSStyleSelector.cpp:
426         (WebCore::CSSStyleSelector::applyProperty):
427         (WebCore::CSSStyleSelector::mapNinePieceImage):
428         (WebCore::CSSStyleSelector::mapNinePieceImageQuad):
429         (WebCore::CSSStyleSelector::loadPendingImages):
430         * css/CSSStyleSelector.h:
431         Refactor the code so that width/outset share common mapping functions. Add support for outset.
432
433         * rendering/InlineFlowBox.cpp:
434         (WebCore::InlineFlowBox::addToLine):
435         (WebCore::InlineFlowBox::addBoxShadowVisualOverflow):
436         (WebCore::InlineFlowBox::addBorderOutsetVisualOverflow):
437         (WebCore::InlineFlowBox::computeOverflow):
438         Add new functions for computing the visual overflow caused by border outsets. Fix bugs in
439         the shadow overflow code as well.
440
441         (WebCore::clipRectForNinePieceImageStrip):
442         (WebCore::InlineFlowBox::paintBoxDecorations):
443         (WebCore::InlineFlowBox::paintMask):
444         * rendering/InlineFlowBox.h:
445         Make sure the clip rect pushed when painting one piece of a split inline strip is expanded to
446         include the border and mask outsets. Always include the block direction expansion, and conditionally
447         include the inline direction expansion based off includeLogicalLeftEdge()/includeLogicalRightEdge().
448         clipRectForNinePieceImageStrip is a common function shared by masks and border images that does this
449         work.
450
451         * rendering/RenderBlock.cpp:
452         (WebCore::RenderBlock::computeOverflow):
453         * rendering/RenderBox.cpp:
454         (WebCore::RenderBox::maskClipRect):
455         (WebCore::RenderBox::addBoxShadowAndBorderOverflow):
456         * rendering/RenderBox.h:
457         Rename addShadowOverflow to addBoxShadowAndBorderOverflow. Have it compute both shadow and border image
458         outset overflow. Fix bugs with shadow overflow computation.
459
460         * rendering/RenderBoxModelObject.cpp:
461         (WebCore::RenderBoxModelObject::paintNinePieceImage):
462         Change painting to apply the outsets to inflate the border image drawing area.
463
464         * rendering/RenderEmbeddedObject.cpp:
465         (WebCore::RenderEmbeddedObject::layout):
466         * rendering/RenderIFrame.cpp:
467         (WebCore::RenderIFrame::layout):
468         Patched to call the renamed addBoxShadowAndBorderOverflow function instead of addShadowOverflow.
469
470         * rendering/RenderLayer.cpp:
471         (WebCore::RenderLayer::calculateRects):
472         Patched to no longer apply box-shadow to overflow clip areas when inflating the intersection area for the
473         layer bounds. Instead we generically apply all visual overflow so that border image outsets will also be
474         included. This fixes https://bugs.webkit.org/show_bug.cgi?id=37467.
475
476         * rendering/RenderReplaced.cpp:
477         (WebCore::RenderReplaced::layout):
478         Patched to call the renamed addBoxShadowAndBorderOverflow function instead of addShadowOverflow.
479
480         * rendering/style/NinePieceImage.cpp:
481         (WebCore::NinePieceImage::operator==):
482         * rendering/style/NinePieceImage.h:
483         (WebCore::NinePieceImage::NinePieceImage):
484         (WebCore::NinePieceImage::outset):
485         (WebCore::NinePieceImage::setOutset):
486         (WebCore::NinePieceImage::computeOutset):
487         (WebCore::NinePieceImage::copyOutsetFrom):
488         Add the outset field to NinePieceImage along with some helpers for manipulating outsets.
489
490         * rendering/style/RenderStyle.cpp:
491         (WebCore::RenderStyle::getImageOutsets):
492         (WebCore::RenderStyle::getImageHorizontalOutsets):
493         (WebCore::RenderStyle::getImageVerticalOutsets):
494         * rendering/style/RenderStyle.h:
495         (WebCore::InheritedFlags::hasBorderImageOutsets):
496         (WebCore::InheritedFlags::getBorderImageOutsets):
497         (WebCore::InheritedFlags::getBorderImageHorizontalOutsets):
498         (WebCore::InheritedFlags::getBorderImageVerticalOutsets):
499         (WebCore::InheritedFlags::getBorderImageInlineDirectionOutsets):
500         (WebCore::InheritedFlags::getBorderImageBlockDirectionOutsets):
501         (WebCore::InheritedFlags::getImageInlineDirectionOutsets):
502         (WebCore::InheritedFlags::getImageBlockDirectionOutsets):
503         Helpers for outset computation used by painting and overflow functions.
504
505 2011-09-10  Dan Bernstein  <mitz@apple.com>
506
507         Actually prevent unnecessary casts to MediaControls*.
508
509         Reviewed by Oliver Hunt.
510
511         * html/shadow/MediaControls.h:
512
513 2011-09-10  Ryosuke Niwa  <rniwa@webkit.org>
514
515         Remove printf added by r94900.
516
517         * rendering/RenderLayer.cpp:
518         (WebCore::RenderLayer::drawPlatformResizerImage):
519
520 2011-09-09  Chris Marrin  <cmarrin@apple.com>
521
522         requestAnimationFrame doesn't throttle on Mac
523         https://bugs.webkit.org/show_bug.cgi?id=67171
524
525         Reviewed by Simon Fraser.
526
527         Changed requestAnimationFrame to use a Timer in ScriptedAnimationController
528         on Mac, rather than runLoopObservers. The Timer is throttled to fire no
529         faster than every 15ms. It is behind a WTF_USE_REQUEST_ANIMATION_FRAME_TIMER
530         flag and can be used by any implementation, but currently it is only enabled
531         by PLATFORM(MAC).
532
533         * dom/ScriptedAnimationController.cpp:
534         (WebCore::ScriptedAnimationController::ScriptedAnimationController):
535         (WebCore::ScriptedAnimationController::resume):
536         (WebCore::ScriptedAnimationController::registerCallback):
537         (WebCore::ScriptedAnimationController::serviceScriptedAnimations):
538         (WebCore::ScriptedAnimationController::scheduleAnimation):
539         (WebCore::ScriptedAnimationController::animationTimerFired):
540         * dom/ScriptedAnimationController.h:
541         * loader/EmptyClients.h:
542         * page/Chrome.cpp:
543         (WebCore::Chrome::scheduleAnimation):
544         * page/ChromeClient.h:
545
546 2011-09-10  Jarred Nicholls  <jarred@sencha.com>
547
548         [Qt] QWebSettings::setUserStyleSheetUrl() does not work with windows paths that contain drive letters
549         https://bugs.webkit.org/show_bug.cgi?id=34884
550         
551         KURL::path() alone does not handle removing the leading slash from a windows file path.
552         Using QUrl::toLocalFile() will turn file:///C:/path into C:/path appropriately.
553
554         Reviewed by Andreas Kling.
555
556         * platform/qt/KURLQt.cpp:
557         (WebCore::KURL::fileSystemPath):
558
559 2011-09-10  Ken Buchanan <kenrb@chromium.org>
560
561         Crash due to bad data in SVGDocumentExtensions m_pendingResources
562         https://bugs.webkit.org/show_bug.cgi?id=67488
563
564         Reviewed by Nikolas Zimmermann.
565
566         Resolving a crash condition caused by the deletion of
567         elements while pending resource entries for those elements are still
568         recorded.
569
570         * rendering/svg/RenderSVGResourceContainer.cpp:
571         (WebCore::RenderSVGResourceContainer::registerResource)
572         * svg/SVGDocumentExtensions.h:
573         (WebCore::SVGDocumentExtensions::isElementInPendingResources)
574         * svg/SVGDocumentExtensions.cpp:
575         (WebCore::SVGDocumentExtensions::addPendingResource)
576         (WebCore::SVGDocumentExtensions::isElementInPendingResources)
577         (WebCore::SVGDocumentExtensions::removeElementFromPendingResources)
578         * svg/SVGStyledElement.h:
579         (WebCore::SVGStyledElement::clearHasPendingResourcesIfPossible)
580         * svg/SVGStyledElement.cpp:
581         (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded)
582         (WebCore::SVGStyledElement::clearHasPendingResourcesIfPossible)
583         * svg/SVGUseElement.cpp:
584         (WebCore::SVGUseElement::svgAttributeChanged)
585
586 2011-09-10  Adam Barth  <abarth@webkit.org>
587
588         Remove DocumentWriter::deprecatedFrameEncoding()
589         https://bugs.webkit.org/show_bug.cgi?id=67882
590
591         Reviewed by Eric Seidel.
592
593         Three years ago, in http://trac.webkit.org/changeset/39026, Alexey
594         Proskuryakov added ContentDispositionEncodingFallbackArray to work
595         around a web site compatibility issue with a non-ASCII file name
596         becoming garbled when received in the Content-Disposition header.
597
598         Since that time, there has been copious discussion of this topic among
599         browser vendors, in the IETF, and in the broader web community.  For
600         example, here is a Stack Overflow thread about this topic:
601
602         http://stackoverflow.com/questions/93551/how-to-encode-the-filename-parameter-of-content-disposition-header-in-http
603
604         Eric Lawrence has written a blog post that summarizes IE's perspective
605         on this issue:
606
607         http://blogs.msdn.com/b/ieinternals/archive/2010/06/07/content-disposition-attachment-and-international-unicode-characters.aspx
608
609         The current consensus is that browsers should implement RFC 6266,
610         which is a new RFC that updates the definition of the
611         Content-Disposition header.  Chrome and Firefox have both implemented
612         RFC 6266 and have encountered only one issue, which was then fixed by
613         the web site operator.  IE has also implemented RFC 6266, but I don't
614         have detailed information about their compatibility experience.
615
616         This patch add explicit PLATFORM #ifdefs around the quirky
617         implementation previously used in Apple's Mac and Windows ports.  This
618         code is already only used on Apple's ports, so this patch introduces no
619         functional changes.  It does, however, discourage other ports from
620         adopting this quirk.  IMHO, Apple should remove this quirk as soon as
621         compatibility allows and converge behavior with the other major browser
622         vendors.
623
624         See bug for manual test (the bug manifests in Safari download UI).
625
626         * loader/DocumentWriter.cpp:
627         * loader/DocumentWriter.h:
628         * loader/FrameLoader.cpp:
629         (WebCore::FrameLoader::addExtraFieldsToRequest):
630         * platform/network/ResourceRequestBase.cpp:
631         (WebCore::ResourceRequestBase::adopt):
632         (WebCore::ResourceRequestBase::copyData):
633         * platform/network/ResourceRequestBase.h:
634
635 2011-09-09  Beth Dakin  <bdakin@apple.com>
636
637         Attempted Leopard build fix.
638
639         * rendering/RenderImage.cpp:
640         (WebCore::RenderImage::paintReplaced):
641         * rendering/RenderLayer.cpp:
642         (WebCore::RenderLayer::drawPlatformResizerImage):
643
644 2011-09-09  Beth Dakin  <bdakin@apple.com>
645
646         Fix for https://bugs.webkit.org/show_bug.cgi?id=67819
647         Use high resolution platform images when the deviceScaleFactor > 1
648         -and corresponding-
649         <rdar://problem/10003098>
650
651         Reviewed by Darin Adler.
652
653         Add all of the new high resolution images. I also removed some tiffs from the 
654         project and replaced them with png equivalents (that are already checked into 
655         WebCore anyway). Since the high resolution images are pngs, it makes sense to use 
656         pngs for all of the images that load through Image::loadPlatformResource()
657         * WebCore.xcodeproj/project.pbxproj:
658         * platform/graphics/mac/ImageMac.mm:
659         (WebCore::Image::loadPlatformResource):
660
661         Load the @2x resource for deviceScaleFactors >= 2.
662         * editing/DeleteButtonController.cpp:
663         (WebCore::DeleteButtonController::createDeletionUI):
664
665         CachedImage::brokenImage() is no longer a static helper function, but a real 
666         member function. It also now loads the @2x resource for deviceScaleFactors >= 2 
667         and takes a parameter for the deviceScaleFactor. When CachedImage::image() returns 
668         the brokenImage(), it just returns the 1x version. brokenImage() has to be called 
669         directly to reliably return the deviceScaleFactor-appropriate resource.
670         * loader/cache/CachedImage.cpp:
671         (WebCore::CachedImage::brokenImage):
672         (WebCore::CachedImage::image):
673         * loader/cache/CachedImage.h:
674         * rendering/RenderLayer.cpp:
675         (WebCore::RenderLayer::drawPlatformResizerImage):
676         (WebCore::RenderLayer::paintResizer):
677         * rendering/RenderLayer.h:
678
679         New static function to retrieve the deviceScaleFactor for callers that do not have 
680         direct access to a Page.
681         * page/Page.cpp:
682         (WebCore::Page::deviceScaleFactor):
683         * page/Page.h:
684
685         Call CachedImage::brokenImage() for the broken-image image at an accurate 
686         resolution.
687         * rendering/RenderImage.cpp:
688         (WebCore::RenderImage::imageSizeForError):
689         (WebCore::RenderImage::paintReplaced):
690
691 2011-09-09  Erik Arvidsson  <arv@chromium.org>
692
693         Move Element.contains to Node
694         https://bugs.webkit.org/show_bug.cgi?id=67651
695
696         Reviewed by Darin Adler.
697
698         This moves the contains method from Element to Node as in the DOM4 working draft: 
699         http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-node-contains
700
701         This also special cases Document contains to make it O(1) instead of O(depth).
702
703         Tests: fast/dom/Node/contains-method.html
704                perf/document-contains.html
705
706         * bindings/objc/PublicDOMInterfaces.h: Move contains from DOMElement to DOMNode.
707         * dom/Element.idl:
708         * dom/Node.cpp:
709         (WebCore::Node::contains): Added document special case.
710         * dom/Node.idl:
711         * editing/DeleteSelectionCommand.cpp:
712         (WebCore::DeleteSelectionCommand::mergeParagraphs): Added a null check.
713
714 2011-09-09  Tim Horton  <timothy_horton@apple.com>
715
716         Text rendered with a simple (i.e. 0px blur) shadow inside a transparency layer has a double shadow
717         https://bugs.webkit.org/show_bug.cgi?id=67543
718         <rdar://problem/10070536>
719
720         Reviewed by Darin Adler.
721
722         Generalize (begin|end)TransparencyLayer, which now forward
723         through to (begin|end)PlatformTransparencyLayer, so that
724         isInTransparencyLayer can exist on every platform.
725
726         Make use of isInTransparencyLayer in FontMac to disable
727         "simple" shadow drawing when the text is being rendered
728         into a transparency layer.
729
730         Test: svg/custom/simple-text-double-shadow.svg
731
732         * platform/graphics/GraphicsContext.cpp:
733         (WebCore::GraphicsContext::GraphicsContext):
734         (WebCore::GraphicsContext::~GraphicsContext):
735         (WebCore::GraphicsContext::beginTransparencyLayer):
736         (WebCore::GraphicsContext::endTransparencyLayer):
737         (WebCore::GraphicsContext::isInTransparencyLayer):
738         * platform/graphics/GraphicsContext.h:
739         * platform/graphics/cairo/GraphicsContextCairo.cpp:
740         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
741         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
742         (WebCore::GraphicsContext::supportsTransparencyLayers):
743         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
744         * platform/graphics/cg/GraphicsContextCG.cpp:
745         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
746         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
747         (WebCore::GraphicsContext::supportsTransparencyLayers):
748         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
749         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
750         * platform/graphics/haiku/GraphicsContextHaiku.cpp:
751         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
752         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
753         (WebCore::GraphicsContext::supportsTransparencyLayers):
754         * platform/graphics/mac/FontMac.mm:
755         (WebCore::Font::drawGlyphs):
756         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
757         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
758         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
759         (WebCore::GraphicsContext::supportsTransparencyLayers):
760         * platform/graphics/qt/GraphicsContextQt.cpp:
761         (WebCore::GraphicsContext::isInTransparencyLayer):
762         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
763         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
764         (WebCore::GraphicsContext::supportsTransparencyLayers):
765         * platform/graphics/skia/GraphicsContextSkia.cpp:
766         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
767         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
768         (WebCore::GraphicsContext::supportsTransparencyLayers):
769         * platform/graphics/win/FontCGWin.cpp:
770         (WebCore::drawGDIGlyphs):
771         * platform/graphics/win/GraphicsContextCGWin.cpp:
772         (WebCore::GraphicsContext::releaseWindowsContext):
773         * platform/graphics/win/GraphicsContextCairoWin.cpp:
774         (WebCore::GraphicsContext::releaseWindowsContext):
775         * platform/graphics/win/GraphicsContextWin.cpp:
776         (WebCore::GraphicsContext::getWindowsContext):
777         * platform/graphics/wince/GraphicsContextWinCE.cpp:
778         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
779         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
780         (WebCore::GraphicsContext::supportsTransparencyLayers):
781         * platform/graphics/wx/GraphicsContextWx.cpp:
782         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
783         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
784         (WebCore::GraphicsContext::supportsTransparencyLayers):
785         * platform/win/ScrollbarThemeWin.cpp:
786         * plugins/win/PluginViewWin.cpp:
787         * rendering/RenderThemeWin.cpp:
788
789 2011-09-09  Julien Chaffraix  <jchaffraix@webkit.org>
790
791         [V8] V8WebKitPoint::constructorCallback leaks
792         https://bugs.webkit.org/show_bug.cgi?id=67865
793
794         Reviewed by Adam Barth.
795
796         Covered by fast/js/instanceof-XMLHttpRequest.html under Valgrind.
797
798         * bindings/v8/custom/V8WebKitPointConstructor.cpp:
799         (WebCore::V8WebKitPoint::constructorCallback): Changed the code
800         to use a RefPtr (per our usual style). Also use toV8 that will
801         take care of properly wrapping the object.
802
803 2011-09-09  Chris Rogers  <crogers@google.com>
804
805         HRTFDatabaseLoader should not call WTF::waitForThreadCompletion() more than once
806         https://bugs.webkit.org/show_bug.cgi?id=67866
807
808         Reviewed by David Levin.
809
810         No new tests since this is difficult to test.
811         This is designed to fix existing webaudio layout test failures.
812
813         * platform/audio/HRTFDatabaseLoader.cpp:
814         (WebCore::HRTFDatabaseLoader::HRTFDatabaseLoader):
815         (WebCore::HRTFDatabaseLoader::~HRTFDatabaseLoader):
816         (WebCore::HRTFDatabaseLoader::loadAsynchronously):
817         (WebCore::HRTFDatabaseLoader::waitForLoaderThreadCompletion):
818         * platform/audio/HRTFDatabaseLoader.h:
819
820 2011-09-09  Jessie Berlin  <jberlin@apple.com>
821
822         Cookies are not available after turning off Private Browsing after the last window has been
823         closed.
824         https://bugs.webkit.org/show_bug.cgi?id=67874
825
826         Reviewed by Darin Adler.
827
828         The private browsing storage session is a global setting that is being incorrectly set on a
829         per-page basis (see http://webkit.org/b/67870).
830
831         In this case, the global value was getting out of sync with the per-page setting:
832         1. The global value was getting set to true when setPrivateBrowsingEnabled(true) was called.
833         2. All Pages were then closed, destroying their Settings objects.
834         3. When a new Page was created, a new Settings object was created and its
835            m_privateBrowsingEnabled value was getting set to false.
836         4. The WebPage settings were then applied to the new Settings object, resulting in
837            setPrivateBrowsingEnabled(false) to be called.
838         5. An if (m_privateBrowsingEnabled == privateBrowsingEnabled) early return prevented the
839            global value for the storage session from being destroyed.
840
841         * page/Settings.cpp:
842         (WebCore::Settings::setPrivateBrowsingEnabled):
843         Move the early return to be after setting the global private browsing values, and add a
844         clearer comment + FIXME.
845
846 2011-09-09  Kentaro Hara  <haraken@google.com>
847
848         Generate a WebKitCSSMatrix constructor of V8 using the IDL 'Constructor' extended attribute
849         https://bugs.webkit.org/show_bug.cgi?id=67458
850
851         Reviewed by Adam Barth.
852
853         Added a 'CallWithNullValue' extended attribute.
854         If a parameter is optional and missing, 'CallWithDefaultValue'
855         handles it as a string "undefined". On the other hand,
856         'CallWithNullValue' handles it as a null string
857         (Note: not a string "null", but a null string).
858
859         Tests: fast/dom/Window/custom-constructors.html
860                transforms/svg-vs-css.xhtml
861                transforms/cssmatrix-2d-interface.xhtml
862                transforms/cssmatrix-3d-interface.xhtmlGenerate a WebKitCSSMatrix constructor
863
864         * WebCore.gypi: Removed V8WebKitCSSMatrixConstructor.cpp.
865         * WebCore.pro: Removed V8WebKitCSSMatrixConstructor.cpp.
866         * bindings/scripts/CodeGeneratorV8.pm:
867         (GenerateParametersCheck): If the 'CallWithNullValue' extended attribute is set, we call MAYBE_MISSING_PARAMETER() with MissingIsEmpty mode to obtain a maybe missing parameter. Otherwise, we call MAYBE_MISSING_PARAMETER() with MissingIsUndefined mode.
868         (RequiresCustomSignature):
869         * bindings/scripts/test/V8/V8TestInterface.cpp: Updated test results.
870         (WebCore::V8TestInterface::constructorCallback):
871         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: Ditto.
872         (WebCore::TestMediaQueryListListenerInternal::methodCallback):
873         * bindings/scripts/test/V8/V8TestObj.cpp: Ditto.
874         (WebCore::TestObjInternal::voidMethodWithArgsCallback):
875         (WebCore::TestObjInternal::intMethodWithArgsCallback):
876         (WebCore::TestObjInternal::objMethodWithArgsCallback):
877         (WebCore::TestObjInternal::methodThatRequiresAllArgsCallback):
878         (WebCore::TestObjInternal::methodThatRequiresAllArgsAndThrowsCallback):
879         (WebCore::TestObjInternal::optionsObjectCallback):
880         (WebCore::TestObjInternal::customArgsAndExceptionCallback):
881         (WebCore::TestObjInternal::withDynamicFrameAndArgCallback):
882         (WebCore::TestObjInternal::withDynamicFrameAndOptionalArgCallback):
883         (WebCore::TestObjInternal::withDynamicFrameAndUserGestureCallback):
884         (WebCore::TestObjInternal::withDynamicFrameAndUserGestureASADCallback):
885         (WebCore::TestObjInternal::methodWithOptionalArgCallback):
886         (WebCore::TestObjInternal::methodWithNonOptionalArgAndOptionalArgCallback):
887         (WebCore::TestObjInternal::methodWithNonOptionalArgAndTwoOptionalArgsCallback):
888         (WebCore::TestObjInternal::methodWithNonCallbackArgAndCallbackArgCallback):
889         (WebCore::TestObjInternal::overloadedMethod1Callback):
890         (WebCore::TestObjInternal::overloadedMethod2Callback):
891         (WebCore::TestObjInternal::overloadedMethod3Callback):
892         (WebCore::TestObjInternal::overloadedMethod4Callback):
893         (WebCore::TestObjInternal::classMethodWithOptionalCallback):
894         (WebCore::TestObjInternal::enabledAtRuntimeMethod1Callback):
895         (WebCore::TestObjInternal::enabledAtRuntimeMethod2Callback):
896         * bindings/v8/V8Binding.h:
897         (WebCore::V8ParameterBase::prepareBase): The fact that V8ParameterBase does not have any object means that we do not need to prepare anything, i.e. we should just return true in this case.
898         (WebCore::::prepare): If V8ParameterBase does not have any object, then we set a null string.
899         * bindings/v8/custom/V8BindingMacros.h: MAYBE_MISSING_PARAMETER() returns the parameter of a given index if the parameter exists. If the parameter does not exist and MissingIsUndefined is set, this macro returns an object that represents undefined. If the parameter does not exist and MissingIsEmpty is set, this macro returns an empty object.
900         * bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp: Removed.
901         * css/WebKitCSSMatrix.idl: Added the 'Constructor' extended attribute.
902
903 2011-09-09  Geoffrey Garen  <ggaren@apple.com>
904
905         Reviewed by Dan Bernstein.
906
907         Removed ENABLE(SINGLE_THREADED) support, since it is always false
908         https://bugs.webkit.org/show_bug.cgi?id=67862
909
910         Next step toward making the baseline platform assumption that threads exist.
911
912         * WebCore.pri:
913         * features.pri: 
914         * platform/sql/SQLiteDatabase.cpp:
915         (WebCore::SQLiteDatabase::interrupt): Removed now-dead code.
916
917 2011-09-09  Fady Samuel  <fsamuel@chromium.org>
918
919         Move pageScaleFactor code from Frame.{h|cpp} to Page.{h|cpp}
920         https://bugs.webkit.org/show_bug.cgi?id=67250
921
922         Reviewed by Simon Fraser.
923
924         No new tests because there's no change in functionality.
925
926         * WebCore.exp.in:
927         * css/CSSStyleSelector.cpp:
928         (WebCore::CSSStyleSelector::styleForDocument):
929         * dom/Element.cpp:
930         (WebCore::Element::getClientRects):
931         (WebCore::Element::getBoundingClientRect):
932         * dom/Range.cpp:
933         (WebCore::adjustFloatQuadsForScrollAndAbsoluteZoomAndPageScale):
934         * loader/HistoryController.cpp:
935         (WebCore::HistoryController::restoreScrollPositionAndViewState):
936         * page/Frame.cpp:
937         (WebCore::Frame::Frame):
938         (WebCore::Frame::pageScaleFactor):
939         * page/Frame.h:
940         * page/Page.cpp:
941         (WebCore::Page::Page):
942         (WebCore::Page::setPageScaleFactor):
943         * page/Page.h:
944         (WebCore::Page::pageScaleFactor):
945         * rendering/RenderLayerCompositor.cpp:
946         (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame):
947         (WebCore::RenderLayerCompositor::pageScaleFactor):
948         * rendering/RenderView.cpp:
949         (WebCore::RenderView::paintBoxDecorations):
950
951 2011-09-09  Dominic Mazzoni  <dmazzoni@google.com>
952
953         AX: Images within anchors causes crash
954         https://bugs.webkit.org/show_bug.cgi?id=44149
955
956         Reviewed by Chris Fleizach.
957
958         Fixes the way parent RenderObject of an AccessibilityRenderObject
959         is computed in the presence of adjacent continuations.
960
961         Test: accessibility/div-within-anchors-causes-crash.html
962
963         * accessibility/AccessibilityRenderObject.cpp:
964         (WebCore::AccessibilityRenderObject::renderParentObject):
965
966 2011-09-09  Kulanthaivel Palanichamy  <kulanthaivel@codeaurora.org>
967
968         CSS rules not being applied when a hidden field is inserted between an input[type=checkbox] and a label
969         https://bugs.webkit.org/show_bug.cgi?id=66887
970
971         Reviewed by David Hyatt.
972
973         Test: fast/css/adjacent-sibling-selector.html
974
975         This patch addresses the problem of elements not getting their style recomputed
976         when they are affected by direct adjacent sibling rules and one of their sibling in
977         their corresponding rules is modified dynamically.
978
979         * css/CSSStyleSelector.cpp:
980         (WebCore::CSSStyleSelector::canShareStyleWithElement):
981         (WebCore::parentStylePreventsSharing):
982         * css/SelectorChecker.cpp:
983         (WebCore::SelectorChecker::checkSelector):
984         * dom/Element.cpp:
985         (WebCore::Element::recalcStyle):
986         (WebCore::checkForSiblingStyleChanges):
987         * rendering/style/RenderStyle.cpp:
988         (WebCore::RenderStyle::RenderStyle):
989         * rendering/style/RenderStyle.h:
990         (WebCore::InheritedFlags::affectedByDirectAdjacentRules):
991         (WebCore::InheritedFlags::setAffectedByDirectAdjacentRules):
992
993 2011-09-09  Rafael Antognolli  <antognolli@profusion.mobi>
994
995         Make the EFL port use the correct rendering file.
996         https://bugs.webkit.org/show_bug.cgi?id=66323
997
998         Reviewed by Martin Robinson.
999
1000         When compiling with Pango support, the EFL port should use
1001         FontPango.cpp instead of FontEfl.cpp (which is just full of stubs).
1002
1003         No new functionality so no new tests.
1004
1005         * CMakeListsEfl.txt:
1006
1007 2011-09-09  Chris Rogers  <crogers@google.com>
1008
1009         AudioBufferSourceNode must validate AudioBuffer in .buffer attribute setter
1010         https://bugs.webkit.org/show_bug.cgi?id=67749
1011
1012         Reviewed by Kenneth Russell.
1013
1014         Test: webaudio/audiobuffersource-channels.html
1015
1016         * WebCore.gypi:
1017         * bindings/js/JSAudioBufferSourceNodeCustom.cpp:
1018         (WebCore::JSAudioBufferSourceNode::setBuffer):
1019         * bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp: Copied from Source/WebCore/bindings/js/JSAudioBufferSourceNodeCustom.cpp.
1020         (WebCore::V8AudioBufferSourceNode::bufferAccessorSetter):
1021         * webaudio/AudioBufferSourceNode.cpp:
1022         (WebCore::AudioBufferSourceNode::setBuffer):
1023         * webaudio/AudioBufferSourceNode.h:
1024         * webaudio/AudioBufferSourceNode.idl:
1025
1026 2011-09-09  Dan Bernstein  <mitz@apple.com>
1027
1028         RenderBlock::addOverhangingFloats() takes superfluous parameters
1029         https://bugs.webkit.org/show_bug.cgi?id=67863
1030
1031         Reviewed by Dave Hyatt.
1032
1033         No new tests, because behavior is unchanged.
1034
1035         * rendering/RenderBlock.cpp:
1036         (WebCore::RenderBlock::layoutBlock):
1037         (WebCore::RenderBlock::layoutBlockChild):
1038         (WebCore::RenderBlock::addOverhangingFloats): Removed the logical{Left, Top}Offset parameters,
1039         since they were always the inverse of the logical{Left, Top}() of the child parameter.
1040         * rendering/RenderBlock.h:
1041
1042 2011-09-09  Rafael Antognolli  <antognolli@profusion.mobi>
1043
1044         Add replacement functions for gdk ones.
1045         https://bugs.webkit.org/show_bug.cgi?id=66323
1046
1047         Reviewed by Martin Robinson.
1048
1049         This will allow the EFL port to don't depend on gdk anymore.
1050
1051         No new functionality so no new tests.
1052
1053         * CMakeListsEfl.txt:
1054         * platform/graphics/cairo/CairoUtilities.cpp:
1055         (WebCore::appendRegionToCairoContext):
1056         * platform/graphics/cairo/CairoUtilities.h:
1057         * platform/graphics/pango/FontPango.cpp:
1058         (WebCore::drawGlyphsShadow):
1059         (WebCore::Font::drawComplexText):
1060         * platform/graphics/pango/PangoUtilities.cpp: Added.
1061         (WebCore::getLineClipRegionFromLayoutIter):
1062         (WebCore::getClipRegionFromPangoLayoutLine):
1063         * platform/graphics/pango/PangoUtilities.h: Added.
1064
1065 2011-09-09  Mark Hahnenberg  <mhahnenberg@apple.com>
1066
1067         Unzip initialization lists and constructors in JSCell hierarchy (5/7)
1068         https://bugs.webkit.org/show_bug.cgi?id=67420
1069
1070         Reviewed by Geoffrey Garen.
1071
1072         No new tests.
1073
1074         Completed the fifth level of the refactoring to add finishCreation() 
1075         methods to all classes within the JSCell hierarchy with non-trivial 
1076         constructor bodies.
1077
1078         This primarily consists of pushing the calls to finishCreation() down 
1079         into the constructors of the subclasses of the second level of the hierarchy 
1080         as well as pulling the finishCreation() calls out into the class's corresponding
1081         create() method if it has one.  Doing both simultaneously allows us to 
1082         maintain the invariant that the finishCreation() method chain is called exactly 
1083         once during the creation of an object, since calling it any other number of 
1084         times (0, 2, or more) will cause an assertion failure.
1085
1086         * WebCore.exp.in:
1087         * bindings/js/JSDOMBinding.h:
1088         (WebCore::DOMConstructorObject::DOMConstructorObject):
1089         * bindings/js/JSDOMGlobalObject.cpp:
1090         (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
1091         (WebCore::JSDOMGlobalObject::finishCreation):
1092         * bindings/js/JSDOMGlobalObject.h:
1093         * bindings/js/JSDOMWindowShell.cpp:
1094         * bindings/js/JSDOMWindowShell.h:
1095         (WebCore::JSDOMWindowShell::create):
1096         * bindings/js/JSDOMWrapper.h:
1097         (WebCore::JSDOMWrapper::JSDOMWrapper):
1098         * bindings/scripts/CodeGeneratorJS.pm:
1099         (GenerateImplementation):
1100         * bindings/scripts/test/JS/JSTestInterface.cpp:
1101         (WebCore::JSTestInterface::JSTestInterface):
1102         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1103         (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
1104         * bindings/scripts/test/JS/JSTestObj.cpp:
1105         (WebCore::JSTestObj::JSTestObj):
1106         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1107         (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
1108         * bridge/c/CRuntimeObject.cpp:
1109         (JSC::Bindings::CRuntimeObject::CRuntimeObject):
1110         (JSC::Bindings::CRuntimeObject::finishCreation):
1111         * bridge/c/CRuntimeObject.h:
1112         * bridge/jni/jsc/JavaRuntimeObject.cpp:
1113         (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject):
1114         (JSC::Bindings::JavaRuntimeObject::finishCreation):
1115         * bridge/jni/jsc/JavaRuntimeObject.h:
1116         * bridge/objc/ObjCRuntimeObject.h:
1117         * bridge/objc/ObjCRuntimeObject.mm:
1118         (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
1119         (JSC::Bindings::ObjCRuntimeObject::finishCreation):
1120         * bridge/objc/objc_runtime.h:
1121         (JSC::Bindings::ObjcFallbackObjectImp::create):
1122         * bridge/objc/objc_runtime.mm:
1123         (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
1124         * bridge/qt/qt_instance.cpp:
1125         (JSC::Bindings::QtRuntimeObject::QtRuntimeObject):
1126         * bridge/qt/qt_pixmapruntime.cpp:
1127         (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject):
1128         * bridge/qt/qt_runtime.cpp:
1129         (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod):
1130         (JSC::Bindings::QtRuntimeMethod::finishCreation):
1131         * bridge/qt/qt_runtime.h:
1132         * bridge/runtime_array.cpp:
1133         (JSC::RuntimeArray::RuntimeArray):
1134         * bridge/runtime_array.h:
1135         (JSC::RuntimeArray::create):
1136         * bridge/runtime_method.cpp:
1137         (JSC::RuntimeMethod::RuntimeMethod):
1138         (JSC::RuntimeMethod::finishCreation):
1139         * bridge/runtime_method.h:
1140         * bridge/runtime_object.cpp:
1141         (JSC::Bindings::RuntimeObject::RuntimeObject):
1142         * bridge/runtime_object.h:
1143         (JSC::Bindings::RuntimeObject::create):
1144
1145 2011-09-09  Rafael Antognolli  <antognolli@profusion.mobi>
1146
1147         Rename FontGtk.cpp to FontPango.cpp
1148         https://bugs.webkit.org/show_bug.cgi?id=66323
1149
1150         Reviewed by Martin Robinson.
1151
1152         This file will be used by the EFL port too, and since it's not GTK
1153         specific anymore, rename it to something better.
1154
1155         No new functionality so no new tests.
1156
1157         * GNUmakefile.list.am:
1158         * platform/graphics/pango/FontPango.cpp: Renamed from Source/WebCore/platform/graphics/gtk/FontGtk.cpp.
1159
1160 2011-09-09  Adam Klein  <adamk@chromium.org>
1161
1162         Initialize ExceptionCode in Element::removeAttribute
1163         https://bugs.webkit.org/show_bug.cgi?id=67820
1164
1165         Reviewed by Darin Adler.
1166
1167         Silences valgrind warning reported in http://crbug.com/76490.
1168
1169         No new tests since this would only very occasionally be flaky,
1170         and in the codepath in the valgrind report, the ec is ignored anyway.
1171
1172         * dom/Element.cpp:
1173         (WebCore::Element::removeAttribute): Initialize ec to 0.
1174
1175 2011-09-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1176
1177         [Qt] Remove common.pri
1178         https://bugs.webkit.org/show_bug.cgi?id=67814
1179
1180         Reviewed by Andreas Kling.
1181
1182         No new tests, no change in functionality.
1183
1184         * CodeGenerators.pri:
1185         * WebCore.pri:
1186
1187 2011-09-09  Dominic Mazzoni  <dmazzoni@google.com>
1188
1189         Assert being hit in AccessibilityRenderObject::addChildren()
1190         https://bugs.webkit.org/show_bug.cgi?id=61805
1191
1192         Reviewed by Chris Fleizach.
1193
1194         Fix nextSibling and previousSibling to handle adjacent continuations
1195         properly, otherwise nodes end up appearing in the accessibility
1196         tree twice (or a debug assertion could be raised).
1197
1198         Test: accessibility/adjacent-continuations-cause-assertion-failure.html
1199
1200         * accessibility/AccessibilityRenderObject.cpp:
1201         (WebCore::AccessibilityRenderObject::previousSibling):
1202         (WebCore::AccessibilityRenderObject::nextSibling):
1203
1204 2011-09-08  Kentaro Hara  <haraken@google.com>
1205
1206         Implement a WebKitAnimationEvent constructor.
1207         https://bugs.webkit.org/show_bug.cgi?id=67825
1208
1209         Reviewed by Sam Weinig.
1210
1211         There is no spec for the WebKitAnimationEvent constructor
1212         since it is WebKit-specific. However, based on the current
1213         IDL of initWebKitAnimationEvent(), the constructor IDL
1214         should be as follows.
1215
1216         [Constructor(DOMString type, optional WebKitAnimationEventInit eventInitDict)]
1217         interface WebKitAnimationEvent : Event {
1218             ...;
1219         }
1220
1221         dictionary WebKitAnimationEventInit : EventInit {
1222             DOMString animationName;
1223             double elapsedTime;
1224         }
1225
1226         Test: fast/events/constructors/webkit-animation-event-constructor.html
1227
1228         * bindings/generic/EventConstructors.h: Added a definition for the WebKitAnimationEvent constructor.
1229         * bindings/js/JSEventConstructors.cpp: Added #includes for WebKitAnimationEvent.
1230         * dom/WebKitAnimationEvent.cpp:
1231         (WebCore::WebKitAnimationEventInit::WebKitAnimationEventInit):
1232         (WebCore::WebKitAnimationEvent::WebKitAnimationEvent):
1233         * dom/WebKitAnimationEvent.h: Added a definition for WebKitAnimationEventInit.
1234         (WebCore::WebKitAnimationEvent::create):
1235         * dom/WebKitAnimationEvent.idl: Makes WebKitAnimationEvent constructible.
1236
1237 2011-09-08  Abhishek Arya  <inferno@chromium.org>
1238
1239         :before content rendering issues with list markers and run-ins.
1240         https://bugs.webkit.org/show_bug.cgi?id=67735
1241
1242         1) Remove the isAnonymous checks for run-in detection since the
1243         run-in can belong to a node.
1244         2) When the parent has block children, then the list marker will
1245         be enclosed in an anonymous block. In that case, for going to the
1246         next list marker, we need to traverse one level up. We don't need
1247         this check when searching for generated run-in (loop 2), since we
1248         know parent will have inline children, so the list marker wont be
1249         enclosed in an anonymous block.
1250
1251         Reviewed by Dave Hyatt.
1252
1253         Tests: fast/lists/list-marker-before-content-table.html
1254                fast/runin/runin-generated-before-content.html
1255
1256         * rendering/RenderObjectChildList.cpp:
1257         (WebCore::RenderObjectChildList::beforePseudoElementRenderer):
1258
1259 2011-09-09  Pavel Podivilov  <podivilov@chromium.org>
1260
1261         Web Inspector: introduce JavaScriptSourceFrame class.
1262         https://bugs.webkit.org/show_bug.cgi?id=67838
1263
1264         SourceFrame should not deal with JavaScript debugging since it is a base class for all source frame implementations.
1265
1266         Reviewed by Pavel Feldman.
1267
1268         * WebCore.gypi:
1269         * WebCore.vcproj/WebCore.vcproj:
1270         * inspector/front-end/JavaScriptSourceFrame.js: Added.
1271         (WebInspector.JavaScriptSourceFrame):
1272         (WebInspector.SourceFrameDelegateForScriptsPanel): moved from ScriptsPanel.js
1273         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.requestContent):
1274         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.debuggingSupported):
1275         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setBreakpoint):
1276         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.updateBreakpoint):
1277         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.removeBreakpoint):
1278         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.findBreakpoint):
1279         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.continueToLine):
1280         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.canEditScriptSource):
1281         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setScriptSource):
1282         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setScriptSourceIsBeingEdited):
1283         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.debuggerPaused):
1284         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.evaluateInSelectedCallFrame):
1285         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.releaseEvaluationResult):
1286         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.suggestedFileName):
1287         * inspector/front-end/ScriptsPanel.js:
1288         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
1289         * inspector/front-end/WebKit.qrc:
1290         * inspector/front-end/inspector.html:
1291
1292 2011-09-09  Sheriff Bot  <webkit.review.bot@gmail.com>
1293
1294         Unreviewed, rolling out r94845.
1295         http://trac.webkit.org/changeset/94845
1296         https://bugs.webkit.org/show_bug.cgi?id=67839
1297
1298         This patch kicked Qt-SL bots, but we don't need this
1299         modification. (Requested by ossy_ on #webkit).
1300
1301         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1302         * platform/mac/WebVideoFullscreenController.mm:
1303         * platform/mac/WebVideoFullscreenHUDWindowController.mm:
1304
1305 2011-09-09  Csaba Osztrogon√°c  <ossy@webkit.org>
1306
1307         [Qt][Mac]REGRESSION(r94774): Build is broken
1308         https://bugs.webkit.org/show_bug.cgi?id=67799
1309
1310         It seems these files didn't rebuilt because of a
1311         dependency bug. Touch them to trigger a rebuild.
1312
1313         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1314         * platform/mac/WebVideoFullscreenController.mm:
1315         * platform/mac/WebVideoFullscreenHUDWindowController.mm:
1316
1317 2011-09-09  Alexander Pavlov  <apavlov@chromium.org>
1318
1319         Unreviewed, Chromium valgrind build fix.
1320
1321         Web Inspector: [Chromium] Valgrind signals use of uninitialized field in InspectorStyleSheetForInlineStyle
1322         https://bugs.webkit.org/show_bug.cgi?id=67837
1323
1324         * inspector/InspectorStyleSheet.cpp:
1325         (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
1326
1327 2011-09-09  Sheriff Bot  <webkit.review.bot@gmail.com>
1328
1329         Unreviewed, rolling out r94536.
1330         http://trac.webkit.org/changeset/94536
1331         https://bugs.webkit.org/show_bug.cgi?id=67836
1332
1333         breaks absoluteLocation() of RelatedMouseEvent (Requested by
1334         jknotten on #webkit).
1335
1336         * dom/MouseRelatedEvent.cpp:
1337         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
1338
1339 2011-09-08  Alexander Pavlov  <apavlov@chromium.org>
1340
1341         Web Inspector: live edit both for JS and CSS is not discoverable.
1342         https://bugs.webkit.org/show_bug.cgi?id=65962
1343
1344         Add the "Edit" button to SourceFrame, so that resources/scripts can be edited both in the
1345         Resources and the Scripts panels. The button is grayed out if the resource/script is not editable.
1346
1347         Reviewed by Yury Semikhatsky.
1348
1349         * inspector/front-end/Images/statusbarButtonGlyphs.png:
1350         * inspector/front-end/ResourceView.js:
1351         (WebInspector.EditableResourceSourceFrame.prototype.canEditSource):
1352         * inspector/front-end/ScriptsPanel.js:
1353         (WebInspector.ScriptsPanel.prototype.get statusBarItems):
1354         (WebInspector.ScriptsPanel.prototype.set visibleView):
1355         * inspector/front-end/SourceFrame.js:
1356         (WebInspector.SourceFrame):
1357         (WebInspector.SourceFrame.prototype.get statusBarItems):
1358         (WebInspector.SourceFrame.prototype._initializeTextViewer):
1359         (WebInspector.SourceFrame.prototype._editButtonClicked):
1360         (WebInspector.SourceFrame.prototype.canEditSource):
1361         (WebInspector.SourceFrame.prototype.startEditing):
1362         (WebInspector.SourceFrame.prototype.commitEditing):
1363         (WebInspector.SourceFrame.prototype._setReadOnly):
1364         (WebInspector.TextViewerDelegateForSourceFrame.prototype.doubleClick):
1365         * inspector/front-end/TextViewer.js:
1366         (WebInspector.TextEditorMainPanel.prototype.set readOnly):
1367         (WebInspector.TextEditorMainPanel.prototype._updateSelectionOnStartEditing):
1368         * inspector/front-end/inspector.css:
1369         (button.edit-source-status-bar-item .glyph):
1370         (button.edit-source-status-bar-item.toggled-on .glyph):
1371
1372 2011-09-09  Shinya Kawanaka  <shinyak@google.com>
1373
1374         Crashes in WebCore::AppendNodeCommand::create().
1375         https://bugs.webkit.org/show_bug.cgi?id=67767
1376
1377         Reviewed by Darin Adler.
1378
1379         In CompositeEditCommand::closeParagraphUnderNewElement(), lastNode could be a non Element node.
1380         The current code assumes lastNode is an Element node. This patch checks it.
1381
1382         Test: editing/execCommand/ident-crashes-topnode-is-text.html
1383
1384         * editing/CompositeEditCommand.cpp:
1385         (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement): Added an element node check.
1386
1387 2011-09-09  Shinya Kawanaka  <shinyak@google.com>
1388
1389         Crashes in WebCore::ApplyStyleCommand.doApply()
1390         https://bugs.webkit.org/show_bug.cgi?id=67765
1391
1392         Reviewed by Ryosuke Niwa.
1393
1394         WebCore::enclosingBlock may return null, but ApplyStyleCommand::applyBlockStyle did not check it. This patch make it to be checked.
1395
1396         Test: editing/style/remove-format-without-enclosing-block.html
1397
1398         * editing/ApplyStyleCommand.cpp:
1399         (WebCore::ApplyStyleCommand::applyBlockStyle): Added null check.
1400
1401 2011-09-09  James Simonsen  <simonjam@chromium.org>
1402
1403         [Chromium] Fix leak of Skia stream with custom CSS fonts
1404         https://bugs.webkit.org/show_bug.cgi?id=67815
1405
1406         Reviewed by Adam Barth.
1407
1408         Test: fast/css/font-face-opentype.html under valgrind
1409
1410         * platform/graphics/mac/FontCustomPlatformData.cpp:
1411         (WebCore::createFontCustomPlatformData):
1412         * platform/graphics/skia/FontCustomPlatformData.cpp:
1413         (WebCore::createFontCustomPlatformData):
1414
1415 2011-09-07  Ryosuke Niwa  <rniwa@webkit.org>
1416
1417         Push more code from HTMLInputElement::setValue to TextFieldInputType::setValue
1418         https://bugs.webkit.org/show_bug.cgi?id=67742
1419
1420         Reviewed by Darin Adler.
1421
1422         Moved more code in HTMLInputElement::setValue to TextFieldInputType::setValue, and merged
1423         InputType::valueChanged into InputType::setValue. Also introduced
1424         InputType::dispatchChangeEventInResponseToSetValue to be overridden by TextFieldInputType.
1425
1426         * html/BaseButtonInputType.cpp:
1427         (WebCore::BaseButtonInputType::setValue):
1428         * html/BaseButtonInputType.h:
1429         * html/BaseCheckableInputType.cpp:
1430         (WebCore::BaseCheckableInputType::setValue):
1431         * html/BaseCheckableInputType.h:
1432         * html/ColorInputType.cpp:
1433         * html/ColorInputType.h:
1434         * html/FileInputType.cpp:
1435         (WebCore::FileInputType::setValue):
1436         * html/FileInputType.h:
1437         * html/HTMLInputElement.cpp:
1438         (WebCore::HTMLInputElement::setValue):
1439         * html/HTMLInputElement.h:
1440         (WebCore::HTMLInputElement::cacheSelectionInResponseToSetValue):
1441         * html/HiddenInputType.cpp:
1442         (WebCore::HiddenInputType::setValue):
1443         * html/HiddenInputType.h:
1444         * html/InputType.cpp:
1445         (WebCore::InputType::setValue):
1446         (WebCore::InputType::dispatchChangeEventInResponseToSetValue):
1447         * html/InputType.h:
1448         * html/RangeInputType.cpp:
1449         (WebCore::RangeInputType::setValue):
1450         * html/RangeInputType.h:
1451         * html/TextFieldInputType.cpp:
1452         (WebCore::TextFieldInputType::setValue):
1453         (WebCore::TextFieldInputType::dispatchChangeEventInResponseToSetValue):
1454         * html/TextFieldInputType.h:
1455
1456 2011-09-08  Annie Sullivan  <sullivan@chromium.org>
1457
1458         Crashes in WebCore::InsertNodeBeforeCommand constructor.
1459         https://bugs.webkit.org/show_bug.cgi?id=67763
1460
1461         Reviewed by Ryosuke Niwa.
1462
1463         Changes editableRootForPosition() to use the position's containerNode instead of deprecatedNode so that
1464         positions which are before or after a given node cannot return that node as the editable root.
1465
1466         Test: editing/inserting/insert-paragraph-selection-outside-contenteditable.html
1467
1468         * editing/htmlediting.cpp:
1469         (WebCore::editableRootForPosition): use containerNode instead of deprecatedNode.
1470
1471 2011-09-08  James Weatherall  <wez@chromium.org>
1472
1473         Release the reference to the HTMLPlugInElement's script object, when the element is removed from the document.  This breaks a cyclical reference that would otherwise cause the element to be retained until the document is torn down.
1474         https://bugs.webkit.org/show_bug.cgi?id=66181
1475
1476         Reviewed by Anders Carlsson.
1477
1478         No new tests - no functional change.
1479
1480         * html/HTMLPlugInElement.cpp:
1481         (WebCore::HTMLPlugInElement::removedFromDocument):
1482         * html/HTMLPlugInElement.h:
1483
1484 2011-09-08  Daniel Bates  <dbates@webkit.org>
1485
1486         XSS filter bypass via non-standard URL encoding
1487         https://bugs.webkit.org/show_bug.cgi?id=66588
1488
1489         Reviewed by Adam Barth.
1490
1491         Tests: http/tests/security/xssAuditor/script-tag-with-16bit-unicode-surrogate-pair.html
1492                http/tests/security/xssAuditor/script-tag-with-16bit-unicode.html
1493                http/tests/security/xssAuditor/script-tag-with-16bit-unicode2.html
1494                http/tests/security/xssAuditor/script-tag-with-16bit-unicode3.html
1495                http/tests/security/xssAuditor/script-tag-with-16bit-unicode4.html
1496                http/tests/security/xssAuditor/script-tag-with-16bit-unicode5.html
1497                http/tests/security/xssAuditor/script-tag-with-three-times-url-encoded-16bit-unicode.html
1498                http/tests/security/xssAuditor/window-open-without-url-should-not-assert.html
1499
1500         Implement support for decoding non-standard 16-bit Unicode escape sequences of
1501         the form %u26C4 as described in <http://www.w3.org/International/iri-edit/draft-duerst-iri.html#anchor29>.
1502
1503         See also <http://en.wikipedia.org/wiki/Percent-encoding#Non-standard_implementations>.
1504
1505         * GNUmakefile.list.am: Added DecodeEscapeSequences.h.
1506         * WebCore.gypi: Ditto.
1507         * WebCore.pro: Ditto.
1508         * WebCore.vcproj/WebCore.vcproj: Ditto.
1509         * WebCore.xcodeproj/project.pbxproj: Ditto.
1510         * html/parser/XSSAuditor.cpp:
1511         (WebCore::decode16BitUnicodeEscapeSequences): Added.
1512         (WebCore::decodeStandardURLEscapeSequences): Added.
1513         (WebCore::fullyDecodeString): Modified to call decode16BitUnicodeEscapeSequences().
1514         (WebCore::XSSAuditor::init): Modified to return early when the URL of the document
1515         is the empty string. This can happen when opening a new browser window or calling
1516         window.open("").
1517         * platform/KURL.cpp:
1518         (WebCore::decodeURLEscapeSequences): Abstracted code into template-function decodeEscapeSequences().
1519         This function just calls decodeEscapeSequences<URLEscapeSequence>().
1520         * platform/text/DecodeEscapeSequences.h: Added.
1521         (WebCore::Unicode16BitEscapeSequence::findInString):
1522         (WebCore::Unicode16BitEscapeSequence::matchStringPrefix):
1523         (WebCore::Unicode16BitEscapeSequence::decodeRun):
1524         (WebCore::URLEscapeSequence::findInString):
1525         (WebCore::URLEscapeSequence::matchStringPrefix):
1526         (WebCore::URLEscapeSequence::decodeRun):
1527         (WebCore::decodeEscapeSequences):
1528
1529 2011-09-08  Adam Barth  <abarth@webkit.org>
1530
1531         DocumentWriter::deprecatedFrameEncoding doesn't need to refert to Settings
1532         https://bugs.webkit.org/show_bug.cgi?id=67812
1533
1534         Reviewed by Eric Seidel.
1535
1536         The one caller of this function does this work already.
1537
1538         * loader/DocumentWriter.cpp:
1539         (WebCore::DocumentWriter::deprecatedFrameEncoding):
1540
1541 2011-09-08  Adam Klein  <adamk@chromium.org>
1542
1543         Always zero-out m_sortedTextBoxesPosition to avoid uninitialized read in TextIterator
1544         https://bugs.webkit.org/show_bug.cgi?id=67810
1545
1546         Reviewed by Tony Chang.
1547
1548         Reported as a valgrind failure in http://crbug.com/84777.
1549
1550         No possible change in behavior, so no tests. The unitialized read
1551         could never have an impact:
1552
1553            if (m_sortedTextBoxesPosition + 1 < m_sortedTextBoxes.size()) ...
1554
1555         Since m_sortedTextBoxes.size() will be zero here if
1556         m_sortedTextBoxesPosition is uninitialized, and they're both unsigned,
1557         so no possible value of m_sortedTextBoxesPosition could be < 0.
1558
1559         * editing/TextIterator.cpp:
1560         (WebCore::TextIterator::TextIterator):
1561
1562 2011-09-08  Tony Chang  <tony@chromium.org>
1563
1564         Cleanup of switch statements with default cases
1565         https://bugs.webkit.org/show_bug.cgi?id=67808
1566
1567         Reviewed by Adam Barth.
1568
1569         No new tests, just a small refactoring.
1570
1571         * page/WebKitAnimation.cpp:
1572         (WebCore::WebKitAnimation::fillMode):
1573         * platform/audio/Distance.cpp:
1574         (WebCore::DistanceEffect::gain):
1575
1576 2011-09-08  Eric Seidel  <eric@webkit.org>
1577
1578         [BiDi] Add support for the BDI element
1579         https://bugs.webkit.org/show_bug.cgi?id=50913
1580
1581         Reviewed by Ryosuke Niwa.
1582
1583         This patch is ridiculously trivial now that we have unicode-bidi: isolate support in WebKit.
1584
1585         Test: css3/bdi-element.html
1586
1587         * css/html.css:
1588         (bdi):
1589
1590 2011-09-08  David Levin  <levin@chromium.org>
1591
1592         [chromium] KURL::copy doesn't produce something usable on another thread.
1593         https://bugs.webkit.org/show_bug.cgi?id=67809
1594
1595         Reviewed by Adam Barth.
1596
1597         No new functionality exposed so no new test. This was caught by testing code: the thread
1598         sanitizer run in Chromium (http://code.google.com/p/chromium/issues/detail?id=93708).
1599
1600         * platform/KURLGoogle.cpp:
1601         (WebCore::KURLGooglePrivate::copyTo): Clear out the invalid String so that it will
1602         not be used on another thread.
1603
1604 2011-09-08  Alexey Proskuryakov  <ap@apple.com>
1605
1606         REGRESSION (r66874): Missing RefPtr in ScriptController
1607         https://bugs.webkit.org/show_bug.cgi?id=67748
1608
1609         Reviewed by Adam Barth.
1610
1611         * bindings/ScriptControllerBase.cpp: (WebCore::ScriptController::executeScript):
1612
1613 2011-09-08  Adam Barth  <abarth@webkit.org>
1614
1615         Second attempt to fix Chromium build.
1616
1617         * dom/Document.h:
1618
1619 2011-09-08  Oliver Hunt  <oliver@apple.com>
1620
1621         Use bump allocator for initial property storage
1622         https://bugs.webkit.org/show_bug.cgi?id=67494
1623
1624         Reviewed by Geoffrey Garen.
1625
1626         Add a forwarding header.
1627
1628         * ForwardingHeaders/runtime/StorageBarrier.h: Added.
1629
1630 2011-09-08  Roland Steiner  <rolandsteiner@chromium.org>
1631
1632         Unreviewed, rolling out r94809.
1633         http://trac.webkit.org/changeset/94809
1634         https://bugs.webkit.org/show_bug.cgi?id=67718
1635
1636         commit _still_ premature, despite CQ eagerness
1637
1638         * html/HTMLAttributeNames.in:
1639         * html/HTMLStyleElement.cpp:
1640         * html/HTMLStyleElement.h:
1641         * html/HTMLStyleElement.idl:
1642
1643 2011-09-08  Sam Weinig  <sam@webkit.org>
1644
1645         Remove the Completion object from JSC, I have never liked it
1646         https://bugs.webkit.org/show_bug.cgi?id=67755
1647
1648         Reviewed by Gavin Barraclough.
1649
1650         * bindings/js/JSDOMBinding.cpp:
1651         (WebCore::reportException):
1652         * bindings/js/JSEventListener.cpp:
1653         (WebCore::JSEventListener::handleEvent):
1654         * bindings/js/JSInjectedScriptManager.cpp:
1655         (WebCore::InjectedScriptManager::createInjectedScript):
1656         * bindings/js/JSMainThreadExecState.h:
1657         (WebCore::JSMainThreadExecState::evaluate):
1658         * bindings/js/ScriptController.cpp:
1659         (WebCore::ScriptController::evaluateInWorld):
1660         * bindings/js/WorkerScriptController.cpp:
1661         (WebCore::WorkerScriptController::evaluate):
1662         * bindings/objc/WebScriptObject.mm:
1663         (-[WebScriptObject evaluateWebScript:]):
1664         * bridge/NP_jsobject.cpp:
1665         (_NPN_Evaluate):
1666         * bridge/jni/jni_jsobject.mm:
1667         (JavaJSObject::eval):
1668
1669 2011-09-08  Adam Barth  <abarth@webkit.org>
1670
1671         Inline DocumentWriter::encoding() into it's only caller: deprecatedFrameEncoding()
1672         https://bugs.webkit.org/show_bug.cgi?id=67807
1673
1674         Reviewed by Eric Seidel.
1675
1676         This function is super nutty.  We don't want any more folks to call it
1677         thinking that it does something sane.
1678
1679         * loader/DocumentWriter.cpp:
1680         (WebCore::DocumentWriter::deprecatedFrameEncoding):
1681         * loader/DocumentWriter.h:
1682
1683 2011-09-08  Roland Steiner  <rolandsteiner@chromium.org>
1684
1685         <style scoped>: Add 'scoped' attribute
1686         https://bugs.webkit.org/show_bug.cgi?id=67718
1687
1688         Add 'scoped' attribute to IDL and attribute list,
1689         implement and test setting/resetting of the attribute.
1690
1691         Reviewed by Dimitri Glazkov.
1692
1693         Test: fast/css/style-scoped/basic-attribute.html
1694
1695         * html/HTMLAttributeNames.in:
1696         * html/HTMLStyleElement.cpp:
1697         (WebCore::HTMLStyleElement::scoped):
1698         (WebCore::HTMLStyleElement::setScoped):
1699         (WebCore::HTMLStyleElement::scopingElement):
1700         * html/HTMLStyleElement.h:
1701         * html/HTMLStyleElement.idl:
1702
1703 2011-09-08  Sheriff Bot  <webkit.review.bot@gmail.com>
1704
1705         Unreviewed, rolling out r94781.
1706         http://trac.webkit.org/changeset/94781
1707         https://bugs.webkit.org/show_bug.cgi?id=67806
1708
1709         Broke Objective-C binding on Mac (Requested by rniwa on
1710         #webkit).
1711
1712         * dom/Element.idl:
1713         * dom/Node.cpp:
1714         (WebCore::Node::contains):
1715         * dom/Node.idl:
1716         * editing/DeleteSelectionCommand.cpp:
1717         (WebCore::DeleteSelectionCommand::mergeParagraphs):
1718
1719 2011-09-08  Eric Seidel  <eric@webkit.org>
1720
1721         Remove DocumentWriter::setDecoder as a grep of WebKit shows no callers
1722         https://bugs.webkit.org/show_bug.cgi?id=67803
1723
1724         Reviewed by Adam Barth.
1725
1726         Smells like dead code.
1727
1728         * loader/DocumentWriter.cpp:
1729         * loader/DocumentWriter.h:
1730
1731 2011-09-08  Shinya Kawanaka  <shinyak@google.com>
1732
1733         Crashes in WebCore::ReplaceSelectionCommand::doApply
1734         https://bugs.webkit.org/show_bug.cgi?id=67762
1735
1736         Reviewed by Ryosuke Niwa.
1737
1738         WebCore::enclosingBlock may return null, but its return value was not checked. This patch checks it.
1739
1740         Tests: editing/inserting/insert-without-enclosing-block.html
1741
1742         * editing/ReplaceSelectionCommand.cpp:
1743         (WebCore::ReplaceSelectionCommand::doApply): Added null check.
1744
1745 2011-09-08  Sheriff Bot  <webkit.review.bot@gmail.com>
1746
1747         Unreviewed, rolling out r94784.
1748         http://trac.webkit.org/changeset/94784
1749         https://bugs.webkit.org/show_bug.cgi?id=67796
1750
1751         Commit was premature (Requested by rolandsteiner on #webkit).
1752
1753         * html/HTMLAttributeNames.in:
1754         * html/HTMLStyleElement.cpp:
1755         * html/HTMLStyleElement.h:
1756         * html/HTMLStyleElement.idl:
1757
1758 2011-09-08  W. James MacLean  <wjmaclean@chromium.org>
1759
1760         [chromium] Add backend compositor support for rescaling (zooming) textures during zoom animation.
1761         https://bugs.webkit.org/show_bug.cgi?id=66472
1762
1763         This patch contains plumbing from Internals to WebViewImpl that can be removed
1764         at a later time when the zoom animator code is complete.
1765
1766         Reviewed by James Robinson.
1767
1768         Test: platform/chromium/compositing/zoom-animator-scale-test.html
1769
1770         * page/Settings.cpp:
1771         (WebCore::Settings::Settings):
1772         * page/Settings.h:
1773         (WebCore::Settings::setZoomAnimatorScale):
1774         (WebCore::Settings::zoomAnimatorScale):
1775         * platform/graphics/chromium/LayerRendererChromium.cpp:
1776         (WebCore::LayerRendererChromium::LayerRendererChromium):
1777         (WebCore::LayerRendererChromium::drawLayersInternal):
1778         * platform/graphics/chromium/LayerRendererChromium.h:
1779         (WebCore::LayerRendererChromium::setZoomAnimatorScale):
1780         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1781         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
1782         (WebCore::CCLayerTreeHost::commitTo):
1783         (WebCore::CCLayerTreeHost::setZoomAnimatorScale):
1784         (WebCore::CCLayerTreeHost::updateLayers):
1785         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1786         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1787         (WebCore::CCLayerTreeHostImpl::setZoomAnimatorScale):
1788         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1789         * testing/Internals.cpp:
1790         (WebCore::Internals::setZoomAnimatorScale):
1791         * testing/Internals.h:
1792         * testing/Internals.idl:
1793
1794 2011-09-08  Eric Carlson  <eric.carlson@apple.com>
1795
1796         HTMLMediaElement is missing initialTime attribute
1797         https://bugs.webkit.org/show_bug.cgi?id=67791
1798
1799         Reviewed by Darin Adler.
1800
1801         Test: media/media-initialTime.html
1802
1803         * html/HTMLMediaElement.cpp:
1804         (WebCore::HTMLMediaElement::initialTime):
1805         * html/HTMLMediaElement.h:
1806         * html/HTMLMediaElement.idl:
1807         * platform/graphics/MediaPlayer.cpp:
1808         (WebCore::MediaPlayer::initialTime):
1809         * platform/graphics/MediaPlayer.h:
1810         * platform/graphics/MediaPlayerPrivate.h:
1811         (WebCore::MediaPlayerPrivateInterface::initialTime):
1812
1813 2011-09-03  Robert Hogan  <robert@webkit.org>
1814
1815         Elements with position:absolute don't move to correct position after images load
1816         https://bugs.webkit.org/show_bug.cgi?id=54611
1817
1818         Reviewed by Simon Fraser.
1819
1820         Test: fast/block/positioning/absolute-layout-after-image-load.html
1821
1822         In the test the 'label' block is an absolutely positioned child of an inline flow. So during layout, 
1823         this RenderBlock::layoutPositionedObjects fails to dirty it for rendering because it requires 
1824         the parent to be a BlockFlow. The code to do this was introduced in http://trac.webkit.org/changeset/8284. 
1825         There doesn't seem to be a good reason for requiring a BlockFlow, so remove the check. 
1826
1827         Note: Although the issue is encountered only on first load without a fragment identifier, it 
1828         happens reliably when you include the fragment identifier in the url (#Footnote_1). This is so 
1829         because scrolling to the fragment always happens before the image has loaded, rendering the page 
1830         and clearing the initial dirty bits in the positioned element's renderer. When the image finally 
1831         loads in this scenario, the positioned element is otherwise clean and relies on the above code to get 
1832         re-rendered.
1833
1834         Note: This was originally landed in r94755 but positioned-float-layout-after-image-load.html exposed
1835               an ASSERT bug, unrelated to this change, and was rolled out. That issue is tracked separately
1836               in bug 67759.
1837
1838         * rendering/RenderBlock.cpp:
1839         (WebCore::RenderBlock::layoutPositionedObjects): remove the check for r->parent()->isBlockFlow() when 
1840                                                          deciding whether to mark children for layout
1841
1842 2011-09-08  Roland Steiner  <rolandsteiner@chromium.org>
1843
1844         <style scoped>: Add 'scoped' attribute
1845         https://bugs.webkit.org/show_bug.cgi?id=67718
1846
1847         Add 'scoped' attribute to IDL and attribute list,
1848         implement and test setting/resetting of the attribute.
1849
1850         Reviewed by Dimitri Glazkov.
1851
1852         Test: fast/css/style-scoped/basic-attribute.html
1853
1854         * html/HTMLAttributeNames.in:
1855         * html/HTMLStyleElement.cpp:
1856         (WebCore::HTMLStyleElement::scoped):
1857         (WebCore::HTMLStyleElement::setScoped):
1858         (WebCore::HTMLStyleElement::scopingElement):
1859         * html/HTMLStyleElement.h:
1860         * html/HTMLStyleElement.idl:
1861
1862 2011-09-08  Erik Arvidsson  <arv@chromium.org>
1863
1864         Move Element.contains to Node
1865         https://bugs.webkit.org/show_bug.cgi?id=67651
1866
1867         Reviewed by Darin Adler.
1868
1869         This moves the contains method from Element to Node as in the DOM4 working draft: 
1870         http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-node-contains
1871
1872         This also special cases Document contains to make it O(1) instead of O(depth).
1873
1874         Tests: fast/dom/Node/contains-method.html
1875                perf/document-contains.html
1876
1877         * dom/Element.idl:
1878         * dom/Node.cpp:
1879         (WebCore::Node::contains): Added document special case.
1880         * dom/Node.idl:
1881         * editing/DeleteSelectionCommand.cpp:
1882         (WebCore::DeleteSelectionCommand::mergeParagraphs): Added a null check.
1883
1884 2011-09-08  Chris Rogers  <crogers@google.com>
1885
1886         Check AudioContext createChannelMerger() for thread safety
1887         https://bugs.webkit.org/show_bug.cgi?id=67247
1888
1889         Reviewed by Kenneth Russell.
1890
1891         Test: webaudio/audiochannelmerger-stereo.html
1892
1893         * webaudio/AudioChannelMerger.cpp:
1894         (WebCore::AudioChannelMerger::process):
1895         (WebCore::AudioChannelMerger::checkNumberOfChannelsForInput):
1896         * webaudio/AudioChannelMerger.h:
1897
1898 2011-09-08  Ned Holbrook  <nholbrook@apple.com>
1899
1900         Refactor hyphen measurement
1901         https://bugs.webkit.org/show_bug.cgi?id=67728
1902
1903         Reviewed by Darin Adler.
1904
1905         No new tests, purely refactoring.
1906
1907         * rendering/RenderBlockLineLayout.cpp:
1908         (WebCore::measureHyphenWidth): Added.
1909         (WebCore::setLogicalWidthForTextRun): Use measureHyphenWidth().
1910         (WebCore::tryHyphenating): Ditto.
1911         (WebCore::RenderBlock::LineBreaker::nextLineBreak): Ditto.
1912
1913 2011-09-08  Julien Chaffraix  <jchaffraix@webkit.org>
1914
1915         Remove LayoutStateDisabler instances from RenderLayer
1916         https://bugs.webkit.org/show_bug.cgi?id=66896
1917
1918         Reviewed by Simon Fraser.
1919
1920         As part of r93614, scrollTo does not call updateLayerPositions anymore.
1921         This means that we don't need to disable LayoutState from the scrolling code
1922         in RenderLayer.
1923
1924         This change is covered by the existing tests.
1925
1926         * rendering/RenderLayer.cpp:
1927         (WebCore::RenderLayer::updateLayerPositions): Updated the comment
1928         that was not accurate anymore. Also explained what is wrong with
1929         LayoutState vs RenderLayer now. Note that the ASSERT is still
1930         valid and will not trigger as the remaining calls to updateLayerPositions
1931         are done *outside* layout() where LayoutState is not set (thus disabled).
1932
1933         (WebCore::RenderLayer::updateScrollInfoAfterLayout): Removed
1934         2 LayoutStateDisabler surrounding scrollToOffset.
1935
1936 2011-09-08  Julien Chaffraix  <jchaffraix@webkit.org>
1937
1938         Factor out the code to get the first non-null RenderTableSection in RenderTable
1939         https://bugs.webkit.org/show_bug.cgi?id=66972
1940
1941         Reviewed by Darin Adler.
1942
1943         Refactoring only, covered by existing tests.
1944
1945         * accessibility/AccessibilityTable.cpp:
1946         (WebCore::AccessibilityTable::addChildren):
1947         (WebCore::AccessibilityTable::cellForColumnAndRow):
1948         * accessibility/AccessibilityTableCell.cpp:
1949         (WebCore::AccessibilityTableCell::rowIndexRange):
1950         Updated those for the signature change in sectionBelow. Also added
1951         a FIXME where topSection should be used instead of iterating
1952         over the section (and likely missing some corner cases).
1953
1954         * rendering/FixedTableLayout.cpp:
1955         (WebCore::FixedTableLayout::calcWidthArray):
1956         * rendering/RenderTable.cpp:
1957         (WebCore::RenderTable::calcBorderStart):
1958         (WebCore::RenderTable::calcBorderEnd):
1959         (WebCore::RenderTable::outerBorderBefore):
1960         (WebCore::RenderTable::sectionAbove):
1961         (WebCore::RenderTable::sectionBelow):
1962         (WebCore::RenderTable::firstLineBoxBaseline):
1963         Updated all those functions to use the newly added functions. Also changed
1964         the variable names to match the functions.
1965
1966         (WebCore::RenderTable::layout):
1967         (WebCore::RenderTable::topNonEmptySection): Newly added function
1968         that returns the top non null section of the table that has at least a
1969         row.
1970
1971         (WebCore::RenderTable::cellAbove):
1972         (WebCore::RenderTable::cellBelow):
1973         Update the signature of those 2 functions to take an enum as it makes the
1974         rest of the code more readable.
1975
1976         * rendering/RenderTable.h:
1977         (WebCore::RenderTable::topSection): Newly added function to return
1978         the top non null section in the table.
1979
1980 2011-04-19  Eric Seidel  <eric@webkit.org>
1981
1982         Reviewed by Ryosuke Niwa.
1983
1984         [BiDi] [CSS3] MASTER: Add support for the unicode-bidi:isolate CSS property
1985         https://bugs.webkit.org/show_bug.cgi?id=50912
1986
1987         This patch adds support for CSS3 unicode-bidi: isolate property, under the -webkit- vendor prefix.
1988         Parsing support was added in a previous patch, this wires up the RenderStyle values
1989         to code changes in the BidiResolver.
1990
1991         The effect of this patch is that it makes it possible to "isolate" runs of text
1992         so that their RTL-ness or LTR-ness does not bleed out into the rest of your text
1993         and effect layout.  This is important because many unicode characters (like parenthesis, ':', '-', etc.)
1994         do not have intrinsic directionality and are affected by whatever characters come before/after.
1995         If you have usernames which include RTL text, if you inject those usernames in your page
1996         you might end up with nearby characters moving!
1997         (like 'RTL USERNAME - my awesome site' as a title, could end up as
1998         'my awesome site - USERNAME RTL' when correct would be 'USERNAME RTL - my awesome site'.)
1999         This patch makes it possible to wrap sections of text in isolated spans, so that
2000         they correctly order all their RTL/LTR contents, but also correctly participate in the
2001         larger RTL/LTR ordering without affecting nearby characters.
2002
2003         Because much of this code is old and rarely touched, I've included extra background
2004         information in hopes of expanding my set of potential reviewers:
2005
2006         WebKit uses the standard "Unicode Bidi Algorithm" henceforth known as the UBA.
2007         The UBA is defined at http://unicode.org/reports/tr9/ for those not faint of heart.
2008
2009         Text layout is done per-block (<div>, <p>, etc), and begins with a string of text
2010         (which in our case comes from the rendering tree) and a specified width.
2011         First:  Text is measured and wrapped into lines.
2012         Second: The UBA is run over the lines of text.
2013         Third:  WebKit builds InlineBoxes (its linebox tree) and eventually render the text.
2014
2015         This patch modifies our UBA to ignore all text content inside "isolated" inlines (treating them as neutral characters)
2016         and then adds another step after running the UBA, where we run the UBA recursively on any
2017         previously identified "isolated" content.
2018
2019         The result of the UBA is an ordered list of "runs" of text with the RTL runs
2020         correctly RTL and the LTR runs LTR.
2021
2022         The UBA does three things:
2023         1.  It assigns a "class" to each character in a text stream (like neutral, strongly-RTL, strongly-LTR, etc.)
2024         2.  Divides the text stream up into "runs" of characters of the same directionality (all RTL, all LTR).
2025         3.  Re-orders those runs.
2026
2027         The UBA in WebKit is implemented by BidiResolver<T> in BidiResolver.h
2028
2029         The InlineBidiResolver (BidiResolver specialization which knows about the rendering tree)
2030         walks along its InlineIterators, looking at each character and running the
2031         Unicode Bidi Algorithm (UBA).  It walks through the rendering tree subtree under
2032         a block, using a (poorly named) bidiNext function which returns the next inline object.
2033         Each inline object (or text character there-in) has a corresponding meaning in the UBA
2034         such as a "strong RTL" character or a "neutral" character.  The UBA reads these sequence
2035         of characters, and figures out what direction (RTL or LTR) to assign to any neutral
2036         characters it encounters, based on surrounding characters.
2037
2038         As the InlineBidiResolver is walking the rendering tree, the InlineIterator::advance()
2039         function calls bidiNext(), which in turn can call notifyObserverEnteredObject/notifyObserverWillExitObject
2040         notifying InlineBidiResolver that it is entering or exiting an "isolated"
2041         span, at which point it will either start or stop ignoring the stream of characters
2042         from the InlineIterator.  When the InlineBidiResolver is ignoring the stream of
2043         characters, instead of creating separate BidiRuns at each RTL/LTR boundary
2044         as it normally would, it instead creates one "fake" run for the entire
2045         isolated span.  These fake runs participate in the normal UBA run ordering process,
2046         but after the main UBA, a second pass is made where we examine
2047         the list of isolatedRuns() and run the UBA on each of them, replacing the fake
2048         run we previously inserted, with the resulting list of runs from that inner UBA run.
2049         The way it "ignores" characters is by treating them all as neutral when inside an isolate.
2050         Thus all the characters end up grouped in a single run, but their directionality (as a group)
2051         is correctly affected by any surrounding strong characters.
2052
2053         If you understood that last paragraph, than the rest of the change is just plumbing.
2054
2055         I added a huge number of FIXMEs to this code, because this code has a variety of
2056         design choices (or lack there of) which make some of this very difficult.
2057
2058         For example the bidiNext iterator function has two sets of mutually exclusive
2059         parameters and can be used optionally with or without an observer.  Prior to this
2060         change there was only ever one object which cared about observing a walk over inlines
2061         and that was InlineBidiResolver.  This patch (regretfully) templatizes bidiNext
2062         to support a new Observer type.  The correct fix would be to rip bidiNext into
2063         multiple functions and rip need for observation out of InlineBidiResolver.
2064         Unfortunately I've tried both in separate bugs and failed.  This code is very very
2065         old and very poorly understood.  We're slowly moving forward, this is another tiny step.
2066
2067         This is my fourth iteration of this patch (I'm happy to do more!), but I believe
2068         it's a good compromise between fixing all of the design gotcha's of our bidi
2069         system and doing the minimum amount to add this killer CSS feature.
2070
2071         I ran the PLT.  (It averaged 0.2% faster with this change, but I attribute that to noise).
2072
2073         Test: css3/unicode-bidi-isolate-basic.html and css3/unicode-bidi-isolate-aharon.html
2074
2075         * platform/text/BidiResolver.h:
2076         (WebCore::BidiCharacterRun::setNext):
2077          - Needed by the new replaceRunWithRuns function.
2078         (WebCore::BidiResolver::BidiResolver):
2079         (WebCore::BidiResolver::~BidiResolver):
2080         (WebCore::BidiResolver::enterIsolate):
2081         (WebCore::BidiResolver::exitIsolate):
2082         (WebCore::BidiResolver::inIsolate):
2083         (WebCore::BidiResolver::isolatedRuns):
2084          - Used to track isolated spans of text as they're encoutered.
2085            They're stuffed away here to be processed recursively
2086            after the main UBA has done its thang.
2087         (WebCore::::appendRun):
2088         (WebCore::::embed):
2089         (WebCore::::commitExplicitEmbedding):
2090         (WebCore::::createBidiRunsForLine):
2091         * platform/text/BidiRunList.h:
2092         (WebCore::::replaceRunWithRuns):
2093          - This effectively takes all the runs from one runlist and adds them to
2094            this one, replacing the fake run we inserted during a previous pass of the UBA.
2095          - This RunList now owns the runs, so we call clear() on the other RunList
2096            so that we don't end up double-freeing the runs.
2097         (WebCore::::clear):
2098          - This allows us to "take" runs from another run list and then clear it.
2099         * rendering/BidiRun.h:
2100         (WebCore::BidiRun::object):
2101         * rendering/InlineIterator.h:
2102         (WebCore::InlineIterator::object):
2103         (WebCore::InlineIterator::offset):
2104         (WebCore::notifyObserverEnteredObject): Mostly just renaming and adding a FIXME about plaintext.
2105         (WebCore::notifyObserverWillExitObject): Mostly just renaming.
2106         (WebCore::addPlaceholderRunForIsolatedInline):
2107         (WebCore::isIsolatedInline):
2108         (WebCore::InlineBidiResolver::appendRun):
2109         * rendering/RenderBlockLineLayout.cpp:
2110         (WebCore::statusWithDirection):
2111         (WebCore::constructBidiRuns):
2112          - This is the heavy-lifting of this change.  This function
2113            runs the UBA recursively on all the previously identified isolated spans.
2114          - If we encounter more isolated spans in our run, we just add them to the
2115            main list an keep going.  Because the runs are linked lists and we have
2116            direct pointers to our placeholder objects, we don't care what order
2117            we process the placeholders in, so long as when we're done, they're all processed.
2118         (WebCore::RenderBlock::layoutInlineChildren):
2119
2120 2011-09-08  Kentaro Hara  <haraken@google.com>
2121
2122         Implement a ProgressEvent constructor for JSC
2123         https://bugs.webkit.org/show_bug.cgi?id=67537
2124
2125         Reviewed by Sam Weinig.
2126
2127         The spec for the ProgressEvent constructor is here:
2128         http://www.w3.org/TR/progress-events/#interface-progressevent
2129
2130         Test: fast/events/constructors/progress-event-constructor.html
2131
2132         * bindings/generic/EventConstructors.h: Added a definition for the ProgressEvent constructor.
2133         * bindings/js/JSDictionary.cpp:
2134         (WebCore::JSDictionary::convertValue): Converts an ECMA-262 Number into an IDL unsigned long long value. Spec: http://www.w3.org/TR/WebIDL/#es-unsigned-long-long
2135         * bindings/js/JSEventConstructors.cpp: Added #includes for ProgressEvent.
2136         * dom/ProgressEvent.cpp:
2137         (WebCore::ProgressEventInit::ProgressEventInit):
2138         (WebCore::ProgressEvent::ProgressEvent):
2139         * dom/ProgressEvent.h: Added a definition for ProgressEventInit.
2140         (WebCore::ProgressEvent::create):
2141         * dom/ProgressEvent.idl: Makes ProgressEvent constructible.
2142
2143 2011-09-08  Ryosuke Niwa  <rniwa@webkit.org>
2144
2145         Make bindings tests quiet after r94701.
2146
2147         * bindings/scripts/test/JS/JSTestInterface.cpp:
2148         * bindings/scripts/test/JS/JSTestInterface.h:
2149         (WebCore::JSTestInterfacePrototype::JSTestInterfacePrototype):
2150         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2151         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
2152         (WebCore::JSTestMediaQueryListListenerPrototype::JSTestMediaQueryListListenerPrototype):
2153         * bindings/scripts/test/JS/JSTestObj.cpp:
2154         * bindings/scripts/test/JS/JSTestObj.h:
2155         (WebCore::JSTestObjPrototype::JSTestObjPrototype):
2156         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2157         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
2158         (WebCore::JSTestSerializedScriptValueInterfacePrototype::JSTestSerializedScriptValueInterfacePrototype):
2159
2160 2011-09-07  Pavel Podivilov  <podivilov@chromium.org>
2161
2162         Web Inspector: get rid of RawSourceCode.createSourceMappingIfNeeded.
2163         https://bugs.webkit.org/show_bug.cgi?id=67717
2164
2165         Listen to SourceMappingUpdated event instead of using createSourceMappingIfNeeded.
2166
2167         Reviewed by Yury Semikhatsky.
2168
2169         * inspector/front-end/DebuggerPresentationModel.js:
2170         (WebInspector.DebuggerPresentationModel):
2171         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation.updateAnchor):
2172         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation):
2173         (WebInspector.DebuggerPresentationModel.prototype._updateSourceMapping):
2174         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints):
2175         (WebInspector.DebuggerPresentationModel.prototype._restoreConsoleMessages):
2176         (WebInspector.DebuggerPresentationModel.prototype.setFormatSource):
2177         (WebInspector.DebuggerPresentationModel.prototype._consoleMessageAdded):
2178         (WebInspector.DebuggerPresentationModel.prototype._createPresentationMessage):
2179         (WebInspector.DebuggerPresentationModel.prototype._consoleCleared):
2180         (WebInspector.DebuggerPresentationModel.prototype.continueToLine):
2181         (WebInspector.DebuggerPresentationModel.prototype.messagesForUISourceCode):
2182         (WebInspector.DebuggerPresentationModel.prototype._debuggerReset):
2183         (WebInspector.PresentationCallFrame.prototype.sourceLine.sourceMappingUpdated):
2184         (WebInspector.PresentationCallFrame.prototype.sourceLine):
2185         * inspector/front-end/SourceFile.js:
2186
2187 2011-09-06  Pavel Podivilov  <podivilov@chromium.org>
2188
2189         Web Inspector: do not re-create RawSourceCode when toggling pretty-print mode.
2190         https://bugs.webkit.org/show_bug.cgi?id=67647
2191
2192         1) Implement RawSourceCode.setFormatted that allows toggling pretty-print mode on the fly without resetting everything.
2193         2) Add RawSourceCode unit tests.
2194         3) Remove source mapping listeners and console messages from presentation model (they live in RawSourceCode now).
2195
2196         Reviewed by Yury Semikhatsky.
2197
2198         Test: inspector/debugger/raw-source-code.html
2199
2200         * inspector/front-end/DebuggerPresentationModel.js:
2201         (WebInspector.DebuggerPresentationModel):
2202         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation):
2203         (WebInspector.DebuggerPresentationModel.prototype._addScript):
2204         (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated):
2205         (WebInspector.DebuggerPresentationModel.prototype.setFormatSource):
2206         (WebInspector.DebuggerPresentationModel.prototype._createRawSourceCodeId):
2207         (WebInspector.DebuggerPresentationModel.prototype._debuggerReset):
2208         * inspector/front-end/ScriptsPanel.js:
2209         (WebInspector.ScriptsPanel.prototype._toggleFormatSource):
2210         * inspector/front-end/SourceFile.js:
2211         (WebInspector.RawSourceCode):
2212         (WebInspector.RawSourceCode.prototype.get uiSourceCode):
2213         (WebInspector.RawSourceCode.prototype.setFormatted):
2214         (WebInspector.RawSourceCode.prototype.rawLocationToUILocation):
2215         (WebInspector.RawSourceCode.prototype._saveSourceMapping):
2216
2217 2011-09-08  Alexander Pavlov  <apavlov@chromium.org>
2218
2219         Web Inspector: [REGRESSION] Clear console shortcut Ctrl + L broken
2220         https://bugs.webkit.org/show_bug.cgi?id=67711
2221
2222         Reviewed by Yury Semikhatsky.
2223
2224         * inspector/front-end/ConsoleView.js:
2225         (WebInspector.ConsoleView.prototype._consoleCleared):
2226         (WebInspector.ConsoleView.prototype._registerShortcuts):
2227         (WebInspector.ConsoleView.prototype._promptKeyDown):
2228
2229 2011-09-08  Andras Becsi  <andras.becsi@nokia.com>
2230
2231         [Qt] Build fails with strict compiler
2232         https://bugs.webkit.org/show_bug.cgi?id=67778
2233
2234         Reviewed by Csaba Osztrogon√°c.
2235
2236         No new tests needed.
2237
2238         * platform/graphics/TiledBackingStore.cpp:
2239         (WebCore::TiledBackingStore::resizeEdgeTiles): Remove unused contentsRect variable
2240         which's usage was removed in r94681 to fix the build with [-Werror=unused-but-set-variable].
2241
2242 2011-09-08  Sheriff Bot  <webkit.review.bot@gmail.com>
2243
2244         Unreviewed, rolling out r94695.
2245         http://trac.webkit.org/changeset/94695
2246         https://bugs.webkit.org/show_bug.cgi?id=67776
2247
2248         Hitting an assertion on Snow Leopard, Qt, GTK (Requested by
2249         Zoltan on #webkit).
2250
2251         * rendering/RenderBlock.cpp:
2252         (WebCore::RenderBlock::positionedFloatsNeedRelayout):
2253         (WebCore::RenderBlock::layoutPositionedObjects):
2254
2255 2011-09-08  Alexander Pavlov  <apavlov@chromium.org>
2256
2257         Unreviewed, strip trailing whitespace in the Web Inspector frontend (*.js and *.css).
2258
2259         * inspector/front-end/ApplicationCacheItemsView.js:
2260         * inspector/front-end/AuditResultView.js:
2261         * inspector/front-end/BinarySearch.js:
2262         * inspector/front-end/CSSStyleModel.js:
2263         * inspector/front-end/ConsoleMessage.js:
2264         * inspector/front-end/ConsoleModel.js:
2265         * inspector/front-end/ConsoleView.js:
2266         * inspector/front-end/CookieItemsView.js:
2267         * inspector/front-end/CookieParser.js:
2268         * inspector/front-end/DOMAgent.js:
2269         * inspector/front-end/DOMStorage.js:
2270         * inspector/front-end/DOMStorageItemsView.js:
2271         * inspector/front-end/DataGrid.js:
2272         * inspector/front-end/Database.js:
2273         * inspector/front-end/DatabaseQueryView.js:
2274         * inspector/front-end/DetailedHeapshotGridNodes.js:
2275         * inspector/front-end/DetailedHeapshotView.js:
2276         * inspector/front-end/ElementsTreeOutline.js:
2277         * inspector/front-end/EmptyView.js:
2278         * inspector/front-end/EventListenersSidebarPane.js:
2279         * inspector/front-end/ExtensionCommon.js:
2280         * inspector/front-end/GoToLineDialog.js:
2281         * inspector/front-end/HeapSnapshot.js:
2282         * inspector/front-end/HeapSnapshotProxy.js:
2283         * inspector/front-end/HeapSnapshotWorkerDispatcher.js:
2284         * inspector/front-end/ImageView.js:
2285         * inspector/front-end/InjectedFakeWorker.js:
2286         * inspector/front-end/InspectorFrontendHostStub.js:
2287         * inspector/front-end/MetricsSidebarPane.js:
2288         * inspector/front-end/NetworkManager.js:
2289         * inspector/front-end/NetworkPanel.js:
2290         * inspector/front-end/ObjectPropertiesSection.js:
2291         * inspector/front-end/PartialQuickSort.js:
2292         * inspector/front-end/ProfileView.js:
2293         * inspector/front-end/ProfilesPanel.js:
2294         * inspector/front-end/RemoteObject.js:
2295         * inspector/front-end/Resource.js:
2296         * inspector/front-end/ResourceCategory.js:
2297         * inspector/front-end/ResourceHTMLView.js:
2298         * inspector/front-end/ResourceHeadersView.js:
2299         * inspector/front-end/ResourceJSONView.js:
2300         * inspector/front-end/ResourceTimingView.js:
2301         * inspector/front-end/ResourceTreeModel.js:
2302         * inspector/front-end/ResourceView.js:
2303         * inspector/front-end/ResourcesPanel.js:
2304         * inspector/front-end/SearchController.js:
2305         * inspector/front-end/SettingsScreen.js:
2306         * inspector/front-end/ShortcutsScreen.js:
2307         * inspector/front-end/SourceCSSTokenizer.js:
2308         * inspector/front-end/SourceHTMLTokenizer.js:
2309         * inspector/front-end/SourceJavaScriptTokenizer.js:
2310         * inspector/front-end/StatusBarButton.js:
2311         * inspector/front-end/TextEditorModel.js:
2312         * inspector/front-end/TimelineGrid.js:
2313         * inspector/front-end/View.js:
2314         * inspector/front-end/heapProfiler.css:
2315         * inspector/front-end/inspector.css:
2316         * inspector/front-end/inspector.js:
2317         * inspector/front-end/inspectorSyntaxHighlight.css:
2318         * inspector/front-end/networkPanel.css:
2319         * inspector/front-end/treeoutline.js:
2320         * inspector/front-end/utilities.js:
2321
2322 2011-09-07  Andrey Kosyakov  <caseq@chromium.org>
2323
2324         Web Inspector: trying to scroll mouse wheel when in TextViewer's gutter pane causes EventException::DISPATCH_REQUEST_ERR
2325         https://bugs.webkit.org/show_bug.cgi?id=67715
2326
2327         Reviewed by Yury Semikhatsky.
2328
2329         - avoid exception on attempt to dispatch an event that is being dispatched by cloning the event.
2330
2331         * inspector/front-end/TextViewer.js:
2332         (WebInspector.TextViewer.forwardWheelEvent):
2333         (WebInspector.TextViewer):
2334
2335 2011-09-07  Sheriff Bot  <webkit.review.bot@gmail.com>
2336
2337         Unreviewed, rolling out r94674 and r94689.
2338         http://trac.webkit.org/changeset/94674
2339         http://trac.webkit.org/changeset/94689
2340         https://bugs.webkit.org/show_bug.cgi?id=67754
2341
2342         Broke inspector/debugger/script-formatter.html (Requested by
2343         rniwa on #webkit).
2344
2345         * inspector/front-end/DebuggerPresentationModel.js:
2346         (WebInspector.DebuggerPresentationModel):
2347         (WebInspector.DebuggerPresentationModel.prototype.addSourceMappingListener):
2348         (WebInspector.DebuggerPresentationModel.prototype.removeSourceMappingListener):
2349         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation):
2350         (WebInspector.DebuggerPresentationModel.prototype._addScript):
2351         (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated):
2352         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints):
2353         (WebInspector.DebuggerPresentationModel.prototype.setFormatSource):
2354         (WebInspector.DebuggerPresentationModel.prototype._createRawSourceCodeId):
2355         (WebInspector.DebuggerPresentationModel.prototype._debuggerReset):
2356         * inspector/front-end/ScriptsPanel.js:
2357         (WebInspector.ScriptsPanel.prototype._toggleFormatSource):
2358         * inspector/front-end/SourceFile.js:
2359         (WebInspector.RawSourceCode):
2360         (WebInspector.RawSourceCode.prototype.get uiSourceCode):
2361         (WebInspector.RawSourceCode.prototype.get rawSourceCode):
2362         (WebInspector.RawSourceCode.prototype.rawLocationToUILocation):
2363         (WebInspector.RawSourceCode.prototype.requestContent):
2364         (WebInspector.RawSourceCode.prototype._saveSourceMapping):
2365
2366 2011-09-07  Julien Chaffraix  <jchaffraix@webkit.org>
2367
2368         offsetFromRoot optimization is disabled after r93837
2369         https://bugs.webkit.org/show_bug.cgi?id=67677
2370
2371         Reviewed by Simon Fraser.
2372
2373         Unfortunately not covered by any test as it does not change updateLayerPosition complexity (it is still O(n^2)
2374         because of clippedOverflowRectForRepaint). However it is a noticeable slowdown on some use cases but we don't
2375         have a good test harness to cover such slowdown.
2376
2377         * rendering/RenderLayer.cpp:
2378         (WebCore::RenderLayer::updateLayerPositions): Pass offsetFromRoot as not doing so means that we miss
2379         the optimization altogether.
2380
2381         (WebCore::RenderLayer::computeRepaintRects):
2382         (WebCore::RenderLayer::updateLayerPositionsAfterScroll):
2383         * rendering/RenderLayer.h:
2384         Renamed |cachedOffset| to |offsetFromRoot| to be consistent with our latest renaming.
2385
2386 2011-09-07  Ryosuke Niwa  <rniwa@webkit.org>
2387
2388         Windows build fix after r94737.
2389
2390         * rendering/RenderBlock.cpp:
2391         (WebCore::RenderBlock::adjustRectForColumns):
2392
2393 2011-09-07  Dan Bernstein  <mitz@apple.com>
2394
2395         Removed hyphenation function implementations for an usupported build configuration.
2396
2397         Reviewed by Sam Weinig.
2398
2399         * platform/text/cf/HyphenationCF.cpp:
2400
2401 2011-09-07  David Hyatt  <hyatt@apple.com>
2402
2403         https://bugs.webkit.org/show_bug.cgi?id=67739
2404
2405         adjustRectForColumns is O(# of columns) when it can be O(1). Fix the slow performance of this
2406         function by removing the loop and just computing the start and end column for a repaint rect
2407         and uniting everything in between.
2408
2409         Reviewed by Dan Bernstein.
2410
2411         * rendering/RenderBlock.cpp:
2412         (WebCore::RenderBlock::adjustRectForColumns):
2413
2414 2011-09-07  Sheriff Bot  <webkit.review.bot@gmail.com>
2415
2416         Unreviewed, rolling out r94714 and r94723.
2417         http://trac.webkit.org/changeset/94714
2418         http://trac.webkit.org/changeset/94723
2419         https://bugs.webkit.org/show_bug.cgi?id=67746
2420
2421         breaks gtk-linux tests with assertion failure (Requested by
2422         thorton on #webkit).
2423
2424         * platform/graphics/GraphicsContext.cpp:
2425         (WebCore::GraphicsContext::GraphicsContext):
2426         (WebCore::GraphicsContext::~GraphicsContext):
2427         * platform/graphics/GraphicsContext.h:
2428         (WebCore::GraphicsContext::inTransparencyLayer):
2429         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2430         (WebCore::GraphicsContext::beginTransparencyLayer):
2431         (WebCore::GraphicsContext::endTransparencyLayer):
2432         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
2433         (WebCore::GraphicsContextPlatformPrivate::beginTransparencyLayer):
2434         (WebCore::GraphicsContextPlatformPrivate::endTransparencyLayer):
2435         * platform/graphics/cg/GraphicsContextCG.cpp:
2436         (WebCore::GraphicsContext::beginTransparencyLayer):
2437         (WebCore::GraphicsContext::endTransparencyLayer):
2438         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
2439         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
2440         (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
2441         (WebCore::GraphicsContextPlatformPrivate::beginTransparencyLayer):
2442         (WebCore::GraphicsContextPlatformPrivate::endTransparencyLayer):
2443         * platform/graphics/haiku/GraphicsContextHaiku.cpp:
2444         (WebCore::GraphicsContext::beginTransparencyLayer):
2445         (WebCore::GraphicsContext::endTransparencyLayer):
2446         * platform/graphics/mac/FontMac.mm:
2447         (WebCore::Font::drawGlyphs):
2448         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
2449         (WebCore::GraphicsContext::beginTransparencyLayer):
2450         (WebCore::GraphicsContext::endTransparencyLayer):
2451         * platform/graphics/qt/GraphicsContextQt.cpp:
2452         (WebCore::GraphicsContext::inTransparencyLayer):
2453         (WebCore::GraphicsContext::beginTransparencyLayer):
2454         (WebCore::GraphicsContext::endTransparencyLayer):
2455         * platform/graphics/skia/GraphicsContextSkia.cpp:
2456         (WebCore::GraphicsContext::beginTransparencyLayer):
2457         (WebCore::GraphicsContext::endTransparencyLayer):
2458         * platform/graphics/win/FontCGWin.cpp:
2459         (WebCore::drawGDIGlyphs):
2460         * platform/graphics/win/GraphicsContextCGWin.cpp:
2461         (WebCore::GraphicsContext::releaseWindowsContext):
2462         * platform/graphics/win/GraphicsContextCairoWin.cpp:
2463         (WebCore::GraphicsContext::releaseWindowsContext):
2464         * platform/graphics/win/GraphicsContextWin.cpp:
2465         (WebCore::GraphicsContext::inTransparencyLayer):
2466         (WebCore::GraphicsContext::getWindowsContext):
2467         * platform/graphics/wince/GraphicsContextWinCE.cpp:
2468         (WebCore::GraphicsContext::beginTransparencyLayer):
2469         (WebCore::GraphicsContext::endTransparencyLayer):
2470         * platform/graphics/wx/GraphicsContextWx.cpp:
2471         (WebCore::GraphicsContext::beginTransparencyLayer):
2472         (WebCore::GraphicsContext::endTransparencyLayer):
2473         * platform/win/ScrollbarThemeWin.cpp:
2474         (WebCore::ScrollbarThemeWin::paintTrackPiece):
2475         (WebCore::ScrollbarThemeWin::paintButton):
2476         (WebCore::ScrollbarThemeWin::paintThumb):
2477         * plugins/win/PluginViewWin.cpp:
2478         (WebCore::PluginView::paint):
2479         * rendering/RenderThemeWin.cpp:
2480         (WebCore::drawControl):
2481
2482 2011-09-07  Chris Fleizach  <cfleizach@apple.com>
2483
2484         Changes to aria-hidden don't change VO navigation
2485         https://bugs.webkit.org/show_bug.cgi?id=67722
2486
2487         Reviewed by Darin Adler.
2488
2489         When altering aria-hidden, WebCore needs to update the children caches of 
2490         affected elements. However, for elements that were children, but ignored, their
2491         caches did not get updated, and stale information would be propagated.
2492
2493         The fix is to always clearChildren() when a parent is asking for children. This 
2494         ensures information is always up to date when the parent itself is asking for new data.
2495
2496         Test: accessibility/aria-hidden-updates-alldescendants.html
2497
2498         * accessibility/AccessibilityObject.h:
2499         * accessibility/AccessibilityRenderObject.cpp:
2500         (WebCore::AccessibilityRenderObject::ariaIsHidden):
2501         (WebCore::AccessibilityRenderObject::childrenChanged):
2502         (WebCore::AccessibilityRenderObject::addChildren):
2503
2504 2011-09-07  Tim Horton  <timothy_horton@apple.com>
2505
2506         Text rendered with a simple (i.e. 0px blur) shadow inside a transparency layer has a double shadow
2507         https://bugs.webkit.org/show_bug.cgi?id=67543
2508         <rdar://problem/10070536>
2509
2510         Reviewed by Simon Fraser.
2511
2512         Generalize (begin|end)TransparencyLayer, which now forward
2513         through to (begin|end)PlatformTransparencyLayer, so that
2514         isInTransparencyLayer can exist on every platform.
2515
2516         Make use of isInTransparencyLayer in FontMac to disable
2517         "simple" shadow drawing when the text is being rendered
2518         into a transparency layer.
2519
2520         Test: svg/custom/simple-text-double-shadow.svg
2521
2522         * platform/graphics/GraphicsContext.cpp:
2523         (WebCore::GraphicsContext::GraphicsContext):
2524         (WebCore::GraphicsContext::~GraphicsContext):
2525         (WebCore::GraphicsContext::beginTransparencyLayer):
2526         (WebCore::GraphicsContext::endTransparencyLayer):
2527         (WebCore::GraphicsContext::isInTransparencyLayer):
2528         * platform/graphics/GraphicsContext.h:
2529         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2530         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
2531         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
2532         (WebCore::GraphicsContext::supportsTransparencyLayers):
2533         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
2534         * platform/graphics/cg/GraphicsContextCG.cpp:
2535         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
2536         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
2537         (WebCore::GraphicsContext::supportsTransparencyLayers):
2538         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
2539         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
2540         * platform/graphics/haiku/GraphicsContextHaiku.cpp:
2541         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
2542         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
2543         (WebCore::GraphicsContext::supportsTransparencyLayers):
2544         * platform/graphics/mac/FontMac.mm:
2545         (WebCore::Font::drawGlyphs):
2546         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
2547         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
2548         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
2549         (WebCore::GraphicsContext::supportsTransparencyLayers):
2550         * platform/graphics/qt/GraphicsContextQt.cpp:
2551         (WebCore::GraphicsContext::isInTransparencyLayer):
2552         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
2553         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
2554         (WebCore::GraphicsContext::supportsTransparencyLayers):
2555         * platform/graphics/skia/GraphicsContextSkia.cpp:
2556         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
2557         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
2558         (WebCore::GraphicsContext::supportsTransparencyLayers):
2559         * platform/graphics/win/FontCGWin.cpp:
2560         (WebCore::drawGDIGlyphs):
2561         * platform/graphics/win/GraphicsContextCGWin.cpp:
2562         (WebCore::GraphicsContext::releaseWindowsContext):
2563         * platform/graphics/win/GraphicsContextCairoWin.cpp:
2564         (WebCore::GraphicsContext::releaseWindowsContext):
2565         * platform/graphics/win/GraphicsContextWin.cpp:
2566         (WebCore::GraphicsContext::getWindowsContext):
2567         * platform/graphics/wince/GraphicsContextWinCE.cpp:
2568         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
2569         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
2570         (WebCore::GraphicsContext::supportsTransparencyLayers):
2571         * platform/graphics/wx/GraphicsContextWx.cpp:
2572         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
2573         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
2574         (WebCore::GraphicsContext::supportsTransparencyLayers):
2575         * platform/win/ScrollbarThemeWin.cpp:
2576         * plugins/win/PluginViewWin.cpp:
2577         * rendering/RenderThemeWin.cpp:
2578
2579 2011-09-07  Dan Bernstein  <mitz@apple.com>
2580
2581         <rdar://problem/8881922> Support the hyphenate-limit-lines property
2582         https://bugs.webkit.org/show_bug.cgi?id=67730
2583
2584         Reviewed by Dave Hyatt.
2585
2586         Tests: fast/css/parsing-hyphenate-limit-lines.html
2587                fast/text/hyphenate-limit-lines.html
2588
2589         * css/CSSComputedStyleDeclaration.cpp:
2590         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Added hyphenate-limit-lines.
2591         * css/CSSParser.cpp:
2592         (WebCore::CSSParser::parseValue): Ditto. Valid values are non-negative integers and the keyword
2593         "no-limit".
2594         * css/CSSPropertyNames.in: Added -webkit-hyphenate-limit-lines.
2595         * css/CSSStyleSelector.cpp:
2596         (WebCore::CSSStyleSelector::applyProperty): Added hyphenate-limit-lines.
2597         * css/CSSValueKeywords.in: Added the "no-limit" value keyword.
2598         * rendering/RenderBlock.h:
2599         * rendering/RenderBlockLineLayout.cpp:
2600         (WebCore::RenderBlock::layoutRunsAndFloats): Count the number of consecutive hyphenated lines
2601         before the start line and pass it to layoutRunsAndFloatsInRange().
2602         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Keep track of the number of consecutive
2603         hyphenated lines before the current line and pass it to LineBreaker::nextLineBreak().
2604         (WebCore::tryHyphenating): Added parameters for the number of consecutive hyphenated lines before
2605         the current line and the limit on consecutive hyphenated lines, and an early return if the limit
2606         has been reached.
2607         (WebCore::RenderBlock::LineBreaker::nextLineBreak): Added a parameter for the number of consecutive
2608         hyphenated lines before the current line, which is passed through to tryHyphenating, along with
2609         the value of hyphenate-limit-lines.
2610         * rendering/RootInlineBox.cpp:
2611         (WebCore::RootInlineBox::isHyphenated): Added. Returns true if the line was hyphenated.
2612         * rendering/RootInlineBox.h:
2613         * rendering/style/RenderStyle.h:
2614         (WebCore::InheritedFlags::hyphenationLimitLines): Added this getter.
2615         (WebCore::InheritedFlags::setHyphenationLimitLines): Added this setter.
2616         (WebCore::InheritedFlags::initialHyphenationLimitLines): Added. The initial value is -1,
2617         corresponding to "no-limit".
2618         * rendering/style/StyleRareInheritedData.cpp:
2619         (WebCore::StyleRareInheritedData::StyleRareInheritedData): Initialize new member variable.
2620         (WebCore::StyleRareInheritedData::operator==): Compare new member variable.
2621         * rendering/style/StyleRareInheritedData.h:
2622
2623 2011-09-02  Ojan Vafai  <ojan@chromium.org>
2624
2625         split overrideSize into overrideHeight and overrideWidth
2626         https://bugs.webkit.org/show_bug.cgi?id=67550
2627
2628         Reviewed by Sam Weinig.
2629
2630         All uses of overrideSize only set one of the width or the height.
2631         This change removes a bool from RenderObject and removes some
2632         flexbox specific logic from RenderBox.
2633
2634         The only downside is that we have two global maps where we used
2635         to have one.
2636
2637         No functional changes so existing tests are sufficient.
2638
2639         * rendering/RenderBox.cpp:
2640         (WebCore::RenderBox::hasOverrideHeight):
2641         (WebCore::RenderBox::hasOverrideWidth):
2642         (WebCore::RenderBox::setOverrideHeight):
2643         (WebCore::RenderBox::setOverrideWidth):
2644         (WebCore::RenderBox::clearOverrideSize):
2645         (WebCore::RenderBox::overrideWidth):
2646         (WebCore::RenderBox::overrideHeight):
2647         (WebCore::RenderBox::computeLogicalWidth):
2648         (WebCore::RenderBox::computeLogicalHeight):
2649         (WebCore::RenderBox::computePercentageLogicalHeight):
2650         * rendering/RenderBox.h:
2651         * rendering/RenderDeprecatedFlexibleBox.cpp:
2652         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
2653         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
2654         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
2655         * rendering/RenderFlexibleBox.cpp:
2656         (WebCore::RenderFlexibleBox::layoutAndPlaceChildrenHorizontal):
2657         * rendering/RenderObject.cpp:
2658         (WebCore::RenderObject::RenderObject):
2659         * rendering/RenderObject.h:
2660         * rendering/RenderTableCell.cpp:
2661         (WebCore::RenderTableCell::setOverrideHeightFromRowHeight):
2662         * rendering/RenderTableCell.h:
2663         * rendering/RenderTableSection.cpp:
2664         (WebCore::RenderTableSection::calcRowLogicalHeight):
2665         (WebCore::RenderTableSection::layoutRows):
2666
2667 2011-09-07  Alexei Svitkine  <asvitkine@chromium.org>
2668
2669         Add test infrastructure to test rubber-banding overhang drawing along with layout tests for existing Chromium Mac overhang drawing in the non-gpu path.
2670         https://bugs.webkit.org/show_bug.cgi?id=67511
2671
2672         Reviewed by Dimitri Glazkov.
2673
2674         Tests: platform/chromium-mac/rubberbanding/overhang-e.html
2675                platform/chromium-mac/rubberbanding/overhang-n.html
2676                platform/chromium-mac/rubberbanding/overhang-ne.html
2677                platform/chromium-mac/rubberbanding/overhang-nw.html
2678                platform/chromium-mac/rubberbanding/overhang-s.html
2679                platform/chromium-mac/rubberbanding/overhang-se.html
2680                platform/chromium-mac/rubberbanding/overhang-sw.html
2681                platform/chromium-mac/rubberbanding/overhang-w.html
2682
2683         * WebCore.exp.in:
2684         * platform/ScrollableArea.h:
2685         * testing/Internals.cpp:
2686         (WebCore::Internals::setScrollViewPosition):
2687         * testing/Internals.h:
2688         * testing/Internals.idl:
2689
2690 2011-09-07  David Reveman  <reveman@chromium.org>
2691
2692         [Chromium] Render surface anti-aliasing.
2693         https://bugs.webkit.org/show_bug.cgi?id=66437
2694
2695         Reviewed by James Robinson.
2696
2697         Add CCLayerQuad class and CCLayerQuad::Edge subclass to allow
2698         edge computations to be shared between tiled layers and render
2699         surfaces. Move isCCW utility function to FloatQuad class and
2700         add to2dTransform method to TransformationMatrix class. Add
2701         necessary anti-aliasing shaders for render surfaces and use them
2702         to avoid aliased edges.
2703
2704         Tests: compositing/reflections/nested-reflection-transformed.html (existing)
2705
2706         * WebCore.gypi:
2707         * platform/graphics/FloatQuad.cpp:
2708         (WebCore::FloatQuad::isCounterclockwise):
2709         * platform/graphics/FloatQuad.h:
2710         * platform/graphics/chromium/LayerChromium.cpp:
2711         (WebCore::LayerChromium::drawTexturedQuad):
2712         * platform/graphics/chromium/LayerChromium.h:
2713         * platform/graphics/chromium/LayerRendererChromium.cpp:
2714         (WebCore::LayerRendererChromium::LayerRendererChromium):
2715         (WebCore::LayerRendererChromium::headsUpDisplayProgram):
2716         (WebCore::LayerRendererChromium::renderSurfaceProgram):
2717         (WebCore::LayerRendererChromium::renderSurfaceProgramAA):
2718         (WebCore::LayerRendererChromium::renderSurfaceMaskProgram):
2719         (WebCore::LayerRendererChromium::renderSurfaceMaskProgramAA):
2720         (WebCore::LayerRendererChromium::tilerProgramSwizzle):
2721         (WebCore::LayerRendererChromium::canvasLayerProgram):
2722         (WebCore::LayerRendererChromium::pluginLayerProgram):
2723         (WebCore::LayerRendererChromium::videoLayerRGBAProgram):
2724         (WebCore::LayerRendererChromium::videoLayerYUVProgram):
2725         (WebCore::LayerRendererChromium::cleanupSharedObjects):
2726         * platform/graphics/chromium/LayerRendererChromium.h:
2727         (WebCore::LayerRendererChromium::sharedGeometryQuad):
2728         * platform/graphics/chromium/ShaderChromium.cpp:
2729         (WebCore::VertexShaderQuad::VertexShaderQuad):
2730         (WebCore::VertexShaderQuad::init):
2731         (WebCore::VertexShaderQuad::getShaderString):
2732         (WebCore::FragmentShaderRGBATexAlphaAA::FragmentShaderRGBATexAlphaAA):
2733         (WebCore::FragmentShaderRGBATexAlphaAA::init):
2734         (WebCore::FragmentShaderRGBATexAlphaAA::getShaderString):
2735         (WebCore::FragmentTexClampAlphaAABinding::FragmentTexClampAlphaAABinding):
2736         (WebCore::FragmentTexClampAlphaAABinding::init):
2737         (WebCore::FragmentShaderRGBATexClampAlphaAA::getShaderString):
2738         (WebCore::FragmentShaderRGBATexClampSwizzleAlphaAA::getShaderString):
2739         (WebCore::FragmentShaderRGBATexAlphaMaskAA::FragmentShaderRGBATexAlphaMaskAA):
2740         (WebCore::FragmentShaderRGBATexAlphaMaskAA::init):
2741         (WebCore::FragmentShaderRGBATexAlphaMaskAA::getShaderString):
2742         * platform/graphics/chromium/ShaderChromium.h:
2743         (WebCore::VertexShaderQuad::matrixLocation):
2744         (WebCore::VertexShaderQuad::pointLocation):
2745         (WebCore::FragmentShaderRGBATexAlphaAA::alphaLocation):
2746         (WebCore::FragmentShaderRGBATexAlphaAA::samplerLocation):
2747         (WebCore::FragmentShaderRGBATexAlphaAA::edgeLocation):
2748         (WebCore::FragmentShaderRGBATexAlphaMaskAA::alphaLocation):
2749         (WebCore::FragmentShaderRGBATexAlphaMaskAA::samplerLocation):
2750         (WebCore::FragmentShaderRGBATexAlphaMaskAA::maskSamplerLocation):
2751         (WebCore::FragmentShaderRGBATexAlphaMaskAA::edgeLocation):
2752         * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp:
2753         (WebCore::CCCanvasLayerImpl::draw):
2754         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
2755         (WebCore::CCHeadsUpDisplay::draw):
2756         * platform/graphics/chromium/cc/CCLayerQuad.cpp: Added.
2757         (WebCore::CCLayerQuad::Edge::Edge):
2758         (WebCore::CCLayerQuad::CCLayerQuad):
2759         (WebCore::CCLayerQuad::floatQuad):
2760         (WebCore::CCLayerQuad::toFloatArray):
2761         * platform/graphics/chromium/cc/CCLayerQuad.h: Added.
2762         (WebCore::CCLayerQuad::Edge::Edge):
2763         (WebCore::CCLayerQuad::Edge::x):
2764         (WebCore::CCLayerQuad::Edge::y):
2765         (WebCore::CCLayerQuad::Edge::z):
2766         (WebCore::CCLayerQuad::Edge::setX):
2767         (WebCore::CCLayerQuad::Edge::setY):
2768         (WebCore::CCLayerQuad::Edge::setZ):
2769         (WebCore::CCLayerQuad::Edge::set):
2770         (WebCore::CCLayerQuad::Edge::moveX):
2771         (WebCore::CCLayerQuad::Edge::moveY):
2772         (WebCore::CCLayerQuad::Edge::moveZ):
2773         (WebCore::CCLayerQuad::Edge::move):
2774         (WebCore::CCLayerQuad::Edge::scaleX):
2775         (WebCore::CCLayerQuad::Edge::scaleY):
2776         (WebCore::CCLayerQuad::Edge::scaleZ):
2777         (WebCore::CCLayerQuad::Edge::scale):
2778         (WebCore::CCLayerQuad::Edge::intersect):
2779         (WebCore::CCLayerQuad::CCLayerQuad):
2780         (WebCore::CCLayerQuad::left):
2781         (WebCore::CCLayerQuad::top):
2782         (WebCore::CCLayerQuad::right):
2783         (WebCore::CCLayerQuad::bottom):
2784         (WebCore::CCLayerQuad::inflateX):
2785         (WebCore::CCLayerQuad::inflateY):
2786         (WebCore::CCLayerQuad::inflate):
2787         (WebCore::CCLayerQuad::inflateAntiAliasingDistance):
2788         * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp:
2789         (WebCore::CCPluginLayerImpl::draw):
2790         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
2791         (WebCore::CCRenderSurface::draw):
2792         (WebCore::CCRenderSurface::drawLayer):
2793         (WebCore::CCRenderSurface::drawSurface):
2794         * platform/graphics/chromium/cc/CCRenderSurface.h:
2795         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2796         (WebCore::CCTiledLayerImpl::draw):
2797         (WebCore::CCTiledLayerImpl::drawTiles):
2798         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
2799         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
2800         (WebCore::CCVideoLayerImpl::drawYUV):
2801         (WebCore::CCVideoLayerImpl::drawRGBA):
2802         * platform/graphics/transforms/TransformationMatrix.cpp:
2803         (WebCore::TransformationMatrix::to2dTransform):
2804         * platform/graphics/transforms/TransformationMatrix.h:
2805
2806 2011-09-06  Oliver Hunt  <oliver@apple.com>
2807
2808         Remove JSObjectWithGlobalObject
2809         https://bugs.webkit.org/show_bug.cgi?id=67689
2810
2811         Reviewed by Geoff Garen.
2812
2813         Remove use of anonymous storage and JSObjectWithGlobalObject for
2814         accessing a JSObject's global object now that they're available
2815         on the object's structure.
2816
2817         * bindings/js/JSDOMWindowShell.cpp:
2818         (WebCore::JSDOMWindowShell::setWindow):
2819         * bindings/js/JSDOMWrapper.h:
2820         (WebCore::JSDOMWrapper::globalObject):
2821         (WebCore::JSDOMWrapper::JSDOMWrapper):
2822         * bindings/js/WorkerScriptController.cpp:
2823         (WebCore::WorkerScriptController::initScript):
2824         * bindings/scripts/CodeGeneratorJS.pm:
2825         (GenerateHeader):
2826         (GenerateImplementation):
2827         * bridge/objc/objc_runtime.h:
2828         * bridge/objc/objc_runtime.mm:
2829         (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
2830         (JSC::Bindings::ObjcFallbackObjectImp::finishCreation):
2831         * bridge/runtime_object.cpp:
2832         (JSC::Bindings::RuntimeObject::RuntimeObject):
2833         (JSC::Bindings::RuntimeObject::finishCreation):
2834         * bridge/runtime_object.h:
2835
2836 2011-09-07  Ryosuke Niwa  <rniwa@webkit.org>
2837
2838         Mac build fix after r94694.
2839
2840         * WebCore.xcodeproj/project.pbxproj:
2841
2842 2011-09-07  Tim Horton  <timothy_horton@apple.com>
2843
2844         FELighting is using width instead of height to determine skip for parallel(n>2) case
2845         https://bugs.webkit.org/show_bug.cgi?id=67719
2846         <rdar://problem/10086178>
2847
2848         Reviewed by Dirk Schulze.
2849
2850         No new tests, because the bug only exhibits under conditions which are currently
2851         impossible by default (using more than 2 cores) on some platforms.
2852
2853         * platform/graphics/filters/FELighting.cpp:
2854         (WebCore::FELighting::platformApplyGeneric):
2855
2856 2011-09-07  W. James MacLean  <wjmaclean@chromium.org>
2857
2858         Eliminate motion jitter in animated, blurred SVG image
2859         https://bugs.webkit.org/show_bug.cgi?id=67503
2860
2861         Fixes filter shear-free transform applied to SVG images.
2862
2863         In applyResource() the shearFreeAbsoluteTransform is applied to the drawing region,
2864         which is based on the object bounding box (which doesn't move). For a rotation
2865         around the centre of the box, this should really just be the identity matrix,
2866         since the BB should neither change size nor location. So really, we're just interested
2867         in the scale change of the BB here, and not in moving it.
2868
2869         This impacts how slices are extracted, and affects the {x|y}Mid and {x|y}Max extractions
2870         for vertical and horizontal slices, so the test verifies these.
2871
2872         Reviewed by Dirk Schulze.
2873
2874         Test: svg/W3C-SVG-1.1-SE/filters-image-05-f.svg
2875
2876         * rendering/svg/RenderSVGResourceFilter.cpp:
2877         (WebCore::RenderSVGResourceFilter::applyResource):
2878
2879 2011-09-03  Robert Hogan  <robert@webkit.org>
2880
2881         Elements with position:absolute don't move to correct position after images load
2882         https://bugs.webkit.org/show_bug.cgi?id=54611
2883
2884         Reviewed by Simon Fraser.
2885
2886         Test: fast/block/positioning/absolute-layout-after-image-load.html
2887               fast/block/positioning/positioned-float-layout-after-image-load.html
2888
2889         In the test the 'label' block is an absolutely positioned child of an inline flow. So during layout, 
2890         this RenderBlock::layoutPositionedObjects fails to dirty it for rendering because it requires 
2891         the parent to be a BlockFlow. The code to do this was introduced in http://trac.webkit.org/changeset/8284. 
2892         There doesn't seem to be a good reason for requiring a BlockFlow, so remove the check. Do the same
2893         for positioned floats in RenderBlock::positionedFloatsNeedRelayout(), although currently layoutPositionedObjects()
2894         takes care of it this at least ensures no regression in future.
2895
2896         Note: Although the issue is encountered only on first load without a fragment identifier, it 
2897         happens reliably when you include the fragment identifier in the url (#Footnote_1). This is so 
2898         because scrolling to the fragment always happens before the image has loaded, rendering the page 
2899         and clearing the initial dirty bits in the positioned element's renderer. When the image finally 
2900         loads in this scenario, the positioned element is otherwise clean and relies on the above code to get 
2901         re-rendered.
2902
2903         * rendering/RenderBlock.cpp:
2904         (WebCore::RenderBlock::layoutPositionedObjects): remove the check for r->parent()->isBlockFlow() when 
2905                                                          deciding whether to mark children for layout
2906         (WebCore::RenderBlock::positionedFloatsNeedRelayout): ditto
2907
2908 2011-09-07  Anna Cavender  <annacc@chromium.org>
2909
2910         Moving platform/track to html/track to avoid layering violation.
2911         https://bugs.webkit.org/show_bug.cgi?id=67680
2912
2913         Reviewed by Adam Barth.
2914
2915         No new tests. No new functionality.
2916
2917         * CMakeLists.txt:
2918         * GNUmakefile.am:
2919         * GNUmakefile.list.am:
2920         * WebCore.gyp/WebCore.gyp:
2921         * WebCore.gypi:
2922         * WebCore.pri:
2923         * WebCore.pro:
2924         * html/track/CueParser.cpp: Renamed from Source/WebCore/platform/track/CueParser.cpp.
2925         * html/track/CueParser.h: Renamed from Source/WebCore/platform/track/CueParser.h.
2926         * html/track/CueParserPrivate.h: Renamed from Source/WebCore/platform/track/CueParserPrivate.h.
2927         * html/track/WebVTTParser.cpp: Renamed from Source/WebCore/platform/track/WebVTTParser.cpp.
2928         * html/track/WebVTTParser.h: Renamed from Source/WebCore/platform/track/WebVTTParser.h.
2929         * html/track/WebVTTToken.h: Renamed from Source/WebCore/platform/track/WebVTTToken.h.
2930         * html/track/WebVTTTokenizer.cpp: Renamed from Source/WebCore/platform/track/WebVTTTokenizer.cpp.
2931         * html/track/WebVTTTokenizer.h: Renamed from Source/WebCore/platform/track/WebVTTTokenizer.h.
2932
2933 2011-09-07  David Hyatt  <hyatt@apple.com>
2934
2935         https://bugs.webkit.org/show_bug.cgi?id=67286
2936
2937         REGRESSION: css2.1/t090204-display-change-01-b-ao.html fails after r94084.
2938
2939         Make sure that the trailing floats line box explicitly sets the line top with leading and line bottom with
2940         leading to just be the block height.
2941
2942         Reviewed by Dan Bernstein.
2943
2944         * rendering/RenderBlockLineLayout.cpp:
2945         (WebCore::RenderBlock::linkToEndLineIfNeeded):
2946
2947 2011-09-06  Abhishek Arya  <inferno@chromium.org>
2948
2949         Null owningRenderer crash in RenderScrollbar::updateScrollbarParts.
2950         https://bugs.webkit.org/show_bug.cgi?id=67669
2951
2952         Reviewed by James Robinson.
2953
2954         Owning renderer can be cleared for custom scrollbars in clearOwningRenderer()
2955         call. We need a null check in updateScrollbarParts, so that we do not crash.
2956
2957         No tests since issue seen in crash reports only and I donot know a way to
2958         reproduce.
2959
2960         * rendering/RenderScrollbar.cpp:
2961         (WebCore::RenderScrollbar::updateScrollbarParts):
2962
2963 2011-09-05  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2964
2965         [Qt][WK2] Make TiledDrawingArea request tiles only in the direction the viewport is panned to.
2966         https://bugs.webkit.org/show_bug.cgi?id=67606
2967
2968         Reviewed by Noam Rosenthal.
2969
2970         TiledBackingStore previously used different values for horizontal and vertial multiplication
2971         to calculate the cover area.
2972         This patch replaces this mechanism, used to give a bigger panning range to vertical panning,
2973         with the possibility to use the motion vector of the viewport to request tiles ahead instead.
2974         This allows economies on rendering resources as tiles won't be rendered beside the trajectory
2975         of the viewport.
2976
2977         * platform/graphics/TiledBackingStore.cpp:
2978         (WebCore::TiledBackingStore::TiledBackingStore):
2979         (WebCore::TiledBackingStore::setKeepAndCoverAreaMultipliers):
2980         (WebCore::TiledBackingStore::setCoverAreaFocusVector):
2981         (WebCore::TiledBackingStore::createTiles):
2982         (WebCore::TiledBackingStore::calculateKeepRect):
2983         (WebCore::TiledBackingStore::calculateCoverRect):
2984         * platform/graphics/TiledBackingStore.h:
2985         (WebCore::TiledBackingStore::getKeepAndCoverAreaMultipliers):
2986
2987 2011-09-01  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2988
2989         [Qt] TiledBackingStore: Import the resizeEdgeTiles logic from TiledDrawindAreaProxy.
2990         https://bugs.webkit.org/show_bug.cgi?id=67416
2991
2992         Reviewed by Kenneth Rohde Christiansen.
2993
2994         Original code by Antti Koivisto.
2995         With the current code, when the page is layouted during load, edge tiles will
2996         get removed instead of continuing to show their front buffer while the tile
2997         is being rendered for the new size.
2998
2999         * platform/graphics/Tile.h:
3000         * platform/graphics/TiledBackingStore.cpp:
3001         (WebCore::TiledBackingStore::createTiles):
3002         (WebCore::TiledBackingStore::resizeEdgeTiles):
3003         * platform/graphics/TiledBackingStore.h:
3004         * platform/graphics/qt/TileQt.cpp:
3005         (WebCore::TileQt::resize):
3006         * platform/graphics/qt/TileQt.h:
3007
3008 2011-09-07  Tim Horton  <timothy_horton@apple.com>
3009
3010         Don't round-trip through TransformationMatrix in SVGImageBufferTools::clearAffineTransform2DRotation
3011         https://bugs.webkit.org/show_bug.cgi?id=67242
3012         <rdar://problem/10069770>
3013
3014         Reviewed by Dirk Schulze.
3015
3016         No new tests, minor performance improvement.
3017
3018         * platform/graphics/transforms/AffineTransform.cpp:
3019         (WebCore::AffineTransform::blend):
3020         (WebCore::AffineTransform::decompose):
3021         (WebCore::AffineTransform::recompose):
3022         * platform/graphics/transforms/AffineTransform.h:
3023         * rendering/svg/SVGImageBufferTools.cpp:
3024         (WebCore::SVGImageBufferTools::clear2DRotation):
3025
3026 2011-09-06  Pavel Podivilov  <podivilov@chromium.org>
3027
3028         Web Inspector: do not re-create RawSourceCode when toggling pretty-print mode.
3029         https://bugs.webkit.org/show_bug.cgi?id=67647
3030
3031         1) Implement RawSourceCode.setFormatted that allows toggling pretty-print mode on the fly without resetting everything.
3032         2) Add RawSourceCode unit tests.
3033         3) Remove source mapping listeners and console messages from presentation model (they live in RawSourceCode now).
3034
3035         Reviewed by Yury Semikhatsky.
3036
3037         Test: inspector/debugger/raw-source-code.html
3038
3039         * inspector/front-end/DebuggerPresentationModel.js:
3040         (WebInspector.DebuggerPresentationModel):
3041         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation):
3042         (WebInspector.DebuggerPresentationModel.prototype._addScript):
3043         (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated):
3044         (WebInspector.DebuggerPresentationModel.prototype.setFormatSource):
3045         (WebInspector.DebuggerPresentationModel.prototype._createRawSourceCodeId):
3046         (WebInspector.DebuggerPresentationModel.prototype._debuggerReset):
3047         * inspector/front-end/ScriptsPanel.js:
3048         (WebInspector.ScriptsPanel.prototype._toggleFormatSource):
3049         * inspector/front-end/SourceFile.js:
3050         (WebInspector.RawSourceCode):
3051         (WebInspector.RawSourceCode.prototype.get uiSourceCode):
3052         (WebInspector.RawSourceCode.prototype.setFormatted):
3053         (WebInspector.RawSourceCode.prototype.rawLocationToUILocation):
3054         (WebInspector.RawSourceCode.prototype._saveSourceMapping):
3055
3056 2011-09-07  Alexander Pavlov  <apavlov@chromium.org>
3057
3058         Web Inspector: Implement circular tabbing through the Styles sidebar pane contents
3059         https://bugs.webkit.org/show_bug.cgi?id=67127
3060
3061         Reviewed by Yury Semikhatsky.
3062
3063         * inspector/front-end/Section.js:
3064         (WebInspector.Section.prototype.get firstSibling):
3065         (WebInspector.Section.prototype.get lastSibling):
3066         * inspector/front-end/StylesSidebarPane.js:
3067         (WebInspector.StylePropertiesSection.prototype.nextEditableSibling):
3068         (WebInspector.StylePropertiesSection.prototype.previousEditableSibling):
3069         (WebInspector.StylePropertiesSection.prototype.startEditingSelector):
3070         (WebInspector.StylePropertiesSection.prototype._moveEditorFromSelector):
3071         (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted.successCallback):
3072         (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted):
3073         (WebInspector.StylePropertyTreeElement.prototype):
3074         (WebInspector.StylePropertyTreeElement.prototype.element.userInput.previousContent.context.moveDirection):
3075
3076 2011-09-02  Andrey Kosyakov  <caseq@chromium.org>
3077
3078         Web Inspector: [Extensions API] expose console API
3079         https://bugs.webkit.org/show_bug.cgi?id=67506
3080
3081         Reviewed by Pavel Feldman.
3082
3083         Test: inspector/extensions/extensions-console.html
3084
3085         * inspector/front-end/ConsoleMessage.js:
3086         (WebInspector.ConsoleMessage.prototype.get text):
3087         (WebInspector.ConsoleMessage.prototype.get parameters):
3088         * inspector/front-end/ExtensionAPI.js:
3089         (WebInspector.injectedExtensionAPI.InspectorExtensionAPI):
3090         (WebInspector.injectedExtensionAPI):
3091         (WebInspector.injectedExtensionAPI.Console.prototype.getMessages):
3092         (WebInspector.injectedExtensionAPI.Console.prototype.addMessage):
3093         (WebInspector.injectedExtensionAPI.Console.prototype.get MessageLevel):
3094         (WebInspector.injectedExtensionAPI.Network.dispatchRequestEvent):
3095         (WebInspector.injectedExtensionAPI.Network):
3096         (WebInspector.injectedExtensionAPI.AuditCategoryImpl.dispatchAuditEvent):
3097         (WebInspector.injectedExtensionAPI.AuditCategoryImpl):
3098         (WebInspector.injectedExtensionAPI.InspectedWindow.dispatchResourceEvent):
3099         (WebInspector.injectedExtensionAPI.InspectedWindow.dispatchResourceContentEvent):
3100         (WebInspector.injectedExtensionAPI.InspectedWindow):
3101         * inspector/front-end/ExtensionCommon.js:
3102         (WebInspector.commonExtensionSymbols):
3103         * inspector/front-end/ExtensionServer.js:
3104         (WebInspector.ExtensionServer):
3105         (WebInspector.ExtensionServer.prototype._notifyConsoleMessageAdded):
3106         (WebInspector.ExtensionServer.prototype._onGetConsoleMessages):
3107         (WebInspector.ExtensionServer.prototype._onAddConsoleMessage):
3108         (WebInspector.ExtensionServer.prototype._makeConsoleMessage):
3109         (WebInspector.ExtensionServer.prototype._makeConsoleMessage.convertParameter):
3110         (WebInspector.ExtensionServer.prototype._dispatchCallback):
3111         (WebInspector.ExtensionServer.prototype.initExtensions):
3112
3113 2011-09-05  Andrey Kosyakov  <caseq@chromium.org>
3114
3115         Web Inspector: disable popover when a mouse button is pressed
3116         https://bugs.webkit.org/show_bug.cgi?id=67610
3117
3118         Reviewed by Pavel Feldman.
3119
3120         - disable popover when a mouse button is pressed
3121         - disable popover in a SourceFrame when the source is being edited
3122
3123         * inspector/front-end/Popover.js:
3124         (WebInspector.PopoverHelper):
3125         (WebInspector.PopoverHelper.prototype._mouseUp):
3126         (WebInspector.PopoverHelper.prototype._mouseDown):
3127         (WebInspector.PopoverHelper.prototype._handleMouseAction):
3128         * inspector/front-end/SourceFrame.js:
3129         (WebInspector.SourceFrame.prototype._onHidePopover):
3130         (WebInspector.SourceFrame.prototype.doubleClick):
3131
3132 2011-09-07  Antti Koivisto  <antti@apple.com>
3133
3134         https://bugs.webkit.org/show_bug.cgi?id=67634
3135         De-virtualize styleForRenderer()
3136
3137         Reviewed by Sam Weinig.
3138         
3139         This has performance and code clarity benefits.
3140
3141         - move styleForRenderer from Node to Element
3142         - get rid of the now unnecessary NodeRenderingContext parameter
3143         - de-virtualize, add virtual customStyleForRenderer()
3144
3145         * dom/Element.cpp:
3146         (WebCore::Element::customStyleForRenderer):
3147         (WebCore::Element::styleForRenderer):
3148         (WebCore::Element::recalcStyle):
3149         * dom/Element.h:
3150         * dom/Node.cpp:
3151         * dom/Node.h:
3152         (WebCore::Node::hasCustomWillOrDidRecalcStyle):
3153         (WebCore::Node::setHasCustomWillOrDidRecalcStyle):
3154         (WebCore::Node::hasCustomStyleForRenderer):
3155         (WebCore::Node::setHasCustomStyleForRenderer):
3156         
3157             Move styleForRenderer, add customStyleForRenderer, add a bit.
3158         
3159         * dom/NodeRenderingContext.cpp:
3160         (WebCore::NodeRendererFactory::createRendererAndStyle): 
3161         
3162             Handle non-element case separately since styleForRenderer was moved from Node to Element.
3163
3164         * html/HTMLNoScriptElement.cpp:
3165         (WebCore::HTMLNoScriptElement::HTMLNoScriptElement):
3166         (WebCore::HTMLNoScriptElement::customStyleForRenderer):
3167         * html/HTMLNoScriptElement.h:
3168         
3169             Move a strange XHTMLMP special case to where it belongs.
3170
3171         * html/HTMLOptGroupElement.cpp:
3172         (WebCore::HTMLOptGroupElement::attach):
3173         * html/HTMLOptionElement.cpp:
3174         (WebCore::HTMLOptionElement::attach):
3175         * html/HTMLTitleElement.cpp:
3176         (WebCore::HTMLTitleElement::textWithDirection):
3177         * html/shadow/TextControlInnerElements.cpp:
3178         (WebCore::TextControlInnerElement::TextControlInnerElement):
3179         (WebCore::TextControlInnerElement::customStyleForRenderer):
3180         (WebCore::TextControlInnerTextElement::TextControlInnerTextElement):
3181         (WebCore::TextControlInnerTextElement::customStyleForRenderer):
3182         * html/shadow/TextControlInnerElements.h:
3183         * rendering/svg/SVGShadowTreeElements.cpp:
3184         (WebCore::SVGShadowTreeContainerElement::customStyleForRenderer):
3185         * rendering/svg/SVGShadowTreeElements.h:
3186         * svg/SVGElement.cpp:
3187         (WebCore::SVGElement::SVGElement):
3188         (WebCore::SVGElement::customStyleForRenderer):
3189         * svg/SVGElement.h:
3190         
3191             Adopt customStyleForRenderer().
3192
3193 2011-09-07  Ryosuke Niwa  <rniwa@webkit.org>
3194
3195         Change event is not fired for input[type=number] when the user reverts a change made by script
3196         https://bugs.webkit.org/show_bug.cgi?id=67697
3197
3198         Reviewed by Kent Tamura.
3199
3200         The bug was caused by HTMLInputElement::setValue not calling setTextAsOfLastFormControlChangeEvent
3201         for text fields other than type=text.
3202
3203         Also fixed a that stepUpFromRenderer does not call setTextAsOfLastFormControlChangeEvent at appropriate
3204         timing due to setValueAsNumber always passing sendChangeEvent=false to setValue by propagating values
3205         through setValueAsNumber and applyStep. This refactoring allows us to remove calls to dispatch* in
3206         stepUpFromRenderer because they're now called in setValueAsNumber or applyStep.
3207
3208         Test: fast/forms/number-input-changeevent.html
3209
3210         * html/BaseDateAndTimeInputType.cpp:
3211         (WebCore::BaseDateAndTimeInputType::setValueAsNumber):
3212         * html/BaseDateAndTimeInputType.h:
3213         * html/HTMLInputElement.cpp:
3214         (WebCore::HTMLInputElement::applyStep):
3215         (WebCore::HTMLInputElement::stepUp):
3216         (WebCore::HTMLInputElement::stepDown):
3217         (WebCore::HTMLInputElement::setValue):
3218         (WebCore::HTMLInputElement::setValueAsNumber):
3219         (WebCore::HTMLInputElement::stepUpFromRenderer):
3220         * html/HTMLInputElement.h:
3221         * html/InputType.cpp:
3222         (WebCore::InputType::setValueAsNumber):
3223         * html/InputType.h:
3224         * html/NumberInputType.cpp:
3225         (WebCore::NumberInputType::setValueAsNumber):
3226         * html/NumberInputType.h:
3227         * html/RangeInputType.cpp:
3228         (WebCore::RangeInputType::setValueAsNumber):
3229         (WebCore::RangeInputType::handleKeydownEvent):
3230         * html/RangeInputType.h:
3231
3232 2011-09-07  Antti Koivisto  <antti@apple.com>
3233
3234         Try to fix Qt build by moving the Qt specific include (which is not really allowed here!).
3235
3236         Not reviewed.
3237
3238         * css/CSSStyleSelector.cpp:
3239         * css/SelectorChecker.cpp:
3240         (WebCore::SelectorChecker::determineLinkStateSlowCase):
3241
3242 2011-09-07  Antti Koivisto  <antti@apple.com>
3243
3244         Move SelectorChecker out from CSSStyleSelector scope
3245         https://bugs.webkit.org/show_bug.cgi?id=67648
3246
3247         Reviewed by Sam Weinig.
3248
3249         - Move SelectorChecker to SelectorChecker.h/cpp
3250         - Make private functions private
3251         - Make members private, add accessors
3252         - Move m_sameOriginOnly to CSSStyleSelector as it is not used by SelectorChecker
3253
3254         * CMakeLists.txt:
3255         * GNUmakefile.list.am:
3256         * WebCore.gypi:
3257         * WebCore.pro:
3258         * WebCore.vcproj/WebCore.vcproj:
3259         * WebCore.xcodeproj/project.pbxproj:
3260         * css/CSSStyleSelector.cpp:
3261         (WebCore::CSSStyleSelector::CSSStyleSelector):
3262         (WebCore::CSSStyleSelector::matchRules):
3263         (WebCore::CSSStyleSelector::matchRulesForList):
3264         (WebCore::CSSStyleSelector::sortMatchedRules):
3265         (WebCore::CSSStyleSelector::initForStyleResolve):
3266         (WebCore::CSSStyleSelector::matchUARules):
3267         (WebCore::CSSStyleSelector::styleForElement):
3268         (WebCore::CSSStyleSelector::pseudoStyleForElement):
3269         (WebCore::CSSStyleSelector::styleForPage):
3270         (WebCore::CSSStyleSelector::adjustRenderStyle):
3271         (WebCore::CSSStyleSelector::pseudoStyleRulesForElement):
3272         (WebCore::CSSStyleSelector::checkSelector):
3273         (WebCore::RuleData::RuleData):
3274         (WebCore::CSSStyleSelector::applyProperty):
3275         (WebCore::CSSStyleSelector::checkForGenericFamilyChange):
3276         (WebCore::CSSStyleSelector::setFontSize):
3277         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
3278         * css/CSSStyleSelector.h:
3279         (WebCore::CSSStyleSelector::style):
3280         (WebCore::CSSStyleSelector::parentStyle):
3281         (WebCore::CSSStyleSelector::rootElementStyle):
3282         (WebCore::CSSStyleSelector::element):
3283         (WebCore::CSSStyleSelector::fontDescription):
3284         (WebCore::CSSStyleSelector::parentFontDescription):
3285         (WebCore::CSSStyleSelector::setFontDescription):
3286         (WebCore::CSSStyleSelector::setZoom):
3287         (WebCore::CSSStyleSelector::setEffectiveZoom):
3288         (WebCore::CSSStyleSelector::setTextSizeAdjust):
3289         (WebCore::CSSStyleSelector::setStyle):
3290         (WebCore::CSSStyleSelector::fontSelector):
3291         (WebCore::CSSStyleSelector::allVisitedStateChanged):
3292         (WebCore::CSSStyleSelector::visitedStateChanged):
3293         (WebCore::CSSStyleSelector::usesSiblingRules):
3294         (WebCore::CSSStyleSelector::usesFirstLineRules):
3295         (WebCore::CSSStyleSelector::usesBeforeAfterRules):
3296         (WebCore::CSSStyleSelector::usesLinkRules):
3297         (WebCore::CSSStyleSelector::addMatchedRule):
3298         (WebCore::CSSStyleSelector::isRightPage):
3299         (WebCore::CSSStyleSelector::ParentStackFrame::ParentStackFrame):
3300         (WebCore::CSSStyleSelector::styleNotYetAvailable):
3301         * css/SelectorChecker.cpp: Added.
3302         (WebCore::SelectorChecker::SelectorChecker):
3303         (WebCore::linkAttribute):
3304         (WebCore::SelectorChecker::determineLinkStateSlowCase):
3305         (WebCore::SelectorChecker::checkSelector):
3306         (WebCore::SelectorChecker::fastCheckSelector):
3307         (WebCore::SelectorChecker::isFastCheckableSelector):
3308         (WebCore::addLocalNameToSet):
3309         (WebCore::createHtmlCaseInsensitiveAttributesSet):
3310         (WebCore::htmlAttributeHasCaseInsensitiveValue):
3311         (WebCore::attributeQualifiedNameMatches):
3312         (WebCore::attributeValueMatches):
3313         (WebCore::anyAttributeMatches):
3314         (WebCore::SelectorChecker::checkOneSelector):
3315         (WebCore::SelectorChecker::checkScrollbarPseudoClass):
3316         (WebCore::SelectorChecker::allVisitedStateChanged):
3317         (WebCore::SelectorChecker::visitedStateChanged):
3318         * css/SelectorChecker.h: Added.
3319         (WebCore::SelectorChecker::document):
3320         (WebCore::SelectorChecker::strictParsing):
3321         (WebCore::SelectorChecker::isCollectingRulesOnly):
3322         (WebCore::SelectorChecker::setCollectingRulesOnly):
3323         (WebCore::SelectorChecker::isMatchingVisitedPseudoClass):
3324         (WebCore::SelectorChecker::setMatchingVisitedPseudoClass):
3325         (WebCore::SelectorChecker::pseudoStyle):
3326         (WebCore::SelectorChecker::setPseudoStyle):
3327         (WebCore::SelectorChecker::hasUnknownPseudoElements):
3328         (WebCore::SelectorChecker::clearHasUnknownPseudoElements):
3329         (WebCore::SelectorChecker::determineLinkState):
3330         * dom/Element.cpp:
3331         (WebCore::Element::webkitMatchesSelector):
3332         * dom/SelectorQuery.cpp:
3333         (WebCore::SelectorQuery::SelectorQuery):
3334         * dom/SelectorQuery.h:
3335
3336 2011-09-07  Dmitry Lomov  <dslomov@google.com>
3337
3338         https://bugs.webkit.org/show_bug.cgi?id=67413 
3339         [Chromium]Web Inspector: inspected page with dedicated worker crashes on refresh.
3340         This patch enforces lifetime ordering between WorkerInspectorController and WorkerScriptController.
3341
3342         Reviewed by Yury Semikhatsky.
3343
3344         * workers/WorkerContext.cpp:
3345         (WebCore::WorkerContext::clearInspector):
3346         * workers/WorkerContext.h:
3347         * workers/WorkerThread.cpp:
3348         (WebCore::WorkerThreadShutdownFinishTask::performTask):
3349
3350 2011-09-07  Sheriff Bot  <webkit.review.bot@gmail.com>
3351
3352         Unreviewed, rolling out r94627 and r94632.
3353         http://trac.webkit.org/changeset/94627
3354         http://trac.webkit.org/changeset/94632
3355         https://bugs.webkit.org/show_bug.cgi?id=67698
3356
3357         It broke tests on GTK and Qt (Requested by Ossy on #webkit).
3358
3359         * WebCore.exp.in:
3360         * bindings/js/JSDOMBinding.h:
3361         (WebCore::DOMConstructorObject::DOMConstructorObject):
3362         * bindings/js/JSDOMGlobalObject.cpp:
3363         (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
3364         * bindings/js/JSDOMGlobalObject.h:
3365         * bindings/js/JSDOMWindowShell.cpp:
3366         (WebCore::JSDOMWindowShell::create):
3367         * bindings/js/JSDOMWindowShell.h:
3368         * bindings/js/JSDOMWrapper.h:
3369         (WebCore::JSDOMWrapper::JSDOMWrapper):
3370         * bindings/scripts/CodeGeneratorJS.pm:
3371         (GenerateImplementation):
3372         * bindings/scripts/test/JS/JSTestInterface.cpp:
3373         (WebCore::JSTestInterface::JSTestInterface):
3374         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3375         (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
3376         * bindings/scripts/test/JS/JSTestObj.cpp:
3377         (WebCore::JSTestObj::JSTestObj):
3378         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3379         (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
3380         * bridge/c/CRuntimeObject.cpp:
3381         (JSC::Bindings::CRuntimeObject::CRuntimeObject):
3382         * bridge/c/CRuntimeObject.h:
3383         * bridge/jni/jsc/JavaRuntimeObject.cpp:
3384         (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject):
3385         * bridge/jni/jsc/JavaRuntimeObject.h:
3386         * bridge/objc/ObjCRuntimeObject.h:
3387         * bridge/objc/ObjCRuntimeObject.mm:
3388         (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
3389         * bridge/objc/objc_runtime.h:
3390         (JSC::Bindings::ObjcFallbackObjectImp::create):
3391         * bridge/objc/objc_runtime.mm:
3392         (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
3393         * bridge/qt/qt_instance.cpp:
3394         (JSC::Bindings::QtRuntimeObject::QtRuntimeObject):
3395         * bridge/qt/qt_pixmapruntime.cpp:
3396         (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject):
3397         * bridge/qt/qt_runtime.cpp:
3398         (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod):
3399         * bridge/qt/qt_runtime.h:
3400         * bridge/runtime_array.cpp:
3401         (JSC::RuntimeArray::RuntimeArray):
3402         * bridge/runtime_array.h:
3403         (JSC::RuntimeArray::create):
3404         * bridge/runtime_method.cpp:
3405         (JSC::RuntimeMethod::RuntimeMethod):
3406         * bridge/runtime_method.h:
3407         * bridge/runtime_object.cpp:
3408         (JSC::Bindings::RuntimeObject::RuntimeObject):
3409         * bridge/runtime_object.h:
3410         (JSC::Bindings::RuntimeObject::create):
3411
3412 2011-08-31  Yury Semikhatsky  <yurys@chromium.org>
3413
3414         fast/workers/worker-script-error.html fails on Chromium after r94061
3415         https://bugs.webkit.org/show_bug.cgi?id=67206
3416
3417         Default action should be prevented if window.onerror returned true and stay
3418         not prevented otherwise.
3419
3420         Reviewed by Dmitry Titov.
3421
3422         Tests: fast/events/window-onerror14.html
3423                fast/events/window-onerror15.html
3424                fast/events/window-onerror16.html
3425
3426         * bindings/v8/V8AbstractEventListener.cpp:
3427         (WebCore::V8AbstractEventListener::invokeEventHandler):
3428         (WebCore::V8AbstractEventListener::shouldPreventDefault): allow specific
3429         event listeners to decide when to prevent default action based on the handler
3430         return value.
3431         * bindings/v8/V8AbstractEventListener.h:
3432         * bindings/v8/V8WindowErrorHandler.cpp:
3433         (WebCore::V8WindowErrorHandler::callListenerFunction):
3434         (WebCore::V8WindowErrorHandler::shouldPreventDefault):
3435         * bindings/v8/V8WindowErrorHandler.h:
3436         * bindings/v8/V8WorkerContextErrorHandler.cpp:
3437         (WebCore::V8WorkerContextErrorHandler::callListenerFunction):
3438         (WebCore::V8WorkerContextErrorHandler::shouldPreventDefault):
3439         * bindings/v8/V8WorkerContextErrorHandler.h:
3440
3441 2011-09-06  Xianzhu Wang  <wangxianzhu@chromium.org>
3442
3443         Replace usages of Vector<UChar> with existing StringBuilder
3444         https://bugs.webkit.org/show_bug.cgi?id=67079
3445
3446         Reviewed by Gavin Barraclough.
3447
3448         No new tests. All existing unit tests and layout tests should run
3449         as before.
3450
3451         * css/CSSOMUtils.cpp:
3452         (WebCore::appendCharacter):
3453         (WebCore::serializeCharacter):
3454         (WebCore::serializeCharacterAsCodePoint):
3455         (WebCore::serializeIdentifier):
3456         (WebCore::serializeString):
3457         * css/CSSOMUtils.h:
3458         * css/CSSPrimitiveValue.cpp:
3459         (WebCore::CSSPrimitiveValue::cssText):
3460         * css/CSSStyleSelector.cpp:
3461         (WebCore::CSSStyleSelector::SelectorChecker::determineLinkStateSlowCase):
3462         * css/CSSWrapShapes.cpp:
3463         (WebCore::CSSWrapShapeRect::cssText):
3464         (WebCore::CSSWrapShapeCircle::cssText):
3465         (WebCore::CSSWrapShapeEllipse::cssText):
3466         (WebCore::CSSWrapShapePolygon::cssText):
3467         * editing/HTMLInterchange.cpp:
3468         (WebCore::convertHTMLTextToInterchangeFormat):
3469         * editing/MarkupAccumulator.cpp:
3470         (WebCore::appendCharactersReplacingEntities):
3471         (WebCore::MarkupAccumulator::serializeNodes):
3472         (WebCore::MarkupAccumulator::appendStartTag):
3473         (WebCore::MarkupAccumulator::appendEndTag):
3474         (WebCore::MarkupAccumulator::concatenateMarkup):
3475         (WebCore::MarkupAccumulator::appendAttributeValue):
3476         (WebCore::MarkupAccumulator::appendCustomAttributes):
3477         (WebCore::MarkupAccumulator::appendQuotedURLAttributeValue):
3478         (WebCore::MarkupAccumulator::appendNodeValue):
3479         (WebCore::MarkupAccumulator::appendNamespace):
3480         (WebCore::MarkupAccumulator::appendText):
3481         (WebCore::MarkupAccumulator::appendComment):
3482         (WebCore::MarkupAccumulator::appendDocumentType):
3483         (WebCore::MarkupAccumulator::appendProcessingInstruction):
3484         (WebCore::MarkupAccumulator::appendElement):
3485         (WebCore::MarkupAccumulator::appendOpenTag):
3486         (WebCore::MarkupAccumulator::appendCloseTag):
3487         (WebCore::MarkupAccumulator::appendAttribute):
3488         (WebCore::MarkupAccumulator::appendCDATASection):
3489         (WebCore::MarkupAccumulator::appendStartMarkup):
3490         (WebCore::MarkupAccumulator::appendEndMarkup):
3491         * editing/MarkupAccumulator.h:
3492         * editing/markup.cpp:
3493         (WebCore::StyledMarkupAccumulator::appendElement):
3494         (WebCore::StyledMarkupAccumulator::wrapWithNode):
3495         (WebCore::StyledMarkupAccumulator::wrapWithStyleNode):
3496         (WebCore::StyledMarkupAccumulator::appendStyleNodeOpenTag):
3497         (WebCore::StyledMarkupAccumulator::takeResults):
3498         (WebCore::StyledMarkupAccumulator::appendText):
3499         (WebCore::urlToMarkup):
3500         * html/DOMTokenList.cpp:
3501         (WebCore::DOMTokenList::removeToken):
3502         * html/HTMLFontElement.cpp:
3503         (WebCore::parseFontSize):
3504         * html/HTMLTextFormControlElement.cpp:
3505         (WebCore::HTMLTextFormControlElement::strippedPlaceholder):
3506         * html/parser/CSSPreloadScanner.cpp:
3507         (WebCore::CSSPreloadScanner::emitRule):
3508         * html/parser/CSSPreloadScanner.h:
3509         * html/parser/HTMLEntityParser.cpp:
3510         (WebCore::consumeHTMLEntity):
3511         * html/parser/HTMLEntityParser.h:
3512         * html/parser/HTMLParserIdioms.cpp:
3513         (WebCore::parseHTMLInteger):
3514         (WebCore::parseHTMLNonNegativeInteger):
3515         * html/parser/HTMLTokenizer.cpp:
3516         (WebCore::HTMLTokenizer::processEntity):
3517         (WebCore::HTMLTokenizer::nextToken):
3518         * html/parser/HTMLTreeBuilder.cpp:
3519         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::giveRemainingTo):
3520         (WebCore::HTMLTreeBuilder::defaultForInTableText):
3521         * html/parser/HTMLTreeBuilder.h:
3522         * inspector/InspectorValues.cpp:
3523         (WebCore::InspectorValue::toJSONString):
3524         (WebCore::InspectorValue::writeJSON):
3525         (WebCore::InspectorBasicValue::writeJSON):
3526         (WebCore::InspectorString::writeJSON):
3527         (WebCore::InspectorObject::writeJSON):
3528         (WebCore::InspectorArray::writeJSON):
3529         * inspector/InspectorValues.h:
3530         * loader/CrossOriginAccessControl.cpp:
3531         (WebCore::createAccessControlPreflightRequest):
3532         * loader/appcache/ApplicationCacheStorage.cpp:
3533         (WebCore::ApplicationCacheStorage::store):
3534         * page/Chrome.cpp:
3535         (WebCore::Chrome::setToolTip):
3536         * page/PageSerializer.cpp:
3537         (WebCore::SerializerMarkupAccumulator::appendText):
3538         (WebCore::SerializerMarkupAccumulator::appendElement):
3539         (WebCore::SerializerMarkupAccumulator::appendCustomAttributes):
3540         * page/SecurityOrigin.cpp:
3541         (WebCore::SecurityOrigin::toString):
3542         * platform/KURL.cpp:
3543         (WebCore::KURL::deprecatedString):
3544         (WebCore::decodeURLEscapeSequences):
3545         * platform/LinkHash.cpp:
3546         (WebCore::squeezeOutNullCharacters):
3547         (WebCore::cleanSlashDotDotSlashes):
3548         (WebCore::mergeDoubleSlashes):
3549         (WebCore::cleanSlashDotSlashes):
3550         (WebCore::cleanPath):
3551         (WebCore::visitedURLInline):
3552         (WebCore::visitedURL):
3553         (WebCore::visitedLinkHash):
3554         * platform/LinkHash.h:
3555         * platform/gtk/DataObjectGtk.cpp:
3556         (WebCore::DataObjectGtk::setURL):
3557         * platform/network/HTTPParsers.cpp:
3558         (WebCore::extractMIMETypeFromMediaType):
3559         * platform/text/TextCodecICU.cpp:
3560         (WebCore::TextCodecICU::decode):
3561         * platform/text/TextStream.cpp:
3562         (WebCore::TextStream::operator<<):
3563         (WebCore::TextStream::release):
3564         * platform/text/TextStream.h:
3565         * plugins/PluginStream.cpp:
3566         (WebCore::PluginStream::startStream):
3567         * rendering/InlineTextBox.cpp:
3568         (WebCore::adjustCharactersAndLengthForHyphen):
3569         * rendering/InlineTextBox.h:
3570         (WebCore::BufferForAppendingHyphen::BufferForAppendingHyphen):
3571         * rendering/RenderListItem.cpp:
3572         (WebCore::RenderListItem::markerTextWithSuffix):
3573         * rendering/RenderListMarker.cpp:
3574         (WebCore::toSymbolic):
3575         (WebCore::RenderListMarker::paint):
3576         (WebCore::RenderListMarker::suffix):
3577         * rendering/RenderTreeAsText.cpp:
3578         (WebCore::quoteAndEscapeNonPrintables):
3579         * rendering/mathml/RenderMathMLFenced.cpp:
3580         (WebCore::RenderMathMLFenced::updateFromElement):
3581         * storage/IDBLevelDBCoding.cpp:
3582         (WebCore::IDBLevelDBCoding::decodeString):
3583         * xml/XMLHttpRequest.cpp:
3584         (WebCore::XMLHttpRequest::getAllResponseHeaders):
3585         * xml/XPathFunctions.cpp:
3586         (WebCore::XPath::FunId::evaluate):
3587         (WebCore::XPath::FunConcat::evaluate):
3588         * xml/XPathUtil.cpp:
3589         (WebCore::XPath::stringValue):
3590         * xml/XSLTProcessorLibxslt.cpp:
3591         (WebCore::writeToStringBuilder):
3592         (WebCore::saveResultToString):
3593         * xml/parser/CharacterReferenceParserInlineMethods.h:
3594         (WebCore::unconsumeCharacters):
3595         (WebCore::consumeCharacterReference):
3596         * xml/parser/XMLCharacterReferenceParser.cpp:
3597         (WebCore::consumeXMLCharacterReference):
3598         * xml/parser/XMLCharacterReferenceParser.h:
3599         * xml/parser/XMLTokenizer.cpp:
3600         (WebCore::XMLTokenizer::nextToken):
3601
3602 2011-09-05  Kent Tamura  <tkent@chromium.org>
3603
3604         REGRESSION (Safari 5.1 - ToT): File input retains its file icon when the value is reset
3605         https://bugs.webkit.org/show_bug.cgi?id=67567
3606
3607         Reviewed by Dimitri Glazkov.
3608
3609         - Introduce InputType::setValue(), which is called by HTMLInputElement::setValue().
3610         - Clear m_icon in FileInputType::setValue().
3611
3612         Tests: fast/forms/file/file-reset-in-change-expected.html
3613                fast/forms/file/file-reset-in-change.html
3614
3615         * html/BaseButtonInputType.cpp:
3616         (WebCore::BaseButtonInputType::setValue):
3617         Implemenation for the "default" mode.
3618         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#dom-input-value-default
3619         * html/BaseButtonInputType.h:
3620         * html/BaseCheckableInputType.cpp:
3621         (WebCore::BaseCheckableInputType::setValue):
3622         Implemenation for the "default/on" mode.
3623         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#dom-input-value-default-on
3624         * html/BaseCheckableInputType.h:
3625         * html/FileInputType.cpp:
3626         (WebCore::FileInputType::setValue):
3627         Implemenation for the "filename" mode, and clearing m_icon.
3628         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#dom-input-value-filename
3629         * html/FileInputType.h:
3630         * html/HTMLInputElement.cpp:
3631         (WebCore::HTMLInputElement::setValue):
3632         Move some code to InputType::setValue().
3633         (WebCore::HTMLInputElement::setValueInternal): A helper for InputType::setValue().
3634         * html/HTMLInputElement.h:
3635         * html/HiddenInputType.cpp:
3636         (WebCore::HiddenInputType::setValue):
3637         Implementation for the "default" mode.
3638         * html/HiddenInputType.h:
3639         * html/InputType.cpp:
3640         (WebCore::InputType::setValue):
3641         Implementation for the "value" mode.
3642         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#dom-input-value-value
3643         * html/InputType.h:
3644         * html/TextFieldInputType.cpp:
3645         (WebCore::TextFieldInputType::setValue):
3646         In addition to the "value" mode processing, updates placeholder visibililty.
3647         * html/TextFieldInputType.h:
3648
3649 2011-09-06  Ryosuke Niwa  <rniwa@webkit.org>
3650
3651         REGRESSION(r94274): The inner text value of an input element is not updated when input.value is set
3652         https://bugs.webkit.org/show_bug.cgi?id=67681
3653
3654         Reviewed by Kent Tamura.
3655
3656         The bug was caused by HTMLInputElement::setValue's not clearing m_suggestedValue before updateInnerTextValue is called.
3657         Since updateInnerTextValue uses the suggested value when one is present, we need to clear m_suggestedValue in advance.
3658
3659         Test: fast/forms/suggested-value-after-setvalue.html
3660
3661         * html/HTMLInputElement.cpp:
3662         (WebCore::HTMLInputElement::setValue):
3663
3664 2011-09-06  Adam Barth  <abarth@webkit.org>
3665
3666         Attempt to fix GTK build.
3667
3668         * bindings/gobject/WebKitHTMLElementWrapperFactory.cpp:
3669         (WebKit::createHTMLElementWrapper):
3670
3671 2011-09-06  Ryosuke Niwa  <rniwa@webkit.org>
3672
3673         fast/forms/suggested-value-crash.html crashes on Windows
3674         https://bugs.webkit.org/show_bug.cgi?id=67688
3675
3676         Reviewed by Adam Barth.
3677
3678         The crash was caused because functions in internals were accessing uninitialized QualifiedNames.
3679         Fixed the bug by avoiding to link to inputTag and textareaTag. Instead, we resort to toInputElement
3680         and string comparison.
3681
3682         * testing/Internals.cpp:
3683         (WebCore::Internals::wasLastChangeUserEdit):
3684         (WebCore::Internals::suggestedValue):
3685         (WebCore::Internals::setSuggestedValue):
3686
3687 2011-09-06  Mark Hahnenberg  <mhahnenberg@apple.com>
3688
3689         Unzip initialization lists and constructors in JSCell hierarchy (5/7)
3690         https://bugs.webkit.org/show_bug.cgi?id=67420
3691
3692         Reviewed by Geoffrey Garen.
3693
3694         No new tests.
3695
3696         Completed the fifth level of the refactoring to add finishCreation() 
3697         methods to all classes within the JSCell hierarchy with non-trivial 
3698         constructor bodies.
3699
3700         This primarily consists of pushing the calls to finishCreation() down 
3701         into the constructors of the subclasses of the second level of the hierarchy 
3702         as well as pulling the finishCreation() calls out into the class's corresponding
3703         create() method if it has one.  Doing both simultaneously allows us to 
3704         maintain the invariant that the finishCreation() method chain is called exactly 
3705         once during the creation of an object, since calling it any other number of 
3706         times (0, 2, or more) will cause an assertion failure.
3707
3708         * WebCore.exp.in:
3709         * bindings/js/JSDOMBinding.h:
3710         (WebCore::DOMConstructorObject::DOMConstructorObject):
3711         * bindings/js/JSDOMGlobalObject.cpp:
3712         (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
3713         (WebCore::JSDOMGlobalObject::finishCreation):
3714         * bindings/js/JSDOMGlobalObject.h:
3715         * bindings/js/JSDOMWindowShell.cpp:
3716         * bindings/js/JSDOMWindowShell.h:
3717         (WebCore::JSDOMWindowShell::create):
3718         * bindings/js/JSDOMWrapper.h:
3719         (WebCore::JSDOMWrapper::JSDOMWrapper):
3720         * bindings/scripts/CodeGeneratorJS.pm:
3721         (GenerateImplementation):
3722         * bindings/scripts/test/JS/JSTestInterface.cpp:
3723         (WebCore::JSTestInterface::JSTestInterface):
3724         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3725         (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
3726         * bindings/scripts/test/JS/JSTestObj.cpp:
3727         (WebCore::JSTestObj::JSTestObj):
3728         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3729         (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
3730         * bridge/c/CRuntimeObject.cpp:
3731         (JSC::Bindings::CRuntimeObject::CRuntimeObject):
3732         (JSC::Bindings::CRuntimeObject::finishCreation):
3733         * bridge/c/CRuntimeObject.h:
3734         * bridge/jni/jsc/JavaRuntimeObject.cpp:
3735         (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject):
3736         (JSC::Bindings::JavaRuntimeObject::finishCreation):
3737         * bridge/jni/jsc/JavaRuntimeObject.h:
3738         * bridge/objc/ObjCRuntimeObject.h:
3739         * bridge/objc/ObjCRuntimeObject.mm:
3740         (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
3741         (JSC::Bindings::ObjCRuntimeObject::finishCreation):
3742         * bridge/objc/objc_runtime.h:
3743         (JSC::Bindings::ObjcFallbackObjectImp::create):
3744         * bridge/objc/objc_runtime.mm:
3745         (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
3746         * bridge/qt/qt_instance.cpp:
3747         (JSC::Bindings::QtRuntimeObject::QtRuntimeObject):
3748         * bridge/qt/qt_pixmapruntime.cpp:
3749         (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject):
3750         * bridge/qt/qt_runtime.cpp:
3751         (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod):
3752         (JSC::Bindings::QtRuntimeMethod::finishCreation):
3753         * bridge/qt/qt_runtime.h:
3754         * bridge/runtime_array.cpp:
3755         (JSC::RuntimeArray::RuntimeArray):
3756         * bridge/runtime_array.h:
3757         (JSC::RuntimeArray::create):
3758         * bridge/runtime_method.cpp:
3759         (JSC::RuntimeMethod::RuntimeMethod):
3760         (JSC::RuntimeMethod::finishCreation):
3761         * bridge/runtime_method.h:
3762         * bridge/runtime_object.cpp:
3763         (JSC::Bindings::RuntimeObject::RuntimeObject):
3764         * bridge/runtime_object.h:
3765         (JSC::Bindings::RuntimeObject::create):
3766
3767 2011-09-06  Luke Macpherson   <macpherson@chromium.org>
3768
3769         Implement list style properties in CSSStyleApplyProperty.
3770         https://bugs.webkit.org/show_bug.cgi?id=67103
3771
3772         Reviewed by Eric Seidel.
3773
3774         No new tests / no behavioral changes.
3775
3776         * css/CSSStyleApplyProperty.cpp:
3777         Add class to wrap call to CSSStyleSelector::styleImage().
3778         (WebCore::ApplyPropertyStyleImage::ApplyPropertyStyleImage):
3779         (WebCore::ApplyPropertyStyleImage::applyValue):
3780         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
3781         Initialize handlers for list style properties.
3782         * css/CSSStyleSelector.cpp:
3783         (WebCore::CSSStyleSelector::applyProperty):
3784         Remove existing property implementations.
3785
3786 2011-09-06  Alexis Menard  <alexis.menard@openbossa.org>
3787
3788         [Qt] Move away from QPointer as it is slow and it has a replacement QWeakPointer.
3789         https://bugs.webkit.org/show_bug.cgi?id=67673
3790
3791         Reviewed by Ariya Hidayat.
3792
3793         Move away from QPointer to QWeakPointer, it is faster.
3794
3795         No new tests, the existing ones should cover.
3796
3797         * bridge/qt/qt_instance.cpp:
3798         (JSC::Bindings::QtInstance::~QtInstance):
3799         (JSC::Bindings::QtInstance::getClass):
3800         (JSC::Bindings::QtField::name):
3801         (JSC::Bindings::QtField::valueFromInstance):
3802         * bridge/qt/qt_instance.h:
3803         (JSC::Bindings::QtInstance::getObject):
3804         * bridge/qt/qt_runtime.h:
3805         * platform/qt/SharedTimerQt.cpp:
3806         (WebCore::SharedTimerQt::inst):
3807
3808 2011-09-06  Oliver Hunt  <oliver@apple.com>
3809
3810         Update expected results of bindings tests.
3811
3812         * bindings/scripts/test/JS/JSTestInterface.cpp:
3813         (WebCore::JSTestInterfaceConstructor::createStructure):
3814         (WebCore::JSTestInterface::createPrototype):
3815         * bindings/scripts/test/JS/JSTestInterface.h:
3816         (WebCore::JSTestInterface::createStructure):
3817         (WebCore::JSTestInterfacePrototype::createStructure):
3818         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3819         (WebCore::JSTestMediaQueryListListenerConstructor::createStructure):
3820         (WebCore::JSTestMediaQueryListListener::createPrototype):
3821         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
3822         (WebCore::JSTestMediaQueryListListener::createStructure):
3823         (WebCore::JSTestMediaQueryListListenerPrototype::createStructure):
3824         * bindings/scripts/test/JS/JSTestObj.cpp:
3825         (WebCore::JSTestObjConstructor::createStructure):
3826         (WebCore::JSTestObj::createPrototype):
3827         * bindings/scripts/test/JS/JSTestObj.h:
3828         (WebCore::JSTestObj::createStructure):
3829         (WebCore::JSTestObjPrototype::createStructure):
3830         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3831         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::createStructure):
3832         (WebCore::JSTestSerializedScriptValueInterface::createPrototype):
3833         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
3834         (WebCore::JSTestSerializedScriptValueInterface::createStructure):
3835         (WebCore::JSTestSerializedScriptValueInterfacePrototype::createStructure):
3836
3837 2011-09-06  Eric Seidel  <eric@webkit.org>
3838
3839         Remove window.HTMLBlockquoteElement per HTML5 (and DOM Core 1)
3840         https://bugs.webkit.org/show_bug.cgi?id=67678
3841
3842         Reviewed by Darin Adler.
3843
3844         This is why we can't have nice things.
3845
3846         There was some confusion in the original DOM HTML 1 spec about
3847         the existence of HTMlBlockquoteElement which was clarified by
3848         a later errata, removing HTMLBlockquoteElement:
3849         http://www.w3.org/DOM/updates/REC-DOM-Level-1-19981001-errata.html
3850         "This interface is an error and must be ignored. The Interface HTMLQuoteElement is used for both the Q and BLOCKQUOTE elements"
3851
3852         Le sigh.  Personally I think having a separate HTMLBlockquoteElement
3853         is clearer, but thats not how the web works.  Removed it and updated test results.
3854
3855         * CMakeLists.txt:
3856         * CodeGenerators.pri:
3857         * DerivedSources.cpp:
3858         * DerivedSources.make:
3859         * GNUmakefile.list.am:
3860         * WebCore.gypi:
3861         * WebCore.pro:
3862         * WebCore.vcproj/WebCore.vcproj:
3863         * WebCore.xcodeproj/project.pbxproj:
3864         * bindings/gobject/GNUmakefile.am:
3865         * editing/IndentOutdentCommand.cpp:
3866         * html/HTMLBlockquoteElement.cpp: Removed.
3867         * html/HTMLBlockquoteElement.h: Removed.
3868         * html/HTMLBlockquoteElement.idl: Removed.
3869         * html/HTMLElementsAllInOne.cpp:
3870         * html/HTMLQuoteElement.cpp:
3871         (WebCore::HTMLQuoteElement::HTMLQuoteElement):
3872         (WebCore::HTMLQuoteElement::insertedIntoDocument):
3873         * html/HTMLTagNames.in:
3874         * page/DOMWindow.idl:
3875
3876 2011-09-06  Ryosuke Niwa  <rniwa@webkit.org>
3877
3878         Rename confirmCompositionWithoutDisturbingSelection to cancelComposition
3879         https://bugs.webkit.org/show_bug.cgi?id=67569
3880
3881         Reviewed by Antonio Gomes.
3882
3883         Renamed Editor::confirmCompositionWithoutDisturbingSelection to Editor::cancelComposition.
3884         Also renamed the shared function from confirmComposition to setComposition.
3885
3886         * WebCore.exp.in:
3887         * editing/Editor.cpp:
3888         (WebCore::Editor::confirmComposition):
3889         (WebCore::Editor::cancelComposition):
3890         (WebCore::Editor::setComposition):
3891         * editing/Editor.h:
3892
3893 2011-09-06  Sam Weinig  <sam@webkit.org>
3894
3895         WebVTTTokenizer files in the wrong place in the Xcode project.
3896
3897         * WebCore.xcodeproj/project.pbxproj:
3898         Move WebVTTTokenizer files so they are in the right place in the project.
3899
3900 2011-09-06  Chris Rogers  <crogers@google.com>
3901
3902         MediaElementAudioSourceNode destruction triggers ASSERTS
3903         https://bugs.webkit.org/show_bug.cgi?id=67665
3904
3905         Reviewed by Nate Chapin.
3906
3907         Test: webaudio/mediaelementaudiosourcenode-gc.html
3908
3909         * html/HTMLMediaElement.cpp:
3910         (WebCore::HTMLMediaElement::setAudioSourceNode):
3911         * webaudio/AudioContext.cpp:
3912         (WebCore::AudioContext::uninitializeDispatch):
3913         (WebCore::AudioContext::stop):
3914         * webaudio/AudioContext.h:
3915
3916 2011-09-05  Oliver Hunt  <oliver@apple.com>
3917
3918         An object's structure should reference the global object responsible for its creation
3919         https://bugs.webkit.org/show_bug.cgi?id=67624
3920
3921         Reviewed by Gavin Barraclough.
3922
3923         Update calls to Structure::create() to pass the globalObject in,
3924         and update the CodeGenerator to generate appropriate createStructure
3925         methods.
3926
3927         * bindings/js/JSAudioConstructor.h:
3928         (WebCore::JSAudioConstructor::createStructure):
3929         * bindings/js/JSDOMBinding.h:
3930         (WebCore::DOMConstructorObject::createStructure):
3931         (WebCore::getDOMStructure):
3932         * bindings/js/JSDOMGlobalObject.h:
3933         (WebCore::JSDOMGlobalObject::createStructure):
3934         (WebCore::getDOMConstructor):
3935         * bindings/js/JSDOMWindowBase.h:
3936         (WebCore::JSDOMWindowBase::createStructure):
3937         * bindings/js/JSDOMWindowShell.cpp:
3938         (WebCore::JSDOMWindowShell::setWindow):
3939         * bindings/js/JSDOMWindowShell.h:
3940         (WebCore::JSDOMWindowShell::createStructure):
3941         * bindings/js/JSDOMWrapper.h:
3942         (WebCore::JSDOMWrapper::createStructure):
3943         * bindings/js/JSImageConstructor.h:
3944         (WebCore::JSImageConstructor::createStructure):
3945         * bindings/js/JSImageDataCustom.cpp:
3946         (WebCore::toJS):
3947         * bindings/js/JSOptionConstructor.h:
3948         (WebCore::JSOptionConstructor::createStructure):
3949         * bindings/js/JSWorkerContextBase.h:
3950         (WebCore::JSWorkerContextBase::createStructure):
3951         * bindings/js/WorkerScriptController.cpp:
3952         (WebCore::WorkerScriptController::initScript):
3953         * bindings/scripts/CodeGeneratorJS.pm:
3954         (GenerateHeader):
3955         (GenerateImplementation):
3956         (GenerateConstructorDeclaration):
3957         * bridge/c/CRuntimeObject.h:
3958         (JSC::Bindings::CRuntimeObject::createStructure):
3959         * bridge/c/c_instance.cpp:
3960         (JSC::Bindings::CRuntimeMethod::createStructure):
3961         * bridge/jni/jsc/JavaInstanceJSC.cpp:
3962         (JavaRuntimeMethod::createStructure):
3963         * bridge/jni/jsc/JavaRuntimeObject.h:
3964         (JSC::Bindings::JavaRuntimeObject::createStructure):
3965         * bridge/objc/ObjCRuntimeObject.h:
3966         (JSC::Bindings::ObjCRuntimeObject::createStructure):
3967         * bridge/objc/objc_instance.mm:
3968         (ObjCRuntimeMethod::createStructure):
3969         * bridge/objc/objc_runtime.h:
3970         (JSC::Bindings::ObjcFallbackObjectImp::createStructure):
3971         * bridge/runtime_array.h:
3972         (JSC::RuntimeArray::createStructure):
3973         * bridge/runtime_method.h:
3974         (JSC::RuntimeMethod::createStructure):
3975         * bridge/runtime_object.h:
3976         (JSC::Bindings::RuntimeObject::createStructure):
3977
3978 2011-09-06  Anders Carlsson  <andersca@apple.com>
3979
3980         Move NPAPI headers in bridge to plugins
3981         https://bugs.webkit.org/show_bug.cgi?id=67661
3982
3983         Reviewed by Darin Adler.
3984
3985         * WebCore.gypi:
3986         * WebCore.pro:
3987         * WebCore.vcproj/WebCore.vcproj:
3988         * WebCore.xcodeproj/project.pbxproj:
3989         Update build systems.
3990
3991         * bridge/npapi.h: Removed.
3992         * bridge/npruntime.h: Removed.
3993         * bridge/nptypes.h: Removed.
3994         * plugins/npapi.h: Copied from Source/WebCore/bridge/npapi.h.
3995         * plugins/npruntime.h: Copied from Source/WebCore/bridge/npruntime.h.
3996         * plugins/nptypes.h: Copied from Source/WebCore/bridge/nptypes.h.
3997
3998 2011-09-06  David Hyatt  <hyatt@apple.com>
3999
4000         https://bugs.webkit.org/show_bug.cgi?id=67672
4001         
4002         Improve background-size parsing. Make it actually dump auto values properly, and also make it omit
4003         auto if it is the second value. Fix the parsing to not create a value list when only a singleton value
4004         is specified.
4005
4006         Reviewed by Beth Dakin.
4007
4008         Covered well by existing tests.
4009
4010         * css/CSSComputedStyleDeclaration.cpp:
4011         (WebCore::fillSizeToCSSValue):
4012         * css/CSSParser.cpp: