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