1. 04 Sep, 2013 40 commits
    • fpizlo@apple.com's avatar
      run-fast-jsc should work with new-school fast/js tests that loop until the DFG tiers up · 44225e60
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120697
      
      Reviewed by Mark Hahnenberg.
      
      Source/JavaScriptCore: 
      
      * API/JSCTestRunnerUtils.cpp:
      (JSC::numberOfDFGCompiles):
      (JSC::setNeverInline):
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * Target.pri:
      * jsc.cpp:
      (GlobalObject::finishCreation):
      (functionNeverInlineFunction):
      (functionNumberOfDFGCompiles):
      * runtime/TestRunnerUtils.cpp: Added.
      (JSC::getExecutable):
      (JSC::numberOfDFGCompiles):
      (JSC::setNeverInline):
      * runtime/TestRunnerUtils.h: Added.
      
      LayoutTests: 
      
      * fast/js/resources/standalone-pre.js:
      (testPassed):
      (testFailed):
      (dfgCompiled):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155090 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      44225e60
    • akling@apple.com's avatar
      Set "render tree being torn down" flag a bit earlier. · 22cadaf7
      akling@apple.com authored
      <https://webkit.org/b/120717>
      
      Reviewed by Anders Carlsson.
      
      Set the flag at the start of Document::detach() so everyone can get a chance
      to avoid unnecessary work, not just renderers.
      
      * dom/Document.cpp:
      (WebCore::Document::detach):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155089 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      22cadaf7
    • fpizlo@apple.com's avatar
      Introduce a version of SunSpider that runs for a really long time (about 1 sec on my machine) · b144d21c
      fpizlo@apple.com authored
      Rubber stamped by Mark Hahnenberg.
              
      This isn't meant for serious VM-to-VM performance comparisons, but it is useful
      to see how these benchmarks behave when they're completely warmed up.
      
      * LongSpider: Added.
      * LongSpider/3d-cube.js: Added.
      (DrawLine):
      (CalcCross):
      (CalcNormal):
      (CreateP):
      (MMulti):
      (VMulti):
      (VMulti2):
      (MAdd):
      (Translate):
      (RotateX):
      (RotateY):
      (RotateZ):
      (DrawQube):
      (Loop):
      (Init):
      * LongSpider/3d-morph.js: Added.
      (loops.3500.nx.120.nz.120.morph):
      * LongSpider/3d-raytrace.js: Added.
      (createVector):
      (sqrLengthVector):
      (lengthVector):
      (addVector):
      (subVector):
      (scaleVector):
      (normaliseVector):
      (add):
      (sub):
      (scalev):
      (dot):
      (scale):
      (cross):
      (normalise):
      (transformMatrix):
      (invertMatrix):
      (Triangle):
      (Triangle.prototype.intersect):
      (Scene):
      (Scene.prototype.intersect):
      (Scene.prototype.blocked):
      (Camera):
      (Camera.prototype.generateRayPair):
      (renderRows):
      (Camera.prototype.render):
      (raytraceScene.floorShader):
      (raytraceScene):
      (arrayToCanvasCommands):
      * LongSpider/access-binary-trees.js: Added.
      (TreeNode):
      (TreeNode.prototype.itemCheck):
      (bottomUpTree):
      * LongSpider/access-fannkuch.js: Added.
      (fannkuch):
      * LongSpider/access-nbody.js: Added.
      (Body):
      (Body.prototype.offsetMomentum):
      (Jupiter):
      (Saturn):
      (Uranus):
      (Neptune):
      (Sun):
      (NBodySystem):
      (NBodySystem.prototype.advance):
      (NBodySystem.prototype.energy):
      * LongSpider/access-nsieve.js: Added.
      (pad):
      (nsieve):
      (sieve):
      * LongSpider/bitops-3bit-bits-in-byte.js: Added.
      (fast3bitlookup):
      (TimeFunc):
      * LongSpider/bitops-bits-in-byte.js: Added.
      (bitsinbyte):
      (TimeFunc):
      * LongSpider/bitops-nsieve-bits.js: Added.
      (pad):
      (primes):
      (sieve):
      * LongSpider/controlflow-recursive.js: Added.
      (ack):
      (fib):
      (tak):
      * LongSpider/crypto-aes.js: Added.
      (Cipher):
      (SubBytes):
      (ShiftRows):
      (MixColumns):
      (AddRoundKey):
      (KeyExpansion):
      (SubWord):
      (RotWord):
      (AESEncryptCtr):
      (AESDecryptCtr):
      (escCtrlChars):
      * LongSpider/crypto-md5.js: Added.
      (hex_md5):
      (b64_md5):
      (str_md5):
      (hex_hmac_md5):
      (b64_hmac_md5):
      (str_hmac_md5):
      (md5_vm_test):
      (core_md5):
      (md5_cmn):
      (md5_ff):
      (md5_gg):
      (md5_hh):
      (md5_ii):
      (core_hmac_md5):
      (safe_add):
      (bit_rol):
      (str2binl):
      (binl2str):
      (binl2hex):
      (binl2b64):
      * LongSpider/crypto-sha1.js: Added.
      (hex_sha1):
      (b64_sha1):
      (str_sha1):
      (hex_hmac_sha1):
      (b64_hmac_sha1):
      (str_hmac_sha1):
      (sha1_vm_test):
      (core_sha1):
      (sha1_ft):
      (sha1_kt):
      (core_hmac_sha1):
      (safe_add):
      (rol):
      (str2binb):
      (binb2str):
      (binb2hex):
      (binb2b64):
      * LongSpider/date-format-tofte.js: Added.
      (arrayExists):
      (.a):
      (.A):
      (.B):
      (.d):
      (.D):
      (.F):
      (.g):
      (.G):
      (.h):
      (.H):
      (.i):
      (.j):
      (.l):
      (.L):
      (.m):
      (.M):
      (.n):
      (.O):
      (.r):
      (.S):
      (.s):
      (.t):
      (.U):
      (.W):
      (.w):
      (.Y):
      (.y):
      (.z):
      (Date.prototype.formatDate):
      * LongSpider/date-format-xparb.js: Added.
      (Date.prototype.dateFormat):
      (Date.createNewFormat):
      (Date.getFormatCode):
      (Date.parseDate):
      (Date.createParser):
      (Date.formatCodeToRegex):
      (Date.prototype.getTimezone):
      (Date.prototype.getGMTOffset):
      (Date.prototype.getDayOfYear):
      (Date.prototype.getWeekOfYear):
      (Date.prototype.isLeapYear):
      (Date.prototype.getFirstDayOfMonth):
      (Date.prototype.getLastDayOfMonth):
      (Date.prototype.getDaysInMonth):
      (Date.prototype.getSuffix):
      (String.escape):
      * LongSpider/math-cordic.js: Added.
      (FIXED):
      (FLOAT):
      (DEG2RAD):
      (cordicsincos):
      (cordic):
      * LongSpider/math-partial-sums.js: Added.
      (partial):
      * LongSpider/math-spectral-norm.js: Added.
      (A):
      (Au):
      (Atu):
      (AtAu):
      (spectralnorm):
      * LongSpider/string-base64.js: Added.
      (toBase64):
      (base64ToString):
      * LongSpider/string-fasta.js: Added.
      (rand):
      (makeCumulative):
      (fastaRepeat):
      (fastaRandom):
      * LongSpider/string-tagcloud.js: Added.
      (.Array.prototype.toJSONString):
      (.Boolean.prototype.toJSONString):
      (.Date.prototype.toJSONString):
      (.Number.prototype.toJSONString):
      (.Object.prototype.toJSONString):
      (.):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155088 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b144d21c
    • mrowe@apple.com's avatar
      Fix AutodrainedPool.h to compile without errors under ARC. · 2a27d25a
      mrowe@apple.com authored
      Rubber-stamped by Anders Carlsson.
      
      * wtf/AutodrainedPool.h: Some versions of Clang complain about any use of NSAutoreleasePool under ARC.
      Change the type of the member variable to id to work around this. Since the implementation file is compiled
      under manual reference counting, everything will work fine.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2a27d25a
    • akling@apple.com's avatar
      Cached Page and Frame don't need to be ref-counted. · e70178de
      akling@apple.com authored
      <https://webkit.org/b/120710>
      
      Reviewed by Anders Carlsson.
      
      - CachedPage is owned by HistoryItem.
      - CachedFrame is owned by CachedPage.
      
      Remove the ref counting from these objects to make the code less confusing.
      
      The only place that used this was in FrameLoader::commitProvisionalLoad() which
      took a temporary ref on the CachedPage. Switched this to using a raw pointer.
      
      * history/CachedFrame.h:
      (WebCore::CachedFrame::create):
      * history/CachedPage.cpp:
      (WebCore::CachedPage::create):
      * history/CachedPage.h:
      * history/HistoryItem.h:
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::commitProvisionalLoad):
      (WebCore::FrameLoader::transitionToCommitted):
      * loader/FrameLoader.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155086 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e70178de
    • commit-queue@webkit.org's avatar
      [EFL][WK2] Move ShouldGoToBackForwardListItem to the list of passing API tests · 2d38e9c0
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=120646
      
      Patch by Sergio Correia <sergio.correia@openbossa.org> on 2013-09-04
      Reviewed by Gyuyoung Kim.
      
      * TestWebKitAPI/PlatformEfl.cmake: Move ShouldGoToBackForwardListItem to the
      list of passing tests, since it started to pass after r154045.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155085 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2d38e9c0
    • roger_fong@apple.com's avatar
      Unreviewed. Windows build fix and WebCore project cleanup. · 2684506a
      roger_fong@apple.com authored
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * rendering/RenderingAllInOne.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155084 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2684506a
    • andersca@apple.com's avatar
      De-indent Vector.h. · b88f8235
      andersca@apple.com authored
      Rubber-stamped by Andreas Kling.
      
      I'm cleaning up Vector and making it work with move-only objects, and the namespace WTF
      indentation is driving me crazy.
      
      * wtf/Vector.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155083 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b88f8235
    • mrowe@apple.com's avatar
      <https://webkit.org/b/120707> Make WebKit's localizable strings mechanism usable under ARC · 63990846
      mrowe@apple.com authored
      WebKit's localizable strings mechanism is also used outside of WebKit so it needs to work
      both with and without ARC.
      
      Reviewed by Anders Carlsson.
      
      * Misc/WebLocalizableStrings.h: Mark the bundle member as unretained. This matches how the
      member is used within WebLocalizableStrings.mm.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155082 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      63990846
    • mark.lam@apple.com's avatar
      Renamed StackIterator to StackVisitor. · fa2a142f
      mark.lam@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120706.
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore: 
      
      Also did some minor refactoring:
      - Renamed StackIterator::iterate() to StackVisitor::visit().
      - Make StackVisitor::visit() a static method.
      - Move the instantiation of the StackVisitor instance into StackVisitor::visit()
        from CallFrame::iterate().
      - Removed StackIterator::resetIterator() and inline its body into the
        StackVisitor constructor since this is the only remaining caller of it.
      
      * API/JSContextRef.cpp:
      (BacktraceFunctor::operator()):
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * Target.pri:
      * interpreter/CallFrame.h:
      (JSC::ExecState::iterate):
      * interpreter/Interpreter.cpp:
      (JSC::DumpRegisterFunctor::operator()):
      (JSC::unwindCallFrame):
      (JSC::getStackFrameCodeType):
      (JSC::GetStackTraceFunctor::operator()):
      (JSC::UnwindFunctor::operator()):
      * interpreter/Interpreter.h:
      * interpreter/StackIterator.cpp: Removed.
      * interpreter/StackIterator.h: Removed.
      * interpreter/StackVisitor.cpp: Copied from Source/JavaScriptCore/interpreter/StackIterator.cpp.
      (JSC::StackVisitor::StackVisitor):
      (JSC::StackVisitor::gotoNextFrame):
      (JSC::StackVisitor::readFrame):
      (JSC::StackVisitor::readNonInlinedFrame):
      (JSC::StackVisitor::readInlinedFrame):
      (JSC::StackVisitor::Frame::codeType):
      (JSC::StackVisitor::Frame::functionName):
      (JSC::StackVisitor::Frame::sourceURL):
      (JSC::StackVisitor::Frame::toString):
      (JSC::StackVisitor::Frame::arguments):
      (JSC::StackVisitor::Frame::computeLineAndColumn):
      (JSC::StackVisitor::Frame::retrieveExpressionInfo):
      (JSC::StackVisitor::Frame::setToEnd):
      (JSC::StackVisitor::Frame::print):
      (DebugPrintFrameFunctor::operator()):
      * interpreter/StackVisitor.h: Copied from Source/JavaScriptCore/interpreter/StackIterator.h.
      (JSC::StackVisitor::visit):
      * jsc.cpp:
      (FunctionJSCStackFunctor::operator()):
      * profiler/ProfileGenerator.cpp:
      (JSC::AddParentForConsoleStartFunctor::operator()):
      * runtime/JSFunction.cpp:
      (JSC::RetrieveArgumentsFunctor::operator()):
      (JSC::RetrieveCallerFunctionFunctor::operator()):
      * runtime/JSGlobalObjectFunctions.cpp:
      (JSC::GlobalFuncProtoGetterFunctor::operator()):
      (JSC::GlobalFuncProtoSetterFunctor::operator()):
      * runtime/ObjectConstructor.cpp:
      (JSC::ObjectConstructorGetPrototypeOfFunctor::operator()):
      
      Source/WebCore: 
      
      No new tests.
      
      * ForwardingHeaders/interpreter/StackIterator.h: Removed.
      * ForwardingHeaders/interpreter/StackVisitor.h: Copied from Source/WebCore/ForwardingHeaders/interpreter/StackIterator.h.
      * bindings/js/JSXMLHttpRequestCustom.cpp:
      (WebCore::SendFunctor::operator()):
      * bindings/js/ScriptCallStackFactory.cpp:
      (WebCore::CreateScriptCallStackFunctor::operator()):
      (WebCore::CreateScriptCallStackForConsoleFunctor::operator()):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155081 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fa2a142f
    • commit-queue@webkit.org's avatar
      AX: when no other label on provided on form elements, WebKit should fall back to using @title · a23b6f92
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=112842
      
      Patch by Samuel White <samuel_white@apple.com> on 2013-09-04
      Reviewed by Chris Fleizach.
      
      Source/WebCore:
      
      Don't let input elements include empty labels in their accessibility title.
      
      Test: platform/mac/accessibility/input-title.html
      
      * accessibility/AccessibilityNodeObject.cpp:
      (WebCore::AccessibilityNodeObject::titleElementText):
      
      LayoutTests:
      
      Added test to ensure that input elements are computing their
      accessibility title as expected.
      
      * platform/mac/accessibility/input-title-expected.txt: Added.
      * platform/mac/accessibility/input-title.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155078 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a23b6f92
    • akling@apple.com's avatar
      Make ImageQualityController per-RenderView. · 0eadccd7
      akling@apple.com authored
      <https://webkit.org/b/120702>
      
      Reviewed by Anders Carlsson.
      
      Move ImageQualityController to its own files and add a RenderView::imageQualityController()
      getter instead of using a global map for all render trees.
      
      This avoids having to unregister every renderer (well, every RenderBoxModelObject) from the
      global hash map during render tree teardown.
      
      It also simplifies the live resize optimization a bit since it can now short-circuit if
      the RenderView's FrameView is being resized. (Previously there could be any number of
      RenderViews present in the map.)
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.xcodeproj/project.pbxproj:
      * rendering/ImageQualityController.cpp: Added.
      * rendering/ImageQualityController.h: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155077 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0eadccd7
    • roger_fong@apple.com's avatar
      Unreviewed Build fix for Windows DebugSuffix configuration. · a4be6512
      roger_fong@apple.com authored
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155076 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a4be6512
    • mark.lam@apple.com's avatar
      Refining the StackIterator callback interface. · 99c89d43
      mark.lam@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120695.
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore: 
      
      Introduce CallFrame::iterate() which instantiates a StackIterator and
      invoke its iterate() method with the passed in functor. The only place
      where the client code gets access to the StackIterator now is as an
      argument to the client's functor.
      
      * API/JSContextRef.cpp:
      (JSContextCreateBacktrace):
      * interpreter/CallFrame.cpp:
      * interpreter/CallFrame.h:
      (JSC::ExecState::iterate):
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::dumpRegisters):
      (JSC::Interpreter::getStackTrace):
      (JSC::Interpreter::unwind):
      * interpreter/StackIterator.cpp:
      (JSC::StackIterator::StackIterator):
      (DebugPrintFrameFunctor::DebugPrintFrameFunctor):
      (DebugPrintFrameFunctor::operator()):
      (debugPrintCallFrame):
      (debugPrintStack):
      * interpreter/StackIterator.h:
      (JSC::StackIterator::iterate):
      * jsc.cpp:
      (functionJSCStack):
      * profiler/ProfileGenerator.cpp:
      (JSC::ProfileGenerator::addParentForConsoleStart):
      * runtime/JSFunction.cpp:
      (JSC::retrieveArguments):
      (JSC::RetrieveCallerFunctionFunctor::operator()):
      (JSC::retrieveCallerFunction):
      * runtime/JSGlobalObjectFunctions.cpp:
      (JSC::globalFuncProtoGetter):
      (JSC::globalFuncProtoSetter):
      * runtime/ObjectConstructor.cpp:
      (JSC::objectConstructorGetPrototypeOf):
      
      Source/WebCore: 
      
      No new tests.
      
      * bindings/js/JSXMLHttpRequestCustom.cpp:
      (WebCore::SendFunctor::SendFunctor):
      (WebCore::SendFunctor::line):
      (WebCore::SendFunctor::url):
      (WebCore::SendFunctor::operator()):
      (WebCore::JSXMLHttpRequest::send):
      * bindings/js/ScriptCallStackFactory.cpp:
      (WebCore::createScriptCallStack):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155075 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      99c89d43
    • akling@apple.com's avatar
      Remove unnecessary RenderView.h inclusion from headers. · 3b72a14e
      akling@apple.com authored
      <https://webkit.org/b/120365>
      
      Reviewed by Anders Carlsson.
      
      RenderView.h was overzealously included by RenderText and RenderTextTrackCue,
      making it unpleasant to edit on my laptop.
      
      * rendering/RenderText.h:
      * rendering/RenderTextTrackCue.h:
      
          Don't include RenderView.h here, do it in .cpp files.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155074 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3b72a14e
    • bdakin@apple.com's avatar
      Fixing a typo in demo files and screenshot. · 7ac1d86f
      bdakin@apple.com authored
      * blog-files/regions/pizza-is-amazing.png: Replaced.
      * demos/regions/pizza-regions-manifesto-regionstyling.html:
      * demos/regions/pizza-regions-manifesto.html:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155073 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7ac1d86f
    • ap@apple.com's avatar
      Editor::m_removedAnchor is unused · 1d752e69
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120701
      
      Reviewed by Ryosuke Niwa.
      
      * editing/Editor.h: Removed m_removedAnchor. It was not only unused, but also broken,
      as we didn't reset it when navigating.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1d752e69
    • psolanki@apple.com's avatar
      Document::updateHoverActiveState() should allow for deferred style recalcs · 3bd83451
      psolanki@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120700
      
      Reviewed by Simon Fraser.
      
      Add an extra argument to Document::updateHoverActiveState() to specify if a style recalc
      should be done. The default value keeps the current behavior of doing a style recalc. iOS
      touch handling code will pass in DeferRecalcStyleIfNeeded to avoid the work.
      
      No new tests because no functional changes.
      
      * dom/Document.cpp:
      (WebCore::Document::updateHoverActiveState):
      * dom/Document.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155071 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3bd83451
    • timothy_horton@apple.com's avatar
      [mac] PDFDocumentImage should use PDFKit to draw · d959b3ce
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120651
      <rdar://problem/12810731>
      
      Reviewed by Alexey Proskuryakov.
      
      Use PDFKit to draw PDF-in-<img> on Mac, so that annotations in PDF are painted.
      
      Test: fast/images/pdf-as-image-with-annotations.html
      
      * WebCore.xcodeproj/project.pbxproj:
      Add PDFDocumentImageMac.mm.
      
      * platform/graphics/cg/PDFDocumentImage.cpp:
      (WebCore::PDFDocumentImage::PDFDocumentImage):
      We don't need to initialize m_document anymore because it's now a RetainPtr.
      Initialize m_hasPage to false.
      
      (WebCore::PDFDocumentImage::~PDFDocumentImage):
      We don't need to manually release our CGPDFDocumentRef anymore because it's now a RetainPtr.
      
      (WebCore::PDFDocumentImage::size):
      Use expandedIntSize for explicitness.
      
      (WebCore::PDFDocumentImage::applyRotationForPainting):
      Rename adjustCTM to applyRotationForPainting, and move the one non-rotation related transformation out.
      We need to do this because PDFKit applies the rotation transformation itself, so we don't need to.
      Also, explicitly use std::min instead of importing the whole std namespace.
      
      (WebCore::PDFDocumentImage::dataChanged):
      Assert that we don't re-enter dataChanged after we've created a document,
      because it seems like that shouldn't happen - we only create a document when
      we've supposedly received all data, and it would be nice if we didn't have
      all this varying code to deal with SharedBuffers changing out from under each other.
      Factor the code to create a CGPDFDocumentRef out into createPDFDocument, so we can
      replace it with a different implementation that creates a PDFDocument.
      
      (WebCore::PDFDocumentImage::setCurrentPage):
      Make all page-number-related things unsigned, since they are in CG and PDFKit,
      and add m_hasPage to denote whether we've acquired a valid page yet.
      Factor code to retrieve the PDF box bounds into computeBoundsForCurrentPage.
      Remove setCurrentPage itself, as we never use a page other than the first page;
      we will call computeBoundsForCurrentPage and set hasPage in dataChanged, now.
      
      (WebCore::PDFDocumentImage::draw):
      Fix a weird comment.
      Factor code that actually draws the PDF out into drawPDFPage.
      
      The rest of the functions in this file are only built for USE(CG) && !PLATFORM(MAC):
      
      (WebCore::PDFDocumentImage::createPDFDocument):
      Factored out of dataChanged(); I only kept the !PLATFORM(MAC) branch.
      
      (WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
      Factored out of setCurrentPage().
      Use deg2rad since we have it.
      
      (WebCore::PDFDocumentImage::pageCount):
      (WebCore::PDFDocumentImage::drawPDFPage):
      Factored out of draw().
      Reduced an unnecessary transform (we were effectively doing mediaBox.origin - cropBox.origin - mediaBox.origin).
      
      * platform/graphics/cg/PDFDocumentImage.h:
      Unindent all the things, as we don't indent the first level inside a namespace scope.
      Forward-declare PDFDocument.
      Make m_currentPage unsigned as it should be.
      Add m_hasPage.
      Make m_document a PDFDocument on PLATFORM(MAC) and a CGPDFDocumentRef on other platforms.
      
      * platform/graphics/mac/PDFDocumentImageMac.mm: Added.
      Soft-link in PDFKit and specifically the PDFDocument class.
      
      (WebCore::PDFDocumentImage::createPDFDocument):
      Create our PDFDocument from the SharedBuffer's NSData directly. This shouldn't be a problem
      (with respect to the SharedBuffer's data being appended to in secret), because we've waited
      for the document to finish loading before getting here.
      
      (WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
      Ask PDFKit for the page's media and crop boxes; it automatically performs the correct fallback.
      Ask PDFKit for the page's rotation.
      
      (WebCore::PDFDocumentImage::pageCount):
      Ask PDFKit for the page count.
      
      (WebCore::PDFDocumentImage::drawPDFPage):
      Paint the current page of the PDF. Note that we do not apply the rotation here
      via applyRotationForPainting because PDFKit will do it itself.
      
      * platform/mac/SoftLinking.h:
      I couldn't find any clients of SOFT_LINK_FRAMEWORK_IN_CORESERVICES_UMBRELLA,
      so I made it the more generic SOFT_LINK_FRAMEWORK_IN_UMBRELLA, taking the name
      of the umbrella framework and the subframework, so I could use it to soft link
      Quartz.framework's PDFKit.framework.
      
      * fast/images/pdf-as-image-with-annotations-expected.html: Added.
      * fast/images/pdf-as-image-with-annotations.html: Added.
      * fast/images/resources/annotation.pdf: Added.
      Add a test that ensures that PDF-in-<img> draws simple annotations.
      
      * platform/mac/fast/images/pdf-as-image-landscape-expected.png:
      * platform/mac/fast/images/pdf-as-image-landscape-expected.txt:
      Extremely minor rebaselines probably due to PDFKit handling rotation in the new implementation.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155069 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d959b3ce
    • roger_fong@apple.com's avatar
      Unreviewed Windows build fix. · 9252c407
      roger_fong@apple.com authored
      * WebCore.vcxproj/WebCoreCommon.props:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155068 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9252c407
    • rniwa@webkit.org's avatar
      Check that XMLHttpRequest.response returns null or a json object as specified... · 7046112f
      rniwa@webkit.org authored
      Check that XMLHttpRequest.response returns null or a json object as specified in the spec according to readyState value.
      https://bugs.webkit.org/show_bug.cgi?id=120690
      
      Reviewed by Darin Adler.
      
      Merge https://chromium.googlesource.com/chromium/blink/+/d667a115b0fd8f5e11a24d8db44388a990abf543
      
      * http/tests/xmlhttprequest/resources/test.json: Added.
      * http/tests/xmlhttprequest/response-json-and-readystate-expected.txt: Added.
      * http/tests/xmlhttprequest/response-json-and-readystate.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155067 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7046112f
    • berto@igalia.com's avatar
      [WK2][GTK] ASSERTION in WebKit::LayerTreeHostGtk::invalidate · dbc108bd
      berto@igalia.com authored
      https://bugs.webkit.org/show_bug.cgi?id=117733
      
      Reviewed by Martin Robinson.
      
      If the GL context cannot be created then an invalid
      LayerTreeHostGtk object will be returned.
      
      This patch disables accelerated compositing if the system doesn't
      support it.
      
      * UIProcess/API/gtk/WebKitWebView.cpp:
      (webkitWebViewUpdateSettings):
      * UIProcess/API/gtk/WebKitWebViewBase.cpp:
      (webkitWebViewBaseUpdatePreferences):
      (webkitWebViewBaseCreateWebPage):
      * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155066 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dbc108bd
    • bjonesbe@adobe.com's avatar
      FloatingObjects should manage cleaning it's line box tree pointers itself · 01f7e314
      bjonesbe@adobe.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120692
      
      Reviewed by David Hyatt.
      
      This is another step in properly encapsulating FloatingObjects.
      Instead of having RenderBlock walk and clear the line box tree
      pointers, create a method for the behavior, and have RenderBlock call
      that.
      
      In addtion, add a proper destructor to FloatingObjects, so that
      RenderBlock does not have to explicitly delete the set in
      FloatingObjects.
      
      And as a bonus, fix the ordering of an if to avoid the expensive
      descendantChild check.
      
      This is a port of a Blink patch by Eric Seidel.
      
      No new tests, no behavior change.
      
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::~RenderBlock):
      (WebCore::RenderBlock::deleteLineBoxTree):
      (WebCore::RenderBlock::repaintOverhangingFloats):
      (WebCore::RenderBlock::FloatingObjects::~FloatingObjects):
      (WebCore::RenderBlock::FloatingObjects::clearLineBoxTreePointers):
      (WebCore::RenderBlock::FloatingObjects::clear):
      * rendering/RenderBlock.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155065 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      01f7e314
    • benjamin@webkit.org's avatar
      JSGenericTypedArrayViewConstructor.h is referenced twice in the XCode project... · b1bac53f
      benjamin@webkit.org authored
      JSGenericTypedArrayViewConstructor.h is referenced twice in the XCode project build section, causing warnings
      https://bugs.webkit.org/show_bug.cgi?id=120698
      
      Reviewed by Darin Adler.
      
      * JavaScriptCore.xcodeproj/project.pbxproj:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155064 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b1bac53f
    • bdakin@apple.com's avatar
      Upload demo and images for a potential blog post. · 4c8ae135
      bdakin@apple.com authored
      * blog-files/regions: Added.
      * blog-files/regions/pizza-is-amazing.png: Added.
      * demos/regions: Added.
      * demos/regions/pizza-regions-manifesto-regionstyling.html: Added.
      * demos/regions/pizza-regions-manifesto.html: Added.
      * demos/regions/yellow-pizza.jpg: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155063 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4c8ae135
    • ossy@webkit.org's avatar
      Remove HTMLDialogElement layout tests after r154835 · 5721092f
      ossy@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=120680
      
      Reviewed by Darin Adler.
      
      * fast/dom/HTMLDialogElement/: Removed.
      * platform/efl/TestExpectations:
      * platform/gtk/TestExpectations:
      * platform/mac/TestExpectations:
      * platform/qt-mac/TestExpectations:
      * platform/qt/TestExpectations:
      * platform/win/TestExpectations:
      * platform/wincairo/TestExpectations:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155062 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5721092f
    • oliver@apple.com's avatar
      Actually include new results · ac4f5668
      oliver@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155061 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ac4f5668
    • timothy_horton@apple.com's avatar
      Rename customCssText -> customCSSText to match WebKit style · df4356a8
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120694
      
      Reviewed by Simon Fraser.
      
      No new tests, just a rename.
      
      * WebCore.order:
      * css/CSSAspectRatioValue.cpp:
      (WebCore::CSSAspectRatioValue::customCSSText):
      * css/CSSAspectRatioValue.h:
      * css/CSSBorderImageSliceValue.cpp:
      (WebCore::CSSBorderImageSliceValue::customCSSText):
      * css/CSSBorderImageSliceValue.h:
      * css/CSSCalculationValue.cpp:
      (WebCore::CSSCalcValue::customCSSText):
      (WebCore::CSSCalcPrimitiveValue::customCSSText):
      (WebCore::CSSCalcBinaryOperation::customCSSText):
      * css/CSSCalculationValue.h:
      * css/CSSCanvasValue.cpp:
      (WebCore::CSSCanvasValue::customCSSText):
      * css/CSSCanvasValue.h:
      * css/CSSCrossfadeValue.cpp:
      (WebCore::CSSCrossfadeValue::customCSSText):
      * css/CSSCrossfadeValue.h:
      * css/CSSCursorImageValue.cpp:
      (WebCore::CSSCursorImageValue::customCSSText):
      * css/CSSCursorImageValue.h:
      * css/CSSFilterImageValue.cpp:
      (WebCore::CSSFilterImageValue::customCSSText):
      * css/CSSFilterImageValue.h:
      * css/CSSFontFaceSrcValue.cpp:
      (WebCore::CSSFontFaceSrcValue::customCSSText):
      * css/CSSFontFaceSrcValue.h:
      * css/CSSFunctionValue.cpp:
      (WebCore::CSSFunctionValue::customCSSText):
      * css/CSSFunctionValue.h:
      * css/CSSGradientValue.cpp:
      (WebCore::CSSLinearGradientValue::customCSSText):
      (WebCore::CSSRadialGradientValue::customCSSText):
      * css/CSSGradientValue.h:
      * css/CSSImageSetValue.cpp:
      (WebCore::CSSImageSetValue::customCSSText):
      * css/CSSImageSetValue.h:
      * css/CSSImageValue.cpp:
      (WebCore::CSSImageValue::customCSSText):
      * css/CSSImageValue.h:
      * css/CSSInheritedValue.cpp:
      (WebCore::CSSInheritedValue::customCSSText):
      * css/CSSInheritedValue.h:
      * css/CSSInitialValue.cpp:
      (WebCore::CSSInitialValue::customCSSText):
      * css/CSSInitialValue.h:
      * css/CSSLineBoxContainValue.cpp:
      (WebCore::CSSLineBoxContainValue::customCSSText):
      * css/CSSLineBoxContainValue.h:
      * css/CSSPrimitiveValue.cpp:
      (WebCore::CSSPrimitiveValue::customCSSText):
      (WebCore::CSSPrimitiveValue::customSerializeResolvingVariables):
      * css/CSSPrimitiveValue.h:
      * css/CSSReflectValue.cpp:
      (WebCore::CSSReflectValue::customCSSText):
      * css/CSSReflectValue.h:
      * css/CSSTimingFunctionValue.cpp:
      (WebCore::CSSLinearTimingFunctionValue::customCSSText):
      (WebCore::CSSCubicBezierTimingFunctionValue::customCSSText):
      (WebCore::CSSStepsTimingFunctionValue::customCSSText):
      * css/CSSTimingFunctionValue.h:
      * css/CSSUnicodeRangeValue.cpp:
      (WebCore::CSSUnicodeRangeValue::customCSSText):
      * css/CSSUnicodeRangeValue.h:
      * css/CSSValue.cpp:
      (WebCore::CSSValue::cssText):
      * css/CSSValueList.cpp:
      (WebCore::CSSValueList::customCSSText):
      * css/CSSValueList.h:
      * css/FontFeatureValue.cpp:
      (WebCore::FontFeatureValue::customCSSText):
      * css/FontFeatureValue.h:
      * css/FontValue.cpp:
      (WebCore::FontValue::customCSSText):
      * css/FontValue.h:
      * css/ShadowValue.cpp:
      (WebCore::ShadowValue::customCSSText):
      * css/ShadowValue.h:
      * css/WebKitCSSArrayFunctionValue.cpp:
      (WebCore::WebKitCSSArrayFunctionValue::customCSSText):
      * css/WebKitCSSArrayFunctionValue.h:
      * css/WebKitCSSFilterValue.cpp:
      (WebCore::WebKitCSSFilterValue::customCSSText):
      * css/WebKitCSSFilterValue.h:
      * css/WebKitCSSMatFunctionValue.cpp:
      (WebCore::WebKitCSSMatFunctionValue::customCSSText):
      * css/WebKitCSSMatFunctionValue.h:
      * css/WebKitCSSMixFunctionValue.cpp:
      (WebCore::WebKitCSSMixFunctionValue::customCSSText):
      * css/WebKitCSSMixFunctionValue.h:
      * css/WebKitCSSSVGDocumentValue.cpp:
      (WebCore::WebKitCSSSVGDocumentValue::customCSSText):
      * css/WebKitCSSSVGDocumentValue.h:
      * css/WebKitCSSShaderValue.cpp:
      (WebCore::WebKitCSSShaderValue::customCSSText):
      * css/WebKitCSSShaderValue.h:
      * css/WebKitCSSTransformValue.cpp:
      (WebCore::WebKitCSSTransformValue::customCSSText):
      * css/WebKitCSSTransformValue.h:
      * svg/SVGColor.cpp:
      (WebCore::SVGColor::customCSSText):
      * svg/SVGColor.h:
      * svg/SVGPaint.cpp:
      (WebCore::SVGPaint::customCSSText):
      * svg/SVGPaint.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155060 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      df4356a8
    • cfleizach@apple.com's avatar
      AX: aria-valuetext property not exposing AXValueDescription · 453d95ed
      cfleizach@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120375
      
      Reviewed by Darin Adler.
      
      Source/WebCore: 
      
      Expose value based attributes for incrementor roles (which are called spinbuttons by ARIA).
      
      Test: platform/mac/accessibility/spinbutton-valuedescription.html
      
      * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
      (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
      
      LayoutTests: 
      
      * platform/mac/accessibility/spinbutton-valuedescription-expected.txt: Added.
      * platform/mac/accessibility/spinbutton-valuedescription.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155059 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      453d95ed
    • commit-queue@webkit.org's avatar
      <https://webkit.org/b/119622> [CSSRegions] Not possible to clear the selection... · 97897a9e
      commit-queue@webkit.org authored
      <https://webkit.org/b/119622> [CSSRegions] Not possible to clear the selection when mixing content from different FlowThreads
      
      Patch by Javier Fernandez <jfernandez@igalia.com> on 2013-09-04
      Reviewed by David Hyatt.
      
      Source/WebCore:
      
      When using CSS Regions is usual that the RenderTree doesn't match
      the DOM Tree in terms of relative position of the nodes. Besides,
      usually the content of a certain node is split and spread across
      multiple blocks, rendered in different positions.
      
      Regarding the Selection, this problem is even more important; the
      selection direction changes when crossing the FlowThread
      boundaries. This weird behavior is also present in other layouts
      using non-regular positioning mechanisms, like absolute,
      static. However, for those layouts the RenderTree preserves the
      order of the nodes, unlike the CSS Regions layout model.
      
      Because of how the RenderTree is generated with CSS Regions, the
      RenderView::setSelection algorithm is not able to repaint some of
      the rectangles defined during the selection process. In order to
      face this issue, the proposed fix determines whether it should
      backwards traversing the RenderTree, from the "stop" node to the
      RenderView node.
      
      Test: fast/regions/selecting-text-through-different-region-flows-2.html
      
      * rendering/RenderView.cpp:
      (WebCore::getNextOrPrevRenderObjectBasedOnDirection): Added.
      (WebCore::RenderView::setSelection):
      
      LayoutTests:
      
      * fast/regions/selecting-text-through-different-region-flows-2-expected.html: Added.
      * fast/regions/selecting-text-through-different-region-flows-2.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155058 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      97897a9e
    • eric.carlson@apple.com's avatar
      Get MEDIA_STREAM compiling on OSX · e85da7d5
      eric.carlson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120650
      
      Reviewed by Darin Adler.
      
      No new tests, the code changed doesn't run on OSX yet.
      
      * DerivedSources.make: Add MediaStream idl files.
      
      * Modules/mediastream/LocalMediaStream.h: Mark class as FINAL.
      
      * Modules/mediastream/MediaConstraintsImpl.cpp:
      (WebCore::MediaConstraintsImpl::getOptionalConstraints): append -> appendRange so we don't
          need a MediaConstraint copy constructor.
      
      * Modules/mediastream/RTCDataChannel.cpp:
      (WebCore::RTCDataChannel::send): Remove an unused parameter name.
      * Modules/mediastream/RTCDataChannel.h: ArrayBuffer and ArrayBufferView are in the JSC namespace.
      
      * Modules/mediastream/RTCPeerConnection.cpp:
      (WebCore::RTCPeerConnection::RTCPeerConnection): loader() doesn't return a pointer.
      (WebCore::RTCPeerConnection::localDescription): Set the ExceptionCode on error.
      (WebCore::RTCPeerConnection::remoteDescription): Ditto.
      
      * Modules/mediastream/RTCSessionDescription.cpp:
      (WebCore::RTCSessionDescription::setSdp): Remove the unused ExceptionCode parameter.
      * Modules/mediastream/RTCSessionDescription.h: Ditto.
      * Modules/mediastream/RTCSessionDescription.idl: Ditto.
      
      * Modules/mediastream/RTCStatsResponse.cpp:
      (WebCore::RTCStatsResponse::canGetItemsForName): Add so JSRTCStatsResponse::canGetItemsForName
          doesn't cause ref count churn.
      * Modules/mediastream/RTCStatsResponse.h: Mark class as FINAL. Declare canGetItemsForName.
      
      * WebCore.xcodeproj/project.pbxproj: Add new files.
      
      * bindings/js/JSRTCStatsResponseCustom.cpp:
      (WebCore::JSRTCStatsResponse::canGetItemsForName): Use canGetItemsForName instead of namedItem.
          Use propertyNameToAtomicString instead of propertyNameToString 
      (WebCore::JSRTCStatsResponse::nameGetter): Use propertyNameToAtomicString instead of 
          propertyNameToString because namedItem takes an AtomicString.
      
      * platform/mediastream/mac: Added.
      * platform/mediastream/mac/MediaStreamCenterMac.cpp: Added.
      * platform/mediastream/mac/MediaStreamCenterMac.h: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155057 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e85da7d5
    • mhahnenberg@apple.com's avatar
      ASSERT in MarkedAllocator::allocateSlowCase is wrong · 077d0425
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120639
      
      Reviewed by Oliver Hunt.
      
      ASSERT(!m_heap->shouldCollect()) is no longer true due to our use of the GC
      deferral mechanism. We could technically be beyond our byte allocation limit,
      but still not try to collect due to deferral. This patch amends shouldCollect()
      to return false if GC is currently deferred.
      
      * heap/Heap.h:
      (JSC::Heap::shouldCollect):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155056 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      077d0425
    • akling@apple.com's avatar
      RenderSVGResource shouldn't trigger relayout during render tree teardown. · 8607a8de
      akling@apple.com authored
      <https://webkit.org/b/120689>
      <rdar://problem/14908967>
      
      Reviewed by Antti Koivisto.
      
      The new assertion in FrameView::scheduleRelayoutOfSubtree() caught a fish!
      We were doing some unnecessary relayout scheduling while tearing down SVG
      resource renderers.
      
      * rendering/svg/RenderSVGResource.cpp:
      (WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155055 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8607a8de
    • dbates@webkit.org's avatar
      [iOS] Fix the build following <http://trac.webkit.org/changeset/154903> · e9a7503b
      dbates@webkit.org authored
      (https://bugs.webkit.org/show_bug.cgi?id=120540)
      
      * style/StyleResolveTree.cpp:
      (WebCore::Style::resolveTree): Use address operator and dot-notation when
      passing Element to CheckForVisibilityChangeOnRecalcStyle and calling
      Element::renderStyle(), respectively.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e9a7503b
    • oliver@apple.com's avatar
      Fix fast/storage/serialized script value, and add new tests for Map and Set · faf281d9
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120688
      
      Reviewed by Steve Falkenburg.
      
      Update for new version number, and adding binary tests for Map and Set
      serialisation
      
      * fast/storage/serialized-script-value.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155051 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      faf281d9
    • bjonesbe@adobe.com's avatar
      Move logical dimension getters/setters to FloatingObject from RenderBlock · 93de7e7c
      bjonesbe@adobe.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120686
      
      Reviewed by David Hyatt.
      
      This is the first step in decoupling FloatingObject, FloatingObjects,
      et al from RenderBlock. It is not ideal that the methods take a bool;
      however, passing down the actual writing mode would require
      refactoring the way that RenderBlock stores this information, which is
      a task for the future.
      
      No new tests, no behavior change.
      
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::repaintOverhangingFloats): Use new methods.
      (WebCore::RenderBlock::insertFloatingObject):  Ditto.
      (WebCore::RenderBlock::removeFloatingObject): Ditto.
      (WebCore::RenderBlock::removeFloatingObjectsBelow): Ditto.
      (WebCore::RenderBlock::computeLogicalLocationForFloat): Ditto.
      (WebCore::RenderBlock::positionNewFloats): Ditto.
      (WebCore::::updateOffsetIfNeeded): Ditto.
      (WebCore::::collectIfNeeded): Ditto.
      (WebCore::::getHeightRemaining): Ditto.
      (WebCore::RenderBlock::logicalLeftFloatOffsetForLine): Ditto.
      (WebCore::RenderBlock::logicalRightFloatOffsetForLine): Ditto.
      (WebCore::RenderBlock::nextFloatLogicalBottomBelow): Ditto.
      (WebCore::RenderBlock::lowestFloatLogicalBottom): Ditto.
      (WebCore::RenderBlock::clearFloats): Ditto.
      (WebCore::RenderBlock::addOverhangingFloats): Ditto.
      (WebCore::RenderBlock::hasOverhangingFloat): Ditto.
      (WebCore::RenderBlock::addIntrudingFloats): Ditto.
      * rendering/RenderBlock.h:
      (WebCore::RenderBlock::FloatingObject::logicalTop): Moved from RenderBlock::logicalTopForFloat
      (WebCore::RenderBlock::FloatingObject::logicalBottom): Moved from RenderBlock::logicalBottomForFloat
      (WebCore::RenderBlock::FloatingObject::logicalLeft): Moved from RenderBlock::logicalLeftForFloat
      (WebCore::RenderBlock::FloatingObject::logicalRight): Moved from RenderBlock::logicalRightForFloat
      (WebCore::RenderBlock::FloatingObject::logicalWidth): Moved from RenderBlock::logicalWidthForFloat
      (WebCore::RenderBlock::FloatingObject::pixelSnappedLogicalTop): Moved from RenderBlock::pixelSnappedLogicalTopForFloat
      (WebCore::RenderBlock::FloatingObject::pixelSnappedLogicalBottom): Moved from RenderBlock::pixelSnappedLogicalBottomForFloat
      (WebCore::RenderBlock::FloatingObject::pixelSnappedLogicalLeft): Moved from RenderBlock::pixelSnappedLogicalLeftForFloat
      (WebCore::RenderBlock::FloatingObject::pixelSnappedLogicalRight): Moved from RenderBlock::pixelSnappedLogicalRightForFloat
      (WebCore::RenderBlock::FloatingObject::setLogicalTop): Moved from RenderBlock::setLogicalTopForFloat
      (WebCore::RenderBlock::FloatingObject::setLogicalLeft): Moved from RenderBlock::setLogicalLeftForFloat
      (WebCore::RenderBlock::FloatingObject::setLogicalHeight): Moved from RenderBlock::setLogicalHeightForFloat
      (WebCore::RenderBlock::FloatingObject::setLogicalWidth): Moved from RenderBlock::setLogicalWidthForFloat
      * rendering/RenderBlockLineLayout.cpp:
      (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): Use new methods.
      (WebCore::RenderBlock::checkPaginationAndFloatsAtEndLine): Ditto.
      (WebCore::RenderBlock::LineBreaker::nextSegmentBreak): Ditto.
      (WebCore::RenderBlock::positionNewFloatOnLine): Ditto.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155050 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      93de7e7c
    • commit-queue@webkit.org's avatar
      REGRESSION(r154977): Do not urlencode soup message on ResourceRequest::toSoupMessage() · 11b768f6
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=120681
      
      Patch by Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk> on 2013-09-04
      Reviewed by Martin Robinson.
      
      Do not call soup_message_set_uri with soupURI() (url encoded uri) on
      ResourceRequest::toSoupMessage().
      
      * platform/network/soup/ResourceRequest.h:
      * platform/network/soup/ResourceRequestSoup.cpp:
      (WebCore::ResourceRequest::updateSoupMessageMembers):
      (WebCore::ResourceRequest::updateSoupMessage):
      (WebCore::ResourceRequest::toSoupMessage):
      Split common code from updateSoupMessage/toSoupMessage into updateSoupMessageMembers.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155049 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      11b768f6
    • commit-queue@webkit.org's avatar
      [GTK] add support for subtitles on webkit2GTK · c5b1b009
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=117008
      
      By activating subtitles support on webkit2GTK, the video player
      recognizes and use text <tracks> inside <video> elements.
      
      Patch by Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk> on 2013-09-04
      Reviewed by Martin Robinson.
      
      Source/WebCore:
      
      Layout tests (track-menu) should cover this change.
      
      * css/mediaControlsGtk.css:
      (audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button):
      (video::-webkit-media-controls-closed-captions-container):
      (video::-webkit-media-controls-closed-captions-track-list):
      (video::-webkit-media-controls-closed-captions-track-list h3):
      (video::-webkit-media-controls-closed-captions-track-list ul):
      (video::-webkit-media-controls-closed-captions-track-list li):
      (video::-webkit-media-controls-closed-captions-track-list li.selected):
      * html/shadow/MediaControlElements.cpp:
      (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement):
      (WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler):
      * html/shadow/MediaControlElements.h:
      * html/shadow/MediaControlsGtk.cpp:
      (WebCore::MediaControlsGtkEventListener::create):
      (WebCore::MediaControlsGtkEventListener::cast):
      (WebCore::MediaControlsGtkEventListener::MediaControlsGtkEventListener):
      (WebCore::MediaControlsGtk::MediaControlsGtk):
      (WebCore::MediaControlsGtk::initializeControls):
      (WebCore::MediaControlsGtk::setMediaController):
      (WebCore::MediaControlsGtk::reset):
      (WebCore::MediaControlsGtk::makeTransparent):
      (WebCore::MediaControlsGtk::toggleClosedCaptionTrackList):
      (WebCore::MediaControlsGtk::showClosedCaptionTrackList):
      (WebCore::MediaControlsGtk::hideClosedCaptionTrackList):
      (WebCore::MediaControlsGtk::handleClickEvent):
      (WebCore::MediaControlsGtk::eventListener):
      (WebCore::MediaControlsGtkEventListener::handleEvent):
      (WebCore::MediaControlsGtkEventListener::operator==):
      * html/shadow/MediaControlsGtk.h:
      * page/CaptionUserPreferences.cpp:
      (WebCore::trackDisplayName):
      * platform/gtk/LocalizedStringsGtk.cpp:
      (WebCore::textTrackSubtitlesText):
      (WebCore::textTrackOffMenuItemText):
      (WebCore::textTrackNoLabelText):
      * platform/gtk/RenderThemeGtk.h:
      
      LayoutTests:
      
      * platform/gtk/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155048 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c5b1b009
    • darin@apple.com's avatar
      Use OwnPtr in the RenderLayerFilterInfo map · 7d2a1ffb
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120619
      
      Reviewed by Anders Carlsson.
      
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::~RenderLayer): Use FilterInfo::remove directly instead of
      going through removeFilterInfoIfNeeded function.
      (WebCore::RenderLayer::paintsWithFilters): Rearranged #if a little bit and tweaked
      the comment.
      (WebCore::RenderLayer::requiresFullLayerImageForFilters): Use && instead of ternary.
      (WebCore::RenderLayer::filterRenderer): Use FilterInfo::getIfExists directly instead
      of going through filterInfo function.
      (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect): Use FilterInfo::get
      directly instead of going through filterInfo function. Also use references instead
      of pointers.
      (WebCore::shouldDoSoftwarePaint): Marked this simple function, used only once, as
      inline.
      (WebCore::paintForFixedRootBackground): Ditto.
      (WebCore::RenderLayer::setupFilters): Use FilterInfo::getIfExists directly instead
      of going through filterInfo function. Also get rendererer out of filterInfo instead
      of calling filterRenderer.
      (WebCore::RenderLayer::updateOrRemoveFilterClients): Use FilterInfo::get and
      FilterInfo::getIfExists directly instead of using ensureFilterInfo and
      filterInfo functions.
      (WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer): Use FilterInfo::getIfExists
      and FilterInfo::get directly instead of using filterInfo function.
      
      * rendering/RenderLayer.h: Removed the ifdefs around forward declarations; overkill,
      since there is no harm in a few extras. Marked the RenderLayer class FINAL. Removed the
      no-longer-needed filterInfo, ensureFilterInfo, removeFilterInfoIfNeeded, hasFilterInfo,
      and setHasFilterInfo functions. Mark everything private instead of protected since
      there are no classes derived from this one. Made FilterInfo an embedded class so it
      can get at the m_hasFilterInfo data member directly and has a shorter name.
      
      * rendering/RenderLayerFilterInfo.cpp: Removed the ifs around includes, which were
      overkill, since there is little harm including a few extra files.
      (WebCore::RenderLayer::FilterInfo::map): Added. Returns the single global map.
      (WebCore::RenderLayer::FilterInfo::getIfExists): Renamed from filterInfoForRenderLayer.
      Also changed to take a reference instead of a pointer, and to use the new filterMap.
      (WebCore::RenderLayer::FilterInfo::get): Renamed from createFilterInfoForRenderLayerIfNeeded.
      Also changed to take a reference instead of a pointer, to use the new filterMap, and
      to use add to avoid hashing twice when adding a new layer to the map.
      (WebCore::RenderLayer::FilterInfo::remove): Renamed from removeFilterInfoForRenderLayer.
      Also changed to take a reference instead of a pointer and eliminated the explicit
      delete since we use OwnPtr now.
      (WebCore::RenderLayer::FilterInfo::FilterInfo): Take a reference instead of a pointer.
      (WebCore::RenderLayer::FilterInfo::~FilterInfo): Updated class name.
      (WebCore::RenderLayer::FilterInfo::setRenderer): Ditto.
      (WebCore::RenderLayer::FilterInfo::notifyFinished): Update since m_layer is a reference.
      (WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients): Update to iterate in a
      slightly more idiomatic and efficient way. Also update since m_layer is a reference.
      (WebCore::RenderLayer::FilterInfo::removeReferenceFilterClients): Ditto.
      (WebCore::RenderLayer::FilterInfo::notifyCustomFilterProgramLoaded): Ditto.
      (WebCore::RenderLayer::FilterInfo::updateCustomFilterClients): Ditto. Also switched to
      a raw pointer for CustomFilterProgram*.
      (WebCore::RenderLayer::FilterInfo::removeCustomFilterClients): Ditto.
      
      * rendering/RenderLayerFilterInfo.h: Removed the ifs around includes, which were
      overkill, since there is little harm including a few extra files. Changed to be a
      member class of RenderLayer, marked the class FINAL, and changed the style of the
      conditionals around the base classes. Renamed functions. Made overrides private and
      used OVERRIDE. Changed functions to take references instead of pointers. Did some
      small style cleanup. Made deleteOwnedPtr a friend so we can keep the destructor private.
      Moved the typedef of RenderLayerFilterInfoMap into the class and named it just Map.
      Got rid of s_filterMap and instead added a function named just map().
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7d2a1ffb
    • akling@apple.com's avatar
      Simplify subtree relayout scheduling a bit. · be814f83
      akling@apple.com authored
      <https://webkit.org/b/120684>
      
      Reviewed by Antti Koivisto.
      
      Subtree relayout scheduling should only happen while there's a render tree up,
      the code can freely assume that there's a RenderView present.
      
      Added an assertion that the render tree isn't being torn down. This should catch
      renderers doing unnecessary work during document detach and could be a source
      of "performance freebies."
      
      I also un-nested scheduleRelayoutOfSubtree() with early-return style to make
      the code more human-readable.
      
      * page/FrameView.h:
      * page/FrameView.cpp:
      (WebCore::FrameView::scheduleRelayoutOfSubtree):
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::scheduleRelayout):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155046 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      be814f83