1 2013-02-12 Joseph Pecoraro <pecoraro@apple.com>
3 [iOS] Enable PAGE_VISIBILITY_API
4 https://bugs.webkit.org/show_bug.cgi?id=109399
6 Reviewed by David Kilzer.
8 * Configurations/FeatureDefines.xcconfig:
10 2013-02-12 Andreas Kling <akling@apple.com>
12 Move ElementAttributeData into Element.cpp/h
13 <http://webkit.org/b/109610>
15 Reviewed by Anders Carlsson.
17 Removed ElementAttributeData.cpp/h and moved the class itself into Element headquarters.
18 In the near future, Element should be the only client of this class, and thus it won't
19 be necessary for other classes to know anything about it.
21 * dom/ElementAttributeData.cpp: Removed.
22 * dom/ElementAttributeData.h: Removed.
24 * GNUmakefile.list.am:
27 * WebCore.xcodeproj/project.pbxproj:
28 * dom/DOMAllInOne.cpp:
29 * dom/DocumentSharedObjectPool.cpp:
32 * workers/SharedWorker.cpp:
33 * Modules/webdatabase/DatabaseManager.cpp: Add ExceptionCode.h since Element.h doesn't pull it in anymore.
35 2013-02-12 Simon Fraser <simon.fraser@apple.com>
37 Crash when scrolling soon after page starts loading
38 https://bugs.webkit.org/show_bug.cgi?id=109631
39 <rdar://problem/13157533&13159627&13196727>
41 Reviewed by Anders Carlsson.
43 Make the scrolling tree more robust when the root state node,
44 and/or scrolling node are null. This can happen if we try to
45 handle a wheel event before we've done the first scrolling
48 * page/scrolling/ScrollingStateTree.cpp:
49 (WebCore::ScrollingStateTree::commit): Handle the case where
50 m_rootStateNode is null. We'll still commit, but the state tree
51 will have no state nodes.
52 * page/scrolling/ScrollingTree.cpp:
53 (WebCore::ScrollingTree::handleWheelEvent): Null-check m_rootNode.
54 (WebCore::ScrollingTree::commitNewTreeState): Handle a null root node.
55 (WebCore::ScrollingTree::updateTreeFromStateNode): If the rood state node
56 is null, just clear the map and null out the root scrolling node.
57 * page/scrolling/ScrollingTree.h: m_debugInfoLayer was unused.
58 * page/scrolling/mac/ScrollingCoordinatorMac.mm:
59 (WebCore::ScrollingCoordinatorMac::ensureRootStateNodeForFrameView): It may be possible
60 to get here before we've registered the root scroll layer, in which case scrollLayerID()
61 will be 0. Assert to see if this can ever happen.
62 (WebCore::ScrollingCoordinatorMac::scrollingStateTreeAsText): Handle case of rootStateNode()
65 2013-02-12 Raymond Toy <rtoy@google.com>
67 Synchronize setting of panner node model and processing
68 https://bugs.webkit.org/show_bug.cgi?id=109599
70 Reviewed by Chris Rogers.
74 * Modules/webaudio/PannerNode.cpp:
75 (WebCore::PannerNode::process):
76 (WebCore::PannerNode::setPanningModel):
77 * Modules/webaudio/PannerNode.h:
79 2013-02-12 Dean Jackson <dino@apple.com>
81 Add class name for snapshotted plugin based on dimensions
82 https://bugs.webkit.org/show_bug.cgi?id=108369
84 Reviewed by Simon Fraser.
86 As the size of the plugin changes, the Shadow Root for the snapshot
87 might want to toggle different interfaces. Expose "tiny", "small",
88 "medium" and "large" classes on the Shadow. (The dimensions are
89 currently chosen fairly arbitrarily).
91 Because we only know the dimensions after layout, we set up
92 a post layout task to add the class. Luckily there already was
93 a post layout task for plugins - I just updated it to handle
94 both real and snapshotted plugins. This involved modifying
95 the list of RenderEmbeddedObjects in FrameView to take generic
96 RenderObjects, and decide which type they are when calling
99 * html/HTMLPlugInImageElement.cpp: Some new dimensions for the various size thresholds.
100 (WebCore::classNameForShadowRootSize): New static function that returns a class name
101 after examining the size of the object.
102 (WebCore::HTMLPlugInImageElement::updateSnapshotInfo): Sets the class name for
103 the shadow root. This is called in the post layout task.
104 (WebCore::shouldPlugInShowLabelAutomatically): Use new size names.
105 (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Ditto.
106 * html/HTMLPlugInImageElement.h:
107 (HTMLPlugInImageElement): New method updateSnapshotInfo.
109 * page/FrameView.cpp:
110 (WebCore::FrameView::addWidgetToUpdate): Change RenderEmbeddedObject* to RenderObject*.
111 (WebCore::FrameView::removeWidgetToUpdate): Ditto
112 (WebCore::FrameView::updateWidget): Branch based on EmbeddedObject vs SnapshottedPlugIn. Call
113 plugin snapshot update if necessary.
114 (WebCore::FrameView::updateWidgets): Handle both EmbeddedObject and SnapshottedPlugIn cases.
115 * page/FrameView.h: Change RenderEmbeddedObject* to RenderObject* for post layout widget updates.
117 * rendering/RenderSnapshottedPlugIn.cpp:
118 (WebCore::RenderSnapshottedPlugIn::layout): New virtual override. If size has changed, ask the
119 FrameView to recalculate size after layout.
120 * rendering/RenderSnapshottedPlugIn.h: New layout() method.
122 2013-02-12 Mike West <mkwst@chromium.org>
124 Implement script MIME restrictions for X-Content-Type-Options: nosniff
125 https://bugs.webkit.org/show_bug.cgi?id=71851
127 Reviewed by Adam Barth.
129 This patch adds support for 'X-Content-Type-Options: nosniff' when
130 deciding whether or not to execute a given chunk of JavaScript. If the
131 header is present, script will only execute if it matches a predefined
132 set of MIME types[1] that are deemed "executable". Scripts served with
133 types that don't match the list will not execute.
135 IE introduced this feature, and Gecko is working on an implementation[2]
136 now. There's been some discussion on the WHATWG list about formalizing
137 the specification for this feature[3], but nothing significant has been
140 This implementation's list of acceptible MIME types differs from IE's:
141 it matches the list of supported JavaScript MIME types defined in
142 MIMETypeRegistry::initializeSupportedJavaScriptMIMETypes()[4]. In
143 particular, the VBScript types are not accepted, and
144 'text/javascript1.{1,2,3}' are accepted, along with 'text/livescript'.
146 This feature is locked tightly behind the ENABLE_NOSNIFF flag, which is
147 currently only enabled on the Chromium port.
149 [1]: http://msdn.microsoft.com/en-us/library/gg622941(v=vs.85).aspx
150 [2]: https://bugzilla.mozilla.org/show_bug.cgi?id=471020
151 [3]: http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-November/037974.html
152 [4]: http://trac.webkit.org/browser/trunk/Source/WebCore/platform/MIMETypeRegistry.cpp?rev=142086#L307
154 Tests: http/tests/security/contentTypeOptions/invalid-content-type-options-allowed.html
155 http/tests/security/contentTypeOptions/nosniff-script-allowed.html
156 http/tests/security/contentTypeOptions/nosniff-script-blocked.html
157 http/tests/security/contentTypeOptions/nosniff-script-without-content-type-allowed.html
159 * dom/ScriptElement.cpp:
160 (WebCore::ScriptElement::executeScript):
161 Before executing script, ensure that it shouldn't be blocked due to
162 its MIME type. If it is blocked, write an error message to the
164 * loader/cache/CachedScript.cpp:
165 (WebCore::CachedScript::mimeType):
166 Make scripts' MIME type available outside the context of
167 CachedScript in order to correctly populate error messages we write
168 to the console in ScriptElement::executeScript
170 (WebCore::CachedScript::mimeTypeAllowedByNosniff):
171 * loader/cache/CachedScript.h:
173 A new method which checks the resource's HTTP headers to set the
174 'nosniff' disposition, and compares the resource's MIME type against
175 the list of allowed executable types. Returns true iff the script
177 * platform/network/HTTPParsers.cpp:
179 (WebCore::parseContentTypeOptionsHeader):
180 * platform/network/HTTPParsers.h:
181 Adds a new enum which relates the sniffable status of the resource,
182 and a method to parse the HTTP header.
184 2013-02-12 Adam Barth <abarth@webkit.org>
186 Threaded HTML parser should pass the remaining fast/tokenizer tests
187 https://bugs.webkit.org/show_bug.cgi?id=109607
189 Reviewed by Eric Seidel.
191 This patch fixes some edge cases involving document.write. Previously,
192 we would drop input characters on the floor if the tokenizer wasn't
193 able to consume them synchronously. In this patch, we send the unparsed
194 characters to the background thread for consumption after rewinding the
197 * html/parser/BackgroundHTMLInputStream.cpp:
198 (WebCore::BackgroundHTMLInputStream::rewindTo):
199 * html/parser/BackgroundHTMLInputStream.h:
200 (BackgroundHTMLInputStream):
201 * html/parser/BackgroundHTMLParser.cpp:
202 (WebCore::BackgroundHTMLParser::resumeFrom):
203 * html/parser/BackgroundHTMLParser.h:
205 * html/parser/HTMLDocumentParser.cpp:
206 (WebCore::HTMLDocumentParser::canTakeNextToken):
207 (WebCore::HTMLDocumentParser::didFailSpeculation):
208 (WebCore::HTMLDocumentParser::pumpTokenizer):
209 (WebCore::HTMLDocumentParser::finish):
210 * html/parser/HTMLInputStream.h:
211 (WebCore::HTMLInputStream::closeWithoutMarkingEndOfFile):
214 2013-02-12 Csaba Osztrogonác <ossy@webkit.org>
216 Unreviewed buildfix for !ENABLE(INSPECTOR) platforms after r142654.
218 * inspector/InspectorInstrumentation.h:
219 (WebCore::InspectorInstrumentation::scriptsEnabled):
221 2013-02-12 Christophe Dumez <ch.dumez@sisa.samsung.com>
223 Remove remaining traces of Web Intents
224 https://bugs.webkit.org/show_bug.cgi?id=109586
226 Reviewed by Eric Seidel.
228 Remove remaining traces of Web Intents as the functionality was
231 No new tests, no behavior change for layout tests.
233 * GNUmakefile.features.am.in:
234 * html/HTMLTagNames.in:
236 2013-02-12 Robert Hogan <robert@webkit.org>
238 REGRESSION(r136967): Combination of float and clear yields to bad layout
239 https://bugs.webkit.org/show_bug.cgi?id=109476
241 Reviewed by Levi Weintraub.
243 Test: fast/block/margin-collapse/self-collapsing-block-with-float-children.html
245 The change made at http://trac.webkit.org/changeset/136967 only needs to worry about the first floated
246 child of a self-collapsing block. The ones that follow are not affected by its margins.
248 * rendering/RenderBlockLineLayout.cpp:
249 (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
251 2013-02-12 Levi Weintraub <leviw@chromium.org>
253 ASSERTION FAILED: !object || object->isBox(), UNKNOWN in WebCore::RenderListItem::positionListMarker
254 https://bugs.webkit.org/show_bug.cgi?id=108699
256 Reviewed by Abhishek Arya.
258 RenderListItems performs special management of its children to maintain list markers. Splitting a flow
259 through a list item results in assumptions made inside RenderListItem failing, so for now, avoid splitting
260 flows when inside one.
262 Test: fast/multicol/span/list-multi-column-crash.html
264 * rendering/RenderBlock.cpp:
265 (WebCore::RenderBlock::containingColumnsBlock):
267 2013-02-12 Roger Fong <roger_fong@apple.com>
269 Unreviewed Windows build fix.
271 * testing/Internals.cpp:
272 (WebCore::Internals::resetToConsistentState):
273 (WebCore::Internals::Internals):
275 2013-02-12 Vivek Galatage <vivek.vg@samsung.com>
277 Web Inspector: JavaScript execution disabled by browser/UA should be notified to the front-end
278 https://bugs.webkit.org/show_bug.cgi?id=109402
280 Reviewed by Yury Semikhatsky.
282 Whenever the UA/Browser changes the Script Execution state of a page, it should notify the
283 inspector front-end. Added the InspectorInstrumentation method didScriptExecutionStateChange
284 to achieve this. Also the state change triggered by the inspector should be ignored to avoid
287 Test: inspector/script-execution-state-change-notification.html
289 * inspector/Inspector.json:
290 * inspector/InspectorInstrumentation.cpp:
292 (WebCore::InspectorInstrumentation::scriptsEnabledImpl):
293 * inspector/InspectorInstrumentation.h:
294 (InspectorInstrumentation):
295 (WebCore::InspectorInstrumentation::scriptsEnabled):
297 * inspector/InspectorPageAgent.cpp:
298 (WebCore::InspectorPageAgent::InspectorPageAgent):
299 (WebCore::InspectorPageAgent::setScriptExecutionDisabled):
300 (WebCore::InspectorPageAgent::scriptsEnabled):
302 * inspector/InspectorPageAgent.h:
303 (InspectorPageAgent):
304 * inspector/front-end/ResourceTreeModel.js:
305 (WebInspector.PageDispatcher.prototype.javascriptDialogClosed):
306 (WebInspector.PageDispatcher.prototype.scriptsEnabled):
308 (WebCore::Settings::setScriptEnabled):
310 2013-02-12 Antti Koivisto <antti@apple.com>
312 Cache timer heap pointer to timers
313 https://bugs.webkit.org/show_bug.cgi?id=109597
315 Reviewed by Andreas Kling.
317 Accessing timer heap through thread global storage is slow (~0.1% in PLT3). We can cache the heap pointer to
318 each TimerBase. There are not huge numbers of timers around so memory is not an issue and many timers are heavily reused.
320 * platform/Timer.cpp:
321 (WebCore::threadGlobalTimerHeap):
322 (WebCore::TimerHeapReference::operator=):
323 (WebCore::TimerHeapIterator::checkConsistency):
324 (WebCore::TimerBase::TimerBase):
325 (WebCore::TimerBase::checkHeapIndex):
326 (WebCore::TimerBase::setNextFireTime):
328 (WebCore::TimerBase::timerHeap):
331 2013-02-12 Adam Barth <abarth@webkit.org>
333 BackgroundHTMLParser::resumeFrom should take a struct
334 https://bugs.webkit.org/show_bug.cgi?id=109598
336 Reviewed by Eric Seidel.
338 This patch is purely a syntatic change that paves the way for fixing
339 the partial-entity document.write tests. To fix those tests, we'll need
340 to pass more information to resumeFrom, but we're hitting the argument
341 limits in Functional.h. Rather than adding yet more arguments, this
342 patch moves to a single argument that's a struct.
344 * html/parser/BackgroundHTMLParser.cpp:
345 (WebCore::BackgroundHTMLParser::resumeFrom):
346 * html/parser/BackgroundHTMLParser.h:
348 (BackgroundHTMLParser):
349 * html/parser/HTMLDocumentParser.cpp:
350 (WebCore::HTMLDocumentParser::didFailSpeculation):
352 2013-02-12 Elliott Sprehn <esprehn@chromium.org>
354 rootRenderer in FrameView is really RenderView
355 https://bugs.webkit.org/show_bug.cgi?id=109510
357 Reviewed by Eric Seidel.
359 The global function rootRenderer(FrameView*) is really just a way
360 to get the RenderView from the Frame so replace it with a renderView()
361 method and replace usage of the word "root" with renderView so it's
362 obvious the root we're talking about is the renderView. This is an
363 important distinction to make since we also have rootRenderer in the code
364 for the documentElement()'s renderer and we also have a "layout root" which
365 is entirely different.
367 No new tests, just refactoring.
369 * page/FrameView.cpp:
370 (WebCore::FrameView::rootRenderer): Removed.
371 (WebCore::FrameView::setFrameRect):
372 (WebCore::FrameView::adjustViewSize):
373 (WebCore::FrameView::updateCompositingLayersAfterStyleChange):
374 (WebCore::FrameView::updateCompositingLayersAfterLayout):
375 (WebCore::FrameView::clearBackingStores):
376 (WebCore::FrameView::restoreBackingStores):
377 (WebCore::FrameView::usesCompositedScrolling):
378 (WebCore::FrameView::layerForHorizontalScrollbar):
379 (WebCore::FrameView::layerForVerticalScrollbar):
380 (WebCore::FrameView::layerForScrollCorner):
381 (WebCore::FrameView::tiledBacking):
382 (WebCore::FrameView::scrollLayerID):
383 (WebCore::FrameView::layerForOverhangAreas):
384 (WebCore::FrameView::flushCompositingStateForThisFrame):
385 (WebCore::FrameView::hasCompositedContent):
386 (WebCore::FrameView::enterCompositingMode):
387 (WebCore::FrameView::isSoftwareRenderable):
388 (WebCore::FrameView::didMoveOnscreen):
389 (WebCore::FrameView::willMoveOffscreen):
390 (WebCore::FrameView::layout):
391 (WebCore::FrameView::embeddedContentBox):
392 (WebCore::FrameView::contentsInCompositedLayer):
393 (WebCore::FrameView::scrollContentsFastPath):
394 (WebCore::FrameView::scrollContentsSlowPath):
395 (WebCore::FrameView::maintainScrollPositionAtAnchor):
396 (WebCore::FrameView::scrollPositionChanged):
397 (WebCore::FrameView::repaintFixedElementsAfterScrolling):
398 (WebCore::FrameView::updateFixedElementsAfterScrolling):
399 (WebCore::FrameView::visibleContentsResized):
400 (WebCore::FrameView::scheduleRelayoutOfSubtree):
401 (WebCore::FrameView::needsLayout):
402 (WebCore::FrameView::setNeedsLayout):
403 (WebCore::FrameView::performPostLayoutTasks):
404 (WebCore::FrameView::updateControlTints):
405 (WebCore::FrameView::paintContents):
406 (WebCore::FrameView::forceLayoutForPagination):
407 (WebCore::FrameView::adjustPageHeightDeprecated):
408 (WebCore::FrameView::resetTrackedRepaints):
409 (WebCore::FrameView::isVerticalDocument):
410 (WebCore::FrameView::isFlippedDocument):
412 (WebCore::FrameView::renderView): Added.
414 2013-02-12 Tomas Popela <tpopela@redhat.com>
416 [GTK][Introspection] GObject bindings for DataTransferItemList - one add() method must be removed from .idl
417 https://bugs.webkit.org/show_bug.cgi?id=109180
419 Reviewed by Xan Lopez.
421 When compiling WebKit with --enable-introspection and generating GObject bindings
422 for DataTransferItemList we must disable one add() method, because GObject is
423 based on C and C does not allow two functions with the same name.
427 * bindings/scripts/CodeGeneratorGObject.pm:
429 2013-02-12 Uday Kiran <udaykiran@motorola.com>
431 Background size width specified in viewport percentage units not working
432 https://bugs.webkit.org/show_bug.cgi?id=109536
434 Reviewed by Antti Koivisto.
436 Corrected the check for viewport percentage unit while calculating
437 background image width.
439 Test: fast/backgrounds/size/backgroundSize-viewportPercentage-width.html
441 * rendering/RenderBoxModelObject.cpp:
442 (WebCore::RenderBoxModelObject::calculateFillTileSize):
444 2013-02-12 Abhishek Arya <inferno@chromium.org>
446 Heap-use-after-free in WebCore::DeleteButtonController::enable
447 https://bugs.webkit.org/show_bug.cgi?id=109447
449 Reviewed by Ryosuke Niwa.
451 RefPtr frame pointer since it can get deleted due to mutation events
452 fired inside AppendNodeCommand::doUnapply.
454 No new tests. Testcase is hard to minimize due to recursive
455 calls with DOMNodeRemovedFromDocument mutation event.
457 * editing/CompositeEditCommand.cpp:
458 (WebCore::EditCommandComposition::unapply):
459 (WebCore::EditCommandComposition::reapply):
461 2013-02-12 Eric Seidel <eric@webkit.org>
463 Remove HTMLTokenTypes header (and split out AtomicHTMLToken.h from HTMLToken.h)
464 https://bugs.webkit.org/show_bug.cgi?id=109525
466 Reviewed by Adam Barth.
468 We no longer need a separate HTMLTokenTypes class now that NEW_XML is gone.
469 However, to remove HTMLTokenTypes, I had to split AtomicHTMLToken.h from
470 HTMLToken.h (to fix a circular dependancy).
472 * GNUmakefile.list.am:
475 * WebCore.vcproj/WebCore.vcproj:
476 * WebCore.vcxproj/WebCore.vcxproj:
477 * WebCore.vcxproj/WebCore.vcxproj.filters:
478 * WebCore.xcodeproj/project.pbxproj:
479 * html/HTMLViewSourceDocument.cpp:
480 (WebCore::HTMLViewSourceDocument::addSource):
481 * html/parser/AtomicHTMLToken.h: Added.
484 (WebCore::AtomicHTMLToken::create):
485 (WebCore::AtomicHTMLToken::forceQuirks):
486 (WebCore::AtomicHTMLToken::type):
487 (WebCore::AtomicHTMLToken::name):
488 (WebCore::AtomicHTMLToken::setName):
489 (WebCore::AtomicHTMLToken::selfClosing):
490 (WebCore::AtomicHTMLToken::getAttributeItem):
491 (WebCore::AtomicHTMLToken::attributes):
492 (WebCore::AtomicHTMLToken::characters):
493 (WebCore::AtomicHTMLToken::charactersLength):
494 (WebCore::AtomicHTMLToken::isAll8BitData):
495 (WebCore::AtomicHTMLToken::comment):
496 (WebCore::AtomicHTMLToken::publicIdentifier):
497 (WebCore::AtomicHTMLToken::systemIdentifier):
498 (WebCore::AtomicHTMLToken::clearExternalCharacters):
499 (WebCore::AtomicHTMLToken::AtomicHTMLToken):
500 (WebCore::AtomicHTMLToken::initializeAttributes):
501 * html/parser/BackgroundHTMLParser.cpp:
502 (WebCore::BackgroundHTMLParser::simulateTreeBuilder):
503 * html/parser/CompactHTMLToken.cpp:
504 (WebCore::CompactHTMLToken::CompactHTMLToken):
505 * html/parser/CompactHTMLToken.h:
506 (WebCore::CompactHTMLToken::type):
507 * html/parser/HTMLConstructionSite.cpp:
508 (WebCore::HTMLConstructionSite::insertDoctype):
509 (WebCore::HTMLConstructionSite::insertComment):
510 (WebCore::HTMLConstructionSite::insertCommentOnDocument):
511 (WebCore::HTMLConstructionSite::insertCommentOnHTMLHtmlElement):
512 (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement):
513 (WebCore::HTMLConstructionSite::insertForeignElement):
514 * html/parser/HTMLDocumentParser.cpp:
515 (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
516 (WebCore::HTMLDocumentParser::constructTreeFromHTMLToken):
517 * html/parser/HTMLDocumentParser.h:
518 * html/parser/HTMLMetaCharsetParser.cpp:
519 (WebCore::HTMLMetaCharsetParser::checkForMetaCharset):
520 * html/parser/HTMLPreloadScanner.cpp:
521 (WebCore::isStartTag):
522 (WebCore::isStartOrEndTag):
523 (WebCore::HTMLPreloadScanner::processToken):
524 * html/parser/HTMLSourceTracker.cpp:
525 (WebCore::HTMLSourceTracker::start):
526 (WebCore::HTMLSourceTracker::sourceForToken):
527 * html/parser/HTMLStackItem.h:
528 (WebCore::HTMLStackItem::HTMLStackItem):
529 * html/parser/HTMLToken.h:
530 (WebCore::HTMLToken::clear):
531 (WebCore::HTMLToken::isUninitialized):
532 (WebCore::HTMLToken::type):
533 (WebCore::HTMLToken::makeEndOfFile):
534 (WebCore::HTMLToken::data):
535 (WebCore::HTMLToken::name):
536 (WebCore::HTMLToken::appendToName):
537 (WebCore::HTMLToken::forceQuirks):
538 (WebCore::HTMLToken::setForceQuirks):
539 (WebCore::HTMLToken::beginDOCTYPE):
540 (WebCore::HTMLToken::publicIdentifier):
541 (WebCore::HTMLToken::systemIdentifier):
542 (WebCore::HTMLToken::setPublicIdentifierToEmptyString):
543 (WebCore::HTMLToken::setSystemIdentifierToEmptyString):
544 (WebCore::HTMLToken::appendToPublicIdentifier):
545 (WebCore::HTMLToken::appendToSystemIdentifier):
546 (WebCore::HTMLToken::selfClosing):
547 (WebCore::HTMLToken::setSelfClosing):
548 (WebCore::HTMLToken::beginStartTag):
549 (WebCore::HTMLToken::beginEndTag):
550 (WebCore::HTMLToken::addNewAttribute):
551 (WebCore::HTMLToken::appendToAttributeName):
552 (WebCore::HTMLToken::appendToAttributeValue):
553 (WebCore::HTMLToken::attributes):
554 (WebCore::HTMLToken::eraseValueOfAttribute):
555 (WebCore::HTMLToken::ensureIsCharacterToken):
556 (WebCore::HTMLToken::characters):
557 (WebCore::HTMLToken::appendToCharacter):
558 (WebCore::HTMLToken::comment):
559 (WebCore::HTMLToken::beginComment):
560 (WebCore::HTMLToken::appendToComment):
561 (WebCore::HTMLToken::eraseCharacters):
563 * html/parser/HTMLTokenTypes.h: Removed.
564 * html/parser/HTMLTokenizer.cpp:
565 (WebCore::AtomicHTMLToken::usesName):
566 (WebCore::AtomicHTMLToken::usesAttributes):
567 (WebCore::HTMLTokenizer::flushBufferedEndTag):
568 (WebCore::HTMLTokenizer::nextToken):
569 * html/parser/HTMLTokenizer.h:
570 (WebCore::HTMLTokenizer::saveEndTagNameIfNeeded):
571 (WebCore::HTMLTokenizer::haveBufferedCharacterToken):
572 * html/parser/HTMLTreeBuilder.cpp:
573 (WebCore::HTMLTreeBuilder::processToken):
574 (WebCore::HTMLTreeBuilder::processDoctypeToken):
575 (WebCore::HTMLTreeBuilder::processFakeStartTag):
576 (WebCore::HTMLTreeBuilder::processFakeEndTag):
577 (WebCore::HTMLTreeBuilder::processFakePEndTagIfPInButtonScope):
578 (WebCore::HTMLTreeBuilder::processIsindexStartTagForInBody):
580 (WebCore::HTMLTreeBuilder::processStartTagForInBody):
581 (WebCore::HTMLTreeBuilder::processStartTagForInTable):
582 (WebCore::HTMLTreeBuilder::processStartTag):
583 (WebCore::HTMLTreeBuilder::processBodyEndTagForInBody):
584 (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody):
585 (WebCore::HTMLTreeBuilder::processEndTagForInTableBody):
586 (WebCore::HTMLTreeBuilder::processEndTagForInRow):
587 (WebCore::HTMLTreeBuilder::processEndTagForInCell):
588 (WebCore::HTMLTreeBuilder::processEndTagForInBody):
589 (WebCore::HTMLTreeBuilder::processEndTagForInTable):
590 (WebCore::HTMLTreeBuilder::processEndTag):
591 (WebCore::HTMLTreeBuilder::processComment):
592 (WebCore::HTMLTreeBuilder::processCharacter):
593 (WebCore::HTMLTreeBuilder::defaultForBeforeHTML):
594 (WebCore::HTMLTreeBuilder::defaultForBeforeHead):
595 (WebCore::HTMLTreeBuilder::defaultForInHead):
596 (WebCore::HTMLTreeBuilder::defaultForInHeadNoscript):
597 (WebCore::HTMLTreeBuilder::defaultForAfterHead):
598 (WebCore::HTMLTreeBuilder::processStartTagForInHead):
599 (WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag):
600 (WebCore::HTMLTreeBuilder::processGenericRawTextStartTag):
601 (WebCore::HTMLTreeBuilder::processScriptStartTag):
602 (WebCore::HTMLTreeBuilder::shouldProcessTokenInForeignContent):
603 (WebCore::HTMLTreeBuilder::processTokenInForeignContent):
604 * html/parser/HTMLViewSourceParser.cpp:
605 (WebCore::HTMLViewSourceParser::updateTokenizerState):
606 * html/parser/TextDocumentParser.cpp:
607 (WebCore::TextDocumentParser::insertFakePreElement):
608 * html/parser/XSSAuditor.cpp:
609 (WebCore::XSSAuditor::filterToken):
610 (WebCore::XSSAuditor::filterScriptToken):
611 (WebCore::XSSAuditor::filterObjectToken):
612 (WebCore::XSSAuditor::filterParamToken):
613 (WebCore::XSSAuditor::filterEmbedToken):
614 (WebCore::XSSAuditor::filterAppletToken):
615 (WebCore::XSSAuditor::filterIframeToken):
616 (WebCore::XSSAuditor::filterMetaToken):
617 (WebCore::XSSAuditor::filterBaseToken):
618 (WebCore::XSSAuditor::filterFormToken):
620 2013-02-12 Pablo Flouret <pablof@motorola.com>
622 Handle error recovery in @supports
623 https://bugs.webkit.org/show_bug.cgi?id=103934
625 Reviewed by Antti Koivisto.
627 Tests 021, 024, 031, and 033 in
628 http://hg.csswg.org/test/file/5f94e4b03ed9/contributors/opera/submitted/css3-conditional
629 fail because there's no explicit error recovery in @support's grammar.
630 Opera and Firefox pass the tests.
632 No new tests, modified css3/supports{,-cssom}.html
634 * css/CSSGrammar.y.in:
636 (WebCore::CSSParser::createSupportsRule):
637 (WebCore::CSSParser::markSupportsRuleHeaderEnd):
638 (WebCore::CSSParser::popSupportsRuleData):
641 2013-02-12 Eric Carlson <eric.carlson@apple.com>
643 [Mac] guard against NULL languages array
644 https://bugs.webkit.org/show_bug.cgi?id=109595
646 Reviewed by Dean Jackson.
648 No new tests, existing tests won't crash if this is correct.
650 * page/CaptionUserPreferencesMac.mm:
651 (WebCore::CaptionUserPreferencesMac::preferredLanguages):
653 2013-02-12 Emil A Eklund <eae@chromium.org>
655 TransformState::move should not round offset to int
656 https://bugs.webkit.org/show_bug.cgi?id=108266
658 Reviewed by Simon Fraser.
660 Currently TransformState::move rounds the offset to the nearest
661 integer values, this results in operations using TransformState
662 to compute a position to misreport the location, specifically
663 Element:getBoundingClientRect and repaint rects. Sizes are
664 handled correctly and do not have the same problem.
666 Tests: fast/sub-pixel/boundingclientrect-subpixel-margin.html
667 fast/sub-pixel/clip-rect-box-consistent-rounding.html
669 * page/FrameView.cpp:
670 (WebCore::FrameView::convertFromRenderer):
671 Change to use pixel snapping instead of enclosing box. All other
672 code paths use pixelSnappedIntRect to align the rects to device
673 pixels however this used enclosingIntRect (indirectly through
674 the FloatQuad::enclosingBoundingBox call).
675 Without the rounding in TransformState this causes repaint rects
676 for elements on subpixel bounds to be too large by up to one
677 pixel on each axis. For normal repaints this isn't really a
678 problem but in scrollContentsSlowPath it can result in moving
681 * platform/graphics/transforms/TransformState.cpp:
682 (WebCore::TransformState::translateTransform):
683 (WebCore::TransformState::translateMappedCoordinates):
684 Change to take a LayoutSize instead of an IntSize.
686 (WebCore::TransformState::move):
687 (WebCore::TransformState::applyAccumulatedOffset):
688 * platform/graphics/transforms/TransformState.h:
689 Remove rounding logic and use original, more precise, value.
691 * rendering/RenderGeometryMap.cpp:
692 (WebCore::RenderGeometryMap::mapToContainer):
693 Remove rounding logic and use original, more precise, value.
695 2013-02-12 Jessie Berlin <jberlin@apple.com>
697 Rollout r142618, it broke all the Mac builds.
699 * inspector/HeapGraphSerializer.cpp:
700 (WebCore::HeapGraphSerializer::HeapGraphSerializer):
701 (WebCore::HeapGraphSerializer::pushUpdate):
702 (WebCore::HeapGraphSerializer::reportNode):
703 (WebCore::HeapGraphSerializer::toNodeId):
704 (WebCore::HeapGraphSerializer::addRootNode):
705 * inspector/HeapGraphSerializer.h:
707 (HeapGraphSerializer):
708 * inspector/InspectorMemoryAgent.cpp:
709 (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
711 2013-02-12 Rafael Weinstein <rafaelw@chromium.org>
713 [HTMLTemplateElement] <template> inside of <head> may not create <body> if EOF is hit
714 https://bugs.webkit.org/show_bug.cgi?id=109338
716 Reviewed by Adam Barth.
718 This patch adds the logic to clear the stack of open elements back to the first <template> when EOF
719 is hit. This allows a <body> to be generated if the initial <template> was opened inside of <head>.
721 Tests added to html5lib.
723 * html/parser/HTMLTreeBuilder.cpp:
725 (WebCore::HTMLTreeBuilder::popAllTemplates):
726 (WebCore::HTMLTreeBuilder::processEndTag):
727 (WebCore::HTMLTreeBuilder::processEndOfFile):
728 * html/parser/HTMLTreeBuilder.h:
731 2013-02-12 Dominic Mazzoni <dmazzoni@google.com>
733 ASSERTION FAILED: i < size(), UNKNOWN in WebCore::AccessibilityMenuListPopup::didUpdateActiveOption
734 https://bugs.webkit.org/show_bug.cgi?id=109452
736 Reviewed by Chris Fleizach.
738 Send the accessibility childrenChanged notification in
739 HTMLSelectElement::setRecalcListItems instead of in childrenChanged
740 so that all possible codepaths are caught.
742 Test: accessibility/insert-selected-option-into-select-causes-crash.html
744 * html/HTMLSelectElement.cpp:
745 (WebCore::HTMLSelectElement::childrenChanged):
746 (WebCore::HTMLSelectElement::setRecalcListItems):
748 2013-02-12 Peter Rybin <prybin@chromium.org>
750 Web Inspector: for event listener provide handler function value in protocol and in UI
751 https://bugs.webkit.org/show_bug.cgi?id=109284
753 Reviewed by Yury Semikhatsky.
755 The feature implies that we include a real handler function value into event listener description.
756 Protocol description, inspector DOM agent (with V8 and JSC backends) and front-end is patched accordingly.
758 * bindings/js/ScriptEventListener.cpp:
759 (WebCore::eventListenerHandler):
761 (WebCore::eventListenerHandlerScriptState):
762 * bindings/js/ScriptEventListener.h:
764 * bindings/v8/ScriptEventListener.cpp:
765 (WebCore::eventListenerHandler):
767 (WebCore::eventListenerHandlerScriptState):
768 * bindings/v8/ScriptEventListener.h:
770 * inspector/Inspector.json:
771 * inspector/InspectorDOMAgent.cpp:
772 (WebCore::InspectorDOMAgent::getEventListenersForNode):
773 (WebCore::InspectorDOMAgent::buildObjectForEventListener):
774 * inspector/InspectorDOMAgent.h:
776 * inspector/front-end/DOMAgent.js:
777 (WebInspector.DOMNode.prototype.eventListeners):
778 * inspector/front-end/EventListenersSidebarPane.js:
779 (WebInspector.EventListenersSidebarPane.prototype.update):
782 2013-02-12 Yury Semikhatsky <yurys@chromium.org>
784 Web Inspector: add initial implementation of native memory graph to Timeline
785 https://bugs.webkit.org/show_bug.cgi?id=109578
787 Reviewed by Alexander Pavlov.
789 This change adds inital implementation of native memory graph UI. The graph
790 will be shown in the same place as DOM counters graph on the Timeline panel.
792 Added NativeMemoryGraph.js that reuses parts of DOM counters graph
793 implementation. MemoryStatistics.js was refactor to allow sharing
794 more code between DOM counters and native memory graph.
797 * WebCore.vcproj/WebCore.vcproj:
798 * inspector/compile-front-end.py:
799 * inspector/front-end/MemoryStatistics.js:
800 (WebInspector.MemoryStatistics):
801 (WebInspector.MemoryStatistics.prototype._createCurrentValuesBar):
802 (WebInspector.MemoryStatistics.prototype._createCounterUIList):
803 (WebInspector.MemoryStatistics.prototype._createCounterUIList.getNodeCount):
804 (WebInspector.MemoryStatistics.prototype._createCounterUIList.getListenerCount):
805 (WebInspector.MemoryStatistics.prototype._canvasHeight):
806 (WebInspector.MemoryStatistics.prototype._updateSize):
807 (WebInspector.MemoryStatistics.prototype._highlightCurrentPositionOnGraphs):
808 (WebInspector.MemoryStatistics.prototype._drawMarker):
809 * inspector/front-end/NativeMemoryGraph.js: Added.
810 (WebInspector.NativeMemoryGraph):
811 (WebInspector.NativeMemoryCounterUI):
812 (WebInspector.NativeMemoryCounterUI.prototype._hslToString):
813 (WebInspector.NativeMemoryCounterUI.prototype.updateCurrentValue):
814 (WebInspector.NativeMemoryCounterUI.prototype.clearCurrentValueAndMarker):
815 (WebInspector.NativeMemoryGraph.prototype._createCurrentValuesBar):
816 (WebInspector.NativeMemoryGraph.prototype._createCounterUIList.getCounterValue):
817 (WebInspector.NativeMemoryGraph.prototype._createCounterUIList):
818 (WebInspector.NativeMemoryGraph.prototype._canvasHeight):
819 (WebInspector.NativeMemoryGraph.prototype._onRecordAdded.addStatistics):
820 (WebInspector.NativeMemoryGraph.prototype._onRecordAdded):
821 (WebInspector.NativeMemoryGraph.prototype._draw):
822 (WebInspector.NativeMemoryGraph.prototype._clearCurrentValueAndMarker):
823 (WebInspector.NativeMemoryGraph.prototype._updateCurrentValue):
824 (WebInspector.NativeMemoryGraph.prototype._restoreImageUnderMarker):
825 (WebInspector.NativeMemoryGraph.prototype._saveImageUnderMarker):
826 (WebInspector.NativeMemoryGraph.prototype._drawMarker):
827 (WebInspector.NativeMemoryGraph.prototype._maxCounterValue):
828 (WebInspector.NativeMemoryGraph.prototype._resetTotalValues):
829 (WebInspector.NativeMemoryGraph.prototype.valueGetter):
830 (WebInspector.NativeMemoryGraph.prototype._drawGraph):
831 (WebInspector.NativeMemoryGraph.prototype._discardImageUnderMarker):
832 * inspector/front-end/TimelinePanel.js:
833 * inspector/front-end/WebKit.qrc:
834 * inspector/front-end/timelinePanel.css:
835 (#memory-graphs-canvas-container.dom-counters .resources-dividers):
836 (.memory-category-value):
838 2013-02-12 Andrey Lushnikov <lushnikov@chromium.org>
840 Web Inspector: refactor some reusable functionality from BraceHighlighter
841 https://bugs.webkit.org/show_bug.cgi?id=109574
843 Reviewed by Pavel Feldman.
845 New test: inspector/editor/text-editor-brace-highlighter.html
847 Extract functionality which, for given line and cursor position, will
848 return position for a brace that should be highlighted. Add a layout
849 test to verify brace highlighter funcionality.
851 * inspector/front-end/DefaultTextEditor.js:
852 (WebInspector.TextEditorMainPanel.BraceHighlightController.prototype.activeBraceColumnForCursorPosition):
853 (WebInspector.TextEditorMainPanel.BraceHighlightController.prototype.handleSelectionChange):
854 * inspector/front-end/TextUtils.js:
855 (WebInspector.TextUtils.isOpeningBraceChar):
856 (WebInspector.TextUtils.isClosingBraceChar):
857 (WebInspector.TextUtils.isBraceChar):
859 2013-02-12 Ilya Tikhonovsky <loislo@chromium.org>
861 Web Inspector: Native Memory Instrumentation: reportLeaf method doesn't report the leaf node properly.
862 https://bugs.webkit.org/show_bug.cgi?id=109554
864 In some cases leaves have no pointer so with the old schema we can't generate nodeId for them because we
865 can't insert 0 into hashmap. It happens when we call addPrivateBuffer method.
867 Drive by fix: I introduced a client interface for the HeapGraphSerializer.
868 It helps me to do the tests for the serializer.
870 Reviewed by Yury Semikhatsky.
872 It is covered by newly added tests in TestWebKitAPI.
874 * inspector/HeapGraphSerializer.cpp:
875 (WebCore::HeapGraphSerializer::HeapGraphSerializer):
876 (WebCore::HeapGraphSerializer::pushUpdate):
877 (WebCore::HeapGraphSerializer::reportNode):
878 (WebCore::HeapGraphSerializer::toNodeId):
879 (WebCore::HeapGraphSerializer::addRootNode):
880 * inspector/HeapGraphSerializer.h:
881 (HeapGraphSerializerClient):
882 (WebCore::HeapGraphSerializerClient::~HeapGraphSerializerClient):
883 (HeapGraphSerializer):
884 * inspector/InspectorMemoryAgent.cpp:
885 (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
887 2013-02-12 Vsevolod Vlasov <vsevik@chromium.org>
889 Web Inspector: Introduce version controller to migrate settings versions.
890 https://bugs.webkit.org/show_bug.cgi?id=109553
892 Reviewed by Yury Semikhatsky.
894 This patch introduces version controller that could be used to migrate inspector settings.
896 Test: inspector/version-controller.html
898 * inspector/front-end/Settings.js:
899 (WebInspector.Settings):
900 (WebInspector.VersionController):
901 (WebInspector.VersionController.prototype.set _methodsToRunToUpdateVersion):
902 (WebInspector.VersionController.prototype._updateVersionFrom0To1):
903 * inspector/front-end/inspector.js:
905 2013-02-12 Vsevolod Vlasov <vsevik@chromium.org>
907 Web Inspector: File system should produce more verbose error messages and recover from errors
908 https://bugs.webkit.org/show_bug.cgi?id=109571
910 Reviewed by Alexander Pavlov.
912 Error handler prints original file system call params now.
913 Added callbacks to error handler to recover from errors.
915 * inspector/front-end/FileSystemProjectDelegate.js:
916 (WebInspector.FileSystemProjectDelegate.prototype.contentCallback):
917 (WebInspector.FileSystemProjectDelegate.prototype.searchInFileContent):
918 (WebInspector.FileSystemUtils.errorMessage):
922 (WebInspector.FileSystemUtils.requestFileContent):
923 (WebInspector.FileSystemUtils.setFileContent):
924 (WebInspector.FileSystemUtils._readDirectory):
926 (WebInspector.FileSystemUtils._requestEntries):
928 2013-02-12 Vsevolod Vlasov <vsevik@chromium.org>
930 Web Inspector: Get rid of unnecessary complexity in FileSystemUtil: remove _getDirectory() method.
931 https://bugs.webkit.org/show_bug.cgi?id=109567
933 Reviewed by Alexander Pavlov.
935 The code in this method was redundant as the same result could be achieved by using File System API directly.
937 * inspector/front-end/FileSystemProjectDelegate.js:
939 2013-02-12 Alexander Pavlov <apavlov@chromium.org>
941 Web Inspector: [SuggestBox] SuggestBox not hidden when prefix is empty and there is preceding input
942 https://bugs.webkit.org/show_bug.cgi?id=109568
944 Reviewed by Vsevolod Vlasov.
946 The suggestbox would get hidden in the case of empty input, yet it should get hidden
947 in the case of empty user-entered prefix (which is a wider notion.)
949 * inspector/front-end/TextPrompt.js:
950 (WebInspector.TextPrompt.prototype.complete):
952 2013-02-12 Andrey Lushnikov <lushnikov@chromium.org>
954 Web Inspector: separate SuggestBox from TextPrompt
955 https://bugs.webkit.org/show_bug.cgi?id=109430
957 Reviewed by Alexander Pavlov.
959 Create WebInspector.SuggestBoxDelegate interface and
960 refactor TextPrompt to use this interface. Separate SuggestBox into
961 WebInspector.SuggestBox namespace and put it into its own file.
963 No new tests: no change in behaviour.
966 * WebCore.vcproj/WebCore.vcproj:
967 * inspector/compile-front-end.py:
968 * inspector/front-end/SuggestBox.js: Added.
969 (WebInspector.SuggestBoxDelegate):
970 (WebInspector.SuggestBoxDelegate.prototype.applySuggestion):
971 (WebInspector.SuggestBoxDelegate.prototype.acceptSuggestion):
972 (WebInspector.SuggestBoxDelegate.prototype.userEnteredText):
973 (WebInspector.SuggestBox):
974 (WebInspector.SuggestBox.prototype.get visible):
975 (WebInspector.SuggestBox.prototype.get hasSelection):
976 (WebInspector.SuggestBox.prototype._onscrollresize):
977 (WebInspector.SuggestBox.prototype._updateBoxPositionWithExistingAnchor):
978 (WebInspector.SuggestBox.prototype._updateBoxPosition):
979 (WebInspector.SuggestBox.prototype._onboxmousedown):
980 (WebInspector.SuggestBox.prototype.hide):
981 (WebInspector.SuggestBox.prototype.removeFromElement):
982 (WebInspector.SuggestBox.prototype._applySuggestion):
983 (WebInspector.SuggestBox.prototype.acceptSuggestion):
984 (WebInspector.SuggestBox.prototype._selectClosest):
985 (WebInspector.SuggestBox.prototype.updateSuggestions):
986 (WebInspector.SuggestBox.prototype._onItemMouseDown):
987 (WebInspector.SuggestBox.prototype._createItemElement):
988 (WebInspector.SuggestBox.prototype._updateItems):
989 (WebInspector.SuggestBox.prototype._selectItem):
990 (WebInspector.SuggestBox.prototype._canShowBox):
991 (WebInspector.SuggestBox.prototype._rememberRowCountPerViewport):
992 (WebInspector.SuggestBox.prototype._completionsReady):
993 (WebInspector.SuggestBox.prototype.upKeyPressed):
994 (WebInspector.SuggestBox.prototype.downKeyPressed):
995 (WebInspector.SuggestBox.prototype.pageUpKeyPressed):
996 (WebInspector.SuggestBox.prototype.pageDownKeyPressed):
997 (WebInspector.SuggestBox.prototype.enterKeyPressed):
998 (WebInspector.SuggestBox.prototype.tabKeyPressed):
999 * inspector/front-end/TextPrompt.js:
1000 (WebInspector.TextPrompt.prototype.userEnteredText):
1001 (WebInspector.TextPrompt.prototype._attachInternal):
1002 (WebInspector.TextPrompt.prototype._completionsReady):
1003 (WebInspector.TextPrompt.prototype.applySuggestion):
1004 (WebInspector.TextPrompt.prototype._applySuggestion):
1005 (WebInspector.TextPrompt.prototype.enterKeyPressed):
1006 (WebInspector.TextPrompt.prototype.upKeyPressed):
1007 (WebInspector.TextPrompt.prototype.downKeyPressed):
1008 (WebInspector.TextPrompt.prototype.pageUpKeyPressed):
1009 (WebInspector.TextPrompt.prototype.pageDownKeyPressed):
1010 * inspector/front-end/WebKit.qrc:
1011 * inspector/front-end/inspector.html:
1013 2013-02-12 Bruno de Oliveira Abinader <bruno.abinader@basyskom.com>
1015 [TexMap] Apply frames-per-second debug counter to WK1.
1016 https://bugs.webkit.org/show_bug.cgi?id=109540
1018 Reviewed by Noam Rosenthal.
1020 Adds basysKom copyright info to TextureMapperFPSCounter header.
1022 * platform/graphics/texmap/TextureMapperFPSCounter.cpp:
1023 * platform/graphics/texmap/TextureMapperFPSCounter.h:
1025 2013-02-12 Sheriff Bot <webkit.review.bot@gmail.com>
1027 Unreviewed, rolling out r142531.
1028 http://trac.webkit.org/changeset/142531
1029 https://bugs.webkit.org/show_bug.cgi?id=109569
1031 Causes html5lib/run-template layout test to crash. (Requested
1032 by atwilson_ on #webkit).
1034 * html/parser/HTMLTreeBuilder.cpp:
1035 (WebCore::HTMLTreeBuilder::processTemplateEndTag):
1036 (WebCore::HTMLTreeBuilder::processColgroupEndTagForInColumnGroup):
1037 (WebCore::HTMLTreeBuilder::processEndOfFile):
1038 * html/parser/HTMLTreeBuilder.h:
1041 2013-02-12 Zan Dobersek <zdobersek@igalia.com>
1043 [GTK] Enable CSS image-set support in development builds
1044 https://bugs.webkit.org/show_bug.cgi?id=109475
1046 Reviewed by Martin Robinson.
1048 No new tests - majority of the related tests now passes.
1050 * GNUmakefile.features.am.in: Add the feature define for the CSS image-set feature
1051 with the define value defaulting to 0. The value gets overridden with 1 in development
1052 builds, meaning the feature is enabled under that configuration.
1054 2013-02-12 Zan Dobersek <zdobersek@igalia.com>
1056 [GTK] Enable DOM4 events constructors in development builds
1057 https://bugs.webkit.org/show_bug.cgi?id=109471
1059 Reviewed by Martin Robinson.
1061 No new tests - the related tests now pass.
1063 * GNUmakefile.features.am.in: Add the feature define for the DOM4 events
1064 constructors feature, its value defaulting to 0. This value is overridden
1065 with 1 in development builds, effectively enabling the feature.
1067 2013-02-12 Zan Dobersek <zdobersek@igalia.com>
1069 Unreviewed build fix for the GTK port after r142595.
1070 Adding the TextureMapperFPSCounter files to the list of build targets
1071 in case of using the OpenGL texture mapper.
1073 * GNUmakefile.list.am:
1075 2013-02-12 Andrey Kosyakov <caseq@chromium.org>
1077 Web Inspector: fix closure compiler warnings in extension server and API
1078 https://bugs.webkit.org/show_bug.cgi?id=109563
1080 Reviewed by Vsevolod Vlasov.
1082 * inspector/front-end/ExtensionAPI.js: drive-by: make sure we fail if extensionServer is not defined in outer scope.
1083 * inspector/front-end/ExtensionServer.js:
1084 (WebInspector.ExtensionServer.prototype.):
1085 (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
1086 * inspector/front-end/externs.js: add extensionServer
1088 2013-02-12 Zoltan Arvai <zarvai@inf.u-szeged.hu>
1090 Unreviewed. Fix !ENABLE(INSPECTOR) builds after r142575
1092 * inspector/InspectorInstrumentation.h:
1093 (WebCore::InspectorInstrumentation::willDispatchEvent):
1095 2013-02-12 Andrey Lushnikov <lushnikov@chromium.org>
1097 Web Inspector: move showWhitespace option into experiments
1098 https://bugs.webkit.org/show_bug.cgi?id=109552
1100 Reviewed by Vsevolod Vlasov.
1102 Remove "show whitespace" setting and add it to experiments.
1104 No new tests: fixed an existing test to verify changes.
1106 * English.lproj/localizedStrings.js:
1107 * inspector/front-end/DefaultTextEditor.js:
1108 (WebInspector.TextEditorMainPanel):
1109 (WebInspector.TextEditorMainPanel.prototype.wasShown):
1110 (WebInspector.TextEditorMainPanel.prototype.willHide):
1111 * inspector/front-end/Settings.js:
1112 (WebInspector.ExperimentsSettings):
1113 * inspector/front-end/SettingsScreen.js:
1114 (WebInspector.GenericSettingsTab):
1116 2013-02-12 Tamas Czene <tczene@inf.u-szeged.hu>
1118 Add error checking into OpenCL version of SVG filters.
1119 https://bugs.webkit.org/show_bug.cgi?id=107444
1121 Reviewed by Zoltan Herczeg.
1123 In case of an error the program runs through all the remaining filters by doing nothing.
1124 After that deletes the results of every filter and starts software rendering.
1126 * platform/graphics/filters/FilterEffect.cpp:
1128 (WebCore::FilterEffect::applyAll): At software rendering this is a simple inline methode, but at OpenCL rendering it releases OpenCL things. If we have an error remove filter's results and start software rendering.
1129 (WebCore::FilterEffect::clearResultsRecursive):
1130 (WebCore::FilterEffect::openCLImageToImageBuffer):
1131 (WebCore::FilterEffect::createOpenCLImageResult):
1132 (WebCore::FilterEffect::transformResultColorSpace):
1133 * platform/graphics/filters/FilterEffect.h:
1135 (WebCore::FilterEffect::applyAll):
1136 * platform/graphics/gpu/opencl/FilterContextOpenCL.cpp:
1137 (WebCore::FilterContextOpenCL::isFailed):
1139 (WebCore::FilterContextOpenCL::freeResources):
1140 (WebCore::FilterContextOpenCL::destroyContext):
1141 (WebCore::FilterContextOpenCL::compileTransformColorSpaceProgram):
1142 (WebCore::FilterContextOpenCL::openCLTransformColorSpace):
1143 (WebCore::FilterContextOpenCL::compileProgram):
1144 (WebCore::FilterContextOpenCL::freeResource):
1145 * platform/graphics/gpu/opencl/FilterContextOpenCL.h:
1146 (WebCore::FilterContextOpenCL::FilterContextOpenCL):
1147 (WebCore::FilterContextOpenCL::setInError):
1148 (WebCore::FilterContextOpenCL::inError):
1149 (FilterContextOpenCL):
1150 (WebCore::FilterContextOpenCL::RunKernel::RunKernel):
1151 (WebCore::FilterContextOpenCL::RunKernel::addArgument):
1152 (WebCore::FilterContextOpenCL::RunKernel::run):
1154 * platform/graphics/gpu/opencl/OpenCLFEColorMatrix.cpp:
1155 (WebCore::FilterContextOpenCL::compileFEColorMatrix):
1156 (WebCore::FEColorMatrix::platformApplyOpenCL):
1157 * platform/graphics/gpu/opencl/OpenCLFETurbulence.cpp:
1158 (WebCore::FilterContextOpenCL::compileFETurbulence):
1159 (WebCore::FETurbulence::platformApplyOpenCL):
1160 * rendering/svg/RenderSVGResourceFilter.cpp:
1161 (WebCore::RenderSVGResourceFilter::postApplyResource):
1163 2013-02-12 Huang Dongsung <luxtella@company100.net>
1165 [TexMap] Apply frames-per-second debug counter to WK1.
1166 https://bugs.webkit.org/show_bug.cgi?id=109540
1168 Reviewed by Noam Rosenthal.
1170 r142524 implemented frames-per-second debug counter on WK2. This patch
1171 applies frames-per-second debug counter to WK1 also.
1173 Visual debugging feature, no need for new tests.
1176 * GNUmakefile.list.am:
1178 * platform/graphics/texmap/TextureMapper.h:
1179 * platform/graphics/texmap/TextureMapperFPSCounter.cpp: Added.
1181 (WebCore::TextureMapperFPSCounter::TextureMapperFPSCounter):
1182 (WebCore::TextureMapperFPSCounter::updateFPSAndDisplay):
1183 * platform/graphics/texmap/TextureMapperFPSCounter.h: Added.
1185 (TextureMapperFPSCounter):
1186 * platform/graphics/texmap/TextureMapperGL.cpp:
1188 (WebCore::TextureMapperGL::drawNumber):
1189 Rename from drawRepaintCounter to drawNumber.
1190 * platform/graphics/texmap/TextureMapperGL.h:
1191 * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
1192 (WebCore::TextureMapperImageBuffer::drawNumber):
1193 * platform/graphics/texmap/TextureMapperImageBuffer.h:
1194 (TextureMapperImageBuffer):
1195 * platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:
1196 (WebCore::TextureMapperTiledBackingStore::drawRepaintCounter):
1197 * platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
1198 (WebCore::CoordinatedBackingStore::drawRepaintCounter):
1199 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1200 Move frames-per-second debug counter code to TextureMapperFPSCounter.
1201 (WebCore::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
1202 (WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext):
1203 (WebCore::CoordinatedGraphicsScene::paintToGraphicsContext):
1204 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
1206 2013-02-11 Yury Semikhatsky <yurys@chromium.org>
1208 Web Inspector: stack trace is cut at native bind if inspector is closed
1209 https://bugs.webkit.org/show_bug.cgi?id=109427
1211 Reviewed by Pavel Feldman.
1213 Only top frame is collected instead of full stack trace when inspector
1214 front-end is closed to avoid expensive operations when exceptions are
1217 Test: http/tests/inspector-enabled/console-exception-while-no-inspector.html
1219 * inspector/InspectorConsoleAgent.cpp:
1220 (WebCore::InspectorConsoleAgent::addMessageToConsole):
1222 2013-02-12 Kent Tamura <tkent@chromium.org>
1224 INPUT_MULTIPLE_FIELDS_UI: Mouse click not on sub-fields in multiple fields input should not move focus
1225 https://bugs.webkit.org/show_bug.cgi?id=109544
1227 Reviewed by Kentaro Hara.
1229 This is similar to Bug 108914, "Should not move focus if the element
1230 already has focus." We fixed a focus() case in Bug 108914. However we
1231 still have the problem in a case of focusing by mouse click.
1233 The fix for Bug 108914 intercepted focus() function to change the
1234 behavior. However focus-by-click doesn't call focus(), but calls
1235 FocusController::setFocusedNode. To fix this problem, we introduce
1236 oldFocusedNode argument to handleFocusEvent, and
1237 BaseMultipleFieldsDateAndTimeInputType::handleFocusEvent restores the
1238 focus to oldFocusedNode if oldFocusedNode is one of sub-fields.
1239 handleFocusEvent is called whenever the focused node is changed.
1241 We don't need InputType::willCancelFocus any more because the new code
1242 in handleFocusEvent covers it.
1244 Tests: Update fast/forms/time-multiple-fields/time-multiple-fields-focus.html.
1246 * html/HTMLTextFormControlElement.h:
1247 (WebCore::HTMLTextFormControlElement::handleFocusEvent):
1248 Add oldFocusedNode argument.
1249 * html/HTMLTextFormControlElement.cpp:
1250 (WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
1251 Pass oldFocusedNode to handleFocusEvent.
1253 * html/HTMLInputElement.h:
1255 - Add oldFocusedNode argument to handleFocusEvent.
1256 - Remove focus() override.
1257 * html/HTMLInputElement.cpp: Remove focus() override.
1258 (WebCore::HTMLInputElement::handleFocusEvent):
1259 Pass oldFocusedNode to InputType::handleFocusEvent.
1260 * html/InputType.cpp: Remove willCancelFocus.
1261 (WebCore::InputType::handleFocusEvent):
1262 Add oldFocusedNode argument.
1265 * html/PasswordInputType.cpp:
1266 (WebCore::PasswordInputType::handleFocusEvent): Ditto.
1267 * html/PasswordInputType.h:
1268 (PasswordInputType): Ditto.
1270 * html/BaseMultipleFieldsDateAndTimeInputType.h:
1271 (BaseMultipleFieldsDateAndTimeInputType):
1272 Remove willCancelFocus, and add oldFocusedNode argument to handleFocusEvent.
1273 * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
1274 (WebCore::BaseMultipleFieldsDateAndTimeInputType::handleFocusEvent):
1275 Pass oldFocusedNode to DateTimeEditElement::focusByOwner if the
1276 direction is FocusDirectionNone.
1278 * html/shadow/DateTimeEditElement.h:
1279 (DateTimeEditElement): Add oldFocusedNode argument to focusByOwner.
1280 * html/shadow/DateTimeEditElement.cpp:
1281 (WebCore::DateTimeEditElement::focusByOwner):
1282 If oldFocusedNode is one of sub-fields, focus on it again.
1284 2013-02-12 Takashi Sakamoto <tasak@google.com>
1286 [Refactoring] Make m_selectorChecker in StyleResolver an on-stack object.
1287 https://bugs.webkit.org/show_bug.cgi?id=108595
1289 Reviewed by Eric Seidel.
1291 StyleResolver uses SelectorChecker's mode to change its resolving mode.
1292 However it is a state of StyleResolver. StyleResolver should have the
1293 mode and make SelectorChecker instance on a stack while required.
1295 No new tests, just refactoring.
1297 * css/SelectorChecker.cpp:
1298 (WebCore::SelectorChecker::fastCheckRightmostSelector):
1299 (WebCore::SelectorChecker::fastCheck):
1300 (WebCore::SelectorChecker::commonPseudoClassSelectorMatches):
1301 (WebCore::SelectorChecker::matchesFocusPseudoClass):
1302 Changed to static class function, because these methods never use
1305 * css/SelectorChecker.h:
1307 * css/StyleResolver.cpp:
1308 (WebCore::StyleResolver::StyleResolver):
1309 (WebCore::StyleResolver::collectMatchingRules):
1310 Now, matchesFocusPseudoClass is not a static method of
1311 SelectorChecker, so replaced "m_selectorChecker." with
1312 "SelectorChecker::".
1313 (WebCore::StyleResolver::sortAndTransferMatchedRules):
1314 (WebCore::StyleResolver::collectMatchingRulesForList):
1315 (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
1316 (WebCore::StyleResolver::matchUARules):
1317 (WebCore::StyleResolver::adjustRenderStyle):
1318 (WebCore::StyleResolver::pseudoStyleRulesForElement):
1319 Use m_mode instead of m_selectorChecker.mode().
1320 Also use document()->inQuirksMode() instead of
1321 m_selectoChecker.strictParsing().
1322 (WebCore::StyleResolver::ruleMatches):
1323 (WebCore::StyleResolver::checkRegionSelector):
1324 Created an on-stack SelectorChecker object and used it to check
1326 * css/StyleResolver.h:
1327 (WebCore::StyleResolver::State::State):
1328 Added m_mode, this keeps m_selectorChecker's mode.
1331 Removed m_selectorChecker.
1333 2013-02-11 Viatcheslav Ostapenko <sl.ostapenko@samsung.com>
1335 [Qt][EFL][WebGL] Minor refactoring of GraphicsSurface/GraphicsSurfaceGLX
1336 https://bugs.webkit.org/show_bug.cgi?id=108686
1338 Reviewed by Noam Rosenthal.
1340 Remove unused platformSurface()/m_platformSurface from GraphicsSurface.
1341 Move m_texture from GraphicsSurface to GLX GraphicsSurfacePrivate to match
1342 Win and Mac implementations.
1344 No new tests, refactoring only.
1346 * platform/graphics/surfaces/GraphicsSurface.cpp:
1347 (WebCore::GraphicsSurface::GraphicsSurface):
1348 * platform/graphics/surfaces/GraphicsSurface.h:
1350 * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
1351 (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
1352 (WebCore::GraphicsSurfacePrivate::swapBuffers):
1353 (WebCore::GraphicsSurfacePrivate::surface):
1354 (GraphicsSurfacePrivate):
1355 (WebCore::GraphicsSurfacePrivate::textureID):
1356 (WebCore::GraphicsSurfacePrivate::clear):
1357 (WebCore::GraphicsSurface::platformExport):
1358 (WebCore::GraphicsSurface::platformGetTextureID):
1359 (WebCore::GraphicsSurface::platformSwapBuffers):
1360 (WebCore::GraphicsSurface::platformCreate):
1361 (WebCore::GraphicsSurface::platformImport):
1362 (WebCore::GraphicsSurface::platformDestroy):
1364 2013-02-11 Viatcheslav Ostapenko <sl.ostapenko@samsung.com>
1366 [EFL][WebGL] WebGL content is not painted after resizing the viewport.
1367 https://bugs.webkit.org/show_bug.cgi?id=106358
1369 Reviewed by Noam Rosenthal.
1371 When page size changes and layer parameters get updated LayerTreeRenderer::setLayerState
1372 clears the layer backing store and detaches the canvas surface from the layer. If the layer
1373 size is not changed then the canvas is not recreated. This leaves the canvas detached from
1374 the layer, but still referenced from m_surfaceBackingStores.
1375 Don't assign layer backing store to layer in assignImageBackingToLayer if there is a canvas
1376 surface already attached to the layer.
1378 Test: fast/canvas/webgl/webgl-layer-update.html
1380 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1381 (WebCore::CoordinatedGraphicsScene::setLayerState):
1382 (WebCore::CoordinatedGraphicsScene::assignImageBackingToLayer):
1383 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
1385 2013-02-11 Eric Carlson <eric.carlson@apple.com>
1387 [Mac] Track language selection should be sticky
1388 https://bugs.webkit.org/show_bug.cgi?id=109466
1390 Reviewed by Dean Jackson.
1392 Choosing a text track from the caption menu should make that track's language the
1393 preferred caption language. Turning captions off from the menu should disable captions
1394 in videos loaded subsequently.
1396 OS X has system support for these settings, so changes made by DRT should not change the
1397 settings on the user's system. Add support for all other ports in DRT only.
1399 Test: media/track/track-user-preferences.html
1401 * WebCore.exp.in: Export PageGroup::captionPreferences().
1403 * html/HTMLMediaElement.cpp:
1404 (WebCore::HTMLMediaElement::HTMLMediaElement): Use page()->group().captionPreferences().
1405 (WebCore::HTMLMediaElement::attach): Ditto.
1406 (WebCore::HTMLMediaElement::detach): Ditto.
1407 (WebCore::HTMLMediaElement::userPrefersCaptions): Ditto.
1408 (WebCore::HTMLMediaElement::configureTextTrackGroup): Ditto. Update for
1409 preferredLanguageFromList change.
1410 (WebCore::HTMLMediaElement::toggleTrackAtIndex): Set user prefs for captions visible and
1411 caption language as appropriate.
1413 * html/shadow/MediaControlElements.cpp:
1414 (WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler): Remove unneeded comment.
1415 (WebCore::MediaControlTextTrackContainerElement::updateSizes): Use page()->group().captionPreferences().
1417 * html/shadow/MediaControlsApple.cpp:
1418 (WebCore::MediaControlsApple::closedCaptionTracksChanged): Update caption menu button visibility.
1420 * page/CaptionUserPreferences.h:
1421 (WebCore::CaptionUserPreferences::userPrefersCaptions): Support "testing" mode.
1422 (WebCore::CaptionUserPreferences::setUserPrefersCaptions): Ditto.
1423 (WebCore::CaptionUserPreferences::registerForPreferencesChangedCallbacks): Ditto.
1424 (WebCore::CaptionUserPreferences::unregisterForPreferencesChangedCallbacks): Ditto.
1425 (WebCore::CaptionUserPreferences::setPreferredLanguage): Ditto.
1426 (WebCore::CaptionUserPreferences::preferredLanguages): Ditto.
1427 (WebCore::CaptionUserPreferences::testingMode): Ditto.
1428 (WebCore::CaptionUserPreferences::setTestingMode): Ditto.
1429 (WebCore::CaptionUserPreferences::CaptionUserPreferences): Ditto.
1431 * page/CaptionUserPreferencesMac.h:
1432 * page/CaptionUserPreferencesMac.mm:
1433 (WebCore::CaptionUserPreferencesMac::userPrefersCaptions): Support "testing" mode.
1434 (WebCore::CaptionUserPreferencesMac::setUserPrefersCaptions): Ditto.
1435 (WebCore::CaptionUserPreferencesMac::userHasCaptionPreferences): Ditto.
1436 (WebCore::CaptionUserPreferencesMac::registerForPreferencesChangedCallbacks): Change name from
1437 registerForCaptionPreferencesChangedCallbacks. Support "testing" mode.
1438 (WebCore::CaptionUserPreferencesMac::unregisterForPreferencesChangedCallbacks): Change name from
1439 unregisterForCaptionPreferencesChangedCallbacks. Support "testing" mode.
1440 (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): Support "testing" mode.
1441 (WebCore::CaptionUserPreferencesMac::captionFontSizeScale): Ditto.
1442 (WebCore::CaptionUserPreferencesMac::setPreferredLanguage): Ditto.
1443 (WebCore::CaptionUserPreferencesMac::preferredLanguages): Ditto. Return the platform override when set.
1445 * page/PageGroup.cpp:
1446 (WebCore::PageGroup::registerForCaptionPreferencesChangedCallbacks): Remove because it is already
1447 available from the caption preference object.
1448 (WebCore::PageGroup::unregisterForCaptionPreferencesChangedCallbacks): Ditto.
1449 (WebCore::PageGroup::userPrefersCaptions): Ditto.
1450 (WebCore::PageGroup::userHasCaptionPreferences): Ditto.
1451 (WebCore::PageGroup::captionFontSizeScale): Ditto.
1454 * platform/Language.cpp:
1455 (WebCore::preferredLanguageFromList): Take the list of preferred languages instead of assuming
1457 * platform/Language.h:
1459 * testing/Internals.cpp:
1460 (WebCore::Internals::resetToConsistentState): Disable caption testing mode.
1461 (WebCore::Internals::Internals): Enable caption testing mode so the user's system
1462 preferences are not modified.
1464 2013-02-11 Huang Dongsung <luxtella@company100.net>
1466 Coordinated Graphics: Make CoordinatedGraphicsScene not know contents size.
1467 https://bugs.webkit.org/show_bug.cgi?id=108922
1469 Reviewed by Noam Rosenthal.
1471 Currently, CoordinatedGraphicsScene has two methods to know contents
1472 size: setContentsSize() and setVisibleContentsRect(). Contents size is
1473 used when adjusting a scroll position, but adjustment is not needed
1474 because EFL and Qt platform code (currently PageViewportController)
1475 already adjusts a scroll position, and it is natural for each platform
1476 to be in charge of adjusting. So this patch makes CoordinatedGraphicsScene
1477 not know contents size.
1479 In addition, now DrawingAreaProxy::coordinatedLayerTreeHostProxy() is only used
1480 to get CoordinatedGraphicsScene.
1482 This patch can only be tested manually since there is no automated
1483 testing facilities for in-motion touch.
1484 Test: ManualTests/fixed-position.html
1485 ManualTests/nested-fixed-position.html
1487 * platform/graphics/texmap/TextureMapperLayer.cpp:
1488 (WebCore::TextureMapperLayer::setScrollPositionDeltaIfNeeded):
1489 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1490 (WebCore::CoordinatedGraphicsScene::setScrollPosition):
1491 (WebCore::CoordinatedGraphicsScene::adjustPositionForFixedLayers):
1492 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
1493 (CoordinatedGraphicsScene):
1495 2013-02-11 Huang Dongsung <luxtella@company100.net>
1497 Coordinated Graphics: remove the DidChangeScrollPosition message.
1498 https://bugs.webkit.org/show_bug.cgi?id=108051
1500 Reviewed by Noam Rosenthal.
1501 Signed off for WebKit2 by Benjamin Poulain.
1503 Currently, we use the DidChangeScrollPosition message to send the scroll
1504 position that WebCore used in this frame to UI Process. We had to have
1505 some member variables for the DidChangeScrollPosition message.
1506 However, we can send a scroll position via the DidRenderFrame message,
1507 because CoordinatedGraphicsScene::m_renderedContentsScrollPosition is
1508 updated at the moment of flushing. So we can remove the
1509 DidChangeScrollPosition message and some redundant member variables.
1511 No tests. No change in behavior.
1513 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1514 (WebCore::CoordinatedGraphicsScene::flushLayerChanges):
1515 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
1516 (CoordinatedGraphicsScene):
1518 2013-02-11 Ryosuke Niwa <rniwa@webkit.org>
1520 Disable delete button controller on non-Mac ports and delete EditorClient::shouldShowDeleteInterface
1521 https://bugs.webkit.org/show_bug.cgi?id=109534
1523 Reviewed by Anders Carlsson.
1525 * editing/DeleteButtonController.cpp:
1526 (WebCore::DeleteButtonController::show):
1527 * editing/Editor.cpp:
1531 * loader/EmptyClients.h:
1532 (WebCore::EmptyEditorClient::shouldDeleteRange):
1533 (EmptyEditorClient):
1534 (WebCore::EmptyEditorClient::shouldShowDeleteInterface):
1535 * page/EditorClient.h:
1538 2013-02-11 Hayato Ito <hayato@chromium.org>
1540 Factor EventContext and introduces MouseOrFocusEventContext.
1541 https://bugs.webkit.org/show_bug.cgi?id=109278
1543 Reviewed by Dimitri Glazkov.
1545 To supoort Touch event retargeting (bug 107800), we have to factor
1546 event retargeting code so that it can support not only MouseEvent or FocusEvent,
1547 but also other events.
1549 This is the first attempt to refactor event retargeting code, a
1550 separated patch from bug 109156. EventContext is now factored and
1551 MouseOrFocusEventContext was introduced to support MouseEvent or
1552 FocusEvent separately.
1554 In following patches, I'll introduce TouchEventContext and
1555 TouchEventDispatchMediator to support Touch event retargeting.
1557 No new tests. No change in functionality.
1559 * dom/EventContext.cpp:
1560 (WebCore::EventContext::EventContext): Factor relatedTarget out from EventContext into MouseOrFocusEventContext.
1561 (WebCore::EventContext::~EventContext):
1563 (WebCore::EventContext::handleLocalEvents):
1564 (WebCore::EventContext::isMouseOrFocusEventContext):
1565 (WebCore::MouseOrFocusEventContext::MouseOrFocusEventContext): New. Handles MouseEvent's (or FocusEvent's) relatedTarget retargeting.
1566 (WebCore::MouseOrFocusEventContext::~MouseOrFocusEventContext):
1567 (WebCore::MouseOrFocusEventContext::handleLocalEvents):
1568 (WebCore::MouseOrFocusEventContext::isMouseOrFocusEventContext):
1569 * dom/EventContext.h:
1571 (WebCore::EventContext::node):
1572 (WebCore::EventContext::target):
1573 (WebCore::EventContext::currentTargetSameAsTarget):
1575 (MouseOrFocusEventContext):
1576 (WebCore::MouseOrFocusEventContext::relatedTarget):
1577 (WebCore::MouseOrFocusEventContext::setRelatedTarget):
1578 * dom/EventDispatcher.cpp:
1579 (WebCore::EventRelatedTargetAdjuster::adjust):
1580 (WebCore::EventDispatcher::adjustRelatedTarget):
1581 (WebCore::EventDispatcher::ensureEventPath): Renamad from ensureEventAncestors. Use the DOM Core terminology.
1582 (WebCore::EventDispatcher::dispatchEvent):
1583 (WebCore::EventDispatcher::dispatchEventAtCapturing):
1584 (WebCore::EventDispatcher::dispatchEventAtTarget):
1585 (WebCore::EventDispatcher::dispatchEventAtBubbling):
1586 (WebCore::EventDispatcher::dispatchEventPostProcess):
1587 (WebCore::EventDispatcher::topEventContext):
1588 * dom/EventDispatcher.h:
1589 (EventRelatedTargetAdjuster):
1591 * inspector/InspectorInstrumentation.cpp:
1593 (WebCore::eventHasListeners):
1594 (WebCore::InspectorInstrumentation::willDispatchEventImpl):
1595 * inspector/InspectorInstrumentation.h:
1596 (InspectorInstrumentation):
1597 (WebCore::InspectorInstrumentation::willDispatchEvent):
1599 2013-02-11 peavo@outlook.com <peavo@outlook.com>
1601 [Curl] setCookiesFromDOM function does not save cookies to disk.
1602 https://bugs.webkit.org/show_bug.cgi?id=109285
1604 Reviewed by Brent Fulgham.
1606 Write cookies to disk by using the Curl easy api.
1608 * platform/network/curl/CookieJarCurl.cpp:
1609 (WebCore::setCookiesFromDOM):Write cookie to disk.
1610 * platform/network/curl/ResourceHandleManager.cpp:
1611 (WebCore::ResourceHandleManager::getCurlShareHandle): Added method to get Curl share handle.
1612 (WebCore::ResourceHandleManager::getCookieJarFileName): Added method to get cookie file name.
1613 * platform/network/curl/ResourceHandleManager.h: Added methods to get cookie file name, and Curl share handle.
1615 2013-02-11 Hayato Ito <hayato@chromium.org>
1617 Split each RuleSet and feature out from StyleResolver into its own class.
1618 https://bugs.webkit.org/show_bug.cgi?id=107777
1620 Reviewed by Dimitri Glazkov.
1622 Re-landing r141964, which was reverted in r141973, since r141964 seem to be innocent.
1624 No tests. No change in behavior.
1627 * GNUmakefile.list.am:
1630 * WebCore.xcodeproj/project.pbxproj:
1631 * css/CSSAllInOne.cpp:
1632 * css/DocumentRuleSets.cpp: Added.
1634 (WebCore::DocumentRuleSets::DocumentRuleSets):
1635 (WebCore::DocumentRuleSets::~DocumentRuleSets):
1636 (WebCore::DocumentRuleSets::initUserStyle): New helper to initialize each RuleSets.
1637 (WebCore::DocumentRuleSets::collectRulesFromUserStyleSheets): Factored out from StyleResolver.
1638 (WebCore::makeRuleSet): Ditto.
1639 (WebCore::DocumentRuleSets::resetAuthorStyle): Ditto.
1640 (WebCore::DocumentRuleSets::appendAuthorStyleSheets): Ditto.
1641 (WebCore::DocumentRuleSets::collectFeatures): Ditto.
1642 (WebCore::DocumentRuleSets::reportMemoryUsage): New methods to report memory usage. Factored out from StyleResolver.
1643 * css/DocumentRuleSets.h: Added.
1646 (WebCore::DocumentRuleSets::authorStyle): Moved from StyleResolver.
1647 (WebCore::DocumentRuleSets::userStyle): Ditto.
1648 (WebCore::DocumentRuleSets::features): Ditto.
1649 (WebCore::DocumentRuleSets::sibling): Ditto.
1650 (WebCore::DocumentRuleSets::uncommonAttribute): Ditto.
1651 * css/StyleResolver.cpp:
1652 (WebCore::StyleResolver::StyleResolver):
1653 (WebCore::StyleResolver::appendAuthorStyleSheets): Now calls DocumentRuleSets::appendAuthorStyleSheets.
1654 (WebCore::StyleResolver::matchAuthorRules): Use m_ruleSets.
1655 (WebCore::StyleResolver::matchUserRules): Ditto.
1656 (WebCore::StyleResolver::classNamesAffectedByRules): Ditto.
1657 (WebCore::StyleResolver::locateCousinList): Ditto.
1658 (WebCore::StyleResolver::canShareStyleWithElement): Ditto.
1659 (WebCore::StyleResolver::locateSharedStyle): Ditto.
1660 (WebCore::StyleResolver::styleForPage): Ditto.
1661 (WebCore::StyleResolver::checkRegionStyle): Ditto.
1662 (WebCore::StyleResolver::applyProperty): Ditto.
1663 (WebCore::StyleResolver::reportMemoryUsage): Now calls DocumentRuleSets::reportMemoryUsage.
1664 * css/StyleResolver.h:
1665 (WebCore::StyleResolver::scopeResolver):
1667 (WebCore::StyleResolver::ruleSets): accessor r to DocumentRuleSets.
1668 (WebCore::StyleResolver::usesSiblingRules): Use m_ruleSets.
1669 (WebCore::StyleResolver::usesFirstLineRules): Ditto.
1670 (WebCore::StyleResolver::usesBeforeAfterRules): Ditto.
1671 (WebCore::StyleResolver::hasSelectorForAttribute): Ditto.
1672 (WebCore::StyleResolver::hasSelectorForClass): Ditto.
1673 (WebCore::StyleResolver::hasSelectorForId): Ditto.
1674 * dom/DocumentStyleSheetCollection.cpp:
1675 (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
1677 2013-02-11 Keishi Hattori <keishi@webkit.org>
1679 REGRESSION (r140778):Calendar Picker buttons are wrong when rtl
1680 https://bugs.webkit.org/show_bug.cgi?id=109158
1682 Reviewed by Kent Tamura.
1684 The calendar picker button's icon and position where wrong when rtl.
1687 Test: platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-ar.html
1689 * Resources/pagepopups/calendarPicker.css:
1690 (.year-month-button-left .year-month-button): Use -webkit-margin-end so the margin is applide to the right side.
1691 (.year-month-button-right .year-month-button): Use -webkit-margin-start so the margin is applide to the right side.
1692 (.today-clear-area .today-button): Use -webkit-margin-end so the margin is applide to the right side.
1693 * Resources/pagepopups/calendarPicker.js:
1694 (YearMonthController.prototype._attachLeftButtonsTo): Flip icon image when rtl.
1695 (YearMonthController.prototype._attachRightButtonsTo): Ditto.
1697 2013-02-11 KwangYong Choi <ky0.choi@samsung.com>
1699 REGRESSION (r142549): Remove web intents code
1700 https://bugs.webkit.org/show_bug.cgi?id=109532
1702 Reviewed by Nico Weber.
1704 Remove remaning code related to web intents.
1706 No new tests, no change on behavior.
1709 * bindings/js/JSIntentConstructor.cpp: Removed.
1711 2013-02-11 Kenneth Russell <kbr@google.com>
1713 Add temporary typedef to ANGLEWebKitBridge to support incompatible API upgrade
1714 https://bugs.webkit.org/show_bug.cgi?id=109127
1716 Reviewed by Dean Jackson.
1718 No new tests. Built and tested WebKit and Chromium with this change.
1720 * platform/graphics/ANGLEWebKitBridge.cpp:
1722 Define temporary typedef spanning int -> size_t change.
1723 (WebCore::getValidationResultValue):
1724 (WebCore::getSymbolInfo):
1725 Use temporary typedef.
1727 2013-02-11 Kentaro Hara <haraken@chromium.org>
1729 [V8] ScheduledAction::m_context can be empty, so we shouldn't
1730 retrieve an Isolate by using m_context->GetIsolate()
1731 https://bugs.webkit.org/show_bug.cgi?id=109523
1733 Reviewed by Adam Barth.
1735 Chromium bug: https://code.google.com/p/chromium/issues/detail?id=175307#makechanges
1737 Currently ScheduledAction is retrieving an Isolate by using m_context->GetIsolate().
1738 This can crash because ScheduledAction::m_context can be empty. Specifically,
1739 ScheduledAction::m_context is set to ScriptController::currentWorldContext(),
1740 which can return an empty handle when a frame does not exist. In addition,
1741 'if(context.IsEmpty())' in ScheduledAction.cpp implies that it can be empty.
1743 Alternately, we should pass an Isolate explicitly when a ScheduledAction is instantiated.
1745 No tests. The Chromium crash report doesn't provide enough information
1746 to reproduce the bug.
1748 * bindings/v8/ScheduledAction.cpp:
1749 (WebCore::ScheduledAction::ScheduledAction):
1751 (WebCore::ScheduledAction::~ScheduledAction):
1752 * bindings/v8/ScheduledAction.h:
1754 * bindings/v8/custom/V8DOMWindowCustom.cpp:
1755 (WebCore::WindowSetTimeoutImpl):
1756 * bindings/v8/custom/V8WorkerContextCustom.cpp:
1757 (WebCore::SetTimeoutOrInterval):
1759 2013-02-11 Adenilson Cavalcanti <cavalcantii@gmail.com>
1761 Build fix: r142549 broke EFL build
1762 https://bugs.webkit.org/show_bug.cgi?id=109527
1764 Reviewed by Kentaro Hara.
1766 No new tests, no change on behavior.
1770 2013-02-11 Simon Fraser <simon.fraser@apple.com>
1772 REGRESSION (r142520?): Space no longer scrolls the page
1773 https://bugs.webkit.org/show_bug.cgi?id=109526
1775 Reviewed by Tim Horton.
1777 ScrollingTree::updateTreeFromStateNode() used to bail early when it had
1778 no children (no fixed or sticky elements), but that left updateAfterChildren()
1779 uncalled. Fix by always calling updateAfterChildren(), which updates the scroll
1782 * page/scrolling/ScrollingTree.cpp:
1783 (WebCore::ScrollingTree::updateTreeFromStateNode):
1785 2013-02-11 Tim Horton <timothy_horton@apple.com>
1787 Remove extra early-return in FrameView::setScrollPosition
1789 Rubber-stamped by Simon Fraser.
1791 * page/FrameView.cpp:
1792 (WebCore::FrameView::setScrollPosition):
1794 2013-02-11 Arko Saha <arko@motorola.com>
1796 [Microdata] Fix crash after r141034 in chromuim port
1797 https://bugs.webkit.org/show_bug.cgi?id=109514
1799 Reviewed by Ryosuke Niwa.
1801 Added V8SkipVTableValidation extended attribute to skip
1802 VTable validation check for DOMSettableTokenList interface.
1804 This patch fixes below test failures:
1805 Tests: fast/dom/MicroData/domsettabletokenlist-attributes-add-token.html
1806 fast/dom/MicroData/domsettabletokenlist-attributes-out-of-range-index.html
1807 fast/dom/MicroData/element-with-empty-itemprop.html
1808 fast/dom/MicroData/itemprop-add-remove-tokens.html
1809 fast/dom/MicroData/itemprop-for-an-element-must-be-correct.html
1810 fast/dom/MicroData/itemprop-must-be-read-only.html
1811 fast/dom/MicroData/itemprop-reflected-by-itemProp-property.html
1812 fast/dom/MicroData/itemref-add-remove-tokens.html
1813 fast/dom/MicroData/itemref-attribute-reflected-by-itemRef-property.html
1814 fast/dom/MicroData/itemref-for-an-element-must-be-correct.html
1815 fast/dom/MicroData/itemref-must-be-read-only.html
1816 fast/dom/MicroData/itemtype-add-remove-tokens.html
1817 fast/dom/MicroData/itemtype-attribute-test.html
1818 fast/dom/MicroData/microdata-domtokenlist-attribute-add-remove-tokens.html
1819 fast/dom/MicroData/properties-collection-namedgetter-with-invalid-name.html
1820 fast/dom/MicroData/propertynodelist-add-remove-itemprop-tokens.html
1821 fast/dom/MicroData/propertynodelist-add-remove-itemref-tokens.html
1823 * html/DOMSettableTokenList.idl:
1825 2013-02-11 Adam Barth <abarth@webkit.org>
1827 Load event fires too early with threaded HTML parser (take 2)
1828 https://bugs.webkit.org/show_bug.cgi?id=109485
1830 Reviewed by Eric Seidel.
1832 This patch restores the code that was removed in
1833 http://trac.webkit.org/changeset/142492 and adds code to
1834 DocumentLoader.cpp to avoid the regression.
1837 (WebCore::Document::hasActiveParser):
1838 (WebCore::Document::decrementActiveParserCount):
1839 * loader/DocumentLoader.cpp:
1840 (WebCore::DocumentLoader::isLoadingInAPISense):
1842 2013-02-11 Eric Seidel <eric@webkit.org>
1844 Fold HTMLTokenizerState back into HTMLTokenizer now that MarkupTokenizerBase is RFG
1845 https://bugs.webkit.org/show_bug.cgi?id=109502
1847 Reviewed by Tony Gentilcore.
1849 Just a search replace of HTMLTokenizerState with HTMLTokenizer and moving the enum.
1850 This restores us to the peacefull world pre-NEW_XML.
1852 * html/parser/BackgroundHTMLParser.cpp:
1853 (WebCore::BackgroundHTMLParser::forcePlaintextForTextDocument):
1854 (WebCore::BackgroundHTMLParser::simulateTreeBuilder):
1855 * html/parser/HTMLDocumentParser.cpp:
1856 (WebCore::tokenizerStateForContextElement):
1857 (WebCore::HTMLDocumentParser::forcePlaintextForTextDocument):
1858 (WebCore::HTMLDocumentParser::pumpTokenizer):
1859 * html/parser/HTMLTokenizer.cpp:
1860 (WebCore::isEndTagBufferingState):
1862 (WebCore::HTMLTokenizer::reset):
1863 (WebCore::HTMLTokenizer::flushEmitAndResumeIn):
1864 (WebCore::HTMLTokenizer::nextToken):
1865 (WebCore::HTMLTokenizer::updateStateFor):
1866 * html/parser/HTMLTokenizer.h:
1868 (WebCore::HTMLTokenizer::create):
1869 (WebCore::HTMLTokenizer::shouldSkipNullCharacters):
1870 (WebCore::HTMLTokenizer::emitEndOfFile):
1871 * html/parser/HTMLTreeBuilder.cpp:
1872 (WebCore::HTMLTreeBuilder::processStartTagForInBody):
1873 (WebCore::HTMLTreeBuilder::processEndTag):
1874 (WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag):
1875 (WebCore::HTMLTreeBuilder::processGenericRawTextStartTag):
1876 (WebCore::HTMLTreeBuilder::processScriptStartTag):
1877 * html/parser/TextViewSourceParser.cpp:
1878 (WebCore::TextViewSourceParser::TextViewSourceParser):
1880 2013-02-11 Kentaro Hara <haraken@chromium.org>
1882 Build fix after r142528
1883 https://bugs.webkit.org/show_bug.cgi?id=109520
1885 Reviewed by Eric Seidel.
1887 r142528 changed GIFImageReader from a struct to a class.
1888 We also need to fix a forward declaration.
1892 * platform/image-decoders/gif/GIFImageDecoder.h:
1894 2013-02-11 Nico Weber <thakis@chromium.org>
1896 Remove web intents code
1897 https://bugs.webkit.org/show_bug.cgi?id=109501
1899 Reviewed by Eric Seidel.
1901 See thread "Removing ENABLE(WEB_INTENTS) code" on webkit-dev.
1903 * DerivedSources.make:
1904 * Modules/intents/DOMWindowIntents.cpp: Removed.
1905 * Modules/intents/DOMWindowIntents.h: Removed.
1906 * Modules/intents/DOMWindowIntents.idl: Removed.
1907 * Modules/intents/DeliveredIntent.cpp: Removed.
1908 * Modules/intents/DeliveredIntent.h: Removed.
1909 * Modules/intents/DeliveredIntent.idl: Removed.
1910 * Modules/intents/Intent.cpp: Removed.
1911 * Modules/intents/Intent.h: Removed.
1912 * Modules/intents/Intent.idl: Removed.
1913 * Modules/intents/IntentRequest.cpp: Removed.
1914 * Modules/intents/IntentRequest.h: Removed.
1915 * Modules/intents/IntentResultCallback.h: Removed.
1916 * Modules/intents/IntentResultCallback.idl: Removed.
1917 * Modules/intents/NavigatorIntents.cpp: Removed.
1918 * Modules/intents/NavigatorIntents.h: Removed.
1919 * Modules/intents/NavigatorIntents.idl: Removed.
1920 * WebCore.gyp/WebCore.gyp:
1922 * bindings/generic/RuntimeEnabledFeatures.cpp:
1924 * bindings/generic/RuntimeEnabledFeatures.h:
1925 (RuntimeEnabledFeatures):
1926 * bindings/v8/custom/V8IntentCustom.cpp: Removed.
1927 * html/HTMLElementsAllInOne.cpp:
1928 * html/HTMLIntentElement.cpp: Removed.
1929 * html/HTMLIntentElement.h: Removed.
1930 * html/HTMLIntentElement.idl: Removed.
1931 * loader/EmptyClients.cpp:
1932 * loader/EmptyClients.h:
1933 (EmptyFrameLoaderClient):
1934 * loader/FrameLoaderClient.h:
1936 * page/DOMWindow.idl:
1938 2013-02-11 Eric Seidel <eric@webkit.org>
1940 Fix Mac build after http://trac.webkit.org/changeset/142535.
1942 Unreviewed build fix.
1944 * html/parser/HTMLTokenizer.h:
1945 (WebCore::HTMLTokenizer::emitAndReconsumeIn):
1947 2013-02-11 David Farler <dfarler@apple.com>
1949 Make WebCore Derived Sources work with SDK identifiers too
1950 https://bugs.webkit.org/show_bug.cgi?id=109324
1952 Reviewed by Sam Weinig.
1954 * WebCore.xcodeproj/project.pbxproj: Pass SDKROOT to make for DerivedSources.make
1956 2013-02-11 Zhenyao Mo <zmo@google.com>
1958 WEBGL_compressed_texture_s3tc extension can be enabled even when not supported
1959 https://bugs.webkit.org/show_bug.cgi?id=109508
1961 Reviewed by Kenneth Russell.
1963 * html/canvas/WebGLRenderingContext.cpp:
1965 (WebCore::WebGLRenderingContext::getExtension): Check whether the extension support is there before returning the extension pointer.
1967 2013-02-11 Emil A Eklund <eae@chromium.org>
1969 Change RenderFrameSet::paint to use m-rows/m_cols directly.
1970 https://bugs.webkit.org/show_bug.cgi?id=108503
1972 Reviewed by Eric Seidel.
1974 Test: fast/frames/invalid-frameset.html
1976 * rendering/RenderFrameSet.cpp:
1977 (WebCore::RenderFrameSet::paint):
1979 2013-02-11 Yong Li <yoli@rim.com>
1981 XMLHttpRequestProgressEventThrottle::resume() always schedules timer even when unnecessary
1982 https://bugs.webkit.org/show_bug.cgi?id=105348
1984 Reviewed by Alexey Proskuryakov.
1986 Let resume() clear the defer flag and return if there is deferred events to dispatch.
1988 No new tests as this should not affect existing cross-platform behavior. It should be
1989 OK as long as it doesn't break anything.
1991 * xml/XMLHttpRequestProgressEventThrottle.cpp:
1992 (WebCore::XMLHttpRequestProgressEventThrottle::resume):
1994 2013-02-11 Eric Seidel <eric@webkit.org>
1996 Fold MarkupTokenizerBase into HTMLTokenizer now that it is the only subclass
1997 https://bugs.webkit.org/show_bug.cgi?id=109499
1999 Reviewed by Adam Barth.
2001 For great justice. And sanity.
2002 Epic amount of template code deleted.
2004 * GNUmakefile.list.am:
2007 * WebCore.vcproj/WebCore.vcproj:
2008 * WebCore.vcxproj/WebCore.vcxproj:
2009 * WebCore.vcxproj/WebCore.vcxproj.filters:
2010 * WebCore.xcodeproj/project.pbxproj:
2011 * html/parser/HTMLTokenizer.cpp:
2012 (WebCore::HTMLTokenizer::HTMLTokenizer):
2013 * html/parser/HTMLTokenizer.h:
2016 (WebCore::HTMLTokenizer::state):
2017 (WebCore::HTMLTokenizer::setState):
2018 (WebCore::HTMLTokenizer::shouldSkipNullCharacters):
2019 (WebCore::HTMLTokenizer::bufferCharacter):
2020 (WebCore::HTMLTokenizer::emitAndResumeIn):
2021 (WebCore::HTMLTokenizer::emitAndReconsumeIn):
2022 (WebCore::HTMLTokenizer::emitEndOfFile):
2023 (WebCore::HTMLTokenizer::haveBufferedCharacterToken):
2024 * xml/parser/MarkupTokenizerBase.h: Removed.
2026 2013-02-11 Anton Vayvod <avayvod@chromium.org>
2028 [Text Autosizing] Collect narrow descendants and process them separately. Refactoring for
2030 https://bugs.webkit.org/show_bug.cgi?id=109054
2032 Preparational change to combine narrow descendants of the same autosizing cluster into
2033 groups by the width difference between the descendant and the block containing all text of
2034 the parent autosizing cluster. The groups will be autosized with the same multiplier.
2036 For example, on sites with a sidebar, sometimes the paragraphs next to the sidebar will have
2037 a large margin individually applied (via a CSS selector), causing them all to individually
2038 appear narrower than their enclosing blockContainingAllText. Rather than making each of
2039 these paragraphs into a separate cluster, we eventually want to be able to merge them back
2040 together into one (or a few) descendant clusters.
2042 Reviewed by Julien Chaffraix.
2044 No behavioral changes thus no new tests or test changes.
2046 * rendering/TextAutosizer.cpp:
2047 (TextAutosizingClusterInfo): Vector of narrow descendants.
2048 (WebCore::TextAutosizer::processCluster): Process narrow descendants separately.
2049 (WebCore::TextAutosizer::processContainer):
2051 Remember narrow descendants of the parent cluster for later processing.
2053 2013-02-11 Enrica Casucci <enrica@apple.com>
2055 Add ENABLE_DELETION_UI to control the use of the deletion UI.
2056 https://bugs.webkit.org/show_bug.cgi?id=109463.
2058 Reviewed by Ryosuke Niwa.
2060 This patch adds #if ENABLE(DELETION_UI) in every spot where
2061 DeleteButtonController is used. This class is now only instantiated
2062 if the feature is enabled. I've also done some cleanup in the
2063 DeleteButtonController class, removing unused methods and making
2064 private some methods only used internally to the class.
2065 Both DeleteButtonController and DeleteButton classes are now excluded
2066 from the compilation if the feature is not enabled.
2068 No new tests, no change of functionality.
2070 * dom/ContainerNode.cpp:
2071 (WebCore::ContainerNode::cloneChildNodes):
2072 * editing/CompositeEditCommand.cpp:
2073 (WebCore::EditCommandComposition::unapply):
2074 (WebCore::EditCommandComposition::reapply):
2075 (WebCore::CompositeEditCommand::apply):
2076 * editing/DeleteButton.cpp:
2077 * editing/DeleteButtonController.cpp:
2078 * editing/DeleteButtonController.h: Some cleanup.
2079 (WebCore::DeleteButtonController::enabled): Made private.
2080 * editing/EditCommand.cpp:
2081 (WebCore::EditCommand::EditCommand):
2082 * editing/Editor.cpp:
2083 (WebCore::Editor::notifyComponentsOnChangedSelection):
2084 (WebCore::Editor::Editor):
2085 (WebCore::Editor::rangeForPoint):
2086 (WebCore::Editor::deviceScaleFactorChanged):
2088 * editing/htmlediting.cpp: avoidIntersectionWithNode is
2089 used only if the feature is enabled.
2090 * editing/htmlediting.h:
2091 * editing/markup.cpp:
2092 (WebCore::createMarkup):
2093 (WebCore::createFragmentFromNodes):
2094 * rendering/RenderTable.cpp: Removed unnecessary include
2095 fo DeleteButtonController.h
2097 2013-02-11 Rafael Weinstein <rafaelw@chromium.org>
2099 [HTMLTemplateElement] <template> inside of <head> may not create <body> if EOF is hit
2100 https://bugs.webkit.org/show_bug.cgi?id=109338
2102 Reviewed by Adam Barth.
2104 This patch adds the logic to clear the stack of open elements back to the first <template> when EOF
2105 is hit. This allows a <body> to be generated if the initial <template> was opened inside of <head>.
2107 Tests added to html5lib.
2109 * html/parser/HTMLTreeBuilder.cpp:
2111 (WebCore::HTMLTreeBuilder::popAllTemplates):
2112 (WebCore::HTMLTreeBuilder::processEndTag):
2113 (WebCore::HTMLTreeBuilder::processEndOfFile):
2114 * html/parser/HTMLTreeBuilder.h:
2117 2013-02-11 Andreas Kling <akling@apple.com>
2119 RenderText::isAllCollapsibleWhitespace() shouldn't upconvert string to 16-bit.
2120 <http://webkit.org/b/109354>
2122 Reviewed by Eric Seidel.
2124 254 KB progression on Membuster3.
2126 * rendering/RenderText.cpp:
2127 (WebCore::RenderText::isAllCollapsibleWhitespace):
2129 2013-02-11 Alpha Lam <hclam@chromium.org>
2131 Fix code style violations in GIFImageReader.{cc|h}
2132 https://bugs.webkit.org/show_bug.cgi?id=109007
2134 Reviewed by Stephen White.
2136 This is just a style clean up for GIFImageReader.{cc|h}.
2138 There's going to be a lot changes in these two files and style check
2139 will add a lot of noise in later reviews. Fix style problems first.
2141 There is no change in logic at all. Just style fixes.
2145 * platform/image-decoders/gif/GIFImageDecoder.cpp:
2146 (WebCore::GIFImageDecoder::frameCount):
2147 (WebCore::GIFImageDecoder::repetitionCount):
2148 (WebCore::GIFImageDecoder::haveDecodedRow):
2149 (WebCore::GIFImageDecoder::initFrameBuffer):
2150 * platform/image-decoders/gif/GIFImageReader.cpp:
2151 (GIFImageReader::outputRow):
2152 (GIFImageReader::doLZW):
2153 (GIFImageReader::read):
2154 * platform/image-decoders/gif/GIFImageReader.h:
2156 (GIFFrameContext::GIFFrameContext):
2157 (GIFFrameContext::~GIFFrameContext):
2158 (GIFImageReader::GIFImageReader):
2159 (GIFImageReader::~GIFImageReader):
2161 (GIFImageReader::imagesCount):
2162 (GIFImageReader::loopCount):
2163 (GIFImageReader::globalColormap):
2164 (GIFImageReader::globalColormapSize):
2165 (GIFImageReader::frameContext):
2167 2013-02-11 Bem Jones-Bey <bjonesbe@adobe.com>
2169 [CSS Exclusions] Handle shape-outside changing a float's overhang behavior
2170 https://bugs.webkit.org/show_bug.cgi?id=106927
2172 Reviewed by Julien Chaffraix.
2174 When the position on a shape outside causes a float to spill out into
2175 another block than it's container, it was not being drawn correctly. It
2176 became apparent that in order to fix this properly, the approach to
2177 positioning shape outsides and floats needed to be changed. The new
2178 approach also fixes some other outstanding issues, like hit detection.
2180 When a float has a shape outside, inline and float layout happens
2181 using the exclusion shape bounds instead of the float's box. The
2182 effect of this is that the float itself no longer has any effect on
2183 layout, both with respect to positioning of the float's siblings as
2184 well as positioning the float's box. This means that when the float is
2185 positioned, it is the shape's box that must obey the positioning rules
2186 for floats. When the shape is given a position relative to the float's
2187 box, the rules for float positioning determine where the shape sits
2188 in the parent, causing the float's box to be offset by the position of
2189 the shape. Since the float's box does not affect layout (due to the
2190 shape), this is similar to relative positioning in that the offset is
2191 a paint time occurrence.
2193 So the new approach is to implement positioning of shape outside on
2194 floats similar to how relative positioning is implemented, using a
2197 This is also tested by the existing tests for shape outside on floats positioning.
2199 Test: fast/exclusions/shape-outside-floats/shape-outside-floats-overhang.html
2201 * rendering/ExclusionShapeOutsideInfo.h:
2202 (WebCore::ExclusionShapeOutsideInfo::shapeLogicalOffset): Utility method to create a LayoutSize for computing the layer offset.
2203 (ExclusionShapeOutsideInfo):
2204 * rendering/LayoutState.cpp:
2205 (WebCore::LayoutState::LayoutState): Check for floats with shape outside as well as in flow positioning.
2206 * rendering/RenderBlock.cpp:
2207 (WebCore::RenderBlock::flipFloatForWritingModeForChild): Remove old positioning implementation.
2208 (WebCore::RenderBlock::paintFloats): Remove old positioning implementation.
2209 (WebCore::RenderBlock::blockSelectionGaps): Check for floats with shape outside as well as in flow positioning.
2210 (WebCore::RenderBlock::positionNewFloats): Remove old positioning implementation.
2211 (WebCore::RenderBlock::addOverhangingFloats): Remove FIXME.
2212 (WebCore::positionForPointRespectingEditingBoundaries): Check for floats with shape outside as well as in flow positioning.
2213 * rendering/RenderBlock.h:
2214 (RenderBlock): Remove old positioning implementation.
2215 (WebCore::RenderBlock::xPositionForFloatIncludingMargin): Remove old positioning implementation.
2216 (WebCore::RenderBlock::yPositionForFloatIncludingMargin): Remove old positioning implementation.
2217 * rendering/RenderBox.cpp:
2218 (WebCore::RenderBox::mapLocalToContainer): Check for floats with shape outside as well as in flow positioning.
2219 (WebCore::RenderBox::offsetFromContainer): Check for floats with shape outside as well as in flow positioning.
2220 (WebCore::RenderBox::computeRectForRepaint): Check for floats with shape outside as well as in flow positioning.
2221 (WebCore::RenderBox::layoutOverflowRectForPropagation): Check for floats with shape outside as well as in flow positioning.
2222 * rendering/RenderBox.h: Make floats with shape outside get a layer.
2223 * rendering/RenderBoxModelObject.cpp:
2224 (WebCore::RenderBoxModelObject::paintOffset): Method to return in flow
2225 positioning offset + offset from shape outside on floats.
2226 * rendering/RenderBoxModelObject.h:
2227 (RenderBoxModelObject): Add paintOffset method.
2228 * rendering/RenderInline.cpp:
2229 (WebCore::RenderInline::clippedOverflowRectForRepaint): Check for floats with shape outside as well as in flow positioning.
2230 (WebCore::RenderInline::computeRectForRepaint): Check for floats with shape outside as well as in flow positioning.
2231 (WebCore::RenderInline::mapLocalToContainer): Check for floats with shape outside as well as in flow positioning.
2232 * rendering/RenderLayer.cpp:
2233 (WebCore::RenderLayer::updateLayerPosition): Check for floats with shape outside as well as in flow positioning.
2234 (WebCore::RenderLayer::calculateClipRects): Check for floats with shape outside as well as in flow positioning.
2235 * rendering/RenderLayer.h:
2236 (WebCore::RenderLayer::paintOffset): Rename offsetForInFlowPosition to reflect that it's not just for
2237 in flow positioning, it also reflects shape outside position on floats.
2239 * rendering/RenderObject.h:
2240 (WebCore::RenderObject::hasPaintOffset): Determines if this object is in flow positioined or is a float with shape outside.
2241 * rendering/style/RenderStyle.h: Add hasPaintOffset method, analagous to method with same name on RenderObject.
2243 2013-02-11 Tim Horton <timothy_horton@apple.com>
2245 FrameView::setScrollPosition should clamp scroll position before handing it to
2246 ScrollingCoordinator instead of depending on ScrollView to do this
2247 https://bugs.webkit.org/show_bug.cgi?id=109497
2248 <rdar://problem/12631789>
2250 Reviewed by Simon Fraser.
2252 Clamp scroll position before handing it to ScrollingCoordinator. Also, like ScrollView does,
2253 bail out if we've already scrolled to the clamped scroll position.
2255 Test: platform/mac-wk2/tiled-drawing/clamp-out-of-bounds-scrolls.html
2257 * page/FrameView.cpp:
2258 (WebCore::FrameView::setScrollPosition):
2260 2013-02-11 Adam Barth <abarth@webkit.org>
2262 The threaded HTML parser should pass all the fast/parser tests
2263 https://bugs.webkit.org/show_bug.cgi?id=109486
2265 Reviewed by Tony Gentilcore.
2267 This patch fixes the last two test failures in fast/parser, which were
2268 crashes caused by not having a tokenizer when document.close() was
2269 called. (The tokenizer is created lazily by calls to document.write,
2270 which might not happen before document.close).
2272 fast/parser/document-close-iframe-load.html
2273 fast/parser/document-close-nested-iframe-load.html
2275 In addition, I've added a new test to make sure we flush the tokenizer
2276 properly in these cases.
2278 Test: fast/parser/document-close-iframe-load-partial-entity.html
2280 * html/parser/HTMLDocumentParser.cpp:
2281 (WebCore::HTMLDocumentParser::prepareToStopParsing):
2282 (WebCore::HTMLDocumentParser::pumpTokenizer):
2284 2013-02-11 Bruno de Oliveira Abinader <bruno.abinader@basyskom.com>
2286 [texmap] Implement frames-per-second debug counter
2287 https://bugs.webkit.org/show_bug.cgi?id=107942
2289 Reviewed by Noam Rosenthal.
2291 Adds FPS counter via WEBKIT_SHOW_FPS=<interval> environment variable,
2292 where <interval> is the period in seconds (i.e. =1.5) between FPS
2293 updates on screen. It is measured by counting
2294 CoordinatedGraphicsScene::paintTo* calls and is painted using
2295 drawRepaintCounter() after TextureMapperLayer has finished painting its
2298 Visual debugging feature, no need for new tests.
2300 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
2301 (WebCore::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
2302 (WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext):
2303 (WebCore::CoordinatedGraphicsScene::paintToGraphicsContext):
2304 (WebCore::CoordinatedGraphicsScene::updateFPS):
2305 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
2307 2013-02-11 Eric Seidel <eric@webkit.org>
2309 Fold MarkupTokenBase into HTMLToken now that it has no other subclasses
2310 https://bugs.webkit.org/show_bug.cgi?id=109483
2312 Reviewed by Adam Barth.
2314 This deletes an epic amount of template yuck, as well as removes
2315 a vtable !?! from HTMLToken.
2317 This paves the way for further cleanup of HTMLToken now that we
2318 can see the whole object at once.
2319 We'll also probably re-create an HTMLToken.cpp again, now that we're
2320 free from the chains of template nonsense.
2322 * GNUmakefile.list.am:
2325 * WebCore.vcproj/WebCore.vcproj:
2326 * WebCore.vcxproj/WebCore.vcxproj:
2327 * WebCore.vcxproj/WebCore.vcxproj.filters:
2328 * WebCore.xcodeproj/project.pbxproj:
2329 * html/parser/HTMLToken.h:
2330 (WebCore::findAttributeInVector):
2335 (WebCore::HTMLToken::HTMLToken):
2336 (WebCore::HTMLToken::clear):
2337 (WebCore::HTMLToken::isUninitialized):
2338 (WebCore::HTMLToken::type):
2339 (WebCore::HTMLToken::makeEndOfFile):
2340 (WebCore::HTMLToken::startIndex):
2341 (WebCore::HTMLToken::endIndex):
2342 (WebCore::HTMLToken::setBaseOffset):
2343 (WebCore::HTMLToken::end):
2344 (WebCore::HTMLToken::data):
2345 (WebCore::HTMLToken::isAll8BitData):
2346 (WebCore::HTMLToken::name):
2347 (WebCore::HTMLToken::appendToName):
2348 (WebCore::HTMLToken::nameString):
2349 (WebCore::HTMLToken::selfClosing):
2350 (WebCore::HTMLToken::setSelfClosing):
2351 (WebCore::HTMLToken::beginStartTag):
2352 (WebCore::HTMLToken::beginEndTag):
2353 (WebCore::HTMLToken::addNewAttribute):
2354 (WebCore::HTMLToken::beginAttributeName):
2355 (WebCore::HTMLToken::endAttributeName):
2356 (WebCore::HTMLToken::beginAttributeValue):
2357 (WebCore::HTMLToken::endAttributeValue):
2358 (WebCore::HTMLToken::appendToAttributeName):
2359 (WebCore::HTMLToken::appendToAttributeValue):
2360 (WebCore::HTMLToken::attributes):
2361 (WebCore::HTMLToken::eraseValueOfAttribute):
2362 (WebCore::HTMLToken::ensureIsCharacterToken):
2363 (WebCore::HTMLToken::characters):
2364 (WebCore::HTMLToken::appendToCharacter):
2365 (WebCore::HTMLToken::comment):
2366 (WebCore::HTMLToken::beginComment):
2367 (WebCore::HTMLToken::appendToComment):
2368 (WebCore::HTMLToken::eraseCharacters):
2369 * html/parser/HTMLTokenTypes.h:
2370 * html/parser/XSSAuditor.h:
2371 * xml/parser/MarkupTokenBase.h: Removed.
2373 2013-02-11 Gavin Barraclough <barraclough@apple.com>
2375 PluginProcess should quit immediately if idle in response to low-memory notifications
2376 https://bugs.webkit.org/show_bug.cgi?id=109103
2377 <rdar://problem/12679827>
2379 Reviewed by Brady Eidson.
2381 This patch allows a process to set a custom callback for low memory warnings
2382 (defaulting to the current behaviour, as implemented in releaseMemory).
2384 * platform/MemoryPressureHandler.cpp:
2385 (WebCore::MemoryPressureHandler::MemoryPressureHandler):
2386 - Initialize m_lowMemoryHandler to releaseMemory.
2387 (WebCore::MemoryPressureHandler::install):
2388 (WebCore::MemoryPressureHandler::uninstall):
2389 (WebCore::MemoryPressureHandler::holdOff):
2390 - Cleaned up spacing.
2391 (WebCore::MemoryPressureHandler::releaseMemory):
2392 - Added null implementation for non-Mac builds.
2393 * platform/MemoryPressureHandler.h:
2394 (WebCore::MemoryPressureHandler::setLowMemoryHandler):
2395 - Added method to set m_lowMemoryHandler.
2396 * platform/mac/MemoryPressureHandlerMac.mm:
2397 (WebCore::MemoryPressureHandler::respondToMemoryPressure):
2398 - Changed to call releaseMemory via m_lowMemoryHandler.
2400 2013-02-11 Simon Fraser <simon.fraser@apple.com>
2402 REGRESSION (r133807): Sticky-position review bar on bugzilla review page is jumpy
2403 https://bugs.webkit.org/show_bug.cgi?id=104276
2404 <rdar://problem/12827187>
2406 Reviewed by Tim Horton.
2408 When committing new scrolling tree state, if the root node has a scroll
2409 position update, we would handle that before updating the state of child
2410 nodes (with possibly new viewport constraints). That would cause incorrect
2411 child layer updates.
2413 Fix by adding a second 'update' phase that happens after child nodes,
2414 and moving the scroll position update into that.
2416 Scrolling tests only dump the state tree, so cannot test the bug.
2418 * page/FrameView.cpp:
2419 (WebCore::FrameView::setScrollPosition): If the scroll position didn't
2420 actually change, don't request a scroll position update from the ScrollingCoordinator.
2421 * page/scrolling/ScrollingTree.cpp:
2422 (WebCore::ScrollingTree::updateTreeFromStateNode): Keep track of the scrolling node so
2423 that we can call updateAfterChildren() on it.
2424 * page/scrolling/ScrollingTreeNode.h:
2425 (ScrollingTreeNode):
2426 (WebCore::ScrollingTreeNode::updateAfterChildren):
2427 * page/scrolling/ScrollingTreeScrollingNode.cpp:
2428 (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
2429 * page/scrolling/ScrollingTreeScrollingNode.h:
2430 (ScrollingTreeScrollingNode):
2431 * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2432 (WebCore::ScrollingCoordinatorMac::updateViewportConstrainedNode):
2433 In the current bug the scrolling tree was scheduled for commit because of a
2434 scroll position request, but if only the viewport constraints change, we also need
2436 * page/scrolling/mac/ScrollingTreeFixedNode.h:
2437 (ScrollingTreeFixedNode):
2438 * page/scrolling/mac/ScrollingTreeFixedNode.mm:
2439 (WebCore::ScrollingTreeFixedNode::updateBeforeChildren):
2440 * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
2441 (ScrollingTreeScrollingNodeMac):
2442 * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
2443 (WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren):
2444 (WebCore::ScrollingTreeScrollingNodeMac::updateAfterChildren): Move code here
2445 that updates things that have to happen after children.
2446 * page/scrolling/mac/ScrollingTreeStickyNode.h:
2447 (ScrollingTreeStickyNode):
2448 * page/scrolling/mac/ScrollingTreeStickyNode.mm:
2449 (WebCore::ScrollingTreeStickyNode::updateBeforeChildren):
2451 2013-02-11 Roger Fong <roger_fong@apple.com>
2453 Unreviewed. Build fix for Win7 Release.
2454 Because of InspectorAllInOne.cpp static globals must be named differently in files included by InspectorAllInOne.
2455 This was the case for UserInitiatedProfileName. Also removed the repeated HeapProfileType definition in
2456 InspectorHeapProfilerAgent.cpp since it wasn't being used anyways.
2458 * inspector/InspectorHeapProfilerAgent.cpp:
2460 (WebCore::InspectorHeapProfilerAgent::takeHeapSnapshot):
2462 2013-02-11 Tony Gentilcore <tonyg@chromium.org>
2464 SegmentedString's copy ctor should copy all fields
2465 https://bugs.webkit.org/show_bug.cgi?id=109477
2467 Reviewed by Adam Barth.
2469 This fixes http/tests/inspector-enabled/document-write.html (and likely others) for the threaded HTML parser.
2471 No new tests because covered by existing tests.
2473 * platform/text/SegmentedString.cpp:
2474 (WebCore::SegmentedString::SegmentedString):
2476 2013-02-11 Joshua Bell <jsbell@chromium.org>
2478 IndexedDB: database connections don't close after versionchange transaction aborts
2479 https://bugs.webkit.org/show_bug.cgi?id=102298
2481 Reviewed by Tony Chang.
2483 Per spec, close the database if the "versionchange" transaction aborts.
2485 Tests: storage/indexeddb/aborted-versionchange-closes.html
2486 storage/indexeddb/lazy-index-population.html
2487 storage/objectstore-basics.html
2489 * Modules/indexeddb/IDBTransaction.cpp:
2490 (WebCore::IDBTransaction::onAbort): Tell the IDBDatabase (connection) to close if
2491 this was a "versionchange" transaction.
2493 2013-02-11 Christophe Dumez <ch.dumez@sisa.samsung.com>
2495 [EFL] fast/forms/number/number-l10n-input.html is failing
2496 https://bugs.webkit.org/show_bug.cgi?id=109440
2498 Reviewed by Laszlo Gombos.
2500 Use LocaleICU instead of LocaleNone on EFL port. The EFL
2501 port already depends on ICU library and we get additional
2502 functionality this way.
2504 No new tests, already covered by existing tests.
2507 * PlatformBlackBerry.cmake:
2508 * PlatformEfl.cmake:
2509 * PlatformWinCE.cmake:
2511 2013-02-11 Benjamin Poulain <benjamin@webkit.org>
2513 Kill TestRunner::setMinimumTimerInterval; implement the feature with InternalSettings
2514 https://bugs.webkit.org/show_bug.cgi?id=109349
2516 Reviewed by Sam Weinig.
2518 Expose setMinimumTimerInterval() and implement the backup/restore to keep
2519 a consistent state between tests.
2521 * testing/InternalSettings.cpp:
2522 (WebCore::InternalSettings::Backup::Backup):
2523 (WebCore::InternalSettings::Backup::restoreTo):
2524 (WebCore::InternalSettings::setMinimumTimerInterval):
2526 * testing/InternalSettings.h:
2529 * testing/InternalSettings.idl:
2531 2013-02-11 Dean Jackson <dino@apple.com>
2533 Source/WebCore: Snapshotted plug-in should use shadow root
2534 https://bugs.webkit.org/show_bug.cgi?id=108284
2536 Reviewed by Simon Fraser.
2538 Take three - relanding after rollout in r142400 that was caused by a global
2539 selector interfering with CSS Instrumentation in the Inspector.
2541 A snapshotted plugin needs to indicate to the user that it can be clicked
2542 to be restarted. Previously this was done with an image that had embedded
2543 text. Instead, we now use an internal shadow root to embed some markup that
2544 will display instructions that can be localised.
2546 The UA stylesheet for plug-ins provides a default styling for the label, which
2547 can be overridden by ports.
2549 In the process, RenderSnapshottedPlugIn no longer inherits from RenderEmbeddedObject,
2550 since it is only responsible for drawing a paused plug-in. The snapshot creation
2551 can work with the default renderer, but a shadow root requires something like
2552 RenderBlock in order to draw its children. We swap from one renderer to another when
2553 necessary either by creating the shadow root or by explicitly detaching and attaching
2556 Unfortunately this is difficult to test, because the snapshotting requires
2557 time to execute, and also a PluginView to be instantiated.
2560 (object::-webkit-snapshotted-plugin-content): New rules for a default label style.
2562 * platform/LocalizedStrings.cpp: Make sure all ports have plugin strings, now it is called.
2563 * platform/LocalizedStrings.h:
2564 * platform/blackberry/LocalizedStringsBlackBerry.cpp:
2565 * platform/chromium/LocalizedStringsChromium.cpp:
2566 * platform/efl/LocalizedStringsEfl.cpp:
2567 * platform/gtk/LocalizedStringsGtk.cpp:
2568 * platform/qt/LocalizedStringsQt.cpp:
2570 * html/HTMLPlugInElement.cpp:
2571 (WebCore::HTMLPlugInElement::defaultEventHandler): Take into account the fact
2572 that RenderSnapshottedPlugIn no longer is an embedded object.
2574 * html/HTMLPlugInImageElement.cpp:
2575 (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): New default values in constructor.
2576 (WebCore::HTMLPlugInElement::defaultEventHandler): Make sure to call base class.
2577 (WebCore::HTMLPlugInElement::willRecalcStyle): No need to reattach if we're a snapshot.
2578 (WebCore::HTMLPlugInImageElement::createRenderer): If we're showing a snapshot, create such
2579 a renderer, otherwise use the typical plug-in path.
2580 (WebCore::HTMLPlugInImageElement::updateSnapshot): Keep a record of the snapshot, since we'll
2581 need to give it to the renderer.
2582 (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Build a subtree that will display a label.
2583 * html/HTMLPlugInImageElement.h:
2584 (HTMLPlugInImageElement): New member variable to record the snapshot image and whether the label
2585 should show immediately.
2586 (WebCore::HTMLPlugInImageElement::swapRendererTimerFired): The callback function triggered when we need
2587 to swap to the Shadow Root.
2588 (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): The user has tapped on the snapshot so the plugin
2589 in being recreated. Make sure we reattach so that a plugin renderer will be created.
2590 (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Make sure we set the right
2591 displayState for snapshots.
2592 * html/HTMLPlugInImageElement.h:
2593 (HTMLPlugInImageElement): The new methods listed above.
2594 (WebCore::HTMLPlugInImageElement::setShouldShowSnapshotLabelAutomatically): Indicates whether or not
2595 a snapshot should be immediately labeled.
2597 * page/ChromeClient.h: No need for plugInStartLabelImage any more.
2599 * rendering/RenderSnapshottedPlugIn.cpp:
2600 (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): New inheritance.
2601 (WebCore::RenderSnapshottedPlugIn::paint): If we're in the background paint phase, render the snapshot image.
2602 (WebCore::RenderSnapshottedPlugIn::paintSnapshotImage): Rename.
2603 (WebCore::RenderSnapshottedPlugIn::paintSnapshot): Rename.
2604 (WebCore::RenderSnapshottedPlugIn::paintSnapshotWithLabel): Rename. No need for label sizes.
2605 (WebCore::RenderSnapshottedPlugIn::getCursor):
2606 (WebCore::RenderSnapshottedPlugIn::handleEvent): The renderer doesn't restart the plug-in any more. Tell the element and it will do it.
2607 * rendering/RenderSnapshottedPlugIn.h:
2608 (RenderSnapshottedPlugIn): New inheritance. Some method renaming.
2610 2013-02-11 Mike West <mkwst@chromium.org>
2612 CSP reports for blocked 'data:' URLs should report the scheme only.
2613 https://bugs.webkit.org/show_bug.cgi?id=109429
2615 Reviewed by Adam Barth.
2617 https://dvcs.w3.org/hg/content-security-policy/rev/001dc8e8bcc3 changed
2618 the CSP 1.1 spec to require that blocked URLs that don't refer to
2619 generally resolvable schemes (e.g. 'data:', 'javascript:', etc.) be
2620 stripped down to their scheme in violation reports.
2622 Test: http/tests/security/contentSecurityPolicy/report-blocked-data-uri.html
2624 * page/ContentSecurityPolicy.cpp:
2625 (WebCore::ContentSecurityPolicy::reportViolation):
2626 If the blocked URL is a web-resolvable scheme, apply the current
2627 stripping logic to it, otherwise, strip it to the scheme only.
2630 Move KURL::isHierarchical() out into KURL's public API.
2632 2013-02-11 Simon Fraser <simon.fraser@apple.com>
2634 ScrollingTree node maps keep getting larger
2635 https://bugs.webkit.org/show_bug.cgi?id=109348
2637 Reviewed by Sam Weinig.
2639 When navigating between pages, nodes would get left in the ScrollingTree's
2640 node map, and the ScrollingStateTree's node map, so these would get larger
2641 and larger as you browse.
2643 Simplify map maintenance by clearing the map when setting a new root node
2644 (which happens on the first commit of a new page). Also, don't keep root nodes
2645 around, but create them afresh for each page, which simplifies their ID
2648 This is closer to the original behavior; keeping the root nodes around was
2649 a fix for bug 99668, but we avoid regressing that fix by bailing early
2650 from frameViewLayoutUpdated() if there is no root state node (we'll get
2651 called again anyway).
2653 This now allows state nodeIDs to be purely read-only.
2655 * page/scrolling/ScrollingStateNode.h:
2656 * page/scrolling/ScrollingStateTree.cpp:
2657 (WebCore::ScrollingStateTree::ScrollingStateTree):
2658 (WebCore::ScrollingStateTree::attachNode):
2659 (WebCore::ScrollingStateTree::clear):
2660 (WebCore::ScrollingStateTree::removeNode):
2661 * page/scrolling/ScrollingTree.cpp:
2662 (WebCore::ScrollingTree::updateTreeFromStateNode):
2663 * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2664 (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
2666 2013-02-11 Simon Fraser <simon.fraser@apple.com>
2668 Move m_stateNodeMap from ScrollingCoordinatorMac to ScrollingStateTree
2669 https://bugs.webkit.org/show_bug.cgi?id=109361
2671 Reviewed by Sam Weinig.
2673 The map of scrolling node IDs to ScollingStateNodes was maintained by
2674 ScrollingCoordinatorMac, rather than ScrollingStateTree. This is different
2675 from the ScrollingTree (which owns its node map), and added some amount
2676 of to-and-fro between ScrollingStateTree and ScrollingCoordinatorMac.
2678 Having ScrollingCoordinatorMac maintain the map of IDs to state nodes
2683 * page/scrolling/ScrollingStateTree.cpp:
2684 (WebCore::ScrollingStateTree::attachNode):
2685 (WebCore::ScrollingStateTree::detachNode):
2686 (WebCore::ScrollingStateTree::clear):
2687 (WebCore::ScrollingStateTree::removeNode):
2688 (WebCore::ScrollingStateTree::stateNodeForID):
2689 * page/scrolling/ScrollingStateTree.h:
2690 (ScrollingStateTree): Remove some stale comments.
2691 (WebCore::ScrollingStateTree::removedNodes):
2692 * page/scrolling/mac/ScrollingCoordinatorMac.h:
2693 (ScrollingCoordinatorMac):
2694 * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2695 (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
2696 (WebCore::ScrollingCoordinatorMac::recomputeWheelEventHandlerCountForFrameView):
2697 (WebCore::ScrollingCoordinatorMac::frameViewRootLayerDidChange):
2698 (WebCore::ScrollingCoordinatorMac::requestScrollPositionUpdate):
2699 (WebCore::ScrollingCoordinatorMac::attachToStateTree):
2700 (WebCore::ScrollingCoordinatorMac::detachFromStateTree):
2701 (WebCore::ScrollingCoordinatorMac::clearStateTree):
2702 (WebCore::ScrollingCoordinatorMac::updateScrollingNode):
2703 (WebCore::ScrollingCoordinatorMac::updateViewportConstrainedNode):
2705 2013-02-11 Mark Rowe <mrowe@apple.com>
2709 * platform/mac/PlatformSpeechSynthesizerMac.mm: Fix the case in the include.
2711 2013-02-11 Julien Chaffraix <jchaffraix@webkit.org>
2713 Regression(r131539): Heap-use-after-free in WebCore::RenderBlock::willBeDestroyed
2714 https://bugs.webkit.org/show_bug.cgi?id=107189
2716 Reviewed by Abhishek Arya.
2718 Test: fast/dynamic/continuation-detach-crash.html
2720 This patch reverts r131539 and the following changes (r132591 and r139664).
2721 This means we redo detaching from the bottom-up which solves the regression.
2722 It fixes the attached test case as we re-attach child nodes before detaching
2723 the parent. It seems wrong to do but this avoid a stale continuation.
2725 * dom/ContainerNode.cpp:
2726 (WebCore::ContainerNode::detach): Detach the children first, then ourself.
2728 (WebCore::Node::detach): Clear the renderer instead of ASSERT'ing.
2729 * rendering/RenderObject.cpp:
2730 (WebCore::RenderObject::willBeDestroyed): Removed the code to clear the associated node's renderer.
2731 (WebCore::RenderObject::destroyAndCleanupAnonymousWrappers):
2732 * rendering/RenderObjectChildList.cpp:
2733 (WebCore::RenderObjectChildList::removeChildNode):
2734 Moved the repainting logic back into removeChildNode from destroyAndCleanupAnonymousWrappers.
2735 (WebCore::RenderObjectChildList::destroyLeftoverChildren): Re-added the code to clear the associated node's
2737 * rendering/RenderTextFragment.cpp:
2738 (WebCore::RenderTextFragment::setText): Re-added the code to set the associated node's renderer.
2740 * dom/ContainerNode.cpp:
2741 (WebCore::ContainerNode::detach):
2743 (WebCore::Node::detach):
2744 * rendering/RenderObject.cpp:
2745 (WebCore::RenderObject::willBeDestroyed):
2746 (WebCore::RenderObject::destroyAndCleanupAnonymousWrappers):
2747 * rendering/RenderObjectChildList.cpp:
2748 (WebCore::RenderObjectChildList::destroyLeftoverChildren):
2749 (WebCore::RenderObjectChildList::removeChildNode):
2750 * rendering/RenderTextFragment.cpp:
2751 (WebCore::RenderTextFragment::setText):
2753 2013-02-11 Eric Seidel <eric@webkit.org>
2755 Make WebVTTTokenizer stop inheriting from MarkupTokenizerBase
2756 https://bugs.webkit.org/show_bug.cgi?id=109411
2758 Reviewed by Adam Barth.
2760 Moved InputStreamPreprocessor into its own header file so it can be
2761 used by both WebVTTTokenizer and HTMLTokenizer.
2763 Also split out kEndOfFileMarker from InputStreamPreprocessor<T> so that
2764 it can be used w/o a specific instantiation of the template class.
2765 This also made it possible to fix three old fixmes about wanting to share
2768 Again, separating WebVTT code from Markup* base classes made it simpler
2769 at the cost of a little copy/paste code. WebVTT tokenization is remarkably
2770 simple compared to HTML.
2772 This will make it immediately possible to pull MarkupTokenizerBase up into
2773 HTMLTokenizer and further simplify the code.
2775 * GNUmakefile.list.am:
2778 * WebCore.vcproj/WebCore.vcproj:
2779 * WebCore.vcxproj/WebCore.vcxproj:
2780 * WebCore.vcxproj/WebCore.vcxproj.filters:
2781 * WebCore.xcodeproj/project.pbxproj:
2782 * html/parser/BackgroundHTMLParser.cpp:
2783 (WebCore::BackgroundHTMLParser::markEndOfFile):
2784 * html/parser/HTMLInputStream.h:
2785 (WebCore::HTMLInputStream::markEndOfFile):
2786 * html/parser/HTMLTokenizer.cpp:
2787 (WebCore::HTMLTokenizer::nextToken):
2788 * html/parser/InputStreamPreprocessor.h: Added.
2790 (InputStreamPreprocessor):
2791 (WebCore::InputStreamPreprocessor::InputStreamPreprocessor):
2792 (WebCore::InputStreamPreprocessor::nextInputCharacter):
2793 (WebCore::InputStreamPreprocessor::peek):
2794 (WebCore::InputStreamPreprocessor::advance):
2795 (WebCore::InputStreamPreprocessor::skipNextNewLine):
2796 (WebCore::InputStreamPreprocessor::reset):
2797 (WebCore::InputStreamPreprocessor::shouldTreatNullAsEndOfFileMarker):
2798 * html/track/WebVTTTokenizer.cpp:
2799 (WebCore::WebVTTTokenizer::WebVTTTokenizer):
2800 (WebCore::WebVTTTokenizer::nextToken):
2801 * html/track/WebVTTTokenizer.h:
2803 (WebCore::WebVTTTokenizer::haveBufferedCharacterToken):
2804 (WebCore::WebVTTTokenizer::bufferCharacter):
2805 (WebCore::WebVTTTokenizer::emitAndResumeIn):
2806 (WebCore::WebVTTTokenizer::emitEndOfFile):
2807 (WebCore::WebVTTTokenizer::shouldSkipNullCharacters):
2808 * xml/parser/MarkupTokenizerBase.h:
2809 (MarkupTokenizerBase):
2810 (WebCore::MarkupTokenizerBase::bufferCharacter):
2812 2013-02-11 Adam Barth <abarth@webkit.org>
2814 document.write during window.onload can trigger DumpRenderTree to dump the render tree
2815 https://bugs.webkit.org/show_bug.cgi?id=109465
2817 Reviewed by Eric Seidel.
2819 This patch is a partial revert of
2820 http://trac.webkit.org/changeset/142378. It's not safe to call
2821 checkComplete during the load event. We'll need to find another way of
2822 calling checkComplete at the right time.
2824 Test: fast/parser/document-write-during-load.html
2827 (WebCore::Document::decrementActiveParserCount):
2829 2013-02-11 Andrey Kosyakov <caseq@chromium.org>
2831 Web Inspector: Timeline: invalidate and force locations are same for Layout records caused by style recalculaiton
2832 https://bugs.webkit.org/show_bug.cgi?id=109294
2834 Reviewed by Pavel Feldman.
2836 Use the stack that caused style recalculation as a cause for relayout performed due to
2837 layout invalidation caused by style recalculation.
2839 * inspector/front-end/TimelinePresentationModel.js:
2840 (WebInspector.TimelinePresentationModel.prototype.reset):
2841 (WebInspector.TimelinePresentationModel.Record):
2843 2013-02-01 Andrey Kosyakov <caseq@chromium.org>
2845 Web Inspector: [Extension API] adjust inspectedWindow.eval() callback parameters to expose non-exceptional error
2846 https://bugs.webkit.org/show_bug.cgi?id=108640
2848 Reviewed by Vsevolod Vlasov.
2850 - only set first parameter to eval() callback iff expression successfully evaluates;
2851 - use object, not bool as second parameter;
2852 - pass exceptions and extension errors as second parameter if evaluate failed;
2853 - minor drive-by changes in ExtensionAPI utilities.
2855 * inspector/front-end/ExtensionAPI.js:
2856 (injectedExtensionAPI.ExtensionSidebarPaneImpl.prototype.setExpression):
2857 (injectedExtensionAPI.InspectedWindow.prototype.):
2858 (injectedExtensionAPI.InspectedWindow.prototype.eval):
2859 (injectedExtensionAPI.extractCallbackArgument):
2860 * inspector/front-end/ExtensionServer.js:
2861 (WebInspector.ExtensionServer.prototype.):
2862 (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
2863 (WebInspector.ExtensionStatus):
2865 2013-02-11 Andrey Kosyakov <caseq@chromium.org>
2867 Web Inspector: [Extensions API] expose ExtensionServerClient to tests so tests use same port as extensions API
2868 https://bugs.webkit.org/show_bug.cgi?id=109443
2870 Reviewed by Vsevolod Vlasov.
2872 Promote extensionServer var to the outer closure, so it may be accessed by platform-specific (or test) code.
2874 * inspector/front-end/ExtensionAPI.js:
2875 (buildExtensionAPIInjectedScript):
2877 2013-02-11 Eric Seidel <eric@webkit.org>
2879 Move WebVTTToken off of MarkupTokenBase
2880 https://bugs.webkit.org/show_bug.cgi?id=109410
2882 Reviewed by Tony Gentilcore.
2884 This introduces a small amount of "copy/paste" code
2885 but actually makes WebVTTToken much smaller and simpler!
2886 This also frees the HTMLParser to have its Token class
2887 back to itself so we can tune it to make HTML faster.
2889 * html/track/WebVTTToken.h:
2891 (WebCore::WebVTTToken::WebVTTToken):
2892 (WebCore::WebVTTToken::appendToName):
2893 (WebCore::WebVTTToken::type):
2894 (WebCore::WebVTTToken::name):
2895 (WebCore::WebVTTToken::ensureIsCharacterToken):
2896 (WebCore::WebVTTToken::appendToCharacter):
2897 (WebCore::WebVTTToken::beginEmptyStartTag):
2898 (WebCore::WebVTTToken::beginStartTag):
2899 (WebCore::WebVTTToken::beginEndTag):
2900 (WebCore::WebVTTToken::beginTimestampTag):
2901 (WebCore::WebVTTToken::makeEndOfFile):
2902 (WebCore::WebVTTToken::clear):
2904 2013-02-11 Joshua Bell <jsbell@chromium.org>
2906 [V8] IndexedDB: Minor GC can collect IDBDatabase wrapper with versionchange handler
2907 https://bugs.webkit.org/show_bug.cgi?id=108670
2909 Reviewed by Kentaro Hara.
2911 Prevent IDBDatabase's wrapper from being GC'd while the database is open if it has
2912 listeners, as those listeners may close the database in response to events.
2914 Also, removed extraneous super-calls from hasPendingActivity() overrides.
2916 Test: storage/indexeddb/database-wrapper.html
2918 * Modules/indexeddb/IDBDatabase.cpp:
2919 (WebCore::IDBDatabase::hasPendingActivity): Implemented.
2920 * Modules/indexeddb/IDBDatabase.h: Declared.
2921 * Modules/indexeddb/IDBRequest.cpp:
2922 (WebCore::IDBRequest::hasPendingActivity): Simplified.
2923 * Modules/indexeddb/IDBTransaction.cpp:
2924 (WebCore::IDBTransaction::hasPendingActivity): Simplified.
2926 2013-02-11 Eric Seidel <eric@webkit.org>
2928 Remove AttributeBase now that NEW_XML is gone
2929 https://bugs.webkit.org/show_bug.cgi?id=109408
2931 Reviewed by Adam Barth.
2933 Just deleting code. HTMLToken::Attribute is now just
2934 the real class and not a typedef.
2936 * html/parser/CompactHTMLToken.cpp:
2937 (WebCore::CompactHTMLToken::CompactHTMLToken):
2938 * html/parser/HTMLTokenizer.cpp:
2939 (WebCore::AtomicHTMLToken::nameForAttribute):
2940 * xml/parser/MarkupTokenBase.h:
2946 2013-02-11 Eric Seidel <eric@webkit.org>
2948 Rename PreloadTask to StartTagScanner to match its purpose
2949 https://bugs.webkit.org/show_bug.cgi?id=109406
2951 Reviewed by Sam Weinig.
2953 As discussed in bug 107807.
2955 * html/parser/HTMLPreloadScanner.cpp:
2956 (WebCore::StartTagScanner::StartTagScanner):
2957 (WebCore::StartTagScanner::processAttributes):
2958 (WebCore::HTMLPreloadScanner::processToken):
2960 2013-02-11 Vsevolod Vlasov <vsevik@chromium.org>
2962 Web Inspector: WebInspector.Project refactorings.
2963 https://bugs.webkit.org/show_bug.cgi?id=109433
2965 Reviewed by Alexander Pavlov.
2967 This change prepares Workspace and Project to migration to project-per-domain mode for network based projects.
2968 Renamed WebInspector.WorkspaceProvider to WebInspector.ProjectDelegate.
2969 Renamed Project.name() to Project.id() and delegated it to project delegate.
2970 Added Project.displayName() method that is delegated to project delegate.
2971 SimpleWorkspaceProvider is now responsible for creation of SimpleWorkspaceDelegates and
2972 isolates various mappings from Project/ProjectDelegate concept.
2973 UISourceCode is now created based on path in the project.
2974 UISourceCode uri is now calculated based on project and path (right now uri is equal to path).
2977 * WebCore.vcproj/WebCore.vcproj:
2978 * inspector/compile-front-end.py:
2979 * inspector/front-end/FileSystemProjectDelegate.js: Renamed from Source/WebCore/inspector/front-end/FileSystemWorkspaceProvider.js.
2980 (WebInspector.FileSystemProjectDelegate):
2981 (WebInspector.FileSystemProjectDelegate.prototype.id):
2982 (WebInspector.FileSystemProjectDelegate.prototype.type):
2983 (WebInspector.FileSystemProjectDelegate.prototype.displayName):
2984 (WebInspector.FileSystemProjectDelegate.prototype.innerCallback):
2985 (WebInspector.FileSystemProjectDelegate.prototype.requestFileContent):
2986 (WebInspector.FileSystemProjectDelegate.prototype.setFileContent):
2987 (WebInspector.FileSystemProjectDelegate.prototype.contentCallback):
2988 (WebInspector.FileSystemProjectDelegate.prototype.searchInFileContent):
2989 (WebInspector.FileSystemProjectDelegate.prototype._contentTypeForPath):
2990 (WebInspector.FileSystemProjectDelegate.prototype._populate.filesLoaded):
2991 (WebInspector.FileSystemProjectDelegate.prototype._populate):
2992 (WebInspector.FileSystemProjectDelegate.prototype._addFile):
2993 (WebInspector.FileSystemProjectDelegate.prototype._removeFile):
2994 (WebInspector.FileSystemProjectDelegate.prototype.reset):
2995 (WebInspector.FileSystemUtils):
2996 (WebInspector.FileSystemUtils.errorHandler):
2997 (WebInspector.FileSystemUtils.requestFileSystem):
2998 (.fileSystemLoaded):
3000 (WebInspector.FileSystemUtils.requestFilesRecursive):
3004 (WebInspector.FileSystemUtils.requestFileContent):
3005 (.fileWriterCreated.fileTruncated):
3006 (.fileWriterCreated):
3008 (WebInspector.FileSystemUtils.setFileContent):
3009 (WebInspector.FileSystemUtils._getDirectory):
3011 (WebInspector.FileSystemUtils._readDirectory):
3012 (WebInspector.FileSystemUtils._requestEntries):
3013 * inspector/front-end/IsolatedFileSystemModel.js:
3014 (WebInspector.IsolatedFileSystemModel.prototype._innerAddFileSystem):
3015 * inspector/front-end/SimpleWorkspaceProvider.js:
3016 (WebInspector.SimpleProjectDelegate):
3017 (WebInspector.SimpleProjectDelegate.prototype.id):
3018 (WebInspector.SimpleProjectDelegate.prototype.displayName):
3019 (WebInspector.SimpleProjectDelegate.prototype.requestFileContent):
3020 (WebInspector.SimpleProjectDelegate.prototype.setFileContent):
3021 (WebInspector.SimpleProjectDelegate.prototype.searchInFileContent):
3022 (WebInspector.SimpleProjectDelegate.prototype.addFile):
3023 (WebInspector.SimpleProjectDelegate.prototype._uniquePath):
3024 (WebInspector.SimpleProjectDelegate.prototype.removeFile):
3025 (WebInspector.SimpleProjectDelegate.prototype.reset):
3026 (WebInspector.SimpleWorkspaceProvider):
3027 (WebInspector.SimpleWorkspaceProvider.uriForURL):
3028 (WebInspector.SimpleWorkspaceProvider.prototype.addFileForURL):
3029 (WebInspector.SimpleWorkspaceProvider.prototype.addUniqueFileForURL):
3030 (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFileForURL):
3031 (WebInspector.SimpleWorkspaceProvider.prototype.removeFile):
3032 (WebInspector.SimpleWorkspaceProvider.prototype.reset):
3033 * inspector/front-end/UISourceCode.js:
3034 (WebInspector.UISourceCode):
3035 (WebInspector.UISourceCode.prototype.path):
3036 (WebInspector.UISourceCode.prototype.uri):
3037 * inspector/front-end/WebKit.qrc:
3038 * inspector/front-end/Workspace.js:
3039 (WebInspector.FileDescriptor):
3040 (WebInspector.ProjectDelegate):
3041 (WebInspector.ProjectDelegate.prototype.id):
3042 (WebInspector.ProjectDelegate.prototype.displayName):
3043 (WebInspector.ProjectDelegate.prototype.requestFileContent):
3044 (WebInspector.ProjectDelegate.prototype.setFileContent):
3045 (WebInspector.ProjectDelegate.prototype.searchInFileContent):
3046 (WebInspector.Project):
3047 (WebInspector.Project.prototype.id):
3048 (WebInspector.Project.prototype.type):
3049 (WebInspector.Project.prototype.displayName):
3050 (WebInspector.Project.prototype.isServiceProject):
3051 (WebInspector.Project.prototype._fileAdded):
3052 (WebInspector.Project.prototype._fileRemoved):
3053 (WebInspector.Project.prototype._reset):
3054 (WebInspector.Project.prototype.uiSourceCode):
3055 (WebInspector.Project.prototype.uiSourceCodeForOriginURL):
3056 (WebInspector.Project.prototype.uiSourceCodeForURI):
3057 (WebInspector.Project.prototype.uiSourceCodes):
3058 (WebInspector.Project.prototype.requestFileContent):
3059 (WebInspector.Project.prototype.setFileContent):
3060 (WebInspector.Project.prototype.searchInFileContent):
3061 (WebInspector.Project.prototype.dispose):
3062 (WebInspector.Workspace.prototype.uiSourceCode):
3063 (WebInspector.Workspace.prototype.uiSourceCodeForURI):
3064 (WebInspector.Workspace.prototype.addProject):
3065 (WebInspector.Workspace.prototype.removeProject):
3066 (WebInspector.Workspace.prototype.project):
3067 (WebInspector.Workspace.prototype.uiSourceCodes):
3068 (WebInspector.Workspace.prototype.projectForUISourceCode):
3069 * inspector/front-end/inspector.html:
3071 2013-02-11 Yury Semikhatsky <yurys@chromium.org>
3073 Web Inspector: fix closure compiler warnings in the profiler code
3074 https://bugs.webkit.org/show_bug.cgi?id=109432
3076 Reviewed by Pavel Feldman.
3078 Updated type annotations to match the code.
3080 * inspector/front-end/NativeMemorySnapshotView.js:
3081 * inspector/front-end/ProfilesPanel.js:
3083 2013-02-11 Alexander Shalamov <alexander.shalamov@intel.com>
3085 [QT] Regression (r142444): Broke qt linux minimal build
3086 https://bugs.webkit.org/show_bug.cgi?id=109423
3088 Reviewed by Kenneth Rohde Christiansen.
3090 Test: cssom/cssvalue-comparison.html
3093 (WebCore::CSSValue::equals):
3095 2013-02-11 Andrey Lushnikov <lushnikov@chromium.org>
3097 Web Inspector: introduce WebInspector.TextUtils
3098 https://bugs.webkit.org/show_bug.cgi?id=109289
3100 Reviewed by Pavel Feldman.
3102 Add new WebInspector.TextUtils file and extract commonly used
3103 text-operation subroutines from DefaultTextEditor into it.
3105 No new tests: no change in behaviour.
3108 * WebCore.vcproj/WebCore.vcproj:
3109 * inspector/compile-front-end.py:
3110 * inspector/front-end/DefaultTextEditor.js:
3111 (WebInspector.TextEditorMainPanel.TokenHighlighter.prototype._isWord):
3112 (WebInspector.DefaultTextEditor.WordMovementController.prototype._rangeForCtrlArrowMove):
3113 (WebInspector.TextEditorMainPanel.BraceHighlightController.prototype.handleSelectionChange):
3114 * inspector/front-end/TextUtils.js: Added.
3115 (WebInspector.TextUtils.isStopChar):
3116 (WebInspector.TextUtils.isWordChar):
3117 (WebInspector.TextUtils.isSpaceChar):
3118 (WebInspector.TextUtils.isWord):
3119 (WebInspector.TextUtils.isBraceChar):
3120 * inspector/front-end/WebKit.qrc:
3121 * inspector/front-end/inspector.html:
3123 2013-02-11 Zan Dobersek <zdobersek@igalia.com>
3125 [GTK][Clang] Build errors in LocalizedStringsGtk.cpp
3126 https://bugs.webkit.org/show_bug.cgi?id=109418
3128 Reviewed by Philippe Normand.
3130 Use the C++ isfinite(float) and abs(float) (instead of fabsf(float))
3131 methods by including the WTF MathExtras.h header. Use a static cast to
3132 an integer type on the float return value of the abs(float) method call
3133 instead of the C-style cast.
3135 No new tests - no new functiolnality.
3137 * platform/gtk/LocalizedStringsGtk.cpp:
3138 (WebCore::localizedMediaTimeDescription):
3140 2013-02-11 Zan Dobersek <zdobersek@igalia.com>
3142 Unreviewed build fix for the WTFURL backend of KURL.
3144 * platform/KURL.cpp:
3145 (WebCore::KURL::isSafeToSendToAnotherThread): m_urlImpl is of RefPtr type so use
3146 the appropriate operator on it when calling the isSafeToSendToAnotherThread method.
3148 2013-02-11 Mike West <mkwst@chromium.org>
3150 Range::collapsed callers should explicitly ASSERT_NO_EXCEPTION.
3151 https://bugs.webkit.org/show_bug.cgi?id=108921
3153 Reviewed by Jochen Eisinger.
3155 For clarity and consistency, this patch adjusts Range::collapsed() to
3156 drop the default value of the ExceptionCode parameter it accepts. The
3157 three call sites that called the method with no arguments (all part of
3158 Editor::rangeOfString) will now explicitly ASSERT_NO_EXCEPTION.
3162 * editing/Editor.cpp:
3163 (WebCore::Editor::rangeOfString):
3165 2013-02-11 Alexei Filippov <alph@chromium.org>
3167 Web Inspector: Split Profiler domain in protocol into Profiler and HeapProfiler
3168 https://bugs.webkit.org/show_bug.cgi?id=108653
3170 Reviewed by Yury Semikhatsky.
3172 Currently CPU and heap profilers share the same domain 'Profiler' in the protocol.
3173 In fact these two profile types have not too much in common. So put each into its own domain.
3174 It should also help when Profiles panel gets split into several tools.
3175 This is the phase 1 which adds InspectorHeapProfilerAgent but doesn't
3176 change the original InspectorProfilerAgent.
3179 * GNUmakefile.list.am:
3182 * WebCore.vcproj/WebCore.vcproj:
3183 * WebCore.vcxproj/WebCore.vcxproj:
3184 * WebCore.vcxproj/WebCore.vcxproj.filters:
3185 * WebCore.xcodeproj/project.pbxproj:
3186 * inspector/Inspector.json:
3187 * inspector/InspectorAllInOne.cpp:
3188 * inspector/InspectorController.cpp:
3189 (WebCore::InspectorController::InspectorController):
3190 * inspector/InspectorHeapProfilerAgent.cpp: Added.
3192 (WebCore::InspectorHeapProfilerAgent::create):
3193 (WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent):
3194 (WebCore::InspectorHeapProfilerAgent::~InspectorHeapProfilerAgent):
3195 (WebCore::InspectorHeapProfilerAgent::resetState):
3196 (WebCore::InspectorHeapProfilerAgent::resetFrontendProfiles):
3197 (WebCore::InspectorHeapProfilerAgent::setFrontend):
3198 (WebCore::InspectorHeapProfilerAgent::clearFrontend):
3199 (WebCore::InspectorHeapProfilerAgent::restore):
3200 (WebCore::InspectorHeapProfilerAgent::collectGarbage):
3201 (WebCore::InspectorHeapProfilerAgent::createSnapshotHeader):
3202 (WebCore::InspectorHeapProfilerAgent::hasHeapProfiler):
3203 (WebCore::InspectorHeapProfilerAgent::getProfileHeaders):
3204 (WebCore::InspectorHeapProfilerAgent::getHeapSnapshot):
3205 (WebCore::InspectorHeapProfilerAgent::removeProfile):
3206 (WebCore::InspectorHeapProfilerAgent::takeHeapSnapshot):
3207 (WebCore::InspectorHeapProfilerAgent::getObjectByHeapObjectId):
3208 (WebCore::InspectorHeapProfilerAgent::getHeapObjectId):
3209 (WebCore::InspectorHeapProfilerAgent::reportMemoryUsage):
3210 * inspector/InspectorHeapProfilerAgent.h: Added.
3212 (InspectorHeapProfilerAgent):
3213 (WebCore::InspectorHeapProfilerAgent::clearProfiles):
3214 * inspector/InspectorInstrumentation.cpp:
3216 (WebCore::InspectorInstrumentation::didCommitLoadImpl):
3217 * inspector/InstrumentingAgents.h:
3219 (InstrumentingAgents):
3220 (WebCore::InstrumentingAgents::inspectorHeapProfilerAgent):
3221 (WebCore::InstrumentingAgents::setInspectorHeapProfilerAgent):
3222 * inspector/WorkerInspectorController.cpp:
3223 (WebCore::WorkerInspectorController::WorkerInspectorController):
3224 * inspector/front-end/HeapSnapshotDataGrids.js:
3225 * inspector/front-end/HeapSnapshotGridNodes.js:
3226 (WebInspector.HeapSnapshotGenericObjectNode.prototype.queryObjectContent):
3227 * inspector/front-end/HeapSnapshotView.js:
3228 (WebInspector.HeapProfileHeader.prototype.startSnapshotTransfer):
3229 (WebInspector.HeapProfileHeader.prototype.saveToFile.onOpen):
3230 (WebInspector.HeapProfileHeader.prototype.saveToFile):
3231 * inspector/front-end/ProfilesPanel.js:
3232 (WebInspector.ProfilesPanel):
3233 (WebInspector.ProfilesPanel.prototype._clearProfiles):
3234 (WebInspector.ProfilesPanel.prototype._garbageCollectButtonClicked):
3235 (WebInspector.ProfilesPanel.prototype._removeProfileHeader):
3236 (WebInspector.ProfilesPanel.prototype._populateProfiles.var):
3237 (WebInspector.ProfilesPanel.prototype._populateProfiles.populateCallback):
3238 (WebInspector.ProfilesPanel.prototype._populateProfiles):
3239 (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot):
3240 (WebInspector.ProfilesPanel.prototype.revealInView):
3241 (WebInspector.HeapProfilerDispatcher):
3242 (WebInspector.HeapProfilerDispatcher.prototype.addProfileHeader):
3243 (WebInspector.HeapProfilerDispatcher.prototype.addHeapSnapshotChunk):
3244 (WebInspector.HeapProfilerDispatcher.prototype.finishHeapSnapshot):
3245 (WebInspector.HeapProfilerDispatcher.prototype.resetProfiles):
3246 (WebInspector.HeapProfilerDispatcher.prototype.reportHeapSnapshotProgress):
3247 * inspector/front-end/TimelinePanel.js:
3248 (WebInspector.TimelinePanel.prototype._garbageCollectButtonClicked):
3249 * inspector/front-end/inspector.js:
3250 (WebInspector.doLoadedDone):
3252 2013-02-11 Mike West <mkwst@chromium.org>
3254 Use IGNORE_EXCEPTION for Editor::countMatchesForText's ignored exceptions.
3255 https://bugs.webkit.org/show_bug.cgi?id=109372
3257 Reviewed by Jochen Eisinger.
3259 Rather than implicitly ignoring exceptions, we should use the
3260 IGNORE_EXCEPTION macro for clarity.
3262 * editing/Editor.cpp:
3263 (WebCore::Editor::countMatchesForText):
3265 2013-02-11 Zoltan Arvai <zarvai@inf.u-szeged.hu>
3267 [Qt] Unreviewed. Fix minimal build after r142444.
3270 (WebCore::CSSValue::equals):
3272 2013-02-11 Christophe Dumez <ch.dumez@sisa.samsung.com>
3274 [EFL] Stop using smart pointers for Ecore_Timer
3275 https://bugs.webkit.org/show_bug.cgi?id=109409
3277 Reviewed by Kenneth Rohde Christiansen.
3279 Stop using a smart pointer for Ecore_Timer in RunLoop::TimerBase. This
3280 is a bad idea because the timer handle becomes invalid as soon as the
3281 timer callback returns ECORE_CALLBACK_CANCEL. This may lead to crashes
3282 on destruction because OwnPtr calls ecore_timer_del() on an invalid
3285 No new tests, already covered by exiting tests.
3287 * platform/RunLoop.h:
3289 * platform/efl/RunLoopEfl.cpp:
3290 (WebCore::RunLoop::TimerBase::timerFired):
3291 (WebCore::RunLoop::TimerBase::start):
3292 (WebCore::RunLoop::TimerBase::stop):
3294 2013-02-11 Vladislav Kaznacheev <kaznacheev@chromium.org>
3296 Web Inspector: Allow SplitView to keep the sidebar size as a fraction of the container size
3297 https://bugs.webkit.org/show_bug.cgi?id=109414
3299 Reviewed by Vsevolod Vlasov.
3301 SplitView now interprets defaultSidebarWidth and defaultSidebarHeight values between 0 and 1 as
3302 fractions of the total container size. The sidebar then will grow or shrink along with the container.
3303 When the sidebar is resized manually the updated ratio is stored in the settings.
3305 * inspector/front-end/SplitView.js:
3306 (WebInspector.SplitView):
3307 (WebInspector.SplitView.prototype._removeAllLayoutProperties):
3308 (WebInspector.SplitView.prototype._updateTotalSize):
3309 (WebInspector.SplitView.prototype._innerSetSidebarSize):
3310 (WebInspector.SplitView.prototype._saveSidebarSize):
3312 2013-02-11 Pavel Feldman <pfeldman@chromium.org>
3314 Web Inspector: highlight DOM nodes on hover while debugging
3315 https://bugs.webkit.org/show_bug.cgi?id=109355
3317 Reviewed by Vsevolod Vlasov.
3319 Along with showing the popover, highlight the remote object as node.
3321 * inspector/front-end/ObjectPopoverHelper.js:
3322 (WebInspector.ObjectPopoverHelper.prototype.):
3323 (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover):
3324 (WebInspector.ObjectPopoverHelper.prototype._onHideObjectPopover):
3326 2013-02-11 Andrey Lushnikov <lushnikov@chromium.org>
3328 Web Inspector: displaying whitespace characters is broken
3329 https://bugs.webkit.org/show_bug.cgi?id=109412
3331 Reviewed by Vsevolod Vlasov.
3333 Add "pointer-events: none" rule for pseudo-class "before", which
3334 maintains rendering of whitespace characters.
3338 * inspector/front-end/inspectorSyntaxHighlight.css:
3339 (.webkit-whitespace::before):
3341 2013-02-11 Alexander Pavlov <apavlov@chromium.org>
3343 Web Inspector: Implement position-based sourcemapping for stylesheets
3344 https://bugs.webkit.org/show_bug.cgi?id=109168
3346 Reviewed by Vsevolod Vlasov.
3348 This change introduces support for position-based source maps for CSS stylesheets.
3349 Sourcemaps and originating resources (sass, scss, etc.) are loaded synchronously
3350 upon the CSS UISourceCode addition. RangeBasedSourceMap is removed as it is not used.
3352 Test: http/tests/inspector/stylesheet-source-mapping.html
3354 * inspector/front-end/CSSStyleModel.js:
3355 (WebInspector.CSSStyleModel):
3356 (WebInspector.CSSStyleModel.prototype.setSourceMapping):
3357 (WebInspector.CSSStyleModel.prototype.rawLocationToUILocation):
3358 (WebInspector.CSSStyleModel.LiveLocation.prototype.uiLocation):
3359 (WebInspector.CSSLocation):
3360 (WebInspector.CSSProperty):
3361 (WebInspector.CSSProperty.parsePayload):
3362 * inspector/front-end/CompilerScriptMapping.js:
3363 (WebInspector.CompilerScriptMapping):
3364 (WebInspector.CompilerScriptMapping.prototype.rawLocationToUILocation):
3365 (WebInspector.CompilerScriptMapping.prototype.loadSourceMapForScript):
3366 * inspector/front-end/SASSSourceMapping.js:
3367 (WebInspector.SASSSourceMapping):
3368 (WebInspector.SASSSourceMapping.prototype._styleSheetChanged.callback):
3369 (WebInspector.SASSSourceMapping.prototype._styleSheetChanged):
3370 (WebInspector.SASSSourceMapping.prototype._reloadCSS):
3371 (WebInspector.SASSSourceMapping.prototype._resourceAdded.didRequestContent):
3372 (WebInspector.SASSSourceMapping.prototype._resourceAdded):
3373 (WebInspector.SASSSourceMapping.prototype._loadAndProcessSourceMap):
3374 (WebInspector.SASSSourceMapping.prototype.loadSourceMapForStyleSheet):
3375 (WebInspector.SASSSourceMapping.prototype._bindUISourceCode):
3376 (WebInspector.SASSSourceMapping.prototype.rawLocationToUILocation):
3377 (WebInspector.SASSSourceMapping.prototype.uiLocationToRawLocation):
3378 (WebInspector.SASSSourceMapping.prototype._reset):
3379 * inspector/front-end/SourceMap.js:
3380 (WebInspector.SourceMap):
3381 (WebInspector.SourceMap.load):
3382 (WebInspector.SourceMap.prototype.findEntry):
3383 (WebInspector.SourceMap.prototype.findEntryReversed):
3384 (WebInspector.SourceMap.prototype._parseMap):
3385 * inspector/front-end/StylesSourceMapping.js:
3386 (WebInspector.StylesSourceMapping):
3387 (WebInspector.StylesSourceMapping.prototype._bindUISourceCode):
3388 * inspector/front-end/inspector.js:
3390 2013-02-11 Alexander Shalamov <alexander.shalamov@intel.com>
3392 Implement CSSValue::equals(const CSSValue&) to optimise CSSValue comparison
3393 https://bugs.webkit.org/show_bug.cgi?id=102901
3395 Reviewed by Antti Koivisto.
3397 Added comparison method to CSSValue and its children, so that the
3398 css values could be compared efficiently. Before this patch, CSSValue
3399 objects were compared using strings that were generated by the cssText() method.
3401 Test: cssom/cssvalue-comparison.html
3403 * css/CSSAspectRatioValue.cpp:
3404 (WebCore::CSSAspectRatioValue::equals):
3406 * css/CSSAspectRatioValue.h:
3407 (CSSAspectRatioValue):
3408 * css/CSSBasicShapes.cpp:
3409 (WebCore::CSSBasicShapeRectangle::equals):
3411 (WebCore::CSSBasicShapeCircle::equals):
3412 (WebCore::CSSBasicShapeEllipse::equals):
3413 (WebCore::CSSBasicShapePolygon::equals):
3414 * css/CSSBasicShapes.h:
3415 (CSSBasicShapeRectangle):
3416 (CSSBasicShapeCircle):
3417 (CSSBasicShapeEllipse):
3418 (CSSBasicShapePolygon):
3419 * css/CSSBorderImageSliceValue.cpp:
3420 (WebCore::CSSBorderImageSliceValue::equals):
3422 * css/CSSBorderImageSliceValue.h:
3423 (CSSBorderImageSliceValue):
3424 * css/CSSCalculationValue.cpp:
3425 (WebCore::CSSCalcValue::equals):
3427 (WebCore::CSSCalcPrimitiveValue::equals):
3428 (CSSCalcPrimitiveValue):
3429 (WebCore::CSSCalcPrimitiveValue::type):
3430 (WebCore::CSSCalcBinaryOperation::equals):
3431 (CSSCalcBinaryOperation):
3432 (WebCore::CSSCalcBinaryOperation::type):
3433 * css/CSSCalculationValue.h:
3434 (WebCore::CSSCalcExpressionNode::equals):
3435 (CSSCalcExpressionNode):
3437 * css/CSSCanvasValue.cpp:
3438 (WebCore::CSSCanvasValue::equals):