1 2012-07-13 Arpita Bahuguna <arpitabahuguna@gmail.com>
3 Refactor RenderTable to use the section's iteration functions.
4 https://bugs.webkit.org/show_bug.cgi?id=89751
6 Reviewed by Julien Chaffraix.
8 Removing anti-pattern wherever possible from RenderTable code. Also, modifying
9 RenderTable sections' iterations to use helper functions.
11 No new tests required for this change since no change in behavior is expected.
13 * rendering/RenderTable.cpp:
14 (WebCore::RenderTable::addOverflowFromChildren):
15 (WebCore::RenderTable::setCellLogicalWidths):
16 (WebCore::RenderTable::outerBorderStart):
17 (WebCore::RenderTable::outerBorderEnd):
18 Removed anti-patterns involving iterations over RenderObjects.
20 (WebCore::RenderTable::outerBorderAfter):
21 Modified RenderTable sections' iteration to use helper functions.
23 2012-07-13 Enrica Casucci <enrica@apple.com>
25 Threadsafety issues in WebScriptObject
26 https://bugs.webkit.org/show_bug.cgi?id=90849
28 Reviewed by Geoff Garen.
30 Updated fix for this bug. The JSC API lock needs to be acquired also in JSObject.
32 * bindings/objc/WebScriptObject.mm:
33 (-[WebScriptObject JSObject]):
35 2012-07-13 Raymond Toy <rtoy@google.com>
37 DelayNode doesn't work if delayTime.value == delayTime.maxValue
38 https://bugs.webkit.org/show_bug.cgi?id=90357
40 Reviewed by Kenneth Russell.
42 Increase delay buffer size slightly so that the read and write
43 pointers don't become equal when the delay and the max delay are
46 Tests: webaudio/delaynode-max-default-delay.html
47 webaudio/delaynode-max-nondefault-delay.html
49 * Modules/webaudio/DelayDSPKernel.cpp:
50 (WebCore): Moved SmoothingTimeConstant to WebCore namespace.
51 (WebCore::DelayDSPKernel::DelayDSPKernel): Add some additional checks to prevent crashes; use bufferLengthForDelay to compute buffer length.
52 (WebCore::DelayDSPKernel::bufferLengthForDelay): New function to compute buffer length.
53 * Modules/webaudio/DelayDSPKernel.h:
54 (DelayDSPKernel): Declare bufferLengthForDelay.
56 2012-07-13 Benjamin Poulain <bpoulain@apple.com>
58 Always aggressively preload on iOS
59 https://bugs.webkit.org/show_bug.cgi?id=91276
61 Reviewed by Simon Fraser.
63 * loader/cache/CachedResourceLoader.cpp:
64 (WebCore::CachedResourceLoader::preload):
66 2012-07-13 Vineet Chaudhary <rgf748@motorola.com>
68 Restructure V8Utilities::extractTransferables() with help of toV8Sequence()
69 https://bugs.webkit.org/show_bug.cgi?id=91208
71 Reviewed by Kentaro Hara.
73 We can remove the specialised check for MessagePort from V8Utilities::extractTransferables()
74 using toV8Sequence() as it validates the passed object for sequence type per WebIDL spec.
76 No new test as just refactoring.
77 Existing tests under fast/dom/Window/window-* fast/dom/events/*
80 * bindings/v8/V8Utilities.cpp:
81 (WebCore::extractTransferables):
83 2012-07-13 Vincent Scheib <scheib@chromium.org>
85 Pointer Lock handles disconnected DOM elements
86 https://bugs.webkit.org/show_bug.cgi?id=77029
88 Reviewed by Adrienne Walker.
90 Pointer Lock Controller now checks when elements or documents are
91 removed, and unlocks if the target element is being removed.
93 Tests: pointer-lock/locked-element-iframe-removed-from-dom.html
94 pointer-lock/locked-element-removed-from-dom.html
97 (WebCore::Document::detach):
99 (WebCore::Element::removedFrom):
100 (WebCore::Element::webkitRequestPointerLock):
101 * page/PointerLockController.cpp:
102 (WebCore::PointerLockController::requestPointerLock):
103 (WebCore::PointerLockController::elementRemoved):
105 (WebCore::PointerLockController::documentDetached):
106 (WebCore::PointerLockController::didLosePointerLock):
107 (WebCore::PointerLockController::enqueueEvent):
108 * page/PointerLockController.h:
110 (PointerLockController):
112 2012-07-13 Ryosuke Niwa <rniwa@webkit.org>
114 HTMLCollection should use DynamicNodeList's invalidation model
115 https://bugs.webkit.org/show_bug.cgi?id=90326
117 Reviewed by Anders Carlsson.
119 Make HTMLCollection invalidated upon attribute and children changes instead of invalidating it on demand
120 by comparing DOM tree versions. Node that HTMLCollections owned by Document are invalidated with other
121 document-rooted node lists in m_listsInvalidatedAtDocument for simplicity although this mechanism is
122 normally used for node lists owned by a non-Document node that contains nodes outside of its subtree.
123 ItemProperties and FormControls are more "traditional" users of the mechanism.
125 Also, merged DynamicNodeList::invalidateCache and HTMLCollection::invalidateCache.
128 (WebCore::Document::registerNodeListCache): Renamed. No longer takes NodeListInvalidationType or
129 NodeListRootType since they can be obtained from the cache base. Increment the node list counter for
130 InvalidateOnIdNameAttrChange when a HTMLCollection is passed in since all HTMLCollections need to be
131 invalidated on id or name content attribute changes due to named getters.
132 (WebCore::Document::unregisterNodeListCache): Ditto.
133 (WebCore::shouldInvalidateNodeListForType):
134 (WebCore::Document::shouldInvalidateNodeListCaches):
135 (WebCore::Document::clearNodeListCaches):
137 (WebCore): Added InvalidateOnIdNameAttrChange, InvalidateOnHRefAttrChange, and InvalidateOnAnyAttrChange.
139 * dom/DynamicNodeList.cpp:
140 (WebCore::DynamicNodeListCacheBase::invalidateCache): Added. Invalidates caches of both DynamicNodeList
141 and HTMLCollection. We can't afford to use virtual function calls here because this function is called on
142 all node lists and HTML collections owned by ancestors of an element under which a node is added, removed,
143 or its attributes are changed.
145 * dom/DynamicNodeList.h:
146 (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase): Initializes member variables directly
147 instead of calling clearCache now that DynamicNodeListCacheBase::invalidateCache has become polymorphic.
148 (DynamicNodeListCacheBase): Increased the number of bits for m_invalidationType since we now have 9
150 (WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList):
151 (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
152 * dom/ElementRareData.h:
154 (WebCore::ElementRareData::clearHTMLCollectionCaches): Added.
155 (WebCore::ElementRareData::adoptTreeScope): Added; similar to NodeRareData::adoptTreeScope.
157 (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): Clears HTML collection caches as well as
159 (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): Ditto.
160 * dom/NodeRareData.h:
161 (WebCore::NodeListsNodeData::adoptTreeScope):
162 * dom/TreeScopeAdopter.cpp:
163 (WebCore::TreeScopeAdopter::moveTreeToNewScope): Calls ElementRareData's adoptTreeScope as well as
165 * html/HTMLAllCollection.cpp:
166 (WebCore::HTMLAllCollection::namedItemWithIndex):
167 * html/HTMLCollection.cpp:
168 (WebCore::rootTypeFromCollectionType): Added. As mentioned above, treat all Document-owned HTML collection
169 as if rooted at document for convenience.
170 (WebCore::invalidationTypeExcludingIdAndNameAttributes): Added. Since all HTML collection requires
171 invalidation on id and name content attribute changes, which is taken care by the special logic in
172 Document::registerNodeListCache, exclude those two attributes from consideration.
173 (WebCore::HTMLCollection::HTMLCollection): Calls Document::registerNodeListCache.
174 (WebCore::HTMLCollection::~HTMLCollection): Calls Document::unregisterNodeListCache.
175 (WebCore::HTMLCollection::length):
176 (WebCore::HTMLCollection::item):
177 (WebCore::HTMLCollection::namedItem):
178 (WebCore::HTMLCollection::updateNameCache):
179 * html/HTMLCollection.h:
180 (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase):
181 (HTMLCollectionCacheBase): Removed m_cacheTreeVersion and clearCache since they're no longer used.
183 * html/HTMLFormCollection.cpp:
184 (WebCore::HTMLFormCollection::namedItem):
185 (WebCore::HTMLFormCollection::updateNameCache):
186 * html/HTMLOptionsCollection.h:
187 (HTMLOptionsCollection):
188 * html/HTMLPropertiesCollection.cpp:
189 (WebCore::HTMLPropertiesCollection::updateNameCache):
190 * html/HTMLPropertiesCollection.h:
191 (WebCore::HTMLPropertiesCollection::invalidateCache):
193 2012-07-13 Shawn Singh <shawnsingh@chromium.org>
195 [chromium] Remove incorrect debug assertion in LayerRendererChromium.cpp
196 https://bugs.webkit.org/show_bug.cgi?id=91260
198 Reviewed by Adrienne Walker.
200 ASSERT(!clipped) was being triggered after skinny almost-degenerate
201 quads went through anti-aliasing inflation, and then were being
202 transformed back from device space to local space. It turns out
203 this assertion is too aggressive, and we don't yet have an obvious
204 need to change the behavior on the clipped==true case.
206 No new tests needed, this patch fixes only comments and debug code.
208 * platform/graphics/chromium/LayerRendererChromium.cpp:
209 (WebCore::LayerRendererChromium::drawRenderPassQuad):
212 (WebCore::LayerRendererChromium::drawTileQuad):
213 fixed a similar comment, removed unnecessary assertion.
215 2012-07-13 Philip Rogers <pdr@google.com>
217 Remove assert in localCoordinateSpaceTransform()
218 https://bugs.webkit.org/show_bug.cgi?id=91189
220 Reviewed by Nikolas Zimmermann.
222 The assert in localCoordinateSpaceTransform was added to catch subclasses forgetting
223 to override the method but it is better to simply return the identity matrix.
225 This scenario can occur when we break the SVG content model, such as asking for
226 the CTM of a <g> element inside a <tspan>. This is undefined in the spec because
227 tspan is not a subclass of SVGLocatable but both Firefox and Opera
228 implement this by returning the identity matrix.
230 Test: svg/custom/invalid-ctm.svg
232 * svg/SVGStyledElement.cpp:
233 (WebCore::SVGStyledElement::localCoordinateSpaceTransform):
235 2012-07-13 Kentaro Hara <haraken@chromium.org>
237 [V8] String wrappers should be marked Independent
238 https://bugs.webkit.org/show_bug.cgi?id=91251
240 Reviewed by Adam Barth.
242 Currently V8 String wrappers are not marked Independent.
243 By marking them Independent, they can be reclaimed by the scavenger GC.
245 I tried to find some cases where this change reduces memory usage,
246 but couldn't due to sensitive behavior of GC.
248 No tests. No change in behavior.
250 * bindings/v8/V8Binding.cpp:
251 (WebCore::StringCache::v8ExternalStringSlow):
253 2012-07-13 Peter Beverloo <peter@chromium.org>
255 [Chromium] Make the v8 i18n API dependency conditional for Android, disable strict aliasing
256 https://bugs.webkit.org/show_bug.cgi?id=91240
258 Reviewed by Adam Barth.
260 Disable the v8 internationalization API for Chromium Android, as it's
261 disabled and not always available in checkouts. Furthermore, disable
262 strict aliasing for the webkit_remaining target, similar to what
263 x11-based builds are doing (see the webcore_prerequisites target).
265 * WebCore.gyp/WebCore.gyp:
267 2012-07-13 Kentaro Hara <haraken@chromium.org>
269 [CallWith=XXX] arguments should be placed at the head of method arguments
270 https://bugs.webkit.org/show_bug.cgi?id=91217
272 Reviewed by Adam Barth.
274 The EFL build with the ENABLE_FILE_SYSTEM flag caused a build error,
275 because CodeGeneratorJS.pm assumes webkitEntries(ScriptExecutionContext*, HTMLInputElement*)
276 but the actual signature is webkitEntries(HTMLInputElement*, ScriptExecutionContext*) (bug 91185).
278 Per https://trac.webkit.org/wiki/WebKitIDL#CallWith, [CallWith=XXX] arguments should be placed
279 at the head of the arguments. (i.e. the behavior of CodeGeneratorJS.pm is correct.)
281 Thus the correct fix is (1) to change the signature of webkitEntries() and webkitGetAsEntry()
282 so that ScriptExecutionContext* comes first and (2) to modify CodeGeneratorV8.pm to support the order.
284 Test: bindings/scripts/test/TestObj.idl
286 * Modules/filesystem/DataTransferItemFileSystem.h: Placed ScriptExecutionContext* at the head of arguments.
287 (DataTransferItemFileSystem):
288 * Modules/filesystem/HTMLInputElementFileSystem.cpp: Ditto.
289 (WebCore::HTMLInputElementFileSystem::webkitEntries):
290 * Modules/filesystem/HTMLInputElementFileSystem.h: Ditto.
291 (HTMLInputElementFileSystem):
292 * Modules/filesystem/chromium/DataTransferItemFileSystemChromium.cpp: Ditto.
293 (WebCore::DataTransferItemFileSystem::webkitGetAsEntry):
295 * bindings/scripts/CodeGeneratorV8.pm: Modified to support the correct order.
296 (GenerateNormalAttrGetter):
297 (GenerateNormalAttrSetter):
298 (GenerateFunctionCallString):
300 * bindings/scripts/test/V8/V8TestInterface.cpp: Updated run-bindings-tests results.
301 (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
303 2012-07-13 Mary Wu <mary.wu@torchmobile.com.cn>
305 [BlackBerry] Some small changes in network code
306 https://bugs.webkit.org/show_bug.cgi?id=90974
308 Reviewed by Rob Buis.
310 1. Set status in NetworkJob/SocketStreamHandleBlackBerry so that
311 its wrapped stream can also query the stream result.
312 2. pass download attribute to NetworkRequest.
315 Reviewed internally by Lyon Chen and Joe Mason.
317 * platform/network/blackberry/NetworkJob.cpp:
318 (WebCore::NetworkJob::handleNotifyClose):
319 * platform/network/blackberry/NetworkJob.h:
320 (WebCore::NetworkJob::status):
321 * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
322 (WebCore::platformTargetTypeForRequest):
323 * platform/network/blackberry/SocketStreamHandle.h:
324 (WebCore::SocketStreamHandle::status):
325 (SocketStreamHandle):
326 * platform/network/blackberry/SocketStreamHandleBlackBerry.cpp:
327 (WebCore::SocketStreamHandle::notifyStatusReceived):
328 (WebCore::SocketStreamHandle::notifyClose):
330 2012-07-13 Vsevolod Vlasov <vsevik@chromium.org>
332 Web Inspector: Remove uiSourceCode from Resource.
333 https://bugs.webkit.org/show_bug.cgi?id=91201
335 Reviewed by Pavel Feldman.
337 Removed Resource._uiSourceCode field as it is not used anymore.
339 * inspector/front-end/Resource.js:
340 (WebInspector.Resource.prototype.isHidden):
341 * inspector/front-end/UISourceCode.js:
342 (WebInspector.UISourceCode):
344 2012-07-13 Sheriff Bot <webkit.review.bot@gmail.com>
346 Unreviewed, rolling out r122450 and r122580.
347 http://trac.webkit.org/changeset/122450
348 http://trac.webkit.org/changeset/122580
349 https://bugs.webkit.org/show_bug.cgi?id=91263
351 Caused multiple regressions on ClusterFuzz (Requested by
352 inferno-sec on #webkit).
354 * bindings/js/ScriptWrappable.h:
355 (WebCore::ScriptWrappable::reportMemoryUsage):
356 * bindings/v8/DOMDataStore.cpp:
357 (WebCore::DOMDataStore::reportMemoryUsage):
358 * bindings/v8/IntrusiveDOMWrapperMap.h:
359 (WebCore::ChunkedTable::reportMemoryUsage):
360 * bindings/v8/ScriptWrappable.h:
361 (WebCore::ScriptWrappable::reportMemoryUsage):
362 * bindings/v8/V8Binding.cpp:
363 (WebCore::V8BindingPerIsolateData::reportMemoryUsage):
364 (WebCore::StringCache::reportMemoryUsage):
365 * bindings/v8/V8DOMMap.h:
366 * css/PropertySetCSSStyleDeclaration.cpp:
367 (WebCore::InlineCSSStyleDeclaration::ensureMutablePropertySet):
368 * css/StylePropertySet.cpp:
369 * css/StylePropertySet.h:
370 (WebCore::StylePropertySet::reportMemoryUsage):
371 * dom/CharacterData.cpp:
372 (WebCore::CharacterData::reportMemoryUsage):
373 * dom/ContainerNode.h:
374 (WebCore::ContainerNode::reportMemoryUsage):
376 (WebCore::Document::reportMemoryUsage):
378 (WebCore::Element::detachAttribute):
379 (WebCore::Element::removeAttribute):
380 (WebCore::Element::attributes):
381 (WebCore::Element::setAttributeInternal):
382 (WebCore::Element::parserSetAttributes):
383 (WebCore::Element::hasEquivalentAttributes):
384 (WebCore::Element::createAttributeData):
386 (WebCore::Element::setAttributeNode):
387 (WebCore::Element::removeAttributeNode):
388 (WebCore::Element::getAttributeNode):
389 (WebCore::Element::getAttributeNodeNS):
390 (WebCore::Element::hasAttribute):
391 (WebCore::Element::hasAttributeNS):
392 (WebCore::Element::normalizeAttributes):
393 (WebCore::Element::cloneAttributesFromElement):
395 (WebCore::Element::attributeData):
397 (WebCore::Element::reportMemoryUsage):
398 (WebCore::Element::ensureAttributeData):
399 (WebCore::Element::updatedAttributeData):
400 (WebCore::Element::ensureUpdatedAttributeData):
401 * dom/ElementAttributeData.cpp:
402 (WebCore::ElementAttributeData::attrIfExists):
403 (WebCore::ElementAttributeData::ensureAttr):
404 (WebCore::ElementAttributeData::setAttr):
405 (WebCore::ElementAttributeData::removeAttr):
406 (WebCore::ElementAttributeData::setClass):
408 (WebCore::ElementAttributeData::ensureInlineStyle):
409 (WebCore::ElementAttributeData::ensureMutableInlineStyle):
410 (WebCore::ElementAttributeData::destroyInlineStyle):
411 (WebCore::ElementAttributeData::addAttribute):
412 (WebCore::ElementAttributeData::removeAttribute):
413 (WebCore::ElementAttributeData::isEquivalent):
414 (WebCore::ElementAttributeData::detachAttrObjectsFromElement):
415 (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase):
416 (WebCore::ElementAttributeData::cloneDataFrom):
417 (WebCore::ElementAttributeData::clearAttributes):
418 (WebCore::ElementAttributeData::replaceAttribute):
419 (WebCore::ElementAttributeData::getAttributeNode):
420 * dom/ElementAttributeData.h:
421 (WebCore::ElementAttributeData::create):
422 (ElementAttributeData):
423 (WebCore::ElementAttributeData::setIdForStyleResolution):
424 (WebCore::ElementAttributeData::setAttributeStyle):
425 (WebCore::ElementAttributeData::length):
426 (WebCore::ElementAttributeData::isEmpty):
427 (WebCore::ElementAttributeData::attributeItem):
428 (WebCore::ElementAttributeData::getAttributeItem):
429 (WebCore::ElementAttributeData::reportMemoryUsage):
430 (WebCore::ElementAttributeData::ElementAttributeData):
431 (WebCore::ElementAttributeData::attributeVector):
432 (WebCore::ElementAttributeData::clonedAttributeVector):
433 (WebCore::ElementAttributeData::removeAttribute):
434 (WebCore::ElementAttributeData::getAttributeItemIndex):
435 * dom/MemoryInstrumentation.h:
436 (MemoryInstrumentation):
438 (WebCore::MemoryObjectInfo::reportInstrumentedPointer):
439 (WebCore::MemoryObjectInfo::reportPointer):
440 (WebCore::MemoryObjectInfo::reportInstrumentedObject):
441 (WebCore::MemoryObjectInfo::reportObject):
442 (WebCore::MemoryObjectInfo::reportObjectInfo):
443 (WebCore::MemoryObjectInfo::reportHashMap):
444 (WebCore::MemoryObjectInfo::reportHashSet):
445 (WebCore::MemoryObjectInfo::reportListHashSet):
446 (WebCore::MemoryObjectInfo::reportVector):
447 (WebCore::MemoryObjectInfo::reportString):
448 (WebCore::MemoryObjectInfo::objectType):
449 (WebCore::MemoryObjectInfo::objectSize):
450 (WebCore::MemoryObjectInfo::memoryInstrumentation):
452 (WebCore::Node::reportMemoryUsage):
453 * dom/QualifiedName.h:
454 (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
455 (WebCore::QualifiedName::reportMemoryUsage):
456 * dom/StyledElement.cpp:
457 (WebCore::StyledElement::style):
458 (WebCore::StyledElement::classAttributeChanged):
459 (WebCore::StyledElement::setInlineStyleProperty):
460 (WebCore::StyledElement::removeInlineStyleProperty):
461 (WebCore::StyledElement::addSubresourceAttributeURLs):
462 * dom/StyledElement.h:
463 (WebCore::StyledElement::ensureInlineStyle):
464 * html/parser/HTMLConstructionSite.cpp:
465 (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
466 * platform/TreeShared.h:
467 (WebCore::TreeShared::reportMemoryUsage):
468 * xml/parser/XMLDocumentParserQt.cpp:
469 (WebCore::XMLDocumentParser::XMLDocumentParser):
471 2012-07-13 Huang Dongsung <luxtella@company100.net>
473 Remove down-casting to BitmapImage in GraphicsContext::drawImage.
474 https://bugs.webkit.org/show_bug.cgi?id=90755
476 Reviewed by Simon Fraser.
478 Add a BitmapImage draw method which takes RespectImageOrientationEnum enum as
479 the last argument for CG. Then we can remove the conditional down-casting in
480 GraphicsContext::drawImage.
482 This change is needed for parallel image decoders. Because parallel image
483 decoders use a Bitmap image wrapper class which extends Image (not Bitmap), the
484 down-casting above causes the loss of RespectImageOrientationEnum which must be
485 passed to BitmapImage.
487 No new tests, no behavior change.
489 * platform/graphics/BitmapImage.cpp:
490 * platform/graphics/BitmapImage.h:
491 * platform/graphics/GraphicsContext.cpp:
492 (WebCore::GraphicsContext::drawImage):
493 * platform/graphics/Image.cpp:
494 (WebCore::Image::draw):
496 * platform/graphics/Image.h:
499 2012-07-13 Lauro Neto <lauro.neto@openbossa.org>
501 Fix QtWebKit build with OpenGLES after GC3D/E3D refactor
502 https://bugs.webkit.org/show_bug.cgi?id=91156
504 Reviewed by Noam Rosenthal.
506 Adds several build fixes.
508 * platform/graphics/GraphicsContext3D.h:
509 Use E3DOpenGLES instead of previously removed E3DQt.
511 * platform/graphics/OpenGLESShims.h:
512 Enable defines for Qt.
514 * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
515 (WebCore::Extensions3DOpenGLES::blitFramebuffer):
517 (WebCore::Extensions3DOpenGLES::renderbufferStorageMultisample):
518 (WebCore::Extensions3DOpenGLES::copyTextureCHROMIUM):
519 Added pure virtual stubs.
521 (WebCore::Extensions3DOpenGLES::supportsExtension):
522 Remove PROC suffix. See bug #91130.
524 * platform/graphics/opengl/Extensions3DOpenGLES.h:
525 (Extensions3DOpenGLES):
526 Added pure virtual stubs.
528 * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
529 (WebCore::GraphicsContext3D::reshapeFBOs):
530 Readded missing function after removed in r122250.
533 Use PLATFORM(BLACKBERRY) guard around port-specific include.
535 * platform/graphics/qt/GraphicsContext3DQt.cpp:
536 Added USE(OPENGL_ES_2) guard instead of always loading the OpenGL extensions.
539 2012-07-13 Keishi Hattori <keishi@webkit.org>
541 Form of FormAssociatedElement is not updated when id target changes.
542 https://bugs.webkit.org/show_bug.cgi?id=91042
544 Reviewed by Kent Tamura.
546 Test: fast/forms/update-form-attribute-element.html
548 This patch introduces the IdTargetObserver and IdTargetObserverRegistry class.
549 They can be used to be notified when the element that an id is pointing to (the id target)
552 * CMakeLists.txt: Added IdTargetObserverRegistry.{h,cpp} and IdTargetObserver.{h,cpp}
553 * GNUmakefile.list.am: Ditto.
555 * WebCore.gypi: Ditto.
556 * WebCore.vcproj/WebCore.vcproj: Ditto.
557 * WebCore.xcodeproj/project.pbxproj: Ditto.
558 * dom/DOMAllInOne.cpp:
559 * dom/IdTargetObserver.cpp: Added. When you want notified of changes to an id target, you should create a new class that inherits this.
561 (WebCore::IdTargetObserver::IdTargetObserver):
562 (WebCore::IdTargetObserver::~IdTargetObserver):
563 * dom/IdTargetObserver.h: Added.
566 * dom/IdTargetObserverRegistry.cpp: Added.
568 (WebCore::IdTargetObserverRegistry::create):
569 (WebCore::IdTargetObserverRegistry::addObserver): Register an IdTargetObserver to observe an id target.
570 (WebCore::IdTargetObserverRegistry::removeObserver): Unregisters an IdTargetObserver from observing.
571 (WebCore::IdTargetObserverRegistry::notifyObserversInternal):
572 * dom/IdTargetObserverRegistry.h: Added.
574 (IdTargetObserverRegistry):
575 (WebCore::IdTargetObserverRegistry::IdTargetObserverRegistry):
576 (WebCore::IdTargetObserverRegistry::notifyObservers): Calls idTargetChanged on all observers for an id. Inlining first part of function for performance.
578 (WebCore::TreeScope::TreeScope):
579 (WebCore::TreeScope::addElementById): Calls IdTargetObserverRegistry::notifyObservers because the id target might have changed.
580 (WebCore::TreeScope::removeElementById): Ditto.
583 (WebCore::TreeScope::idTargetObserverRegistry):
585 * html/FormAssociatedElement.cpp: Observer for id targets defined by the form attribute.
586 (WebCore::FormAssociatedElement::didMoveToNewDocument):
587 (WebCore::FormAssociatedElement::insertedInto):
588 (WebCore::FormAssociatedElement::removedFrom):
589 (WebCore::FormAssociatedElement::formAttributeChanged):
590 (WebCore::FormAssociatedElement::resetFormAttributeTargetObserver): Creates and sets up a new FormAttributeTargetObserver.
592 (WebCore::FormAssociatedElement::formAttributeTargetChanged):
593 (WebCore::FormAttributeTargetObserver::create):
594 (WebCore::FormAttributeTargetObserver::FormAttributeTargetObserver):
595 (WebCore::FormAttributeTargetObserver::idTargetChanged):
596 * html/FormAssociatedElement.h:
597 (FormAssociatedElement):
598 * html/FormController.cpp:
599 * html/FormController.h:
601 * html/HTMLFormElement.cpp:
602 (WebCore::HTMLFormElement::removedFrom):
603 (WebCore::HTMLFormElement::formElementIndexWithFormAttribute): Modified to take a range. It
604 scans the range and returns the index to insert the element in m_associatedElement.
605 (WebCore::HTMLFormElement::formElementIndex): Modified to only scan the elements in
606 m_associatedElement that precede and follow the form element.
607 * html/HTMLFormElement.h:
610 2012-07-13 Gabor Rapcsanyi <rgabor@webkit.org>
612 Optimizing blend filter to ARM-NEON with intrinsics
613 https://bugs.webkit.org/show_bug.cgi?id=90949
615 Reviewed by Zoltan Herczeg.
617 The feBlend SVG filter modes can be greatly fasten up with ARM-NEON since
618 we are able to calculate with 2 pixels (8 channels) at the same time.
619 The code is written with NEON intrinsics and it doesn't affect the
620 general - it has the same behaviour as the original algorithm.
621 With this NEON optimization the calculation is ~4.5 times faster for each mode.
623 Existing tests cover this issue.
626 * GNUmakefile.list.am:
629 * WebCore.vcproj/WebCore.vcproj:
630 * WebCore.xcodeproj/project.pbxproj:
631 * platform/graphics/filters/FEBlend.cpp:
632 (WebCore::FEBlend::platformApplyGeneric):
634 (WebCore::FEBlend::platformApplySoftware):
635 * platform/graphics/filters/FEBlend.h:
637 * platform/graphics/filters/arm/FEBlendNEON.h: Added.
639 (FEBlendUtilitiesNEON):
640 (WebCore::FEBlendUtilitiesNEON::div255): integer divison with 255
641 (WebCore::FEBlendUtilitiesNEON::normal): calculate normal mode blending for two pixels
642 (WebCore::FEBlendUtilitiesNEON::multiply): calculate multiply mode blending for two pixels
643 (WebCore::FEBlendUtilitiesNEON::screen): calculate screen mode blending for two pixels
644 (WebCore::FEBlendUtilitiesNEON::darken): calculate darken mode blending for two pixels
645 (WebCore::FEBlendUtilitiesNEON::lighten): calculate lighten mode blending for two pixels
646 (WebCore::FEBlend::platformApplyNEON):
648 2012-07-13 Ilya Tikhonovsky <loislo@chromium.org>
650 Web Inspector: native memory instrumentation: extract instrumentation methods into MemoryClassInfo
651 https://bugs.webkit.org/show_bug.cgi?id=91227
653 Reviewed by Pavel Feldman.
655 void Node::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
657 MemoryClassInfo<Node> info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
658 info.visitBaseClass<ScriptWrappable>(this);
660 info.addMember(m_notInstrumentedPointer); // automatically detects poniter/reference
661 info.addInstrumentedMember(m_next);
662 info.addHashSet<MemoryInstrumentation::NonClass>(m_aHash); // NonClass value_type (report only size of internal template structures)
663 info.addHashSet<MemoryInstrumentation::NotInstrumentedClass>(m_aHashSet); // not instrumented value_type (use sizeof)
664 info.addHashSet<MemoryInstrumentation::InstrumentedClass>(m_aHashSet); // instrumented value_type (call visit)
667 The change is covered by existing tests for native memory snapshot.
669 * bindings/v8/DOMDataStore.cpp:
670 (WebCore::DOMDataStore::reportMemoryUsage):
671 * bindings/v8/IntrusiveDOMWrapperMap.h:
672 (WebCore::ChunkedTable::reportMemoryUsage):
673 * bindings/v8/ScriptWrappable.h:
674 (WebCore::ScriptWrappable::reportMemoryUsage):
675 * bindings/v8/V8Binding.cpp:
676 (WebCore::V8BindingPerIsolateData::reportMemoryUsage):
677 (WebCore::StringCache::reportMemoryUsage):
678 * bindings/v8/V8DOMMap.h:
679 * css/StylePropertySet.h:
680 (WebCore::StylePropertySet::reportMemoryUsage):
681 * dom/CharacterData.cpp:
682 (WebCore::CharacterData::reportMemoryUsage):
683 * dom/ContainerNode.h:
684 (WebCore::ContainerNode::reportMemoryUsage):
686 (WebCore::Document::reportMemoryUsage):
688 (WebCore::Element::reportMemoryUsage):
689 * dom/ElementAttributeData.h:
690 (WebCore::ElementAttributeData::reportMemoryUsage):
691 * dom/MemoryInstrumentation.h:
692 (MemoryInstrumentation):
693 (WebCore::MemoryObjectInfo::objectType):
694 (WebCore::MemoryObjectInfo::objectSize):
695 (WebCore::MemoryObjectInfo::memoryInstrumentation):
697 (WebCore::MemoryObjectInfo::reportObjectInfo):
700 (WebCore::MemoryClassInfo::MemoryClassInfo):
701 (WebCore::MemoryClassInfo::visitBaseClass):
702 (WebCore::MemoryClassInfo::reportInstrumentedPointer):
703 (WebCore::MemoryClassInfo::reportInstrumentedObject):
704 (WebCore::MemoryClassInfo::reportPointer):
705 (WebCore::MemoryClassInfo::reportObject):
706 (WebCore::MemoryClassInfo::reportHashMap):
707 (WebCore::MemoryClassInfo::reportHashSet):
708 (WebCore::MemoryClassInfo::reportListHashSet):
709 (WebCore::MemoryClassInfo::reportVector):
710 (WebCore::MemoryClassInfo::reportString):
712 (WebCore::Node::reportMemoryUsage):
713 * dom/QualifiedName.h:
714 (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
715 (WebCore::QualifiedName::reportMemoryUsage):
716 * platform/TreeShared.h:
717 (WebCore::TreeShared::reportMemoryUsage):
719 2012-07-13 Pavel Feldman <pfeldman@chromium.org>
721 Web Inspector: align scope filters
722 https://bugs.webkit.org/show_bug.cgi?id=91213
724 Reviewed by Vsevolod Vlasov.
726 * inspector/front-end/elementsPanel.css:
728 * inspector/front-end/inspector.css:
733 * inspector/front-end/networkLogView.css:
735 2012-07-13 Peter Rybin <peter.rybin@gmail.com>
737 Web Inspector: too many hardcoded strings in InspectorBackendDispatcher.
738 https://bugs.webkit.org/show_bug.cgi?id=89198
740 Reviewed by Yury Semikhatsky.
742 Instead of generating error message string on every call (mostly for nothing),
743 error message is generated deeper inside the handler and only command name
744 is passed every time.
746 * inspector/CodeGeneratorInspector.py:
747 (Generator.process_command):
749 2012-07-13 Joshua Netterfield <jnetterfield@rim.com>
751 [BlackBerry] Update about:* pages
752 https://bugs.webkit.org/show_bug.cgi?id=91121
756 Update the about:config pages, and improve the aesthetics of the about:build, about:version, about:credits, about:memory, about:config, and similar pages.
758 No new tests, because there is no new funtionality.
760 * platform/network/blackberry/NetworkJob.cpp: Update the aesthetics of about:* pages
762 2012-07-13 Olivier Blin <olivier.blin@softathome.com>
764 Fix checking for optional DeviceOrientationEvent.absolute in JSC bindings
765 https://bugs.webkit.org/show_bug.cgi?id=91225
767 Reviewed by Steve Block.
769 This issue comes from r105036
771 * bindings/js/JSDeviceOrientationEventCustom.cpp:
772 (WebCore::JSDeviceOrientationEvent::initDeviceOrientationEvent):
774 2012-07-13 Andrei Bucur <abucur@adobe.com>
775 [CSS Regions] Fix build for bug 89000
776 https://bugs.webkit.org/show_bug.cgi?id=91215
778 Reviewed by Kentaro Hara.
780 Remove the unused variable m_state that was a leftover from a previous version of the patch.
782 Tests: No new tests, build fix.
784 * dom/WebKitNamedFlow.cpp:
785 (WebCore::WebKitNamedFlow::WebKitNamedFlow):
786 * dom/WebKitNamedFlow.h:
789 2012-07-13 Kenichi Ishibashi <bashi@chromium.org>
791 [Chromium] Fix bugs in HarfBuzzShaper
792 https://bugs.webkit.org/show_bug.cgi?id=90951
794 Reviewed by Tony Chang.
796 The current implementation has following problems:
797 - Cannot render RTL text if the TextRun is divided into more than two
799 - Script handling in TextRun partitioning is incorrect.
800 - Inaccurate calculation of selection rect.
801 - Wrong rendering position when the first glyph of the TextRun have
802 non-zero offsets in terms of HarfBuzz.
804 To fix these problems I rewrote HarfBuzzShaper class. Here is the summary:
805 - Divide the whole range of TextRun first, then shape them in visual
807 - Divide TextRun in the same way of old-harfbuzz's
808 hb_utf16_script_run_next().
809 - Prefer float than int when calculating selection.
810 - Adjust the drawing point after shaping.
812 Added tests covers the fix except for the last problem. The last problem will be covered
813 by fast/text/international/complex-joining-using-gpos.html after chromium linux port switches
814 to use HarfBuzzShaper.
816 Tests: fast/text/shaping/shaping-script-order.html
817 fast/text/shaping/shaping-selection-rect.html
819 * platform/graphics/harfbuzz/FontHarfBuzz.cpp:
820 (WebCore::Font::drawComplexText): Adjusts point after shaping.
821 * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
822 (WebCore::HarfBuzzShaper::HarfBuzzRun::HarfBuzzRun):
824 (WebCore::HarfBuzzShaper::HarfBuzzRun::applyShapeResult): Added.
825 (WebCore::HarfBuzzShaper::HarfBuzzRun::setGlyphAndAdvance): Offsets are no longer needed.
826 (WebCore::HarfBuzzShaper::HarfBuzzRun::xPositionForOffset): Calculates character offset based on advance.
827 (WebCore::normalizeCharacters): Added.
828 (WebCore::HarfBuzzShaper::HarfBuzzShaper):
829 (WebCore::HarfBuzzShaper::~HarfBuzzShaper):
830 (WebCore::HarfBuzzShaper::shape): Divides TextRun first, then shapes them.
831 (WebCore::HarfBuzzShaper::adjustStartPoint): Added.
832 (WebCore::HarfBuzzShaper::collectHarfBuzzRuns): Added.
833 (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Added.
834 (WebCore::HarfBuzzShaper::setGlyphPositionsForHarfBuzzRun): Followed other changes.
835 (WebCore::HarfBuzzShaper::selectionRect): Use float for calculating selection.
836 * platform/graphics/harfbuzz/ng/HarfBuzzShaper.h:
837 (HarfBuzzShaper): Holds the start index of character. Removed unnecessary variables.
838 (WebCore::HarfBuzzShaper::HarfBuzzRun::create): Ditto.
840 (WebCore::HarfBuzzShaper::HarfBuzzRun::fontData): Added.
841 (WebCore::HarfBuzzShaper::HarfBuzzRun::startIndex): Ditto.
842 (WebCore::HarfBuzzShaper::HarfBuzzRun::glyphs): Ditto.
843 (WebCore::HarfBuzzShaper::HarfBuzzRun::advances): Ditto.
845 2012-07-13 Kentaro Hara <haraken@chromium.org>
847 Unreviewed, rolling out r122545.
848 http://trac.webkit.org/changeset/122545
849 https://bugs.webkit.org/show_bug.cgi?id=91185
851 We found that this was a wrong fix
853 * bindings/scripts/CodeGeneratorJS.pm:
854 (GenerateImplementation):
856 2012-07-13 Kentaro Hara <haraken@chromium.org>
858 Unreviewed, rolling out r122553.
859 http://trac.webkit.org/changeset/122553
860 https://bugs.webkit.org/show_bug.cgi?id=91198
862 We found that this was a wrong fix
864 * bindings/scripts/CodeGeneratorJS.pm:
865 (GenerateImplementation):
867 2012-07-13 Kent Tamura <tkent@chromium.org>
869 Change the timing of form state restore
870 https://bugs.webkit.org/show_bug.cgi?id=89962
872 Reviewed by Hajime Morita.
874 For a preparation to fix a form identification problem (Bug 91209),
875 restore controls states when the parsing of their owner forms is
876 completed. For controls without owners, their states are restored when
877 their parsing is completed as ever.
879 No new tests. This doesn't change observable behavior.
881 * html/FormController.cpp:
882 (WebCore::ownerFormForState):
883 Added. This code was used in formKey(), and restoreControlState*() use it.
884 (WebCore::FormKeyGenerator::formKey): Use ownerFormForState(). No behavior change.
885 (WebCore::FormController::restoreControlStateFor):
886 Moved some code from HTMLFormControlElementWithState::finishParsingChildren().
887 The difference is we don't resotre state if this control is owned by a form.
888 (WebCore::FormController::restoreControlStateIn):
889 Restore states of associated controls. This is called from
890 finishParsingChildren() for <form>.
891 * html/FormController.h:
893 - Declare restoreControlStateFor() and restoreControlStateIn().
894 - Make takeStateForFormElement() private.
896 * html/FormAssociatedElement.cpp:
897 (WebCore::FormAssociatedElement::isFormControlElementWithState):
898 Added. The default implementation returns false.
899 * html/FormAssociatedElement.h:
900 (FormAssociatedElement):
901 Added isFormControlElementWithState() for FormController::restoreControlStateIn().
902 * html/HTMLFormControlElementWithState.cpp:
903 (WebCore::HTMLFormControlElementWithState::finishParsingChildren):
904 Some code was moved to FormController:restoreControlStateFor().
905 (WebCore::HTMLFormControlElementWithState::isFormControlElementWithState):
907 * html/HTMLFormControlElementWithState.h:
908 (HTMLFormControlElementWithState): Declare isFormControlElementWithState().
909 * html/HTMLFormElement.cpp:
910 (WebCore::HTMLFormElement::finishParsingChildren):
911 Added. Calls FormController::restoreControlStateIn().
912 * html/HTMLFormElement.h:
913 (HTMLFormElement): Declare finishParsingChildren().
915 2012-07-13 Kent Tamura <tkent@chromium.org>
917 Make calendar pickers testable
918 https://bugs.webkit.org/show_bug.cgi?id=84827
920 Reviewed by Hajime Morita.
923 - Add PagePopupDriver, an interface to open/close a PagePopup.
924 - Add setPagePopupDriver() to ChromeClient in order to inject a
925 PagePopupDriver for testing.
928 Add MockPagePopupDriver, which creates a MockPagePopup, which creates a
929 normal <iframe> in the top-level document, and load the popup content on
930 it. MockPagePopupDriver is enabled by
931 internals.settings.setEnableMockPagePopup(true).
933 Test: fast/forms/date/calendar-picker-appearance.html
935 * WebCore.gypi: Add new files.
936 * WebCore.xcodeproj/project.pbxproj: Add files to make this buildable.
937 * page/ChromeClient.h:
938 (ChromeClient): Add function for PagePopupDriver.
939 * loader/EmptyClients.h: Add empty implementations for PagePopupDriver functions.
940 * page/PagePopupDriver.h: Added.
942 (WebCore::PagePopupDriver::~PagePopupDriver):
944 * testing/InternalSettings.cpp:
945 (WebCore::InternalSettings::Backup::restoreTo): Reset the mock PagePopupDriver.
946 (WebCore::InternalSettings::setEnableMockPagePopup):
947 Register MockPagePopupDriver to ChromeClient.
948 * testing/InternalSettings.h:
949 (InternalSettings): Declare setEnableMockPagePopup().
950 * testing/InternalSettings.idl: ditto.
951 * testing/MockPagePopupDriver.cpp: Added.
952 (MockPagePopup): Pseudo PagePopup implementation with the standard <iframe>.
953 (WebCore::MockPagePopupDriver::MockPagePopupDriver): Added.
954 (WebCore::MockPagePopupDriver::create): Added.
955 (WebCore::MockPagePopupDriver::~MockPagePopupDriver): Added.
956 (WebCore::MockPagePopupDriver::openPagePopup):
957 Added. An override of PagePopupDriver function. This creates a MockPagePopup.
958 (WebCore::MockPagePopupDriver::closePagePopup):
959 Added. An override of PagePopupDriver function. This deletes the MockPagePopup.
960 * testing/MockPagePopupDriver.h:
961 (MockPagePopupDriver): Added.
963 * testing/v8/WebCoreTestSupport.cpp:
964 (WebCoreTestSupport::injectPagePopupController):
965 Added. Production code uses per-Page context feature framework. However
966 MockPagePopup uses the same page as the host page. So we can't use the
967 framework and need to inject window.pagePopupController manually.
968 * testing/v8/WebCoreTestSupport.h:
969 (WebCoreTestSupport): Add injectPagePopupController().
971 2012-07-12 Pavel Feldman <pfeldman@chromium.org>
973 Web Inspector: mute the native looks of the selects in the console.
974 https://bugs.webkit.org/show_bug.cgi?id=91120
976 Reviewed by Vsevolod Vlasov.
978 This is necessary for Mac now that we don't use border images for select.
980 * inspector/front-end/ConsoleView.js:
981 (WebInspector.ConsoleView.prototype.get statusBarItems):
982 (WebInspector.ConsoleView.prototype.addContext):
983 (WebInspector.ConsoleView.prototype.removeContext):
984 (WebInspector.ConsoleView.prototype._updateIsolatedWorldSelector):
985 (WebInspector.ConsoleView.prototype._appendIsolatedContextOption):
986 (WebInspector.ConsoleView.prototype._currentEvaluationContext):
987 (WebInspector.ConsoleView.prototype._currentIsolatedContextId):
988 * inspector/front-end/StatusBarButton.js:
989 (WebInspector.StatusBarComboBox):
990 (WebInspector.StatusBarComboBox.prototype.addOption):
991 (WebInspector.StatusBarComboBox.prototype.removeOption):
992 (WebInspector.StatusBarComboBox.prototype.removeOptions):
993 (WebInspector.StatusBarComboBox.prototype.selectedOption):
994 * inspector/front-end/inspector.css:
995 (.status-bar-select-container):
996 (select.status-bar-item):
999 2012-07-13 Andrei Bucur <abucur@adobe.com>
1001 [CSS Regions] Fix the lifecycle for the flow objects and their renderers
1002 https://bugs.webkit.org/show_bug.cgi?id=89000
1004 Reviewed by Eric Seidel.
1006 This patch adds the concept of a NamedFlowCollection, owned by the document, that keeps track of
1007 all the named flows that exist in the Document. This collection contains a ListHashSet of weak references to
1008 all the existing NamedFlows in the document. This is not a managed set because the CREATED flows are referenced from the renderer and
1009 the NULL flows are only cached, they should be destructible.
1010 Two named flows are considered to be equal if they have the same name.
1011 I've changed the NamedFlow state to depend on the existence of its renderer. A flow thread that has a renderer will also have a NamedFlow object.
1012 A flow thread without a renderer can have a NamedFlow object, but only in the NULL state. It's possible for a NamedFlow object to jump from the
1013 NULL state to the CREATED state if it was not destroyed (e.g. it was referenced from JS). Keeping track of the NULL state flows that have listeners will be important
1014 so when they go back to the CREATED state, the listeners would still be there.
1016 Link to spec: http://www.w3.org/TR/2012/WD-css3-regions-20120503/
1018 Tests: The old tests have been modified to take into account the new behavior
1021 * GNUmakefile.list.am:
1024 * WebCore.vcproj/WebCore.vcproj:
1025 * WebCore.xcodeproj/project.pbxproj:
1026 * dom/DOMAllInOne.cpp:
1028 (WebCore::Document::~Document):
1030 (WebCore::Document::webkitGetFlowByName):
1031 (WebCore::Document::namedFlows):
1035 * dom/WebKitNamedFlow.cpp:
1036 (WebCore::WebKitNamedFlow::WebKitNamedFlow):
1037 (WebCore::WebKitNamedFlow::~WebKitNamedFlow):
1038 (WebCore::WebKitNamedFlow::create):
1040 (WebCore::WebKitNamedFlow::name):
1041 (WebCore::WebKitNamedFlow::overset):
1042 (WebCore::nodeInFlowThread):
1043 (WebCore::WebKitNamedFlow::getRegionsByContentNode):
1044 (WebCore::WebKitNamedFlow::getContent):
1045 (WebCore::WebKitNamedFlow::setRenderer):
1046 * dom/WebKitNamedFlow.h:
1049 (WebCore::WebKitNamedFlow::getFlowState):
1050 (WebCore::WebKitNamedFlow::switchFlowState):
1051 * dom/WebKitNamedFlowCollection.cpp: Added.
1053 (WebCore::WebKitNamedFlowCollection::WebKitNamedFlowCollection):
1054 (WebCore::WebKitNamedFlowCollection::length): An O(1) operation
1055 (WebCore::WebKitNamedFlowCollection::item): An O(N) operation
1056 (WebCore::WebKitNamedFlowCollection::flowByName): An O(1) operation
1057 (WebCore::WebKitNamedFlowCollection::ensureNamedFlowInCreatedState): An O(1) operation
1058 (WebCore::WebKitNamedFlowCollection::moveNamedFlowToNullState): An O(1) operation
1059 (WebCore::WebKitNamedFlowCollection::discardNamedFlow): An O(1) operation
1060 (WebCore::WebKitNamedFlowCollection::documentDestroyed):
1061 (WebCore::WebKitNamedFlowCollection::NamedFlowHashFunctions::hash):
1062 (WebCore::WebKitNamedFlowCollection::NamedFlowHashFunctions::equal):
1063 (WebKitNamedFlowCollection::NamedFlowHashFunctions):
1064 (WebCore::WebKitNamedFlowCollection::NamedFlowHashTranslator::hash):
1065 (WebCore::WebKitNamedFlowCollection::NamedFlowHashTranslator::equal):
1066 * dom/WebKitNamedFlowCollection.h: Copied from Source/WebCore/dom/WebKitNamedFlow.h.
1068 (WebKitNamedFlowCollection):
1069 (WebCore::WebKitNamedFlowCollection::create):
1070 (WebCore::WebKitNamedFlowCollection::document):
1071 * rendering/FlowThreadController.cpp:
1072 (WebCore::FlowThreadController::ensureRenderFlowThreadWithName):
1073 (WebCore::FlowThreadController::removeFlowThread):
1075 * rendering/FlowThreadController.h:
1076 (FlowThreadController):
1077 * rendering/RenderNamedFlowThread.cpp:
1078 (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
1080 (WebCore::RenderNamedFlowThread::~RenderNamedFlowThread):
1081 (WebCore::RenderNamedFlowThread::removeRegionFromThread):
1082 (WebCore::RenderNamedFlowThread::unregisterNamedFlowContentNode):
1083 (WebCore::RenderNamedFlowThread::flowThreadName):
1084 (WebCore::RenderNamedFlowThread::willBeDestroyed):
1085 * rendering/RenderNamedFlowThread.h:
1086 (RenderNamedFlowThread):
1087 (WebCore::RenderNamedFlowThread::contentNodes):
1088 (WebCore::RenderNamedFlowThread::canBeDestroyed):
1090 2012-07-13 Vineet Chaudhary <rgf748@motorola.com>
1092 [V8Bindings] Implement generalised method to validates that the passed object is a sequence type.
1093 https://bugs.webkit.org/show_bug.cgi?id=91056
1095 Reviewed by Kentaro Hara.
1097 Currently the V8 implementation validates that the passed object is a sequence type only
1098 for MessagePort in V8Utilities::extractTransferables().
1099 There should be generalised method for other types too.
1100 Spec URL: http://www.w3.org/TR/2012/WD-WebIDL-20120207/#es-sequence
1102 No new test, Just refactoring. There should be no behavioral changes.
1104 * bindings/v8/V8Binding.h:
1105 (WebCore::toV8Sequence): Added implementation of toV8Sequence().
1107 2012-07-13 Zeno Albisser <zeno@webkit.org>
1109 [Qt][WK2] Implement GraphicsSurface for Linux/GLX.
1110 https://bugs.webkit.org/show_bug.cgi?id=90881
1112 Add a GLX based GraphicsSurface implementation for Linux.
1113 Native X windows are being used for exchanging textures
1116 Reviewed by Noam Rosenthal.
1120 * platform/graphics/surfaces/GraphicsSurface.cpp:
1121 (WebCore::GraphicsSurface::create):
1122 Move creating GraphicsSurface instance into
1123 platformCreate/platformImport functions to allow
1124 platform specific creation based on the provided flags.
1125 (WebCore::GraphicsSurface::GraphicsSurface):
1126 (WebCore::GraphicsSurface::~GraphicsSurface):
1127 Call platformDestroy when destroying a GraphicsSurface.
1129 * platform/graphics/surfaces/GraphicsSurface.h:
1130 Make platformCreate/platformImport functions static
1131 to be able to call these from the static create function.
1132 Add Destructor prototype and add GraphicsSurfacePrivate member.
1135 * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
1137 (WebCore::GraphicsSurface::platformCreate):
1138 (WebCore::GraphicsSurface::platformImport):
1139 Insert creation of GraphicsSurface instance.
1140 This allows having a platform specific creation mechanism
1142 * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp: Added.
1144 (OffScreenRootWindow):
1145 (WebCore::OffScreenRootWindow::OffScreenRootWindow):
1146 (WebCore::OffScreenRootWindow::get):
1147 (WebCore::OffScreenRootWindow::~OffScreenRootWindow):
1148 Add an OffScreenRootWindow singelton that is being used
1149 as a parent for all native offscreen windows.
1150 (GraphicsSurfacePrivate):
1151 This class is used to manage all the X related resources
1152 such as opening a display or creating XPixmaps etc.
1153 (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
1154 Open a connection to the X server and create a
1155 QOpenGLContext that can be used to resolve GL functions.
1156 (WebCore::GraphicsSurfacePrivate::~GraphicsSurfacePrivate):
1157 Properly cleanup and release all the X resources again.
1158 (WebCore::GraphicsSurfacePrivate::createSurface):
1159 Create a surface that is placed off screen and can be
1160 used as a rendering target by the WebProcess.
1161 (WebCore::GraphicsSurfacePrivate::createPixmap):
1162 Create a GLXPixmap from the XWindow that was previously
1163 redirected by the WebProcess. This GLXPixmap can then be
1164 bound to a texture and being painted on screen by the
1166 (WebCore::GraphicsSurfacePrivate::makeCurrent):
1167 (WebCore::GraphicsSurfacePrivate::swapBuffers):
1168 (WebCore::GraphicsSurfacePrivate::display):
1169 (WebCore::GraphicsSurfacePrivate::glxPixmap):
1170 (WebCore::GraphicsSurfacePrivate::size):
1171 (WebCore::GraphicsSurfacePrivate::glContext):
1172 (WebCore::resolveGLMethods):
1173 Initialize all the function pointers for the GL functions used.
1174 (WebCore::GraphicsSurface::platformExport):
1175 (WebCore::GraphicsSurface::platformGetTextureID):
1176 Bind the GLXPixmap to a texture.
1177 (WebCore::GraphicsSurface::platformCopyToGLTexture):
1178 Not beeing implemented for GLX.
1179 (WebCore::GraphicsSurface::platformCopyFromFramebuffer):
1180 Blit origin fbo onto the GraphicsSurface's backing.
1181 (WebCore::GraphicsSurface::platformCreate):
1182 (WebCore::GraphicsSurface::platformImport):
1183 (WebCore::GraphicsSurface::platformLock):
1184 (WebCore::GraphicsSurface::platformUnlock):
1185 (WebCore::GraphicsSurface::platformDestroy):
1187 2012-07-13 Dongwoo Im <dw.im@samsung.com>
1189 CodeGeneratorJS.pm : SetterExpression should use 'push' rather than 'unshift'
1190 https://bugs.webkit.org/show_bug.cgi?id=91198
1192 Reviewed by Kentaro Hara.
1194 'SetterExpression' should use 'push' to make arguments, rather than 'unshift'.
1196 No new tests. Covered by existing tests.
1198 * bindings/scripts/CodeGeneratorJS.pm:
1199 (GenerateImplementation):
1201 2012-07-13 Yoshifumi Inoue <yosin@chromium.org>
1203 REGRESSION(r119948): [Forms] Spin button Up/Down actions make value to zero for input type "number" when step mismatched
1204 https://bugs.webkit.org/show_bug.cgi?id=91197
1206 Reviewed by Kent Tamura.
1208 This patch fixes implementation of Decimal::ceiling() and floor().
1209 They return wrong value for small fractional numbers.
1211 The bug is occurred when:
1212 - Step-able input type, e.g. number, date, datetime, and so on.
1213 - Current value is step mismatched
1214 - Current value is smaller than step
1215 - Step up/down by spin button
1216 because spin button up/down actions are implemented in InputType::setpUpFromRenderer
1217 which calls Decimal::ceiling() and floor() for step mismatched case.
1219 Tests: fast/forms/number/number-stepup-stepdown-from-renderer.html: Added test cases
1220 WebKit/chromium/tests/DecimalTest.cpp: Added test cases
1222 * platform/Decimal.cpp:
1223 (WebCore::Decimal::ceiling): Changed to return 1 for positive small fractional number.
1224 (WebCore::Decimal::floor): Changed to return -1 for negative small fractional number.
1226 2012-07-13 Dominic Mazzoni <dmazzoni@google.com>
1228 Should be possible to focus elements within canvas fallback content
1229 https://bugs.webkit.org/show_bug.cgi?id=87898
1231 Reviewed by Chris Fleizach.
1233 Patches isFocusable in dom/Node.cpp and html/HTMLFormControlElement.cpp
1234 to make elements focusable if they're a descendent of a canvas element
1235 if they would otherwise have been focusable but just didn't have
1236 a renderer. Adds a bit to ElementRareData to efficiently keep track
1237 of elements in a canvas subtree.
1239 Test: fast/canvas/fallback-content.html
1242 (WebCore::Element::attach):
1243 (WebCore::Element::detach):
1244 (WebCore::Element::setIsInCanvasSubtree):
1246 (WebCore::Element::isInCanvasSubtree):
1249 * dom/ElementRareData.h:
1251 (WebCore::ElementRareData::ElementRareData):
1253 (WebCore::Node::isFocusable):
1254 * html/HTMLCanvasElement.cpp:
1255 (WebCore::HTMLCanvasElement::attach):
1257 * html/HTMLCanvasElement.h:
1258 (HTMLCanvasElement):
1259 * html/HTMLFormControlElement.cpp:
1260 (WebCore::HTMLFormControlElement::isFocusable):
1262 2012-07-12 Carlos Garcia Campos <cgarcia@igalia.com>
1264 [GTK] Add API to get HTTPS status to WebKit2 GTK+
1265 https://bugs.webkit.org/show_bug.cgi?id=91100
1267 Reviewed by Martin Robinson.
1269 * platform/network/soup/ResourceResponse.h:
1270 (WebCore::ResourceResponse::soupMessageCertificate): Return the
1272 (WebCore::ResourceResponse::setSoupMessageCertificate): Set a
1274 (WebCore::ResourceResponse::soupMessageTLSErrors): Return the TLS
1276 (WebCore::ResourceResponse::setSoupMessageTLSErrors): Set TLS
1278 * platform/network/soup/ResourceResponseSoup.cpp:
1279 (WebCore::ResourceResponse::toSoupMessage): Set the certificate
1280 and TLS errors to the newly created SoupMessage.
1281 (WebCore::ResourceResponse::updateFromSoupMessage): Get the
1282 certificate and TLS errors from the SoupMessage.
1284 2012-07-13 Ryosuke Niwa <rniwa@webkit.org>
1286 RadioNodeList is not updated upon input type change
1287 https://bugs.webkit.org/show_bug.cgi?id=91178
1289 Reviewed by Alexey Proskuryakov.
1291 Invalidate the radio node lists when type content attribute changes since it excludes
1292 image type input elements.
1294 Test: fast/forms/radionodelist-image-type.html
1297 (WebCore::shouldInvalidateNodeListForType):
1298 * dom/Document.h: Renamed InvalidateOnIdNameForAttrChange to InvalidateOnFormAttrChange
1299 since listing all attribute name isn't useful at this point.
1300 * html/RadioNodeList.cpp:
1301 (WebCore::RadioNodeList::RadioNodeList):
1303 2012-07-12 Dongwoo Im <dw.im@samsung.com>
1305 CodeGeneratorJS.pm need to handle the attribute which has "CallWith=ScriptExecutionContext" option.
1306 https://bugs.webkit.org/show_bug.cgi?id=91185
1308 Reviewed by Kentaro Hara.
1310 When an attribute has "CallWith=ScriptExecutionContext" option, 'ScriptExecutionContext*' parameter should be the last parameter.
1312 No new tests. Covered by existing tests.
1314 * bindings/scripts/CodeGeneratorJS.pm:
1315 (GenerateImplementation):
1317 2012-07-12 Yoshifumi Inoue <yosin@chromium.org>
1319 REGRESSION(r117738): [Forms] stepMismatch for input type "time" with large step value always return false.
1320 https://bugs.webkit.org/show_bug.cgi?id=91062
1322 Reviewed by Kent Tamura.
1324 This patch changes value of StepRange::acceptableError to zero for
1325 integer restricted step value.
1327 No new tests, existing test covers (fast/forms/time/ValidityState-stepMismatch-time.html) this change although they are listed in TestExpectation file.
1329 * html/StepRange.cpp:
1330 (WebCore::StepRange::acceptableError): Changed to return 0 if step value is restricted to be an integer.
1332 2012-07-12 Dan Bernstein <mitz@apple.com>
1334 Pass an option flag to CFStringGetHyphenationLocationBeforeIndex() that tells it to not
1335 terminate the search at the last word boundary before the given index.
1337 Reviewed by Adele Peterson.
1339 No test, because the current version of Core Foundation ignores the options parameter.
1341 * platform/text/cf/HyphenationCF.cpp:
1342 (WebCore::lastHyphenLocation): Changed the options parameter from 0 to 1.
1344 2012-07-12 Eric Seidel <eric@webkit.org>
1346 Incorrect behaviour calling Range setStart or setEnd with boundary in different document
1347 https://bugs.webkit.org/show_bug.cgi?id=42517
1349 Reviewed by Ojan Vafai.
1351 Added a new static inline "checkForDifferentRootContainer" to share some code
1352 and made setStart/setEnd do the right thing in the x-document case. I removed
1353 the bogus checks in set*After/set*Before functions, and since they just call
1354 through to setStart/setEnd, they also now do the right thing.
1356 Test: fast/dom/Range/set-wrong-document-err.html
1359 (WebCore::checkForDifferentRootContainer):
1361 (WebCore::Range::setStart):
1362 (WebCore::Range::setEnd):
1363 (WebCore::Range::setStartAfter):
1364 (WebCore::Range::setEndBefore):
1365 (WebCore::Range::setEndAfter):
1366 (WebCore::Range::setStartBefore):
1368 2012-07-12 Erik Arvidsson <arv@chromium.org>
1370 [V8] Simplify CodeGeneratorV8 since V8OnProto is only true for DOMWindow
1371 https://bugs.webkit.org/show_bug.cgi?id=91165
1373 Reviewed by Nate Chapin.
1375 The old code was dead code since V8OnProto only ever gets set to 1 for DOMWindow.
1377 No new tests. No change in functionality.
1379 * bindings/scripts/CodeGeneratorV8.pm:
1380 (GenerateNormalAttrSetter):
1382 2012-07-12 Ryosuke Niwa <rniwa@webkit.org>
1384 Build fix. Initialize unused const member variables to make compilers happy.
1386 * dom/DynamicNodeList.h:
1387 (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase):
1389 2012-07-12 Konrad Piascik <kpiascik@rim.com>
1391 Web Inspector: Geolocation override
1392 https://bugs.webkit.org/show_bug.cgi?id=89365
1394 Reviewed by Pavel Feldman.
1396 Reverted original patch.
1397 Change has not been reviewed by the right people. It declares
1398 public protocol methods and is wrong in several ways.
1400 * Modules/geolocation/GeolocationController.cpp:
1401 (WebCore::GeolocationController::GeolocationController):
1402 (WebCore::GeolocationController::positionChanged):
1403 * Modules/geolocation/GeolocationController.h:
1404 (GeolocationController):
1405 * inspector/Inspector.json:
1406 * inspector/InspectorInstrumentation.cpp:
1408 * inspector/InspectorInstrumentation.h:
1410 (InspectorInstrumentation):
1411 * inspector/InspectorPageAgent.cpp:
1412 (WebCore::InspectorPageAgent::InspectorPageAgent):
1413 * inspector/InspectorPageAgent.h:
1414 * inspector/front-end/Settings.js:
1415 * inspector/front-end/SettingsScreen.js:
1416 (WebInspector.UserAgentSettingsTab):
1417 (WebInspector.UserAgentSettingsTab.prototype._createDeviceMetricsElement):
1418 * inspector/front-end/UserAgentSupport.js:
1420 2012-07-12 Ryosuke Niwa <rniwa@webkit.org>
1422 Move m_type and m_hasNameCache from HTMLCollectionCacheBase to DynamicNodeListCacheBase for better bit packing
1423 https://bugs.webkit.org/show_bug.cgi?id=91164
1425 Reviewed by Anders Carlsson.
1427 Moved m_type and m_hasNameCache from HTMLCollection and renamed them to m_collectionType and m_isNameCacheValid.
1429 Also renamed shouldIncludeChildren to shouldOnlyIncludeDirectChildren and negated the return value since
1430 all HTMLCollection include children in the collection and the function was meant to tell us whether the collection
1431 should include descendents that are not direct children of base().
1433 In addition, renamed nextNodeOrSibling to nextNode since "or sibling" doesn't seem to add any semantic clarity.
1435 * dom/DynamicNodeList.h:
1436 (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase):
1437 (DynamicNodeListCacheBase):
1438 (WebCore::DynamicNodeListCacheBase::type):
1439 (WebCore::DynamicNodeListCacheBase::hasNameCache):
1440 (WebCore::DynamicNodeListCacheBase::setHasNameCache):
1441 (WebCore::DynamicNodeListCacheBase::clearCache):
1442 * html/HTMLCollection.cpp:
1443 (WebCore::shouldOnlyIncludeDirectChildren):
1444 (WebCore::HTMLCollection::HTMLCollection):
1445 (WebCore::HTMLCollection::isAcceptableElement):
1446 (WebCore::nextNode):
1447 (WebCore::HTMLCollection::itemAfter):
1448 * html/HTMLCollection.h:
1449 (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase):
1450 (HTMLCollectionCacheBase):
1451 (WebCore::HTMLCollectionCacheBase::clearCache):
1453 2012-07-12 Shinya Kawanaka <shinyak@chromium.org>
1455 Needs callback before AuthorShadowRoot is added.
1456 https://bugs.webkit.org/show_bug.cgi?id=91167
1458 Reviewed by Hajime Morita.
1460 This is a preliminary patch for adding multiple Shadow DOM support for media elements and form elements.
1461 They assume that UserAgentShadowRoot is the oldest, however currently a page author may try to add
1462 AuthorShadowRoot before adding UserAgentShadowRoot.
1464 This patch adds a callback before AuthorShadowRoot is being added, and allow us to add UserAgentShadowRoot
1465 for those elements. See also Bug 77936, Bug 77937, Bug 90532.
1468 (WebCore::Element::willAddAuthorShadowRoot):
1469 * dom/ElementShadow.cpp:
1470 (WebCore::ElementShadow::addShadowRoot):
1471 * dom/ElementShadow.h:
1473 * dom/ShadowRoot.cpp:
1474 (WebCore::ShadowRoot::create):
1476 2012-07-12 Dana Jansens <danakj@chromium.org>
1478 [chromium] Remove the RenderPass pointer from RenderPassDrawQuad
1479 https://bugs.webkit.org/show_bug.cgi?id=91023
1481 Reviewed by Adrienne Walker.
1483 Removes the RenderPass pointer and keeps only an integer id in the
1484 quad to refer back to the RenderPass the quad reads from.
1486 Covered by existing tests.
1488 * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1489 (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
1490 (WebCore::findRenderPassById):
1492 (WebCore::removeRenderPassesRecursive):
1493 (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithCachedTextures::shouldRemoveRenderPass):
1494 (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithNoQuads::shouldRemoveRenderPass):
1495 (WebCore::CCLayerTreeHostImpl::removeRenderPasses):
1496 (WebCore::CCLayerTreeHostImpl::prepareToDraw):
1497 * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1499 (CullRenderPassesWithCachedTextures):
1500 (CullRenderPassesWithNoQuads):
1501 (CCLayerTreeHostImpl):
1502 * platform/graphics/chromium/cc/CCRenderPass.cpp:
1503 (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
1504 * platform/graphics/chromium/cc/CCRenderPass.h:
1506 * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp:
1507 (WebCore::CCRenderPassDrawQuad::create):
1508 (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad):
1509 * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h:
1510 (CCRenderPassDrawQuad):
1511 * platform/graphics/chromium/cc/CCRenderSurface.cpp:
1512 (WebCore::CCRenderSurface::appendQuads):
1513 * platform/graphics/chromium/cc/CCRenderSurface.h:
1516 2012-07-12 Elliott Sprehn <esprehn@gmail.com>
1518 Unneeded tree walking when adding or removing children due to RenderCounter / RenderQuote logic
1519 https://bugs.webkit.org/show_bug.cgi?id=89900
1521 Reviewed by Eric Seidel and Abhishek Arya.
1523 Previously we would walk the all children a renderer whenever adding
1524 or removing a child renderer from its RenderObjectChildList to look for
1525 RenderQuote and RenderCounter instances to update. This patch introduces
1526 a counter in RenderView for the number of RenderQuote and RenderCounter
1527 instances in that document so we can avoid these traversals.
1529 No tests needed since this is just a short circuiting of logic and the existing
1530 tests should cover it.
1532 * rendering/RenderCounter.cpp:
1533 (WebCore::RenderCounter::RenderCounter): Increment instance counter.
1534 (WebCore::RenderCounter::willBeDestroyed): Decrement instance counter.
1536 (WebCore::RenderCounter::rendererRemovedFromTree): Short circuit when counter is zero.
1537 (WebCore::RenderCounter::rendererSubtreeAttached): Short circuit when counter is zero.
1538 * rendering/RenderCounter.h:
1540 * rendering/RenderObjectChildList.cpp:
1541 (WebCore::RenderObjectChildList::removeChildNode): Short circuit calling into Counter and Quote code when the document is being destroyed.
1542 * rendering/RenderQuote.cpp:
1543 (WebCore::RenderQuote::RenderQuote):
1544 (WebCore::RenderQuote::willBeDestroyed):
1546 (WebCore::RenderQuote::rendererSubtreeAttached): Increment instance counter.
1547 (WebCore::RenderQuote::rendererRemovedFromTree): Decrement instance counter.
1548 * rendering/RenderQuote.h:
1550 * rendering/RenderView.cpp:
1551 (WebCore::RenderView::RenderView):
1552 * rendering/RenderView.h: Methods for managing the RenderQuote and RenderCounter counts.
1554 (WebCore::RenderView::addRenderQuote):
1555 (WebCore::RenderView::removeRenderQuote):
1556 (WebCore::RenderView::hasRenderQuotes):
1557 (WebCore::RenderView::addRenderCounter):
1558 (WebCore::RenderView::removeRenderCounter):
1559 (WebCore::RenderView::hasRenderCounters):
1561 2012-07-12 Ryosuke Niwa <rniwa@webkit.org>
1563 Merge HTMLCollectionWithArrayStorage into HTMLCollection
1564 https://bugs.webkit.org/show_bug.cgi?id=91144
1566 Reviewed by Anders Carlsson.
1568 Merged HTMLCollectionWithArrayStorage::item into HTMLCollection::item and got rid of
1569 HTMLCollectionWithArrayStorage. Also de-virtualized HTMLCollection::item and HTMLCollection::length
1570 and merged itemInArrayAfter and itemAfter.
1572 In addition, improved the algorithm in HTMLCollection::length to take advantage of item cache.
1573 Instead of always computing the length from the beginning, we start the search from the cached item
1574 so that if we're near end of the collection, we avoid significant portion of the node traversal.
1576 Furthermore, made HTMLCollection always call setItemCache with a non-null item and HTMLCollection::item
1577 set the length cache when it reaches the end of the collection to avoid redundant length calculations.
1579 * dom/DynamicNodeList.h:
1580 (WebCore::DynamicNodeListCacheBase::setItemCache): Add a FIXME.
1581 * html/HTMLCollection.cpp:
1582 (WebCore::HTMLCollection::itemAfter): Regular HTMLCollection doesn't have uses elements array so
1583 assert that offsetInArray is always 0.
1584 (WebCore): Removed calcLength.
1585 (WebCore::HTMLCollection::length): Rewritten. The algorithm is as follows:
1586 When there is no item cache, we look for the first item by calling item(0). If item(0) returns null,
1587 then it must have set the length cache so bail out. If the previous step didn't bail out, then
1588 the item cache is valid and not null (see above), so count the number of remaining items in collection
1589 starting at the cached item's offset + 1.
1590 (WebCore::HTMLCollection::item): Avoid calling setItemCache with null. When the first item is null,
1591 set the length cache instead.
1592 (WebCore::HTMLCollection::itemAfterCachedItem): Extracted from HTMLCollectionWithArrayStorage::item.
1593 (WebCore::HTMLCollection::namedItem): Pass in arrayOffset to itemAfter. Note this variable is never
1594 used since only HTMLFormCollection and HTMLPropertiesCollection use array offsets but they override
1596 (WebCore::HTMLCollection::updateNameCache): Ditto.
1597 * html/HTMLCollection.h:
1600 * html/HTMLFormCollection.cpp: Removed calcLength(). Even though this function didn't iterate over
1601 the collection directly, HTMLFormElement::length and HTMLFieldSetElement::length did so we're not
1602 regressing any performance here.
1603 (WebCore::HTMLFormCollection::HTMLFormCollection):
1604 (WebCore::HTMLFormCollection::itemAfter):
1605 * html/HTMLFormCollection.h:
1606 (HTMLFormCollection):
1607 * html/HTMLNameCollection.cpp:
1608 (WebCore::HTMLNameCollection::itemAfter):
1609 * html/HTMLNameCollection.h:
1610 (HTMLNameCollection):
1611 * html/HTMLPropertiesCollection.cpp: Removed calcLength().
1612 (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection):
1613 (WebCore::HTMLPropertiesCollection::itemAfter):
1615 * html/HTMLPropertiesCollection.h:
1616 (HTMLPropertiesCollection):
1617 * html/HTMLTableRowsCollection.cpp:
1618 (WebCore::HTMLTableRowsCollection::itemAfter):
1619 * html/HTMLTableRowsCollection.h:
1620 (HTMLTableRowsCollection):
1622 2012-07-12 Pravin D <pravind.2k4@gmail.com>
1624 Row size/position is wrongly calculated when table having overlapping rowspan cell and colspan cell
1625 https://bugs.webkit.org/show_bug.cgi?id=16811
1627 Reviewed by Julien Chaffraix.
1629 The height of a row is calculated by taking the max height of the cells contained in it. When a row contains
1630 a rowSpan cell and if this row is not the last row of the cell, then its height is max height of other non
1631 rowSpan cells. If the row is the last row of the rowSpan cell, then using the contraint laid by CSS2.1 spec
1632 "For a rowSpan cell, the sum of the row heights involved must be great enough to encompass the cell spanning the rows",
1633 the last remaining height of the rowSpan(cell height minus heights of other involved rows) is taken into consideration
1634 while calculating the height of this row.
1635 Currently when calculating the height of the row we are only using the height of the primary cell at position (row, col).
1636 However when a row has colSpan cell and rowSpan, they might overlap. In such a sitution as only the primary cells height
1637 is considered, the height of the row will be calculated worngly if the other overlapping cell has greater height.
1638 Thus all the overlapping cell at position (row, col) must be considered while calculating the height of a row.
1640 Test: fast/table/last-cell-of-rowspan-overlapping-colspan-cell.html
1642 * rendering/RenderTableSection.cpp:
1643 (WebCore::RenderTableSection::calcRowLogicalHeight):
1644 Fixed function to use all the overlapping cells at position(row, col) to calculate the height/position of rows.
1646 2012-07-12 Joshua Bell <jsbell@chromium.org>
1648 IndexedDB: Enable IDBFactory.deleteDatabase() and webkitGetDatabaseNames() in Workers
1649 https://bugs.webkit.org/show_bug.cgi?id=90310
1651 Reviewed by Tony Chang.
1653 Simplify Document vs. Worker logic for IDBFactory::open() and hook up the
1654 other two IDBFactory methods for use by workers as well.
1656 Test: storage/indexeddb/factory-basics-workers.html
1658 * Modules/indexeddb/IDBFactory.cpp:
1659 (isContextValid): Helper function consolidating checks that context is usable.
1660 (getIndexedDBDatabasePath): Helper function for accessing group settings.
1661 (WebCore::IDBFactory::getDatabaseNames): Simplify - just pass context through to back end.
1662 (WebCore::IDBFactory::open): Ditto.
1663 (WebCore::IDBFactory::deleteDatabase): Ditto.
1664 (WebCore::IDBFactory::cmp): Whitespace.
1665 * Modules/indexeddb/IDBFactoryBackendImpl.cpp: Obsolete openFromWorker() removed.
1666 (WebCore::IDBFactoryBackendImpl::getDatabaseNames): Signature updated.
1667 (WebCore::IDBFactoryBackendImpl::deleteDatabase): Signature updated.
1668 (WebCore::IDBFactoryBackendImpl::open): Signature updated.
1669 * Modules/indexeddb/IDBFactoryBackendImpl.h:
1670 (IDBFactoryBackendImpl):
1671 * Modules/indexeddb/IDBFactoryBackendInterface.h: Interface methods now take both SecurityOrigin
1672 and ScriptExecutionContext, but not Frame. In the proxy, SecurityOrigin is redundant (can be
1673 accessed from context) but on the real back end the context is null (as Frame was previously).
1674 (IDBFactoryBackendInterface):
1675 * inspector/InspectorIndexedDBAgent.cpp:
1677 (WebCore::InspectorIndexedDBAgent::requestDatabaseNamesForFrame):
1678 (WebCore::InspectorIndexedDBAgent::requestDatabase):
1679 (WebCore::InspectorIndexedDBAgent::requestData):
1681 2012-07-12 Dana Jansens <danakj@chromium.org>
1683 [chromium] The root layer should not try create a second RenderSurface for itself
1684 https://bugs.webkit.org/show_bug.cgi?id=91124
1686 Reviewed by Adrienne Walker.
1688 Tests: CCLayerTreeHostImplTest.rootLayerDoesntCreateExtraSurface
1690 * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
1691 (WebCore::subtreeShouldRenderToSeparateSurface):
1693 2012-07-12 Adam Barth <abarth@webkit.org>
1695 Regression (r122359) Layout Test html5lib/runner.html is failing
1696 https://bugs.webkit.org/show_bug.cgi?id=91047
1698 Reviewed by Tony Chang.
1700 This ASSERT is bogus because doctypes can be removed from the DOM and
1703 Test: fast/viewport/viewport-legacy-xhtmlmp-remove-and-add.html
1706 (WebCore::Document::setDocType):
1708 2012-07-12 Ojan Vafai <ojan@chromium.org>
1710 Implied minimum size of flex items is min-content
1711 https://bugs.webkit.org/show_bug.cgi?id=87546
1713 Reviewed by Tony Chang.
1715 http://dev.w3.org/csswg/css3-flexbox/#min-size-auto
1716 In the main axis direction, min-size of auto means min-content.
1718 Test: css3/flexbox/flex-item-min-size.html
1720 * rendering/RenderBox.cpp:
1721 (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
1722 (WebCore::RenderBox::computeContentLogicalHeightUsing):
1723 (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
1724 (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
1725 (WebCore::RenderBox::computePositionedLogicalWidthUsing):
1726 (WebCore::RenderBox::computePositionedLogicalHeightUsing):
1727 It turned out that these FIXMEs are all unnecessary with the changes to RenderFlexibleBox.
1729 * rendering/RenderFlexibleBox.cpp:
1730 (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
1731 (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
1733 2012-07-12 Eric Penner <epenner@google.com>
1735 [chromium] Use CCTexture/TextureAllocator and remove TextureManager
1736 https://bugs.webkit.org/show_bug.cgi?id=91001
1738 Reviewed by Adrienne Walker.
1740 Use CCTexture to clean up CCPrioritizedTexture::Backing.
1741 Add TextureAllocator.h and remove remainder of TextureManager.h/cpp.
1742 Minor move/refactoring of link/unlink in CCPrioritizedTexture.
1743 Remove double initialization of the default memory limit.
1745 Covered by existing tests (refactoring).
1748 * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp:
1749 * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h:
1751 * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp:
1752 * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h:
1754 * platform/graphics/chromium/ImageLayerChromium.cpp:
1755 * platform/graphics/chromium/LayerRendererChromium.cpp:
1756 (WebCore::LayerRendererChromium::initialize):
1757 * platform/graphics/chromium/ManagedTexture.cpp: Removed.
1758 * platform/graphics/chromium/ManagedTexture.h: Removed.
1759 * platform/graphics/chromium/RenderSurfaceChromium.h:
1761 * platform/graphics/chromium/TextureAllocator.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCPriorityCalculator.h.
1764 (WebCore::TextureAllocator::~TextureAllocator):
1765 * platform/graphics/chromium/TextureManager.cpp: Removed.
1766 * platform/graphics/chromium/TextureManager.h: Removed.
1767 * platform/graphics/chromium/TiledLayerChromium.cpp:
1768 * platform/graphics/chromium/TrackingTextureAllocator.cpp:
1769 (WebCore::TrackingTextureAllocator::createTexture):
1770 (WebCore::TrackingTextureAllocator::deleteTexture):
1771 * platform/graphics/chromium/TrackingTextureAllocator.h:
1772 * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
1773 * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1774 (WebCore::CCLayerTreeHost::prioritizeTextures):
1775 * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1777 * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1778 (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
1779 * platform/graphics/chromium/cc/CCPrioritizedTexture.cpp:
1780 (WebCore::CCPrioritizedTexture::CCPrioritizedTexture):
1781 (WebCore::CCPrioritizedTexture::setDimensions):
1782 (WebCore::CCPrioritizedTexture::textureId):
1783 (WebCore::CCPrioritizedTexture::bindTexture):
1784 (WebCore::CCPrioritizedTexture::framebufferTexture2D):
1785 (WebCore::CCPrioritizedTexture::link):
1787 (WebCore::CCPrioritizedTexture::unlink):
1788 * platform/graphics/chromium/cc/CCPrioritizedTexture.h:
1790 (WebCore::CCPrioritizedTexture::bytes):
1791 (CCPrioritizedTexture):
1792 (WebCore::CCPrioritizedTexture::haveBackingTexture):
1793 (WebCore::CCPrioritizedTexture::Backing::Backing):
1794 (WebCore::CCPrioritizedTexture::Backing::~Backing):
1795 (WebCore::CCPrioritizedTexture::Backing::owner):
1797 (WebCore::CCPrioritizedTexture::backing):
1798 * platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp:
1799 (WebCore::CCPrioritizedTextureManager::prioritizeTextures):
1800 (WebCore::CCPrioritizedTextureManager::requestLate):
1801 (WebCore::CCPrioritizedTextureManager::acquireBackingTextureIfNeeded):
1802 (WebCore::CCPrioritizedTextureManager::reduceMemory):
1803 (WebCore::CCPrioritizedTextureManager::clearAllMemory):
1804 (WebCore::CCPrioritizedTextureManager::registerTexture):
1805 (WebCore::CCPrioritizedTextureManager::returnBackingTexture):
1806 (WebCore::CCPrioritizedTextureManager::createBacking):
1807 (WebCore::CCPrioritizedTextureManager::destroyBacking):
1808 (WebCore::CCPrioritizedTextureManager::assertInvariants):
1809 * platform/graphics/chromium/cc/CCPrioritizedTextureManager.h:
1810 (CCPrioritizedTextureManager):
1811 (WebCore::CCPrioritizedTextureManager::defaultMemoryAllocationLimit):
1812 (WebCore::CCPrioritizedTextureManager::compareBackings):
1813 * platform/graphics/chromium/cc/CCPriorityCalculator.h:
1814 * platform/graphics/chromium/cc/CCScopedTexture.cpp:
1815 * platform/graphics/chromium/cc/CCScopedTexture.h:
1816 * platform/graphics/chromium/cc/CCTexture.h:
1817 (WebCore::CCTexture::CCTexture):
1818 * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
1820 * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
1822 2012-07-12 Ryosuke Niwa <rniwa@webkit.org>
1824 Let XCode have its own way.
1826 * WebCore.xcodeproj/project.pbxproj:
1828 2012-07-12 Julien Chaffraix <jchaffraix@webkit.org>
1830 ASSERT(genChild->isListMarker() || genChild->style()->styleType() == FIRST_LETTER) triggered on flex-box content
1831 https://bugs.webkit.org/show_bug.cgi?id=91003
1833 Reviewed by Abhishek Arya.
1835 Tests: fast/flexbox/assert-generated-deprecated-flexbox.html
1836 fast/flexbox/assert-generated-new-flexbox.html
1838 The issue was that findBeforeAfterParent didn't return the right parent for the flex-box case. This would
1839 make us update the wrong children (and not propagate the style updates properly).
1841 * rendering/RenderObjectChildList.cpp:
1842 (WebCore::findBeforeAfterParent):
1843 Added a check for flex boxes (both deprecated and new).
1845 2012-07-12 Pravin D <pravind.2k4@gmail.com>
1847 Percentage width replaced element in zero percent/fixed width container block incorrectly rendered.
1848 https://bugs.webkit.org/show_bug.cgi?id=9493
1850 Reviewed by Andy Estes.
1852 When the width of the container is zero percent/fixed value then the width of the replaced element must also be zero.
1854 Test: fast/css/percent-width-img-inside-zero-percent-and-fixed-container.html
1856 * rendering/RenderBox.cpp:
1857 (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
1858 When the containing block's available width is zero there can be two cases.
1859 The containing block is floated/positioned in which case the width of the replaced child element must be its instrinsic width.
1860 On the other hand if the width of the container is specified to be either zero percent or fixed value then the width of the
1861 replaced elment must be zero.
1863 2012-07-11 Ryosuke Niwa <rniwa@webkit.org>
1865 invalidateNodeListsCacheAfterAttributeChanged should dynamically figure out which attribute needs invalidation
1866 https://bugs.webkit.org/show_bug.cgi?id=91046
1868 Reviewed by Anders Carlsson.
1870 Added an array of counters (m_nodeListCounts) for each set of attributes (NodeListInvalidationType) node lists care about
1871 to Document, and made DynamicSubtreeNodeList's constructor and destructor increment and decrement these counters via
1872 registerDynamicSubtreeNodeList and unregisterDynamicSubtreeNodeList respectively. shouldInvalidateDynamicSubtreeNodeList,
1873 which is called by invalidateNodeListsCacheAfterAttributeChanged, then use these counters to determine whether a given
1874 attribute change should result in node list invalidations.
1876 Also removed m_numNodeListCaches from TreeScope because this counter has now become redundant with m_nodeListCounts.
1878 * dom/ChildNodeList.cpp:
1879 (WebCore::ChildNodeList::ChildNodeList): Do not invalidate on attribute changes.
1880 * dom/ClassNodeList.cpp:
1881 (WebCore::ClassNodeList::ClassNodeList): Invalidate on class attribute changes.
1883 (WebCore::Document::Document): Initialize m_nodeListCounts.
1884 (WebCore::Document::~Document): Add assertions to make sure m_listsInvalidatedAtDocument, m_nodeListCounts, and
1885 m_collections are all empty.
1886 (WebCore::Document::registerDynamicSubtreeNodeList): This function is now called for all DynamicSubtreeNodeLists supposed
1887 to just ones rooted at the document in order to increment the counter for each invalidation type.
1888 (WebCore::Document::unregisterDynamicSubtreeNodeList): Ditto.
1889 (WebCore::shouldInvalidateDynamicSubtreeNodeListForType): Checks the attribute name against NodeListInvalidationType.
1890 (WebCore::Document::shouldInvalidateDynamicSubtreeNodeList): Returns true if the given attribute name matches the invalidation
1891 type of the existing DynamicSubtreeNodeLists in the document. If the attribute name is not given (used when children change),
1892 then it checks for the existence of any DynamicSubtreeNodeLists. Conceptually, this function can be written as a list of
1893 "if" statements that checks values in m_nodeListCounts and the attribute name. We use "for" loop and switch statement instead
1894 to share logic and detect future addition of values to NodeListInvalidationType.
1896 (Document): Moved RootType and InvalidationType from DynamicNodeListCacheBase and renamed them to NodeListRootType and
1897 NodeListInvalidationType respectively in order to reduce the possibility of future name collisions. Also the invalidation type
1898 now contains 6 values instead of 2.
1899 * dom/DynamicNodeList.cpp:
1901 * dom/DynamicNodeList.h:
1902 (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase):
1903 (WebCore::DynamicNodeListCacheBase::shouldInvalidateOnAttributeChange):
1904 (WebCore::DynamicNodeListCacheBase::rootType): Added.
1905 (WebCore::DynamicNodeListCacheBase::invalidationType): Added.
1906 (DynamicNodeListCacheBase): Uses 3 bits to store invalidation type now that the number of values have increased from 2 to 6.
1907 (WebCore::DynamicNodeList::DynamicNodeList):
1908 (WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList): Call unregisterDynamicSubtreeNodeList.
1909 (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList): Call registerDynamicSubtreeNodeList.
1910 * dom/MicroDataItemList.cpp:
1911 (WebCore::MicroDataItemList::MicroDataItemList): Invalidate on itemscope, itemprop, and itemtype content attribute changes.
1912 * dom/NameNodeList.cpp:
1913 (WebCore::NameNodeList::NameNodeList): Invalidate on name attribute changes.
1915 (WebCore::Node::clearRareData):
1916 (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): Replaced the hard coded check list of attributes, by a call
1917 to shouldInvalidateDynamicSubtreeNodeList.
1918 (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): Calls shouldInvalidateDynamicSubtreeNodeList.
1919 (WebCore::Node::getElementsByTagName):
1920 (WebCore::Node::getElementsByTagNameNS):
1921 (WebCore::Node::getElementsByName):
1922 (WebCore::Node::getElementsByClassName):
1923 (WebCore::Node::radioNodeList):
1924 (WebCore::NodeRareData::createNodeLists):
1925 * dom/NodeRareData.h:
1926 (WebCore::NodeListsNodeData::adoptTreeScope): Unregister and register node lists in m_tagNodeListCacheNS since all node lists
1927 need to be accounted in m_nodeListCounts.
1928 (WebCore::NodeRareData::ensureNodeLists):
1930 * dom/TagNodeList.cpp:
1931 (WebCore::TagNodeList::TagNodeList): Do not invalidate on any attribute changes.
1932 * dom/TreeScope.cpp:
1933 (WebCore::TreeScope::TreeScope): No longer initializes m_numNodeListCaches since it has been removed.
1935 (TreeScope): Removed m_numNodeListCaches.
1936 * dom/TreeScopeAdopter.cpp:
1937 (WebCore::TreeScopeAdopter::moveTreeToNewScope):
1938 * html/HTMLCollection.h:
1939 (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase): Just pass in DoNotInvalidateOnAttributeChanges for now since
1940 it's never used in HTMLCollections.
1941 * html/LabelableElement.cpp:
1942 (WebCore::LabelableElement::labels):
1943 * html/LabelsNodeList.cpp:
1944 (WebCore::LabelsNodeList::LabelsNodeList): Invalidate on for content attribute changes.
1945 (WebCore::LabelsNodeList::~LabelsNodeList):
1946 * html/RadioNodeList.cpp:
1947 (WebCore::RadioNodeList::RadioNodeList): Invalidate on id, name, and for content attribute changes.
1948 (WebCore::RadioNodeList::~RadioNodeList):
1950 2012-07-12 Gavin Barraclough <barraclough@apple.com>
1952 Threadsafety issues in WebScriptObject
1953 https://bugs.webkit.org/show_bug.cgi?id=90849
1955 Reviewed by Filip Pizlo & Oliver Hunt.
1957 Updated fix for this bug. Taking the JSC API lock from WebScriptObject::release
1958 may not be safe; better to just guard the JSWrapperCache with its own spinlock.
1960 * bindings/objc/WebScriptObject.mm:
1961 (WebCore::getJSWrapper):
1962 - Added spinlock; also retain/autorelease the returned wrapper - it is unsafe
1963 to wait for the caller to do so, due to a race condition vs release removing
1964 the wrapper from the map.
1965 (WebCore::addJSWrapper):
1966 - Take the spinlock guarding the cache.
1967 (WebCore::removeJSWrapper):
1968 - Take the spinlock guarding the cache.
1969 (WebCore::removeJSWrapperIfRetainCountOne):
1970 - Take the spinlock guarding the cache, remove the wrapper if retainCount is one.
1971 (WebCore::createJSWrapper):
1972 - Remove the API lock; this method no longer needs to retain/autorelease (this is
1973 done by getJSWrapper).
1974 (-[WebScriptObject _setImp:originRootObject:rootObject:]):
1975 - Remove the API lock.
1976 (-[WebScriptObject release]):
1977 - Remove the API lock, retainCount check moved into removeJSWrapperIfRetainCountOne.
1979 2012-07-11 David Hyatt <hyatt@apple.com>
1981 https://bugs.webkit.org/show_bug.cgi?id=91000
1982 REGRESSION (r122244): Overflow elements don't shrink as much as they should.
1984 Reviewed by Simon Fraser.
1986 This is a fix for a a regression from https://bugs.webkit.org/show_bug.cgi?id=90646.
1988 I incorrectly analyzed the issue with Robert Hogan's negative margin patch and fooled myself into putting back
1989 in an incorrect minimum width check from long ago.
1991 What should have happened in the test case I patched is that the overflow element should shrink to 0. The issue
1992 with improving the logical top estimate in the previous patch is it made the clear delta become 0. This in turn
1993 exposed a bug in our clearing algorithm with Robert's changes where you could need a relayout even if you didn't
1994 actually move. This issue only occurs because the floats list is getting changed mid-layout because of negative margins.
1996 The patch changes getClearDelta to call setChildNeedsLayout(true) on children whose widths change even when their
1997 positions do not. In effect this dynamic addition of new floats after you have done a layout on the child already means
1998 that you can need to lay out again despite not actually having to move.
2000 To handle this, the code that does the relayout is now called if the child needs a relayout. This is done even if
2001 the logical top estimate matches the final position.
2003 No new tests required, since the test in fast/block/float is now correctly covering the issue.
2005 * rendering/RenderBlock.cpp:
2006 (WebCore::RenderBlock::layoutBlockChild):
2007 (WebCore::RenderBlock::getClearDelta):
2008 * rendering/RenderBox.cpp:
2009 (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
2011 2012-07-12 James Weatherall <wez@chromium.org>
2013 storage tests are flaky (crashing) on windows
2014 https://bugs.webkit.org/show_bug.cgi?id=90469
2016 Reviewed by Kentaro Hara.
2018 Add a missing check that the underlying V8 object reference in a V8 NPObject is valid, and zero the NPObject's rootObject member when disposing it, to ensure that it won't be mistakenly touched after that point.
2020 This patch is intended to resolve flakiness in the storage tests including:
2021 storage/indexeddb/mozilla/indexes.html
2022 storage/indexeddb/mozilla/key-requirements-inline-and-passed.html
2023 storage/websql/multiple-databases-garbage-collection.html
2025 * bindings/v8/NPV8Object.cpp:
2026 (WebCore::disposeUnderlyingV8Object):
2027 Zero the NPObject's underlying rootObject.
2028 (_NPN_EvaluateHelper):
2029 Add check that the underlying V8 object reference is valid.
2031 2012-07-12 No'am Rosenthal <noam.rosenthal@nokia.com>
2033 Move TextureMapperAnimation and texmap/LayerTransform to platform/graphics
2034 https://bugs.webkit.org/show_bug.cgi?id=91111
2036 Reviewed by Kenneth Rohde Christiansen.
2038 TextureMapperAnimation and LayerTransform are not specific to TextureMapper, and we want
2039 to use them for other purposes as well. Moving them to platform/graphics would make that
2042 No new tests, moving files around.
2044 * GNUmakefile.list.am:
2047 * platform/graphics/GraphicsLayerAnimation.cpp: Renamed from Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.cpp.
2048 * platform/graphics/GraphicsLayerAnimation.h: Renamed from Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.h.
2049 * platform/graphics/GraphicsLayerTransform.cpp: Renamed from Source/WebCore/platform/graphics/texmap/LayerTransform.cpp.
2050 * platform/graphics/GraphicsLayerTransform.h: Renamed from Source/WebCore/platform/graphics/texmap/LayerTransform.h.
2051 * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2052 (WebCore::GraphicsLayerTextureMapper::addAnimation):
2053 * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
2054 (GraphicsLayerTextureMapper):
2055 * platform/graphics/texmap/TextureMapperLayer.h:
2056 (TextureMapperLayer):
2057 (WebCore::TextureMapperLayer::setAnimatedTransform):
2058 (WebCore::TextureMapperLayer::setAnimatedOpacity):
2060 2012-07-12 Vsevolod Vlasov <vsevik@chromium.org>
2062 Web Inspector: Simplify UISourceCode code after moving revisions support inside it.
2063 https://bugs.webkit.org/show_bug.cgi?id=91118
2065 Reviewed by Pavel Feldman.
2067 * inspector/front-end/UISourceCode.js:
2068 (WebInspector.UISourceCode.prototype._setContent):
2069 (WebInspector.UISourceCode.prototype.revertToOriginal):
2070 (WebInspector.UISourceCode.prototype.revertAndClearHistory):
2071 (WebInspector.UISourceCode.prototype.contentChanged):
2072 (WebInspector.UISourceCode.prototype.commitWorkingCopy):
2073 (WebInspector.Revision.prototype.revertToThis):
2075 2012-07-12 Allan Sandfeld Jensen <allan.jensen@nokia.com>
2077 Unreviewed. Build fix for r122462.
2079 * platform/qt/MemoryUsageSupportQt.cpp:
2081 2012-07-12 Vsevolod Vlasov <vsevik@chromium.org>
2083 Web Inspector: Remove resources panel edited resources search support.
2084 https://bugs.webkit.org/show_bug.cgi?id=91101
2086 Reviewed by Pavel Feldman.
2088 * inspector/front-end/ResourcesPanel.js:
2089 (WebInspector.ResourcesPanel.prototype.performSearch.callback):
2090 (WebInspector.ResourcesPanel.prototype.performSearch):
2092 2012-07-12 Vsevolod Vlasov <vsevik@chromium.org>
2094 Unreviewed r122460 inspector closure compilation fix follow up.
2096 * inspector/front-end/RevisionHistoryView.js:
2097 (WebInspector.RevisionHistoryView):
2099 2012-07-12 Ilya Tikhonovsky <loislo@chromium.org>
2101 Web Inspector: fix native memory instrumentation code for the bindings instrumentation.
2102 https://bugs.webkit.org/show_bug.cgi?id=91096
2104 The instrumented class has to have instrumentation method which reports class size and type and
2105 the member objects and pointers.
2108 void Node::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
2110 memoryObjectInfo->reportObjectInfo(this, MemoryInstrumentation::DOM); // report object size and type.
2111 TreeShared<Node, ContainerNode>::reportMemoryUsage(memoryObjectInfo); // call base class instrumentation.
2112 ScriptWrappable::reportMemoryUsage(memoryObjectInfo); // call base class instrumentation.
2113 memoryObjectInfo->reportPointer(m_document, MemoryInstrumentation::DOM); // report uninstrumented pointer.
2114 memoryObjectInfo->reportInstrumentedPointer(m_next); // report instrumented pointer.
2115 memoryObjectInfo->reportInstrumentedObject(m_anObject); // report instrumented object.
2118 Reviewed by Pavel Feldman.
2120 Existing tests for native memory instrumentation.
2122 * bindings/v8/DOMDataStore.cpp:
2123 (WebCore::DOMDataStore::reportMemoryUsage):
2124 * bindings/v8/DOMDataStore.h:
2127 * bindings/v8/IntrusiveDOMWrapperMap.h:
2128 (WebCore::ChunkedTable::reportMemoryUsage):
2129 * bindings/v8/ScriptProfiler.cpp:
2130 (WebCore::ScriptProfiler::collectBindingMemoryInfo):
2131 * bindings/v8/V8Binding.cpp:
2132 (WebCore::V8BindingPerIsolateData::reportMemoryUsage):
2133 (WebCore::StringCache::reportMemoryUsage):
2134 * bindings/v8/V8Binding.h:
2137 (V8BindingPerIsolateData):
2138 * bindings/v8/V8DOMMap.h:
2140 (AbstractWeakReferenceMap):
2141 * inspector/InspectorMemoryAgent.cpp:
2144 2012-07-12 Pavel Feldman <pfeldman@chromium.org>
2146 Web Inspector: beautify find bar looks, simplify search update routines.
2147 https://bugs.webkit.org/show_bug.cgi?id=91087
2149 Reviewed by Vsevolod Vlasov.
2151 This change updates the looks to the one on the screenshots and simplifies match count update routines.
2153 * inspector/front-end/SearchController.js:
2154 (WebInspector.SearchController.onMatchesMouseDown):
2155 (WebInspector.SearchController):
2156 (WebInspector.SearchController.prototype.activePanelChanged.performPanelSearch):
2157 (WebInspector.SearchController.prototype.activePanelChanged):
2158 (WebInspector.SearchController.prototype._updateSearchNavigationButtonState):
2159 (WebInspector.SearchController.prototype._updateSearchMatchesCountAndCurrentMatchIndex):
2160 (WebInspector.SearchController.prototype._onKeyDown):
2161 (WebInspector.SearchController.prototype._onInput):
2162 (WebInspector.SearchController.prototype._onNextButtonSearch):
2163 (WebInspector.SearchController.prototype._onPrevButtonSearch):
2164 (WebInspector.SearchController.prototype._performSearch):
2165 * inspector/front-end/inspector.css:
2168 (.toolbar-search-navigation-controls):
2169 (.toolbar-search-navigation):
2170 (.toolbar-search-navigation.enabled:hover):
2171 (.toolbar-search-navigation.enabled, .toolbar-search-navigation.enabled:active):
2173 (.toolbar-search-control):
2174 (.search-results-matches):
2175 (.inspector-footer):
2177 2012-07-12 Joshua Bell <jsbell@chromium.org>
2179 IndexedDB: ASSERT hit calling open from callback in Worker
2180 https://bugs.webkit.org/show_bug.cgi?id=90832
2182 Reviewed by Kentaro Hara.
2184 GroupSettings are used to provide the backing store path in some
2185 ports. Accessing those settings from a Worker was added, but the
2186 access referenced thread startup data that is cleared before the
2187 run loop, so an IDBFactory.open() call executed asynchronously
2188 would dereference a null pointer. Plumb the settings startup
2189 data into the context itself, like all of the other properties.
2191 Test: storage/indexeddb/open-twice-workers.html
2193 * Modules/indexeddb/IDBFactory.cpp:
2194 (WebCore::IDBFactory::open):
2195 * workers/DedicatedWorkerContext.cpp:
2196 (WebCore::DedicatedWorkerContext::DedicatedWorkerContext):
2197 * workers/DedicatedWorkerContext.h:
2198 (WebCore::DedicatedWorkerContext::create):
2199 (DedicatedWorkerContext):
2200 * workers/DedicatedWorkerThread.cpp:
2201 (WebCore::DedicatedWorkerThread::createWorkerContext):
2202 * workers/DedicatedWorkerThread.h:
2203 (DedicatedWorkerThread):
2204 * workers/SharedWorkerContext.cpp:
2205 (WebCore::SharedWorkerContext::SharedWorkerContext):
2206 * workers/SharedWorkerContext.h:
2207 (WebCore::SharedWorkerContext::create):
2208 (SharedWorkerContext):
2209 * workers/SharedWorkerThread.cpp:
2210 (WebCore::SharedWorkerThread::createWorkerContext):
2211 * workers/SharedWorkerThread.h:
2212 (SharedWorkerThread):
2213 * workers/WorkerContext.cpp:
2214 (WebCore::WorkerContext::WorkerContext):
2215 * workers/WorkerContext.h:
2216 (WebCore::WorkerContext::groupSettings):
2218 * workers/WorkerThread.cpp:
2219 (WebCore::WorkerThread::workerThread):
2220 * workers/WorkerThread.h:
2223 2012-07-12 Allan Sandfeld Jensen <allan.jensen@nokia.com>
2225 [Qt] Implement MemoryUsageSupport
2226 https://bugs.webkit.org/show_bug.cgi?id=91094
2228 Reviewed by Adam Barth.
2230 Implements Qt versions of the memory-usage functions using the information we have available
2231 from the various memory systems used in WebKit.
2233 Also gets rid of a redundant indirection in V8GCController.
2236 * bindings/v8/V8GCController.cpp:
2237 (WebCore::V8GCController::gcEpilogue):
2238 (WebCore::V8GCController::checkMemoryUsage):
2239 * platform/qt/MemoryUsageSupportQt.cpp: Added.
2240 (WebCore::mallocMemoryUsage):
2241 (WebCore::memoryUsageKB):
2242 (WebCore::actualMemoryUsageKB):
2243 (WebCore::MemoryUsageSupport::memoryUsageMB):
2244 (WebCore::MemoryUsageSupport::actualMemoryUsageMB):
2245 (WebCore::MemoryUsageSupport::lowMemoryUsageMB):
2246 (WebCore::MemoryUsageSupport::highMemoryUsageMB):
2247 (WebCore::MemoryUsageSupport::highUsageDeltaMB):
2248 (WebCore::MemoryUsageSupport::processMemorySizesInBytes):
2249 * platform/qt/PlatformSupport.h:
2252 2012-07-12 Vsevolod Vlasov <vsevik@chromium.org>
2254 Web Inspector: Revision history view should be updated when uiSourceCodes are removed or replaced.
2255 https://bugs.webkit.org/show_bug.cgi?id=91095
2257 Reviewed by Pavel Feldman.
2259 RevisionHistoryView is now reset in WorkspaceReset event handler.
2260 UISourceCodes are now removed from RevisionHistoryView when uiSourceCode is removed or replace.
2262 * inspector/front-end/RevisionHistoryView.js:
2263 (WebInspector.RevisionHistoryView):
2264 (WebInspector.RevisionHistoryView.prototype._clearHistory):
2265 (WebInspector.RevisionHistoryView.prototype._uiSourceCodeRemoved):
2266 (WebInspector.RevisionHistoryView.prototype._uiSourceCodeReplaced):
2267 * inspector/front-end/ScriptsPanel.js:
2268 (WebInspector.ScriptsPanel.prototype._reset):
2270 2012-07-12 Dongwoo Im <dw.im@samsung.com>
2272 InspectorFileSystemAgent.cpp have to include File.h explicitly
2273 https://bugs.webkit.org/show_bug.cgi?id=91078
2275 Reviewed by Vsevolod Vlasov.
2277 Make sure the InspectorFileSystemAgent.cpp include the File.h by including explicitly.
2279 No new tests. Covered by existing tests.
2281 * inspector/InspectorFileSystemAgent.cpp: Include File.h
2283 2012-07-12 Vsevolod Vlasov <vsevik@chromium.org>
2285 Web Inspector: [Regression] Stale revisions should be removed on navigation.
2286 https://bugs.webkit.org/show_bug.cgi?id=91080
2288 Reviewed by Pavel Feldman.
2290 Moved all the code responsible for script mapping resetting to Workspace.
2291 Stale revisions are removed in Workspace._reset now.
2293 * inspector/front-end/ScriptSnippetModel.js:
2294 (WebInspector.ScriptSnippetModel):
2295 * inspector/front-end/StylesPanel.js:
2296 (WebInspector.StylesUISourceCodeProvider):
2297 (WebInspector.StylesUISourceCodeProvider.prototype._populate):
2298 (WebInspector.StylesUISourceCodeProvider.prototype.reset):
2299 * inspector/front-end/UISourceCode.js:
2300 (WebInspector.UISourceCode.prototype._restoreRevisionHistory):
2301 * inspector/front-end/Workspace.js:
2302 (WebInspector.Workspace):
2303 (WebInspector.Workspace.prototype._reset):
2305 2012-07-12 Andreas Kling <kling@webkit.org>
2307 Make ElementAttributeData a variable-sized object to reduce memory use.
2308 <http://webkit.org/b/88240>
2310 Reviewed by Antti "Obi-Wan" Koivisto.
2312 Take advantage of the fact that we know at ElementAttributeData construction time how many attributes
2313 it needs to accomodate and allocate exactly as much space as needed instead of using a Vector.
2314 For elements that never have their attribute list mutated (the vast majority), this saves a lot of
2315 memory and removes the indirection to Vector<Attribute>'s heap-allocated storage.
2317 Introduced a mutability flag to ElementAttributeData and sprinkled assertions all over to make sure
2318 that nothing tries to mutate an element with a raw attribute array.
2320 When an Element's attribute(s) are mutated, we reconstruct the ElementAttributeData, this time using
2321 a Vector as backing instead. This is triggered when calling Element::mutableAttributeData().
2323 This reduces memory consumption by 3.2MB when viewing the full HTML5 spec at <http://whatwg.org/c/>.
2324 That is a ~35% reduction in DOM attribute memory use.
2326 Furthermore, that page ends up promoting 27% of the elements to mutable attribute storage due to dynamic
2327 adding of "class" attributes. For more static pages, savings are even greater.
2329 Also did away with ElementAttributeData::removeAttribute(name) and do separate index lookup where
2330 needed. Not a big deal but avoids double lookup of attributes when removing them.
2332 * css/PropertySetCSSStyleDeclaration.cpp:
2333 (WebCore::InlineCSSStyleDeclaration::ensureMutablePropertySet):
2335 Call ensureInlineStyle() on the element so we know we have a StylePropertySet to work with.
2336 May cause the creation (and replacement) of a new underlying StylePropertySet on the Element's
2339 * css/StylePropertySet.cpp:
2340 (WebCore::StylePropertySet::adoptCSSOMWrapperFrom):
2342 Added. Allows switching the underlying StylePropertySet object while retaining CSSOM wrapper
2343 identity (web facing behavior.)
2346 (WebCore::Element::detachAttribute):
2347 (WebCore::Element::removeAttribute):
2348 (WebCore::Element::attributes):
2349 (WebCore::Element::setAttributeInternal):
2350 (WebCore::Element::parserSetAttributes):
2351 (WebCore::Element::hasEquivalentAttributes):
2352 (WebCore::Element::setAttributeNode):
2353 (WebCore::Element::removeAttributeNode):
2354 (WebCore::Element::getAttributeNode):
2355 (WebCore::Element::getAttributeNodeNS):
2356 (WebCore::Element::hasAttribute):
2357 (WebCore::Element::hasAttributeNS):
2358 (WebCore::Element::normalizeAttributes):
2359 (WebCore::Element::cloneAttributesFromElement):
2360 (WebCore::Element::createMutableAttributeData):
2362 (WebCore::Element::attributeData):
2364 (WebCore::Element::updatedAttributeData):
2365 (WebCore::Element::ensureAttributeData):
2366 (WebCore::Element::ensureUpdatedAttributeData):
2367 (WebCore::Element::mutableAttributeData):
2369 * dom/ElementAttributeData.cpp:
2370 (WebCore::ElementAttributeData::createImmutable):
2372 (WebCore::ElementAttributeData::ElementAttributeData):
2373 (WebCore::ElementAttributeData::~ElementAttributeData):
2374 (WebCore::ElementAttributeData::attrIfExists):
2375 (WebCore::ElementAttributeData::ensureAttr):
2376 (WebCore::ElementAttributeData::setAttr):
2377 (WebCore::ElementAttributeData::removeAttr):
2378 (WebCore::ElementAttributeData::ensureInlineStyle):
2379 (WebCore::ElementAttributeData::ensureMutableInlineStyle):
2380 (WebCore::ElementAttributeData::destroyInlineStyle):
2381 (WebCore::ElementAttributeData::addAttribute):
2382 (WebCore::ElementAttributeData::removeAttribute):
2383 (WebCore::ElementAttributeData::isEquivalent):
2384 (WebCore::ElementAttributeData::detachAttrObjectsFromElement):
2385 (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase):
2386 (WebCore::ElementAttributeData::cloneDataFrom):
2387 (WebCore::ElementAttributeData::clearAttributes):
2388 (WebCore::ElementAttributeData::replaceAttribute):
2389 (WebCore::ElementAttributeData::getAttributeNode):
2390 * dom/ElementAttributeData.h:
2391 (WebCore::ElementAttributeData::create):
2392 (ElementAttributeData):
2393 (WebCore::ElementAttributeData::setClass):
2394 (WebCore::ElementAttributeData::setIdForStyleResolution):
2395 (WebCore::ElementAttributeData::inlineStyle):
2396 (WebCore::ElementAttributeData::setAttributeStyle):
2397 (WebCore::ElementAttributeData::reportMemoryUsage):
2398 (WebCore::ElementAttributeData::isMutable):
2399 (WebCore::ElementAttributeData::makeMutable):
2400 (WebCore::ElementAttributeData::length):
2402 (WebCore::ElementAttributeData::isEmpty):
2403 (WebCore::ElementAttributeData::array):
2404 (WebCore::ElementAttributeData::removeAttribute):
2405 (WebCore::ElementAttributeData::getAttributeItem):
2406 (WebCore::ElementAttributeData::getAttributeItemIndex):
2407 (WebCore::ElementAttributeData::attributeItem):
2408 * dom/StyledElement.cpp:
2409 (WebCore::StyledElement::style):
2410 (WebCore::StyledElement::classAttributeChanged):
2411 (WebCore::StyledElement::setInlineStyleProperty):
2412 (WebCore::StyledElement::removeInlineStyleProperty):
2413 (WebCore::StyledElement::addSubresourceAttributeURLs):
2414 * dom/StyledElement.h:
2415 (WebCore::StyledElement::ensureInlineStyle):
2416 * html/parser/HTMLConstructionSite.cpp:
2417 (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
2418 * xml/parser/XMLDocumentParserQt.cpp:
2419 (WebCore::XMLDocumentParser::XMLDocumentParser):
2421 2012-07-12 Florin Malita <fmalita@chromium.org>
2423 Incorrect handling of chained pending resources in SVGUseElement
2424 https://bugs.webkit.org/show_bug.cgi?id=89686
2426 Reviewed by Nikolas Zimmermann.
2428 Currently SVGUseElement builds the shadow tree when the target first
2429 becomes available. This is normally OK, but if the target itself (or
2430 one of its children) is a <use> element with pending resources, then
2431 the shadow expansion only captures the current state of the tree and
2432 never gets updated when the pending resource becomes available.
2434 In order to support arbitrary <use>-on-<use> constructs, this patch
2435 tracks nested <use> dependencies and rebuilds the dependent trees
2436 whenever the target gets updated.
2439 Tests: svg/custom/use-nested-expected.svg
2440 svg/custom/use-nested.svg
2442 * svg/SVGElement.cpp:
2443 (WebCore::SVGElement::removedFrom): removedFrom needs to be called up the inheritance chain
2444 before invoking removeAllElementReferencesForTarget. Otherwise we could end up finding the
2445 element being removed as a valid target in SVGUseElement::buildInstanceTree because its
2446 InDocument flag is not cleared yet.
2447 * svg/SVGUseElement.cpp:
2448 (WebCore::SVGUseElement::~SVGUseElement):
2449 (WebCore::SVGUseElement::clearResourceReferences):
2450 (WebCore::SVGUseElement::buildPendingResource):
2451 (WebCore::SVGUseElement::buildShadowAndInstanceTree):
2452 (WebCore::SVGUseElement::buildInstanceTree):
2453 * svg/SVGUseElement.h:
2455 Track <use> -> <use> dependencies using SVGDocumentExtensions'
2456 m_elementDependencies framework and ensure dependent trees are rebuilt
2457 when the target itself gets rebuilt.
2459 2012-07-12 MORITA Hajime <morrita@google.com>
2461 Typo: ParentTranversalDetails should be ParentTraversalDetails
2462 https://bugs.webkit.org/show_bug.cgi?id=91059
2464 Reviewed by Andreas Kling.
2466 Did a bare rename from ParentTranversalDetails to ParentTraversalDetails
2468 No new tests, just a rename.
2470 * dom/ComposedShadowTreeWalker.cpp:
2471 (WebCore::ComposedShadowTreeWalker::ParentTraversalDetails::didTraverseInsertionPoint):
2472 (WebCore::ComposedShadowTreeWalker::ParentTraversalDetails::didTraverseShadowRoot):
2473 (WebCore::ComposedShadowTreeWalker::ParentTraversalDetails::didFindNode):
2474 (WebCore::ComposedShadowTreeWalker::findParent):
2475 (WebCore::ComposedShadowTreeWalker::traverseNodeEscapingFallbackContents):
2476 (WebCore::ComposedShadowTreeWalker::traverseParent):
2477 (WebCore::ComposedShadowTreeWalker::traverseParentInCurrentTree):
2478 (WebCore::ComposedShadowTreeWalker::traverseParentBackToYoungerShadowRootOrHost):
2479 * dom/ComposedShadowTreeWalker.h:
2480 (WebCore::ComposedShadowTreeWalker::ParentTraversalDetails::ParentTraversalDetails):
2481 (ComposedShadowTreeWalker):
2482 * dom/NodeRenderingContext.h:
2483 (NodeRenderingContext):
2485 2012-07-11 Antti Koivisto <antti@apple.com>
2487 Failure to dispatch didFinishLoadForFrame if font load fails synchronously
2488 https://bugs.webkit.org/show_bug.cgi?id=91018
2490 Reviewed by Enrica Casucci.
2492 New font loads may be triggered by layout after the document load is complete but before we have dispatched
2493 didFinishLoading for the frame. If the load fails synchronously we might fail to ever invoke
2494 FrameLoader::checkLoadComplete and so fail to dispatch didFinishLoading.
2496 Make sure this doesn't happen by calling FrameLoader::checkLoadComplete explicitly after triggering font loads.
2498 * css/CSSFontSelector.cpp:
2499 (WebCore::CSSFontSelector::beginLoadTimerFired):
2501 2012-07-12 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2503 Register protocol handler files should be in Modules/protocolhandler
2504 https://bugs.webkit.org/show_bug.cgi?id=90766
2506 Reviewed by Hajime Morita.
2508 The register protocol handler files are now self-contained. This patch is moved to the Modules.
2510 No new tests. Covered by existing tests.
2514 * GNUmakefile.list.am:
2515 * Modules/protocolhandler/NavigatorRegisterProtocolHandler.cpp: Renamed from Source/WebCore/page/NavigatorRegisterProtocolHandler.cpp.
2517 (WebCore::initProtocolHandlerWhitelist):
2518 (WebCore::verifyCustomHandlerURL):
2519 (WebCore::isProtocolWhitelisted):
2520 (WebCore::verifyProtocolHandlerScheme):
2521 (WebCore::NavigatorRegisterProtocolHandler::NavigatorRegisterProtocolHandler):
2522 (WebCore::NavigatorRegisterProtocolHandler::~NavigatorRegisterProtocolHandler):
2523 (WebCore::NavigatorRegisterProtocolHandler::registerProtocolHandler):
2524 (WebCore::customHandlersStateString):
2525 (WebCore::NavigatorRegisterProtocolHandler::isProtocolHandlerRegistered):
2526 (WebCore::NavigatorRegisterProtocolHandler::unregisterProtocolHandler):
2527 * Modules/protocolhandler/NavigatorRegisterProtocolHandler.h: Renamed from Source/WebCore/page/NavigatorRegisterProtocolHandler.h.
2529 (NavigatorRegisterProtocolHandler):
2530 * Modules/protocolhandler/NavigatorRegisterProtocolHandler.idl: Renamed from Source/WebCore/page/NavigatorRegisterProtocolHandler.idl.
2532 * WebCore.gyp/WebCore.gyp:
2535 * WebCore.vcproj/WebCore.vcproj:
2536 * WebCore.vcproj/WebCoreCommon.vsprops:
2537 * WebCore.vcproj/copyForwardingHeaders.cmd:
2538 * WebCore.xcodeproj/project.pbxproj:
2540 2012-07-12 Jonathan Dong <jonathan.dong@torchmobile.com.cn>
2542 [BlackBerry] Cannot use digest proxy auth and NTLM auth at the same time
2543 https://bugs.webkit.org/show_bug.cgi?id=91054
2545 Reviewed by George Staikos.
2547 Added an interface function syncProxyCredential() in class
2548 PageClientBlackBerry, which is responsible to notify WebPageClient
2549 to synchronize proxy credential to the chrome process.
2551 Internally reviewed by Jason Liu <jason.liu@torchmobile.com.cn>
2553 No new tests since there's no functional change.
2555 * platform/blackberry/PageClientBlackBerry.h:
2556 * platform/network/blackberry/NetworkJob.cpp:
2557 (WebCore::NetworkJob::storeCredentials): Remember the accepted proxy
2558 credential and notify webpage client to synchronize it.
2560 2012-07-12 Xingnan Wang <xingnan.wang@intel.com>
2562 [IndexedDB] upperOpen set to true in lowerBound()/lowerOpen set to true in upperBound()
2563 https://bugs.webkit.org/show_bug.cgi?id=90867
2565 Reviewed by Tony Chang.
2567 In the latest W3C spec upperOpen/lowerOpen are set to true in lowerBound()/upperBound(), which
2568 we should keep aligned with.
2570 No new tests - updated storage/indexeddb/keyrange.html to match new behavior.
2572 * Modules/indexeddb/IDBKeyRange.cpp:
2573 (WebCore::IDBKeyRange::lowerBound):
2574 (WebCore::IDBKeyRange::upperBound):
2576 2012-07-12 MORITA Hajime <morrita@google.com>
2578 [Shadow DOM] <video> with <shadow> crashes
2579 https://bugs.webkit.org/show_bug.cgi?id=91055
2581 Reviewed by Kent Tamura.
2583 This is similar to Bug 90480, where an undesired renderer is created by
2584 locating an insertion point on the shadow boundary.
2586 This change adds a guard for such case by cheking whether the
2587 source node of each to-be-created renderer comes from the UA shadow
2588 tree, which is allowed to have a renderer.
2590 Test: fast/dom/shadow/insertion-point-video-crash.html
2592 * html/HTMLMediaElement.cpp:
2593 (WebCore::HTMLMediaElement::childShouldCreateRenderer): Added a check.
2594 (WebCore::HTMLMediaElement::mediaControls): Added const.
2595 (WebCore::HTMLMediaElement::hasMediaControls): Added const.
2596 * html/HTMLMediaElement.h:
2599 2012-07-12 Yoshifumi Inoue <yosin@chromium.org>
2601 REGRESSION(r122184): LocaleMac::currentLocale should use current locale rather than newly create locale object.
2602 https://bugs.webkit.org/show_bug.cgi?id=91057
2604 Reviewed by Kent Tamura.
2606 This patch changes NSLocale object of LocaleMac::m_locale variable to
2607 current NSLocale object rather than newly created NSLocale object from
2610 No new tests. We don't have way to change system preferences from
2611 test scripts and restoring them. To test this patch, we need to do so.
2613 * platform/text/mac/LocaleMac.h:
2614 (LocaleMac): Added a constructor which takes NSLocale object.
2615 * platform/text/mac/LocaleMac.mm:
2616 (WebCore::LocaleMac::LocaleMac): Added a constructor which takes NSLocale object.
2617 (WebCore::LocaleMac::currentLocale): Changed to construct LocaleMac object from NSLocale object rather than locale identifier.
2619 2012-07-11 Carlos Garcia Campos <cgarcia@igalia.com>
2621 [GTK] Add webkit_cookie_manager_set_persistent_storage() to WebKit2 GTK+ API
2622 https://bugs.webkit.org/show_bug.cgi?id=83016
2624 Reviewed by Martin Robinson.
2626 * platform/network/soup/CookieStorageSoup.cpp:
2627 (WebCore::soupCookiesChanged): Do not notify about changes in
2628 other cookie jars than the current one.
2630 2012-07-12 Philip Rogers <pdr@google.com>
2632 Refactor RenderSVGShape bounding box code
2633 https://bugs.webkit.org/show_bug.cgi?id=90655
2635 Reviewed by Nikolas Zimmermann.
2637 RenderSVGShape::objectBoundingBox worked differently than RenderSVGShape::strokeBoundingBox by
2638 not caching the object bounding box and instead computing it on each call. For consistency and
2639 performance objectBoundingBox has been refactored to return a cached value.
2641 createShape has been renamed updateShapeFromElement for understandability. updateShapeFromElement
2642 now updates the internal state of the shape (bounding boxes, etc) from the associated element.
2643 RenderSVGShape::inflateWithStrokeAndMarkerBounds has been merged into
2644 RenderSVGShape::calculateStrokeBoundingBox which is called from updateShapeFromElement.
2646 After this change all bounding box computation is now handled in updateShapeFromElement. Because
2647 subclasses override updateShapeFromElement it will be easy for them to have custom bounding box
2648 code there (as will happen for RenderSVGPath in a followup patch).
2650 strokeBoundingBox and objectBoundingBox are now able to return their cached values immediately
2651 in RenderSVGRect and RenderSVGEllipse instead of checking their fallback state on each call.
2653 Additionally, to save space RenderSVGEllipse and RenderSVGRect now use the m_fillBoundingBox and
2654 m_strokeBoundingBox of RenderSVGShape instead of having their own.
2656 This patch also removes setStrokeAndMarkerBoundingBox that was previously dead code.
2658 No new tests, just a refactoring.
2660 * rendering/svg/RenderSVGEllipse.cpp:
2661 (WebCore::RenderSVGEllipse::updateShapeFromElement):
2663 (WebCore::RenderSVGEllipse::fillShape):
2664 (WebCore::RenderSVGEllipse::strokeShape):
2665 (WebCore::RenderSVGEllipse::shapeDependentStrokeContains):
2666 * rendering/svg/RenderSVGEllipse.h:
2668 (WebCore::RenderSVGEllipse::isEmpty):
2669 * rendering/svg/RenderSVGRect.cpp:
2670 (WebCore::RenderSVGRect::updateShapeFromElement):
2672 (WebCore::RenderSVGRect::fillShape):
2673 (WebCore::RenderSVGRect::strokeShape):
2674 (WebCore::RenderSVGRect::shapeDependentStrokeContains):
2675 (WebCore::RenderSVGRect::shapeDependentFillContains):
2676 * rendering/svg/RenderSVGRect.h:
2678 (WebCore::RenderSVGRect::isEmpty):
2679 * rendering/svg/RenderSVGShape.cpp:
2680 (WebCore::RenderSVGShape::updateShapeFromElement):
2682 (WebCore::RenderSVGShape::layout):
2683 (WebCore::RenderSVGShape::calculateObjectBoundingBox):
2684 (WebCore::RenderSVGShape::calculateStrokeBoundingBox):
2685 (WebCore::RenderSVGShape::updateRepaintBoundingBox):
2686 * rendering/svg/RenderSVGShape.h:
2688 (WebCore::RenderSVGShape::objectBoundingBox):
2689 (WebCore::RenderSVGShape::strokeBoundingBox):
2691 2012-07-12 Kent Tamura <tkent@chromium.org>
2693 Do not save the form state signature if nothing is saved
2694 https://bugs.webkit.org/show_bug.cgi?id=91050
2696 Reviewed by Hajime Morita.
2698 This change will reduce the size of HistoyItem.
2700 Test: fast/forms/state-restore-empty-state.html
2702 * html/FormController.cpp:
2703 (WebCore::FormController::formElementsState):
2704 If stateVector has only the signature string, clear it.
2706 2012-07-11 Mark Rowe <mrowe@apple.com>
2708 <http://webkit.org/b/91051> Fix the Qt Mac build after r122400.
2710 Qt on Mac builds with a deployment target of OS X 10.5. However, it was not been setting
2711 BUILDING_ON_LEOPARD / TARGETING_LEOPARD and thus was falling down code paths in DisplaySleepDisabler.cpp
2712 that were specific to Snow Leopard and newer. After the removal of BUILDING_ON_LEOPARD
2713 and TARGETING_LEOPARD it ended up falling down the correct Leopard-compatible code path,
2714 which revealed that the code made assumptions about which headers had already been included.
2716 * platform/mac/DisplaySleepDisabler.cpp: Include CoreServices/CoreServices.h to pull in
2717 a declaration of UpdateSystemActivity when targeting Leopard.
2719 2012-07-11 Matt Falkenhagen <falken@chromium.org>
2721 Add dialog element feature toggle to InternalSettings
2722 https://bugs.webkit.org/show_bug.cgi?id=90934
2724 Reviewed by Hajime Morita.
2726 This enables layout tests to be written for dialog although the feature is disabled by default.
2728 Tests: fast/dom/HTMLDialogElement/dialog-disabled.html
2729 fast/dom/HTMLDialogElement/dialog-enabled.html
2731 * WebCore.exp.in: Added newly exported symbol.
2732 * testing/InternalSettings.cpp:
2733 (WebCore::InternalSettings::Backup::Backup): Backup dialog feature flag.
2734 (WebCore::InternalSettings::Backup::restoreTo): Restore dialog feature flag.
2735 (WebCore::InternalSettings::setDialogElementEnabled): Added.
2737 * testing/InternalSettings.h: Added support for dialog.
2740 * testing/InternalSettings.idl: Added support for dialog.
2742 2012-07-11 Kent Tamura <tkent@chromium.org>
2744 Accessing width or height of a detached image input element causes crash
2745 https://bugs.webkit.org/show_bug.cgi?id=90885
2747 Reviewed by Kentaro Hara.
2749 Test: fast/forms/image/width-and-height-of-detached-input.html
2751 * html/ImageInputType.cpp:
2752 (WebCore::ImageInputType::height): Add null check for m_imageLoader.
2753 (WebCore::ImageInputType::width): ditto.
2755 2012-07-11 Kent Tamura <tkent@chromium.org>
2757 Do not save state of stateless form controls
2758 https://bugs.webkit.org/show_bug.cgi?id=90964
2760 Reviewed by Hajime Morita.
2762 By Bug 89409, we started to store unmodified form control
2763 state. However we don't need to make such state for the following
2771 Test: fast/forms/state-restore-skip-stateless.html
2773 * html/BaseButtonInputType.cpp:
2774 (WebCore::BaseButtonInputType::shouldSaveAndRestoreFormControlState):
2775 Added. Disable saving state for submit, reset, and button types.
2776 * html/BaseButtonInputType.h:
2777 (BaseButtonInputType): Add shouldSaveAndRestoreFormControlState.
2778 * html/HTMLFormControlElementWithState.h:
2779 (HTMLFormControlElementWithState): Make shouldSaveAndRestoreFormControlState virtual.
2780 * html/HTMLInputElement.cpp:
2781 (WebCore::HTMLInputElement::shouldSaveAndRestoreFormControlState):
2782 Added. Checks InputType::shouldSaveAndRestoreFormControlState first.
2783 * html/HTMLInputElement.h:
2784 (HTMLInputElement): Override shouldSaveAndRestoreFormControlState.
2785 * html/HTMLKeygenElement.cpp:
2786 (WebCore::HTMLKeygenElement::shouldSaveAndRestoreFormControlState)
2787 Added. Disable saving state for <keygen>.:
2788 * html/HTMLKeygenElement.h: Override shouldSaveAndRestoreFormControlState.
2789 * html/InputType.cpp:
2790 (WebCore::InputType::shouldSaveAndRestoreFormControlState):
2791 Added. Enable saving state for all types by default.
2793 (InputType): Add shouldSaveAndRestoreFormControlState.
2794 * html/PasswordInputType.cpp:
2795 (WebCore::PasswordInputType::shouldSaveAndRestoreFormControlState):
2796 Added. Disabled saving state.
2797 (WebCore::PasswordInputType::saveFormControlState):
2798 Because shouldSaveAndRestoreFormControlState() returns false,
2799 saveFormControlState should be never called.
2800 * html/PasswordInputType.h:
2801 (PasswordInputType): Override shouldSaveAndRestoreFormControlState.
2803 2012-07-11 No'am Rosenthal <noam.rosenthal@nokia.com>
2805 Compilation error with GLES2 when using gl2ext.h from ANGLE.
2806 https://bugs.webkit.org/show_bug.cgi?id=91030
2808 Reviewed by Kenneth Russell.
2810 gl2ext.h defines PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG and not
2811 PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC. This is a bug in the original Khronos header,
2812 but we should work around it until fixed headers are integrated.
2815 * platform/graphics/opengl/Extensions3DOpenGLES.h:
2816 (Extensions3DOpenGLES):
2817 Removed the "PROC" suffix to work around the header bug.
2819 2012-07-11 Mark Rowe <mrowe@apple.com>
2821 Attempt to fix the Chromium Mac build after r122400.
2823 * platform/text/cf/HyphenationCF.cpp: Ensure that Chromium only compiles the body of this file if
2824 building for a new enough version of OS X.
2826 2012-07-11 Kent Tamura <tkent@chromium.org>
2828 [Mac] Sort project.pbxproj
2830 * WebCore.xcodeproj/project.pbxproj: Apply Tools/Scripts/sort-Xcode-project-file
2832 2012-07-11 Dan Bernstein <mitz@apple.com>
2834 When a table row height grows because of pagination, not all cells’ heights are adjusted
2835 https://bugs.webkit.org/show_bug.cgi?id=91043
2837 Reviewed by Sam Weinig.
2839 The fix for in bug <http://webkit.org/b/83595> in <http://trac.webkit.org/r113738> made table
2840 rows grow as necessary to fit cells that grow as a result of pagination. But it had two bad
2841 side effects: earlier cells on the row would not grow by the same amount, and later cells on
2842 the row would factor the existing growth into their intrinsic padding.
2844 Test: fast/multicol/table-row-height-increase.html
2846 * rendering/RenderTableSection.cpp:
2847 (WebCore::RenderTableSection::layoutRows): Now when a cell becomes taller than the row height,
2848 the additional height needed is recorded, and the cell is shrunk back to row height. Then
2849 after finishing the row, all cells occurring on the row (including cells spanning it but not
2850 starting on it) are grown by the same amount.
2852 2012-07-11 Mark Rowe <mrowe@apple.com>
2854 <http://webkit.org/b/91024> Build against the latest SDK when targeting older OS X versions.
2856 Reviewed by Dan Bernstein.
2858 The deployment target is already set to the version that we're targeting, and it's that setting
2859 which determines which functionality from the SDK is available to us.
2861 * Configurations/Base.xcconfig:
2863 2012-07-11 Mark Rowe <mrowe@apple.com>
2865 Switch a few cases that care about the SDK over to checking __MAC_OS_X_VERSION_MAX_ALLOWED so that things build.
2867 Part of <http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of system availability macros
2869 Reviewed by Filip Pizlo.
2871 * platform/graphics/cg/GraphicsContextCG.cpp: The SDK we're building against determines whether the constant is available.
2872 * platform/mac/EmptyProtocolDefinitions.h: The SDK we're building against determines whether the protocols are declared.
2873 * platform/mac/NSScrollerImpDetails.h: The SDK we're building against determines whether the constants and method are
2875 * platform/mac/SharedTimerMac.mm: The SDK we're building against determines whether the function has already been declared.
2877 2012-07-11 Mark Rowe <mrowe@apple.com>
2879 <http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of system availability macros
2881 This removal was handled by a script that translates the relevant macros in to the equivalent checks
2882 using the system availability macros.
2884 Reviewed by Filip Pizlo.
2887 * accessibility/AccessibilityList.h:
2888 * accessibility/AccessibilityTable.h:
2889 * accessibility/mac/AXObjectCacheMac.mm:
2890 * editing/mac/EditorMac.mm:
2891 * loader/MainResourceLoader.cpp:
2892 * loader/MainResourceLoader.h:
2893 * page/AlternativeTextClient.h:
2894 * page/ContextMenuController.cpp:
2895 * page/mac/SettingsMac.mm:
2896 * platform/LocalizedStrings.cpp:
2897 * platform/MemoryPressureHandler.cpp:
2898 * platform/audio/mac/AudioBusMac.mm:
2899 * platform/graphics/Gradient.h:
2900 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2901 * platform/graphics/ca/GraphicsLayerCA.cpp:
2902 * platform/graphics/ca/PlatformCALayer.h:
2903 * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2904 * platform/graphics/ca/mac/TileCache.mm:
2905 * platform/graphics/cg/GraphicsContextCG.cpp:
2906 * platform/graphics/cg/ImageBufferCG.cpp:
2907 * platform/graphics/cg/ImageBufferDataCG.cpp:
2908 * platform/graphics/cg/ImageBufferDataCG.h:
2909 * platform/graphics/cg/ImageCG.cpp:
2910 * platform/graphics/cg/ImageSourceCG.cpp:
2911 * platform/graphics/cg/PathCG.cpp:
2912 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2913 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2914 * platform/graphics/mac/ComplexTextController.cpp:
2915 * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2916 * platform/graphics/mac/FontCacheMac.mm:
2917 * platform/graphics/mac/FontCustomPlatformData.cpp:
2918 * platform/graphics/mac/FontMac.mm:
2919 * platform/graphics/mac/GraphicsContextMac.mm:
2920 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2921 * platform/graphics/mac/SimpleFontDataMac.mm:
2922 * platform/graphics/mac/WebLayer.h:
2923 * platform/graphics/mac/WebLayer.mm:
2924 * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2925 * platform/mac/CursorMac.mm:
2926 * platform/mac/DisplaySleepDisabler.cpp:
2927 * platform/mac/DisplaySleepDisabler.h:
2928 * platform/mac/EmptyProtocolDefinitions.h:
2929 * platform/mac/HTMLConverter.h:
2930 * platform/mac/HTMLConverter.mm:
2931 * platform/mac/MemoryPressureHandlerMac.mm:
2932 * platform/mac/NSScrollerImpDetails.h:
2933 * platform/mac/PlatformEventFactoryMac.mm:
2934 * platform/mac/PopupMenuMac.mm:
2935 * platform/mac/ScrollAnimatorMac.mm:
2936 * platform/mac/ScrollElasticityController.mm:
2937 * platform/mac/SharedTimerMac.mm:
2938 * platform/mac/SuddenTermination.mm:
2939 * platform/mac/WebCoreFullScreenWindow.mm:
2940 * platform/mac/WebCoreNSCellExtras.h:
2941 * platform/mac/WebCoreSystemInterface.h:
2942 * platform/mac/WebCoreSystemInterface.mm:
2943 * platform/mac/WebFontCache.mm:
2944 * platform/mac/WebVideoFullscreenController.mm:
2945 * platform/mac/WebVideoFullscreenHUDWindowController.mm:
2946 * platform/network/Credential.h:
2947 * platform/network/ResourceHandle.h:
2948 * platform/network/cf/DNSCFNet.cpp:
2949 * platform/network/cf/ProxyServerCFNet.cpp:
2950 * platform/network/cf/ResourceRequest.h:
2951 * platform/network/cf/ResourceRequestCFNet.cpp:
2952 * platform/network/cf/SocketStreamHandleCFNet.cpp:
2953 * platform/network/mac/AuthenticationMac.mm:
2954 * platform/network/mac/CookieStorageMac.mm:
2955 * platform/network/mac/ResourceHandleMac.mm:
2956 * platform/network/mac/ResourceRequestMac.mm:
2957 * platform/network/mac/WebCoreURLResponse.mm:
2958 * platform/text/TextChecking.h:
2959 * platform/text/cf/HyphenationCF.cpp:
2960 * platform/text/mac/HyphenationMac.mm:
2961 * rendering/RenderLayerBacking.cpp:
2962 * rendering/RenderLayerCompositor.cpp:
2963 * rendering/RenderThemeMac.mm:
2965 2012-07-11 Robert Kroeger <rjkroege@chromium.org>
2967 Suppress horizontal conversion of PlatformWheelEvents when hasPreciseScrollingDeltas is true
2968 https://bugs.webkit.org/show_bug.cgi?id=89580
2970 WebKit GTK and Chromium Linux force vertical wheel events to
2971 scroll horizontally when over horizontal scroll bars. This is
2972 undesirable for touchpad scrolling with
2973 hasPreciseScrollingDeltas() == true. Modified shouldTurnVerticalTicksIntoHorizontal
2974 to not perform this conversion for PlatformWheelEvents with preciseScrollingDeltas.
2976 Reviewed by Adam Barth.
2978 Tests: fast/events/touch/gesture/touch-gesture-scroll-sideways.html
2980 * page/EventHandler.cpp:
2981 (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
2982 (WebCore::EventHandler::handleWheelEvent):
2983 * page/EventHandler.h:
2985 * page/chromium/EventHandlerChromium.cpp:
2986 (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
2987 * page/gtk/EventHandlerGtk.cpp:
2988 (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
2990 2012-07-11 Hayato Ito <hayato@chromium.org>
2992 Unreviewed gardening.
2993 Build fix for r122373.
2995 * platform/chromium/support/WebCompositorSharedQuadState.cpp:
2996 (WebKit::WebCompositorSharedQuadState::WebCompositorSharedQuadState):
2998 2012-07-11 Shinya Kawanaka <shinyak@chromium.org>
3000 SVGUseElement should not use Element::ensureShadowRoot().
3001 https://bugs.webkit.org/show_bug.cgi?id=90938
3003 Reviewed by Hajime Morita.
3005 We would like to remove Element::ensureShadowRoot() because we would like to stabilize the lifecycle of Shadow DOM.
3006 This patch rewrites SVGUseElement::create() not to use Element::ensureShadowRoot(). Since our convention to create
3007 a shadow subtree is to create a method createShadowSubtree(), I obeyed it.
3009 No new tests. Simple refactoring.
3011 * svg/SVGUseElement.cpp:
3012 (WebCore::SVGUseElement::create):
3013 (WebCore::SVGUseElement::createShadowSubtree):
3015 * svg/SVGUseElement.h:
3018 2012-07-11 Alexandre Elias <aelias@google.com>
3020 [chromium] Move compositor quads to Platform/chromium/public
3021 https://bugs.webkit.org/show_bug.cgi?id=90582
3023 Reviewed by Adrienne Walker.
3025 This moves CCSharedQuadState, CCDrawQuad, and all but two CC*DrawQuad
3026 classes to the WebKit namespace, as a first step to pushing them
3027 across the process boundary for the ubercompositor.
3029 - The intent is to serialize the class hierarchy using the same
3030 mechanism as WebInputEvent. In order to do this, there are three
3031 requirements: pure POD data, a method returning size, and a packing
3034 - Private data members are fine with this kind of serializer, and a
3035 default constructor is not needed. Because of that, we can maintain
3036 the same encapsulation and convenient APIs (behind
3037 WEBKIT_IMPLEMENTATION) as the original classes. To ease the
3038 transition, the original WebCore headers still exist and typedef to
3041 - However, SharedQuadState will be serialized using the normal
3042 IPC_STRUCT_TRAITS macro, so I made its members public. A custom
3043 serializer (on quad lists) will maintain the pointers from quads to
3046 - I converted the Material casting mechanism to materialCast() methods
3047 living in the derived classes. That way, the WebCompositorQuad header
3048 doesn't need to know about all its derived classes.
3050 - Quad classes not yet transitioned can still be used in
3051 non-ubercompositor mode. CCRenderPassDrawQuad and CCYUVVideoDrawQuad
3052 are currently non-POD and I left them in their original files.
3054 This approach is the best I've found so far, since it preserves all
3055 WebCore-facing APIs and avoids unnecessary code duplication (new quad
3056 types or members can be added by modifying only one place). There
3057 also should not be an unreasonable amount of custom serializer code
3060 No new tests. (No-op refactoring.)
3063 * platform/chromium/support/WebCompositorQuad.cpp: Added.
3065 (WebKit::WebCompositorQuad::WebCompositorQuad):
3066 (WebKit::WebCompositorQuad::opaqueRect):
3067 (WebKit::WebCompositorQuad::setQuadVisibleRect):
3068 (WebKit::WebCompositorQuad::size):
3069 * platform/chromium/support/WebCompositorSharedQuadState.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCSharedQuadState.cpp.
3071 (WebKit::WebCompositorSharedQuadState::WebCompositorSharedQuadState):
3072 (WebKit::WebCompositorSharedQuadState::create):
3073 (WebKit::WebCompositorSharedQuadState::isLayerAxisAlignedIntRect):
3074 * platform/chromium/support/WebCompositorSolidColorQuad.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCSolidColorDrawQuad.cpp.
3076 (WebKit::WebCompositorSolidColorQuad::create):
3077 (WebKit::WebCompositorSolidColorQuad::WebCompositorSolidColorQuad):
3078 (WebKit::WebCompositorSolidColorQuad::materialCast):
3079 * platform/chromium/support/WebCompositorTextureQuad.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCTextureDrawQuad.cpp.
3081 (WebKit::WebCompositorTextureQuad::create):
3082 (WebKit::WebCompositorTextureQuad::WebCompositorTextureQuad):
3083 (WebKit::WebCompositorTextureQuad::setNeedsBlending):
3084 (WebKit::WebCompositorTextureQuad::materialCast):
3085 * platform/graphics/chromium/LayerRendererChromium.cpp:
3086 (WebCore::LayerRendererChromium::drawQuad):
3087 * platform/graphics/chromium/LayerRendererChromium.h:
3088 * platform/graphics/chromium/cc/CCCheckerboardDrawQuad.cpp:
3089 (WebCore::CCCheckerboardDrawQuad::create):
3090 (WebCore::CCCheckerboardDrawQuad::CCCheckerboardDrawQuad):
3091 (WebCore::CCCheckerboardDrawQuad::materialCast):
3093 * platform/graphics/chromium/cc/CCCheckerboardDrawQuad.h:
3094 (CCCheckerboardDrawQuad):
3095 * platform/graphics/chromium/cc/CCDebugBorderDrawQuad.cpp:
3096 (WebCore::CCDebugBorderDrawQuad::create):
3097 (WebCore::CCDebugBorderDrawQuad::CCDebugBorderDrawQuad):
3098 (WebCore::CCDebugBorderDrawQuad::materialCast):
3100 * platform/graphics/chromium/cc/CCDebugBorderDrawQuad.h:
3101 (CCDebugBorderDrawQuad):
3102 * platform/graphics/chromium/cc/CCDrawQuad.cpp: Removed.
3103 * platform/graphics/chromium/cc/CCDrawQuad.h:
3105 * platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.cpp:
3106 (WebCore::CCIOSurfaceDrawQuad::create):
3107 (WebCore::CCIOSurfaceDrawQuad::CCIOSurfaceDrawQuad):
3108 (WebCore::CCIOSurfaceDrawQuad::materialCast):
3110 * platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.h:
3111 (CCIOSurfaceDrawQuad):
3112 * platform/graphics/chromium/cc/CCLayerImpl.h:
3114 * platform/graphics/chromium/cc/CCRenderPass.h:
3116 * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp:
3117 (WebCore::CCRenderPassDrawQuad::create):
3118 (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad):
3119 (WebCore::CCRenderPassDrawQuad::materialCast):
3121 * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h:
3122 (CCRenderPassDrawQuad):
3123 * platform/graphics/chromium/cc/CCRenderSurface.h:
3125 * platform/graphics/chromium/cc/CCSharedQuadState.h:
3127 * platform/graphics/chromium/cc/CCSolidColorDrawQuad.h:
3129 * platform/graphics/chromium/cc/CCStreamVideoDrawQuad.cpp:
3130 (WebCore::CCStreamVideoDrawQuad::create):
3131 (WebCore::CCStreamVideoDrawQuad::CCStreamVideoDrawQuad):
3132 (WebCore::CCStreamVideoDrawQuad::materialCast):
3134 * platform/graphics/chromium/cc/CCStreamVideoDrawQuad.h:
3135 (CCStreamVideoDrawQuad):
3136 * platform/graphics/chromium/cc/CCTextureDrawQuad.h:
3138 * platform/graphics/chromium/cc/CCTileDrawQuad.cpp:
3139 (WebCore::CCTileDrawQuad::create):
3140 (WebCore::CCTileDrawQuad::CCTileDrawQuad):
3141 (WebCore::CCTileDrawQuad::materialCast):
3143 * platform/graphics/chromium/cc/CCTileDrawQuad.h:
3145 * platform/graphics/chromium/cc/CCYUVVideoDrawQuad.cpp:
3146 (WebCore::CCYUVVideoDrawQuad::create):
3147 (WebCore::CCYUVVideoDrawQuad::CCYUVVideoDrawQuad):
3148 (WebCore::CCYUVVideoDrawQuad::materialCast):
3150 * platform/graphics/chromium/cc/CCYUVVideoDrawQuad.h:
3151 (CCYUVVideoDrawQuad):
3153 2012-07-11 Robert Kroeger <rjkroege@chromium.org>
3155 [chromium] [regression] Don't use ScrollByPrecisePixels on Chromium Mac.
3156 https://bugs.webkit.org/show_bug.cgi?id=91020
3158 Reviewed by Adam Barth.
3160 A change in https://bugs.webkit.org/show_bug.cgi?id=87535 to
3161 improve the operation of smooth scrolling incorrectly caused
3162 Chromium Mac to use the wrong scroll granularity on
3163 hasPreciseScrollingDeltas() == true wheelevent scrolls.
3164 Exclude the change on the Chromium Mac platform.
3166 * platform/ScrollAnimator.cpp:
3167 (WebCore::ScrollAnimator::handleWheelEvent): Adjusted #ifdef to exclude Chromium
3168 Mac from ScrollByPrecisePixels change.
3170 2012-07-11 Jia Pu <jpu@apple.com>
3172 On Mac, autocorrection sometimes fails to take place in Safari.
3173 https://bugs.webkit.org/show_bug.cgi?id=89982
3175 Reviewed by Ryosuke Niwa.
3177 We should check the value of shouldCheckForCorrection, not shouldShowCorrectionPanel, to determine if we should
3178 early return in markAndReplaceFor(). Also, since we don't want autocorrection to happen when we only change selection,
3179 not the content, so we shouldn't set TextCheckingTypeCorrection flag in markMisspellingsAndBadGrammar() as this function
3180 is triggered only by selection change.
3182 * editing/Editor.cpp:
3183 (WebCore::Editor::markAndReplaceFor):
3184 (WebCore::Editor::markMisspellingsAndBadGrammar):
3186 2012-07-11 Sheriff Bot <webkit.review.bot@gmail.com>
3188 Unreviewed, rolling out r122361.
3189 http://trac.webkit.org/changeset/122361
3190 https://bugs.webkit.org/show_bug.cgi?id=91027
3192 Broke Windows build and fast/forms/state-restore-broken-
3193 state.html (Requested by rniwa on #webkit).
3195 * testing/Internals.idl:
3197 2012-07-10 Simon Fraser <simon.fraser@apple.com>
3199 Assertion ASSERTION FAILED: enclosingIntRect(rendererMappedResult) == enclosingIntRect(FloatQuad(result).boundingBox()) when compositing in paginated mode
3200 https://bugs.webkit.org/show_bug.cgi?id=90919
3202 Reviewed by Antti Koivisto.
3204 r121124 added a fast path for geometry mapping that goes via layers
3205 when possible. However, this broke paginated pages, which put
3206 the root (RenderView) layer into column mode, because it failed
3207 to check for columns on the ancestor layer.
3209 Rather than make a risky change to convertToLayerCoords(), add a local
3210 function canMapViaLayer(), which is like RenderLayer::canUseConvertToLayerCoords(),
3211 but doesn't check for compositing (compositing itself is not a reason
3212 to avoid convertToLayerCoords). Call canMapViaLayer() with the ancestorLayer
3213 to check whether the ancestor has columns, which fixes the bug.
3215 Test: compositing/columns/geometry-map-paginated-assert.html
3217 * rendering/RenderGeometryMap.cpp:
3218 (WebCore::canMapViaLayer):
3219 (WebCore::RenderGeometryMap::pushMappingsToAncestor):
3221 2012-07-11 Dana Jansens <danakj@chromium.org>
3223 [chromium] Rename layerRect to contentRect for rects that live in content space
3224 https://bugs.webkit.org/show_bug.cgi?id=90843
3226 Reviewed by Adrienne Walker.
3228 Dropped the layerTransform() from CCSharedQuadState, as nothing should be
3229 using it to draw with. RenderPasses need a weird drawTransform right now
3230 which was stored in layerTransform, so moved this to the RenderPass quad.
3232 No new tests. No change in behaviour.
3234 * platform/graphics/chromium/CanvasLayerTextureUpdater.cpp:
3235 (WebCore::CanvasLayerTextureUpdater::paintContents):
3236 * platform/graphics/chromium/ContentLayerChromium.cpp:
3237 (WebCore::ContentLayerChromium::update):
3238 (WebCore::ContentLayerChromium::needMoreUpdates):
3239 * platform/graphics/chromium/ImageLayerChromium.cpp:
3240 (WebCore::ImageLayerChromium::update):
3241 * platform/graphics/chromium/LayerChromium.cpp:
3242 (WebCore::LayerChromium::visibleContentOpaqueRegion):
3243 * platform/graphics/chromium/LayerChromium.h:
3244 (WebCore::LayerChromium::visibleContentRect):
3245 (WebCore::LayerChromium::setVisibleContentRect):
3247 * platform/graphics/chromium/LayerRendererChromium.cpp:
3248 (WebCore::LayerRendererChromium::drawRenderPassQuad):
3249 (WebCore::LayerRendererChromium::drawTileQuad):
3250 (WebCore::LayerRendererChromium::drawYUVVideoQuad):
3251 (WebCore::LayerRendererChromium::drawStreamVideoQuad):
3252 (WebCore::LayerRendererChromium::drawIOSurfaceQuad):
3253 * platform/graphics/chromium/TiledLayerChromium.cpp:
3254 (WebCore::TiledLayerChromium::updateBounds):
3255 (WebCore::TiledLayerChromium::setNeedsDisplayRect):
3256 (WebCore::TiledLayerChromium::invalidateContentRect):
3257 (WebCore::TiledLayerChromium::updateTiles):
3258 (WebCore::TiledLayerChromium::setTexturePriorities):
3259 (WebCore::TiledLayerChromium::setTexturePrioritiesInRect):
3260 (WebCore::TiledLayerChromium::visibleContentOpaqueRegion):
3261 (WebCore::TiledLayerChromium::updateContentRect):
3262 (WebCore::TiledLayerChromium::needsIdlePaint):
3263 (WebCore::TiledLayerChromium::idlePaintRect):
3264 * platform/graphics/chromium/TiledLayerChromium.h:
3265 (TiledLayerChromium):
3266 * platform/graphics/chromium/cc/CCDrawQuad.h:
3267 (WebCore::CCDrawQuad::visibleContentRect):
3268 * platform/graphics/chromium/cc/CCLayerImpl.cpp:
3269 (WebCore::CCLayerImpl::createSharedQuadState):
3270 (WebCore::CCLayerImpl::appendDebugBorderQuad):
3271 (WebCore::CCLayerImpl::visibleContentOpaqueRegion):
3272 * platform/graphics/chromium/cc/CCLayerImpl.h:
3273 (WebCore::CCLayerImpl::visibleContentRect):
3274 (WebCore::CCLayerImpl::setVisibleContentRect):
3276 * platform/graphics/chromium/cc/CCLayerTilingData.cpp:
3277 (WebCore::CCLayerTilingData::contentRectToTileIndices):
3278 (WebCore::CCLayerTilingData::opaqueRegionInContentRect):
3279 (WebCore::CCLayerTilingData::setBounds):
3280 * platform/graphics/chromium/cc/CCLayerTilingData.h:
3281 (CCLayerTilingData):
3282 * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
3283 (WebCore::calculateVisibleContentRect):
3284 (WebCore::layerShouldBeSkipped):
3286 (WebCore::calculateVisibleAndScissorRectsInternal):
3287 * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3288 (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
3289 * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
3290 (WebCore::addOcclusionBehindLayer):
3291 * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp:
3292 (WebCore::CCRenderPassDrawQuad::create):
3293 (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad):
3294 * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h:
3295 (CCRenderPassDrawQuad):
3296 (WebCore::CCRenderPassDrawQuad::drawTransform):
3297 * platform/graphics/chromium/cc/CCRenderSurface.cpp:
3298 (WebCore::CCRenderSurface::createSharedQuadState):
3299 (WebCore::CCRenderSurface::createReplicaSharedQuadState):
3300 (WebCore::CCRenderSurface::appendQuads):
3301 * platform/graphics/chromium/cc/CCSharedQuadState.cpp:
3302 (WebCore::CCSharedQuadState::create):
3303 (WebCore::CCSharedQuadState::CCSharedQuadState):
3304 (WebCore::CCSharedQuadState::isLayerAxisAlignedIntRect):
3305 * platform/graphics/chromium/cc/CCSharedQuadState.h:
3306 (CCSharedQuadState):
3307 (WebCore::CCSharedQuadState::visibleContentRect):
3308 * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
3309 (WebCore::CCTiledLayerImpl::appendQuads):
3310 (WebCore::CCTiledLayerImpl::visibleContentOpaqueRegion):
3312 2012-07-11 Chris Fleizach <cfleizach@apple.com>
3314 ARIA spinbutton role incorrectly mapped to ProgressIndicatorRole
3315 https://bugs.webkit.org/show_bug.cgi?id=77298
3317 Reviewed by Anders Carlsson.
3319 * accessibility/AccessibilityObject.cpp:
3320 (WebCore::createARIARoleMap):
3322 2012-07-11 Huang Dongsung <luxtella@company100.net>
3324 BitmapImage::frameIsCompleteAtIndex() must return false if ImageDecoder is not initialized.
3325 https://bugs.webkit.org/show_bug.cgi?id=90757
3327 Reviewed by Simon Fraser.
3329 The current code fortunately has worked so far because only
3330 BitmapImage::startAnimation calls frameIsCompleteAtIndex, and startAnimation
3331 cannot call frameIsCompleteAtIndex if ImageDecoder is not yet initialized.
3332 startAnimation returns at the first line becase shouldAnimate() always return
3335 if (m_frameTimer || !shouldAnimate() || frameCount() <= 1)
3338 This change is needed because parallel image decoders call
3339 BitmapImage::frameIsCompleteAtIndex in other places too.
3341 No new tests, manually tested whether the caller exists or not that
3342 calls BitmapImage::frameIsCompleteAtIndex() before ImageDecoder is
3345 * platform/graphics/BitmapImage.cpp:
3346 (WebCore::BitmapImage::frameIsCompleteAtIndex):
3348 2012-07-11 Kevin Ollivier <kevino@theolliviers.com>
3350 [wx] Unreviewed build fix. Update code to use the new constant name.
3352 * platform/wx/PasteboardWx.cpp:
3353 (WebCore::Pasteboard::documentFragment):
3355 2012-07-11 Kevin Ollivier <kevino@theolliviers.com>
3357 [wx] Unreviewed build fix. Ignore array and sequence types for attributes as well
3358 as functions since the CPP bindings do not yet support them.
3360 * bindings/scripts/CodeGeneratorCPP.pm:
3363 2012-07-11 Kevin Ollivier <kevino@theolliviers.com>
3365 [wx] Unreviewed build fix. Use DOMStringList instead of DOMString[] for in / out type.
3367 * testing/Internals.idl:
3369 2012-07-11 Dana Jansens <danakj@chromium.org>
3371 [chromium] Minimum size used for occlusion tracking should be a setting on CCLayerTreeHost
3372 https://bugs.webkit.org/show_bug.cgi?id=90993
3374 Reviewed by Adrienne Walker.
3376 Move the default minimum size used for occlusion tracking from the
3377 CCOcclusionTracker class into CCLayerTreeSettings. This value is then
3378 used on both threads as the lower limit for any occlusion to be
3381 This allows us to use (0, 0) as the minimum size for tests, allowing all
3382 occlusion to be tracked.
3384 * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3385 (WebCore::CCLayerTreeHost::paintLayerContents):
3386 * platform/graphics/chromium/cc/CCLayerTreeHost.h:
3387 (WebCore::CCLayerTreeSettings::CCLayerTreeSettings):
3388 (CCLayerTreeSettings):
3389 * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3390 (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
3391 * platform/graphics/chromium/cc/CCOcclusionTracker.h:
3393 2012-07-11 Anders Carlsson <andersca@apple.com>
3395 Add -Wtautological-compare and -Wsign-compare warning flags
3396 https://bugs.webkit.org/show_bug.cgi?id=90994
3398 Reviewed by Mark Rowe.
3400 * Configurations/Base.xcconfig:
3402 2012-07-11 Dean Jackson <dino@apple.com>
3404 TileCache layers have wrong border debug color
3405 https://bugs.webkit.org/show_bug.cgi?id=90922
3407 Reviewed by Simon Fraser.
3409 Commit r122152 updated the layer hierarchy when a tile